From 86f96b0656dd9c4c2b3436badbf3874365d512cf Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:20:12 +0100 Subject: empty CODE-REDUCTION_* files (maybe usable later for futher code reduction efforts --- debian/CODE-REDUCTION_CLEANUP-BACKUPFILES | 212 ---------- debian/CODE-REDUCTION_CLEANUP-BRUTAL | 4 - debian/CODE-REDUCTION_CLEANUP-UNUSED | 107 ----- debian/CODE-REDUCTION_PRESERVE-INCLUDED | 2 - debian/CODE-REDUCTION_PRESERVE-NEEDED | 27 -- debian/CODE-REDUCTION_PRESERVE-SYMLINKED | 652 ------------------------------ 6 files changed, 1004 deletions(-) (limited to 'debian') diff --git a/debian/CODE-REDUCTION_CLEANUP-BACKUPFILES b/debian/CODE-REDUCTION_CLEANUP-BACKUPFILES index 0fb803e55..e69de29bb 100644 --- a/debian/CODE-REDUCTION_CLEANUP-BACKUPFILES +++ b/debian/CODE-REDUCTION_CLEANUP-BACKUPFILES @@ -1,212 +0,0 @@ -nx-X11/CHANGELOG.NX.original -nx-X11/CHANGELOG.X.original -nx-X11/include/extensions/XKBsrv.h.NX.original -nx-X11/include/extensions/XKBsrv.h.X.original -nx-X11/include/Xpoll.h.in.NX.original -nx-X11/include/Xpoll.h.in.X.original -nx-X11/lib/font/fontfile/encparse.c.NX.original -nx-X11/lib/font/fontfile/encparse.c.X.original -nx-X11/lib/X11/ChkIfEv.c.NX.original -nx-X11/lib/X11/ChkIfEv.c.X.original -nx-X11/lib/X11/cmsProp.c.X.original -nx-X11/lib/X11/ConnDis.c.NX.original -nx-X11/lib/X11/ConnDis.c.X.original -nx-X11/lib/X11/IfEvent.c.NX.original -nx-X11/lib/X11/IfEvent.c.X.original -nx-X11/lib/X11/Imakefile.NX.original -nx-X11/lib/X11/Imakefile.X.original -nx-X11/lib/X11/MaskEvent.c.NX.original -nx-X11/lib/X11/MaskEvent.c.X.original -nx-X11/lib/X11/OpenDis.c.NX.original -nx-X11/lib/X11/OpenDis.c.X.original -nx-X11/lib/X11/PeekIfEv.c.NX.original -nx-X11/lib/X11/PeekIfEv.c.X.original -nx-X11/lib/X11/Pending.c.NX.original -nx-X11/lib/X11/Pending.c.X.original -nx-X11/lib/X11/XKBMAlloc.c.NX.original -nx-X11/lib/X11/XKBMAlloc.c.X.original -nx-X11/lib/X11/XlibAsync.c.NX.original -nx-X11/lib/X11/XlibAsync.c.X.original -nx-X11/lib/X11/Xlib.h.NX.original -nx-X11/lib/X11/Xlib.h.X.original -nx-X11/lib/X11/XlibInt.c.NX.original -nx-X11/lib/X11/XlibInt.c.X.original -nx-X11/lib/X11/Xlibint.h.NX.original -nx-X11/lib/X11/Xlibint.h.X.original -nx-X11/lib/Xau/AuRead.c.NX.original -nx-X11/lib/Xau/AuRead.c.X.original -nx-X11/lib/Xpm/Imakefile.NX.original -nx-X11/lib/Xpm/Imakefile.X.original -nx-X11/lib/Xrender/Glyph.c.NX.original -nx-X11/lib/Xrender/Glyph.c.X.original -nx-X11/lib/Xrender/Xrender.h.NX.original -nx-X11/lib/Xrender/Xrender.h.X.original -nx-X11/lib/xtrans/Xtranssock.c.NX.original -nx-X11/lib/xtrans/Xtranssock.c.X.original -nx-X11/programs/Imakefile.NX.original -nx-X11/programs/Imakefile.X.original -nx-X11/programs/Xserver/dix/dixfonts.c.NX.original -nx-X11/programs/Xserver/dix/dixfonts.c.X.original -nx-X11/programs/Xserver/dix/pixmap.c.NX.original -nx-X11/programs/Xserver/dix/pixmap.c.X.original -nx-X11/programs/Xserver/fb/fbtrap.c.NX.original -nx-X11/programs/Xserver/fb/fbtrap.c.X.original -nx-X11/programs/Xserver/fb/Imakefile.NX.original -nx-X11/programs/Xserver/fb/Imakefile.X.original -nx-X11/programs/Xserver/GL/glx/render2.c.NX.original -nx-X11/programs/Xserver/GL/glx/render2.c.X.original -nx-X11/programs/Xserver/GL/glx/render2swap.c.NX.original -nx-X11/programs/Xserver/GL/glx/render2swap.c.X.original -nx-X11/programs/Xserver/GL/mesa/main/Imakefile.NX.original -nx-X11/programs/Xserver/GL/mesa/main/Imakefile.X.original -nx-X11/programs/Xserver/GL/mesa/X/Imakefile.NX.original -nx-X11/programs/Xserver/GL/mesa/X/Imakefile.X.original -nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c.NX.original -nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c.X.original -nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXevents.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXextension.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXglxext.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXglxext.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXrender.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXresource.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXresource.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXshm.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXshm.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c.XF86.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.X.original -nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original -nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.X.original -nx-X11/programs/Xserver/Imakefile.NX.original -nx-X11/programs/Xserver/Imakefile.X.original -nx-X11/programs/Xserver/include/dixstruct.h.NX.original -nx-X11/programs/Xserver/include/dixstruct.h.X.original -nx-X11/programs/Xserver/mi/Imakefile.NX.original -nx-X11/programs/Xserver/mi/Imakefile.X.original -nx-X11/programs/Xserver/os/auth.c.NX.original -nx-X11/programs/Xserver/os/auth.c.X.original -nx-X11/programs/Xserver/os/connection.c.NX.original -nx-X11/programs/Xserver/os/connection.c.X.original -nx-X11/programs/Xserver/os/Imakefile.NX.original -nx-X11/programs/Xserver/os/Imakefile.X.original -nx-X11/programs/Xserver/os/log.c.NX.original -nx-X11/programs/Xserver/os/log.c.X.original -nx-X11/programs/Xserver/os/oscolor.c.NX.original -nx-X11/programs/Xserver/os/oscolor.c.X.original -nx-X11/programs/Xserver/os/utils.c.NX.original -nx-X11/programs/Xserver/os/utils.c.X.original -nx-X11/programs/Xserver/os/WaitFor.c.NX.original -nx-X11/programs/Xserver/os/WaitFor.c.X.original -nx-X11/programs/Xserver/os/xdmcp.c.NX.original -nx-X11/programs/Xserver/os/xdmcp.c.X.original -nx-X11/programs/Xserver/os/xprintf.c.NX.original -nx-X11/programs/Xserver/os/xprintf.c.X.original -nx-X11/programs/Xserver/randr/Imakefile.NX.original -nx-X11/programs/Xserver/randr/Imakefile.X.original -nx-X11/programs/Xserver/randr/panoramiXproto.h.NX.original -nx-X11/programs/Xserver/randr/panoramiXproto.h.X.original -nx-X11/programs/Xserver/randr/randr.c.NX.original -nx-X11/programs/Xserver/randr/randr.c.X.original -nx-X11/programs/Xserver/randr/randr.h.NX.original -nx-X11/programs/Xserver/randr/randr.h.X.original -nx-X11/programs/Xserver/randr/randrproto.h.NX.original -nx-X11/programs/Xserver/randr/randrproto.h.X.original -nx-X11/programs/Xserver/randr/registry.h.NX.original -nx-X11/programs/Xserver/randr/registry.h.X.original -nx-X11/programs/Xserver/randr/rrcrtc.c.NX.original -nx-X11/programs/Xserver/randr/rrcrtc.c.X.original -nx-X11/programs/Xserver/randr/rrdispatch.c.X.original -nx-X11/programs/Xserver/randr/rrmode.c.NX.original -nx-X11/programs/Xserver/randr/rrmode.c.X.original -nx-X11/programs/Xserver/randr/rrscreen.c.NX.original -nx-X11/programs/Xserver/randr/rrscreen.c.X.original -nx-X11/programs/Xserver/randr/rrxinerama.c.NX.original -nx-X11/programs/Xserver/randr/rrxinerama.c.X.original -nx-X11/programs/Xserver/randr.X.original -nx-X11/programs/Xserver/render/renderedge.c.NX.original -nx-X11/programs/Xserver/render/renderedge.c.X.original -nx-X11/programs/Xserver/Xext/Imakefile.NX.original -nx-X11/programs/Xserver/Xext/Imakefile.X.original -nx-X11/programs/Xserver/Xext/security.c.NX.original -nx-X11/programs/Xserver/Xext/security.c.X.original -nx-X11/programs/Xserver/xfixes/cursor.c.NX.original -nx-X11/programs/Xserver/xfixes/cursor.c.X.original -nx-X11/programs/Xserver/xfixes/select.c.NX.original -nx-X11/programs/Xserver/xfixes/select.c.X.original -nx-X11/programs/Xserver/xkb/ddxKillSrv.c.NX.original -nx-X11/programs/Xserver/xkb/ddxKillSrv.c.X.original -nx-X11/programs/Xserver/xkb/ddxLoad.c.NX.original -nx-X11/programs/Xserver/xkb/ddxLoad.c.X.original -nx-X11/programs/Xserver/xkb/Imakefile.NX.original -nx-X11/programs/Xserver/xkb/Imakefile.X.original -nx-X11/programs/Xserver/xkb/xkbDflts.h.NX.original -nx-X11/programs/Xserver/xkb/xkbDflts.h.X.original -nx-X11/WSDrawBuffer.h.X.original diff --git a/debian/CODE-REDUCTION_CLEANUP-BRUTAL b/debian/CODE-REDUCTION_CLEANUP-BRUTAL index 991469f96..e69de29bb 100644 --- a/debian/CODE-REDUCTION_CLEANUP-BRUTAL +++ b/debian/CODE-REDUCTION_CLEANUP-BRUTAL @@ -1,4 +0,0 @@ -nx-X11/config/cf/ -nx-X11/extras/Mesa/ -nx-X11/extras/Xpm/ -nx-X11/lib/Xcursor/ \ No newline at end of file diff --git a/debian/CODE-REDUCTION_CLEANUP-UNUSED b/debian/CODE-REDUCTION_CLEANUP-UNUSED index 13354a8d0..e69de29bb 100644 --- a/debian/CODE-REDUCTION_CLEANUP-UNUSED +++ b/debian/CODE-REDUCTION_CLEANUP-UNUSED @@ -1,107 +0,0 @@ -nx-X11/config/docbook/ -nx-X11/config/pswrap/ -nx-X11/extras/drm/ -nx-X11/extras/expat/ -nx-X11/extras/fontconfig/ -nx-X11/extras/fonts/ -nx-X11/extras/freetype2/ -nx-X11/extras/ogl-sample/ -nx-X11/extras/regex/ -nx-X11/extras/rman/ -nx-X11/extras/ttf2pt1/ -nx-X11/extras/x86emu/ -nx-X11/extras/zlib/ -nx-X11/include/DPS/ -nx-X11/lib/expat/ -nx-X11/lib/fontconfig/ -nx-X11/lib/fontenc/ -nx-X11/lib/font/FreeType/ -nx-X11/lib/font/include/fontenc.h -nx-X11/lib/freetype2/ -nx-X11/lib/FS/ -nx-X11/lib/GL/apple/ -nx-X11/lib/GL/dri/ -nx-X11/lib/GL/mesa/drivers/dri/ffb -nx-X11/lib/GL/mesa/drivers/dri/gamma -nx-X11/lib/GL/mesa/drivers/dri/i810 -nx-X11/lib/GL/mesa/drivers/dri/i915 -nx-X11/lib/GL/mesa/drivers/dri/Imakefile -nx-X11/lib/GL/mesa/drivers/dri/mach64 -nx-X11/lib/GL/mesa/drivers/dri/mga -nx-X11/lib/GL/mesa/drivers/dri/r128 -nx-X11/lib/GL/mesa/drivers/dri/r200 -nx-X11/lib/GL/mesa/drivers/dri/radeon -nx-X11/lib/GL/mesa/drivers/dri/savage -nx-X11/lib/GL/mesa/drivers/dri/sis -nx-X11/lib/GL/mesa/drivers/dri/tdfx -nx-X11/lib/GL/mesa/drivers/dri/unichrome -nx-X11/lib/GL/mesa/drivers/dri/via -nx-X11/lib/GLU/ -nx-X11/lib/GLw/ -nx-X11/lib/ICE/ -nx-X11/lib/regex/ -nx-X11/lib/SM/ -nx-X11/lib/XTrap/ -nx-X11/lib/Xaw/ -nx-X11/lib/Xaw6/ -nx-X11/lib/Xaw7/ -nx-X11/lib/Xbsd/ -nx-X11/lib/Xevie/ -nx-X11/lib/Xfontcache/ -nx-X11/lib/Xft/ -nx-X11/lib/Xft1/ -nx-X11/lib/Xi/ -nx-X11/lib/Xmu/ -nx-X11/lib/Xmuu/ -nx-X11/lib/Xp/ -nx-X11/lib/XprintAppUtil/ -nx-X11/lib/XprintUtil/ -nx-X11/lib/Xss/ -nx-X11/lib/Xt/ -nx-X11/lib/Xv/ -nx-X11/lib/XvMC/ -nx-X11/lib/Xxf86*/ -nx-X11/lib/apple/ -nx-X11/lib/dmx/ -nx-X11/lib/dps/ -nx-X11/lib/dpstk/ -nx-X11/lib/lbxutil/ -nx-X11/lib/misc/ -nx-X11/lib/psres/ -nx-X11/lib/windows/ -nx-X11/lib/zlib/ -nx-X11/nls/ -nx-X11/programs/Xserver/afb/ -nx-X11/programs/Xserver/cfb/ -nx-X11/programs/Xserver/cfb16/ -nx-X11/programs/Xserver/cfb24/ -nx-X11/programs/Xserver/cfb32/ -nx-X11/programs/Xserver/hw/darwin/ -nx-X11/programs/Xserver/hw/dmx/ -nx-X11/programs/Xserver/hw/kdrive/ -nx-X11/programs/Xserver/hw/sun/ -nx-X11/programs/Xserver/hw/sunLynx/ -nx-X11/programs/Xserver/hw/vfb/ -nx-X11/programs/Xserver/hw/xfree86/ -nx-X11/programs/Xserver/hw/xnest/ -nx-X11/programs/Xserver/hw/xwin/ -nx-X11/programs/Xserver/ilbm/ -nx-X11/programs/Xserver/iplan2p2/ -nx-X11/programs/Xserver/iplan2p4/ -nx-X11/programs/Xserver/iplan2p8/ -nx-X11/programs/Xserver/lbx/ -nx-X11/programs/Xserver/mfb/ -nx-X11/programs/Xserver/miext/layer/ -nx-X11/programs/Xserver/miext/shadow/ -nx-X11/programs/Xserver/miext/rootless/ -nx-X11/programs/Xserver/GL/apple/ -nx-X11/programs/Xserver/GL/dri/ -nx-X11/programs/Xserver/GL/windows/ -nx-X11/programs/Xserver/XpConfig/ -nx-X11/programs/Xserver/Xprint/ -nx-X11/programs/Xserver/XFree86.def -nx-X11/programs/Xserver/Xnest.def -nx-X11/programs/Xserver/Xorg.def -nx-X11/programs/Xserver/Xvfb.def -nx-X11/programs/xterm/ -nx-X11/util/ diff --git a/debian/CODE-REDUCTION_PRESERVE-INCLUDED b/debian/CODE-REDUCTION_PRESERVE-INCLUDED index 7daf5a93e..e69de29bb 100644 --- a/debian/CODE-REDUCTION_PRESERVE-INCLUDED +++ b/debian/CODE-REDUCTION_PRESERVE-INCLUDED @@ -1,2 +0,0 @@ -nx-X11/programs/Xserver/mfb/maskbits.h -nx-X11/lib/Xcursor/config-subst \ No newline at end of file diff --git a/debian/CODE-REDUCTION_PRESERVE-NEEDED b/debian/CODE-REDUCTION_PRESERVE-NEEDED index 44eecd694..e69de29bb 100644 --- a/debian/CODE-REDUCTION_PRESERVE-NEEDED +++ b/debian/CODE-REDUCTION_PRESERVE-NEEDED @@ -1,27 +0,0 @@ -nx-X11/config/cf/cross.def -nx-X11/config/cf/cross.rules -nx-X11/config/cf/host.def -nx-X11/config/cf/Imake.cf -nx-X11/config/cf/Imakefile -nx-X11/config/cf/Imake.rules -nx-X11/config/cf/Imake.tmpl -nx-X11/config/cf/Library.tmpl -nx-X11/config/cf/linux.cf -nx-X11/config/cf/lnxLib.rules -nx-X11/config/cf/lnxLib.tmpl -nx-X11/config/cf/noop.rules -nx-X11/config/cf/README -nx-X11/config/cf/ServerLib.tmpl -nx-X11/config/cf/Server.tmpl -nx-X11/config/cf/site.def -nx-X11/config/cf/Threads.tmpl -nx-X11/config/cf/X11.rules -nx-X11/config/cf/X11.tmpl -nx-X11/config/cf/xf86.rules -nx-X11/config/cf/xf86site.def -nx-X11/config/cf/xf86.tmpl -nx-X11/config/cf/xfree86.cf -nx-X11/config/cf/xorg.cf -nx-X11/config/cf/xorgsite.def -nx-X11/config/cf/xorg.tmpl -nx-X11/config/cf/xorgversion.def diff --git a/debian/CODE-REDUCTION_PRESERVE-SYMLINKED b/debian/CODE-REDUCTION_PRESERVE-SYMLINKED index 573ee6491..e69de29bb 100644 --- a/debian/CODE-REDUCTION_PRESERVE-SYMLINKED +++ b/debian/CODE-REDUCTION_PRESERVE-SYMLINKED @@ -1,652 +0,0 @@ -nx-X11/extras/Mesa/include/GL/glext.h -nx-X11/extras/Mesa/include/GL/gl.h -nx-X11/extras/Mesa/include/GL/glxext.h -nx-X11/extras/Mesa/include/GL/internal/glcore.h -nx-X11/extras/Mesa/include/GL/osmesa.h -nx-X11/extras/Mesa/include/GL/xmesa.h -nx-X11/extras/Mesa/include/GL/xmesa_xf86.h -nx-X11/extras/Mesa/src/glx/x11/compsize.c -nx-X11/extras/Mesa/src/glx/x11/indirect_size.c -nx-X11/extras/Mesa/src/glx/x11/indirect_size.h -nx-X11/extras/Mesa/src/mesa/array_cache/acache.h -nx-X11/extras/Mesa/src/mesa/array_cache/ac_context.c -nx-X11/extras/Mesa/src/mesa/array_cache/ac_context.h -nx-X11/extras/Mesa/src/mesa/array_cache/ac_import.c -nx-X11/extras/Mesa/src/mesa/drivers/common/driverfuncs.c -nx-X11/extras/Mesa/src/mesa/drivers/common/driverfuncs.h -nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c -nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.h -nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_api.c -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_buffer.c -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_dd.c -nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_line.c -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_span.c -nx-X11/extras/Mesa/src/mesa/drivers/x11/xm_tri.c -nx-X11/extras/Mesa/src/mesa/glapi/dispatch.h -nx-X11/extras/Mesa/src/mesa/glapi/glapi.c -nx-X11/extras/Mesa/src/mesa/glapi/glapi.h -nx-X11/extras/Mesa/src/mesa/glapi/glapioffsets.h -nx-X11/extras/Mesa/src/mesa/glapi/glapitable.h -nx-X11/extras/Mesa/src/mesa/glapi/glapitemp.h -nx-X11/extras/Mesa/src/mesa/glapi/glprocs.h -nx-X11/extras/Mesa/src/mesa/glapi/glthread.c -nx-X11/extras/Mesa/src/mesa/glapi/glthread.h -nx-X11/extras/Mesa/src/mesa/main/accum.c -nx-X11/extras/Mesa/src/mesa/main/accum.h -nx-X11/extras/Mesa/src/mesa/main/api_arrayelt.c -nx-X11/extras/Mesa/src/mesa/main/api_arrayelt.h -nx-X11/extras/Mesa/src/mesa/main/api_eval.h -nx-X11/extras/Mesa/src/mesa/main/api_loopback.c -nx-X11/extras/Mesa/src/mesa/main/api_loopback.h -nx-X11/extras/Mesa/src/mesa/main/api_noop.c -nx-X11/extras/Mesa/src/mesa/main/api_noop.h -nx-X11/extras/Mesa/src/mesa/main/api_validate.c -nx-X11/extras/Mesa/src/mesa/main/api_validate.h -nx-X11/extras/Mesa/src/mesa/main/attrib.c -nx-X11/extras/Mesa/src/mesa/main/attrib.h -nx-X11/extras/Mesa/src/mesa/main/blend.c -nx-X11/extras/Mesa/src/mesa/main/blend.h -nx-X11/extras/Mesa/src/mesa/main/bufferobj.c -nx-X11/extras/Mesa/src/mesa/main/bufferobj.h -nx-X11/extras/Mesa/src/mesa/main/buffers.c -nx-X11/extras/Mesa/src/mesa/main/buffers.h -nx-X11/extras/Mesa/src/mesa/main/clip.c -nx-X11/extras/Mesa/src/mesa/main/clip.h -nx-X11/extras/Mesa/src/mesa/main/colormac.h -nx-X11/extras/Mesa/src/mesa/main/colortab.c -nx-X11/extras/Mesa/src/mesa/main/colortab.h -nx-X11/extras/Mesa/src/mesa/main/config.h -nx-X11/extras/Mesa/src/mesa/main/context.c -nx-X11/extras/Mesa/src/mesa/main/context.h -nx-X11/extras/Mesa/src/mesa/main/convolve.c -nx-X11/extras/Mesa/src/mesa/main/convolve.h -nx-X11/extras/Mesa/src/mesa/main/dd.h -nx-X11/extras/Mesa/src/mesa/main/debug.c -nx-X11/extras/Mesa/src/mesa/main/debug.h -nx-X11/extras/Mesa/src/mesa/main/depth.c -nx-X11/extras/Mesa/src/mesa/main/depth.h -nx-X11/extras/Mesa/src/mesa/main/dispatch.c -nx-X11/extras/Mesa/src/mesa/main/dlist.c -nx-X11/extras/Mesa/src/mesa/main/dlist.h -nx-X11/extras/Mesa/src/mesa/main/drawpix.c -nx-X11/extras/Mesa/src/mesa/main/drawpix.h -nx-X11/extras/Mesa/src/mesa/main/enable.c -nx-X11/extras/Mesa/src/mesa/main/enable.h -nx-X11/extras/Mesa/src/mesa/main/enums.c -nx-X11/extras/Mesa/src/mesa/main/enums.h -nx-X11/extras/Mesa/src/mesa/main/eval.c -nx-X11/extras/Mesa/src/mesa/main/eval.h -nx-X11/extras/Mesa/src/mesa/main/execmem.c -nx-X11/extras/Mesa/src/mesa/main/extensions.c -nx-X11/extras/Mesa/src/mesa/main/extensions.h -nx-X11/extras/Mesa/src/mesa/main/fbobject.c -nx-X11/extras/Mesa/src/mesa/main/fbobject.h -nx-X11/extras/Mesa/src/mesa/main/feedback.c -nx-X11/extras/Mesa/src/mesa/main/feedback.h -nx-X11/extras/Mesa/src/mesa/main/fog.c -nx-X11/extras/Mesa/src/mesa/main/fog.h -nx-X11/extras/Mesa/src/mesa/main/framebuffer.c -nx-X11/extras/Mesa/src/mesa/main/framebuffer.h -nx-X11/extras/Mesa/src/mesa/main/get.c -nx-X11/extras/Mesa/src/mesa/main/get.h -nx-X11/extras/Mesa/src/mesa/main/getstring.c -nx-X11/extras/Mesa/src/mesa/main/glheader.h -nx-X11/extras/Mesa/src/mesa/main/hash.c -nx-X11/extras/Mesa/src/mesa/main/hash.h -nx-X11/extras/Mesa/src/mesa/main/hint.c -nx-X11/extras/Mesa/src/mesa/main/hint.h -nx-X11/extras/Mesa/src/mesa/main/histogram.c -nx-X11/extras/Mesa/src/mesa/main/histogram.h -nx-X11/extras/Mesa/src/mesa/main/image.c -nx-X11/extras/Mesa/src/mesa/main/image.h -nx-X11/extras/Mesa/src/mesa/main/imports.c -nx-X11/extras/Mesa/src/mesa/main/imports.h -nx-X11/extras/Mesa/src/mesa/main/light.c -nx-X11/extras/Mesa/src/mesa/main/light.h -nx-X11/extras/Mesa/src/mesa/main/lines.c -nx-X11/extras/Mesa/src/mesa/main/lines.h -nx-X11/extras/Mesa/src/mesa/main/macros.h -nx-X11/extras/Mesa/src/mesa/main/matrix.c -nx-X11/extras/Mesa/src/mesa/main/matrix.h -nx-X11/extras/Mesa/src/mesa/main/mm.c -nx-X11/extras/Mesa/src/mesa/main/mm.h -nx-X11/extras/Mesa/src/mesa/main/mtypes.h -nx-X11/extras/Mesa/src/mesa/main/occlude.c -nx-X11/extras/Mesa/src/mesa/main/occlude.h -nx-X11/extras/Mesa/src/mesa/main/pixel.c -nx-X11/extras/Mesa/src/mesa/main/pixel.h -nx-X11/extras/Mesa/src/mesa/main/points.c -nx-X11/extras/Mesa/src/mesa/main/points.h -nx-X11/extras/Mesa/src/mesa/main/polygon.c -nx-X11/extras/Mesa/src/mesa/main/polygon.h -nx-X11/extras/Mesa/src/mesa/main/rastpos.c -nx-X11/extras/Mesa/src/mesa/main/rastpos.h -nx-X11/extras/Mesa/src/mesa/main/renderbuffer.c -nx-X11/extras/Mesa/src/mesa/main/renderbuffer.h -nx-X11/extras/Mesa/src/mesa/main/simple_list.h -nx-X11/extras/Mesa/src/mesa/main/state.c -nx-X11/extras/Mesa/src/mesa/main/state.h -nx-X11/extras/Mesa/src/mesa/main/stencil.c -nx-X11/extras/Mesa/src/mesa/main/stencil.h -nx-X11/extras/Mesa/src/mesa/main/texcompress.c -nx-X11/extras/Mesa/src/mesa/main/texcompress_fxt1.c -nx-X11/extras/Mesa/src/mesa/main/texcompress.h -nx-X11/extras/Mesa/src/mesa/main/texcompress_s3tc.c -nx-X11/extras/Mesa/src/mesa/main/texenvprogram.c -nx-X11/extras/Mesa/src/mesa/main/texenvprogram.h -nx-X11/extras/Mesa/src/mesa/main/texformat.c -nx-X11/extras/Mesa/src/mesa/main/texformat.h -nx-X11/extras/Mesa/src/mesa/main/texformat_tmp.h -nx-X11/extras/Mesa/src/mesa/main/teximage.c -nx-X11/extras/Mesa/src/mesa/main/teximage.h -nx-X11/extras/Mesa/src/mesa/main/texobj.c -nx-X11/extras/Mesa/src/mesa/main/texobj.h -nx-X11/extras/Mesa/src/mesa/main/texrender.c -nx-X11/extras/Mesa/src/mesa/main/texrender.h -nx-X11/extras/Mesa/src/mesa/main/texstate.c -nx-X11/extras/Mesa/src/mesa/main/texstate.h -nx-X11/extras/Mesa/src/mesa/main/texstore.c -nx-X11/extras/Mesa/src/mesa/main/texstore.h -nx-X11/extras/Mesa/src/mesa/main/varray.c -nx-X11/extras/Mesa/src/mesa/main/varray.h -nx-X11/extras/Mesa/src/mesa/main/version.h -nx-X11/extras/Mesa/src/mesa/main/vtxfmt.c -nx-X11/extras/Mesa/src/mesa/main/vtxfmt.h -nx-X11/extras/Mesa/src/mesa/main/vtxfmt_tmp.h -nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h -nx-X11/extras/Mesa/src/mesa/math/mathmod.h -nx-X11/extras/Mesa/src/mesa/math/m_clip_tmp.h -nx-X11/extras/Mesa/src/mesa/math/m_copy_tmp.h -nx-X11/extras/Mesa/src/mesa/math/m_debug_clip.c -nx-X11/extras/Mesa/src/mesa/math/m_debug.h -nx-X11/extras/Mesa/src/mesa/math/m_debug_norm.c -nx-X11/extras/Mesa/src/mesa/math/m_debug_util.h -nx-X11/extras/Mesa/src/mesa/math/m_debug_xform.c -nx-X11/extras/Mesa/src/mesa/math/m_dotprod_tmp.h -nx-X11/extras/Mesa/src/mesa/math/m_eval.c -nx-X11/extras/Mesa/src/mesa/math/m_eval.h -nx-X11/extras/Mesa/src/mesa/math/m_matrix.c -nx-X11/extras/Mesa/src/mesa/math/m_matrix.h -nx-X11/extras/Mesa/src/mesa/math/m_norm_tmp.h -nx-X11/extras/Mesa/src/mesa/math/m_translate.c -nx-X11/extras/Mesa/src/mesa/math/m_translate.h -nx-X11/extras/Mesa/src/mesa/math/m_trans_tmp.h -nx-X11/extras/Mesa/src/mesa/math/m_vector.c -nx-X11/extras/Mesa/src/mesa/math/m_vector.h -nx-X11/extras/Mesa/src/mesa/math/m_xform.c -nx-X11/extras/Mesa/src/mesa/math/m_xform.h -nx-X11/extras/Mesa/src/mesa/math/m_xform_tmp.h -nx-X11/extras/Mesa/src/mesa/shader/arbfragparse.c -nx-X11/extras/Mesa/src/mesa/shader/arbfragparse.h -nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c -nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.h -nx-X11/extras/Mesa/src/mesa/shader/arbprogram.c -nx-X11/extras/Mesa/src/mesa/shader/arbprogram.h -nx-X11/extras/Mesa/src/mesa/shader/arbprogram_syn.h -nx-X11/extras/Mesa/src/mesa/shader/arbvertparse.c -nx-X11/extras/Mesa/src/mesa/shader/arbvertparse.h -nx-X11/extras/Mesa/src/mesa/shader/atifragshader.c -nx-X11/extras/Mesa/src/mesa/shader/atifragshader.h -nx-X11/extras/Mesa/src/mesa/shader/grammar/grammar.c -nx-X11/extras/Mesa/src/mesa/shader/grammar/grammar.h -nx-X11/extras/Mesa/src/mesa/shader/grammar/grammar_mesa.c -nx-X11/extras/Mesa/src/mesa/shader/grammar/grammar_mesa.h -nx-X11/extras/Mesa/src/mesa/shader/grammar/grammar_syn.h -nx-X11/extras/Mesa/src/mesa/shader/nvfragparse.c -nx-X11/extras/Mesa/src/mesa/shader/nvfragparse.h -nx-X11/extras/Mesa/src/mesa/shader/nvfragprog.h -nx-X11/extras/Mesa/src/mesa/shader/nvprogram.c -nx-X11/extras/Mesa/src/mesa/shader/nvprogram.h -nx-X11/extras/Mesa/src/mesa/shader/nvvertexec.c -nx-X11/extras/Mesa/src/mesa/shader/nvvertexec.h -nx-X11/extras/Mesa/src/mesa/shader/nvvertparse.c -nx-X11/extras/Mesa/src/mesa/shader/nvvertparse.h -nx-X11/extras/Mesa/src/mesa/shader/nvvertprog.h -nx-X11/extras/Mesa/src/mesa/shader/program.c -nx-X11/extras/Mesa/src/mesa/shader/program.h -nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.c -nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.h -nx-X11/extras/Mesa/src/mesa/shader/shaderobjects.c -nx-X11/extras/Mesa/src/mesa/shader/shaderobjects.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_common_builtin_gc_bin.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_common_builtin_gc.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_core_gc_bin.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_core_gc.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_fragment_builtin_gc_bin.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_shader_syn.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_version_syn.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_vertex_builtin_gc_bin.h -nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_assignment.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_assignment.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_conditional.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_conditional.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_constructor.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_constructor.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_compile.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_compile.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_storage.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_storage.h -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.c -nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h -nx-X11/extras/Mesa/src/mesa/shader/slang/traverse_wrap.h -nx-X11/extras/Mesa/src/mesa/swrast/s_aaline.c -nx-X11/extras/Mesa/src/mesa/swrast/s_aaline.h -nx-X11/extras/Mesa/src/mesa/swrast/s_aalinetemp.h -nx-X11/extras/Mesa/src/mesa/swrast/s_aatriangle.c -nx-X11/extras/Mesa/src/mesa/swrast/s_aatriangle.h -nx-X11/extras/Mesa/src/mesa/swrast/s_aatritemp.h -nx-X11/extras/Mesa/src/mesa/swrast/s_accum.c -nx-X11/extras/Mesa/src/mesa/swrast/s_accum.h -nx-X11/extras/Mesa/src/mesa/swrast/s_alpha.c -nx-X11/extras/Mesa/src/mesa/swrast/s_alpha.h -nx-X11/extras/Mesa/src/mesa/swrast/s_atifragshader.c -nx-X11/extras/Mesa/src/mesa/swrast/s_atifragshader.h -nx-X11/extras/Mesa/src/mesa/swrast/s_bitmap.c -nx-X11/extras/Mesa/src/mesa/swrast/s_blend.c -nx-X11/extras/Mesa/src/mesa/swrast/s_blend.h -nx-X11/extras/Mesa/src/mesa/swrast/s_buffers.c -nx-X11/extras/Mesa/src/mesa/swrast/s_context.c -nx-X11/extras/Mesa/src/mesa/swrast/s_context.h -nx-X11/extras/Mesa/src/mesa/swrast/s_copypix.c -nx-X11/extras/Mesa/src/mesa/swrast/s_depth.c -nx-X11/extras/Mesa/src/mesa/swrast/s_depth.h -nx-X11/extras/Mesa/src/mesa/swrast/s_drawpix.c -nx-X11/extras/Mesa/src/mesa/swrast/s_drawpix.h -nx-X11/extras/Mesa/src/mesa/swrast_setup/ss_context.c -nx-X11/extras/Mesa/src/mesa/swrast_setup/ss_context.h -nx-X11/extras/Mesa/src/mesa/swrast_setup/ss_triangle.c -nx-X11/extras/Mesa/src/mesa/swrast_setup/ss_triangle.h -nx-X11/extras/Mesa/src/mesa/swrast_setup/ss_tritmp.h -nx-X11/extras/Mesa/src/mesa/swrast_setup/swrast_setup.h -nx-X11/extras/Mesa/src/mesa/swrast/s_feedback.c -nx-X11/extras/Mesa/src/mesa/swrast/s_feedback.h -nx-X11/extras/Mesa/src/mesa/swrast/s_fog.c -nx-X11/extras/Mesa/src/mesa/swrast/s_fog.h -nx-X11/extras/Mesa/src/mesa/swrast/s_imaging.c -nx-X11/extras/Mesa/src/mesa/swrast/s_lines.c -nx-X11/extras/Mesa/src/mesa/swrast/s_lines.h -nx-X11/extras/Mesa/src/mesa/swrast/s_linetemp.h -nx-X11/extras/Mesa/src/mesa/swrast/s_logic.c -nx-X11/extras/Mesa/src/mesa/swrast/s_logic.h -nx-X11/extras/Mesa/src/mesa/swrast/s_masking.c -nx-X11/extras/Mesa/src/mesa/swrast/s_masking.h -nx-X11/extras/Mesa/src/mesa/swrast/s_nvfragprog.c -nx-X11/extras/Mesa/src/mesa/swrast/s_nvfragprog.h -nx-X11/extras/Mesa/src/mesa/swrast/s_pixeltex.c -nx-X11/extras/Mesa/src/mesa/swrast/s_pixeltex.h -nx-X11/extras/Mesa/src/mesa/swrast/s_points.c -nx-X11/extras/Mesa/src/mesa/swrast/s_points.h -nx-X11/extras/Mesa/src/mesa/swrast/s_pointtemp.h -nx-X11/extras/Mesa/src/mesa/swrast/s_readpix.c -nx-X11/extras/Mesa/src/mesa/swrast/s_span.c -nx-X11/extras/Mesa/src/mesa/swrast/s_span.h -nx-X11/extras/Mesa/src/mesa/swrast/s_spantemp.h -nx-X11/extras/Mesa/src/mesa/swrast/s_stencil.c -nx-X11/extras/Mesa/src/mesa/swrast/s_stencil.h -nx-X11/extras/Mesa/src/mesa/swrast/s_texstore.c -nx-X11/extras/Mesa/src/mesa/swrast/s_texture.c -nx-X11/extras/Mesa/src/mesa/swrast/s_texture.h -nx-X11/extras/Mesa/src/mesa/swrast/s_triangle.c -nx-X11/extras/Mesa/src/mesa/swrast/s_triangle.h -nx-X11/extras/Mesa/src/mesa/swrast/s_trispan.h -nx-X11/extras/Mesa/src/mesa/swrast/s_tritemp.h -nx-X11/extras/Mesa/src/mesa/swrast/swrast.h -nx-X11/extras/Mesa/src/mesa/swrast/s_zoom.c -nx-X11/extras/Mesa/src/mesa/swrast/s_zoom.h -nx-X11/extras/Mesa/src/mesa/tnl/t_array_api.c -nx-X11/extras/Mesa/src/mesa/tnl/t_array_api.h -nx-X11/extras/Mesa/src/mesa/tnl/t_array_import.c -nx-X11/extras/Mesa/src/mesa/tnl/t_array_import.h -nx-X11/extras/Mesa/src/mesa/tnl/t_context.c -nx-X11/extras/Mesa/src/mesa/tnl/t_context.h -nx-X11/extras/Mesa/src/mesa/tnl/tnl.h -nx-X11/extras/Mesa/src/mesa/tnl/t_pipeline.c -nx-X11/extras/Mesa/src/mesa/tnl/t_pipeline.h -nx-X11/extras/Mesa/src/mesa/tnl/t_save_api.c -nx-X11/extras/Mesa/src/mesa/tnl/t_save_api.h -nx-X11/extras/Mesa/src/mesa/tnl/t_save_loopback.c -nx-X11/extras/Mesa/src/mesa/tnl/t_save_playback.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_arbprogram.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_arbprogram.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_arbprogram_sse.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_cliptmp.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_cull.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_fog.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_light.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_lighttmp.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_normals.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_points.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_program.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_render.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_rendertmp.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_texgen.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_texmat.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vb_vertex.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vertex.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vertex_generic.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vertex.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vertex_sse.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vp_build.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vp_build.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_api.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_api.h -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_eval.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_exec.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_generic.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_x86.c -nx-X11/extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S -nx-X11/extras/Xpm/lib/Attrib.c -nx-X11/extras/Xpm/lib/CrBufFrI.c -nx-X11/extras/Xpm/lib/CrBufFrP.c -nx-X11/extras/Xpm/lib/CrDatFrI.c -nx-X11/extras/Xpm/lib/CrDatFrP.c -nx-X11/extras/Xpm/lib/create.c -nx-X11/extras/Xpm/lib/CrIFrBuf.c -nx-X11/extras/Xpm/lib/CrIFrDat.c -nx-X11/extras/Xpm/lib/CrIFrP.c -nx-X11/extras/Xpm/lib/CrPFrBuf.c -nx-X11/extras/Xpm/lib/CrPFrDat.c -nx-X11/extras/Xpm/lib/CrPFrI.c -nx-X11/extras/Xpm/lib/data.c -nx-X11/extras/Xpm/lib/hashtab.c -nx-X11/extras/Xpm/lib/Image.c -nx-X11/extras/Xpm/lib/Info.c -nx-X11/extras/Xpm/lib/misc.c -nx-X11/extras/Xpm/lib/parse.c -nx-X11/extras/Xpm/lib/RdFToBuf.c -nx-X11/extras/Xpm/lib/RdFToDat.c -nx-X11/extras/Xpm/lib/RdFToI.c -nx-X11/extras/Xpm/lib/RdFToP.c -nx-X11/extras/Xpm/lib/rgb.c -nx-X11/extras/Xpm/lib/scan.c -nx-X11/extras/Xpm/lib/WrFFrBuf.c -nx-X11/extras/Xpm/lib/WrFFrDat.c -nx-X11/extras/Xpm/lib/WrFFrI.c -nx-X11/extras/Xpm/lib/WrFFrP.c -nx-X11/extras/Xpm/lib/xpm.h -nx-X11/extras/Xpm/lib/XpmI.h -nx-X11/include/ap_keysym.h -nx-X11/include/bitmaps/1x1 -nx-X11/include/bitmaps/2x2 -nx-X11/include/bitmaps/black -nx-X11/include/bitmaps/boxes -nx-X11/include/bitmaps/calculator -nx-X11/include/bitmaps/cntr_ptr -nx-X11/include/bitmaps/cntr_ptrmsk -nx-X11/include/bitmaps/cross_weave -nx-X11/include/bitmaps/dimple1 -nx-X11/include/bitmaps/dimple3 -nx-X11/include/bitmaps/dot -nx-X11/include/bitmaps/dropbar7 -nx-X11/include/bitmaps/dropbar8 -nx-X11/include/bitmaps/escherknot -nx-X11/include/bitmaps/flagdown -nx-X11/include/bitmaps/flagup -nx-X11/include/bitmaps/flipped_gray -nx-X11/include/bitmaps/gray -nx-X11/include/bitmaps/gray1 -nx-X11/include/bitmaps/gray3 -nx-X11/include/bitmaps/grid16 -nx-X11/include/bitmaps/grid2 -nx-X11/include/bitmaps/grid4 -nx-X11/include/bitmaps/grid8 -nx-X11/include/bitmaps/hlines2 -nx-X11/include/bitmaps/hlines3 -nx-X11/include/bitmaps/icon -nx-X11/include/bitmaps/keyboard16 -nx-X11/include/bitmaps/left_ptr -nx-X11/include/bitmaps/left_ptrmsk -nx-X11/include/bitmaps/letters -nx-X11/include/bitmaps/light_gray -nx-X11/include/bitmaps/mailempty -nx-X11/include/bitmaps/mailemptymsk -nx-X11/include/bitmaps/mailfull -nx-X11/include/bitmaps/mailfullmsk -nx-X11/include/bitmaps/mensetmanus -nx-X11/include/bitmaps/menu10 -nx-X11/include/bitmaps/menu12 -nx-X11/include/bitmaps/menu16 -nx-X11/include/bitmaps/menu6 -nx-X11/include/bitmaps/menu8 -nx-X11/include/bitmaps/noletters -nx-X11/include/bitmaps/opendot -nx-X11/include/bitmaps/opendotMask -nx-X11/include/bitmaps/plaid -nx-X11/include/bitmaps/right_ptr -nx-X11/include/bitmaps/right_ptrmsk -nx-X11/include/bitmaps/root_weave -nx-X11/include/bitmaps/scales -nx-X11/include/bitmaps/sipb -nx-X11/include/bitmaps/star -nx-X11/include/bitmaps/starMask -nx-X11/include/bitmaps/stipple -nx-X11/include/bitmaps/target -nx-X11/include/bitmaps/terminal -nx-X11/include/bitmaps/tie_fighter -nx-X11/include/bitmaps/vlines2 -nx-X11/include/bitmaps/vlines3 -nx-X11/include/bitmaps/weird_size -nx-X11/include/bitmaps/wide_weave -nx-X11/include/bitmaps/wingdogs -nx-X11/include/bitmaps/woman -nx-X11/include/bitmaps/xfd_icon -nx-X11/include/bitmaps/xlogo11 -nx-X11/include/bitmaps/xlogo16 -nx-X11/include/bitmaps/xlogo32 -nx-X11/include/bitmaps/xlogo64 -nx-X11/include/bitmaps/xsnow -nx-X11/include/DECkeysym.h -nx-X11/include/extensions/bigreqstr.h -nx-X11/include/extensions/composite.h -nx-X11/include/extensions/compositeproto.h -nx-X11/include/extensions/damageproto.h -nx-X11/include/extensions/damagewire.h -nx-X11/include/extensions/dmxext.h -nx-X11/include/extensions/dmxproto.h -nx-X11/include/extensions/dpms.h -nx-X11/include/extensions/dpmsstr.h -nx-X11/include/extensions/extutil.h -nx-X11/include/extensions/lbxbuf.h -nx-X11/include/extensions/lbxbufstr.h -nx-X11/include/extensions/lbxdeltastr.h -nx-X11/include/extensions/lbximage.h -nx-X11/include/extensions/lbxopts.h -nx-X11/include/extensions/lbxstr.h -nx-X11/include/extensions/lbxzlib.h -nx-X11/include/extensions/MITMisc.h -nx-X11/include/extensions/mitmiscstr.h -nx-X11/include/extensions/multibuf.h -nx-X11/include/extensions/multibufst.h -nx-X11/include/extensions/panoramiXext.h -nx-X11/include/extensions/panoramiXproto.h -nx-X11/include/extensions/Print.h -nx-X11/include/extensions/Printstr.h -nx-X11/include/extensions/randr.h -nx-X11/include/extensions/randrproto.h -nx-X11/include/extensions/record.h -nx-X11/include/extensions/recordstr.h -nx-X11/include/extensions/render.h -nx-X11/include/extensions/renderproto.h -nx-X11/include/extensions/security.h -nx-X11/include/extensions/securstr.h -nx-X11/include/extensions/shape.h -nx-X11/include/extensions/shapestr.h -nx-X11/include/extensions/shmstr.h -nx-X11/include/extensions/sync.h -nx-X11/include/extensions/syncstr.h -nx-X11/include/extensions/vldXvMC.h -nx-X11/include/extensions/Xag.h -nx-X11/include/extensions/Xagsrv.h -nx-X11/include/extensions/Xagstr.h -nx-X11/include/extensions/xcmiscstr.h -nx-X11/include/extensions/Xcup.h -nx-X11/include/extensions/Xcupstr.h -nx-X11/include/extensions/Xdbe.h -nx-X11/include/extensions/Xdbeproto.h -nx-X11/include/extensions/Xevie.h -nx-X11/include/extensions/Xeviestr.h -nx-X11/include/extensions/XEVI.h -nx-X11/include/extensions/XEVIstr.h -nx-X11/include/extensions/Xext.h -nx-X11/include/extensions/xf86bigfont.h -nx-X11/include/extensions/xf86bigfstr.h -nx-X11/include/extensions/xf86dga1.h -nx-X11/include/extensions/xf86dga1str.h -nx-X11/include/extensions/xf86dga.h -nx-X11/include/extensions/xf86dgastr.h -nx-X11/include/extensions/xf86misc.h -nx-X11/include/extensions/xf86mscstr.h -nx-X11/include/extensions/xf86vmode.h -nx-X11/include/extensions/xf86vmstr.h -nx-X11/include/extensions/xfixesproto.h -nx-X11/include/extensions/xfixeswire.h -nx-X11/include/extensions/XI.h -nx-X11/include/extensions/Xinerama.h -nx-X11/include/extensions/XInput.h -nx-X11/include/extensions/XIproto.h -nx-X11/include/extensions/XKBgeom.h -nx-X11/include/extensions/XKB.h -nx-X11/include/extensions/XKBproto.h -nx-X11/include/extensions/XKBsrv.h -nx-X11/include/extensions/XKBstr.h -nx-X11/include/extensions/XLbx.h -nx-X11/include/extensions/XRes.h -nx-X11/include/extensions/XResproto.h -nx-X11/include/extensions/XShm.h -nx-X11/include/extensions/xtestext1.h -nx-X11/include/extensions/XTest.h -nx-X11/include/extensions/xteststr.h -nx-X11/include/extensions/xtrapbits.h -nx-X11/include/extensions/xtrapddmi.h -nx-X11/include/extensions/xtrapdi.h -nx-X11/include/extensions/xtrapemacros.h -nx-X11/include/extensions/xtraplib.h -nx-X11/include/extensions/xtraplibp.h -nx-X11/include/extensions/xtrapproto.h -nx-X11/include/extensions/Xv.h -nx-X11/include/extensions/Xvlib.h -nx-X11/include/extensions/XvMC.h -nx-X11/include/extensions/XvMClib.h -nx-X11/include/extensions/XvMCproto.h -nx-X11/include/extensions/Xvproto.h -nx-X11/include/fonts/font.h -nx-X11/include/fonts/fontstruct.h -nx-X11/include/fonts/FS.h -nx-X11/include/fonts/fsmasks.h -nx-X11/include/fonts/FSproto.h -nx-X11/include/GL/glu.h -nx-X11/include/GL/glx.h -nx-X11/include/GL/glxint.h -nx-X11/include/GL/glxmd.h -nx-X11/include/GL/glxproto.h -nx-X11/include/GL/glxtokens.h -nx-X11/include/HPkeysym.h -nx-X11/include/keysymdef.h -nx-X11/include/keysym.h -nx-X11/include/Sunkeysym.h -nx-X11/include/Xalloca.h -nx-X11/include/Xarch.h -nx-X11/include/Xatom.h -nx-X11/include/Xdefs.h -nx-X11/include/XF86keysym.h -nx-X11/include/Xfuncproto.h -nx-X11/include/Xfuncs.h -nx-X11/include/X.h -nx-X11/include/Xmd.h -nx-X11/include/Xosdefs.h -nx-X11/include/Xos.h -nx-X11/include/Xos_r.h -nx-X11/include/Xproto.h -nx-X11/include/Xprotostr.h -nx-X11/include/Xthreads.h -nx-X11/include/XWDFile.h -nx-X11/lib/font/bitmap/bdfint.h -nx-X11/lib/font/bitmap/pcf.h -nx-X11/lib/font/include/bitmap.h -nx-X11/lib/font/include/bufio.h -nx-X11/lib/font/include/fntfil.h -nx-X11/lib/font/include/fntfilio.h -nx-X11/lib/font/include/fntfilst.h -nx-X11/lib/font/include/fontencc.h -nx-X11/lib/font/include/fontmisc.h -nx-X11/lib/font/include/fontmod.h -nx-X11/lib/font/include/fontshow.h -nx-X11/lib/font/include/fontutil.h -nx-X11/lib/font/include/fontxlfd.h -nx-X11/lib/misc/strlcat.c -nx-X11/lib/misc/strlcpy.c -nx-X11/lib/oldX/X10.h -nx-X11/lib/X11/cursorfont.h -nx-X11/lib/X11/ImUtil.h -nx-X11/lib/X11/Xcms.h -nx-X11/lib/X11/XKBAlloc.c -nx-X11/lib/X11/XKBGAlloc.c -nx-X11/lib/X11/XKBlib.h -nx-X11/lib/X11/XKBMAlloc.c -nx-X11/lib/X11/XKBMisc.c -nx-X11/lib/X11/XlibConf.h -nx-X11/lib/X11/Xlib.h -nx-X11/lib/X11/Xlibint.h -nx-X11/lib/X11/Xlocale.h -nx-X11/lib/X11/Xregion.h -nx-X11/lib/X11/Xresource.h -nx-X11/lib/X11/Xutil.h -nx-X11/lib/Xau/AuDispose.c -nx-X11/lib/Xau/AuFileName.c -nx-X11/lib/Xau/AuGetBest.c -nx-X11/lib/Xau/AuRead.c -nx-X11/lib/Xau/Xauth.h -nx-X11/lib/Xcomposite/Xcomposite.h -nx-X11/lib/Xdamage/Xdamage.h -nx-X11/lib/Xdmcp/Wrap.c -nx-X11/lib/Xdmcp/Wrap.h -nx-X11/lib/Xdmcp/Wraphelp.c -nx-X11/lib/Xdmcp/Xdmcp.h -nx-X11/lib/Xfixes/Xfixes.h -nx-X11/lib/xkbfile/maprules.c -nx-X11/lib/xkbfile/XKBbells.h -nx-X11/lib/xkbfile/xkbconfig.c -nx-X11/lib/xkbfile/XKBconfig.h -nx-X11/lib/xkbfile/xkberrs.c -nx-X11/lib/xkbfile/XKBfile.h -nx-X11/lib/xkbfile/xkbmisc.c -nx-X11/lib/xkbfile/xkbout.c -nx-X11/lib/xkbfile/XKBrules.h -nx-X11/lib/xkbfile/xkbtext.c -nx-X11/lib/xkbfile/XKMformat.h -nx-X11/lib/xkbfile/XKM.h -nx-X11/lib/xkbfile/xkmread.c -nx-X11/lib/Xrandr/Xrandr.h -nx-X11/lib/Xrender/Xrender.h -nx-X11/lib/xtrans/transport.c -nx-X11/lib/xtrans/Xtrans.c -nx-X11/lib/xtrans/Xtransdnet.c -nx-X11/lib/xtrans/Xtrans.h -nx-X11/lib/xtrans/Xtransint.h -nx-X11/lib/xtrans/Xtranslcl.c -nx-X11/lib/xtrans/Xtransos2.c -nx-X11/lib/xtrans/Xtranssock.c -nx-X11/lib/xtrans/Xtranstli.c -nx-X11/lib/xtrans/Xtransutil.c -nx-X11/programs/Xserver/hw/xfree86/common/compiler.h -nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h -nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h -nx-X11/programs/Xserver/hw/xfree86/xf86Version.h -nx-X11/programs/Xserver/include/misc.h -nx-X11/programs/Xserver/include/os.h -nx-X11/programs/Xserver/mi/miinitext.c -nx-X11/programs/Xserver/os/osdep.h -nx-X11/programs/Xserver/Xext/extmod/modinit.h -nx-X11/programs/Xserver/Xi/stubs.c -- cgit v1.2.3 From 42f3b1442a99ede7814137f1943b389fbf6653fc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:24:31 +0100 Subject: Drop patches: 017_nx-X11_update-autotools-helper-files.full.patch, 018_nx-X11_update-libtool-ltmain-script.full.patch, 019_nx-X11_expat-build-against-system-libxmltok.full.patch. They patch files that are not used at build time. --- ...nx-X11_update-autotools-helper-files.full.patch | 10531 -------------- ..._nx-X11_update-libtool-ltmain-script.full.patch | 13985 ------------------- ...expat-build-against-system-libxmltok.full.patch | 43 - debian/patches/series | 3 - 4 files changed, 24562 deletions(-) delete mode 100644 debian/patches/017_nx-X11_update-autotools-helper-files.full.patch delete mode 100644 debian/patches/018_nx-X11_update-libtool-ltmain-script.full.patch delete mode 100644 debian/patches/019_nx-X11_expat-build-against-system-libxmltok.full.patch (limited to 'debian') diff --git a/debian/patches/017_nx-X11_update-autotools-helper-files.full.patch b/debian/patches/017_nx-X11_update-autotools-helper-files.full.patch deleted file mode 100644 index 4d7d95abf..000000000 --- a/debian/patches/017_nx-X11_update-autotools-helper-files.full.patch +++ /dev/null @@ -1,10531 +0,0 @@ -Description: Update outdated/ancient autotools files - Replace autotools files for at these locations: - - nx-X11/extras/expat/conftools - - nx-X11/extras/fontconfig - - nx-X11/extras/freetype2/builds/unix - - nx-X11/programs/xterm - - nx-X11/lib/Xft -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/extras/expat/conftools/config.guess -+++ b/nx-X11/extras/expat/conftools/config.guess -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2002-03-20' -+timestamp='2009-12-30' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,28 +18,25 @@ - # - # 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. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --##################################################################### --# This file contains changes for Apache, clearly marked below. --# These changes are hereby donated to the public domain. --##################################################################### -- --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -58,8 +56,9 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -71,11 +70,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -93,30 +92,42 @@ - exit 1 - fi - -+trap 'exit 1' 1 2 15 - --dummy=dummy-$$ --trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 -+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -+# compiler to aid in system detection is discouraged as it requires -+# temporary files to be created and, as you can see below, it is a -+# headache to deal with in a portable fashion. - --# CC_FOR_BUILD -- compiler used by this script. - # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still - # use `HOST_CC' if defined, but it is deprecated. - --set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in -- ,,) echo "int dummy(){}" > $dummy.c ; -+# Portable tmp directory creation inspired by the Autoconf team. -+ -+set_cc_for_build=' -+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -+: ${TMPDIR=/tmp} ; -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || -+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -+dummy=$tmp/dummy ; -+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -+case $CC_FOR_BUILD,$HOST_CC,$CC in -+ ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do -- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; -- if test $? = 0 ; then -+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; -- rm -f $dummy.c $dummy.o $dummy.rel ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -147,9 +158,11 @@ - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in -+ armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -158,7 +171,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -172,159 +185,128 @@ - ;; - esac - # The OS release -- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ # Debian GNU/NetBSD machines have a different userland, and -+ # thus, need a distinct triplet. However, they do not need -+ # kernel version information, so it can be replaced with a -+ # suitable tag, in the style of linux-gnu. -+ case "${UNAME_VERSION}" in -+ Debian*) -+ release='-gnu' -+ ;; -+ *) -+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ ;; -+ esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac -+ # According to Compaq, /usr/sbin/psrinfo has been available on -+ # OSF/1 and Tru64 systems produced since 1995. I hope that -+ # covers most systems running today. This code pipes the CPU -+ # types through head -n 1, so we only detect the type of CPU 0. -+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` -+ case "$ALPHA_CPU_TYPE" in -+ "EV4 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "EV4.5 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "LCA4 (21066/21068)") -+ UNAME_MACHINE="alpha" ;; -+ "EV5 (21164)") -+ UNAME_MACHINE="alphaev5" ;; -+ "EV5.6 (21164A)") -+ UNAME_MACHINE="alphaev56" ;; -+ "EV5.6 (21164PC)") -+ UNAME_MACHINE="alphapca56" ;; -+ "EV5.7 (21164PC)") -+ UNAME_MACHINE="alphapca57" ;; -+ "EV6 (21264)") -+ UNAME_MACHINE="alphaev6" ;; -+ "EV6.7 (21264A)") -+ UNAME_MACHINE="alphaev67" ;; -+ "EV6.8CB (21264C)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8AL (21264B)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8CX (21264D)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.9A (21264/EV69A)") -+ UNAME_MACHINE="alphaev69" ;; -+ "EV7 (21364)") -+ UNAME_MACHINE="alphaev7" ;; -+ "EV7.9 (21364A)") -+ UNAME_MACHINE="alphaev79" ;; -+ esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- cat <$dummy.s -- .data --\$Lformat: -- .byte 37,100,45,37,120,10,0 # "%d-%x\n" -- -- .text -- .globl main -- .align 4 -- .ent main --main: -- .frame \$30,16,\$26,0 -- ldgp \$29,0(\$27) -- .prologue 1 -- .long 0x47e03d80 # implver \$0 -- lda \$2,-1 -- .long 0x47e20c21 # amask \$2,\$1 -- lda \$16,\$Lformat -- mov \$0,\$17 -- not \$1,\$18 -- jsr \$26,printf -- ldgp \$29,0(\$26) -- mov 0,\$16 -- jsr \$26,exit -- .end main --EOF -- eval $set_cc_for_build -- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null -- if test "$?" = 0 ; then -- case `./$dummy` in -- 0-0) -- UNAME_MACHINE="alpha" -- ;; -- 1-0) -- UNAME_MACHINE="alphaev5" -- ;; -- 1-1) -- UNAME_MACHINE="alphaev56" -- ;; -- 1-101) -- UNAME_MACHINE="alphapca56" -- ;; -- 2-303) -- UNAME_MACHINE="alphaev6" -- ;; -- 2-307) -- UNAME_MACHINE="alphaev67" -- ;; -- 2-1307) -- UNAME_MACHINE="alphaev68" -- ;; -- esac -- fi -- rm -f $dummy.s $dummy -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; --######################### --# Apache changes --# --# *:OS/390:*:*) --# echo i370-ibm-openedition --# exit 0 ;; -- *:OS390:*:* | *:OS/390:*:*) -- echo s390-ibm-os390 -- exit 0 ;; -- *:OS400:*:* | *:OS/400:*:*) -- echo as400-ibm-os400 -- exit 0 ;; -- *:OS/2:*:*) -- echo "i386-pc-os2_emx" -- exit 0;; --# --# end Apache changes --######################### -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -332,25 +314,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) -+ case `/usr/bin/uname -p` in -+ sparc) echo sparc-icl-nx7; exit ;; -+ esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -359,10 +367,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -374,10 +382,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -388,37 +396,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -442,27 +453,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy \ -- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && rm -f $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; -+ Motorola:*:4.3:PL8-*) -+ echo powerpc-harris-powermax -+ exit ;; -+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) -+ echo powerpc-harris-powermax -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -478,29 +495,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -508,7 +525,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -523,16 +540,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -545,28 +565,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -622,17 +642,37 @@ - exit (0); - } - EOF -- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` -- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi -- rm -f $dummy.c $dummy -+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` -+ test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac -+ if [ ${HP_ARCH} = "hppa2.0w" ] -+ then -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ -+ then -+ HP_ARCH="hppa2.0w" -+ else -+ HP_ARCH="hppa64" -+ fi -+ fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -660,174 +700,248 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -- CRAY*T3D:*:*:*) -- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; -+ *:UNICOS/mp:*:*) -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i386-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; -+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) -+ echo i${UNAME_MACHINE}-pc-mks -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? -- echo i386-pc-interix -- exit 0 ;; -+ echo i586-pc-interix -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips -- #undef mipsel -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- rm -f $dummy.c -- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -835,82 +949,40 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- rm -f $dummy.c -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -918,7 +990,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; -+ i*86:OS/2:*:*) -+ # If we were able to find `uname', then EMX Unix compatibility -+ # is probably installed. -+ echo ${UNAME_MACHINE}-pc-os2-emx -+ exit ;; -+ i*86:XTS-300:*:STOP) -+ echo ${UNAME_MACHINE}-unknown-stop -+ exit ;; -+ i*86:atheos:*:*) -+ echo ${UNAME_MACHINE}-unknown-atheos -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) -+ echo i386-unknown-lynxos${UNAME_RELEASE} -+ exit ;; -+ i*86:*DOS:*:*) -+ echo ${UNAME_MACHINE}-pc-msdosdjgpp -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -926,99 +1018,113 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then -- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` -- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 -- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ -+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` -+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 -+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 -- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ -+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 -- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ -+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -- i*86:*DOS:*:*) -- echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i386. -- echo i386-pc-msdosdjgpp -- exit 0 ;; -+ # the processor, so we play safe by assuming i586. -+ # Note: whatever this is, it MUST be the same as what config.sub -+ # prints for the "djgpp" host, or else GDB configury will decide that -+ # this is a cross-build. -+ echo i586-pc-msdosdjgpp -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) -+ exit ;; -+ mc68k:UNIX:SYSTEM5:3.51m) -+ echo m68k-convergent-sysv -+ exit ;; -+ M680?0:D-NIX:5.3:*) -+ echo m68k-diab-dnix -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -- echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1026,61 +1132,94 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-6:SUPER-UX:*:*) -+ echo sx6-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- echo `uname -p`-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; -+ unknown) UNAME_PROCESSOR=powerpc ;; -+ esac -+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1088,22 +1227,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1114,36 +1256,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -- i*86:OS/2:*:*) -- # If we were able to find `uname', then EMX Unix compatibility -- # is probably installed. -- echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -- i*86:XTS-300:*:STOP) -- echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -- i*86:atheos:*:*) -- echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1175,7 +1331,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1264,12 +1420,12 @@ - } - EOF - --$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 --rm -f $dummy.c $dummy -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1278,22 +1434,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1304,7 +1460,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- a/nx-X11/extras/expat/conftools/config.sub -+++ b/nx-X11/extras/expat/conftools/config.sub -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2002-03-07' -+timestamp='2010-01-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,27 +22,26 @@ - # - # 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. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --##################################################################### --# This file contains changes for Apache, clearly marked below. --# These changes are hereby donated to the public domain. --##################################################################### - - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -75,8 +75,9 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -88,11 +89,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,7 +105,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -123,28 +124,13 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; --######################## --# changes for Apache --# -- tpf | os390 | vmcms) -- os=-$maybe_os -- basic_machine=s390; -- ;; -- os400) -- os=-$maybe_os -- basic_machine=as400; -- ;; -- mvs) -- os=-mvs -- basic_machine=i370; -- ;; --# --# end Apache changes --######################## - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] -@@ -167,10 +153,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -192,6 +181,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -208,6 +201,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -251,41 +248,71 @@ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ - | c4x | clipper \ -- | d10v | d30v | dsp16xx \ -- | fr30 \ -+ | d10v | d30v | dlx | dsp16xx \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ -- | mips64vr4100 | mips64vr4100el | mips64vr4300 \ -- | mips64vr4300el | mips64vr5000 | mips64vr5000el \ -- | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ -- | mipsisa32 | mipsisa64 \ -+ | ip2k | iq2000 \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ -+ | mips16 \ -+ | mips64 | mips64el \ -+ | mips64octeon | mips64octeonel \ -+ | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ -+ | mips64vr4100 | mips64vr4100el \ -+ | mips64vr4300 | mips64vr4300el \ -+ | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ -+ | mipsisa32 | mipsisa32el \ -+ | mipsisa32r2 | mipsisa32r2el \ -+ | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ -+ | mipsisa64sb1 | mipsisa64sb1el \ -+ | mipsisa64sr71k | mipsisa64sr71kel \ -+ | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ -+ | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh64 | sh64le \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -304,40 +331,70 @@ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -- | arm-* | armbe-* | armle-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c54x-* \ -- | clipper-* | cydra-* \ -- | d10v-* | d30v-* \ -+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -+ | clipper-* | craynv-* | cydra-* \ -+ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ -- | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ -- | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ -- | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -+ | mips16-* \ -+ | mips64-* | mips64el-* \ -+ | mips64octeon-* | mips64octeonel-* \ -+ | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ -+ | mips64vr4100-* | mips64vr4100el-* \ -+ | mips64vr4300-* | mips64vr4300el-* \ -+ | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ -+ | mipsisa32-* | mipsisa32el-* \ -+ | mipsisa32r2-* | mipsisa32r2el-* \ -+ | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ -+ | mipsisa64sb1-* | mipsisa64sb1el-* \ -+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ -+ | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ -+ | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ -+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ -+ | tahoe-* | thumb-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile-* | tilegx-* \ -+ | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -355,6 +412,9 @@ - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -369,6 +429,12 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv -@@ -392,6 +458,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -400,10 +470,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -428,12 +514,27 @@ - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -456,6 +557,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -606,6 +715,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -617,10 +734,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -634,10 +758,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -650,6 +770,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -725,9 +848,12 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson -@@ -745,55 +871,75 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; -- pc532 | pc532-*) -+ pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -- pentiumpro | p6 | 6x86 | athlon) -+ pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown -- ;; -+ ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown -- ;; -+ ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown -- ;; -+ ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown -- ;; -+ ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -@@ -804,6 +950,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -824,15 +974,20 @@ - basic_machine=a29k-amd - os=-udi - ;; --######################## --# changes for Apache --# -- as400*) -- basic_machine=as400-ibm -+ sb1) -+ basic_machine=mipsisa64sb1-unknown -+ ;; -+ sb1el) -+ basic_machine=mipsisa64sb1el-unknown -+ ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux - ;; --# --# end Apache changes --######################## - sequent) - basic_machine=i386-sequent - ;; -@@ -840,6 +995,12 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -898,7 +1059,7 @@ - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; -- sv1) -+ sv1) - basic_machine=sv1-cray - os=-unicos - ;; -@@ -906,10 +1067,6 @@ - basic_machine=i386-sequent - os=-dynix - ;; -- t3d) -- basic_machine=alpha-cray -- os=-unicos -- ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos -@@ -922,6 +1079,23 @@ - basic_machine=tic54x-unknown - os=-coff - ;; -+ tic55x | c55x*) -+ basic_machine=tic55x-unknown -+ os=-coff -+ ;; -+ tic6x | c6x*) -+ basic_machine=tic6x-unknown -+ os=-coff -+ ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -935,6 +1109,10 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -956,8 +1134,8 @@ - os=-vms - ;; - vpp*|vx|vx-*) -- basic_machine=f301-fujitsu -- ;; -+ basic_machine=f301-fujitsu -+ ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks -@@ -978,11 +1156,11 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -- windows32) -- basic_machine=i386-pc -- os=-windows32-msvcrt -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 - ;; -- xps | xps100) -+ xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) -@@ -993,6 +1171,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1012,6 +1194,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1028,16 +1213,13 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh3eb | sh4eb) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; -- cydra) -+ cydra) - basic_machine=cydra-cydrome - ;; - orion) -@@ -1052,10 +1234,6 @@ - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; -- c4x*) -- basic_machine=c4x-none -- os=-coff -- ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; -@@ -1085,6 +1263,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1100,37 +1281,35 @@ - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; --######################## --# changes for Apache --# -- -os2_emx | -tpf* | -os390* | -vmcms* | -os400* ) -- ;; --# --# end Apache changes --######################## - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ -- | -morphos* | -superux* | -rtmk* | -rtmk-nova*) -+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1142,16 +1321,21 @@ - ;; - esac - ;; -+ -nto-qnx*) -+ ;; - -nto*) -- os=-nto-qnx -+ os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1164,6 +1348,9 @@ - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; -@@ -1185,6 +1372,9 @@ - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; -@@ -1195,7 +1385,7 @@ - os=-rtmk-nova - ;; - -ns2 ) -- os=-nextstep2 -+ os=-nextstep2 - ;; - -nsk*) - os=-nsk -@@ -1207,6 +1397,9 @@ - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; -@@ -1234,9 +1427,23 @@ - -xenix) - os=-xenix - ;; -- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -- os=-mint -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -+ os=-mint -+ ;; -+ -aros*) -+ os=-aros -+ ;; -+ -kaos*) -+ os=-kaos -+ ;; -+ -zvmoe) -+ os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1259,6 +1466,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1268,11 +1481,14 @@ - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; -- pdp11-*) -+ pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1293,6 +1509,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1311,33 +1530,15 @@ - *-be) - os=-beos - ;; --######################## --# changes for Apache --# --# *-ibm) --# os=-aix --# ;; --# -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) -- case $basic_machine in -- s390*) -- os=-os390; -- ;; -- i370*) -- os=-mvs; -- ;; -- as400*) -- os=-os400; -- ;; -- *) -- os=-aix -- ;; -- esac -- ;; --# --# end Apache changes --######################## -- -+ os=-aix -+ ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1389,19 +1590,19 @@ - *-next) - os=-nextstep3 - ;; -- *-gould) -+ *-gould) - os=-sysv - ;; -- *-highlevel) -+ *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; -- *-sgi) -+ *-sgi) - os=-irix - ;; -- *-siemens) -+ *-siemens) - os=-sysv4 - ;; - *-masscomp) -@@ -1440,7 +1641,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1470,10 +1671,16 @@ - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -- -vxsim* | -vxworks*) -+ -tpf*) -+ vendor=ibm -+ ;; -+ -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) -@@ -1497,7 +1704,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) ---- a/nx-X11/extras/fontconfig/config.guess -+++ b/nx-X11/extras/fontconfig/config.guess -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2005-03-24' -+timestamp='2009-12-30' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,23 +18,25 @@ - # - # 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. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -53,8 +56,9 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -66,11 +70,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,7 +108,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -123,7 +127,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -158,6 +162,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -166,7 +171,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -196,55 +201,23 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- luna88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mips64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -297,40 +270,43 @@ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe -- exit 0 ;; -+ exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 -- exit 0 ;; -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -338,32 +314,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -+ exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 -- exit 0 ;; -+ exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -372,10 +367,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -387,10 +382,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -401,40 +396,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -458,32 +453,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -499,29 +495,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -529,7 +525,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -544,15 +540,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -565,28 +565,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -648,9 +648,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -658,11 +668,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -690,219 +700,248 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -- amd64:CYGWIN*:*:*) -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin -- exit 0 ;; -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -- exit 0 ;; -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu -- exit 0 ;; -+ exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu -- exit 0 ;; -+ exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -- ;; -- mips64:Linux:*:*) -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -910,87 +949,40 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -998,27 +990,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -- i*86:syllable:*:*) -+ exit ;; -+ i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -1026,15 +1018,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -+ exit ;; - M68*:*:R3V[5678]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1126,69 +1132,94 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -- *86) UNAME_PROCESSOR=i686 ;; -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1196,25 +1227,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -+ exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1225,41 +1256,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in -- A*) echo alpha-dec-vms && exit 0 ;; -- I*) echo ia64-dec-vms && exit 0 ;; -- V*) echo vax-dec-vms && exit 0 ;; -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix -- exit 0 ;; -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1291,7 +1331,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1380,11 +1420,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1393,22 +1434,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1419,9 +1460,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - and -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- a/nx-X11/extras/fontconfig/config.sub -+++ b/nx-X11/extras/fontconfig/config.sub -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2005-02-10' -+timestamp='2010-01-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,22 +22,26 @@ - # - # 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. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -70,8 +75,9 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -83,11 +89,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +105,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,8 +124,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -145,10 +153,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -170,6 +181,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -186,6 +201,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -230,22 +249,28 @@ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -@@ -254,30 +279,40 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -297,28 +332,32 @@ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -@@ -327,26 +366,35 @@ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -+ | mt-* \ - | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile-* | tilegx-* \ - | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -410,6 +458,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -418,10 +470,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -450,8 +518,8 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ cr16) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) -@@ -489,6 +557,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp -@@ -643,6 +715,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -654,10 +734,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -683,6 +770,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -758,9 +848,8 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; - os400) - basic_machine=powerpc-ibm -@@ -782,6 +871,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -791,6 +888,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -847,6 +950,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -873,6 +980,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -884,6 +995,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -973,6 +1087,15 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -1048,6 +1171,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1086,13 +1213,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1139,6 +1263,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1159,26 +1286,30 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1196,7 +1327,7 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) -@@ -1308,6 +1439,11 @@ - -zvmoe) - os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1330,6 +1466,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1339,9 +1481,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1367,6 +1509,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1385,6 +1530,9 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -@@ -1493,7 +1641,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1556,7 +1704,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) ---- a/nx-X11/extras/freetype2/builds/unix/config.guess -+++ b/nx-X11/extras/freetype2/builds/unix/config.guess -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2004-03-12' -+timestamp='2009-12-30' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,23 +18,25 @@ - # - # 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. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -53,8 +56,9 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -66,11 +70,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,7 +108,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -123,7 +127,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -158,6 +162,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -166,7 +171,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -196,64 +201,23 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pegasos:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -306,40 +270,43 @@ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -- Alpha*:OpenVMS:*:*) -- echo alpha-hp-vms -- exit 0 ;; -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 -- exit 0 ;; -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -347,32 +314,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -+ exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -381,10 +367,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -396,10 +382,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -410,40 +396,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -467,32 +453,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -508,29 +495,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -538,7 +525,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -553,15 +540,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -574,28 +565,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -657,9 +648,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -667,11 +668,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -699,224 +700,248 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- # GNU/KFreeBSD systems have a "k" prefix to indicate we are using -- # FreeBSD's kernel, but not the complete OS. -- case ${LIBC} in gnu) kernel_only='k' ;; esac -- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -- exit 0 ;; -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu -- exit 0 ;; -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -- ;; -- mips64:Linux:*:*) -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -924,87 +949,40 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -1012,27 +990,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -- i*86:syllable:*:*) -+ exit ;; -+ i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -1040,15 +1018,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1140,68 +1132,94 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1209,22 +1227,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1235,31 +1256,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1291,7 +1331,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1380,11 +1420,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1393,22 +1434,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1419,7 +1460,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- a/nx-X11/extras/freetype2/builds/unix/config.sub -+++ b/nx-X11/extras/freetype2/builds/unix/config.sub -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2004-03-12' -+timestamp='2010-01-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,22 +22,26 @@ - # - # 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. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -70,8 +75,9 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -83,11 +89,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +105,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,8 +124,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -145,10 +153,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -170,6 +181,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -186,6 +201,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -230,22 +249,28 @@ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | mcore \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -@@ -254,30 +279,40 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -297,28 +332,32 @@ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -@@ -326,26 +365,36 @@ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile-* | tilegx-* \ - | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -409,6 +458,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -417,10 +470,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -445,13 +514,20 @@ - basic_machine=j90-cray - os=-unicos - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -@@ -481,6 +557,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -631,6 +715,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -642,10 +734,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -659,10 +758,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -675,6 +770,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -743,10 +841,6 @@ - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -754,9 +848,8 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; - os400) - basic_machine=powerpc-ibm -@@ -778,6 +871,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -787,6 +888,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -843,6 +950,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -869,6 +980,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -880,6 +995,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -969,6 +1087,15 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -1029,6 +1156,10 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -@@ -1040,6 +1171,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1059,6 +1194,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1075,13 +1213,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1128,6 +1263,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1148,26 +1286,30 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1185,7 +1327,7 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) -@@ -1294,6 +1436,14 @@ - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1316,6 +1466,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1325,9 +1481,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1353,6 +1509,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1371,9 +1530,15 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1476,7 +1641,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1539,7 +1704,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) ---- a/nx-X11/programs/xterm/config.guess -+++ b/nx-X11/programs/xterm/config.guess -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2005-05-27' -+timestamp='2009-12-30' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -26,16 +27,16 @@ - # the same distribution terms that you use for the rest of that program. - - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -55,8 +56,9 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -106,7 +108,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -125,7 +127,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -160,6 +162,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -168,7 +171,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -199,50 +202,18 @@ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- luna88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- sgi:OpenBSD:*:*) -- echo mips64-unknown-openbsd${UNAME_RELEASE} -- exit ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -@@ -354,14 +325,33 @@ - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize -@@ -562,7 +552,7 @@ - echo rs6000-ibm-aix3.2 - fi - exit ;; -- *:AIX:*:[45]) -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -658,8 +648,7 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -+ eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -@@ -671,7 +660,7 @@ - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -- grep __LP64__ >/dev/null -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -800,12 +789,19 @@ - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -- i*:MINGW*:*) -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) -@@ -815,12 +811,24 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we -@@ -830,7 +838,7 @@ - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; -- amd64:CYGWIN*:*:*) -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) -@@ -850,7 +858,31 @@ - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) -@@ -862,6 +894,17 @@ - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -@@ -871,63 +914,33 @@ - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -- mips:Linux:*:*) -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -- ;; -- mips64:Linux:*:*) -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu - exit ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu - exit ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level -@@ -937,8 +950,11 @@ - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -@@ -952,68 +968,15 @@ - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && { -- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -- exit -- } -- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } -- ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both -@@ -1042,7 +1005,7 @@ - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) -@@ -1086,8 +1049,11 @@ - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i386. -- echo i386-pc-msdosdjgpp -+ # the processor, so we play safe by assuming i586. -+ # Note: whatever this is, it MUST be the same as what config.sub -+ # prints for the "djgpp" host, or else GDB configury will decide that -+ # this is a cross-build. -+ echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -@@ -1125,6 +1091,16 @@ - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; -@@ -1137,7 +1113,7 @@ - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) -@@ -1200,6 +1176,9 @@ - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1209,6 +1188,15 @@ - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; -@@ -1218,7 +1206,16 @@ - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -- *86) UNAME_PROCESSOR=i686 ;; -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -@@ -1297,6 +1294,12 @@ - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1457,9 +1460,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - and -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- a/nx-X11/programs/xterm/config.sub -+++ b/nx-X11/programs/xterm/config.sub -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2005-06-02' -+timestamp='2010-01-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -31,13 +32,16 @@ - - - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -71,8 +75,9 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -119,8 +124,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -146,10 +153,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -171,6 +181,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -187,6 +201,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -231,23 +249,28 @@ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -@@ -256,35 +279,40 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -- | ms1 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -- | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ -- | z8k) -- basic_machine=$basic_machine-unknown -- ;; -- m32c) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -304,28 +332,32 @@ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -+ | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -@@ -334,30 +366,35 @@ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -- | ms1-* \ -+ | mt-* \ - | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile-* | tilegx-* \ - | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) - ;; -- m32c-*) -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -421,6 +458,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -429,10 +470,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -461,8 +518,8 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ cr16) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) -@@ -500,6 +557,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp -@@ -654,6 +715,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -665,10 +734,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -694,6 +770,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -769,9 +848,8 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; - os400) - basic_machine=powerpc-ibm -@@ -793,6 +871,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -802,6 +888,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -858,6 +950,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -884,6 +980,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -895,6 +995,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -984,6 +1087,15 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -1059,6 +1171,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1097,13 +1213,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1150,6 +1263,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1170,26 +1286,30 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1207,7 +1327,7 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) -@@ -1319,6 +1439,11 @@ - -zvmoe) - os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1341,6 +1466,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1350,9 +1481,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1378,6 +1509,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1396,6 +1530,9 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -@@ -1504,7 +1641,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) ---- a/nx-X11/lib/Xft/config.guess -+++ b/nx-X11/lib/Xft/config.guess -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2009-12-30' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,23 +18,25 @@ - # - # 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. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -53,8 +56,9 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -66,11 +70,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,8 +108,9 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -@@ -122,7 +127,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -157,6 +162,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -165,7 +171,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -195,50 +201,32 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU -@@ -276,39 +264,49 @@ - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -316,29 +314,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -347,10 +367,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -362,10 +382,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -376,37 +396,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -430,32 +453,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -471,29 +495,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -501,7 +525,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -516,15 +540,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -537,28 +565,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -620,9 +648,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -630,11 +668,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -662,205 +700,248 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -- ;; -- mips64:Linux:*:*) -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; -+ ia64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ m68*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -868,81 +949,40 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -950,24 +990,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -975,15 +1018,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1075,68 +1132,94 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1144,22 +1227,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1170,25 +1256,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1220,7 +1331,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1309,11 +1420,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1322,22 +1434,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1348,7 +1460,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- a/nx-X11/lib/Xft/config.sub -+++ b/nx-X11/lib/Xft/config.sub -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2010-01-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,22 +22,26 @@ - # - # 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. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -70,8 +75,9 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -+Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -83,11 +89,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +105,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,7 +124,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -144,10 +153,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -169,6 +181,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -185,6 +201,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -228,53 +248,71 @@ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -+ | ip2k | iq2000 \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -294,54 +332,69 @@ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tile-* | tilegx-* \ - | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -359,6 +412,9 @@ - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -373,6 +429,12 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv -@@ -396,6 +458,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -404,10 +470,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -432,12 +514,27 @@ - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -460,6 +557,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -610,6 +715,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -621,10 +734,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -638,10 +758,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -654,6 +770,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -722,10 +841,6 @@ - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -733,9 +848,12 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson -@@ -753,6 +871,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -762,24 +888,36 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; -@@ -812,6 +950,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -838,6 +980,14 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; -@@ -845,6 +995,12 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -919,10 +1075,6 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff -@@ -935,6 +1087,15 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -948,6 +1109,10 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -991,6 +1156,10 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -@@ -1002,6 +1171,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1021,6 +1194,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1037,13 +1213,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1090,6 +1263,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1110,25 +1286,30 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1146,12 +1327,15 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1164,6 +1348,9 @@ - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; -@@ -1185,6 +1372,9 @@ - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; -@@ -1207,6 +1397,9 @@ - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; -@@ -1243,6 +1436,14 @@ - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; -+ -dicos*) -+ os=-dicos -+ ;; -+ -nacl*) -+ ;; - -none) - ;; - *) -@@ -1265,6 +1466,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1274,6 +1481,9 @@ - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1299,6 +1509,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1317,9 +1530,15 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1422,7 +1641,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1452,9 +1671,15 @@ - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; -@@ -1479,7 +1704,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/debian/patches/018_nx-X11_update-libtool-ltmain-script.full.patch b/debian/patches/018_nx-X11_update-libtool-ltmain-script.full.patch deleted file mode 100644 index 156712266..000000000 --- a/debian/patches/018_nx-X11_update-libtool-ltmain-script.full.patch +++ /dev/null @@ -1,13985 +0,0 @@ -Description: Update outdated libtool file - Replace libtool file at this location: - - nx-X11/extras/expat/conftools/ltmain.sh -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/extras/expat/conftools/ltmain.sh -+++ b/nx-X11/extras/expat/conftools/ltmain.sh -@@ -1,4631 +1,9435 @@ --# ltmain.sh - Provide generalized library-building support services. --# NOTE: Changing this file will not affect anything until you rerun configure. --# --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 --# Free Software Foundation, Inc. --# Originally by Gordon Matzigkeit , 1996 --# --# This program is free software; you can redistribute it and/or modify -+ -+# libtool (GNU libtool) 2.4 -+# Written by Gordon Matzigkeit , 1996 -+ -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -+# This is free software; see the source for copying conditions. There is NO -+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+ -+# GNU Libtool 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 -+# As a special exception to the GNU General Public License, -+# if you distribute this file as part of a program or library that -+# is built using GNU Libtool, you may include this file under the -+# same distribution terms that you use for the rest of that program. -+# -+# GNU Libtool 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. -+# along with GNU Libtool; see the file COPYING. If not, a copy -+# can be downloaded from http://www.gnu.org/licenses/gpl.html, -+# or obtained by writing to the Free Software Foundation, Inc., -+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ -+# Usage: $progname [OPTION]... [MODE-ARG]... - # --# As a special exception to the GNU General Public License, if you --# distribute this file as part of a program that contains a --# configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- --# Check that we have a working $echo. --if test "X$1" = X--no-reexec; then -- # Discard the --no-reexec flag, and continue. -- shift --elif test "X$1" = X--fallback-echo; then -- # Avoid inline document here, it may be left over -- : --elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then -- # Yippee, $echo works! -- : -+# Provide generalized library-building support services. -+# -+# --config show all configuration variables -+# --debug enable verbose shell tracing -+# -n, --dry-run display commands without modifying any files -+# --features display basic configuration information and exit -+# --mode=MODE use operation mode MODE -+# --preserve-dup-deps don't remove duplicate dependency libraries -+# --quiet, --silent don't print informational messages -+# --no-quiet, --no-silent -+# print informational messages (default) -+# --tag=TAG use configuration variables from tag TAG -+# -v, --verbose print more informational messages than default -+# --no-verbose don't print the extra informational messages -+# --version print version information -+# -h, --help, --help-all print short, long, or detailed help message -+# -+# MODE must be one of the following: -+# -+# clean remove files from the build directory -+# compile compile a source file into a libtool object -+# execute automatically set library path, then run a program -+# finish complete the installation of libtool libraries -+# install install libraries or executables -+# link create a library or an executable -+# uninstall remove libraries from an installed directory -+# -+# MODE-ARGS vary depending on the MODE. When passed as first option, -+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -+# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -+# -+# When reporting a bug, please describe a test case to reproduce it and -+# include the following information: -+# -+# host-triplet: $host -+# shell: $SHELL -+# compiler: $LTCC -+# compiler flags: $LTCFLAGS -+# linker: $LD (gnu? $with_gnu_ld) -+# $progname: (GNU libtool) 2.4 Debian-2.4-2 -+# automake: $automake_version -+# autoconf: $autoconf_version -+# -+# Report bugs to . -+# GNU libtool home page: . -+# General help using GNU software: . -+ -+PROGRAM=libtool -+PACKAGE=libtool -+VERSION="2.4 Debian-2.4-2" -+TIMESTAMP="" -+package_revision=1.3293 -+ -+# Be Bourne compatible -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+ setopt NO_GLOB_SUBST - else -- # Restart under the correct shell, and then maybe $echo will work. -- exec $SHELL "$0" --no-reexec ${1+"$@"} -+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac - fi -+BIN_SH=xpg4; export BIN_SH # for Tru64 -+DUALCASE=1; export DUALCASE # for MKS sh - --if test "X$1" = X--fallback-echo; then -- # used as fallback echo -- shift -- cat <&2 -- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 --fi -+# Make sure IFS has a sensible default -+lt_nl=' -+' -+IFS=" $lt_nl" -+ -+dirname="s,/[^/]*$,," -+basename="s,^.*/,," -+ -+# func_dirname file append nondir_replacement -+# Compute the dirname of FILE. If nonempty, add APPEND to the result, -+# otherwise set result to NONDIR_REPLACEMENT. -+func_dirname () -+{ -+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+} # func_dirname may be replaced by extended shell implementation - --# Global variables. --mode=$default_mode --nonopt= --prev= --prevopt= --run= --show="$echo" --show_help= --execute_dlfiles= --lo2o="s/\\.lo\$/.${objext}/" --o2lo="s/\\.${objext}\$/.lo/" - --# Parse our command line options once, thoroughly. --while test $# -gt 0 --do -- arg="$1" -- shift -+# func_basename file -+func_basename () -+{ -+ func_basename_result=`$ECHO "${1}" | $SED "$basename"` -+} # func_basename may be replaced by extended shell implementation -+ -+ -+# func_dirname_and_basename file append nondir_replacement -+# perform func_basename and func_dirname in a single function -+# call: -+# dirname: Compute the dirname of FILE. If nonempty, -+# add APPEND to the result, otherwise set result -+# to NONDIR_REPLACEMENT. -+# value returned in "$func_dirname_result" -+# basename: Compute filename of FILE. -+# value retuned in "$func_basename_result" -+# Implementation must be kept synchronized with func_dirname -+# and func_basename. For efficiency, we do not delegate to -+# those functions but instead duplicate the functionality here. -+func_dirname_and_basename () -+{ -+ # Extract subdirectory from the argument. -+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -+} # func_dirname_and_basename may be replaced by extended shell implementation - -- case $arg in -- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; -- *) optarg= ;; -- esac - -- # If the previous option needs an argument, assign it. -- if test -n "$prev"; then -- case $prev in -- execute_dlfiles) -- execute_dlfiles="$execute_dlfiles $arg" -- ;; -- *) -- eval "$prev=\$arg" -- ;; -+# func_stripname prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# func_strip_suffix prefix name -+func_stripname () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -+} # func_stripname may be replaced by extended shell implementation - -- prev= -- prevopt= -- continue -- fi - -- # Have we seen a non-optional argument yet? -- case $arg in -- --help) -- show_help=yes -+# These SED scripts presuppose an absolute path with a trailing slash. -+pathcar='s,^/\([^/]*\).*$,\1,' -+pathcdr='s,^/[^/]*,,' -+removedotparts=':dotsl -+ s@/\./@/@g -+ t dotsl -+ s,/\.$,/,' -+collapseslashes='s@/\{1,\}@/@g' -+finalslash='s,/*$,/,' -+ -+# func_normal_abspath PATH -+# Remove doubled-up and trailing slashes, "." path components, -+# and cancel out any ".." path components in PATH after making -+# it an absolute path. -+# value returned in "$func_normal_abspath_result" -+func_normal_abspath () -+{ -+ # Start from root dir and reassemble the path. -+ func_normal_abspath_result= -+ func_normal_abspath_tpath=$1 -+ func_normal_abspath_altnamespace= -+ case $func_normal_abspath_tpath in -+ "") -+ # Empty path, that just means $cwd. -+ func_stripname '' '/' "`pwd`" -+ func_normal_abspath_result=$func_stripname_result -+ return - ;; -- -- --version) -- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" -- exit 0 -+ # The next three entries are used to spot a run of precisely -+ # two leading slashes without using negated character classes; -+ # we take advantage of case's first-match behaviour. -+ ///*) -+ # Unusual form of absolute path, do nothing. - ;; -- -- --config) -- sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 -- exit 0 -+ //*) -+ # Not necessarily an ordinary path; POSIX reserves leading '//' -+ # and for example Cygwin uses it to access remote file shares -+ # over CIFS/SMB, so we conserve a leading double slash if found. -+ func_normal_abspath_altnamespace=/ - ;; -- -- --debug) -- echo "$progname: enabling shell trace mode" -- set -x -+ /*) -+ # Absolute path, do nothing. - ;; -- -- --dry-run | -n) -- run=: -+ *) -+ # Relative path, prepend $cwd. -+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; -- -- --features) -- echo "host: $host" -- if test "$build_libtool_libs" = yes; then -- echo "enable shared libraries" -- else -- echo "disable shared libraries" -- fi -- if test "$build_old_libs" = yes; then -- echo "enable static libraries" -- else -- echo "disable static libraries" -+ esac -+ # Cancel out all the simple stuff to save iterations. We also want -+ # the path to end with a slash for ease of parsing, so make sure -+ # there is one (and only one) here. -+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` -+ while :; do -+ # Processed it all yet? -+ if test "$func_normal_abspath_tpath" = / ; then -+ # If we ascended to the root using ".." the result may be empty now. -+ if test -z "$func_normal_abspath_result" ; then -+ func_normal_abspath_result=/ -+ fi -+ break - fi -- exit 0 -- ;; -+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -+ -e "$pathcar"` -+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -+ -e "$pathcdr"` -+ # Figure out what to do with it -+ case $func_normal_abspath_tcomponent in -+ "") -+ # Trailing empty path component, ignore it. -+ ;; -+ ..) -+ # Parent dir; strip last assembled component from result. -+ func_dirname "$func_normal_abspath_result" -+ func_normal_abspath_result=$func_dirname_result -+ ;; -+ *) -+ # Actual path component, append it. -+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent -+ ;; -+ esac -+ done -+ # Restore leading double-slash if one was found on entry. -+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -+} - -- --finish) mode="finish" ;; -+# func_relative_path SRCDIR DSTDIR -+# generates a relative path from SRCDIR to DSTDIR, with a trailing -+# slash if non-empty, suitable for immediately appending a filename -+# without needing to append a separator. -+# value returned in "$func_relative_path_result" -+func_relative_path () -+{ -+ func_relative_path_result= -+ func_normal_abspath "$1" -+ func_relative_path_tlibdir=$func_normal_abspath_result -+ func_normal_abspath "$2" -+ func_relative_path_tbindir=$func_normal_abspath_result -+ -+ # Ascend the tree starting from libdir -+ while :; do -+ # check if we have found a prefix of bindir -+ case $func_relative_path_tbindir in -+ $func_relative_path_tlibdir) -+ # found an exact match -+ func_relative_path_tcancelled= -+ break -+ ;; -+ $func_relative_path_tlibdir*) -+ # found a matching prefix -+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" -+ func_relative_path_tcancelled=$func_stripname_result -+ if test -z "$func_relative_path_result"; then -+ func_relative_path_result=. -+ fi -+ break -+ ;; -+ *) -+ func_dirname $func_relative_path_tlibdir -+ func_relative_path_tlibdir=${func_dirname_result} -+ if test "x$func_relative_path_tlibdir" = x ; then -+ # Have to descend all the way to the root! -+ func_relative_path_result=../$func_relative_path_result -+ func_relative_path_tcancelled=$func_relative_path_tbindir -+ break -+ fi -+ func_relative_path_result=../$func_relative_path_result -+ ;; -+ esac -+ done - -- --mode) prevopt="--mode" prev=mode ;; -- --mode=*) mode="$optarg" ;; -+ # Now calculate path; take care to avoid doubling-up slashes. -+ func_stripname '' '/' "$func_relative_path_result" -+ func_relative_path_result=$func_stripname_result -+ func_stripname '/' '/' "$func_relative_path_tcancelled" -+ if test "x$func_stripname_result" != x ; then -+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result} -+ fi - -- --quiet | --silent) -- show=: -- ;; -+ # Normalisation. If bindir is libdir, return empty string, -+ # else relative path ending with a slash; either way, target -+ # file name can be directly appended. -+ if test ! -z "$func_relative_path_result"; then -+ func_stripname './' '' "$func_relative_path_result/" -+ func_relative_path_result=$func_stripname_result -+ fi -+} - -- -dlopen) -- prevopt="-dlopen" -- prev=execute_dlfiles -- ;; -+# The name of this program: -+func_dirname_and_basename "$progpath" -+progname=$func_basename_result -+ -+# Make sure we have an absolute path for reexecution: -+case $progpath in -+ [\\/]*|[A-Za-z]:\\*) ;; -+ *[\\/]*) -+ progdir=$func_dirname_result -+ progdir=`cd "$progdir" && pwd` -+ progpath="$progdir/$progname" -+ ;; -+ *) -+ save_IFS="$IFS" -+ IFS=: -+ for progdir in $PATH; do -+ IFS="$save_IFS" -+ test -x "$progdir/$progname" && break -+ done -+ IFS="$save_IFS" -+ test -n "$progdir" || progdir=`pwd` -+ progpath="$progdir/$progname" -+ ;; -+esac - -- -*) -- $echo "$modename: unrecognized option \`$arg'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed="${SED}"' -e 1s/^X//' -+sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -- *) -- nonopt="$arg" -- break -- ;; -- esac --done -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\(["`\\]\)/\\\1/g' - --if test -n "$prevopt"; then -- $echo "$modename: option \`$prevopt' requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 --fi -+# Sed substitution that turns a string into a regex matching for the -+# string literally. -+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -+ -+# Sed substitution that converts a w32 file name or path -+# which contains forward slashes, into one that contains -+# (escaped) backslashes. A very naive implementation. -+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -+ -+# Re-`\' parameter expansions in output of double_quote_subst that were -+# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -+# in input to double_quote_subst, that '$' was protected from expansion. -+# Since each input `\' is now two `\'s, look for any number of runs of -+# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -+bs='\\' -+bs2='\\\\' -+bs4='\\\\\\\\' -+dollar='\$' -+sed_double_backslash="\ -+ s/$bs4/&\\ -+/g -+ s/^$bs2$dollar/$bs&/ -+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g -+ s/\n//g" -+ -+# Standard options: -+opt_dry_run=false -+opt_help=false -+opt_quiet=false -+opt_verbose=false -+opt_warning=: -+ -+# func_echo arg... -+# Echo program name prefixed message, along with the current mode -+# name if it has been set yet. -+func_echo () -+{ -+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -+} - --# If this variable is set in any of the actions, the command in it --# will be execed at the end. This prevents here-documents from being --# left over by shells. --exec_cmd= -+# func_verbose arg... -+# Echo program name prefixed message in verbose mode only. -+func_verbose () -+{ -+ $opt_verbose && func_echo ${1+"$@"} -+ -+ # A bug in bash halts the script if the last line of a function -+ # fails when set -e is in force, so we need another command to -+ # work around that: -+ : -+} - --if test -z "$show_help"; then -+# func_echo_all arg... -+# Invoke $ECHO with all args, space-separated. -+func_echo_all () -+{ -+ $ECHO "$*" -+} - -- # Infer the operation mode. -- if test -z "$mode"; then -- case $nonopt in -- *cc | *++ | gcc* | *-gcc*) -- mode=link -- for arg -- do -- case $arg in -- -c) -- mode=compile -- break -- ;; -- esac -- done -- ;; -- *db | *dbx | *strace | *truss) -- mode=execute -- ;; -- *install*|cp|mv) -- mode=install -- ;; -- *rm) -- mode=uninstall -- ;; -- *) -- # If we have no mode, but dlfiles were specified, then do execute mode. -- test -n "$execute_dlfiles" && mode=execute -+# func_error arg... -+# Echo program name prefixed message to standard error. -+func_error () -+{ -+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -+} - -- # Just use the default operation mode. -- if test -z "$mode"; then -- if test -n "$nonopt"; then -- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 -- else -- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 -- fi -- fi -- ;; -- esac -- fi -+# func_warning arg... -+# Echo program name prefixed warning message to standard error. -+func_warning () -+{ -+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - -- # Only execute mode is allowed to have -dlopen flags. -- if test -n "$execute_dlfiles" && test "$mode" != execute; then -- $echo "$modename: unrecognized option \`-dlopen'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ # bash bug again: -+ : -+} - -- # Change the help message to a mode-specific one. -- generic_help="$help" -- help="Try \`$modename --help --mode=$mode' for more information." -- -- # These modes are in order of execution frequency so that they run quickly. -- case $mode in -- # libtool compile mode -- compile) -- modename="$modename: compile" -- # Get the compilation command and the source file. -- base_compile= -- prev= -- lastarg= -- srcfile="$nonopt" -- suppress_output= -+# func_fatal_error arg... -+# Echo program name prefixed message to standard error, and exit. -+func_fatal_error () -+{ -+ func_error ${1+"$@"} -+ exit $EXIT_FAILURE -+} - -- user_target=no -- for arg -- do -- case $prev in -- "") ;; -- xcompiler) -- # Aesthetically quote the previous argument. -- prev= -- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+# func_fatal_help arg... -+# Echo program name prefixed message to standard error, followed by -+# a help hint, and exit. -+func_fatal_help () -+{ -+ func_error ${1+"$@"} -+ func_fatal_error "$help" -+} -+help="Try \`$progname --help' for more information." ## default - -- case $arg in -- # Double-quote args containing other shell metacharacters. -- # Many Bourne shells cannot handle close brackets correctly -- # in scan sets, so we specify it separately. -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -- ;; -- esac - -- # Add the previous argument to base_compile. -- if test -z "$base_compile"; then -- base_compile="$lastarg" -- else -- base_compile="$base_compile $lastarg" -- fi -- continue -- ;; -+# func_grep expression filename -+# Check whether EXPRESSION matches any line of FILENAME, without output. -+func_grep () -+{ -+ $GREP "$1" "$2" >/dev/null 2>&1 -+} -+ -+ -+# func_mkdir_p directory-path -+# Make sure the entire path to DIRECTORY-PATH is available. -+func_mkdir_p () -+{ -+ my_directory_path="$1" -+ my_dir_list= -+ -+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then -+ -+ # Protect directory names starting with `-' -+ case $my_directory_path in -+ -*) my_directory_path="./$my_directory_path" ;; - esac - -- # Accept any command-line options. -- case $arg in -- -o) -- if test "$user_target" != "no"; then -- $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -- exit 1 -- fi -- user_target=next -- ;; -+ # While some portion of DIR does not yet exist... -+ while test ! -d "$my_directory_path"; do -+ # ...make a list in topmost first order. Use a colon delimited -+ # list incase some portion of path contains whitespace. -+ my_dir_list="$my_directory_path:$my_dir_list" - -- -static) -- build_old_libs=yes -- continue -- ;; -+ # If the last portion added has no slash in it, the list is done -+ case $my_directory_path in */*) ;; *) break ;; esac - -- -prefer-pic) -- pic_mode=yes -- continue -- ;; -+ # ...otherwise throw away the child directory and loop -+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` -+ done -+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - -- -prefer-non-pic) -- pic_mode=no -- continue -- ;; -+ save_mkdir_p_IFS="$IFS"; IFS=':' -+ for my_dir in $my_dir_list; do -+ IFS="$save_mkdir_p_IFS" -+ # mkdir can fail with a `File exist' error if two processes -+ # try to create one of the directories concurrently. Don't -+ # stop in that case! -+ $MKDIR "$my_dir" 2>/dev/null || : -+ done -+ IFS="$save_mkdir_p_IFS" - -- -Xcompiler) -- prev=xcompiler -- continue -- ;; -+ # Bail out if we (or some other process) failed to create a directory. -+ test -d "$my_directory_path" || \ -+ func_fatal_error "Failed to create \`$1'" -+ fi -+} - -- -Wc,*) -- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` -- lastarg= -- save_ifs="$IFS"; IFS=',' -- for arg in $args; do -- IFS="$save_ifs" - -- # Double-quote args containing other shell metacharacters. -- # Many Bourne shells cannot handle close brackets correctly -- # in scan sets, so we specify it separately. -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -- ;; -- esac -- lastarg="$lastarg $arg" -- done -- IFS="$save_ifs" -- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` -+# func_mktempdir [string] -+# Make a temporary directory that won't clash with other running -+# libtool processes, and avoids race conditions if possible. If -+# given, STRING is the basename for that directory. -+func_mktempdir () -+{ -+ my_template="${TMPDIR-/tmp}/${1-$progname}" -+ -+ if test "$opt_dry_run" = ":"; then -+ # Return a directory name, but don't create it in dry-run mode -+ my_tmpdir="${my_template}-$$" -+ else - -- # Add the arguments to base_compile. -- if test -z "$base_compile"; then -- base_compile="$lastarg" -- else -- base_compile="$base_compile $lastarg" -- fi -- continue -- ;; -- esac -+ # If mktemp works, use that first and foremost -+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - -- case $user_target in -- next) -- # The next one is the -o target name -- user_target=yes -- continue -- ;; -- yes) -- # We got the output file -- user_target=set -- libobj="$arg" -- continue -- ;; -- esac -+ if test ! -d "$my_tmpdir"; then -+ # Failing that, at least try and use $RANDOM to avoid a race -+ my_tmpdir="${my_template}-${RANDOM-0}$$" -+ -+ save_mktempdir_umask=`umask` -+ umask 0077 -+ $MKDIR "$my_tmpdir" -+ umask $save_mktempdir_umask -+ fi -+ -+ # If we're not in dry-run mode, bomb out on failure -+ test -d "$my_tmpdir" || \ -+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" -+ fi - -- # Accept the current argument as the source file. -- lastarg="$srcfile" -- srcfile="$arg" -+ $ECHO "$my_tmpdir" -+} - -- # Aesthetically quote the previous argument. - -- # Backslashify any backslashes, double quotes, and dollar signs. -- # These are the only characters that are still specially -- # interpreted inside of double-quoted scrings. -- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` -+# func_quote_for_eval arg -+# Aesthetically quote ARG to be evaled later. -+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -+# is double-quoted, suitable for a subsequent eval, whereas -+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -+# which are still active within double quotes backslashified. -+func_quote_for_eval () -+{ -+ case $1 in -+ *[\\\`\"\$]*) -+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; -+ *) -+ func_quote_for_eval_unquoted_result="$1" ;; -+ esac - -- # Double-quote args containing other shell metacharacters. -+ case $func_quote_for_eval_unquoted_result in -+ # Double-quote args containing shell metacharacters to delay -+ # word splitting, command substitution and and variable -+ # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. -- case $lastarg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- lastarg="\"$lastarg\"" -- ;; -- esac -+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" -+ ;; -+ *) -+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" -+ esac -+} - -- # Add the previous argument to base_compile. -- if test -z "$base_compile"; then -- base_compile="$lastarg" -- else -- base_compile="$base_compile $lastarg" -- fi -- done - -- case $user_target in -- set) -- ;; -- no) -- # Get the name of the library object. -- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` -- ;; -- *) -- $echo "$modename: you must specify a target with \`-o'" 1>&2 -- exit 1 -- ;; -+# func_quote_for_expand arg -+# Aesthetically quote ARG to be evaled later; same as above, -+# but do not quote variable references. -+func_quote_for_expand () -+{ -+ case $1 in -+ *[\\\`\"]*) -+ my_arg=`$ECHO "$1" | $SED \ -+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; -+ *) -+ my_arg="$1" ;; - esac - -- # Recognize several different file suffixes. -- # If the user specifies -o file.o, it is replaced with file.lo -- xform='[cCFSfmso]' -- case $libobj in -- *.ada) xform=ada ;; -- *.adb) xform=adb ;; -- *.ads) xform=ads ;; -- *.asm) xform=asm ;; -- *.c++) xform=c++ ;; -- *.cc) xform=cc ;; -- *.cpp) xform=cpp ;; -- *.cxx) xform=cxx ;; -- *.f90) xform=f90 ;; -- *.for) xform=for ;; -+ case $my_arg in -+ # Double-quote args containing shell metacharacters to delay -+ # word splitting and command substitution for a subsequent eval. -+ # Many Bourne shells cannot handle close brackets correctly -+ # in scan sets, so we specify it separately. -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ my_arg="\"$my_arg\"" -+ ;; - esac - -- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` -+ func_quote_for_expand_result="$my_arg" -+} - -- case $libobj in -- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; -- *) -- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 -- exit 1 -- ;; -- esac - -- if test -z "$base_compile"; then -- $echo "$modename: you must specify a compilation command" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -+# func_show_eval cmd [fail_exp] -+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -+# is given, then evaluate it. -+func_show_eval () -+{ -+ my_cmd="$1" -+ my_fail_exp="${2-:}" -+ -+ ${opt_silent-false} || { -+ func_quote_for_expand "$my_cmd" -+ eval "func_echo $func_quote_for_expand_result" -+ } -+ -+ if ${opt_dry_run-false}; then :; else -+ eval "$my_cmd" -+ my_status=$? -+ if test "$my_status" -eq 0; then :; else -+ eval "(exit $my_status); $my_fail_exp" -+ fi - fi -+} - -- # Delete any leftover library objects. -- if test "$build_old_libs" = yes; then -- removelist="$obj $libobj" -- else -- removelist="$libobj" -+ -+# func_show_eval_locale cmd [fail_exp] -+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -+# is given, then evaluate it. Use the saved locale for evaluation. -+func_show_eval_locale () -+{ -+ my_cmd="$1" -+ my_fail_exp="${2-:}" -+ -+ ${opt_silent-false} || { -+ func_quote_for_expand "$my_cmd" -+ eval "func_echo $func_quote_for_expand_result" -+ } -+ -+ if ${opt_dry_run-false}; then :; else -+ eval "$lt_user_locale -+ $my_cmd" -+ my_status=$? -+ eval "$lt_safe_locale" -+ if test "$my_status" -eq 0; then :; else -+ eval "(exit $my_status); $my_fail_exp" -+ fi - fi -+} - -- $run $rm $removelist -- trap "$run $rm $removelist; exit 1" 1 2 15 -+# func_tr_sh -+# Turn $1 into a string suitable for a shell variable name. -+# Result is stored in $func_tr_sh_result. All characters -+# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -+# if $1 begins with a digit, a '_' is prepended as well. -+func_tr_sh () -+{ -+ case $1 in -+ [0-9]* | *[!a-zA-Z0-9_]*) -+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` -+ ;; -+ * ) -+ func_tr_sh_result=$1 -+ ;; -+ esac -+} - -- # On Cygwin there's no "real" PIC flag so we must build both object types -- case $host_os in -- cygwin* | mingw* | pw32* | os2*) -- pic_mode=default -- ;; -- esac -- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then -- # non-PIC code in shared libraries is not supported -- pic_mode=default -- fi - -- # Calculate the filename of the output object if compiler does -- # not support -o with -c -- if test "$compiler_c_o" = no; then -- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} -- lockfile="$output_obj.lock" -- removelist="$removelist $output_obj $lockfile" -- trap "$run $rm $removelist; exit 1" 1 2 15 -- else -- need_locks=no -- lockfile= -- fi -+# func_version -+# Echo version message to standard output and exit. -+func_version () -+{ -+ $opt_debug -+ -+ $SED -n '/(C)/!b go -+ :more -+ /\./!{ -+ N -+ s/\n# / / -+ b more -+ } -+ :go -+ /^# '$PROGRAM' (GNU /,/# warranty; / { -+ s/^# // -+ s/^# *$// -+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ -+ p -+ }' < "$progpath" -+ exit $? -+} - -- # Lock this critical section if it is needed -- # We use this script file to make the link, it avoids creating a new file -- if test "$need_locks" = yes; then -- until $run ln "$0" "$lockfile" 2>/dev/null; do -- $show "Waiting for $lockfile to be removed" -- sleep 2 -- done -- elif test "$need_locks" = warn; then -- if test -f "$lockfile"; then -- echo "\ --*** ERROR, $lockfile exists and contains: --`cat $lockfile 2>/dev/null` -+# func_usage -+# Echo short help message to standard output and exit. -+func_usage () -+{ -+ $opt_debug -+ -+ $SED -n '/^# Usage:/,/^# *.*--help/ { -+ s/^# // -+ s/^# *$// -+ s/\$progname/'$progname'/ -+ p -+ }' < "$progpath" -+ echo -+ $ECHO "run \`$progname --help | more' for full usage" -+ exit $? -+} - --This indicates that another process is trying to use the same --temporary object file, and libtool could not work around it because --your compiler does not support \`-c' and \`-o' together. If you --repeat this compilation, it may succeed, by chance, but you had better --avoid parallel builds (make -j) in this platform, or get a better --compiler." -- -- $run $rm $removelist -- exit 1 -- fi -- echo $srcfile > "$lockfile" -+# func_help [NOEXIT] -+# Echo long help message to standard output and exit, -+# unless 'noexit' is passed as argument. -+func_help () -+{ -+ $opt_debug -+ -+ $SED -n '/^# Usage:/,/# Report bugs to/ { -+ :print -+ s/^# // -+ s/^# *$// -+ s*\$progname*'$progname'* -+ s*\$host*'"$host"'* -+ s*\$SHELL*'"$SHELL"'* -+ s*\$LTCC*'"$LTCC"'* -+ s*\$LTCFLAGS*'"$LTCFLAGS"'* -+ s*\$LD*'"$LD"'* -+ s/\$with_gnu_ld/'"$with_gnu_ld"'/ -+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ -+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ -+ p -+ d -+ } -+ /^# .* home page:/b print -+ /^# General help using/b print -+ ' < "$progpath" -+ ret=$? -+ if test -z "$1"; then -+ exit $ret - fi -+} - -- if test -n "$fix_srcfile_path"; then -- eval srcfile=\"$fix_srcfile_path\" -- fi -+# func_missing_arg argname -+# Echo program name prefixed message to standard error and set global -+# exit_cmd. -+func_missing_arg () -+{ -+ $opt_debug - -- # Only build a PIC object if we are building libtool libraries. -- if test "$build_libtool_libs" = yes; then -- # Without this assignment, base_compile gets emptied. -- fbsd_hideous_sh_bug=$base_compile -+ func_error "missing argument for $1." -+ exit_cmd=exit -+} - -- if test "$pic_mode" != no; then -- # All platforms use -DPIC, to notify preprocessed assembler code. -- command="$base_compile $srcfile $pic_flag -DPIC" -- else -- # Don't build PIC code -- command="$base_compile $srcfile" -- fi -- if test "$build_old_libs" = yes; then -- lo_libobj="$libobj" -- dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$dir" = "X$libobj"; then -- dir="$objdir" -- else -- dir="$dir/$objdir" -- fi -- libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - -- if test -d "$dir"; then -- $show "$rm $libobj" -- $run $rm $libobj -- else -- $show "$mkdir $dir" -- $run $mkdir $dir -- status=$? -- if test $status -ne 0 && test ! -d $dir; then -- exit $status -- fi -- fi -- fi -- if test "$compiler_o_lo" = yes; then -- output_obj="$libobj" -- command="$command -o $output_obj" -- elif test "$compiler_c_o" = yes; then -- output_obj="$obj" -- command="$command -o $output_obj" -- fi -+# func_split_short_opt shortopt -+# Set func_split_short_opt_name and func_split_short_opt_arg shell -+# variables after splitting SHORTOPT after the 2nd character. -+func_split_short_opt () -+{ -+ my_sed_short_opt='1s/^\(..\).*$/\1/;q' -+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' -+ -+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` -+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -+} # func_split_short_opt may be replaced by extended shell implementation -+ -+ -+# func_split_long_opt longopt -+# Set func_split_long_opt_name and func_split_long_opt_arg shell -+# variables after splitting LONGOPT at the `=' sign. -+func_split_long_opt () -+{ -+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' -+ my_sed_long_arg='1s/^--[^=]*=//' -+ -+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` -+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -+} # func_split_long_opt may be replaced by extended shell implementation - -- $run $rm "$output_obj" -- $show "$command" -- if $run eval "$command"; then : -- else -- test -n "$output_obj" && $run $rm $removelist -- exit 1 -- fi -+exit_cmd=: - -- if test "$need_locks" = warn && -- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then -- echo "\ --*** ERROR, $lockfile contains: --`cat $lockfile 2>/dev/null` - --but it should contain: --$srcfile - --This indicates that another process is trying to use the same --temporary object file, and libtool could not work around it because --your compiler does not support \`-c' and \`-o' together. If you --repeat this compilation, it may succeed, by chance, but you had better --avoid parallel builds (make -j) in this platform, or get a better --compiler." - -- $run $rm $removelist -- exit 1 -- fi - -- # Just move the object if needed, then go on to compile the next one -- if test x"$output_obj" != x"$libobj"; then -- $show "$mv $output_obj $libobj" -- if $run $mv $output_obj $libobj; then : -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -- fi -+magic="%%%MAGIC variable%%%" -+magic_exe="%%%MAGIC EXE variable%%%" - -- # If we have no pic_flag, then copy the object into place and finish. -- if (test -z "$pic_flag" || test "$pic_mode" != default) && -- test "$build_old_libs" = yes; then -- # Rename the .lo from within objdir to obj -- if test -f $obj; then -- $show $rm $obj -- $run $rm $obj -- fi -+# Global variables. -+nonopt= -+preserve_args= -+lo2o="s/\\.lo\$/.${objext}/" -+o2lo="s/\\.${objext}\$/.lo/" -+extracted_archives= -+extracted_serial=0 - -- $show "$mv $libobj $obj" -- if $run $mv $libobj $obj; then : -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -+# If this variable is set in any of the actions, the command in it -+# will be execed at the end. This prevents here-documents from being -+# left over by shells. -+exec_cmd= - -- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$obj"; then -- xdir="." -- else -- xdir="$xdir" -- fi -- baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` -- libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` -- # Now arrange that obj and lo_libobj become the same file -- $show "(cd $xdir && $LN_S $baseobj $libobj)" -- if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then -- # Unlock the critical section if it was locked -- if test "$need_locks" != no; then -- $run $rm "$lockfile" -- fi -- exit 0 -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -- fi -+# func_append var value -+# Append VALUE to the end of shell variable VAR. -+func_append () -+{ -+ eval "${1}=\$${1}\${2}" -+} # func_append may be replaced by extended shell implementation -+ -+# func_append_quoted var value -+# Quote VALUE and append to the end of shell variable VAR, separated -+# by a space. -+func_append_quoted () -+{ -+ func_quote_for_eval "${2}" -+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -+} # func_append_quoted may be replaced by extended shell implementation -+ -+ -+# func_arith arithmetic-term... -+func_arith () -+{ -+ func_arith_result=`expr "${@}"` -+} # func_arith may be replaced by extended shell implementation -+ -+ -+# func_len string -+# STRING may not start with a hyphen. -+func_len () -+{ -+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -+} # func_len may be replaced by extended shell implementation -+ -+ -+# func_lo2o object -+func_lo2o () -+{ -+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -+} # func_lo2o may be replaced by extended shell implementation -+ -+ -+# func_xform libobj-or-source -+func_xform () -+{ -+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -+} # func_xform may be replaced by extended shell implementation -+ -+ -+# func_fatal_configuration arg... -+# Echo program name prefixed message to standard error, followed by -+# a configuration failure hint, and exit. -+func_fatal_configuration () -+{ -+ func_error ${1+"$@"} -+ func_error "See the $PACKAGE documentation for more information." -+ func_fatal_error "Fatal configuration error." -+} - -- # Allow error messages only from the first compilation. -- suppress_output=' >/dev/null 2>&1' -- fi - -- # Only build a position-dependent object if we build old libraries. -+# func_config -+# Display the configuration for all the tags in this script. -+func_config () -+{ -+ re_begincf='^# ### BEGIN LIBTOOL' -+ re_endcf='^# ### END LIBTOOL' -+ -+ # Default configuration. -+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" -+ -+ # Now print the configurations for the tags. -+ for tagname in $taglist; do -+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" -+ done -+ -+ exit $? -+} -+ -+# func_features -+# Display the features supported by this script. -+func_features () -+{ -+ echo "host: $host" -+ if test "$build_libtool_libs" = yes; then -+ echo "enable shared libraries" -+ else -+ echo "disable shared libraries" -+ fi - if test "$build_old_libs" = yes; then -- if test "$pic_mode" != yes; then -- # Don't build PIC code -- command="$base_compile $srcfile" -+ echo "enable static libraries" -+ else -+ echo "disable static libraries" -+ fi -+ -+ exit $? -+} -+ -+# func_enable_tag tagname -+# Verify that TAGNAME is valid, and either flag an error and exit, or -+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -+# variable here. -+func_enable_tag () -+{ -+ # Global variable: -+ tagname="$1" -+ -+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" -+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" -+ sed_extractcf="/$re_begincf/,/$re_endcf/p" -+ -+ # Validate tagname. -+ case $tagname in -+ *[!-_A-Za-z0-9,/]*) -+ func_fatal_error "invalid tag name: $tagname" -+ ;; -+ esac -+ -+ # Don't test for the "default" C tag, as we know it's -+ # there but not specially marked. -+ case $tagname in -+ CC) ;; -+ *) -+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then -+ taglist="$taglist $tagname" -+ -+ # Evaluate the configuration. Be careful to quote the path -+ # and the sed script, to avoid splitting on whitespace, but -+ # also don't use non-portable quotes within backquotes within -+ # quotes we have to do it in 2 steps: -+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` -+ eval "$extractedcf" - else -- # All platforms use -DPIC, to notify preprocessed assembler code. -- command="$base_compile $srcfile $pic_flag -DPIC" -- fi -- if test "$compiler_c_o" = yes; then -- command="$command -o $obj" -- output_obj="$obj" -+ func_error "ignoring unknown tag $tagname" - fi -+ ;; -+ esac -+} - -- # Suppress compiler output if we already did a PIC compilation. -- command="$command$suppress_output" -- $run $rm "$output_obj" -- $show "$command" -- if $run eval "$command"; then : -+# func_check_version_match -+# Ensure that we are using m4 macros, and libtool script from the same -+# release of libtool. -+func_check_version_match () -+{ -+ if test "$package_revision" != "$macro_revision"; then -+ if test "$VERSION" != "$macro_version"; then -+ if test -z "$macro_version"; then -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from an older release. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF - else -- $run $rm $removelist -- exit 1 -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF - fi -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -+$progname: but the definition of this LT_INIT comes from revision $macro_revision. -+$progname: You should recreate aclocal.m4 with macros from revision $package_revision -+$progname: of $PACKAGE $VERSION and run autoconf again. -+_LT_EOF -+ fi - -- if test "$need_locks" = warn && -- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then -- echo "\ --*** ERROR, $lockfile contains: --`cat $lockfile 2>/dev/null` -+ exit $EXIT_MISMATCH -+ fi -+} - --but it should contain: --$srcfile - --This indicates that another process is trying to use the same --temporary object file, and libtool could not work around it because --your compiler does not support \`-c' and \`-o' together. If you --repeat this compilation, it may succeed, by chance, but you had better --avoid parallel builds (make -j) in this platform, or get a better --compiler." -+# Shorthand for --mode=foo, only valid as the first argument -+case $1 in -+clean|clea|cle|cl) -+ shift; set dummy --mode clean ${1+"$@"}; shift -+ ;; -+compile|compil|compi|comp|com|co|c) -+ shift; set dummy --mode compile ${1+"$@"}; shift -+ ;; -+execute|execut|execu|exec|exe|ex|e) -+ shift; set dummy --mode execute ${1+"$@"}; shift -+ ;; -+finish|finis|fini|fin|fi|f) -+ shift; set dummy --mode finish ${1+"$@"}; shift -+ ;; -+install|instal|insta|inst|ins|in|i) -+ shift; set dummy --mode install ${1+"$@"}; shift -+ ;; -+link|lin|li|l) -+ shift; set dummy --mode link ${1+"$@"}; shift -+ ;; -+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -+ shift; set dummy --mode uninstall ${1+"$@"}; shift -+ ;; -+esac - -- $run $rm $removelist -- exit 1 -- fi - -- # Just move the object if needed -- if test x"$output_obj" != x"$obj"; then -- $show "$mv $output_obj $obj" -- if $run $mv $output_obj $obj; then : -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -- fi - -- # Create an invalid libtool object if no PIC, so that we do not -- # accidentally link it into a program. -- if test "$build_libtool_libs" != yes; then -- $show "echo timestamp > $libobj" -- $run eval "echo timestamp > \$libobj" || exit $? -- else -- # Move the .lo from within objdir -- $show "$mv $libobj $lo_libobj" -- if $run $mv $libobj $lo_libobj; then : -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -- fi -- fi -+# Option defaults: -+opt_debug=: -+opt_dry_run=false -+opt_config=false -+opt_preserve_dup_deps=false -+opt_features=false -+opt_finish=false -+opt_help=false -+opt_help_all=false -+opt_silent=: -+opt_verbose=: -+opt_silent=false -+opt_verbose=false -+ -+ -+# Parse options once, thoroughly. This comes as soon as possible in the -+# script to make things like `--version' happen as quickly as we can. -+{ -+ # this just eases exit handling -+ while test $# -gt 0; do -+ opt="$1" -+ shift -+ case $opt in -+ --debug|-x) opt_debug='set -x' -+ func_echo "enabling shell trace mode" -+ $opt_debug -+ ;; -+ --dry-run|--dryrun|-n) -+ opt_dry_run=: -+ ;; -+ --config) -+ opt_config=: -+func_config -+ ;; -+ --dlopen|-dlopen) -+ optarg="$1" -+ opt_dlopen="${opt_dlopen+$opt_dlopen -+}$optarg" -+ shift -+ ;; -+ --preserve-dup-deps) -+ opt_preserve_dup_deps=: -+ ;; -+ --features) -+ opt_features=: -+func_features -+ ;; -+ --finish) -+ opt_finish=: -+set dummy --mode finish ${1+"$@"}; shift -+ ;; -+ --help) -+ opt_help=: -+ ;; -+ --help-all) -+ opt_help_all=: -+opt_help=': help-all' -+ ;; -+ --mode) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_mode="$optarg" -+case $optarg in -+ # Valid mode arguments: -+ clean|compile|execute|finish|install|link|relink|uninstall) ;; -+ -+ # Catch anything else as an error -+ *) func_error "invalid argument for $opt" -+ exit_cmd=exit -+ break -+ ;; -+esac -+ shift -+ ;; -+ --no-silent|--no-quiet) -+ opt_silent=false -+func_append preserve_args " $opt" -+ ;; -+ --no-verbose) -+ opt_verbose=false -+func_append preserve_args " $opt" -+ ;; -+ --silent|--quiet) -+ opt_silent=: -+func_append preserve_args " $opt" -+ opt_verbose=false -+ ;; -+ --verbose|-v) -+ opt_verbose=: -+func_append preserve_args " $opt" -+opt_silent=false -+ ;; -+ --tag) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_tag="$optarg" -+func_append preserve_args " $opt $optarg" -+func_enable_tag "$optarg" -+ shift -+ ;; -+ -+ -\?|-h) func_usage ;; -+ --help) func_help ;; -+ --version) func_version ;; -+ -+ # Separate optargs to long options: -+ --*=*) -+ func_split_long_opt "$opt" -+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} -+ shift -+ ;; -+ -+ # Separate non-argument short options: -+ -\?*|-h*|-n*|-v*) -+ func_split_short_opt "$opt" -+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} -+ shift -+ ;; -+ -+ --) break ;; -+ -*) func_fatal_help "unrecognized option \`$opt'" ;; -+ *) set dummy "$opt" ${1+"$@"}; shift; break ;; -+ esac -+ done - -- # Unlock the critical section if it was locked -- if test "$need_locks" != no; then -- $run $rm "$lockfile" -- fi -+ # Validate options: - -- exit 0 -- ;; -+ # save first non-option argument -+ if test "$#" -gt 0; then -+ nonopt="$opt" -+ shift -+ fi - -- # libtool link mode -- link | relink) -- modename="$modename: link" -- case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -- # It is impossible to link a dll without this setting, and -- # we shouldn't force the makefile maintainer to figure out -- # which system we are compiling for in order to pass an extra -- # flag for every libtool invokation. -- # allow_undefined=no -+ # preserve --debug -+ test "$opt_debug" = : || func_append preserve_args " --debug" - -- # FIXME: Unfortunately, there are problems with the above when trying -- # to make a dll which has undefined symbols, in which case not -- # even a static library is built. For now, we need to specify -- # -no-undefined on the libtool link line when we can be certain -- # that all symbols are satisfied, otherwise we get a static library. -- allow_undefined=yes -+ case $host in -+ *cygwin* | *mingw* | *pw32* | *cegcc*) -+ # don't eliminate duplications in $postdeps and $predeps -+ opt_duplicate_compiler_generated_deps=: - ;; - *) -- allow_undefined=yes -+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; -+ esac -+ -+ $opt_help || { -+ # Sanity checks first: -+ func_check_version_match -+ -+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -+ func_fatal_configuration "not configured to build any kind of library" -+ fi -+ -+ # Darwin sucks -+ eval std_shrext=\"$shrext_cmds\" -+ -+ # Only execute mode is allowed to have -dlopen flags. -+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then -+ func_error "unrecognized option \`-dlopen'" -+ $ECHO "$help" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+ -+ # Change the help message to a mode-specific one. -+ generic_help="$help" -+ help="Try \`$progname --help --mode=$opt_mode' for more information." -+ } -+ -+ -+ # Bail if the options were screwed -+ $exit_cmd $EXIT_FAILURE -+} -+ -+ -+ -+ -+## ----------- ## -+## Main. ## -+## ----------- ## -+ -+# func_lalib_p file -+# True iff FILE is a libtool `.la' library or `.lo' object file. -+# This function is only a basic sanity check; it will hardly flush out -+# determined imposters. -+func_lalib_p () -+{ -+ test -f "$1" && -+ $SED -e 4q "$1" 2>/dev/null \ -+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -+} -+ -+# func_lalib_unsafe_p file -+# True iff FILE is a libtool `.la' library or `.lo' object file. -+# This function implements the same check as func_lalib_p without -+# resorting to external programs. To this end, it redirects stdin and -+# closes it afterwards, without saving the original file descriptor. -+# As a safety measure, use it only where a negative result would be -+# fatal anyway. Works if `file' does not exist. -+func_lalib_unsafe_p () -+{ -+ lalib_p=no -+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then -+ for lalib_p_l in 1 2 3 4 -+ do -+ read lalib_p_line -+ case "$lalib_p_line" in -+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; -+ esac -+ done -+ exec 0<&5 5<&- -+ fi -+ test "$lalib_p" = yes -+} -+ -+# func_ltwrapper_script_p file -+# True iff FILE is a libtool wrapper script -+# This function is only a basic sanity check; it will hardly flush out -+# determined imposters. -+func_ltwrapper_script_p () -+{ -+ func_lalib_p "$1" -+} -+ -+# func_ltwrapper_executable_p file -+# True iff FILE is a libtool wrapper executable -+# This function is only a basic sanity check; it will hardly flush out -+# determined imposters. -+func_ltwrapper_executable_p () -+{ -+ func_ltwrapper_exec_suffix= -+ case $1 in -+ *.exe) ;; -+ *) func_ltwrapper_exec_suffix=.exe ;; - esac -- libtool_args="$nonopt" -- compile_command="$nonopt" -- finalize_command="$nonopt" -+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -+} - -- compile_rpath= -- finalize_rpath= -- compile_shlibpath= -- finalize_shlibpath= -- convenience= -- old_convenience= -- deplibs= -- old_deplibs= -- compiler_flags= -- linker_flags= -- dllsearchpath= -- lib_search_path=`pwd` -+# func_ltwrapper_scriptname file -+# Assumes file is an ltwrapper_executable -+# uses $file to determine the appropriate filename for a -+# temporary ltwrapper_script. -+func_ltwrapper_scriptname () -+{ -+ func_dirname_and_basename "$1" "" "." -+ func_stripname '' '.exe' "$func_basename_result" -+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -+} - -- avoid_version=no -- dlfiles= -- dlprefiles= -- dlself=no -- export_dynamic=no -- export_symbols= -- export_symbols_regex= -- generated= -- libobjs= -- ltlibs= -- module=no -- no_install=no -- objs= -- prefer_static_libs=no -- preload=no -- prev= -- prevarg= -- release= -- rpath= -- xrpath= -- perm_rpath= -- temp_rpath= -- thread_safe=no -- vinfo= -+# func_ltwrapper_p file -+# True iff FILE is a libtool wrapper script or wrapper executable -+# This function is only a basic sanity check; it will hardly flush out -+# determined imposters. -+func_ltwrapper_p () -+{ -+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -+} - -- # We need to know -static, to get the right output filenames. -- for arg -- do -- case $arg in -- -all-static | -static) -- if test "X$arg" = "X-all-static"; then -- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then -- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 -- fi -- if test -n "$link_static_flag"; then -- dlopen_self=$dlopen_self_static -- fi -- else -- if test -z "$pic_flag" && test -n "$link_static_flag"; then -- dlopen_self=$dlopen_self_static -- fi -- fi -- build_libtool_libs=no -- build_old_libs=yes -- prefer_static_libs=yes -- break -- ;; -- esac -+ -+# func_execute_cmds commands fail_cmd -+# Execute tilde-delimited COMMANDS. -+# If FAIL_CMD is given, eval that upon failure. -+# FAIL_CMD may read-access the current command in variable CMD! -+func_execute_cmds () -+{ -+ $opt_debug -+ save_ifs=$IFS; IFS='~' -+ for cmd in $1; do -+ IFS=$save_ifs -+ eval cmd=\"$cmd\" -+ func_show_eval "$cmd" "${2-:}" - done -+ IFS=$save_ifs -+} - -- # See if our shared archives depend on static archives. -- test -n "$old_archive_from_new_cmds" && build_old_libs=yes - -- # Go through the arguments, transforming them on the way. -- while test $# -gt 0; do -- arg="$1" -- shift -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test -- ;; -- *) qarg=$arg ;; -- esac -- libtool_args="$libtool_args $qarg" -+# func_source file -+# Source FILE, adding directory component if necessary. -+# Note that it is not necessary on cygwin/mingw to append a dot to -+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -+# behavior happens only for exec(3), not for open(2)! Also, sourcing -+# `FILE.' does not work on cygwin managed mounts. -+func_source () -+{ -+ $opt_debug -+ case $1 in -+ */* | *\\*) . "$1" ;; -+ *) . "./$1" ;; -+ esac -+} - -- # If the previous option needs an argument, assign it. -- if test -n "$prev"; then -- case $prev in -- output) -- compile_command="$compile_command @OUTPUT@" -- finalize_command="$finalize_command @OUTPUT@" -- ;; -- esac - -- case $prev in -- dlfiles|dlprefiles) -- if test "$preload" = no; then -- # Add the symbol object into the linking commands. -- compile_command="$compile_command @SYMFILE@" -- finalize_command="$finalize_command @SYMFILE@" -- preload=yes -- fi -- case $arg in -- *.la | *.lo) ;; # We handle these cases below. -- force) -- if test "$dlself" = no; then -- dlself=needless -- export_dynamic=yes -- fi -- prev= -- continue -- ;; -- self) -- if test "$prev" = dlprefiles; then -- dlself=yes -- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then -- dlself=yes -- else -- dlself=needless -- export_dynamic=yes -- fi -- prev= -- continue -- ;; -- *) -- if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -- else -- dlprefiles="$dlprefiles $arg" -- fi -- prev= -- continue -- ;; -- esac -- ;; -- expsyms) -- export_symbols="$arg" -- if test ! -f "$arg"; then -- $echo "$modename: symbol file \`$arg' does not exist" -- exit 1 -- fi -- prev= -- continue -- ;; -- expsyms_regex) -- export_symbols_regex="$arg" -- prev= -- continue -- ;; -- release) -- release="-$arg" -- prev= -- continue -- ;; -- rpath | xrpath) -- # We need an absolute path. -- case $arg in -- [\\/]* | [A-Za-z]:[\\/]*) ;; -- *) -- $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -- ;; -- esac -- if test "$prev" = rpath; then -- case "$rpath " in -- *" $arg "*) ;; -- *) rpath="$rpath $arg" ;; -- esac -- else -- case "$xrpath " in -- *" $arg "*) ;; -- *) xrpath="$xrpath $arg" ;; -- esac -- fi -- prev= -- continue -- ;; -- xcompiler) -- compiler_flags="$compiler_flags $qarg" -- prev= -- compile_command="$compile_command $qarg" -- finalize_command="$finalize_command $qarg" -- continue -- ;; -- xlinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $wl$qarg" -- prev= -- compile_command="$compile_command $wl$qarg" -- finalize_command="$finalize_command $wl$qarg" -- continue -- ;; -- *) -- eval "$prev=\"\$arg\"" -- prev= -- continue -- ;; -- esac -- fi # test -n $prev -+# func_resolve_sysroot PATH -+# Replace a leading = in PATH with a sysroot. Store the result into -+# func_resolve_sysroot_result -+func_resolve_sysroot () -+{ -+ func_resolve_sysroot_result=$1 -+ case $func_resolve_sysroot_result in -+ =*) -+ func_stripname '=' '' "$func_resolve_sysroot_result" -+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result -+ ;; -+ esac -+} - -- prevarg="$arg" -+# func_replace_sysroot PATH -+# If PATH begins with the sysroot, replace it with = and -+# store the result into func_replace_sysroot_result. -+func_replace_sysroot () -+{ -+ case "$lt_sysroot:$1" in -+ ?*:"$lt_sysroot"*) -+ func_stripname "$lt_sysroot" '' "$1" -+ func_replace_sysroot_result="=$func_stripname_result" -+ ;; -+ *) -+ # Including no sysroot. -+ func_replace_sysroot_result=$1 -+ ;; -+ esac -+} - -- case $arg in -- -all-static) -- if test -n "$link_static_flag"; then -- compile_command="$compile_command $link_static_flag" -- finalize_command="$finalize_command $link_static_flag" -+# func_infer_tag arg -+# Infer tagged configuration to use if any are available and -+# if one wasn't chosen via the "--tag" command line option. -+# Only attempt this if the compiler in the base compile -+# command doesn't match the default compiler. -+# arg is usually of the form 'gcc ...' -+func_infer_tag () -+{ -+ $opt_debug -+ if test -n "$available_tags" && test -z "$tagname"; then -+ CC_quoted= -+ for arg in $CC; do -+ func_append_quoted CC_quoted "$arg" -+ done -+ CC_expanded=`func_echo_all $CC` -+ CC_quoted_expanded=`func_echo_all $CC_quoted` -+ case $@ in -+ # Blanks in the command may have been stripped by the calling shell, -+ # but not from the CC environment variable when configure was run. -+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ -+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; -+ # Blanks at the start of $base_compile will cause this to fail -+ # if we don't check for them as well. -+ *) -+ for z in $available_tags; do -+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then -+ # Evaluate the configuration. -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" -+ CC_quoted= -+ for arg in $CC; do -+ # Double-quote args containing other shell metacharacters. -+ func_append_quoted CC_quoted "$arg" -+ done -+ CC_expanded=`func_echo_all $CC` -+ CC_quoted_expanded=`func_echo_all $CC_quoted` -+ case "$@ " in -+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ -+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) -+ # The compiler in the base compile command matches -+ # the one in the tagged configuration. -+ # Assume this is the tagged configuration we want. -+ tagname=$z -+ break -+ ;; -+ esac -+ fi -+ done -+ # If $tagname still isn't set, then no tagged configuration -+ # was found and let the user know that the "--tag" command -+ # line option must be used. -+ if test -z "$tagname"; then -+ func_echo "unable to infer tagged configuration" -+ func_fatal_error "specify a tag with \`--tag'" -+# else -+# func_verbose "using $tagname tagged configuration" - fi -- continue - ;; -+ esac -+ fi -+} - -- -allow-undefined) -- # FIXME: remove this flag sometime in the future. -- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 -- continue -- ;; - -- -avoid-version) -- avoid_version=yes -- continue -- ;; - -- -dlopen) -- prev=dlfiles -- continue -- ;; -+# func_write_libtool_object output_name pic_name nonpic_name -+# Create a libtool object file (analogous to a ".la" file), -+# but don't create it if we're doing a dry run. -+func_write_libtool_object () -+{ -+ write_libobj=${1} -+ if test "$build_libtool_libs" = yes; then -+ write_lobj=\'${2}\' -+ else -+ write_lobj=none -+ fi - -- -dlpreopen) -- prev=dlprefiles -- continue -- ;; -+ if test "$build_old_libs" = yes; then -+ write_oldobj=\'${3}\' -+ else -+ write_oldobj=none -+ fi - -- -export-dynamic) -- export_dynamic=yes -- continue -- ;; -+ $opt_dry_run || { -+ cat >${write_libobj}T <&2 -- exit 1 -- fi -- dir="$absdir" -- ;; -- esac -- case "$deplibs " in -- *" -L$dir "*) ;; -- *) -- deplibs="$deplibs -L$dir" -- lib_search_path="$lib_search_path $dir" -- ;; -- esac -- case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -- case :$dllsearchpath: in -- *":$dir:"*) ;; -- *) dllsearchpath="$dllsearchpath:$dir";; -- esac -- ;; -- esac -- continue -- ;; -+EOF -+ $MV "${write_libobj}T" "${write_libobj}" -+ } -+} - -- -l*) -- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then -- case $host in -- *-*-cygwin* | *-*-pw32* | *-*-beos*) -- # These systems don't actually have a C or math library (as such) -- continue -- ;; -- *-*-mingw* | *-*-os2*) -- # These systems don't actually have a C library (as such) -- test "X$arg" = "X-lc" && continue -- ;; -- *-*-openbsd*) -- # Do not include libc due to us having libc/libc_r. -- test "X$arg" = "X-lc" && continue -- ;; -- esac -- elif test "X$arg" = "X-lc_r"; then -- case $host in -- *-*-openbsd*) -- # Do not include libc_r directly, use -pthread flag. -- continue -- ;; -- esac -- fi -- deplibs="$deplibs $arg" -- continue -- ;; - -- -module) -- module=yes -- continue -- ;; -+################################################## -+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # -+################################################## -+ -+# func_convert_core_file_wine_to_w32 ARG -+# Helper function used by file name conversion functions when $build is *nix, -+# and $host is mingw, cygwin, or some other w32 environment. Relies on a -+# correctly configured wine environment available, with the winepath program -+# in $build's $PATH. -+# -+# ARG is the $build file name to be converted to w32 format. -+# Result is available in $func_convert_core_file_wine_to_w32_result, and will -+# be empty on error (or when ARG is empty) -+func_convert_core_file_wine_to_w32 () -+{ -+ $opt_debug -+ func_convert_core_file_wine_to_w32_result="$1" -+ if test -n "$1"; then -+ # Unfortunately, winepath does not exit with a non-zero error code, so we -+ # are forced to check the contents of stdout. On the other hand, if the -+ # command is not found, the shell will set an exit code of 127 and print -+ # *an error message* to stdout. So we must check for both error code of -+ # zero AND non-empty stdout, which explains the odd construction: -+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` -+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then -+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | -+ $SED -e "$lt_sed_naive_backslashify"` -+ else -+ func_convert_core_file_wine_to_w32_result= -+ fi -+ fi -+} -+# end: func_convert_core_file_wine_to_w32 - -- -no-fast-install) -- fast_install=no -- continue -- ;; - -- -no-install) -- case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -- # The PATH hackery in wrapper scripts is required on Windows -- # in order for the loader to find any dlls it needs. -- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 -- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 -- fast_install=no -- ;; -- *) no_install=yes ;; -- esac -- continue -- ;; -+# func_convert_core_path_wine_to_w32 ARG -+# Helper function used by path conversion functions when $build is *nix, and -+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -+# configured wine environment available, with the winepath program in $build's -+# $PATH. Assumes ARG has no leading or trailing path separator characters. -+# -+# ARG is path to be converted from $build format to win32. -+# Result is available in $func_convert_core_path_wine_to_w32_result. -+# Unconvertible file (directory) names in ARG are skipped; if no directory names -+# are convertible, then the result may be empty. -+func_convert_core_path_wine_to_w32 () -+{ -+ $opt_debug -+ # unfortunately, winepath doesn't convert paths, only file names -+ func_convert_core_path_wine_to_w32_result="" -+ if test -n "$1"; then -+ oldIFS=$IFS -+ IFS=: -+ for func_convert_core_path_wine_to_w32_f in $1; do -+ IFS=$oldIFS -+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" -+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then -+ if test -z "$func_convert_core_path_wine_to_w32_result"; then -+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" -+ else -+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" -+ fi -+ fi -+ done -+ IFS=$oldIFS -+ fi -+} -+# end: func_convert_core_path_wine_to_w32 - -- -no-undefined) -- allow_undefined=no -- continue -- ;; - -- -o) prev=output ;; -+# func_cygpath ARGS... -+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -+# (2), returns the Cygwin file name or path in func_cygpath_result (input -+# file name or path is assumed to be in w32 format, as previously converted -+# from $build's *nix or MSYS format). In case (3), returns the w32 file name -+# or path in func_cygpath_result (input file name or path is assumed to be in -+# Cygwin format). Returns an empty string on error. -+# -+# ARGS are passed to cygpath, with the last one being the file name or path to -+# be converted. -+# -+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -+# environment variable; do not put it in $PATH. -+func_cygpath () -+{ -+ $opt_debug -+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then -+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` -+ if test "$?" -ne 0; then -+ # on failure, ensure result is empty -+ func_cygpath_result= -+ fi -+ else -+ func_cygpath_result= -+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" -+ fi -+} -+#end: func_cygpath - -- -release) -- prev=release -- continue -- ;; - -- -rpath) -- prev=rpath -- continue -- ;; -+# func_convert_core_msys_to_w32 ARG -+# Convert file name or path ARG from MSYS format to w32 format. Return -+# result in func_convert_core_msys_to_w32_result. -+func_convert_core_msys_to_w32 () -+{ -+ $opt_debug -+ # awkward: cmd appends spaces to result -+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | -+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -+} -+#end: func_convert_core_msys_to_w32 - -- -R) -- prev=xrpath -- continue -- ;; - -- -R*) -- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` -- # We need an absolute path. -- case $dir in -- [\\/]* | [A-Za-z]:[\\/]*) ;; -- *) -- $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -- ;; -- esac -- case "$xrpath " in -- *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -- esac -- continue -- ;; -+# func_convert_file_check ARG1 ARG2 -+# Verify that ARG1 (a file name in $build format) was converted to $host -+# format in ARG2. Otherwise, emit an error message, but continue (resetting -+# func_to_host_file_result to ARG1). -+func_convert_file_check () -+{ -+ $opt_debug -+ if test -z "$2" && test -n "$1" ; then -+ func_error "Could not determine host file name corresponding to" -+ func_error " \`$1'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback: -+ func_to_host_file_result="$1" -+ fi -+} -+# end func_convert_file_check - -- -static) -- # The effects of -static are defined in a previous loop. -- # We used to do the same as -all-static on platforms that -- # didn't have a PIC flag, but the assumption that the effects -- # would be equivalent was wrong. It would break on at least -- # Digital Unix and AIX. -- continue -- ;; - -- -thread-safe) -- thread_safe=yes -- continue -- ;; -+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -+# Verify that FROM_PATH (a path in $build format) was converted to $host -+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -+# func_to_host_file_result to a simplistic fallback value (see below). -+func_convert_path_check () -+{ -+ $opt_debug -+ if test -z "$4" && test -n "$3"; then -+ func_error "Could not determine the host path corresponding to" -+ func_error " \`$3'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback. This is a deliberately simplistic "conversion" and -+ # should not be "improved". See libtool.info. -+ if test "x$1" != "x$2"; then -+ lt_replace_pathsep_chars="s|$1|$2|g" -+ func_to_host_path_result=`echo "$3" | -+ $SED -e "$lt_replace_pathsep_chars"` -+ else -+ func_to_host_path_result="$3" -+ fi -+ fi -+} -+# end func_convert_path_check - -- -version-info) -- prev=vinfo -- continue -- ;; - -- -Wc,*) -- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` -- arg= -- save_ifs="$IFS"; IFS=',' -- for flag in $args; do -- IFS="$save_ifs" -- case $flag in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- flag="\"$flag\"" -- ;; -- esac -- arg="$arg $wl$flag" -- compiler_flags="$compiler_flags $flag" -- done -- IFS="$save_ifs" -- arg=`$echo "X$arg" | $Xsed -e "s/^ //"` -- ;; -+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -+# and appending REPL if ORIG matches BACKPAT. -+func_convert_path_front_back_pathsep () -+{ -+ $opt_debug -+ case $4 in -+ $1 ) func_to_host_path_result="$3$func_to_host_path_result" -+ ;; -+ esac -+ case $4 in -+ $2 ) func_append func_to_host_path_result "$3" -+ ;; -+ esac -+} -+# end func_convert_path_front_back_pathsep - -- -Wl,*) -- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` -- arg= -- save_ifs="$IFS"; IFS=',' -- for flag in $args; do -- IFS="$save_ifs" -- case $flag in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- flag="\"$flag\"" -- ;; -- esac -- arg="$arg $wl$flag" -- compiler_flags="$compiler_flags $wl$flag" -- linker_flags="$linker_flags $flag" -- done -- IFS="$save_ifs" -- arg=`$echo "X$arg" | $Xsed -e "s/^ //"` -- ;; - -- -Xcompiler) -- prev=xcompiler -- continue -+################################################## -+# $build to $host FILE NAME CONVERSION FUNCTIONS # -+################################################## -+# invoked via `$to_host_file_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# Result will be available in $func_to_host_file_result. -+ -+ -+# func_to_host_file ARG -+# Converts the file name ARG from $build format to $host format. Return result -+# in func_to_host_file_result. -+func_to_host_file () -+{ -+ $opt_debug -+ $to_host_file_cmd "$1" -+} -+# end func_to_host_file -+ -+ -+# func_to_tool_file ARG LAZY -+# converts the file name ARG from $build format to toolchain format. Return -+# result in func_to_tool_file_result. If the conversion in use is listed -+# in (the comma separated) LAZY, no conversion takes place. -+func_to_tool_file () -+{ -+ $opt_debug -+ case ,$2, in -+ *,"$to_tool_file_cmd",*) -+ func_to_tool_file_result=$1 -+ ;; -+ *) -+ $to_tool_file_cmd "$1" -+ func_to_tool_file_result=$func_to_host_file_result -+ ;; -+ esac -+} -+# end func_to_tool_file -+ -+ -+# func_convert_file_noop ARG -+# Copy ARG to func_to_host_file_result. -+func_convert_file_noop () -+{ -+ func_to_host_file_result="$1" -+} -+# end func_convert_file_noop -+ -+ -+# func_convert_file_msys_to_w32 ARG -+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_file_result. -+func_convert_file_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_msys_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_w32 -+ -+ -+# func_convert_file_cygwin_to_w32 ARG -+# Convert file name ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_file_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use -+ # LT_CYGPATH in this case. -+ func_to_host_file_result=`cygpath -m "$1"` -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_cygwin_to_w32 -+ -+ -+# func_convert_file_nix_to_w32 ARG -+# Convert file name ARG from *nix to w32 format. Requires a wine environment -+# and a working winepath. Returns result in func_to_host_file_result. -+func_convert_file_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_file_wine_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_w32 -+ -+ -+# func_convert_file_msys_to_cygwin ARG -+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_file_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_msys_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_cygwin -+ -+ -+# func_convert_file_nix_to_cygwin ARG -+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -+# in func_to_host_file_result. -+func_convert_file_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. -+ func_convert_core_file_wine_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_cygwin -+ -+ -+############################################# -+# $build to $host PATH CONVERSION FUNCTIONS # -+############################################# -+# invoked via `$to_host_path_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# The result will be available in $func_to_host_path_result. -+# -+# Path separators are also converted from $build format to $host format. If -+# ARG begins or ends with a path separator character, it is preserved (but -+# converted to $host format) on output. -+# -+# All path conversion functions are named using the following convention: -+# file name conversion function : func_convert_file_X_to_Y () -+# path conversion function : func_convert_path_X_to_Y () -+# where, for any given $build/$host combination the 'X_to_Y' value is the -+# same. If conversion functions are added for new $build/$host combinations, -+# the two new functions must follow this pattern, or func_init_to_host_path_cmd -+# will break. -+ -+ -+# func_init_to_host_path_cmd -+# Ensures that function "pointer" variable $to_host_path_cmd is set to the -+# appropriate value, based on the value of $to_host_file_cmd. -+to_host_path_cmd= -+func_init_to_host_path_cmd () -+{ -+ $opt_debug -+ if test -z "$to_host_path_cmd"; then -+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" -+ to_host_path_cmd="func_convert_path_${func_stripname_result}" -+ fi -+} -+ -+ -+# func_to_host_path ARG -+# Converts the path ARG from $build format to $host format. Return result -+# in func_to_host_path_result. -+func_to_host_path () -+{ -+ $opt_debug -+ func_init_to_host_path_cmd -+ $to_host_path_cmd "$1" -+} -+# end func_to_host_path -+ -+ -+# func_convert_path_noop ARG -+# Copy ARG to func_to_host_path_result. -+func_convert_path_noop () -+{ -+ func_to_host_path_result="$1" -+} -+# end func_convert_path_noop -+ -+ -+# func_convert_path_msys_to_w32 ARG -+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_path_result. -+func_convert_path_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from ARG. MSYS -+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; -+ # and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_msys_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_msys_to_w32 -+ -+ -+# func_convert_path_cygwin_to_w32 ARG -+# Convert path ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_path_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_cygwin_to_w32 -+ -+ -+# func_convert_path_nix_to_w32 ARG -+# Convert path ARG from *nix to w32 format. Requires a wine environment and -+# a working winepath. Returns result in func_to_host_file_result. -+func_convert_path_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_nix_to_w32 -+ -+ -+# func_convert_path_msys_to_cygwin ARG -+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_path_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_msys_to_cygwin -+ -+ -+# func_convert_path_nix_to_cygwin ARG -+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -+# func_to_host_file_result. -+func_convert_path_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from -+ # ARG. msys behavior is inconsistent here, cygpath turns them -+ # into '.;' and ';.', and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_nix_to_cygwin -+ -+ -+# func_mode_compile arg... -+func_mode_compile () -+{ -+ $opt_debug -+ # Get the compilation command and the source file. -+ base_compile= -+ srcfile="$nonopt" # always keep a non-empty value in "srcfile" -+ suppress_opt=yes -+ suppress_output= -+ arg_mode=normal -+ libobj= -+ later= -+ pie_flag= -+ -+ for arg -+ do -+ case $arg_mode in -+ arg ) -+ # do not "continue". Instead, add this to base_compile -+ lastarg="$arg" -+ arg_mode=normal - ;; - -- -Xlinker) -- prev=xlinker -+ target ) -+ libobj="$arg" -+ arg_mode=normal - continue - ;; - -- # Some other compiler flag. -- -* | +*) -- # Unknown arguments in both finalize_command and compile_command need -- # to be aesthetically quoted because they are evaled later. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+ normal ) -+ # Accept any command-line options. - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -+ -o) -+ test -n "$libobj" && \ -+ func_fatal_error "you cannot specify \`-o' more than once" -+ arg_mode=target -+ continue - ;; -- esac -- ;; - -- *.lo | *.$objext) -- # A library or standard object. -- if test "$prev" = dlfiles; then -- # This file was specified with -dlopen. -- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $arg" -- prev= -- continue -- else -- # If libtool objects are unsupported, then we need to preload. -- prev=dlprefiles -- fi -- fi -+ -pie | -fpie | -fPIE) -+ func_append pie_flag " $arg" -+ continue -+ ;; - -- if test "$prev" = dlprefiles; then -- # Preload the old-style object. -- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` -- prev= -- else -- case $arg in -- *.lo) libobjs="$libobjs $arg" ;; -- *) objs="$objs $arg" ;; -- esac -- fi -+ -shared | -static | -prefer-pic | -prefer-non-pic) -+ func_append later " $arg" -+ continue -+ ;; -+ -+ -no-suppress) -+ suppress_opt=no -+ continue -+ ;; -+ -+ -Xcompiler) -+ arg_mode=arg # the next one goes into the "base_compile" arg list -+ continue # The current "srcfile" will either be retained or -+ ;; # replaced later. I would guess that would be a bug. -+ -+ -Wc,*) -+ func_stripname '-Wc,' '' "$arg" -+ args=$func_stripname_result -+ lastarg= -+ save_ifs="$IFS"; IFS=',' -+ for arg in $args; do -+ IFS="$save_ifs" -+ func_append_quoted lastarg "$arg" -+ done -+ IFS="$save_ifs" -+ func_stripname ' ' '' "$lastarg" -+ lastarg=$func_stripname_result -+ -+ # Add the arguments to base_compile. -+ func_append base_compile " $lastarg" -+ continue -+ ;; -+ -+ *) -+ # Accept the current argument as the source file. -+ # The previous "srcfile" becomes the current argument. -+ # -+ lastarg="$srcfile" -+ srcfile="$arg" -+ ;; -+ esac # case $arg - ;; -+ esac # case $arg_mode - -- *.$libext) -- # An archive. -- deplibs="$deplibs $arg" -- old_deplibs="$old_deplibs $arg" -+ # Aesthetically quote the previous argument. -+ func_append_quoted base_compile "$lastarg" -+ done # for arg -+ -+ case $arg_mode in -+ arg) -+ func_fatal_error "you must specify an argument for -Xcompile" -+ ;; -+ target) -+ func_fatal_error "you must specify a target with \`-o'" -+ ;; -+ *) -+ # Get the name of the library object. -+ test -z "$libobj" && { -+ func_basename "$srcfile" -+ libobj="$func_basename_result" -+ } -+ ;; -+ esac -+ -+ # Recognize several different file suffixes. -+ # If the user specifies -o file.o, it is replaced with file.lo -+ case $libobj in -+ *.[cCFSifmso] | \ -+ *.ada | *.adb | *.ads | *.asm | \ -+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ -+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) -+ func_xform "$libobj" -+ libobj=$func_xform_result -+ ;; -+ esac -+ -+ case $libobj in -+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; -+ *) -+ func_fatal_error "cannot determine name of library object from \`$libobj'" -+ ;; -+ esac -+ -+ func_infer_tag $base_compile -+ -+ for arg in $later; do -+ case $arg in -+ -shared) -+ test "$build_libtool_libs" != yes && \ -+ func_fatal_configuration "can not build a shared library" -+ build_old_libs=no - continue - ;; - -- *.la) -- # A libtool-controlled library. -+ -static) -+ build_libtool_libs=no -+ build_old_libs=yes -+ continue -+ ;; - -- if test "$prev" = dlfiles; then -- # This library was specified with -dlopen. -- dlfiles="$dlfiles $arg" -- prev= -- elif test "$prev" = dlprefiles; then -- # The library was specified with -dlpreopen. -- dlprefiles="$dlprefiles $arg" -- prev= -- else -- deplibs="$deplibs $arg" -- fi -+ -prefer-pic) -+ pic_mode=yes - continue - ;; - -- # Some other compiler argument. -- *) -- # Unknown arguments in both finalize_command and compile_command need -- # to be aesthetically quoted because they are evaled later. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -- ;; -- esac -+ -prefer-non-pic) -+ pic_mode=no -+ continue - ;; -- esac # arg -+ esac -+ done - -- # Now actually substitute the argument into the commands. -- if test -n "$arg"; then -- compile_command="$compile_command $arg" -- finalize_command="$finalize_command $arg" -- fi -- done # argument parsing loop -+ func_quote_for_eval "$libobj" -+ test "X$libobj" != "X$func_quote_for_eval_result" \ -+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ -+ && func_warning "libobj name \`$libobj' may not contain shell special characters." -+ func_dirname_and_basename "$obj" "/" "" -+ objname="$func_basename_result" -+ xdir="$func_dirname_result" -+ lobj=${xdir}$objdir/$objname - -- if test -n "$prev"; then -- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test -z "$base_compile" && \ -+ func_fatal_help "you must specify a compilation command" - -- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -- eval arg=\"$export_dynamic_flag_spec\" -- compile_command="$compile_command $arg" -- finalize_command="$finalize_command $arg" -+ # Delete any leftover library objects. -+ if test "$build_old_libs" = yes; then -+ removelist="$obj $lobj $libobj ${libobj}T" -+ else -+ removelist="$lobj $libobj ${libobj}T" - fi - -- # calculate the name of the file, without its directory -- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` -- libobjs_save="$libobjs" -+ # On Cygwin there's no "real" PIC flag so we must build both object types -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2* | cegcc*) -+ pic_mode=default -+ ;; -+ esac -+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then -+ # non-PIC code in shared libraries is not supported -+ pic_mode=default -+ fi - -- if test -n "$shlibpath_var"; then -- # get the directories listed in $shlibpath_var -- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` -+ # Calculate the filename of the output object if compiler does -+ # not support -o with -c -+ if test "$compiler_c_o" = no; then -+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} -+ lockfile="$output_obj.lock" - else -- shlib_search_path= -+ output_obj= -+ need_locks=no -+ lockfile= - fi -- eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - -- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$output_objdir" = "X$output"; then -- output_objdir="$objdir" -- else -- output_objdir="$output_objdir/$objdir" -- fi -- # Create the object directory. -- if test ! -d $output_objdir; then -- $show "$mkdir $output_objdir" -- $run $mkdir $output_objdir -- status=$? -- if test $status -ne 0 && test ! -d $output_objdir; then -- exit $status -- fi -- fi -+ # Lock this critical section if it is needed -+ # We use this script file to make the link, it avoids creating a new file -+ if test "$need_locks" = yes; then -+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do -+ func_echo "Waiting for $lockfile to be removed" -+ sleep 2 -+ done -+ elif test "$need_locks" = warn; then -+ if test -f "$lockfile"; then -+ $ECHO "\ -+*** ERROR, $lockfile exists and contains: -+`cat $lockfile 2>/dev/null` - -- # Determine the type of output -- case $output in -- "") -- $echo "$modename: you must specify an output file" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; -- *.$libext) linkmode=oldlib ;; -- *.lo | *.$objext) linkmode=obj ;; -- *.la) linkmode=lib ;; -- *) linkmode=prog ;; # Anything else should be a program. -- esac -+This indicates that another process is trying to use the same -+temporary object file, and libtool could not work around it because -+your compiler does not support \`-c' and \`-o' together. If you -+repeat this compilation, it may succeed, by chance, but you had better -+avoid parallel builds (make -j) in this platform, or get a better -+compiler." - -- specialdeplibs= -- libs= -- # Find all interdependent deplibs by searching for libraries -- # that are linked more than once (e.g. -la -lb -la) -- for deplib in $deplibs; do -- case "$libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- libs="$libs $deplib" -- done -- deplibs= -- newdependency_libs= -- newlib_search_path= -- need_relink=no # whether we're linking any uninstalled libtool libraries -- notinst_deplibs= # not-installed libtool libraries -- notinst_path= # paths that contain not-installed libtool libraries -- case $linkmode in -- lib) -- passes="conv link" -- for file in $dlfiles $dlprefiles; do -- case $file in -- *.la) ;; -- *) -- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 -- exit 1 -- ;; -- esac -- done -- ;; -- prog) -- compile_deplibs= -- finalize_deplibs= -- alldeplibs=no -- newdlfiles= -- newdlprefiles= -- passes="conv scan dlopen dlpreopen link" -- ;; -- *) passes="conv" -- ;; -- esac -- for pass in $passes; do -- if test $linkmode = prog; then -- # Determine which files to process -- case $pass in -- dlopen) -- libs="$dlfiles" -- save_deplibs="$deplibs" # Collect dlpreopened libraries -- deplibs= -- ;; -- dlpreopen) libs="$dlprefiles" ;; -- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; -- esac -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE - fi -- for deplib in $libs; do -- lib= -- found=no -- case $deplib in -- -l*) -- if test $linkmode = oldlib && test $linkmode = obj; then -- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 -- continue -- fi -- if test $pass = conv; then -- deplibs="$deplib $deplibs" -- continue -- fi -- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` -- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do -- # Search the libtool library -- lib="$searchdir/lib${name}.la" -- if test -f "$lib"; then -- found=yes -- break -- fi -- done -- if test "$found" != yes; then -- # deplib doesn't seem to be a libtool library -- if test "$linkmode,$pass" = "prog,link"; then -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- else -- deplibs="$deplib $deplibs" -- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" -- fi -- continue -- fi -- ;; # -l -- -L*) -- case $linkmode in -- lib) -- deplibs="$deplib $deplibs" -- test $pass = conv && continue -- newdependency_libs="$deplib $newdependency_libs" -- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` -- ;; -- prog) -- if test $pass = conv; then -- deplibs="$deplib $deplibs" -- continue -- fi -- if test $pass = scan; then -- deplibs="$deplib $deplibs" -- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` -- else -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- fi -- ;; -- *) -- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 -- ;; -- esac # linkmode -- continue -- ;; # -L -- -R*) -- if test $pass = link; then -- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` -- # Make sure the xrpath contains only unique directories. -- case "$xrpath " in -- *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -- esac -- fi -- deplibs="$deplib $deplibs" -- continue -- ;; -- *.la) lib="$deplib" ;; -- *.$libext) -- if test $pass = conv; then -- deplibs="$deplib $deplibs" -- continue -- fi -- case $linkmode in -- lib) -- if test "$deplibs_check_method" != pass_all; then -- echo -- echo "*** Warning: This library needs some functionality provided by $deplib." -- echo "*** I have the capability to make that library automatically link in when" -- echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -- else -- echo -- echo "*** Warning: Linking the shared library $output against the" -- echo "*** static library $deplib is not portable!" -- deplibs="$deplib $deplibs" -- fi -- continue -- ;; -- prog) -- if test $pass != link; then -- deplibs="$deplib $deplibs" -- else -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- fi -- continue -- ;; -- esac # linkmode -- ;; # *.$libext -- *.lo | *.$objext) -- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -- # If there is no dlopen support or we're linking statically, -- # we need to preload. -- newdlprefiles="$newdlprefiles $deplib" -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- else -- newdlfiles="$newdlfiles $deplib" -- fi -- continue -- ;; -- %DEPLIBS%) -- alldeplibs=yes -- continue -- ;; -- esac # case $deplib -- if test $found = yes || test -f "$lib"; then : -- else -- $echo "$modename: cannot find the library \`$lib'" 1>&2 -- exit 1 -- fi -+ func_append removelist " $output_obj" -+ $ECHO "$srcfile" > "$lockfile" -+ fi - -- # Check to see that this really is a libtool archive. -- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -- else -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -+ $opt_dry_run || $RM $removelist -+ func_append removelist " $lockfile" -+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 -+ -+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 -+ srcfile=$func_to_tool_file_result -+ func_quote_for_eval "$srcfile" -+ qsrcfile=$func_quote_for_eval_result - -- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -- test "X$ladir" = "X$lib" && ladir="." -+ # Only build a PIC object if we are building libtool libraries. -+ if test "$build_libtool_libs" = yes; then -+ # Without this assignment, base_compile gets emptied. -+ fbsd_hideous_sh_bug=$base_compile - -- dlname= -- dlopen= -- dlpreopen= -- libdir= -- library_names= -- old_library= -- # If the library was installed with an old release of libtool, -- # it will not redefine variable installed. -- installed=yes -+ if test "$pic_mode" != no; then -+ command="$base_compile $qsrcfile $pic_flag" -+ else -+ # Don't build PIC code -+ command="$base_compile $qsrcfile" -+ fi - -- # Read the .la file -- case $lib in -- */* | *\\*) . $lib ;; -- *) . ./$lib ;; -- esac -+ func_mkdir_p "$xdir$objdir" - -- if test "$linkmode,$pass" = "lib,link" || -- test "$linkmode,$pass" = "prog,scan" || -- { test $linkmode = oldlib && test $linkmode = obj; }; then -- # Add dl[pre]opened files of deplib -- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" -- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" -- fi -+ if test -z "$output_obj"; then -+ # Place PIC objects in $objdir -+ func_append command " -o $lobj" -+ fi - -- if test $pass = conv; then -- # Only check for convenience libraries -- deplibs="$lib $deplibs" -- if test -z "$libdir"; then -- if test -z "$old_library"; then -- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -- fi -- # It is a libtool convenience library, so add in its objects. -- convenience="$convenience $ladir/$objdir/$old_library" -- old_convenience="$old_convenience $ladir/$objdir/$old_library" -- tmp_libs= -- for deplib in $dependency_libs; do -- deplibs="$deplib $deplibs" -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- tmp_libs="$tmp_libs $deplib" -- done -- elif test $linkmode != prog && test $linkmode != lib; then -- $echo "$modename: \`$lib' is not a convenience library" 1>&2 -- exit 1 -- fi -- continue -- fi # $pass = conv -+ func_show_eval_locale "$command" \ -+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - -- # Get the name of the library we link against. -- linklib= -- for l in $old_library $library_names; do -- linklib="$l" -- done -- if test -z "$linklib"; then -- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -- fi -+ if test "$need_locks" = warn && -+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then -+ $ECHO "\ -+*** ERROR, $lockfile contains: -+`cat $lockfile 2>/dev/null` - -- # This library was specified with -dlopen. -- if test $pass = dlopen; then -- if test -z "$libdir"; then -- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 -- exit 1 -- fi -- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -- # If there is no dlname, no dlopen support or we're linking -- # statically, we need to preload. -- dlprefiles="$dlprefiles $lib" -- else -- newdlfiles="$newdlfiles $lib" -- fi -- continue -- fi # $pass = dlopen -+but it should contain: -+$srcfile - -- # We need an absolute path. -- case $ladir in -- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; -- *) -- abs_ladir=`cd "$ladir" && pwd` -- if test -z "$abs_ladir"; then -- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 -- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 -- abs_ladir="$ladir" -- fi -- ;; -- esac -- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -+This indicates that another process is trying to use the same -+temporary object file, and libtool could not work around it because -+your compiler does not support \`-c' and \`-o' together. If you -+repeat this compilation, it may succeed, by chance, but you had better -+avoid parallel builds (make -j) in this platform, or get a better -+compiler." - -- # Find the relevant object directory and library name. -- if test "X$installed" = Xyes; then -- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -- $echo "$modename: warning: library \`$lib' was moved." 1>&2 -- dir="$ladir" -- absdir="$abs_ladir" -- libdir="$abs_ladir" -- else -- dir="$libdir" -- absdir="$libdir" -- fi -- else -- dir="$ladir/$objdir" -- absdir="$abs_ladir/$objdir" -- # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -- fi # $installed = yes -- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE -+ fi - -- # This library was specified with -dlpreopen. -- if test $pass = dlpreopen; then -- if test -z "$libdir"; then -- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 -- exit 1 -- fi -- # Prefer using a static library (so that no silly _DYNAMIC symbols -- # are required to link). -- if test -n "$old_library"; then -- newdlprefiles="$newdlprefiles $dir/$old_library" -- # Otherwise, use the dlname, so that lt_dlopen finds it. -- elif test -n "$dlname"; then -- newdlprefiles="$newdlprefiles $dir/$dlname" -- else -- newdlprefiles="$newdlprefiles $dir/$linklib" -- fi -- fi # $pass = dlpreopen -+ # Just move the object if needed, then go on to compile the next one -+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then -+ func_show_eval '$MV "$output_obj" "$lobj"' \ -+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' -+ fi - -- if test -z "$libdir"; then -- # Link the convenience library -- if test $linkmode = lib; then -- deplibs="$dir/$old_library $deplibs" -- elif test "$linkmode,$pass" = "prog,link"; then -- compile_deplibs="$dir/$old_library $compile_deplibs" -- finalize_deplibs="$dir/$old_library $finalize_deplibs" -- else -- deplibs="$lib $deplibs" -- fi -- continue -- fi -+ # Allow error messages only from the first compilation. -+ if test "$suppress_opt" = yes; then -+ suppress_output=' >/dev/null 2>&1' -+ fi -+ fi - -- if test $linkmode = prog && test $pass != link; then -- newlib_search_path="$newlib_search_path $ladir" -- deplibs="$lib $deplibs" -+ # Only build a position-dependent object if we build old libraries. -+ if test "$build_old_libs" = yes; then -+ if test "$pic_mode" != yes; then -+ # Don't build PIC code -+ command="$base_compile $qsrcfile$pie_flag" -+ else -+ command="$base_compile $qsrcfile $pic_flag" -+ fi -+ if test "$compiler_c_o" = yes; then -+ func_append command " -o $obj" -+ fi - -- linkalldeplibs=no -- if test "$link_all_deplibs" != no || test -z "$library_names" || -- test "$build_libtool_libs" = no; then -- linkalldeplibs=yes -- fi -+ # Suppress compiler output if we already did a PIC compilation. -+ func_append command "$suppress_output" -+ func_show_eval_locale "$command" \ -+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - -- tmp_libs= -- for deplib in $dependency_libs; do -- case $deplib in -- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test -- esac -- # Need to link against all dependency_libs? -- if test $linkalldeplibs = yes; then -- deplibs="$deplib $deplibs" -- else -- # Need to hardcode shared library paths -- # or/and link against static libraries -- newdependency_libs="$deplib $newdependency_libs" -- fi -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- tmp_libs="$tmp_libs $deplib" -- done # for deplib -- continue -- fi # $linkmode = prog... -+ if test "$need_locks" = warn && -+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then -+ $ECHO "\ -+*** ERROR, $lockfile contains: -+`cat $lockfile 2>/dev/null` - -- link_static=no # Whether the deplib will be linked statically -- if test -n "$library_names" && -- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -- # Link against this shared library -+but it should contain: -+$srcfile - -- if test "$linkmode,$pass" = "prog,link" || -- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then -- # Hardcode the library path. -- # Skip directories that are in the system default run-time -- # search path. -- case " $sys_lib_dlsearch_path " in -- *" $absdir "*) ;; -- *) -- case "$compile_rpath " in -- *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -- esac -- ;; -- esac -- case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -- *) -- case "$finalize_rpath " in -- *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -- esac -- ;; -- esac -- if test $linkmode = prog; then -- # We need to hardcode the library path -- if test -n "$shlibpath_var"; then -- # Make sure the rpath contains only unique directories. -- case "$temp_rpath " in -- *" $dir "*) ;; -- *" $absdir "*) ;; -- *) temp_rpath="$temp_rpath $dir" ;; -- esac -- fi -- fi -- fi # $linkmode,$pass = prog,link... -+This indicates that another process is trying to use the same -+temporary object file, and libtool could not work around it because -+your compiler does not support \`-c' and \`-o' together. If you -+repeat this compilation, it may succeed, by chance, but you had better -+avoid parallel builds (make -j) in this platform, or get a better -+compiler." - -- if test "$alldeplibs" = yes && -- { test "$deplibs_check_method" = pass_all || -- { test "$build_libtool_libs" = yes && -- test -n "$library_names"; }; }; then -- # We only need to search for static libraries -- continue -- fi -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE -+ fi - -- if test "$installed" = no; then -- notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -- fi -+ # Just move the object if needed -+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then -+ func_show_eval '$MV "$output_obj" "$obj"' \ -+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' -+ fi -+ fi - -- if test -n "$old_archive_from_expsyms_cmds"; then -- # figure out the soname -- set dummy $library_names -- realname="$2" -- shift; shift -- libname=`eval \\$echo \"$libname_spec\"` -- # use dlname if we got it. it's perfectly good, no? -- if test -n "$dlname"; then -- soname="$dlname" -- elif test -n "$soname_spec"; then -- # bleh windows -- case $host in -- *cygwin*) -- major=`expr $current - $age` -- versuffix="-$major" -- ;; -- esac -- eval soname=\"$soname_spec\" -- else -- soname="$realname" -- fi -+ $opt_dry_run || { -+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - -- # Make a new name for the extract_expsyms_cmds to use -- soroot="$soname" -- soname=`echo $soroot | sed -e 's/^.*\///'` -- newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" -+ # Unlock the critical section if it was locked -+ if test "$need_locks" != no; then -+ removelist=$lockfile -+ $RM "$lockfile" -+ fi -+ } - -- # If the library has no export list, then create one now -- if test -f "$output_objdir/$soname-def"; then : -- else -- $show "extracting exported symbol list from \`$soname'" -- save_ifs="$IFS"; IFS='~' -- eval cmds=\"$extract_expsyms_cmds\" -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- fi -+ exit $EXIT_SUCCESS -+} - -- # Create $newlib -- if test -f "$output_objdir/$newlib"; then :; else -- $show "generating import library for \`$soname'" -- save_ifs="$IFS"; IFS='~' -- eval cmds=\"$old_archive_from_expsyms_cmds\" -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- fi -- # make sure the library variables are pointing to the new library -- dir=$output_objdir -- linklib=$newlib -- fi # test -n $old_archive_from_expsyms_cmds -+$opt_help || { -+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -+} - -- if test $linkmode = prog || test "$mode" != relink; then -- add_shlibpath= -- add_dir= -- add= -- lib_linked=yes -- case $hardcode_action in -- immediate | unsupported) -- if test "$hardcode_direct" = no; then -- add="$dir/$linklib" -- elif test "$hardcode_minus_L" = no; then -- case $host in -- *-*-sunos*) add_shlibpath="$dir" ;; -- esac -- add_dir="-L$dir" -- add="-l$name" -- elif test "$hardcode_shlibpath_var" = no; then -- add_shlibpath="$dir" -- add="-l$name" -- else -- lib_linked=no -- fi -- ;; -- relink) -- if test "$hardcode_direct" = yes; then -- add="$dir/$linklib" -- elif test "$hardcode_minus_L" = yes; then -- add_dir="-L$dir" -- add="-l$name" -- elif test "$hardcode_shlibpath_var" = yes; then -- add_shlibpath="$dir" -- add="-l$name" -- else -- lib_linked=no -- fi -- ;; -- *) lib_linked=no ;; -- esac -+func_mode_help () -+{ -+ # We need to display help for each of the modes. -+ case $opt_mode in -+ "") -+ # Generic help is extracted from the usage comments -+ # at the start of this file. -+ func_help -+ ;; -+ -+ clean) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -- if test "$lib_linked" != yes; then -- $echo "$modename: configuration error: unsupported hardcode properties" -- exit 1 -- fi -+Remove files from the build directory. - -- if test -n "$add_shlibpath"; then -- case :$compile_shlibpath: in -- *":$add_shlibpath:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; -- esac -- fi -- if test $linkmode = prog; then -- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" -- test -n "$add" && compile_deplibs="$add $compile_deplibs" -- else -- test -n "$add_dir" && deplibs="$add_dir $deplibs" -- test -n "$add" && deplibs="$add $deplibs" -- if test "$hardcode_direct" != yes && \ -- test "$hardcode_minus_L" != yes && \ -- test "$hardcode_shlibpath_var" = yes; then -- case :$finalize_shlibpath: in -- *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -- esac -- fi -- fi -- fi -+RM is the name of the program to use to delete files associated with each FILE -+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -+to RM. - -- if test $linkmode = prog || test "$mode" = relink; then -- add_shlibpath= -- add_dir= -- add= -- # Finalize command for both is simple: just hardcode it. -- if test "$hardcode_direct" = yes; then -- add="$libdir/$linklib" -- elif test "$hardcode_minus_L" = yes; then -- add_dir="-L$libdir" -- add="-l$name" -- elif test "$hardcode_shlibpath_var" = yes; then -- case :$finalize_shlibpath: in -- *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -- esac -- add="-l$name" -- else -- # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" -- add="-l$name" -- fi -+If FILE is a libtool library, object or program, all the files associated -+with it are deleted. Otherwise, only FILE itself is deleted using RM." -+ ;; - -- if test $linkmode = prog; then -- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" -- test -n "$add" && finalize_deplibs="$add $finalize_deplibs" -- else -- test -n "$add_dir" && deplibs="$add_dir $deplibs" -- test -n "$add" && deplibs="$add $deplibs" -- fi -- fi -- elif test $linkmode = prog; then -- if test "$alldeplibs" = yes && -- { test "$deplibs_check_method" = pass_all || -- { test "$build_libtool_libs" = yes && -- test -n "$library_names"; }; }; then -- # We only need to search for static libraries -- continue -- fi -+ compile) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -- # Try to link the static library -- # Here we assume that one of hardcode_direct or hardcode_minus_L -- # is not unsupported. This is valid on all known static and -- # shared platforms. -- if test "$hardcode_direct" != unsupported; then -- test -n "$old_library" && linklib="$old_library" -- compile_deplibs="$dir/$linklib $compile_deplibs" -- finalize_deplibs="$dir/$linklib $finalize_deplibs" -- else -- compile_deplibs="-l$name -L$dir $compile_deplibs" -- finalize_deplibs="-l$name -L$dir $finalize_deplibs" -- fi -- elif test "$build_libtool_libs" = yes; then -- # Not a shared library -- if test "$deplibs_check_method" != pass_all; then -- # We're trying link a shared library against a static one -- # but the system doesn't support it. -+Compile a source file into a libtool library object. - -- # Just print a warning and add the library to dependency_libs so -- # that the program can be linked against the static library. -- echo -- echo "*** Warning: This library needs some functionality provided by $lib." -- echo "*** I have the capability to make that library automatically link in when" -- echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -- if test "$module" = yes; then -- echo "*** Therefore, libtool will create a static module, that should work " -- echo "*** as long as the dlopening application is linked with the -dlopen flag." -- if test -z "$global_symbol_pipe"; then -- echo -- echo "*** However, this would only work if libtool was able to extract symbol" -- echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -- echo "*** not find such a program. So, this module is probably useless." -- echo "*** \`nm' from GNU binutils and a full rebuild may help." -- fi -- if test "$build_old_libs" = no; then -- build_libtool_libs=module -- build_old_libs=yes -- else -- build_libtool_libs=no -- fi -- fi -- else -- convenience="$convenience $dir/$old_library" -- old_convenience="$old_convenience $dir/$old_library" -- deplibs="$dir/$old_library $deplibs" -- link_static=yes -- fi -- fi # link shared/static library? -+This mode accepts the following additional options: - -- if test $linkmode = lib; then -- if test -n "$dependency_libs" && -- { test $hardcode_into_libs != yes || test $build_old_libs = yes || -- test $link_static = yes; }; then -- # Extract -R from dependency_libs -- temp_deplibs= -- for libdir in $dependency_libs; do -- case $libdir in -- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` -- case " $xrpath " in -- *" $temp_xrpath "*) ;; -- *) xrpath="$xrpath $temp_xrpath";; -- esac;; -- *) temp_deplibs="$temp_deplibs $libdir";; -- esac -- done -- dependency_libs="$temp_deplibs" -- fi -+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE -+ -no-suppress do not suppress compiler output for multiple passes -+ -prefer-pic try to build PIC objects only -+ -prefer-non-pic try to build non-PIC objects only -+ -shared do not build a \`.o' file suitable for static linking -+ -static only build a \`.o' file suitable for static linking -+ -Wc,FLAG pass FLAG directly to the compiler - -- newlib_search_path="$newlib_search_path $absdir" -- # Link against this library -- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" -- # ... and its dependency_libs -- tmp_libs= -- for deplib in $dependency_libs; do -- newdependency_libs="$deplib $newdependency_libs" -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- tmp_libs="$tmp_libs $deplib" -- done -+COMPILE-COMMAND is a command to be used in creating a \`standard' object file -+from the given SOURCEFILE. - -- if test $link_all_deplibs != no; then -- # Add the search paths of all dependency libraries -- for deplib in $dependency_libs; do -- case $deplib in -- -L*) path="$deplib" ;; -- *.la) -- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$deplib" && dir="." -- # We need an absolute path. -- case $dir in -- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -- *) -- absdir=`cd "$dir" && pwd` -- if test -z "$absdir"; then -- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 -- absdir="$dir" -- fi -- ;; -- esac -- if grep "^installed=no" $deplib > /dev/null; then -- path="-L$absdir/$objdir" -- else -- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -- if test -z "$libdir"; then -- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -- if test "$absdir" != "$libdir"; then -- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -- fi -- path="-L$absdir" -- fi -- ;; -- *) continue ;; -- esac -- case " $deplibs " in -- *" $path "*) ;; -- *) deplibs="$deplibs $path" ;; -- esac -- done -- fi # link_all_deplibs != no -- fi # linkmode = lib -- done # for deplib in $libs -- if test $pass = dlpreopen; then -- # Link the dlpreopened libraries before other libraries -- for deplib in $save_deplibs; do -- deplibs="$deplib $deplibs" -- done -- fi -- if test $pass != dlopen; then -- test $pass != scan && dependency_libs="$newdependency_libs" -- if test $pass != conv; then -- # Make sure lib_search_path contains only unique directories. -- lib_search_path= -- for dir in $newlib_search_path; do -- case "$lib_search_path " in -- *" $dir "*) ;; -- *) lib_search_path="$lib_search_path $dir" ;; -- esac -- done -- newlib_search_path= -+The output file name is determined by removing the directory component from -+SOURCEFILE, then substituting the C source code suffix \`.c' with the -+library object suffix, \`.lo'." -+ ;; -+ -+ execute) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... -+ -+Automatically set library path, then run a program. -+ -+This mode accepts the following additional options: -+ -+ -dlopen FILE add the directory containing FILE to the library path -+ -+This mode sets the library path environment variable according to \`-dlopen' -+flags. -+ -+If any of the ARGS are libtool executable wrappers, then they are translated -+into their corresponding uninstalled binary, and any of their required library -+directories are added to the library path. -+ -+Then, COMMAND is executed, with ARGS as arguments." -+ ;; -+ -+ finish) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... -+ -+Complete the installation of libtool libraries. -+ -+Each LIBDIR is a directory that contains libtool libraries. -+ -+The commands that this mode executes may require superuser privileges. Use -+the \`--dry-run' option if you just want to see what would be executed." -+ ;; -+ -+ install) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... -+ -+Install executables or libraries. -+ -+INSTALL-COMMAND is the installation command. The first component should be -+either the \`install' or \`cp' program. -+ -+The following components of INSTALL-COMMAND are treated specially: -+ -+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation -+ -+The rest of the components are interpreted as arguments to that command (only -+BSD-compatible install options are recognized)." -+ ;; -+ -+ link) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... -+ -+Link object files or libraries together to form another library, or to -+create an executable program. -+ -+LINK-COMMAND is a command using the C compiler that you would use to create -+a program from several object files. -+ -+The following components of LINK-COMMAND are treated specially: -+ -+ -all-static do not do any dynamic linking at all -+ -avoid-version do not add a version suffix if possible -+ -bindir BINDIR specify path to binaries directory (for systems where -+ libraries must be found in the PATH setting at runtime) -+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -+ -export-symbols SYMFILE -+ try to export only the symbols listed in SYMFILE -+ -export-symbols-regex REGEX -+ try to export only the symbols matching REGEX -+ -LLIBDIR search LIBDIR for required installed libraries -+ -lNAME OUTPUT-FILE requires the installed library libNAME -+ -module build a library that can dlopened -+ -no-fast-install disable the fast-install mode -+ -no-install link a not-installable executable -+ -no-undefined declare that a library does not refer to external symbols -+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -+ -objectlist FILE Use a list of object files found in FILE to specify objects -+ -precious-files-regex REGEX -+ don't remove output files matching REGEX -+ -release RELEASE specify package release information -+ -rpath LIBDIR the created library will eventually be installed in LIBDIR -+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -+ -shared only do dynamic linking of libtool libraries -+ -shrext SUFFIX override the standard shared library file extension -+ -static do not do any dynamic linking of uninstalled libtool libraries -+ -static-libtool-libs -+ do not do any dynamic linking of libtool libraries -+ -version-info CURRENT[:REVISION[:AGE]] -+ specify library version info [each variable defaults to 0] -+ -weak LIBNAME declare that the target provides the LIBNAME interface -+ -Wc,FLAG -+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -+ -Wl,FLAG -+ -Xlinker FLAG pass linker-specific FLAG directly to the linker -+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -+ -+All other options (arguments beginning with \`-') are ignored. -+ -+Every other argument is treated as a filename. Files ending in \`.la' are -+treated as uninstalled libtool libraries, other files are standard or library -+object files. -+ -+If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -+only library objects (\`.lo' files) may be specified, and \`-rpath' is -+required, except when creating a convenience library. -+ -+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -+using \`ar' and \`ranlib', or on Windows using \`lib'. -+ -+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -+is created, otherwise an executable program is created." -+ ;; -+ -+ uninstall) -+ $ECHO \ -+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... -+ -+Remove libraries from an installation directory. -+ -+RM is the name of the program to use to delete files associated with each FILE -+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -+to RM. -+ -+If FILE is a libtool library, all the files associated with it are deleted. -+Otherwise, only FILE itself is deleted using RM." -+ ;; -+ -+ *) -+ func_fatal_help "invalid operation mode \`$opt_mode'" -+ ;; -+ esac -+ -+ echo -+ $ECHO "Try \`$progname --help' for more information about other modes." -+} -+ -+# Now that we've collected a possible --mode arg, show help if necessary -+if $opt_help; then -+ if test "$opt_help" = :; then -+ func_mode_help -+ else -+ { -+ func_help noexit -+ for opt_mode in compile link execute install finish uninstall clean; do -+ func_mode_help -+ done -+ } | sed -n '1p; 2,$s/^Usage:/ or: /p' -+ { -+ func_help noexit -+ for opt_mode in compile link execute install finish uninstall clean; do -+ echo -+ func_mode_help -+ done -+ } | -+ sed '1d -+ /^When reporting/,/^Report/{ -+ H -+ d -+ } -+ $x -+ /information about other modes/d -+ /more detailed .*MODE/d -+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' -+ fi -+ exit $? -+fi -+ -+ -+# func_mode_execute arg... -+func_mode_execute () -+{ -+ $opt_debug -+ # The first argument is the command name. -+ cmd="$nonopt" -+ test -z "$cmd" && \ -+ func_fatal_help "you must specify a COMMAND" -+ -+ # Handle -dlopen flags immediately. -+ for file in $opt_dlopen; do -+ test -f "$file" \ -+ || func_fatal_help "\`$file' is not a file" -+ -+ dir= -+ case $file in -+ *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ -+ # Check to see that this really is a libtool archive. -+ func_lalib_unsafe_p "$file" \ -+ || func_fatal_help "\`$lib' is not a valid libtool archive" -+ -+ # Read the libtool library. -+ dlname= -+ library_names= -+ func_source "$file" -+ -+ # Skip this library if it cannot be dlopened. -+ if test -z "$dlname"; then -+ # Warn if it was a shared library. -+ test -n "$library_names" && \ -+ func_warning "\`$file' was not linked with \`-export-dynamic'" -+ continue - fi - -- if test "$linkmode,$pass" != "prog,link"; then -- vars="deplibs" -+ func_dirname "$file" "" "." -+ dir="$func_dirname_result" -+ -+ if test -f "$dir/$objdir/$dlname"; then -+ func_append dir "/$objdir" - else -- vars="compile_deplibs finalize_deplibs" -+ if test ! -f "$dir/$dlname"; then -+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" -+ fi - fi -- for var in $vars dependency_libs; do -- # Add libraries to $var in reverse order -- eval tmp_libs=\"\$$var\" -- new_libs= -- for deplib in $tmp_libs; do -- case $deplib in -- -L*) new_libs="$deplib $new_libs" ;; -- *) -- case " $specialdeplibs " in -- *" $deplib "*) new_libs="$deplib $new_libs" ;; -- *) -- case " $new_libs " in -- *" $deplib "*) ;; -- *) new_libs="$deplib $new_libs" ;; -- esac -- ;; -- esac -- ;; -- esac -- done -- tmp_libs= -- for deplib in $new_libs; do -- case $deplib in -- -L*) -- case " $tmp_libs " in -- *" $deplib "*) ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -- esac -- ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -- esac -- done -- eval $var=\"$tmp_libs\" -- done # for var -- fi -- if test "$pass" = "conv" && -- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then -- libs="$deplibs" # reset libs -- deplibs= -- fi -- done # for pass -- if test $linkmode = prog; then -- dlfiles="$newdlfiles" -- dlprefiles="$newdlprefiles" -- fi -+ ;; - -- case $linkmode in -- oldlib) -- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 -- fi -+ *.lo) -+ # Just add the directory containing the .lo file. -+ func_dirname "$file" "" "." -+ dir="$func_dirname_result" -+ ;; -+ -+ *) -+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" -+ continue -+ ;; -+ esac -+ -+ # Get the absolute pathname. -+ absdir=`cd "$dir" && pwd` -+ test -n "$absdir" && dir="$absdir" -+ -+ # Now add the directory to shlibpath_var. -+ if eval "test -z \"\$$shlibpath_var\""; then -+ eval "$shlibpath_var=\"\$dir\"" -+ else -+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" -+ fi -+ done -+ -+ # This variable tells wrapper scripts just to set shlibpath_var -+ # rather than running their programs. -+ libtool_execute_magic="$magic" -+ -+ # Check if any of the arguments is a wrapper script. -+ args= -+ for file -+ do -+ case $file in -+ -* | *.la | *.lo ) ;; -+ *) -+ # Do a test to see if this is really a libtool program. -+ if func_ltwrapper_script_p "$file"; then -+ func_source "$file" -+ # Transform arg to wrapped name. -+ file="$progdir/$program" -+ elif func_ltwrapper_executable_p "$file"; then -+ func_ltwrapper_scriptname "$file" -+ func_source "$func_ltwrapper_scriptname_result" -+ # Transform arg to wrapped name. -+ file="$progdir/$program" -+ fi -+ ;; -+ esac -+ # Quote arguments (to preserve shell metacharacters). -+ func_append_quoted args "$file" -+ done -+ -+ if test "X$opt_dry_run" = Xfalse; then -+ if test -n "$shlibpath_var"; then -+ # Export the shlibpath_var. -+ eval "export $shlibpath_var" -+ fi -+ -+ # Restore saved environment variables -+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -+ do -+ eval "if test \"\${save_$lt_var+set}\" = set; then -+ $lt_var=\$save_$lt_var; export $lt_var -+ else -+ $lt_unset $lt_var -+ fi" -+ done -+ -+ # Now prepare to actually exec the command. -+ exec_cmd="\$cmd$args" -+ else -+ # Display what would be done. -+ if test -n "$shlibpath_var"; then -+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" -+ echo "export $shlibpath_var" -+ fi -+ $ECHO "$cmd$args" -+ exit $EXIT_SUCCESS -+ fi -+} -+ -+test "$opt_mode" = execute && func_mode_execute ${1+"$@"} -+ -+ -+# func_mode_finish arg... -+func_mode_finish () -+{ -+ $opt_debug -+ libs= -+ libdirs= -+ admincmds= -+ -+ for opt in "$nonopt" ${1+"$@"} -+ do -+ if test -d "$opt"; then -+ func_append libdirs " $opt" -+ -+ elif test -f "$opt"; then -+ if func_lalib_unsafe_p "$opt"; then -+ func_append libs " $opt" -+ else -+ func_warning "\`$opt' is not a valid libtool archive" -+ fi -+ -+ else -+ func_fatal_error "invalid argument \`$opt'" -+ fi -+ done -+ -+ if test -n "$libs"; then -+ if test -n "$lt_sysroot"; then -+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` -+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" -+ else -+ sysroot_cmd= -+ fi -+ -+ # Remove sysroot references -+ if $opt_dry_run; then -+ for lib in $libs; do -+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" -+ done -+ else -+ tmpdir=`func_mktempdir` -+ for lib in $libs; do -+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ -+ > $tmpdir/tmp-la -+ mv -f $tmpdir/tmp-la $lib -+ done -+ ${RM}r "$tmpdir" -+ fi -+ fi -+ -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -+ for libdir in $libdirs; do -+ if test -n "$finish_cmds"; then -+ # Do each command in the finish commands. -+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -+'"$cmd"'"' -+ fi -+ if test -n "$finish_eval"; then -+ # Do the single finish_eval. -+ eval cmds=\"$finish_eval\" -+ $opt_dry_run || eval "$cmds" || func_append admincmds " -+ $cmds" -+ fi -+ done -+ fi -+ -+ # Exit here if they wanted silent mode. -+ $opt_silent && exit $EXIT_SUCCESS -+ -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -+ echo "----------------------------------------------------------------------" -+ echo "Libraries have been installed in:" -+ for libdir in $libdirs; do -+ $ECHO " $libdir" -+ done -+ echo -+ echo "If you ever happen to want to link against installed libraries" -+ echo "in a given directory, LIBDIR, you must either use libtool, and" -+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -+ echo "flag during linking and do at least one of the following:" -+ if test -n "$shlibpath_var"; then -+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -+ echo " during execution" -+ fi -+ if test -n "$runpath_var"; then -+ echo " - add LIBDIR to the \`$runpath_var' environment variable" -+ echo " during linking" -+ fi -+ if test -n "$hardcode_libdir_flag_spec"; then -+ libdir=LIBDIR -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ -+ $ECHO " - use the \`$flag' linker flag" -+ fi -+ if test -n "$admincmds"; then -+ $ECHO " - have your system administrator run these commands:$admincmds" -+ fi -+ if test -f /etc/ld.so.conf; then -+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -+ fi -+ echo -+ -+ echo "See any operating system documentation about shared libraries for" -+ case $host in -+ solaris2.[6789]|solaris2.1[0-9]) -+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -+ echo "pages." -+ ;; -+ *) -+ echo "more information, such as the ld(1) and ld.so(8) manual pages." -+ ;; -+ esac -+ echo "----------------------------------------------------------------------" -+ fi -+ exit $EXIT_SUCCESS -+} -+ -+test "$opt_mode" = finish && func_mode_finish ${1+"$@"} -+ -+ -+# func_mode_install arg... -+func_mode_install () -+{ -+ $opt_debug -+ # There may be an optional sh(1) argument at the beginning of -+ # install_prog (especially on Windows NT). -+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || -+ # Allow the use of GNU shtool's install command. -+ case $nonopt in *shtool*) :;; *) false;; esac; then -+ # Aesthetically quote it. -+ func_quote_for_eval "$nonopt" -+ install_prog="$func_quote_for_eval_result " -+ arg=$1 -+ shift -+ else -+ install_prog= -+ arg=$nonopt -+ fi -+ -+ # The real first argument should be the name of the installation program. -+ # Aesthetically quote it. -+ func_quote_for_eval "$arg" -+ func_append install_prog "$func_quote_for_eval_result" -+ install_shared_prog=$install_prog -+ case " $install_prog " in -+ *[\\\ /]cp\ *) install_cp=: ;; -+ *) install_cp=false ;; -+ esac -+ -+ # We need to accept at least all the BSD install flags. -+ dest= -+ files= -+ opts= -+ prev= -+ install_type= -+ isdir=no -+ stripme= -+ no_mode=: -+ for arg -+ do -+ arg2= -+ if test -n "$dest"; then -+ func_append files " $dest" -+ dest=$arg -+ continue -+ fi -+ -+ case $arg in -+ -d) isdir=yes ;; -+ -f) -+ if $install_cp; then :; else -+ prev=$arg -+ fi -+ ;; -+ -g | -m | -o) -+ prev=$arg -+ ;; -+ -s) -+ stripme=" -s" -+ continue -+ ;; -+ -*) -+ ;; -+ *) -+ # If the previous option needed an argument, then skip it. -+ if test -n "$prev"; then -+ if test "x$prev" = x-m && test -n "$install_override_mode"; then -+ arg2=$install_override_mode -+ no_mode=false -+ fi -+ prev= -+ else -+ dest=$arg -+ continue -+ fi -+ ;; -+ esac -+ -+ # Aesthetically quote the argument. -+ func_quote_for_eval "$arg" -+ func_append install_prog " $func_quote_for_eval_result" -+ if test -n "$arg2"; then -+ func_quote_for_eval "$arg2" -+ fi -+ func_append install_shared_prog " $func_quote_for_eval_result" -+ done -+ -+ test -z "$install_prog" && \ -+ func_fatal_help "you must specify an install program" -+ -+ test -n "$prev" && \ -+ func_fatal_help "the \`$prev' option requires an argument" -+ -+ if test -n "$install_override_mode" && $no_mode; then -+ if $install_cp; then :; else -+ func_quote_for_eval "$install_override_mode" -+ func_append install_shared_prog " -m $func_quote_for_eval_result" -+ fi -+ fi -+ -+ if test -z "$files"; then -+ if test -z "$dest"; then -+ func_fatal_help "no file or destination specified" -+ else -+ func_fatal_help "you must specify a destination" -+ fi -+ fi -+ -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$dest" -+ dest=$func_stripname_result -+ -+ # Check to see that the destination is a directory. -+ test -d "$dest" && isdir=yes -+ if test "$isdir" = yes; then -+ destdir="$dest" -+ destname= -+ else -+ func_dirname_and_basename "$dest" "" "." -+ destdir="$func_dirname_result" -+ destname="$func_basename_result" -+ -+ # Not a directory, so check to see that there is only one file specified. -+ set dummy $files; shift -+ test "$#" -gt 1 && \ -+ func_fatal_help "\`$dest' is not a directory" -+ fi -+ case $destdir in -+ [\\/]* | [A-Za-z]:[\\/]*) ;; -+ *) -+ for file in $files; do -+ case $file in -+ *.lo) ;; -+ *) -+ func_fatal_help "\`$destdir' must be an absolute directory name" -+ ;; -+ esac -+ done -+ ;; -+ esac -+ -+ # This variable tells wrapper scripts just to set variables rather -+ # than running their programs. -+ libtool_install_magic="$magic" -+ -+ staticlibs= -+ future_libdirs= -+ current_libdirs= -+ for file in $files; do -+ -+ # Do each installation. -+ case $file in -+ *.$libext) -+ # Do the static libraries later. -+ func_append staticlibs " $file" -+ ;; -+ -+ *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result -+ -+ # Check to see that this really is a libtool archive. -+ func_lalib_unsafe_p "$file" \ -+ || func_fatal_help "\`$file' is not a valid libtool archive" -+ -+ library_names= -+ old_library= -+ relink_command= -+ func_source "$file" -+ -+ # Add the libdir to current_libdirs if it is the destination. -+ if test "X$destdir" = "X$libdir"; then -+ case "$current_libdirs " in -+ *" $libdir "*) ;; -+ *) func_append current_libdirs " $libdir" ;; -+ esac -+ else -+ # Note the libdir as a future libdir. -+ case "$future_libdirs " in -+ *" $libdir "*) ;; -+ *) func_append future_libdirs " $libdir" ;; -+ esac -+ fi -+ -+ func_dirname "$file" "/" "" -+ dir="$func_dirname_result" -+ func_append dir "$objdir" -+ -+ if test -n "$relink_command"; then -+ # Determine the prefix the user has applied to our future dir. -+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ -+ # Don't allow the user to place us outside of our expected -+ # location b/c this prevents finding dependent libraries that -+ # are installed to the same prefix. -+ # At present, this check doesn't affect windows .dll's that -+ # are installed into $libdir/../bin (currently, that works fine) -+ # but it's something to keep an eye on. -+ test "$inst_prefix_dir" = "$destdir" && \ -+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" -+ -+ if test -n "$inst_prefix_dir"; then -+ # Stick the inst_prefix_dir data into the link command. -+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` -+ else -+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` -+ fi -+ -+ func_warning "relinking \`$file'" -+ func_show_eval "$relink_command" \ -+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' -+ fi -+ -+ # See the names of the shared library. -+ set dummy $library_names; shift -+ if test -n "$1"; then -+ realname="$1" -+ shift -+ -+ srcname="$realname" -+ test -n "$relink_command" && srcname="$realname"T -+ -+ # Install the shared library and build the symlinks. -+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ -+ 'exit $?' -+ tstripme="$stripme" -+ case $host_os in -+ cygwin* | mingw* | pw32* | cegcc*) -+ case $realname in -+ *.dll.a) -+ tstripme="" -+ ;; -+ esac -+ ;; -+ esac -+ if test -n "$tstripme" && test -n "$striplib"; then -+ func_show_eval "$striplib $destdir/$realname" 'exit $?' -+ fi -+ -+ if test "$#" -gt 0; then -+ # Delete the old symlinks, and create new ones. -+ # Try `ln -sf' first, because the `ln' binary might depend on -+ # the symlink we replace! Solaris /bin/ln does not understand -f, -+ # so we also need to try rm && ln -s. -+ for linkname -+ do -+ test "$linkname" != "$realname" \ -+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" -+ done -+ fi -+ -+ # Do each command in the postinstall commands. -+ lib="$destdir/$realname" -+ func_execute_cmds "$postinstall_cmds" 'exit $?' -+ fi -+ -+ # Install the pseudo-library for information purposes. -+ func_basename "$file" -+ name="$func_basename_result" -+ instname="$dir/$name"i -+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' -+ -+ # Maybe install the static library, too. -+ test -n "$old_library" && func_append staticlibs " $dir/$old_library" -+ ;; -+ -+ *.lo) -+ # Install (i.e. copy) a libtool object. -+ -+ # Figure out destination file name, if it wasn't already specified. -+ if test -n "$destname"; then -+ destfile="$destdir/$destname" -+ else -+ func_basename "$file" -+ destfile="$func_basename_result" -+ destfile="$destdir/$destfile" -+ fi -+ -+ # Deduce the name of the destination old-style object file. -+ case $destfile in -+ *.lo) -+ func_lo2o "$destfile" -+ staticdest=$func_lo2o_result -+ ;; -+ *.$objext) -+ staticdest="$destfile" -+ destfile= -+ ;; -+ *) -+ func_fatal_help "cannot copy a libtool object to \`$destfile'" -+ ;; -+ esac -+ -+ # Install the libtool object if requested. -+ test -n "$destfile" && \ -+ func_show_eval "$install_prog $file $destfile" 'exit $?' -+ -+ # Install the old object if enabled. -+ if test "$build_old_libs" = yes; then -+ # Deduce the name of the old-style object file. -+ func_lo2o "$file" -+ staticobj=$func_lo2o_result -+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' -+ fi -+ exit $EXIT_SUCCESS -+ ;; -+ -+ *) -+ # Figure out destination file name, if it wasn't already specified. -+ if test -n "$destname"; then -+ destfile="$destdir/$destname" -+ else -+ func_basename "$file" -+ destfile="$func_basename_result" -+ destfile="$destdir/$destfile" -+ fi -+ -+ # If the file is missing, and there is a .exe on the end, strip it -+ # because it is most likely a libtool script we actually want to -+ # install -+ stripped_ext="" -+ case $file in -+ *.exe) -+ if test ! -f "$file"; then -+ func_stripname '' '.exe' "$file" -+ file=$func_stripname_result -+ stripped_ext=".exe" -+ fi -+ ;; -+ esac -+ -+ # Do a test to see if this is really a libtool program. -+ case $host in -+ *cygwin* | *mingw*) -+ if func_ltwrapper_executable_p "$file"; then -+ func_ltwrapper_scriptname "$file" -+ wrapper=$func_ltwrapper_scriptname_result -+ else -+ func_stripname '' '.exe' "$file" -+ wrapper=$func_stripname_result -+ fi -+ ;; -+ *) -+ wrapper=$file -+ ;; -+ esac -+ if func_ltwrapper_script_p "$wrapper"; then -+ notinst_deplibs= -+ relink_command= -+ -+ func_source "$wrapper" -+ -+ # Check the variables that should have been set. -+ test -z "$generated_by_libtool_version" && \ -+ func_fatal_error "invalid libtool wrapper script \`$wrapper'" -+ -+ finalize=yes -+ for lib in $notinst_deplibs; do -+ # Check to see that each library is installed. -+ libdir= -+ if test -f "$lib"; then -+ func_source "$lib" -+ fi -+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test -+ if test -n "$libdir" && test ! -f "$libfile"; then -+ func_warning "\`$lib' has not been installed in \`$libdir'" -+ finalize=no -+ fi -+ done -+ -+ relink_command= -+ func_source "$wrapper" -+ -+ outputname= -+ if test "$fast_install" = no && test -n "$relink_command"; then -+ $opt_dry_run || { -+ if test "$finalize" = yes; then -+ tmpdir=`func_mktempdir` -+ func_basename "$file$stripped_ext" -+ file="$func_basename_result" -+ outputname="$tmpdir/$file" -+ # Replace the output file specification. -+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` -+ -+ $opt_silent || { -+ func_quote_for_expand "$relink_command" -+ eval "func_echo $func_quote_for_expand_result" -+ } -+ if eval "$relink_command"; then : -+ else -+ func_error "error: relink \`$file' with the above command before installing it" -+ $opt_dry_run || ${RM}r "$tmpdir" -+ continue -+ fi -+ file="$outputname" -+ else -+ func_warning "cannot relink \`$file'" -+ fi -+ } -+ else -+ # Install the binary that we compiled earlier. -+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` -+ fi -+ fi -+ -+ # remove .exe since cygwin /usr/bin/install will append another -+ # one anyway -+ case $install_prog,$host in -+ */usr/bin/install*,*cygwin*) -+ case $file:$destfile in -+ *.exe:*.exe) -+ # this is ok -+ ;; -+ *.exe:*) -+ destfile=$destfile.exe -+ ;; -+ *:*.exe) -+ func_stripname '' '.exe' "$destfile" -+ destfile=$func_stripname_result -+ ;; -+ esac -+ ;; -+ esac -+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' -+ $opt_dry_run || if test -n "$outputname"; then -+ ${RM}r "$tmpdir" -+ fi -+ ;; -+ esac -+ done -+ -+ for file in $staticlibs; do -+ func_basename "$file" -+ name="$func_basename_result" -+ -+ # Set up the ranlib parameters. -+ oldlib="$destdir/$name" -+ -+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?' -+ -+ if test -n "$stripme" && test -n "$old_striplib"; then -+ func_show_eval "$old_striplib $oldlib" 'exit $?' -+ fi -+ -+ # Do each command in the postinstall commands. -+ func_execute_cmds "$old_postinstall_cmds" 'exit $?' -+ done -+ -+ test -n "$future_libdirs" && \ -+ func_warning "remember to run \`$progname --finish$future_libdirs'" -+ -+ if test -n "$current_libdirs"; then -+ # Maybe just do a dry run. -+ $opt_dry_run && current_libdirs=" -n$current_libdirs" -+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' -+ else -+ exit $EXIT_SUCCESS -+ fi -+} -+ -+test "$opt_mode" = install && func_mode_install ${1+"$@"} -+ -+ -+# func_generate_dlsyms outputname originator pic_p -+# Extract symbols from dlprefiles and create ${outputname}S.o with -+# a dlpreopen symbol table. -+func_generate_dlsyms () -+{ -+ $opt_debug -+ my_outputname="$1" -+ my_originator="$2" -+ my_pic_p="${3-no}" -+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` -+ my_dlsyms= -+ -+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -+ if test -n "$NM" && test -n "$global_symbol_pipe"; then -+ my_dlsyms="${my_outputname}S.c" -+ else -+ func_error "not configured to extract global symbols from dlpreopened files" -+ fi -+ fi -+ -+ if test -n "$my_dlsyms"; then -+ case $my_dlsyms in -+ "") ;; -+ *.c) -+ # Discover the nlist of each of the dlfiles. -+ nlist="$output_objdir/${my_outputname}.nm" -+ -+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T" -+ -+ # Parse the name list into a source file. -+ func_verbose "creating $output_objdir/$my_dlsyms" -+ -+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ -+ -+#ifdef __cplusplus -+extern \"C\" { -+#endif -+ -+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -+#endif -+ -+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -+/* DATA imports from DLLs on WIN32 con't be const, because runtime -+ relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT_DLSYM_CONST -+#elif defined(__osf__) -+/* This system does not cope well with relocations in const data. */ -+# define LT_DLSYM_CONST -+#else -+# define LT_DLSYM_CONST const -+#endif -+ -+/* External symbol declarations for the compiler. */\ -+" -+ -+ if test "$dlself" = yes; then -+ func_verbose "generating symbol list for \`$output'" -+ -+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" -+ -+ # Add our own program objects to the symbol list. -+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` -+ for progfile in $progfiles; do -+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 -+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" -+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" -+ done -+ -+ if test -n "$exclude_expsyms"; then -+ $opt_dry_run || { -+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' -+ } -+ fi -+ -+ if test -n "$export_symbols_regex"; then -+ $opt_dry_run || { -+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' -+ } -+ fi -+ -+ # Prepare the list of exported symbols -+ if test -z "$export_symbols"; then -+ export_symbols="$output_objdir/$outputname.exp" -+ $opt_dry_run || { -+ $RM $export_symbols -+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac -+ } -+ else -+ $opt_dry_run || { -+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac -+ } -+ fi -+ fi -+ -+ for dlprefile in $dlprefiles; do -+ func_verbose "extracting global C symbols from \`$dlprefile'" -+ func_basename "$dlprefile" -+ name="$func_basename_result" -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ # if an import library, we need to obtain dlname -+ if func_win32_import_lib_p "$dlprefile"; then -+ func_tr_sh "$dlprefile" -+ eval "curr_lafile=\$libfile_$func_tr_sh_result" -+ dlprefile_dlbasename="" -+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then -+ # Use subshell, to avoid clobbering current variable values -+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` -+ if test -n "$dlprefile_dlname" ; then -+ func_basename "$dlprefile_dlname" -+ dlprefile_dlbasename="$func_basename_result" -+ else -+ # no lafile. user explicitly requested -dlpreopen . -+ $sharedlib_from_linklib_cmd "$dlprefile" -+ dlprefile_dlbasename=$sharedlib_from_linklib_result -+ fi -+ fi -+ $opt_dry_run || { -+ if test -n "$dlprefile_dlbasename" ; then -+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' -+ else -+ func_warning "Could not compute DLL name from $name" -+ eval '$ECHO ": $name " >> "$nlist"' -+ fi -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | -+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" -+ } -+ else # not an import lib -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ fi -+ ;; -+ *) -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ ;; -+ esac -+ done -+ -+ $opt_dry_run || { -+ # Make sure we have at least an empty file. -+ test -f "$nlist" || : > "$nlist" -+ -+ if test -n "$exclude_expsyms"; then -+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -+ $MV "$nlist"T "$nlist" -+ fi -+ -+ # Try sorting and uniquifying the output. -+ if $GREP -v "^: " < "$nlist" | -+ if sort -k 3 /dev/null 2>&1; then -+ sort -k 3 -+ else -+ sort +2 -+ fi | -+ uniq > "$nlist"S; then -+ : -+ else -+ $GREP -v "^: " < "$nlist" > "$nlist"S -+ fi -+ -+ if test -f "$nlist"S; then -+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' -+ else -+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" -+ fi -+ -+ echo >> "$output_objdir/$my_dlsyms" "\ -+ -+/* The mapping between symbol names and symbols. */ -+typedef struct { -+ const char *name; -+ void *address; -+} lt_dlsymlist; -+extern LT_DLSYM_CONST lt_dlsymlist -+lt_${my_prefix}_LTX_preloaded_symbols[]; -+LT_DLSYM_CONST lt_dlsymlist -+lt_${my_prefix}_LTX_preloaded_symbols[] = -+{\ -+ { \"$my_originator\", (void *) 0 }," -+ -+ case $need_lib_prefix in -+ no) -+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" -+ ;; -+ *) -+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" -+ ;; -+ esac -+ echo >> "$output_objdir/$my_dlsyms" "\ -+ {0, (void *) 0} -+}; -+ -+/* This works around a problem in FreeBSD linker */ -+#ifdef FREEBSD_WORKAROUND -+static const void *lt_preloaded_setup() { -+ return lt_${my_prefix}_LTX_preloaded_symbols; -+} -+#endif -+ -+#ifdef __cplusplus -+} -+#endif\ -+" -+ } # !$opt_dry_run -+ -+ pic_flag_for_symtable= -+ case "$compile_command " in -+ *" -static "*) ;; -+ *) -+ case $host in -+ # compiling the symbol table file with pic_flag works around -+ # a FreeBSD bug that causes programs to crash when -lm is -+ # linked before any other PIC object. But we must not use -+ # pic_flag when linking with -static. The problem exists in -+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. -+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) -+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; -+ *-*-hpux*) -+ pic_flag_for_symtable=" $pic_flag" ;; -+ *) -+ if test "X$my_pic_p" != Xno; then -+ pic_flag_for_symtable=" $pic_flag" -+ fi -+ ;; -+ esac -+ ;; -+ esac -+ symtab_cflags= -+ for arg in $LTCFLAGS; do -+ case $arg in -+ -pie | -fpie | -fPIE) ;; -+ *) func_append symtab_cflags " $arg" ;; -+ esac -+ done -+ -+ # Now compile the dynamic symbol file. -+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' -+ -+ # Clean up the generated files. -+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' -+ -+ # Transform the symbol file into the correct name. -+ symfileobj="$output_objdir/${my_outputname}S.$objext" -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ if test -f "$output_objdir/$my_outputname.def"; then -+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` -+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` -+ else -+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` -+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` -+ fi -+ ;; -+ *) -+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` -+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` -+ ;; -+ esac -+ ;; -+ *) -+ func_fatal_error "unknown suffix for \`$my_dlsyms'" -+ ;; -+ esac -+ else -+ # We keep going just in case the user didn't refer to -+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe -+ # really was required. -+ -+ # Nullify the symbol file. -+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` -+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` -+ fi -+} -+ -+# func_win32_libid arg -+# return the library type of file 'arg' -+# -+# Need a lot of goo to handle *both* DLLs and import libs -+# Has to be a shell function in order to 'eat' the argument -+# that is supplied when $file_magic_command is called. -+# Despite the name, also deal with 64 bit binaries. -+func_win32_libid () -+{ -+ $opt_debug -+ win32_libid_type="unknown" -+ win32_fileres=`file -L $1 2>/dev/null` -+ case $win32_fileres in -+ *ar\ archive\ import\ library*) # definitely import -+ win32_libid_type="x86 archive import" -+ ;; -+ *ar\ archive*) # could be an import, or static -+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. -+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | -+ $SED -n -e ' -+ 1,100{ -+ / I /{ -+ s,.*,import, -+ p -+ q -+ } -+ }'` -+ case $win32_nmres in -+ import*) win32_libid_type="x86 archive import";; -+ *) win32_libid_type="x86 archive static";; -+ esac -+ fi -+ ;; -+ *DLL*) -+ win32_libid_type="x86 DLL" -+ ;; -+ *executable*) # but shell scripts are "executable" too... -+ case $win32_fileres in -+ *MS\ Windows\ PE\ Intel*) -+ win32_libid_type="x86 DLL" -+ ;; -+ esac -+ ;; -+ esac -+ $ECHO "$win32_libid_type" -+} -+ -+# func_cygming_dll_for_implib ARG -+# -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib () -+{ -+ $opt_debug -+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -+} -+ -+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -+# -+# The is the core of a fallback implementation of a -+# platform-specific function to extract the name of the -+# DLL associated with the specified import library LIBNAME. -+# -+# SECTION_NAME is either .idata$6 or .idata$7, depending -+# on the platform and compiler that created the implib. -+# -+# Echos the name of the DLL associated with the -+# specified import library. -+func_cygming_dll_for_implib_fallback_core () -+{ -+ $opt_debug -+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` -+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | -+ $SED '/^Contents of section '"$match_literal"':/{ -+ # Place marker at beginning of archive member dllname section -+ s/.*/====MARK====/ -+ p -+ d -+ } -+ # These lines can sometimes be longer than 43 characters, but -+ # are always uninteresting -+ /:[ ]*file format pe[i]\{,1\}-/d -+ /^In archive [^:]*:/d -+ # Ensure marker is printed -+ /^====MARK====/p -+ # Remove all lines with less than 43 characters -+ /^.\{43\}/!d -+ # From remaining lines, remove first 43 characters -+ s/^.\{43\}//' | -+ $SED -n ' -+ # Join marker and all lines until next marker into a single line -+ /^====MARK====/ b para -+ H -+ $ b para -+ b -+ :para -+ x -+ s/\n//g -+ # Remove the marker -+ s/^====MARK====// -+ # Remove trailing dots and whitespace -+ s/[\. \t]*$// -+ # Print -+ /./p' | -+ # we now have a list, one entry per line, of the stringified -+ # contents of the appropriate section of all members of the -+ # archive which possess that section. Heuristic: eliminate -+ # all those which have a first or second character that is -+ # a '.' (that is, objdump's representation of an unprintable -+ # character.) This should work for all archives with less than -+ # 0x302f exports -- but will fail for DLLs whose name actually -+ # begins with a literal '.' or a single character followed by -+ # a '.'. -+ # -+ # Of those that remain, print the first one. -+ $SED -e '/^\./d;/^.\./d;q' -+} -+ -+# func_cygming_gnu_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is a GNU/binutils-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_gnu_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` -+ test -n "$func_cygming_gnu_implib_tmp" -+} -+ -+# func_cygming_ms_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is an MS-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_ms_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` -+ test -n "$func_cygming_ms_implib_tmp" -+} -+ -+# func_cygming_dll_for_implib_fallback ARG -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# -+# This fallback implementation is for use when $DLLTOOL -+# does not support the --identify-strict option. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib_fallback () -+{ -+ $opt_debug -+ if func_cygming_gnu_implib_p "$1" ; then -+ # binutils import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` -+ elif func_cygming_ms_implib_p "$1" ; then -+ # ms-generated import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` -+ else -+ # unknown -+ sharedlib_from_linklib_result="" -+ fi -+} -+ -+ -+# func_extract_an_archive dir oldlib -+func_extract_an_archive () -+{ -+ $opt_debug -+ f_ex_an_ar_dir="$1"; shift -+ f_ex_an_ar_oldlib="$1" -+ if test "$lock_old_archive_extraction" = yes; then -+ lockfile=$f_ex_an_ar_oldlib.lock -+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do -+ func_echo "Waiting for $lockfile to be removed" -+ sleep 2 -+ done -+ fi -+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ -+ 'stat=$?; rm -f "$lockfile"; exit $stat' -+ if test "$lock_old_archive_extraction" = yes; then -+ $opt_dry_run || rm -f "$lockfile" -+ fi -+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" -+ fi -+} -+ -+ -+# func_extract_archives gentop oldlib ... -+func_extract_archives () -+{ -+ $opt_debug -+ my_gentop="$1"; shift -+ my_oldlibs=${1+"$@"} -+ my_oldobjs="" -+ my_xlib="" -+ my_xabs="" -+ my_xdir="" -+ -+ for my_xlib in $my_oldlibs; do -+ # Extract the objects. -+ case $my_xlib in -+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; -+ *) my_xabs=`pwd`"/$my_xlib" ;; -+ esac -+ func_basename "$my_xlib" -+ my_xlib="$func_basename_result" -+ my_xlib_u=$my_xlib -+ while :; do -+ case " $extracted_archives " in -+ *" $my_xlib_u "*) -+ func_arith $extracted_serial + 1 -+ extracted_serial=$func_arith_result -+ my_xlib_u=lt$extracted_serial-$my_xlib ;; -+ *) break ;; -+ esac -+ done -+ extracted_archives="$extracted_archives $my_xlib_u" -+ my_xdir="$my_gentop/$my_xlib_u" -+ -+ func_mkdir_p "$my_xdir" -+ -+ case $host in -+ *-darwin*) -+ func_verbose "Extracting $my_xabs" -+ # Do not bother doing anything if just a dry run -+ $opt_dry_run || { -+ darwin_orig_dir=`pwd` -+ cd $my_xdir || exit $? -+ darwin_archive=$my_xabs -+ darwin_curdir=`pwd` -+ darwin_base_archive=`basename "$darwin_archive"` -+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` -+ if test -n "$darwin_arches"; then -+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` -+ darwin_arch= -+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" -+ for darwin_arch in $darwin_arches ; do -+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" -+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ func_extract_an_archive "`pwd`" "${darwin_base_archive}" -+ cd "$darwin_curdir" -+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" -+ done # $darwin_arches -+ ## Okay now we've a bunch of thin objects, gotta fatten them up :) -+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` -+ darwin_file= -+ darwin_files= -+ for darwin_file in $darwin_filelist; do -+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` -+ $LIPO -create -output "$darwin_file" $darwin_files -+ done # $darwin_filelist -+ $RM -rf unfat-$$ -+ cd "$darwin_orig_dir" -+ else -+ cd $darwin_orig_dir -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ fi # $darwin_arches -+ } # !$opt_dry_run -+ ;; -+ *) -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ ;; -+ esac -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` -+ done -+ -+ func_extract_archives_result="$my_oldobjs" -+} -+ -+ -+# func_emit_wrapper [arg=no] -+# -+# Emit a libtool wrapper script on stdout. -+# Don't directly open a file because we may want to -+# incorporate the script contents within a cygwin/mingw -+# wrapper executable. Must ONLY be called from within -+# func_mode_link because it depends on a number of variables -+# set therein. -+# -+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -+# variable will take. If 'yes', then the emitted script -+# will assume that the directory in which it is stored is -+# the $objdir directory. This is a cygwin/mingw-specific -+# behavior. -+func_emit_wrapper () -+{ -+ func_emit_wrapper_arg1=${1-no} -+ -+ $ECHO "\ -+#! $SHELL -+ -+# $output - temporary wrapper script for $objdir/$outputname -+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -+# -+# The $output program cannot be directly executed until all the libtool -+# libraries that it depends on are installed. -+# -+# This wrapper script should never be moved out of the build directory. -+# If it is, it will not operate correctly. -+ -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+sed_quote_subst='$sed_quote_subst' -+ -+# Be Bourne compatible -+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '\${1+\"\$@\"}'='\"\$@\"' -+ setopt NO_GLOB_SUBST -+else -+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -+fi -+BIN_SH=xpg4; export BIN_SH # for Tru64 -+DUALCASE=1; export DUALCASE # for MKS sh -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+ -+relink_command=\"$relink_command\" -+ -+# This environment variable determines our operation mode. -+if test \"\$libtool_install_magic\" = \"$magic\"; then -+ # install mode needs the following variables: -+ generated_by_libtool_version='$macro_version' -+ notinst_deplibs='$notinst_deplibs' -+else -+ # When we are sourced in execute mode, \$file and \$ECHO are already set. -+ if test \"\$libtool_execute_magic\" != \"$magic\"; then -+ file=\"\$0\"" -+ -+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` -+ $ECHO "\ -+ -+# A function that is used when there is no print builtin or printf. -+func_fallback_echo () -+{ -+ eval 'cat <<_LTECHO_EOF -+\$1 -+_LTECHO_EOF' -+} -+ ECHO=\"$qECHO\" -+ fi -+ -+# Very basic option parsing. These options are (a) specific to -+# the libtool wrapper, (b) are identical between the wrapper -+# /script/ and the wrapper /executable/ which is used only on -+# windows platforms, and (c) all begin with the string "--lt-" -+# (application programs are unlikely to have options which match -+# this pattern). -+# -+# There are only two supported options: --lt-debug and -+# --lt-dump-script. There is, deliberately, no --lt-help. -+# -+# The first argument to this parsing function should be the -+# script's $0 value, followed by "$@". -+lt_option_debug= -+func_parse_lt_options () -+{ -+ lt_script_arg0=\$0 -+ shift -+ for lt_opt -+ do -+ case \"\$lt_opt\" in -+ --lt-debug) lt_option_debug=1 ;; -+ --lt-dump-script) -+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` -+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. -+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` -+ cat \"\$lt_dump_D/\$lt_dump_F\" -+ exit 0 -+ ;; -+ --lt-*) -+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 -+ exit 1 -+ ;; -+ esac -+ done -+ -+ # Print the debug banner immediately: -+ if test -n \"\$lt_option_debug\"; then -+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 -+ fi -+} -+ -+# Used when --lt-debug. Prints its arguments to stdout -+# (redirection is the responsibility of the caller) -+func_lt_dump_args () -+{ -+ lt_dump_args_N=1; -+ for lt_arg -+ do -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" -+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` -+ done -+} -+ -+# Core function for launching the target application -+func_exec_program_core () -+{ -+" -+ case $host in -+ # Backslashes separate directories on plain windows -+ *-*-mingw | *-*-os2* | *-cegcc*) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -+" -+ ;; -+ -+ *) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} -+" -+ ;; -+ esac -+ $ECHO "\ -+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -+ exit 1 -+} -+ -+# A function to encapsulate launching the target application -+# Strips options in the --lt-* namespace from \$@ and -+# launches target application with the remaining arguments. -+func_exec_program () -+{ -+ for lt_wr_arg -+ do -+ case \$lt_wr_arg in -+ --lt-*) ;; -+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; -+ esac -+ shift -+ done -+ func_exec_program_core \${1+\"\$@\"} -+} -+ -+ # Parse options -+ func_parse_lt_options \"\$0\" \${1+\"\$@\"} -+ -+ # Find the directory that this script lives in. -+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` -+ test \"x\$thisdir\" = \"x\$file\" && thisdir=. -+ -+ # Follow symbolic links until we get to the real thisdir. -+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` -+ while test -n \"\$file\"; do -+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` -+ -+ # If there was a directory component, then change thisdir. -+ if test \"x\$destdir\" != \"x\$file\"; then -+ case \"\$destdir\" in -+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; -+ *) thisdir=\"\$thisdir/\$destdir\" ;; -+ esac -+ fi -+ -+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` -+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` -+ done -+ -+ # Usually 'no', except on cygwin/mingw when embedded into -+ # the cwrapper. -+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 -+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then -+ # special case for '.' -+ if test \"\$thisdir\" = \".\"; then -+ thisdir=\`pwd\` -+ fi -+ # remove .libs from thisdir -+ case \"\$thisdir\" in -+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; -+ $objdir ) thisdir=. ;; -+ esac -+ fi -+ -+ # Try to get the absolute directory name. -+ absdir=\`cd \"\$thisdir\" && pwd\` -+ test -n \"\$absdir\" && thisdir=\"\$absdir\" -+" -+ -+ if test "$fast_install" = yes; then -+ $ECHO "\ -+ program=lt-'$outputname'$exeext -+ progdir=\"\$thisdir/$objdir\" -+ -+ if test ! -f \"\$progdir/\$program\" || -+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ -+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then -+ -+ file=\"\$\$-\$program\" -+ -+ if test ! -d \"\$progdir\"; then -+ $MKDIR \"\$progdir\" -+ else -+ $RM \"\$progdir/\$file\" -+ fi" -+ -+ $ECHO "\ -+ -+ # relink executable if necessary -+ if test -n \"\$relink_command\"; then -+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : -+ else -+ $ECHO \"\$relink_command_output\" >&2 -+ $RM \"\$progdir/\$file\" -+ exit 1 -+ fi -+ fi -+ -+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || -+ { $RM \"\$progdir/\$program\"; -+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } -+ $RM \"\$progdir/\$file\" -+ fi" -+ else -+ $ECHO "\ -+ program='$outputname' -+ progdir=\"\$thisdir/$objdir\" -+" -+ fi -+ -+ $ECHO "\ -+ -+ if test -f \"\$progdir/\$program\"; then" -+ -+ # fixup the dll searchpath if we need to. -+ # -+ # Fix the DLL searchpath if we need to. Do this before prepending -+ # to shlibpath, because on Windows, both are PATH and uninstalled -+ # libraries must come first. -+ if test -n "$dllsearchpath"; then -+ $ECHO "\ -+ # Add the dll search path components to the executable PATH -+ PATH=$dllsearchpath:\$PATH -+" -+ fi -+ -+ # Export our shlibpath_var if we have one. -+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then -+ $ECHO "\ -+ # Add our own library path to $shlibpath_var -+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" -+ -+ # Some systems cannot cope with colon-terminated $shlibpath_var -+ # The second colon is a workaround for a bug in BeOS R4 sed -+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` -+ -+ export $shlibpath_var -+" -+ fi -+ -+ $ECHO "\ -+ if test \"\$libtool_execute_magic\" != \"$magic\"; then -+ # Run the actual program with our arguments. -+ func_exec_program \${1+\"\$@\"} -+ fi -+ else -+ # The program doesn't exist. -+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 -+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 -+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 -+ exit 1 -+ fi -+fi\ -+" -+} -+ -+ -+# func_emit_cwrapperexe_src -+# emit the source code for a wrapper executable on stdout -+# Must ONLY be called from within func_mode_link because -+# it depends on a number of variable set therein. -+func_emit_cwrapperexe_src () -+{ -+ cat < -+#include -+#ifdef _MSC_VER -+# include -+# include -+# include -+#else -+# include -+# include -+# ifdef __CYGWIN__ -+# include -+# endif -+#endif -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/* declarations of non-ANSI functions */ -+#if defined(__MINGW32__) -+# ifdef __STRICT_ANSI__ -+int _putenv (const char *); -+# endif -+#elif defined(__CYGWIN__) -+# ifdef __STRICT_ANSI__ -+char *realpath (const char *, char *); -+int putenv (char *); -+int setenv (const char *, const char *, int); -+# endif -+/* #elif defined (other platforms) ... */ -+#endif -+ -+/* portability defines, excluding path handling macros */ -+#if defined(_MSC_VER) -+# define setmode _setmode -+# define stat _stat -+# define chmod _chmod -+# define getcwd _getcwd -+# define putenv _putenv -+# define S_IXUSR _S_IEXEC -+# ifndef _INTPTR_T_DEFINED -+# define _INTPTR_T_DEFINED -+# define intptr_t int -+# endif -+#elif defined(__MINGW32__) -+# define setmode _setmode -+# define stat _stat -+# define chmod _chmod -+# define getcwd _getcwd -+# define putenv _putenv -+#elif defined(__CYGWIN__) -+# define HAVE_SETENV -+# define FOPEN_WB "wb" -+/* #elif defined (other platforms) ... */ -+#endif -+ -+#if defined(PATH_MAX) -+# define LT_PATHMAX PATH_MAX -+#elif defined(MAXPATHLEN) -+# define LT_PATHMAX MAXPATHLEN -+#else -+# define LT_PATHMAX 1024 -+#endif -+ -+#ifndef S_IXOTH -+# define S_IXOTH 0 -+#endif -+#ifndef S_IXGRP -+# define S_IXGRP 0 -+#endif -+ -+/* path handling portability macros */ -+#ifndef DIR_SEPARATOR -+# define DIR_SEPARATOR '/' -+# define PATH_SEPARATOR ':' -+#endif -+ -+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ -+ defined (__OS2__) -+# define HAVE_DOS_BASED_FILE_SYSTEM -+# define FOPEN_WB "wb" -+# ifndef DIR_SEPARATOR_2 -+# define DIR_SEPARATOR_2 '\\' -+# endif -+# ifndef PATH_SEPARATOR_2 -+# define PATH_SEPARATOR_2 ';' -+# endif -+#endif -+ -+#ifndef DIR_SEPARATOR_2 -+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -+#else /* DIR_SEPARATOR_2 */ -+# define IS_DIR_SEPARATOR(ch) \ -+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -+#endif /* DIR_SEPARATOR_2 */ -+ -+#ifndef PATH_SEPARATOR_2 -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -+#else /* PATH_SEPARATOR_2 */ -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -+#endif /* PATH_SEPARATOR_2 */ -+ -+#ifndef FOPEN_WB -+# define FOPEN_WB "w" -+#endif -+#ifndef _O_BINARY -+# define _O_BINARY 0 -+#endif -+ -+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -+#define XFREE(stale) do { \ -+ if (stale) { free ((void *) stale); stale = 0; } \ -+} while (0) -+ -+#if defined(LT_DEBUGWRAPPER) -+static int lt_debug = 1; -+#else -+static int lt_debug = 0; -+#endif -+ -+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ -+ -+void *xmalloc (size_t num); -+char *xstrdup (const char *string); -+const char *base_name (const char *name); -+char *find_executable (const char *wrapper); -+char *chase_symlinks (const char *pathspec); -+int make_executable (const char *path); -+int check_executable (const char *path); -+char *strendzap (char *str, const char *pat); -+void lt_debugprintf (const char *file, int line, const char *fmt, ...); -+void lt_fatal (const char *file, int line, const char *message, ...); -+static const char *nonnull (const char *s); -+static const char *nonempty (const char *s); -+void lt_setenv (const char *name, const char *value); -+char *lt_extend_str (const char *orig_value, const char *add, int to_end); -+void lt_update_exe_path (const char *name, const char *value); -+void lt_update_lib_path (const char *name, const char *value); -+char **prepare_spawn (char **argv); -+void lt_dump_script (FILE *f); -+EOF -+ -+ cat <= 0) -+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) -+ return 1; -+ else -+ return 0; -+} -+ -+int -+make_executable (const char *path) -+{ -+ int rval = 0; -+ struct stat st; -+ -+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", -+ nonempty (path)); -+ if ((!path) || (!*path)) -+ return 0; -+ -+ if (stat (path, &st) >= 0) -+ { -+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); -+ } -+ return rval; -+} -+ -+/* Searches for the full path of the wrapper. Returns -+ newly allocated full path name if found, NULL otherwise -+ Does not chase symlinks, even on platforms that support them. -+*/ -+char * -+find_executable (const char *wrapper) -+{ -+ int has_slash = 0; -+ const char *p; -+ const char *p_next; -+ /* static buffer for getcwd */ -+ char tmp[LT_PATHMAX + 1]; -+ int tmp_len; -+ char *concat_name; -+ -+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", -+ nonempty (wrapper)); -+ -+ if ((wrapper == NULL) || (*wrapper == '\0')) -+ return NULL; -+ -+ /* Absolute path? */ -+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) -+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable (concat_name)) -+ return concat_name; -+ XFREE (concat_name); -+ } -+ else -+ { -+#endif -+ if (IS_DIR_SEPARATOR (wrapper[0])) -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable (concat_name)) -+ return concat_name; -+ XFREE (concat_name); -+ } -+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) -+ } -+#endif -+ -+ for (p = wrapper; *p; p++) -+ if (*p == '/') -+ { -+ has_slash = 1; -+ break; -+ } -+ if (!has_slash) -+ { -+ /* no slashes; search PATH */ -+ const char *path = getenv ("PATH"); -+ if (path != NULL) -+ { -+ for (p = path; *p; p = p_next) -+ { -+ const char *q; -+ size_t p_len; -+ for (q = p; *q; q++) -+ if (IS_PATH_SEPARATOR (*q)) -+ break; -+ p_len = q - p; -+ p_next = (*q == '\0' ? q : q + 1); -+ if (p_len == 0) -+ { -+ /* empty path: current directory */ -+ if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); -+ tmp_len = strlen (tmp); -+ concat_name = -+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ } -+ else -+ { -+ concat_name = -+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); -+ memcpy (concat_name, p, p_len); -+ concat_name[p_len] = '/'; -+ strcpy (concat_name + p_len + 1, wrapper); -+ } -+ if (check_executable (concat_name)) -+ return concat_name; -+ XFREE (concat_name); -+ } -+ } -+ /* not found in PATH; assume curdir */ -+ } -+ /* Relative path | not found in path: prepend cwd */ -+ if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); -+ tmp_len = strlen (tmp); -+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ -+ if (check_executable (concat_name)) -+ return concat_name; -+ XFREE (concat_name); -+ return NULL; -+} -+ -+char * -+chase_symlinks (const char *pathspec) -+{ -+#ifndef S_ISLNK -+ return xstrdup (pathspec); -+#else -+ char buf[LT_PATHMAX]; -+ struct stat s; -+ char *tmp_pathspec = xstrdup (pathspec); -+ char *p; -+ int has_symlinks = 0; -+ while (strlen (tmp_pathspec) && !has_symlinks) -+ { -+ lt_debugprintf (__FILE__, __LINE__, -+ "checking path component for symlinks: %s\n", -+ tmp_pathspec); -+ if (lstat (tmp_pathspec, &s) == 0) -+ { -+ if (S_ISLNK (s.st_mode) != 0) -+ { -+ has_symlinks = 1; -+ break; -+ } -+ -+ /* search backwards for last DIR_SEPARATOR */ -+ p = tmp_pathspec + strlen (tmp_pathspec) - 1; -+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) -+ p--; -+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) -+ { -+ /* no more DIR_SEPARATORS left */ -+ break; -+ } -+ *p = '\0'; -+ } -+ else -+ { -+ lt_fatal (__FILE__, __LINE__, -+ "error accessing file \"%s\": %s", -+ tmp_pathspec, nonnull (strerror (errno))); -+ } -+ } -+ XFREE (tmp_pathspec); -+ -+ if (!has_symlinks) -+ { -+ return xstrdup (pathspec); -+ } -+ -+ tmp_pathspec = realpath (pathspec, buf); -+ if (tmp_pathspec == 0) -+ { -+ lt_fatal (__FILE__, __LINE__, -+ "could not follow symlinks for %s", pathspec); -+ } -+ return xstrdup (tmp_pathspec); -+#endif -+} -+ -+char * -+strendzap (char *str, const char *pat) -+{ -+ size_t len, patlen; -+ -+ assert (str != NULL); -+ assert (pat != NULL); -+ -+ len = strlen (str); -+ patlen = strlen (pat); -+ -+ if (patlen <= len) -+ { -+ str += len - patlen; -+ if (strcmp (str, pat) == 0) -+ *str = '\0'; -+ } -+ return str; -+} -+ -+void -+lt_debugprintf (const char *file, int line, const char *fmt, ...) -+{ -+ va_list args; -+ if (lt_debug) -+ { -+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); -+ va_start (args, fmt); -+ (void) vfprintf (stderr, fmt, args); -+ va_end (args); -+ } -+} -+ -+static void -+lt_error_core (int exit_status, const char *file, -+ int line, const char *mode, -+ const char *message, va_list ap) -+{ -+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); -+ vfprintf (stderr, message, ap); -+ fprintf (stderr, ".\n"); -+ -+ if (exit_status >= 0) -+ exit (exit_status); -+} -+ -+void -+lt_fatal (const char *file, int line, const char *message, ...) -+{ -+ va_list ap; -+ va_start (ap, message); -+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); -+ va_end (ap); -+} -+ -+static const char * -+nonnull (const char *s) -+{ -+ return s ? s : "(null)"; -+} -+ -+static const char * -+nonempty (const char *s) -+{ -+ return (s && !*s) ? "(empty)" : nonnull (s); -+} -+ -+void -+lt_setenv (const char *name, const char *value) -+{ -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_setenv) setting '%s' to '%s'\n", -+ nonnull (name), nonnull (value)); -+ { -+#ifdef HAVE_SETENV -+ /* always make a copy, for consistency with !HAVE_SETENV */ -+ char *str = xstrdup (value); -+ setenv (name, str, 1); -+#else -+ int len = strlen (name) + 1 + strlen (value) + 1; -+ char *str = XMALLOC (char, len); -+ sprintf (str, "%s=%s", name, value); -+ if (putenv (str) != EXIT_SUCCESS) -+ { -+ XFREE (str); -+ } -+#endif -+ } -+} -+ -+char * -+lt_extend_str (const char *orig_value, const char *add, int to_end) -+{ -+ char *new_value; -+ if (orig_value && *orig_value) -+ { -+ int orig_value_len = strlen (orig_value); -+ int add_len = strlen (add); -+ new_value = XMALLOC (char, add_len + orig_value_len + 1); -+ if (to_end) -+ { -+ strcpy (new_value, orig_value); -+ strcpy (new_value + orig_value_len, add); -+ } -+ else -+ { -+ strcpy (new_value, add); -+ strcpy (new_value + add_len, orig_value); -+ } -+ } -+ else -+ { -+ new_value = xstrdup (add); -+ } -+ return new_value; -+} -+ -+void -+lt_update_exe_path (const char *name, const char *value) -+{ -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); -+ -+ if (name && *name && value && *value) -+ { -+ char *new_value = lt_extend_str (getenv (name), value, 0); -+ /* some systems can't cope with a ':'-terminated path #' */ -+ int len = strlen (new_value); -+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) -+ { -+ new_value[len-1] = '\0'; -+ } -+ lt_setenv (name, new_value); -+ XFREE (new_value); -+ } -+} -+ -+void -+lt_update_lib_path (const char *name, const char *value) -+{ -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); -+ -+ if (name && *name && value && *value) -+ { -+ char *new_value = lt_extend_str (getenv (name), value, 0); -+ lt_setenv (name, new_value); -+ XFREE (new_value); -+ } -+} -+ -+EOF -+ case $host_os in -+ mingw*) -+ cat <<"EOF" -+ -+/* Prepares an argument vector before calling spawn(). -+ Note that spawn() does not by itself call the command interpreter -+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : -+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); -+ GetVersionEx(&v); -+ v.dwPlatformId == VER_PLATFORM_WIN32_NT; -+ }) ? "cmd.exe" : "command.com"). -+ Instead it simply concatenates the arguments, separated by ' ', and calls -+ CreateProcess(). We must quote the arguments since Win32 CreateProcess() -+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a -+ special way: -+ - Space and tab are interpreted as delimiters. They are not treated as -+ delimiters if they are surrounded by double quotes: "...". -+ - Unescaped double quotes are removed from the input. Their only effect is -+ that within double quotes, space and tab are treated like normal -+ characters. -+ - Backslashes not followed by double quotes are not special. -+ - But 2*n+1 backslashes followed by a double quote become -+ n backslashes followed by a double quote (n >= 0): -+ \" -> " -+ \\\" -> \" -+ \\\\\" -> \\" -+ */ -+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -+char ** -+prepare_spawn (char **argv) -+{ -+ size_t argc; -+ char **new_argv; -+ size_t i; -+ -+ /* Count number of arguments. */ -+ for (argc = 0; argv[argc] != NULL; argc++) -+ ; -+ -+ /* Allocate new argument vector. */ -+ new_argv = XMALLOC (char *, argc + 1); -+ -+ /* Put quoted arguments into the new argument vector. */ -+ for (i = 0; i < argc; i++) -+ { -+ const char *string = argv[i]; -+ -+ if (string[0] == '\0') -+ new_argv[i] = xstrdup ("\"\""); -+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) -+ { -+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); -+ size_t length; -+ unsigned int backslashes; -+ const char *s; -+ char *quoted_string; -+ char *p; -+ -+ length = 0; -+ backslashes = 0; -+ if (quote_around) -+ length++; -+ for (s = string; *s != '\0'; s++) -+ { -+ char c = *s; -+ if (c == '"') -+ length += backslashes + 1; -+ length++; -+ if (c == '\\') -+ backslashes++; -+ else -+ backslashes = 0; -+ } -+ if (quote_around) -+ length += backslashes + 1; -+ -+ quoted_string = XMALLOC (char, length + 1); -+ -+ p = quoted_string; -+ backslashes = 0; -+ if (quote_around) -+ *p++ = '"'; -+ for (s = string; *s != '\0'; s++) -+ { -+ char c = *s; -+ if (c == '"') -+ { -+ unsigned int j; -+ for (j = backslashes + 1; j > 0; j--) -+ *p++ = '\\'; -+ } -+ *p++ = c; -+ if (c == '\\') -+ backslashes++; -+ else -+ backslashes = 0; -+ } -+ if (quote_around) -+ { -+ unsigned int j; -+ for (j = backslashes; j > 0; j--) -+ *p++ = '\\'; -+ *p++ = '"'; -+ } -+ *p = '\0'; -+ -+ new_argv[i] = quoted_string; -+ } -+ else -+ new_argv[i] = (char *) string; -+ } -+ new_argv[argc] = NULL; -+ -+ return new_argv; -+} -+EOF -+ ;; -+ esac -+ -+ cat <<"EOF" -+void lt_dump_script (FILE* f) -+{ -+EOF -+ func_emit_wrapper yes | -+ $SED -e 's/\([\\"]\)/\\\1/g' \ -+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' -+ -+ cat <<"EOF" -+} -+EOF -+} -+# end: func_emit_cwrapperexe_src -+ -+# func_win32_import_lib_p ARG -+# True if ARG is an import lib, as indicated by $file_magic_cmd -+func_win32_import_lib_p () -+{ -+ $opt_debug -+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in -+ *import*) : ;; -+ *) false ;; -+ esac -+} -+ -+# func_mode_link arg... -+func_mode_link () -+{ -+ $opt_debug -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) -+ # It is impossible to link a dll without this setting, and -+ # we shouldn't force the makefile maintainer to figure out -+ # which system we are compiling for in order to pass an extra -+ # flag for every libtool invocation. -+ # allow_undefined=no -+ -+ # FIXME: Unfortunately, there are problems with the above when trying -+ # to make a dll which has undefined symbols, in which case not -+ # even a static library is built. For now, we need to specify -+ # -no-undefined on the libtool link line when we can be certain -+ # that all symbols are satisfied, otherwise we get a static library. -+ allow_undefined=yes -+ ;; -+ *) -+ allow_undefined=yes -+ ;; -+ esac -+ libtool_args=$nonopt -+ base_compile="$nonopt $@" -+ compile_command=$nonopt -+ finalize_command=$nonopt -+ -+ compile_rpath= -+ finalize_rpath= -+ compile_shlibpath= -+ finalize_shlibpath= -+ convenience= -+ old_convenience= -+ deplibs= -+ old_deplibs= -+ compiler_flags= -+ linker_flags= -+ dllsearchpath= -+ lib_search_path=`pwd` -+ inst_prefix_dir= -+ new_inherited_linker_flags= -+ -+ avoid_version=no -+ bindir= -+ dlfiles= -+ dlprefiles= -+ dlself=no -+ export_dynamic=no -+ export_symbols= -+ export_symbols_regex= -+ generated= -+ libobjs= -+ ltlibs= -+ module=no -+ no_install=no -+ objs= -+ non_pic_objects= -+ precious_files_regex= -+ prefer_static_libs=no -+ preload=no -+ prev= -+ prevarg= -+ release= -+ rpath= -+ xrpath= -+ perm_rpath= -+ temp_rpath= -+ thread_safe=no -+ vinfo= -+ vinfo_number=no -+ weak_libs= -+ single_module="${wl}-single_module" -+ func_infer_tag $base_compile -+ -+ # We need to know -static, to get the right output filenames. -+ for arg -+ do -+ case $arg in -+ -shared) -+ test "$build_libtool_libs" != yes && \ -+ func_fatal_configuration "can not build a shared library" -+ build_old_libs=no -+ break -+ ;; -+ -all-static | -static | -static-libtool-libs) -+ case $arg in -+ -all-static) -+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then -+ func_warning "complete static linking is impossible in this configuration" -+ fi -+ if test -n "$link_static_flag"; then -+ dlopen_self=$dlopen_self_static -+ fi -+ prefer_static_libs=yes -+ ;; -+ -static) -+ if test -z "$pic_flag" && test -n "$link_static_flag"; then -+ dlopen_self=$dlopen_self_static -+ fi -+ prefer_static_libs=built -+ ;; -+ -static-libtool-libs) -+ if test -z "$pic_flag" && test -n "$link_static_flag"; then -+ dlopen_self=$dlopen_self_static -+ fi -+ prefer_static_libs=yes -+ ;; -+ esac -+ build_libtool_libs=no -+ build_old_libs=yes -+ break -+ ;; -+ esac -+ done -+ -+ # See if our shared archives depend on static archives. -+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes -+ -+ # Go through the arguments, transforming them on the way. -+ while test "$#" -gt 0; do -+ arg="$1" -+ shift -+ func_quote_for_eval "$arg" -+ qarg=$func_quote_for_eval_unquoted_result -+ func_append libtool_args " $func_quote_for_eval_result" -+ -+ # If the previous option needs an argument, assign it. -+ if test -n "$prev"; then -+ case $prev in -+ output) -+ func_append compile_command " @OUTPUT@" -+ func_append finalize_command " @OUTPUT@" -+ ;; -+ esac -+ -+ case $prev in -+ bindir) -+ bindir="$arg" -+ prev= -+ continue -+ ;; -+ dlfiles|dlprefiles) -+ if test "$preload" = no; then -+ # Add the symbol object into the linking commands. -+ func_append compile_command " @SYMFILE@" -+ func_append finalize_command " @SYMFILE@" -+ preload=yes -+ fi -+ case $arg in -+ *.la | *.lo) ;; # We handle these cases below. -+ force) -+ if test "$dlself" = no; then -+ dlself=needless -+ export_dynamic=yes -+ fi -+ prev= -+ continue -+ ;; -+ self) -+ if test "$prev" = dlprefiles; then -+ dlself=yes -+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then -+ dlself=yes -+ else -+ dlself=needless -+ export_dynamic=yes -+ fi -+ prev= -+ continue -+ ;; -+ *) -+ if test "$prev" = dlfiles; then -+ func_append dlfiles " $arg" -+ else -+ func_append dlprefiles " $arg" -+ fi -+ prev= -+ continue -+ ;; -+ esac -+ ;; -+ expsyms) -+ export_symbols="$arg" -+ test -f "$arg" \ -+ || func_fatal_error "symbol file \`$arg' does not exist" -+ prev= -+ continue -+ ;; -+ expsyms_regex) -+ export_symbols_regex="$arg" -+ prev= -+ continue -+ ;; -+ framework) -+ case $host in -+ *-*-darwin*) -+ case "$deplibs " in -+ *" $qarg.ltframework "*) ;; -+ *) func_append deplibs " $qarg.ltframework" # this is fixed later -+ ;; -+ esac -+ ;; -+ esac -+ prev= -+ continue -+ ;; -+ inst_prefix) -+ inst_prefix_dir="$arg" -+ prev= -+ continue -+ ;; -+ objectlist) -+ if test -f "$arg"; then -+ save_arg=$arg -+ moreargs= -+ for fil in `cat "$save_arg"` -+ do -+# func_append moreargs " $fil" -+ arg=$fil -+ # A libtool-controlled object. -+ -+ # Check to see that this really is a libtool object. -+ if func_lalib_unsafe_p "$arg"; then -+ pic_object= -+ non_pic_object= -+ -+ # Read the .lo file -+ func_source "$arg" -+ -+ if test -z "$pic_object" || -+ test -z "$non_pic_object" || -+ test "$pic_object" = none && -+ test "$non_pic_object" = none; then -+ func_fatal_error "cannot find name of object for \`$arg'" -+ fi -+ -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" -+ -+ if test "$pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ pic_object="$xdir$pic_object" -+ -+ if test "$prev" = dlfiles; then -+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -+ func_append dlfiles " $pic_object" -+ prev= -+ continue -+ else -+ # If libtool objects are unsupported, then we need to preload. -+ prev=dlprefiles -+ fi -+ fi -+ -+ # CHECK ME: I think I busted this. -Ossama -+ if test "$prev" = dlprefiles; then -+ # Preload the old-style object. -+ func_append dlprefiles " $pic_object" -+ prev= -+ fi -+ -+ # A PIC object. -+ func_append libobjs " $pic_object" -+ arg="$pic_object" -+ fi -+ -+ # Non-PIC object. -+ if test "$non_pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ non_pic_object="$xdir$non_pic_object" -+ -+ # A standard non-PIC object -+ func_append non_pic_objects " $non_pic_object" -+ if test -z "$pic_object" || test "$pic_object" = none ; then -+ arg="$non_pic_object" -+ fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ fi -+ else -+ # Only an error if not doing a dry-run. -+ if $opt_dry_run; then -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" -+ -+ func_lo2o "$arg" -+ pic_object=$xdir$objdir/$func_lo2o_result -+ non_pic_object=$xdir$func_lo2o_result -+ func_append libobjs " $pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ else -+ func_fatal_error "\`$arg' is not a valid libtool object" -+ fi -+ fi -+ done -+ else -+ func_fatal_error "link input file \`$arg' does not exist" -+ fi -+ arg=$save_arg -+ prev= -+ continue -+ ;; -+ precious_regex) -+ precious_files_regex="$arg" -+ prev= -+ continue -+ ;; -+ release) -+ release="-$arg" -+ prev= -+ continue -+ ;; -+ rpath | xrpath) -+ # We need an absolute path. -+ case $arg in -+ [\\/]* | [A-Za-z]:[\\/]*) ;; -+ *) -+ func_fatal_error "only absolute run-paths are allowed" -+ ;; -+ esac -+ if test "$prev" = rpath; then -+ case "$rpath " in -+ *" $arg "*) ;; -+ *) func_append rpath " $arg" ;; -+ esac -+ else -+ case "$xrpath " in -+ *" $arg "*) ;; -+ *) func_append xrpath " $arg" ;; -+ esac -+ fi -+ prev= -+ continue -+ ;; -+ shrext) -+ shrext_cmds="$arg" -+ prev= -+ continue -+ ;; -+ weak) -+ func_append weak_libs " $arg" -+ prev= -+ continue -+ ;; -+ xcclinker) -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $qarg" -+ prev= -+ func_append compile_command " $qarg" -+ func_append finalize_command " $qarg" -+ continue -+ ;; -+ xcompiler) -+ func_append compiler_flags " $qarg" -+ prev= -+ func_append compile_command " $qarg" -+ func_append finalize_command " $qarg" -+ continue -+ ;; -+ xlinker) -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $wl$qarg" -+ prev= -+ func_append compile_command " $wl$qarg" -+ func_append finalize_command " $wl$qarg" -+ continue -+ ;; -+ *) -+ eval "$prev=\"\$arg\"" -+ prev= -+ continue -+ ;; -+ esac -+ fi # test -n "$prev" -+ -+ prevarg="$arg" -+ -+ case $arg in -+ -all-static) -+ if test -n "$link_static_flag"; then -+ # See comment for -static flag below, for more details. -+ func_append compile_command " $link_static_flag" -+ func_append finalize_command " $link_static_flag" -+ fi -+ continue -+ ;; -+ -+ -allow-undefined) -+ # FIXME: remove this flag sometime in the future. -+ func_fatal_error "\`-allow-undefined' must not be used because it is the default" -+ ;; -+ -+ -avoid-version) -+ avoid_version=yes -+ continue -+ ;; -+ -+ -bindir) -+ prev=bindir -+ continue -+ ;; -+ -+ -dlopen) -+ prev=dlfiles -+ continue -+ ;; -+ -+ -dlpreopen) -+ prev=dlprefiles -+ continue -+ ;; -+ -+ -export-dynamic) -+ export_dynamic=yes -+ continue -+ ;; -+ -+ -export-symbols | -export-symbols-regex) -+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then -+ func_fatal_error "more than one -exported-symbols argument is not allowed" -+ fi -+ if test "X$arg" = "X-export-symbols"; then -+ prev=expsyms -+ else -+ prev=expsyms_regex -+ fi -+ continue -+ ;; -+ -+ -framework) -+ prev=framework -+ continue -+ ;; -+ -+ -inst-prefix-dir) -+ prev=inst_prefix -+ continue -+ ;; -+ -+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* -+ # so, if we see these flags be careful not to treat them like -L -+ -L[A-Z][A-Z]*:*) -+ case $with_gcc/$host in -+ no/*-*-irix* | /*-*-irix*) -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ ;; -+ esac -+ continue -+ ;; -+ -+ -L*) -+ func_stripname "-L" '' "$arg" -+ if test -z "$func_stripname_result"; then -+ if test "$#" -gt 0; then -+ func_fatal_error "require no space between \`-L' and \`$1'" -+ else -+ func_fatal_error "need path for \`-L' option" -+ fi -+ fi -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result -+ # We need an absolute path. -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]*) ;; -+ *) -+ absdir=`cd "$dir" && pwd` -+ test -z "$absdir" && \ -+ func_fatal_error "cannot determine absolute directory name of \`$dir'" -+ dir="$absdir" -+ ;; -+ esac -+ case "$deplibs " in -+ *" -L$dir "* | *" $arg "*) -+ # Will only happen for absolute or sysroot arguments -+ ;; -+ *) -+ # Preserve sysroot, but never include relative directories -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; -+ *) func_append deplibs " -L$dir" ;; -+ esac -+ func_append lib_search_path " $dir" -+ ;; -+ esac -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) -+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` -+ case :$dllsearchpath: in -+ *":$dir:"*) ;; -+ ::) dllsearchpath=$dir;; -+ *) func_append dllsearchpath ":$dir";; -+ esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ ::) dllsearchpath=$testbindir;; -+ *) func_append dllsearchpath ":$testbindir";; -+ esac -+ ;; -+ esac -+ continue -+ ;; -+ -+ -l*) -+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) -+ # These systems don't actually have a C or math library (as such) -+ continue -+ ;; -+ *-*-os2*) -+ # These systems don't actually have a C library (as such) -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) -+ # Do not include libc due to us having libc/libc_r. -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # Rhapsody C and math libraries are in the System framework -+ func_append deplibs " System.ltframework" -+ continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work -+ test "X$arg" = "X-lc" && continue -+ ;; -+ esac -+ elif test "X$arg" = "X-lc_r"; then -+ case $host in -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) -+ # Do not include libc_r directly, use -pthread flag. -+ continue -+ ;; -+ esac -+ fi -+ func_append deplibs " $arg" -+ continue -+ ;; -+ -+ -module) -+ module=yes -+ continue -+ ;; -+ -+ # Tru64 UNIX uses -model [arg] to determine the layout of C++ -+ # classes, name mangling, and exception handling. -+ # Darwin uses the -arch flag to determine output architecture. -+ -model|-arch|-isysroot|--sysroot) -+ func_append compiler_flags " $arg" -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ prev=xcompiler -+ continue -+ ;; -+ -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ func_append compiler_flags " $arg" -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ case "$new_inherited_linker_flags " in -+ *" $arg "*) ;; -+ * ) func_append new_inherited_linker_flags " $arg" ;; -+ esac -+ continue -+ ;; -+ -+ -multi_module) -+ single_module="${wl}-multi_module" -+ continue -+ ;; -+ -+ -no-fast-install) -+ fast_install=no -+ continue -+ ;; -+ -+ -no-install) -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) -+ # The PATH hackery in wrapper scripts is required on Windows -+ # and Darwin in order for the loader to find any dlls it needs. -+ func_warning "\`-no-install' is ignored for $host" -+ func_warning "assuming \`-no-fast-install' instead" -+ fast_install=no -+ ;; -+ *) no_install=yes ;; -+ esac -+ continue -+ ;; -+ -+ -no-undefined) -+ allow_undefined=no -+ continue -+ ;; -+ -+ -objectlist) -+ prev=objectlist -+ continue -+ ;; -+ -+ -o) prev=output ;; -+ -+ -precious-files-regex) -+ prev=precious_regex -+ continue -+ ;; -+ -+ -release) -+ prev=release -+ continue -+ ;; -+ -+ -rpath) -+ prev=rpath -+ continue -+ ;; -+ -+ -R) -+ prev=xrpath -+ continue -+ ;; -+ -+ -R*) -+ func_stripname '-R' '' "$arg" -+ dir=$func_stripname_result -+ # We need an absolute path. -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]*) ;; -+ =*) -+ func_stripname '=' '' "$dir" -+ dir=$lt_sysroot$func_stripname_result -+ ;; -+ *) -+ func_fatal_error "only absolute run-paths are allowed" -+ ;; -+ esac -+ case "$xrpath " in -+ *" $dir "*) ;; -+ *) func_append xrpath " $dir" ;; -+ esac -+ continue -+ ;; -+ -+ -shared) -+ # The effects of -shared are defined in a previous loop. -+ continue -+ ;; -+ -+ -shrext) -+ prev=shrext -+ continue -+ ;; -+ -+ -static | -static-libtool-libs) -+ # The effects of -static are defined in a previous loop. -+ # We used to do the same as -all-static on platforms that -+ # didn't have a PIC flag, but the assumption that the effects -+ # would be equivalent was wrong. It would break on at least -+ # Digital Unix and AIX. -+ continue -+ ;; -+ -+ -thread-safe) -+ thread_safe=yes -+ continue -+ ;; -+ -+ -version-info) -+ prev=vinfo -+ continue -+ ;; -+ -+ -version-number) -+ prev=vinfo -+ vinfo_number=yes -+ continue -+ ;; -+ -+ -weak) -+ prev=weak -+ continue -+ ;; -+ -+ -Wc,*) -+ func_stripname '-Wc,' '' "$arg" -+ args=$func_stripname_result -+ arg= -+ save_ifs="$IFS"; IFS=',' -+ for flag in $args; do -+ IFS="$save_ifs" -+ func_quote_for_eval "$flag" -+ func_append arg " $func_quote_for_eval_result" -+ func_append compiler_flags " $func_quote_for_eval_result" -+ done -+ IFS="$save_ifs" -+ func_stripname ' ' '' "$arg" -+ arg=$func_stripname_result -+ ;; -+ -+ -Wl,*) -+ func_stripname '-Wl,' '' "$arg" -+ args=$func_stripname_result -+ arg= -+ save_ifs="$IFS"; IFS=',' -+ for flag in $args; do -+ IFS="$save_ifs" -+ func_quote_for_eval "$flag" -+ func_append arg " $wl$func_quote_for_eval_result" -+ func_append compiler_flags " $wl$func_quote_for_eval_result" -+ func_append linker_flags " $func_quote_for_eval_result" -+ done -+ IFS="$save_ifs" -+ func_stripname ' ' '' "$arg" -+ arg=$func_stripname_result -+ ;; -+ -+ -Xcompiler) -+ prev=xcompiler -+ continue -+ ;; -+ -+ -Xlinker) -+ prev=xlinker -+ continue -+ ;; -+ -+ -XCClinker) -+ prev=xcclinker -+ continue -+ ;; -+ -+ # -msg_* for osf cc -+ -msg_*) -+ func_quote_for_eval "$arg" -+ arg="$func_quote_for_eval_result" -+ ;; -+ -+ # Flags to be passed through unchanged, with rationale: -+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler -+ # -r[0-9][0-9]* specify processor for the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler -+ # +DA*, +DD* enable 64-bit mode for the HP compiler -+ # -q* compiler args for the IBM compiler -+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC -+ # -F/path path to uninstalled frameworks, gcc on darwin -+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC -+ # @file GCC response files -+ # -tp=* Portland pgcc target processor selection -+ # --sysroot=* for sysroot support -+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) -+ func_quote_for_eval "$arg" -+ arg="$func_quote_for_eval_result" -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ func_append compiler_flags " $arg" -+ continue -+ ;; -+ -+ # Some other compiler flag. -+ -* | +*) -+ func_quote_for_eval "$arg" -+ arg="$func_quote_for_eval_result" -+ ;; - -- if test -n "$rpath"; then -- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 -- fi -+ *.$objext) -+ # A standard object. -+ func_append objs " $arg" -+ ;; - -- if test -n "$xrpath"; then -- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 -- fi -+ *.lo) -+ # A libtool-controlled object. - -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 -- fi -+ # Check to see that this really is a libtool object. -+ if func_lalib_unsafe_p "$arg"; then -+ pic_object= -+ non_pic_object= -+ -+ # Read the .lo file -+ func_source "$arg" -+ -+ if test -z "$pic_object" || -+ test -z "$non_pic_object" || -+ test "$pic_object" = none && -+ test "$non_pic_object" = none; then -+ func_fatal_error "cannot find name of object for \`$arg'" -+ fi -+ -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" -+ -+ if test "$pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ pic_object="$xdir$pic_object" - -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 -- fi -+ if test "$prev" = dlfiles; then -+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -+ func_append dlfiles " $pic_object" -+ prev= -+ continue -+ else -+ # If libtool objects are unsupported, then we need to preload. -+ prev=dlprefiles -+ fi -+ fi - -- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then -- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 -- fi -+ # CHECK ME: I think I busted this. -Ossama -+ if test "$prev" = dlprefiles; then -+ # Preload the old-style object. -+ func_append dlprefiles " $pic_object" -+ prev= -+ fi - -- # Now set the variables for building old libraries. -- build_libtool_libs=no -- oldlibs="$output" -- objs="$objs$old_deplibs" -- ;; -+ # A PIC object. -+ func_append libobjs " $pic_object" -+ arg="$pic_object" -+ fi - -- lib) -- # Make sure we only generate libraries of the form `libNAME.la'. -- case $outputname in -- lib*) -- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -- eval libname=\"$libname_spec\" -- ;; -- *) -- if test "$module" = no; then -- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -- if test "$need_lib_prefix" != no; then -- # Add the "lib" prefix for modules if required -- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -- eval libname=\"$libname_spec\" -+ # Non-PIC object. -+ if test "$non_pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ non_pic_object="$xdir$non_pic_object" -+ -+ # A standard non-PIC object -+ func_append non_pic_objects " $non_pic_object" -+ if test -z "$pic_object" || test "$pic_object" = none ; then -+ arg="$non_pic_object" -+ fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ fi - else -- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -+ # Only an error if not doing a dry-run. -+ if $opt_dry_run; then -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" -+ -+ func_lo2o "$arg" -+ pic_object=$xdir$objdir/$func_lo2o_result -+ non_pic_object=$xdir$func_lo2o_result -+ func_append libobjs " $pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ else -+ func_fatal_error "\`$arg' is not a valid libtool object" -+ fi - fi - ;; -- esac - -- if test -n "$objs"; then -- if test "$deplibs_check_method" != pass_all; then -- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 -- exit 1 -+ *.$libext) -+ # An archive. -+ func_append deplibs " $arg" -+ func_append old_deplibs " $arg" -+ continue -+ ;; -+ -+ *.la) -+ # A libtool-controlled library. -+ -+ func_resolve_sysroot "$arg" -+ if test "$prev" = dlfiles; then -+ # This library was specified with -dlopen. -+ func_append dlfiles " $func_resolve_sysroot_result" -+ prev= -+ elif test "$prev" = dlprefiles; then -+ # The library was specified with -dlpreopen. -+ func_append dlprefiles " $func_resolve_sysroot_result" -+ prev= - else -- echo -- echo "*** Warning: Linking the shared library $output against the non-libtool" -- echo "*** objects $objs is not portable!" -- libobjs="$libobjs $objs" -+ func_append deplibs " $func_resolve_sysroot_result" - fi -- fi -+ continue -+ ;; - -- if test "$dlself" != no; then -- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 -- fi -+ # Some other compiler argument. -+ *) -+ # Unknown arguments in both finalize_command and compile_command need -+ # to be aesthetically quoted because they are evaled later. -+ func_quote_for_eval "$arg" -+ arg="$func_quote_for_eval_result" -+ ;; -+ esac # arg - -- set dummy $rpath -- if test $# -gt 2; then -- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 -+ # Now actually substitute the argument into the commands. -+ if test -n "$arg"; then -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" - fi -- install_libdir="$2" -+ done # argument parsing loop - -- oldlibs= -- if test -z "$rpath"; then -- if test "$build_libtool_libs" = yes; then -- # Building a libtool convenience library. -- libext=al -- oldlibs="$output_objdir/$libname.$libext $oldlibs" -- build_libtool_libs=convenience -- build_old_libs=yes -- fi -+ test -n "$prev" && \ -+ func_fatal_help "the \`$prevarg' option requires an argument" - -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 -- fi -+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -+ eval arg=\"$export_dynamic_flag_spec\" -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ fi - -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 -- fi -- else -+ oldlibs= -+ # calculate the name of the file, without its directory -+ func_basename "$output" -+ outputname="$func_basename_result" -+ libobjs_save="$libobjs" - -- # Parse the version information argument. -- save_ifs="$IFS"; IFS=':' -- set dummy $vinfo 0 0 0 -- IFS="$save_ifs" -+ if test -n "$shlibpath_var"; then -+ # get the directories listed in $shlibpath_var -+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` -+ else -+ shlib_search_path= -+ fi -+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - -- if test -n "$8"; then -- $echo "$modename: too many parameters to \`-version-info'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ func_dirname "$output" "/" "" -+ output_objdir="$func_dirname_result$objdir" -+ func_to_tool_file "$output_objdir/" -+ tool_output_objdir=$func_to_tool_file_result -+ # Create the object directory. -+ func_mkdir_p "$output_objdir" -+ -+ # Determine the type of output -+ case $output in -+ "") -+ func_fatal_help "you must specify an output file" -+ ;; -+ *.$libext) linkmode=oldlib ;; -+ *.lo | *.$objext) linkmode=obj ;; -+ *.la) linkmode=lib ;; -+ *) linkmode=prog ;; # Anything else should be a program. -+ esac - -- current="$2" -- revision="$3" -- age="$4" -+ specialdeplibs= - -- # Check that each of the things are valid numbers. -- case $current in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -- *) -- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 -- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ libs= -+ # Find all interdependent deplibs by searching for libraries -+ # that are linked more than once (e.g. -la -lb -la) -+ for deplib in $deplibs; do -+ if $opt_preserve_dup_deps ; then -+ case "$libs " in -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; -+ esac -+ fi -+ func_append libs " $deplib" -+ done -+ -+ if test "$linkmode" = lib; then -+ libs="$predeps $libs $compiler_lib_search_path $postdeps" -+ -+ # Compute libraries that are listed more than once in $predeps -+ # $postdeps and mark them as special (i.e., whose duplicates are -+ # not to be eliminated). -+ pre_post_deps= -+ if $opt_duplicate_compiler_generated_deps; then -+ for pre_post_dep in $predeps $postdeps; do -+ case "$pre_post_deps " in -+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; -+ esac -+ func_append pre_post_deps " $pre_post_dep" -+ done -+ fi -+ pre_post_deps= -+ fi -+ -+ deplibs= -+ newdependency_libs= -+ newlib_search_path= -+ need_relink=no # whether we're linking any uninstalled libtool libraries -+ notinst_deplibs= # not-installed libtool libraries -+ notinst_path= # paths that contain not-installed libtool libraries -+ -+ case $linkmode in -+ lib) -+ passes="conv dlpreopen link" -+ for file in $dlfiles $dlprefiles; do -+ case $file in -+ *.la) ;; -+ *) -+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" -+ ;; -+ esac -+ done -+ ;; -+ prog) -+ compile_deplibs= -+ finalize_deplibs= -+ alldeplibs=no -+ newdlfiles= -+ newdlprefiles= -+ passes="conv scan dlopen dlpreopen link" -+ ;; -+ *) passes="conv" -+ ;; -+ esac -+ -+ for pass in $passes; do -+ # The preopen pass in lib mode reverses $deplibs; put it back here -+ # so that -L comes before libs that need it for instance... -+ if test "$linkmode,$pass" = "lib,link"; then -+ ## FIXME: Find the place where the list is rebuilt in the wrong -+ ## order, and fix it there properly -+ tmp_deplibs= -+ for deplib in $deplibs; do -+ tmp_deplibs="$deplib $tmp_deplibs" -+ done -+ deplibs="$tmp_deplibs" -+ fi -+ -+ if test "$linkmode,$pass" = "lib,link" || -+ test "$linkmode,$pass" = "prog,scan"; then -+ libs="$deplibs" -+ deplibs= -+ fi -+ if test "$linkmode" = prog; then -+ case $pass in -+ dlopen) libs="$dlfiles" ;; -+ dlpreopen) libs="$dlprefiles" ;; -+ link) -+ libs="$deplibs %DEPLIBS%" -+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac -+ fi -+ if test "$linkmode,$pass" = "lib,dlpreopen"; then -+ # Collect and forward deplibs of preopened libtool libs -+ for lib in $dlprefiles; do -+ # Ignore non-libtool-libs -+ dependency_libs= -+ func_resolve_sysroot "$lib" -+ case $lib in -+ *.la) func_source "$func_resolve_sysroot_result" ;; -+ esac - -- case $revision in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -- *) -- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 -- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ # Collect preopened libtool deplibs, except any this library -+ # has declared as weak libs -+ for deplib in $dependency_libs; do -+ func_basename "$deplib" -+ deplib_base=$func_basename_result -+ case " $weak_libs " in -+ *" $deplib_base "*) ;; -+ *) func_append deplibs " $deplib" ;; -+ esac -+ done -+ done -+ libs="$dlprefiles" -+ fi -+ if test "$pass" = dlopen; then -+ # Collect dlpreopened libraries -+ save_deplibs="$deplibs" -+ deplibs= -+ fi -+ -+ for deplib in $libs; do -+ lib= -+ found=no -+ case $deplib in -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ func_append compiler_flags " $deplib" -+ if test "$linkmode" = lib ; then -+ case "$new_inherited_linker_flags " in -+ *" $deplib "*) ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; -+ esac -+ fi -+ fi -+ continue -+ ;; -+ -l*) -+ if test "$linkmode" != lib && test "$linkmode" != prog; then -+ func_warning "\`-l' is ignored for archives/objects" -+ continue -+ fi -+ func_stripname '-l' '' "$deplib" -+ name=$func_stripname_result -+ if test "$linkmode" = lib; then -+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" -+ else -+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" -+ fi -+ for searchdir in $searchdirs; do -+ for search_ext in .la $std_shrext .so .a; do -+ # Search the libtool library -+ lib="$searchdir/lib${name}${search_ext}" -+ if test -f "$lib"; then -+ if test "$search_ext" = ".la"; then -+ found=yes -+ else -+ found=no -+ fi -+ break 2 -+ fi -+ done -+ done -+ if test "$found" != yes; then -+ # deplib doesn't seem to be a libtool library -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ deplibs="$deplib $deplibs" -+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" -+ fi -+ continue -+ else # deplib is a libtool library -+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, -+ # We need to do some special things here, and not later. -+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -+ case " $predeps $postdeps " in -+ *" $deplib "*) -+ if func_lalib_p "$lib"; then -+ library_names= -+ old_library= -+ func_source "$lib" -+ for l in $old_library $library_names; do -+ ll="$l" -+ done -+ if test "X$ll" = "X$old_library" ; then # only static version available -+ found=no -+ func_dirname "$lib" "" "." -+ ladir="$func_dirname_result" -+ lib=$ladir/$old_library -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ deplibs="$deplib $deplibs" -+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" -+ fi -+ continue -+ fi -+ fi -+ ;; -+ *) ;; -+ esac -+ fi -+ fi -+ ;; # -l -+ *.ltframework) -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ deplibs="$deplib $deplibs" -+ if test "$linkmode" = lib ; then -+ case "$new_inherited_linker_flags " in -+ *" $deplib "*) ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; -+ esac -+ fi -+ fi -+ continue -+ ;; -+ -L*) -+ case $linkmode in -+ lib) -+ deplibs="$deplib $deplibs" -+ test "$pass" = conv && continue -+ newdependency_libs="$deplib $newdependency_libs" -+ func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" -+ ;; -+ prog) -+ if test "$pass" = conv; then -+ deplibs="$deplib $deplibs" -+ continue -+ fi -+ if test "$pass" = scan; then -+ deplibs="$deplib $deplibs" -+ else -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ fi -+ func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" -+ ;; -+ *) -+ func_warning "\`-L' is ignored for archives/objects" -+ ;; -+ esac # linkmode -+ continue -+ ;; # -L -+ -R*) -+ if test "$pass" = link; then -+ func_stripname '-R' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result -+ # Make sure the xrpath contains only unique directories. -+ case "$xrpath " in -+ *" $dir "*) ;; -+ *) func_append xrpath " $dir" ;; -+ esac -+ fi -+ deplibs="$deplib $deplibs" -+ continue -+ ;; -+ *.la) -+ func_resolve_sysroot "$deplib" -+ lib=$func_resolve_sysroot_result -+ ;; -+ *.$libext) -+ if test "$pass" = conv; then -+ deplibs="$deplib $deplibs" -+ continue -+ fi -+ case $linkmode in -+ lib) -+ # Linking convenience modules into shared libraries is allowed, -+ # but linking other static libraries is non-portable. -+ case " $dlpreconveniencelibs " in -+ *" $deplib "*) ;; -+ *) -+ valid_a_lib=no -+ case $deplibs_check_method in -+ match_pattern*) -+ set dummy $deplibs_check_method; shift -+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` -+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ -+ | $EGREP "$match_pattern_regex" > /dev/null; then -+ valid_a_lib=yes -+ fi -+ ;; -+ pass_all) -+ valid_a_lib=yes -+ ;; -+ esac -+ if test "$valid_a_lib" != yes; then -+ echo -+ $ECHO "*** Warning: Trying to link with static lib archive $deplib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because the file extensions .$libext of this argument makes me believe" -+ echo "*** that it is just a static archive that I should not use here." -+ else -+ echo -+ $ECHO "*** Warning: Linking the shared library $output against the" -+ $ECHO "*** static library $deplib is not portable!" -+ deplibs="$deplib $deplibs" -+ fi -+ ;; -+ esac -+ continue -+ ;; -+ prog) -+ if test "$pass" != link; then -+ deplibs="$deplib $deplibs" -+ else -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ fi -+ continue -+ ;; -+ esac # linkmode -+ ;; # *.$libext -+ *.lo | *.$objext) -+ if test "$pass" = conv; then -+ deplibs="$deplib $deplibs" -+ elif test "$linkmode" = prog; then -+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ # If there is no dlopen support or we're linking statically, -+ # we need to preload. -+ func_append newdlprefiles " $deplib" -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ func_append newdlfiles " $deplib" -+ fi -+ fi -+ continue - ;; -- esac -- -- case $age in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -- *) -- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 -- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ %DEPLIBS%) -+ alldeplibs=yes -+ continue - ;; -- esac -+ esac # case $deplib - -- if test $age -gt $current; then -- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 -- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ if test "$found" = yes || test -f "$lib"; then : -+ else -+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - -- # Calculate the version variables. -- major= -- versuffix= -- verstring= -- case $version_type in -- none) ;; -+ # Check to see that this really is a libtool archive. -+ func_lalib_unsafe_p "$lib" \ -+ || func_fatal_error "\`$lib' is not a valid libtool archive" - -- darwin) -- # Like Linux, but with the current version available in -- # verstring for coding it into the library header -- major=.`expr $current - $age` -- versuffix="$major.$age.$revision" -- # Darwin ld doesn't like 0 for these options... -- minor_current=`expr $current + 1` -- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" -- ;; -+ func_dirname "$lib" "" "." -+ ladir="$func_dirname_result" - -- freebsd-aout) -- major=".$current" -- versuffix=".$current.$revision"; -- ;; -+ dlname= -+ dlopen= -+ dlpreopen= -+ libdir= -+ library_names= -+ old_library= -+ inherited_linker_flags= -+ # If the library was installed with an old release of libtool, -+ # it will not redefine variables installed, or shouldnotlink -+ installed=yes -+ shouldnotlink=no -+ avoidtemprpath= - -- freebsd-elf) -- major=".$current" -- versuffix=".$current"; -- ;; - -- irix) -- major=`expr $current - $age + 1` -- verstring="sgi$major.$revision" -+ # Read the .la file -+ func_source "$lib" - -- # Add in all the interfaces that we are compatible with. -- loop=$revision -- while test $loop != 0; do -- iface=`expr $revision - $loop` -- loop=`expr $loop - 1` -- verstring="sgi$major.$iface:$verstring" -+ # Convert "-framework foo" to "foo.ltframework" -+ if test -n "$inherited_linker_flags"; then -+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` -+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do -+ case " $new_inherited_linker_flags " in -+ *" $tmp_inherited_linker_flag "*) ;; -+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; -+ esac - done -+ fi -+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ if test "$linkmode,$pass" = "lib,link" || -+ test "$linkmode,$pass" = "prog,scan" || -+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then -+ test -n "$dlopen" && func_append dlfiles " $dlopen" -+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" -+ fi - -- # Before this point, $major must not contain `.'. -- major=.$major -- versuffix="$major.$revision" -- ;; -- -- linux) -- major=.`expr $current - $age` -- versuffix="$major.$age.$revision" -- ;; -+ if test "$pass" = conv; then -+ # Only check for convenience libraries -+ deplibs="$lib $deplibs" -+ if test -z "$libdir"; then -+ if test -z "$old_library"; then -+ func_fatal_error "cannot find name of link library for \`$lib'" -+ fi -+ # It is a libtool convenience library, so add in its objects. -+ func_append convenience " $ladir/$objdir/$old_library" -+ func_append old_convenience " $ladir/$objdir/$old_library" -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ deplibs="$deplib $deplibs" -+ if $opt_preserve_dup_deps ; then -+ case "$tmp_libs " in -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; -+ esac -+ fi -+ func_append tmp_libs " $deplib" -+ done -+ elif test "$linkmode" != prog && test "$linkmode" != lib; then -+ func_fatal_error "\`$lib' is not a convenience library" -+ fi -+ continue -+ fi # $pass = conv - -- osf) -- major=`expr $current - $age` -- versuffix=".$current.$age.$revision" -- verstring="$current.$age.$revision" - -- # Add in all the interfaces that we are compatible with. -- loop=$age -- while test $loop != 0; do -- iface=`expr $current - $loop` -- loop=`expr $loop - 1` -- verstring="$verstring:${iface}.0" -+ # Get the name of the library we link against. -+ linklib= -+ if test -n "$old_library" && -+ { test "$prefer_static_libs" = yes || -+ test "$prefer_static_libs,$installed" = "built,no"; }; then -+ linklib=$old_library -+ else -+ for l in $old_library $library_names; do -+ linklib="$l" - done -+ fi -+ if test -z "$linklib"; then -+ func_fatal_error "cannot find name of link library for \`$lib'" -+ fi - -- # Make executables depend on our current version. -- verstring="$verstring:${current}.0" -- ;; -- -- sunos) -- major=".$current" -- versuffix=".$current.$revision" -- ;; -- -- windows) -- # Use '-' rather than '.', since we only want one -- # extension on DOS 8.3 filesystems. -- major=`expr $current - $age` -- versuffix="-$major" -- ;; -+ # This library was specified with -dlopen. -+ if test "$pass" = dlopen; then -+ if test -z "$libdir"; then -+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'" -+ fi -+ if test -z "$dlname" || -+ test "$dlopen_support" != yes || -+ test "$build_libtool_libs" = no; then -+ # If there is no dlname, no dlopen support or we're linking -+ # statically, we need to preload. We also need to preload any -+ # dependent libraries so libltdl's deplib preloader doesn't -+ # bomb out in the load deplibs phase. -+ func_append dlprefiles " $lib $dependency_libs" -+ else -+ func_append newdlfiles " $lib" -+ fi -+ continue -+ fi # $pass = dlopen - -+ # We need an absolute path. -+ case $ladir in -+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) -- $echo "$modename: unknown library version type \`$version_type'" 1>&2 -- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ abs_ladir=`cd "$ladir" && pwd` -+ if test -z "$abs_ladir"; then -+ func_warning "cannot determine absolute directory name of \`$ladir'" -+ func_warning "passing it literally to the linker, although it might fail" -+ abs_ladir="$ladir" -+ fi - ;; - esac -+ func_basename "$lib" -+ laname="$func_basename_result" - -- # Clear the version info if we defaulted, and they specified a release. -- if test -z "$vinfo" && test -n "$release"; then -- major= -- verstring="0.0" -- case $version_type in -- darwin) -- # we can't check for "0.0" in archive_cmds due to quoting -- # problems, so we reset it completely -- verstring="" -+ # Find the relevant object directory and library name. -+ if test "X$installed" = Xyes; then -+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ func_warning "library \`$lib' was moved." -+ dir="$ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ else -+ dir="$lt_sysroot$libdir" -+ absdir="$lt_sysroot$libdir" -+ fi -+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes -+ else -+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ dir="$ladir" -+ absdir="$abs_ladir" -+ # Remove this search path later -+ func_append notinst_path " $abs_ladir" -+ else -+ dir="$ladir/$objdir" -+ absdir="$abs_ladir/$objdir" -+ # Remove this search path later -+ func_append notinst_path " $abs_ladir" -+ fi -+ fi # $installed = yes -+ func_stripname 'lib' '.la' "$laname" -+ name=$func_stripname_result -+ -+ # This library was specified with -dlpreopen. -+ if test "$pass" = dlpreopen; then -+ if test -z "$libdir" && test "$linkmode" = prog; then -+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" -+ fi -+ case "$host" in -+ # special handling for platforms with PE-DLLs. -+ *cygwin* | *mingw* | *cegcc* ) -+ # Linker will automatically link against shared library if both -+ # static and shared are present. Therefore, ensure we extract -+ # symbols from the import library if a shared library is present -+ # (otherwise, the dlopen module name will be incorrect). We do -+ # this by putting the import library name into $newdlprefiles. -+ # We recover the dlopen module name by 'saving' the la file -+ # name in a special purpose variable, and (later) extracting the -+ # dlname from the la file. -+ if test -n "$dlname"; then -+ func_tr_sh "$dir/$linklib" -+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" -+ func_append newdlprefiles " $dir/$linklib" -+ else -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ fi - ;; -- *) -- verstring="0.0" -+ * ) -+ # Prefer using a static library (so that no silly _DYNAMIC symbols -+ # are required to link). -+ if test -n "$old_library"; then -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ # Otherwise, use the dlname, so that lt_dlopen finds it. -+ elif test -n "$dlname"; then -+ func_append newdlprefiles " $dir/$dlname" -+ else -+ func_append newdlprefiles " $dir/$linklib" -+ fi - ;; - esac -- if test "$need_version" = no; then -- versuffix= -+ fi # $pass = dlpreopen -+ -+ if test -z "$libdir"; then -+ # Link the convenience library -+ if test "$linkmode" = lib; then -+ deplibs="$dir/$old_library $deplibs" -+ elif test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$dir/$old_library $compile_deplibs" -+ finalize_deplibs="$dir/$old_library $finalize_deplibs" - else -- versuffix=".0.0" -+ deplibs="$lib $deplibs" # used for prog,scan pass - fi -+ continue - fi - -- # Remove version info from name if versioning should be avoided -- if test "$avoid_version" = yes && test "$need_version" = no; then -- major= -- versuffix= -- verstring="" -- fi - -- # Check to see if the archive will have undefined symbols. -- if test "$allow_undefined" = yes; then -- if test "$allow_undefined_flag" = unsupported; then -- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 -- build_libtool_libs=no -- build_old_libs=yes -- fi -- else -- # Don't allow undefined symbols. -- allow_undefined_flag="$no_undefined_flag" -- fi -- fi -+ if test "$linkmode" = prog && test "$pass" != link; then -+ func_append newlib_search_path " $ladir" -+ deplibs="$lib $deplibs" - -- if test "$mode" != relink; then -- # Remove our outputs. -- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" -- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* -- fi -+ linkalldeplibs=no -+ if test "$link_all_deplibs" != no || test -z "$library_names" || -+ test "$build_libtool_libs" = no; then -+ linkalldeplibs=yes -+ fi - -- # Now set the variables for building old libraries. -- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then -- oldlibs="$oldlibs $output_objdir/$libname.$libext" -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ case $deplib in -+ -L*) func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" -+ ;; -+ esac -+ # Need to link against all dependency_libs? -+ if test "$linkalldeplibs" = yes; then -+ deplibs="$deplib $deplibs" -+ else -+ # Need to hardcode shared library paths -+ # or/and link against static libraries -+ newdependency_libs="$deplib $newdependency_libs" -+ fi -+ if $opt_preserve_dup_deps ; then -+ case "$tmp_libs " in -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; -+ esac -+ fi -+ func_append tmp_libs " $deplib" -+ done # for deplib -+ continue -+ fi # $linkmode = prog... - -- # Transform .lo files to .o files. -- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` -- fi -+ if test "$linkmode,$pass" = "prog,link"; then -+ if test -n "$library_names" && -+ { { test "$prefer_static_libs" = no || -+ test "$prefer_static_libs,$installed" = "built,yes"; } || -+ test -z "$old_library"; }; then -+ # We need to hardcode the library path -+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then -+ # Make sure the rpath contains only unique directories. -+ case "$temp_rpath:" in -+ *"$absdir:"*) ;; -+ *) func_append temp_rpath "$absdir:" ;; -+ esac -+ fi - -- # Eliminate all temporary directories. -- for path in $notinst_path; do -- lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` -- deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` -- dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` -- done -+ # Hardcode the library path. -+ # Skip directories that are in the system default run-time -+ # search path. -+ case " $sys_lib_dlsearch_path " in -+ *" $absdir "*) ;; -+ *) -+ case "$compile_rpath " in -+ *" $absdir "*) ;; -+ *) func_append compile_rpath " $absdir" ;; -+ esac -+ ;; -+ esac -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) -+ case "$finalize_rpath " in -+ *" $libdir "*) ;; -+ *) func_append finalize_rpath " $libdir" ;; -+ esac -+ ;; -+ esac -+ fi # $linkmode,$pass = prog,link... - -- if test -n "$xrpath"; then -- # If the user specified any rpath flags, then add them. -- temp_xrpath= -- for libdir in $xrpath; do -- temp_xrpath="$temp_xrpath -R$libdir" -- case "$finalize_rpath " in -- *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -- esac -- done -- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then -- dependency_libs="$temp_xrpath $dependency_libs" -+ if test "$alldeplibs" = yes && -+ { test "$deplibs_check_method" = pass_all || -+ { test "$build_libtool_libs" = yes && -+ test -n "$library_names"; }; }; then -+ # We only need to search for static libraries -+ continue -+ fi - fi -- fi -- -- # Make sure dlfiles contains only unique files that won't be dlpreopened -- old_dlfiles="$dlfiles" -- dlfiles= -- for lib in $old_dlfiles; do -- case " $dlprefiles $dlfiles " in -- *" $lib "*) ;; -- *) dlfiles="$dlfiles $lib" ;; -- esac -- done -- -- # Make sure dlprefiles contains only unique files -- old_dlprefiles="$dlprefiles" -- dlprefiles= -- for lib in $old_dlprefiles; do -- case "$dlprefiles " in -- *" $lib "*) ;; -- *) dlprefiles="$dlprefiles $lib" ;; -- esac -- done - -- if test "$build_libtool_libs" = yes; then -- if test -n "$rpath"; then -+ link_static=no # Whether the deplib will be linked statically -+ use_static_libs=$prefer_static_libs -+ if test "$use_static_libs" = built && test "$installed" = yes; then -+ use_static_libs=no -+ fi -+ if test -n "$library_names" && -+ { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) -- # these systems don't actually have a c library (as such)! -- ;; -- *-*-rhapsody* | *-*-darwin1.[012]) -- # Rhapsody C library is in the System framework -- deplibs="$deplibs -framework System" -- ;; -- *-*-netbsd*) -- # Don't link with libc until the a.out ld.so is fixed. -- ;; -- *-*-openbsd*) -- # Do not include libc due to us having libc/libc_r. -+ *cygwin* | *mingw* | *cegcc*) -+ # No point in relinking DLLs because paths are not encoded -+ func_append notinst_deplibs " $lib" -+ need_relink=no - ;; - *) -- # Add libc to deplibs on all other systems if necessary. -- if test $build_libtool_need_lc = "yes"; then -- deplibs="$deplibs -lc" -+ if test "$installed" = no; then -+ func_append notinst_deplibs " $lib" -+ need_relink=yes - fi - ;; - esac -- fi -+ # This is a shared library - -- # Transform deplibs into only deplibs that can be linked in shared. -- name_save=$name -- libname_save=$libname -- release_save=$release -- versuffix_save=$versuffix -- major_save=$major -- # I'm not sure if I'm treating the release correctly. I think -- # release should show up in the -l (ie -lgmp5) so we don't want to -- # add it in twice. Is that correct? -- release="" -- versuffix="" -- major="" -- newdeplibs= -- droppeddeps=no -- case $deplibs_check_method in -- pass_all) -- # Don't check for shared/static. Everything works. -- # This might be a little naive. We might want to check -- # whether the library exists or not. But this is on -- # osf3 & osf4 and I'm not really sure... Just -- # implementing what was already the behaviour. -- newdeplibs=$deplibs -- ;; -- test_compile) -- # This code stresses the "libraries are programs" paradigm to its -- # limits. Maybe even breaks it. We compile a program, linking it -- # against the deplibs as a proxy for the library. Then we can check -- # whether they linked in statically or dynamically with ldd. -- $rm conftest.c -- cat > conftest.c < /dev/null | -+ $GREP ": [^:]* bundle" >/dev/null ; then -+ if test "X$dlopenmodule" != "X$lib"; then -+ $ECHO "*** Warning: lib $linklib is a module, not a shared library" -+ if test -z "$old_library" ; then -+ echo -+ echo "*** And there doesn't seem to be a static archive available" -+ echo "*** The link will probably fail, sorry" -+ else -+ add="$dir/$old_library" -+ fi -+ elif test -n "$old_library"; then -+ add="$dir/$old_library" -+ fi -+ fi -+ esac -+ elif test "$hardcode_minus_L" = no; then -+ case $host in -+ *-*-sunos*) add_shlibpath="$dir" ;; -+ esac -+ add_dir="-L$dir" -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = no; then -+ add_shlibpath="$dir" -+ add="-l$name" - else -- newdeplibs="$newdeplibs $i" -+ lib_linked=no - fi -- done -- else -- # Error occured in the first compile. Let's try to salvage the situation: -- # Compile a seperate program for each library. -- for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -- # If $name is empty we are operating on a -L argument. -- if test -n "$name" && test "$name" != "0"; then -- $rm conftest -- $CC -o conftest conftest.c $i -- # Did it work? -- if test $? -eq 0 ; then -- ldd_output=`ldd conftest` -- libname=`eval \\$echo \"$libname_spec\"` -- deplib_matches=`eval \\$echo \"$library_names_spec\"` -- set dummy $deplib_matches -- deplib_match=$2 -- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -- else -- droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $i." -- echo "*** I have the capability to make that library automatically link in when" -- echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -- fi -- else -- droppeddeps=yes -- echo -- echo "*** Warning! Library $i is needed by this library but I was not able to" -- echo "*** make it link in! You will probably need to install it or some" -- echo "*** library that it depends on before this library will be fully" -- echo "*** functional. Installing it before continuing would be even better." -+ ;; -+ relink) -+ if test "$hardcode_direct" = yes && -+ test "$hardcode_direct_absolute" = no; then -+ add="$dir/$linklib" -+ elif test "$hardcode_minus_L" = yes; then -+ add_dir="-L$dir" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case $libdir in -+ [\\/]*) -+ func_append add_dir " -L$inst_prefix_dir$libdir" -+ ;; -+ esac - fi -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = yes; then -+ add_shlibpath="$dir" -+ add="-l$name" - else -- newdeplibs="$newdeplibs $i" -- fi -- done -- fi -- ;; -- file_magic*) -- set dummy $deplibs_check_method -- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -- for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -- # If $name is empty we are operating on a -L argument. -- if test -n "$name" && test "$name" != "0"; then -- libname=`eval \\$echo \"$libname_spec\"` -- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -- for potent_lib in $potential_libs; do -- # Follow soft links. -- if ls -lLd "$potent_lib" 2>/dev/null \ -- | grep " -> " >/dev/null; then -- continue -- fi -- # The statement above tries to avoid entering an -- # endless loop below, in case of cyclic links. -- # We might still enter an endless loop, since a link -- # loop can be closed while we follow links, -- # but so what? -- potlib="$potent_lib" -- while test -h "$potlib" 2>/dev/null; do -- potliblink=`ls -ld $potlib | sed 's/.* -> //'` -- case $potliblink in -- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; -- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; -- esac -- done -- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ -- | sed 10q \ -- | egrep "$file_magic_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -- a_deplib="" -- break 2 -- fi -- done -- done -- if test -n "$a_deplib" ; then -- droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $a_deplib." -- echo "*** I have the capability to make that library automatically link in when" -- echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -- fi -- else -- # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -- fi -- done # Gone through all deplibs. -- ;; -- match_pattern*) -- set dummy $deplibs_check_method -- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -- for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -- # If $name is empty we are operating on a -L argument. -- if test -n "$name" && test "$name" != "0"; then -- libname=`eval \\$echo \"$libname_spec\"` -- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -- for potent_lib in $potential_libs; do -- if eval echo \"$potent_lib\" 2>/dev/null \ -- | sed 10q \ -- | egrep "$match_pattern_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -- a_deplib="" -- break 2 -- fi -- done -- done -- if test -n "$a_deplib" ; then -- droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $a_deplib." -- echo "*** I have the capability to make that library automatically link in when" -- echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -+ lib_linked=no - fi -- else -- # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ ;; -+ *) lib_linked=no ;; -+ esac -+ -+ if test "$lib_linked" != yes; then -+ func_fatal_configuration "unsupported hardcode properties" - fi -- done # Gone through all deplibs. -- ;; -- none | unknown | *) -- newdeplibs="" -- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -- -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | -- grep . >/dev/null; then -- echo -- if test "X$deplibs_check_method" = "Xnone"; then -- echo "*** Warning: inter-library dependencies are not supported in this platform." -+ -+ if test -n "$add_shlibpath"; then -+ case :$compile_shlibpath: in -+ *":$add_shlibpath:"*) ;; -+ *) func_append compile_shlibpath "$add_shlibpath:" ;; -+ esac -+ fi -+ if test "$linkmode" = prog; then -+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" -+ test -n "$add" && compile_deplibs="$add $compile_deplibs" - else -- echo "*** Warning: inter-library dependencies are not known to be supported." -+ test -n "$add_dir" && deplibs="$add_dir $deplibs" -+ test -n "$add" && deplibs="$add $deplibs" -+ if test "$hardcode_direct" != yes && -+ test "$hardcode_minus_L" != yes && -+ test "$hardcode_shlibpath_var" = yes; then -+ case :$finalize_shlibpath: in -+ *":$libdir:"*) ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; -+ esac -+ fi - fi -- echo "*** All declared inter-library dependencies are being dropped." -- droppeddeps=yes - fi -- ;; -- esac -- versuffix=$versuffix_save -- major=$major_save -- release=$release_save -- libname=$libname_save -- name=$name_save -- -- case $host in -- *-*-rhapsody* | *-*-darwin1.[012]) -- # On Rhapsody replace the C library is the System framework -- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` -- ;; -- esac - -- if test "$droppeddeps" = yes; then -- if test "$module" = yes; then -- echo -- echo "*** Warning: libtool could not satisfy all declared inter-library" -- echo "*** dependencies of module $libname. Therefore, libtool will create" -- echo "*** a static module, that should work as long as the dlopening" -- echo "*** application is linked with the -dlopen flag." -- if test -z "$global_symbol_pipe"; then -- echo -- echo "*** However, this would only work if libtool was able to extract symbol" -- echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -- echo "*** not find such a program. So, this module is probably useless." -- echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ if test "$linkmode" = prog || test "$opt_mode" = relink; then -+ add_shlibpath= -+ add_dir= -+ add= -+ # Finalize command for both is simple: just hardcode it. -+ if test "$hardcode_direct" = yes && -+ test "$hardcode_direct_absolute" = no; then -+ add="$libdir/$linklib" -+ elif test "$hardcode_minus_L" = yes; then -+ add_dir="-L$libdir" -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = yes; then -+ case :$finalize_shlibpath: in -+ *":$libdir:"*) ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; -+ esac -+ add="-l$name" -+ elif test "$hardcode_automatic" = yes; then -+ if test -n "$inst_prefix_dir" && -+ test -f "$inst_prefix_dir$libdir/$linklib" ; then -+ add="$inst_prefix_dir$libdir/$linklib" -+ else -+ add="$libdir/$linklib" -+ fi -+ else -+ # We cannot seem to hardcode it, guess we'll fake it. -+ add_dir="-L$libdir" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case $libdir in -+ [\\/]*) -+ func_append add_dir " -L$inst_prefix_dir$libdir" -+ ;; -+ esac -+ fi -+ add="-l$name" - fi -- if test "$build_old_libs" = no; then -- oldlibs="$output_objdir/$libname.$libext" -- build_libtool_libs=module -- build_old_libs=yes -+ -+ if test "$linkmode" = prog; then -+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" -+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else -- build_libtool_libs=no -+ test -n "$add_dir" && deplibs="$add_dir $deplibs" -+ test -n "$add" && deplibs="$add $deplibs" - fi -+ fi -+ elif test "$linkmode" = prog; then -+ # Here we assume that one of hardcode_direct or hardcode_minus_L -+ # is not unsupported. This is valid on all known static and -+ # shared platforms. -+ if test "$hardcode_direct" != unsupported; then -+ test -n "$old_library" && linklib="$old_library" -+ compile_deplibs="$dir/$linklib $compile_deplibs" -+ finalize_deplibs="$dir/$linklib $finalize_deplibs" - else -- echo "*** The inter-library dependencies that have been dropped here will be" -- echo "*** automatically added whenever a program is linked with this library" -- echo "*** or is declared to -dlopen it." -+ compile_deplibs="-l$name -L$dir $compile_deplibs" -+ finalize_deplibs="-l$name -L$dir $finalize_deplibs" -+ fi -+ elif test "$build_libtool_libs" = yes; then -+ # Not a shared library -+ if test "$deplibs_check_method" != pass_all; then -+ # We're trying link a shared library against a static one -+ # but the system doesn't support it. - -- if test $allow_undefined = no; then -- echo -- echo "*** Since this library must not contain undefined symbols," -- echo "*** because either the platform does not support them or" -- echo "*** it was explicitly requested with -no-undefined," -- echo "*** libtool will only create a static version of it." -+ # Just print a warning and add the library to dependency_libs so -+ # that the program can be linked against the static library. -+ echo -+ $ECHO "*** Warning: This system can not link to static lib archive $lib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have." -+ if test "$module" = yes; then -+ echo "*** But as you try to build a module library, libtool will still create " -+ echo "*** a static module, that should work as long as the dlopening application" -+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime." -+ if test -z "$global_symbol_pipe"; then -+ echo -+ echo "*** However, this would only work if libtool was able to extract symbol" -+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -+ echo "*** not find such a program. So, this module is probably useless." -+ echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ fi - if test "$build_old_libs" = no; then -- oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi -+ else -+ deplibs="$dir/$old_library $deplibs" -+ link_static=yes - fi -- fi -- # Done checking deplibs! -- deplibs=$newdeplibs -- fi -+ fi # link shared/static library? - -- # All the library-specific variables (install_libdir is set above). -- library_names= -- old_library= -- dlname= -+ if test "$linkmode" = lib; then -+ if test -n "$dependency_libs" && -+ { test "$hardcode_into_libs" != yes || -+ test "$build_old_libs" = yes || -+ test "$link_static" = yes; }; then -+ # Extract -R from dependency_libs -+ temp_deplibs= -+ for libdir in $dependency_libs; do -+ case $libdir in -+ -R*) func_stripname '-R' '' "$libdir" -+ temp_xrpath=$func_stripname_result -+ case " $xrpath " in -+ *" $temp_xrpath "*) ;; -+ *) func_append xrpath " $temp_xrpath";; -+ esac;; -+ *) func_append temp_deplibs " $libdir";; -+ esac -+ done -+ dependency_libs="$temp_deplibs" -+ fi - -- # Test again, we may have decided not to build it any more -- if test "$build_libtool_libs" = yes; then -- if test $hardcode_into_libs = yes; then -- # Hardcode the library paths -- hardcode_libdirs= -- dep_rpath= -- rpath="$finalize_rpath" -- test "$mode" != relink && rpath="$compile_rpath$rpath" -- for libdir in $rpath; do -- if test -n "$hardcode_libdir_flag_spec"; then -- if test -n "$hardcode_libdir_separator"; then -- if test -z "$hardcode_libdirs"; then -- hardcode_libdirs="$libdir" -+ func_append newlib_search_path " $absdir" -+ # Link against this library -+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" -+ # ... and its dependency_libs -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ newdependency_libs="$deplib $newdependency_libs" -+ case $deplib in -+ -L*) func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result";; -+ *) func_resolve_sysroot "$deplib" ;; -+ esac -+ if $opt_preserve_dup_deps ; then -+ case "$tmp_libs " in -+ *" $func_resolve_sysroot_result "*) -+ func_append specialdeplibs " $func_resolve_sysroot_result" ;; -+ esac -+ fi -+ func_append tmp_libs " $func_resolve_sysroot_result" -+ done -+ -+ if test "$link_all_deplibs" != no; then -+ # Add the search paths of all dependency libraries -+ for deplib in $dependency_libs; do -+ path= -+ case $deplib in -+ -L*) path="$deplib" ;; -+ *.la) -+ func_resolve_sysroot "$deplib" -+ deplib=$func_resolve_sysroot_result -+ func_dirname "$deplib" "" "." -+ dir=$func_dirname_result -+ # We need an absolute path. -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -+ *) -+ absdir=`cd "$dir" && pwd` -+ if test -z "$absdir"; then -+ func_warning "cannot determine absolute directory name of \`$dir'" -+ absdir="$dir" -+ fi -+ ;; -+ esac -+ if $GREP "^installed=no" $deplib > /dev/null; then -+ case $host in -+ *-*-darwin*) -+ depdepl= -+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ if test -n "$deplibrary_names" ; then -+ for tmp in $deplibrary_names ; do -+ depdepl=$tmp -+ done -+ if test -f "$absdir/$objdir/$depdepl" ; then -+ depdepl="$absdir/$objdir/$depdepl" -+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` -+ if test -z "$darwin_install_name"; then -+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` -+ fi -+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" -+ path= -+ fi -+ fi -+ ;; -+ *) -+ path="-L$absdir/$objdir" -+ ;; -+ esac - else -- # Just accumulate the unique libdirs. -- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -- ;; -- *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -- ;; -- esac -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ test -z "$libdir" && \ -+ func_fatal_error "\`$deplib' is not a valid libtool archive" -+ test "$absdir" != "$libdir" && \ -+ func_warning "\`$deplib' seems to be moved" -+ -+ path="-L$absdir" - fi -- else -- eval flag=\"$hardcode_libdir_flag_spec\" -- dep_rpath="$dep_rpath $flag" -- fi -- elif test -n "$runpath_var"; then -- case "$perm_rpath " in -- *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ ;; -+ esac -+ case " $deplibs " in -+ *" $path "*) ;; -+ *) deplibs="$path $deplibs" ;; -+ esac -+ done -+ fi # link_all_deplibs != no -+ fi # linkmode = lib -+ done # for deplib in $libs -+ if test "$pass" = link; then -+ if test "$linkmode" = "prog"; then -+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs" -+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" -+ else -+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ fi -+ fi -+ dependency_libs="$newdependency_libs" -+ if test "$pass" = dlpreopen; then -+ # Link the dlpreopened libraries before other libraries -+ for deplib in $save_deplibs; do -+ deplibs="$deplib $deplibs" -+ done -+ fi -+ if test "$pass" != dlopen; then -+ if test "$pass" != conv; then -+ # Make sure lib_search_path contains only unique directories. -+ lib_search_path= -+ for dir in $newlib_search_path; do -+ case "$lib_search_path " in -+ *" $dir "*) ;; -+ *) func_append lib_search_path " $dir" ;; -+ esac -+ done -+ newlib_search_path= -+ fi -+ -+ if test "$linkmode,$pass" != "prog,link"; then -+ vars="deplibs" -+ else -+ vars="compile_deplibs finalize_deplibs" -+ fi -+ for var in $vars dependency_libs; do -+ # Add libraries to $var in reverse order -+ eval tmp_libs=\"\$$var\" -+ new_libs= -+ for deplib in $tmp_libs; do -+ # FIXME: Pedantically, this is the right thing to do, so -+ # that some nasty dependency loop isn't accidentally -+ # broken: -+ #new_libs="$deplib $new_libs" -+ # Pragmatically, this seems to cause very few problems in -+ # practice: -+ case $deplib in -+ -L*) new_libs="$deplib $new_libs" ;; -+ -R*) ;; -+ *) -+ # And here is the reason: when a library appears more -+ # than once as an explicit dependence of a library, or -+ # is implicitly linked in more than once by the -+ # compiler, it is considered special, and multiple -+ # occurrences thereof are not removed. Compare this -+ # with having the same library being listed as a -+ # dependency of multiple other libraries: in this case, -+ # we know (pedantically, we assume) the library does not -+ # need to be listed more than once, so we keep only the -+ # last copy. This is not always right, but it is rare -+ # enough that we require users that really mean to play -+ # such unportable linking tricks to link the library -+ # using -Wl,-lname, so that libtool does not consider it -+ # for duplicate removal. -+ case " $specialdeplibs " in -+ *" $deplib "*) new_libs="$deplib $new_libs" ;; -+ *) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$deplib $new_libs" ;; -+ esac -+ ;; -+ esac -+ ;; -+ esac -+ done -+ tmp_libs= -+ for deplib in $new_libs; do -+ case $deplib in -+ -L*) -+ case " $tmp_libs " in -+ *" $deplib "*) ;; -+ *) func_append tmp_libs " $deplib" ;; - esac -- fi -+ ;; -+ *) func_append tmp_libs " $deplib" ;; -+ esac - done -- # Substitute the hardcoded libdirs into the rpath. -- if test -n "$hardcode_libdir_separator" && -- test -n "$hardcode_libdirs"; then -- libdir="$hardcode_libdirs" -- eval dep_rpath=\"$hardcode_libdir_flag_spec\" -- fi -- if test -n "$runpath_var" && test -n "$perm_rpath"; then -- # We should set the runpath_var. -- rpath= -- for dir in $perm_rpath; do -- rpath="$rpath$dir:" -- done -- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" -- fi -- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" -+ eval $var=\"$tmp_libs\" -+ done # for var -+ fi -+ # Last step: remove runtime libs from dependency_libs -+ # (they stay in deplibs) -+ tmp_libs= -+ for i in $dependency_libs ; do -+ case " $predeps $postdeps $compiler_lib_search_path " in -+ *" $i "*) -+ i="" -+ ;; -+ esac -+ if test -n "$i" ; then -+ func_append tmp_libs " $i" - fi -+ done -+ dependency_libs=$tmp_libs -+ done # for pass -+ if test "$linkmode" = prog; then -+ dlfiles="$newdlfiles" -+ fi -+ if test "$linkmode" = prog || test "$linkmode" = lib; then -+ dlprefiles="$newdlprefiles" -+ fi - -- shlibpath="$finalize_shlibpath" -- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -- if test -n "$shlibpath"; then -- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" -- fi -+ case $linkmode in -+ oldlib) -+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -+ func_warning "\`-dlopen' is ignored for archives" -+ fi - -- # Get the real and link names of the library. -- eval library_names=\"$library_names_spec\" -- set dummy $library_names -- realname="$2" -- shift; shift -+ case " $deplibs" in -+ *\ -l* | *\ -L*) -+ func_warning "\`-l' and \`-L' are ignored for archives" ;; -+ esac - -- if test -n "$soname_spec"; then -- eval soname=\"$soname_spec\" -- else -- soname="$realname" -- fi -- test -z "$dlname" && dlname=$soname -+ test -n "$rpath" && \ -+ func_warning "\`-rpath' is ignored for archives" - -- lib="$output_objdir/$realname" -- for link -- do -- linknames="$linknames $link" -- done -+ test -n "$xrpath" && \ -+ func_warning "\`-R' is ignored for archives" - -- # Ensure that we have .o objects for linkers which dislike .lo -- # (e.g. aix) in case we are running --disable-static -- for obj in $libobjs; do -- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$obj"; then -- xdir="." -- else -- xdir="$xdir" -- fi -- baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` -- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` -- if test ! -f $xdir/$oldobj; then -- $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" -- $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? -- fi -- done -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info/-version-number' is ignored for archives" - -- # Use standard objects if they are pic -- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -+ test -n "$release" && \ -+ func_warning "\`-release' is ignored for archives" - -- # Prepare the list of exported symbols -- if test -z "$export_symbols"; then -- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then -- $show "generating symbol list for \`$libname.la'" -- export_symbols="$output_objdir/$libname.exp" -- $run $rm $export_symbols -- eval cmds=\"$export_symbols_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- if test -n "$export_symbols_regex"; then -- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" -- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' -- $show "$mv \"${export_symbols}T\" \"$export_symbols\"" -- $run eval '$mv "${export_symbols}T" "$export_symbols"' -- fi -- fi -+ test -n "$export_symbols$export_symbols_regex" && \ -+ func_warning "\`-export-symbols' is ignored for archives" -+ -+ # Now set the variables for building old libraries. -+ build_libtool_libs=no -+ oldlibs="$output" -+ func_append objs "$old_deplibs" -+ ;; -+ -+ lib) -+ # Make sure we only generate libraries of the form `libNAME.la'. -+ case $outputname in -+ lib*) -+ func_stripname 'lib' '.la' "$outputname" -+ name=$func_stripname_result -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" -+ ;; -+ *) -+ test "$module" = no && \ -+ func_fatal_help "libtool library \`$output' must begin with \`lib'" -+ -+ if test "$need_lib_prefix" != no; then -+ # Add the "lib" prefix for modules if required -+ func_stripname '' '.la' "$outputname" -+ name=$func_stripname_result -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" -+ else -+ func_stripname '' '.la' "$outputname" -+ libname=$func_stripname_result - fi -+ ;; -+ esac - -- if test -n "$export_symbols" && test -n "$include_expsyms"; then -- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' -+ if test -n "$objs"; then -+ if test "$deplibs_check_method" != pass_all; then -+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" -+ else -+ echo -+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool" -+ $ECHO "*** objects $objs is not portable!" -+ func_append libobjs " $objs" - fi -+ fi - -- if test -n "$convenience"; then -- if test -n "$whole_archive_flag_spec"; then -- eval libobjs=\"\$libobjs $whole_archive_flag_spec\" -- else -- gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "mkdir $gentop" -- $run mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi -- generated="$generated $gentop" -- -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -+ test "$dlself" != no && \ -+ func_warning "\`-dlopen self' is ignored for libtool libraries" - -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "mkdir $xdir" -- $run mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -+ set dummy $rpath -+ shift -+ test "$#" -gt 1 && \ -+ func_warning "ignoring multiple \`-rpath's for a libtool library" - -- libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` -- done -- fi -- fi -+ install_libdir="$1" - -- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then -- eval flag=\"$thread_safe_flag_spec\" -- linker_flags="$linker_flags $flag" -+ oldlibs= -+ if test -z "$rpath"; then -+ if test "$build_libtool_libs" = yes; then -+ # Building a libtool convenience library. -+ # Some compilers have problems with a `.al' extension so -+ # convenience libraries should have the same extension an -+ # archive normally would. -+ oldlibs="$output_objdir/$libname.$libext $oldlibs" -+ build_libtool_libs=convenience -+ build_old_libs=yes - fi - -- # Make a backup of the uninstalled library when relinking -- if test "$mode" = relink; then -- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? -- fi -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - -- # Do each of the archive commands. -- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -- else -- eval cmds=\"$archive_cmds\" -- fi -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -+ test -n "$release" && \ -+ func_warning "\`-release' is ignored for convenience libraries" -+ else -+ -+ # Parse the version information argument. -+ save_ifs="$IFS"; IFS=':' -+ set dummy $vinfo 0 0 0 -+ shift - IFS="$save_ifs" - -- # Restore the uninstalled library and exit -- if test "$mode" = relink; then -- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? -- exit 0 -- fi -+ test -n "$7" && \ -+ func_fatal_help "too many parameters to \`-version-info'" - -- # Create links to the real library. -- for linkname in $linknames; do -- if test "$realname" != "$linkname"; then -- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" -- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? -- fi -- done -+ # convert absolute version numbers to libtool ages -+ # this retains compatibility with .la files and attempts -+ # to make the code below a bit more comprehensible -+ -+ case $vinfo_number in -+ yes) -+ number_major="$1" -+ number_minor="$2" -+ number_revision="$3" -+ # -+ # There are really only two kinds -- those that -+ # use the current revision as the major version -+ # and those that subtract age and use age as -+ # a minor version. But, then there is irix -+ # which has an extra 1 added just for fun -+ # -+ case $version_type in -+ darwin|linux|osf|windows|none) -+ func_arith $number_major + $number_minor -+ current=$func_arith_result -+ age="$number_minor" -+ revision="$number_revision" -+ ;; -+ freebsd-aout|freebsd-elf|qnx|sunos) -+ current="$number_major" -+ revision="$number_minor" -+ age="0" -+ ;; -+ irix|nonstopux) -+ func_arith $number_major + $number_minor -+ current=$func_arith_result -+ age="$number_minor" -+ revision="$number_minor" -+ lt_irix_increment=no -+ ;; -+ *) -+ func_fatal_configuration "$modename: unknown library version type \`$version_type'" -+ ;; -+ esac -+ ;; -+ no) -+ current="$1" -+ revision="$2" -+ age="$3" -+ ;; -+ esac - -- # If -module or -export-dynamic was specified, set the dlname. -- if test "$module" = yes || test "$export_dynamic" = yes; then -- # On all known operating systems, these are identical. -- dlname="$soname" -- fi -- fi -- ;; -+ # Check that each of the things are valid numbers. -+ case $current in -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; -+ *) -+ func_error "CURRENT \`$current' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" -+ ;; -+ esac - -- obj) -- if test -n "$deplibs"; then -- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 -- fi -+ case $revision in -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; -+ *) -+ func_error "REVISION \`$revision' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" -+ ;; -+ esac - -- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 -- fi -+ case $age in -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; -+ *) -+ func_error "AGE \`$age' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" -+ ;; -+ esac - -- if test -n "$rpath"; then -- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 -- fi -+ if test "$age" -gt "$current"; then -+ func_error "AGE \`$age' is greater than the current interface number \`$current'" -+ func_fatal_error "\`$vinfo' is not valid version information" -+ fi - -- if test -n "$xrpath"; then -- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 -- fi -+ # Calculate the version variables. -+ major= -+ versuffix= -+ verstring= -+ case $version_type in -+ none) ;; - -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 -- fi -+ darwin) -+ # Like Linux, but with the current version available in -+ # verstring for coding it into the library header -+ func_arith $current - $age -+ major=.$func_arith_result -+ versuffix="$major.$age.$revision" -+ # Darwin ld doesn't like 0 for these options... -+ func_arith $current + 1 -+ minor_current=$func_arith_result -+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" -+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" -+ ;; - -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 -- fi -+ freebsd-aout) -+ major=".$current" -+ versuffix=".$current.$revision"; -+ ;; - -- case $output in -- *.lo) -- if test -n "$objs$old_deplibs"; then -- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 -- exit 1 -- fi -- libobj="$output" -- obj=`$echo "X$output" | $Xsed -e "$lo2o"` -- ;; -- *) -- libobj= -- obj="$output" -- ;; -- esac -+ freebsd-elf) -+ major=".$current" -+ versuffix=".$current" -+ ;; - -- # Delete the old objects. -- $run $rm $obj $libobj -+ irix | nonstopux) -+ if test "X$lt_irix_increment" = "Xno"; then -+ func_arith $current - $age -+ else -+ func_arith $current - $age + 1 -+ fi -+ major=$func_arith_result - -- # Objects from convenience libraries. This assumes -- # single-version convenience libraries. Whenever we create -- # different ones for PIC/non-PIC, this we'll have to duplicate -- # the extraction. -- reload_conv_objs= -- gentop= -- # reload_cmds runs $LD directly, so let us get rid of -- # -Wl from whole_archive_flag_spec -- wl= -+ case $version_type in -+ nonstopux) verstring_prefix=nonstopux ;; -+ *) verstring_prefix=sgi ;; -+ esac -+ verstring="$verstring_prefix$major.$revision" - -- if test -n "$convenience"; then -- if test -n "$whole_archive_flag_spec"; then -- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" -- else -- gentop="$output_objdir/${obj}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "mkdir $gentop" -- $run mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi -- generated="$generated $gentop" -- -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -+ # Add in all the interfaces that we are compatible with. -+ loop=$revision -+ while test "$loop" -ne 0; do -+ func_arith $revision - $loop -+ iface=$func_arith_result -+ func_arith $loop - 1 -+ loop=$func_arith_result -+ verstring="$verstring_prefix$major.$iface:$verstring" -+ done - -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "mkdir $xdir" -- $run mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -+ # Before this point, $major must not contain `.'. -+ major=.$major -+ versuffix="$major.$revision" -+ ;; -+ -+ linux) -+ func_arith $current - $age -+ major=.$func_arith_result -+ versuffix="$major.$age.$revision" -+ ;; -+ -+ osf) -+ func_arith $current - $age -+ major=.$func_arith_result -+ versuffix=".$current.$age.$revision" -+ verstring="$current.$age.$revision" - -- reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` -+ # Add in all the interfaces that we are compatible with. -+ loop=$age -+ while test "$loop" -ne 0; do -+ func_arith $current - $loop -+ iface=$func_arith_result -+ func_arith $loop - 1 -+ loop=$func_arith_result -+ verstring="$verstring:${iface}.0" - done -- fi -- fi - -- # Create the old-style object. -- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test -+ # Make executables depend on our current version. -+ func_append verstring ":${current}.0" -+ ;; - -- output="$obj" -- eval cmds=\"$reload_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -+ qnx) -+ major=".$current" -+ versuffix=".$current" -+ ;; - -- # Exit if we aren't doing a library object file. -- if test -z "$libobj"; then -- if test -n "$gentop"; then -- $show "${rm}r $gentop" -- $run ${rm}r $gentop -- fi -+ sunos) -+ major=".$current" -+ versuffix=".$current.$revision" -+ ;; -+ -+ windows) -+ # Use '-' rather than '.', since we only want one -+ # extension on DOS 8.3 filesystems. -+ func_arith $current - $age -+ major=$func_arith_result -+ versuffix="-$major" -+ ;; - -- exit 0 -- fi -+ *) -+ func_fatal_configuration "unknown library version type \`$version_type'" -+ ;; -+ esac - -- if test "$build_libtool_libs" != yes; then -- if test -n "$gentop"; then -- $show "${rm}r $gentop" -- $run ${rm}r $gentop -+ # Clear the version info if we defaulted, and they specified a release. -+ if test -z "$vinfo" && test -n "$release"; then -+ major= -+ case $version_type in -+ darwin) -+ # we can't check for "0.0" in archive_cmds due to quoting -+ # problems, so we reset it completely -+ verstring= -+ ;; -+ *) -+ verstring="0.0" -+ ;; -+ esac -+ if test "$need_version" = no; then -+ versuffix= -+ else -+ versuffix=".0.0" -+ fi - fi - -- # Create an invalid libtool object if no PIC, so that we don't -- # accidentally link it into a program. -- $show "echo timestamp > $libobj" -- $run eval "echo timestamp > $libobj" || exit $? -- exit 0 -- fi -+ # Remove version info from name if versioning should be avoided -+ if test "$avoid_version" = yes && test "$need_version" = no; then -+ major= -+ versuffix= -+ verstring="" -+ fi - -- if test -n "$pic_flag" || test "$pic_mode" != default; then -- # Only do commands if we really have different PIC objects. -- reload_objs="$libobjs $reload_conv_objs" -- output="$libobj" -- eval cmds=\"$reload_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- else -- # Just create a symlink. -- $show $rm $libobj -- $run $rm $libobj -- xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$libobj"; then -- xdir="." -+ # Check to see if the archive will have undefined symbols. -+ if test "$allow_undefined" = yes; then -+ if test "$allow_undefined_flag" = unsupported; then -+ func_warning "undefined symbols not allowed in $host shared libraries" -+ build_libtool_libs=no -+ build_old_libs=yes -+ fi - else -- xdir="$xdir" -+ # Don't allow undefined symbols. -+ allow_undefined_flag="$no_undefined_flag" - fi -- baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` -- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` -- $show "(cd $xdir && $LN_S $oldobj $baseobj)" -- $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? -- fi - -- if test -n "$gentop"; then -- $show "${rm}r $gentop" -- $run ${rm}r $gentop - fi - -- exit 0 -- ;; -- -- prog) -- case $host in -- *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; -- esac -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 -+ func_generate_dlsyms "$libname" "$libname" "yes" -+ func_append libobjs " $symfileobj" -+ test "X$libobjs" = "X " && libobjs= -+ -+ if test "$opt_mode" != relink; then -+ # Remove our outputs, but don't remove object files since they -+ # may have been created when compiling PIC objects. -+ removelist= -+ tempremovelist=`$ECHO "$output_objdir/*"` -+ for p in $tempremovelist; do -+ case $p in -+ *.$objext | *.gcno) -+ ;; -+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) -+ if test "X$precious_files_regex" != "X"; then -+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 -+ then -+ continue -+ fi -+ fi -+ func_append removelist " $p" -+ ;; -+ *) ;; -+ esac -+ done -+ test -n "$removelist" && \ -+ func_show_eval "${RM}r \$removelist" - fi - -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 -- fi -+ # Now set the variables for building old libraries. -+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then -+ func_append oldlibs " $output_objdir/$libname.$libext" - -- if test "$preload" = yes; then -- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && -- test "$dlopen_self_static" = unknown; then -- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." -- fi -+ # Transform .lo files to .o files. -+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - -- case $host in -- *-*-rhapsody* | *-*-darwin1.[012]) -- # On Rhapsody replace the C library is the System framework -- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -- ;; -- esac -- -- compile_command="$compile_command $compile_deplibs" -- finalize_command="$finalize_command $finalize_deplibs" -+ # Eliminate all temporary directories. -+ #for path in $notinst_path; do -+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` -+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` -+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` -+ #done - -- if test -n "$rpath$xrpath"; then -+ if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. -- for libdir in $rpath $xrpath; do -- # This is the magic to use -rpath. -+ temp_xrpath= -+ for libdir in $xrpath; do -+ func_replace_sysroot "$libdir" -+ func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done -+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -+ dependency_libs="$temp_xrpath $dependency_libs" -+ fi - fi - -- # Now hardcode the library paths -- rpath= -- hardcode_libdirs= -- for libdir in $compile_rpath $finalize_rpath; do -- if test -n "$hardcode_libdir_flag_spec"; then -- if test -n "$hardcode_libdir_separator"; then -- if test -z "$hardcode_libdirs"; then -- hardcode_libdirs="$libdir" -+ # Make sure dlfiles contains only unique files that won't be dlpreopened -+ old_dlfiles="$dlfiles" -+ dlfiles= -+ for lib in $old_dlfiles; do -+ case " $dlprefiles $dlfiles " in -+ *" $lib "*) ;; -+ *) func_append dlfiles " $lib" ;; -+ esac -+ done -+ -+ # Make sure dlprefiles contains only unique files -+ old_dlprefiles="$dlprefiles" -+ dlprefiles= -+ for lib in $old_dlprefiles; do -+ case "$dlprefiles " in -+ *" $lib "*) ;; -+ *) func_append dlprefiles " $lib" ;; -+ esac -+ done -+ -+ if test "$build_libtool_libs" = yes; then -+ if test -n "$rpath"; then -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) -+ # these systems don't actually have a c library (as such)! -+ ;; -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # Rhapsody C library is in the System framework -+ func_append deplibs " System.ltframework" -+ ;; -+ *-*-netbsd*) -+ # Don't link with libc until the a.out ld.so is fixed. -+ ;; -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) -+ # Do not include libc due to us having libc/libc_r. -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work -+ ;; -+ *) -+ # Add libc to deplibs on all other systems if necessary. -+ if test "$build_libtool_need_lc" = "yes"; then -+ func_append deplibs " -lc" -+ fi -+ ;; -+ esac -+ fi -+ -+ # Transform deplibs into only deplibs that can be linked in shared. -+ name_save=$name -+ libname_save=$libname -+ release_save=$release -+ versuffix_save=$versuffix -+ major_save=$major -+ # I'm not sure if I'm treating the release correctly. I think -+ # release should show up in the -l (ie -lgmp5) so we don't want to -+ # add it in twice. Is that correct? -+ release="" -+ versuffix="" -+ major="" -+ newdeplibs= -+ droppeddeps=no -+ case $deplibs_check_method in -+ pass_all) -+ # Don't check for shared/static. Everything works. -+ # This might be a little naive. We might want to check -+ # whether the library exists or not. But this is on -+ # osf3 & osf4 and I'm not really sure... Just -+ # implementing what was already the behavior. -+ newdeplibs=$deplibs -+ ;; -+ test_compile) -+ # This code stresses the "libraries are programs" paradigm to its -+ # limits. Maybe even breaks it. We compile a program, linking it -+ # against the deplibs as a proxy for the library. Then we can check -+ # whether they linked in statically or dynamically with ldd. -+ $opt_dry_run || $RM conftest.c -+ cat > conftest.c </dev/null` -+ $nocaseglob -+ else -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ fi -+ for potent_lib in $potential_libs; do -+ # Follow soft links. -+ if ls -lLd "$potent_lib" 2>/dev/null | -+ $GREP " -> " >/dev/null; then -+ continue -+ fi -+ # The statement above tries to avoid entering an -+ # endless loop below, in case of cyclic links. -+ # We might still enter an endless loop, since a link -+ # loop can be closed while we follow links, -+ # but so what? -+ potlib="$potent_lib" -+ while test -h "$potlib" 2>/dev/null; do -+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` -+ case $potliblink in -+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; -+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; -+ esac -+ done -+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | -+ $SED -e 10q | -+ $EGREP "$file_magic_regex" > /dev/null; then -+ func_append newdeplibs " $a_deplib" -+ a_deplib="" -+ break 2 -+ fi -+ done -+ done -+ fi -+ if test -n "$a_deplib" ; then -+ droppeddeps=yes -+ echo -+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because I did check the linker path looking for a file starting" -+ if test -z "$potlib" ; then -+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)" -+ else -+ $ECHO "*** with $libname and none of the candidates passed a file format test" -+ $ECHO "*** using a file magic. Last file checked: $potlib" -+ fi -+ fi -+ ;; -+ *) -+ # Add a -L argument. -+ func_append newdeplibs " $a_deplib" -+ ;; -+ esac -+ done # Gone through all deplibs. -+ ;; -+ match_pattern*) -+ set dummy $deplibs_check_method; shift -+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` -+ for a_deplib in $deplibs; do -+ case $a_deplib in -+ -l*) -+ func_stripname -l '' "$a_deplib" -+ name=$func_stripname_result -+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -+ case " $predeps $postdeps " in -+ *" $a_deplib "*) -+ func_append newdeplibs " $a_deplib" -+ a_deplib="" -+ ;; -+ esac -+ fi -+ if test -n "$a_deplib" ; then -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -+ for potent_lib in $potential_libs; do -+ potlib="$potent_lib" # see symlink-check above in file_magic test -+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ -+ $EGREP "$match_pattern_regex" > /dev/null; then -+ func_append newdeplibs " $a_deplib" -+ a_deplib="" -+ break 2 -+ fi -+ done -+ done -+ fi -+ if test -n "$a_deplib" ; then -+ droppeddeps=yes -+ echo -+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because I did check the linker path looking for a file starting" -+ if test -z "$potlib" ; then -+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" -+ else -+ $ECHO "*** with $libname and none of the candidates passed a file format test" -+ $ECHO "*** using a regex pattern. Last file checked: $potlib" -+ fi -+ fi -+ ;; -+ *) -+ # Add a -L argument. -+ func_append newdeplibs " $a_deplib" -+ ;; -+ esac -+ done # Gone through all deplibs. -+ ;; -+ none | unknown | *) -+ newdeplibs="" -+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` -+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -+ for i in $predeps $postdeps ; do -+ # can't use Xsed below, because $i might contain '/' -+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` -+ done -+ fi -+ case $tmp_deplibs in -+ *[!\ \ ]*) -+ echo -+ if test "X$deplibs_check_method" = "Xnone"; then -+ echo "*** Warning: inter-library dependencies are not supported in this platform." - else -- # Just accumulate the unique libdirs. -- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -- ;; -- *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -- ;; -- esac -+ echo "*** Warning: inter-library dependencies are not known to be supported." - fi -- else -- eval flag=\"$hardcode_libdir_flag_spec\" -- rpath="$rpath $flag" -- fi -- elif test -n "$runpath_var"; then -- case "$perm_rpath " in -- *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ echo "*** All declared inter-library dependencies are being dropped." -+ droppeddeps=yes -+ ;; - esac -- fi -+ ;; -+ esac -+ versuffix=$versuffix_save -+ major=$major_save -+ release=$release_save -+ libname=$libname_save -+ name=$name_save -+ - case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -- case :$dllsearchpath: in -- *":$libdir:"*) ;; -- *) dllsearchpath="$dllsearchpath:$libdir";; -- esac -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # On Rhapsody replace the C library with the System framework -+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac -- done -- # Substitute the hardcoded libdirs into the rpath. -- if test -n "$hardcode_libdir_separator" && -- test -n "$hardcode_libdirs"; then -- libdir="$hardcode_libdirs" -- eval rpath=\" $hardcode_libdir_flag_spec\" -- fi -- compile_rpath="$rpath" - -- rpath= -- hardcode_libdirs= -- for libdir in $finalize_rpath; do -- if test -n "$hardcode_libdir_flag_spec"; then -- if test -n "$hardcode_libdir_separator"; then -- if test -z "$hardcode_libdirs"; then -- hardcode_libdirs="$libdir" -+ if test "$droppeddeps" = yes; then -+ if test "$module" = yes; then -+ echo -+ echo "*** Warning: libtool could not satisfy all declared inter-library" -+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create" -+ echo "*** a static module, that should work as long as the dlopening" -+ echo "*** application is linked with the -dlopen flag." -+ if test -z "$global_symbol_pipe"; then -+ echo -+ echo "*** However, this would only work if libtool was able to extract symbol" -+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -+ echo "*** not find such a program. So, this module is probably useless." -+ echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ fi -+ if test "$build_old_libs" = no; then -+ oldlibs="$output_objdir/$libname.$libext" -+ build_libtool_libs=module -+ build_old_libs=yes - else -- # Just accumulate the unique libdirs. -- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -- ;; -- *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -- ;; -- esac -+ build_libtool_libs=no - fi - else -- eval flag=\"$hardcode_libdir_flag_spec\" -- rpath="$rpath $flag" -- fi -- elif test -n "$runpath_var"; then -- case "$finalize_perm_rpath " in -- *" $libdir "*) ;; -- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; -- esac -- fi -- done -- # Substitute the hardcoded libdirs into the rpath. -- if test -n "$hardcode_libdir_separator" && -- test -n "$hardcode_libdirs"; then -- libdir="$hardcode_libdirs" -- eval rpath=\" $hardcode_libdir_flag_spec\" -- fi -- finalize_rpath="$rpath" -- -- if test -n "$libobjs" && test "$build_old_libs" = yes; then -- # Transform all the library objects into standard objects. -- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -- fi -+ echo "*** The inter-library dependencies that have been dropped here will be" -+ echo "*** automatically added whenever a program is linked with this library" -+ echo "*** or is declared to -dlopen it." - -- dlsyms= -- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -- if test -n "$NM" && test -n "$global_symbol_pipe"; then -- dlsyms="${outputname}S.c" -- else -- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 -+ if test "$allow_undefined" = no; then -+ echo -+ echo "*** Since this library must not contain undefined symbols," -+ echo "*** because either the platform does not support them or" -+ echo "*** it was explicitly requested with -no-undefined," -+ echo "*** libtool will only create a static version of it." -+ if test "$build_old_libs" = no; then -+ oldlibs="$output_objdir/$libname.$libext" -+ build_libtool_libs=module -+ build_old_libs=yes -+ else -+ build_libtool_libs=no -+ fi -+ fi -+ fi - fi -+ # Done checking deplibs! -+ deplibs=$newdeplibs - fi -+ # Time to change all our "foo.ltframework" stuff back to "-framework foo" -+ case $host in -+ *-*-darwin*) -+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ ;; -+ esac - -- if test -n "$dlsyms"; then -- case $dlsyms in -- "") ;; -- *.c) -- # Discover the nlist of each of the dlfiles. -- nlist="$output_objdir/${outputname}.nm" -- -- $show "$rm $nlist ${nlist}S ${nlist}T" -- $run $rm "$nlist" "${nlist}S" "${nlist}T" -- -- # Parse the name list into a source file. -- $show "creating $output_objdir/$dlsyms" -- -- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ --/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ --/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ -- --#ifdef __cplusplus --extern \"C\" { --#endif -- --/* Prevent the only kind of declaration conflicts we can make. */ --#define lt_preloaded_symbols some_other_symbol -- --/* External symbol declarations for the compiler. */\ --" -- -- if test "$dlself" = yes; then -- $show "generating symbol list for \`$output'" -- -- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" -- -- # Add our own program objects to the symbol list. -- progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -- for arg in $progfiles; do -- $show "extracting global C symbols from \`$arg'" -- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" -- done -- -- if test -n "$exclude_expsyms"; then -- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -- $run eval '$mv "$nlist"T "$nlist"' -- fi -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $deplibs " in -+ *" -L$path/$objdir "*) -+ func_append new_libs " -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) func_append new_libs " $deplib" ;; -+ esac -+ ;; -+ *) func_append new_libs " $deplib" ;; -+ esac -+ done -+ deplibs="$new_libs" - -- if test -n "$export_symbols_regex"; then -- $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' -- $run eval '$mv "$nlist"T "$nlist"' -- fi -+ # All the library-specific variables (install_libdir is set above). -+ library_names= -+ old_library= -+ dlname= - -- # Prepare the list of exported symbols -- if test -z "$export_symbols"; then -- export_symbols="$output_objdir/$output.exp" -- $run $rm $export_symbols -- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -- else -- $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' -- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' -- $run eval 'mv "$nlist"T "$nlist"' -+ # Test again, we may have decided not to build it any more -+ if test "$build_libtool_libs" = yes; then -+ if test "$hardcode_into_libs" = yes; then -+ # Hardcode the library paths -+ hardcode_libdirs= -+ dep_rpath= -+ rpath="$finalize_rpath" -+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" -+ for libdir in $rpath; do -+ if test -n "$hardcode_libdir_flag_spec"; then -+ if test -n "$hardcode_libdir_separator"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ if test -z "$hardcode_libdirs"; then -+ hardcode_libdirs="$libdir" -+ else -+ # Just accumulate the unique libdirs. -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -+ ;; -+ *) -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" -+ ;; -+ esac -+ fi -+ else -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append dep_rpath " $flag" -+ fi -+ elif test -n "$runpath_var"; then -+ case "$perm_rpath " in -+ *" $libdir "*) ;; -+ *) func_apped perm_rpath " $libdir" ;; -+ esac - fi -- fi -- -- for arg in $dlprefiles; do -- $show "extracting global C symbols from \`$arg'" -- name=`echo "$arg" | sed -e 's%^.*/%%'` -- $run eval 'echo ": $name " >> "$nlist"' -- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done -- -- if test -z "$run"; then -- # Make sure we have at least an empty file. -- test -f "$nlist" || : > "$nlist" -- -- if test -n "$exclude_expsyms"; then -- egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -- $mv "$nlist"T "$nlist" -- fi -- -- # Try sorting and uniquifying the output. -- if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then -- : -- else -- grep -v "^: " < "$nlist" > "$nlist"S -- fi -- -- if test -f "$nlist"S; then -- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' -+ # Substitute the hardcoded libdirs into the rpath. -+ if test -n "$hardcode_libdir_separator" && -+ test -n "$hardcode_libdirs"; then -+ libdir="$hardcode_libdirs" -+ if test -n "$hardcode_libdir_flag_spec_ld"; then -+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else -- echo '/* NONE */' >> "$output_objdir/$dlsyms" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi -- -- $echo >> "$output_objdir/$dlsyms" "\ -- --#undef lt_preloaded_symbols -- --#if defined (__STDC__) && __STDC__ --# define lt_ptr void * --#else --# define lt_ptr char * --# define const --#endif -- --/* The mapping between symbol names and symbols. */ --const struct { -- const char *name; -- lt_ptr address; --} --lt_preloaded_symbols[] = --{\ --" -- -- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" -- -- $echo >> "$output_objdir/$dlsyms" "\ -- {0, (lt_ptr) 0} --}; -- --/* This works around a problem in FreeBSD linker */ --#ifdef FREEBSD_WORKAROUND --static const void *lt_preloaded_setup() { -- return lt_preloaded_symbols; --} --#endif -- --#ifdef __cplusplus --} --#endif\ --" - fi -+ if test -n "$runpath_var" && test -n "$perm_rpath"; then -+ # We should set the runpath_var. -+ rpath= -+ for dir in $perm_rpath; do -+ func_append rpath "$dir:" -+ done -+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" -+ fi -+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" -+ fi - -- pic_flag_for_symtable= -- case $host in -- # compiling the symbol table file with pic_flag works around -- # a FreeBSD bug that causes programs to crash when -lm is -- # linked before any other PIC object. But we must not use -- # pic_flag when linking with -static. The problem exists in -- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. -- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) -- case "$compile_command " in -- *" -static "*) ;; -- *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; -- esac;; -- *-*-hpux*) -- case "$compile_command " in -- *" -static "*) ;; -- *) pic_flag_for_symtable=" $pic_flag -DPIC";; -- esac -- esac -+ shlibpath="$finalize_shlibpath" -+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -+ if test -n "$shlibpath"; then -+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" -+ fi -+ -+ # Get the real and link names of the library. -+ eval shared_ext=\"$shrext_cmds\" -+ eval library_names=\"$library_names_spec\" -+ set dummy $library_names -+ shift -+ realname="$1" -+ shift - -- # Now compile the dynamic symbol file. -- $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -- $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -- -- # Clean up the generated files. -- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" -- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" -- -- # Transform the symbol file into the correct name. -- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -- ;; -- *) -- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 -- exit 1 -- ;; -- esac -- else -- # We keep going just in case the user didn't refer to -- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe -- # really was required. -+ if test -n "$soname_spec"; then -+ eval soname=\"$soname_spec\" -+ else -+ soname="$realname" -+ fi -+ if test -z "$dlname"; then -+ dlname=$soname -+ fi - -- # Nullify the symbol file. -- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` -- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` -- fi -+ lib="$output_objdir/$realname" -+ linknames= -+ for link -+ do -+ func_append linknames " $link" -+ done - -- if test $need_relink = no || test "$build_libtool_libs" != yes; then -- # Replace the output file specification. -- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -- link_command="$compile_command$compile_rpath" -+ # Use standard objects if they are pic -+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` -+ test "X$libobjs" = "X " && libobjs= - -- # We have no uninstalled library dependencies, so finalize right now. -- $show "$link_command" -- $run eval "$link_command" -- status=$? -+ delfiles= -+ if test -n "$export_symbols" && test -n "$include_expsyms"; then -+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" -+ export_symbols="$output_objdir/$libname.uexp" -+ func_append delfiles " $export_symbols" -+ fi -+ -+ orig_export_symbols= -+ case $host_os in -+ cygwin* | mingw* | cegcc*) -+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then -+ # exporting using user supplied symfile -+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then -+ # and it's NOT already a .def file. Must figure out -+ # which of the given symbols are data symbols and tag -+ # them as such. So, trigger use of export_symbols_cmds. -+ # export_symbols gets reassigned inside the "prepare -+ # the list of exported symbols" if statement, so the -+ # include_expsyms logic still works. -+ orig_export_symbols="$export_symbols" -+ export_symbols= -+ always_export_symbols=yes -+ fi -+ fi -+ ;; -+ esac - -- # Delete the generated files. -- if test -n "$dlsyms"; then -- $show "$rm $output_objdir/${outputname}S.${objext}" -- $run $rm "$output_objdir/${outputname}S.${objext}" -+ # Prepare the list of exported symbols -+ if test -z "$export_symbols"; then -+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then -+ func_verbose "generating symbol list for \`$libname.la'" -+ export_symbols="$output_objdir/$libname.exp" -+ $opt_dry_run || $RM $export_symbols -+ cmds=$export_symbols_cmds -+ save_ifs="$IFS"; IFS='~' -+ for cmd1 in $cmds; do -+ IFS="$save_ifs" -+ # Take the normal branch if the nm_file_list_spec branch -+ # doesn't work or if tool conversion is not needed. -+ case $nm_file_list_spec~$to_tool_file_cmd in -+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) -+ try_normal_branch=yes -+ eval cmd=\"$cmd1\" -+ func_len " $cmd" -+ len=$func_len_result -+ ;; -+ *) -+ try_normal_branch=no -+ ;; -+ esac -+ if test "$try_normal_branch" = yes \ -+ && { test "$len" -lt "$max_cmd_len" \ -+ || test "$max_cmd_len" -le -1; } -+ then -+ func_show_eval "$cmd" 'exit $?' -+ skipped_export=false -+ elif test -n "$nm_file_list_spec"; then -+ func_basename "$output" -+ output_la=$func_basename_result -+ save_libobjs=$libobjs -+ save_output=$output -+ output=${output_objdir}/${output_la}.nm -+ func_to_tool_file "$output" -+ libobjs=$nm_file_list_spec$func_to_tool_file_result -+ func_append delfiles " $output" -+ func_verbose "creating $NM input file list: $output" -+ for obj in $save_libobjs; do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > "$output" -+ eval cmd=\"$cmd1\" -+ func_show_eval "$cmd" 'exit $?' -+ output=$save_output -+ libobjs=$save_libobjs -+ skipped_export=false -+ else -+ # The command line is too long to execute in one step. -+ func_verbose "using reloadable object file for export list..." -+ skipped_export=: -+ # Break out early, otherwise skipped_export may be -+ # set to false by a later but shorter cmd. -+ break -+ fi -+ done -+ IFS="$save_ifs" -+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then -+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' -+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"' -+ fi -+ fi - fi - -- exit $status -- fi -- -- if test -n "$shlibpath_var"; then -- # We should set the shlibpath_var -- rpath= -- for dir in $temp_rpath; do -- case $dir in -- [\\/]* | [A-Za-z]:[\\/]*) -- # Absolute path. -- rpath="$rpath$dir:" -- ;; -+ if test -n "$export_symbols" && test -n "$include_expsyms"; then -+ tmp_export_symbols="$export_symbols" -+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' -+ fi -+ -+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then -+ # The given exports_symbols file has to be filtered, so filter it. -+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" -+ # FIXME: $output_objdir/$libname.filter potentially contains lots of -+ # 's' commands which not all seds can handle. GNU sed should be fine -+ # though. Also, the filter scales superlinearly with the number of -+ # global variables. join(1) would be nice here, but unfortunately -+ # isn't a blessed tool. -+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" -+ export_symbols=$output_objdir/$libname.def -+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols -+ fi -+ -+ tmp_deplibs= -+ for test_deplib in $deplibs; do -+ case " $convenience " in -+ *" $test_deplib "*) ;; - *) -- # Relative path: add a thisdir entry. -- rpath="$rpath\$thisdir/$dir:" -+ func_append tmp_deplibs " $test_deplib" - ;; - esac - done -- temp_rpath="$rpath" -- fi -+ deplibs="$tmp_deplibs" - -- if test -n "$compile_shlibpath$finalize_shlibpath"; then -- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" -- fi -- if test -n "$finalize_shlibpath"; then -- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" -- fi -+ if test -n "$convenience"; then -+ if test -n "$whole_archive_flag_spec" && -+ test "$compiler_needs_object" = yes && -+ test -z "$libobjs"; then -+ # extract the archives, so we have objects to list. -+ # TODO: could optimize this to just extract one archive. -+ whole_archive_flag_spec= -+ fi -+ if test -n "$whole_archive_flag_spec"; then -+ save_libobjs=$libobjs -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" -+ test "X$libobjs" = "X " && libobjs= -+ else -+ gentop="$output_objdir/${outputname}x" -+ func_append generated " $gentop" - -- compile_var= -- finalize_var= -- if test -n "$runpath_var"; then -- if test -n "$perm_rpath"; then -- # We should set the runpath_var. -- rpath= -- for dir in $perm_rpath; do -- rpath="$rpath$dir:" -- done -- compile_var="$runpath_var=\"$rpath\$$runpath_var\" " -- fi -- if test -n "$finalize_perm_rpath"; then -- # We should set the runpath_var. -- rpath= -- for dir in $finalize_perm_rpath; do -- rpath="$rpath$dir:" -- done -- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " -+ func_extract_archives $gentop $convenience -+ func_append libobjs " $func_extract_archives_result" -+ test "X$libobjs" = "X " && libobjs= -+ fi - fi -- fi - -- if test "$no_install" = yes; then -- # We don't need to create a wrapper script. -- link_command="$compile_var$compile_command$compile_rpath" -- # Replace the output file specification. -- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -- # Delete the old output file. -- $run $rm $output -- # Link the executable and exit -- $show "$link_command" -- $run eval "$link_command" || exit $? -- exit 0 -- fi -+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then -+ eval flag=\"$thread_safe_flag_spec\" -+ func_append linker_flags " $flag" -+ fi - -- if test "$hardcode_action" = relink; then -- # Fast installation is not supported -- link_command="$compile_var$compile_command$compile_rpath" -- relink_command="$finalize_var$finalize_command$finalize_rpath" -+ # Make a backup of the uninstalled library when relinking -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? -+ fi - -- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 -- $echo "$modename: \`$output' will be relinked during installation" 1>&2 -- else -- if test "$fast_install" != no; then -- link_command="$finalize_var$compile_command$finalize_rpath" -- if test "$fast_install" = yes; then -- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` -+ # Do each of the archive commands. -+ if test "$module" = yes && test -n "$module_cmds" ; then -+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -+ eval test_cmds=\"$module_expsym_cmds\" -+ cmds=$module_expsym_cmds - else -- # fast_install is set to needless -- relink_command= -+ eval test_cmds=\"$module_cmds\" -+ cmds=$module_cmds - fi - else -- link_command="$compile_var$compile_command$compile_rpath" -- relink_command="$finalize_var$finalize_command$finalize_rpath" -- fi -- fi -- -- # Replace the output file specification. -- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` -- -- # Delete the old output files. -- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname -- -- $show "$link_command" -- $run eval "$link_command" || exit $? -- -- # Now create the wrapper script. -- $show "creating $output" -- -- # Quote the relink command for shipping. -- if test -n "$relink_command"; then -- # Preserve any variables that may affect compiler behavior -- for var in $variables_saved_for_relink; do -- if eval test -z \"\${$var+set}\"; then -- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" -- elif eval var_value=\$$var; test -z "$var_value"; then -- relink_command="$var=; export $var; $relink_command" -+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -+ eval test_cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds - else -- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` -- relink_command="$var=\"$var_value\"; export $var; $relink_command" -+ eval test_cmds=\"$archive_cmds\" -+ cmds=$archive_cmds - fi -- done -- relink_command="cd `pwd`; $relink_command" -- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` -- fi -- -- # Quote $echo for shipping. -- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then -- case $0 in -- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; -- *) qecho="$SHELL `pwd`/$0 --fallback-echo";; -- esac -- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` -- else -- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` -- fi -- -- # Only actually do things if our run command is non-null. -- if test -z "$run"; then -- # win32 will think the script is a binary if it has -- # a .exe suffix, so we strip it off here. -- case $output in -- *.exe) output=`echo $output|sed 's,.exe$,,'` ;; -- esac -- # test for cygwin because mv fails w/o .exe extensions -- case $host in -- *cygwin*) exeext=.exe ;; -- *) exeext= ;; -- esac -- $rm $output -- trap "$rm $output; exit 1" 1 2 15 -- -- $echo > $output "\ --#! $SHELL -- --# $output - temporary wrapper script for $objdir/$outputname --# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP --# --# The $output program cannot be directly executed until all the libtool --# libraries that it depends on are installed. --# --# This wrapper script should never be moved out of the build directory. --# If it is, it will not operate correctly. -- --# Sed substitution that helps us do robust quoting. It backslashifies --# metacharacters that are still active within double-quoted strings. --Xsed='sed -e 1s/^X//' --sed_quote_subst='$sed_quote_subst' -- --# The HP-UX ksh and POSIX shell print the target directory to stdout --# if CDPATH is set. --if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi -- --relink_command=\"$relink_command\" -- --# This environment variable determines our operation mode. --if test \"\$libtool_install_magic\" = \"$magic\"; then -- # install mode needs the following variable: -- notinst_deplibs='$notinst_deplibs' --else -- # When we are sourced in execute mode, \$file and \$echo are already set. -- if test \"\$libtool_execute_magic\" != \"$magic\"; then -- echo=\"$qecho\" -- file=\"\$0\" -- # Make sure echo works. -- if test \"X\$1\" = X--no-reexec; then -- # Discard the --no-reexec flag, and continue. -- shift -- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then -- # Yippee, \$echo works! -- : -- else -- # Restart under the correct shell, and then maybe \$echo will work. -- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} -- fi -- fi\ --" -- $echo >> $output "\ -- -- # Find the directory that this script lives in. -- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` -- test \"x\$thisdir\" = \"x\$file\" && thisdir=. -- -- # Follow symbolic links until we get to the real thisdir. -- file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` -- while test -n \"\$file\"; do -- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` -- -- # If there was a directory component, then change thisdir. -- if test \"x\$destdir\" != \"x\$file\"; then -- case \"\$destdir\" in -- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; -- *) thisdir=\"\$thisdir/\$destdir\" ;; -- esac -- fi -- -- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` -- file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` -- done -- -- # Try to get the absolute directory name. -- absdir=\`cd \"\$thisdir\" && pwd\` -- test -n \"\$absdir\" && thisdir=\"\$absdir\" --" -- -- if test "$fast_install" = yes; then -- echo >> $output "\ -- program=lt-'$outputname'$exeext -- progdir=\"\$thisdir/$objdir\" -- -- if test ! -f \"\$progdir/\$program\" || \\ -- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ -- test \"X\$file\" != \"X\$progdir/\$program\"; }; then -- -- file=\"\$\$-\$program\" -- -- if test ! -d \"\$progdir\"; then -- $mkdir \"\$progdir\" -- else -- $rm \"\$progdir/\$file\" -- fi" -- -- echo >> $output "\ -- -- # relink executable if necessary -- if test -n \"\$relink_command\"; then -- if relink_command_output=\`eval \$relink_command 2>&1\`; then : -- else -- $echo \"\$relink_command_output\" >&2 -- $rm \"\$progdir/\$file\" -- exit 1 -- fi -- fi -- -- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || -- { $rm \"\$progdir/\$program\"; -- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } -- $rm \"\$progdir/\$file\" -- fi" -- else -- echo >> $output "\ -- program='$outputname' -- progdir=\"\$thisdir/$objdir\" --" -- fi -- -- echo >> $output "\ -- -- if test -f \"\$progdir/\$program\"; then" -- -- # Export our shlibpath_var if we have one. -- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then -- $echo >> $output "\ -- # Add our own library path to $shlibpath_var -- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" -- -- # Some systems cannot cope with colon-terminated $shlibpath_var -- # The second colon is a workaround for a bug in BeOS R4 sed -- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` -- -- export $shlibpath_var --" - fi - -- # fixup the dll searchpath if we need to. -- if test -n "$dllsearchpath"; then -- $echo >> $output "\ -- # Add the dll search path components to the executable PATH -- PATH=$dllsearchpath:\$PATH --" -- fi -+ if test "X$skipped_export" != "X:" && -+ func_len " $test_cmds" && -+ len=$func_len_result && -+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ : -+ else -+ # The command line is too long to link in one step, link piecewise -+ # or, if using GNU ld and skipped_export is not :, use a linker -+ # script. -+ -+ # Save the value of $output and $libobjs because we want to -+ # use them later. If we have whole_archive_flag_spec, we -+ # want to use save_libobjs as it was before -+ # whole_archive_flag_spec was expanded, because we can't -+ # assume the linker understands whole_archive_flag_spec. -+ # This may have to be revisited, in case too many -+ # convenience libraries get linked in and end up exceeding -+ # the spec. -+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then -+ save_libobjs=$libobjs -+ fi -+ save_output=$output -+ func_basename "$output" -+ output_la=$func_basename_result -+ -+ # Clear the reloadable object creation command queue and -+ # initialize k to one. -+ test_cmds= -+ concat_cmds= -+ objlist= -+ last_robj= -+ k=1 -+ -+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then -+ output=${output_objdir}/${output_la}.lnkscript -+ func_verbose "creating GNU ld script: $output" -+ echo 'INPUT (' > $output -+ for obj in $save_libobjs -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output -+ done -+ echo ')' >> $output -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$func_to_tool_file_result -+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then -+ output=${output_objdir}/${output_la}.lnk -+ func_verbose "creating linker input file list: $output" -+ : > $output -+ set x $save_libobjs -+ shift -+ firstobj= -+ if test "$compiler_needs_object" = yes; then -+ firstobj="$1 " -+ shift -+ fi -+ for obj -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output -+ done -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" -+ else -+ if test -n "$save_libobjs"; then -+ func_verbose "creating reloadable object files..." -+ output=$output_objdir/$output_la-${k}.$objext -+ eval test_cmds=\"$reload_cmds\" -+ func_len " $test_cmds" -+ len0=$func_len_result -+ len=$len0 -+ -+ # Loop over the list of objects to be linked. -+ for obj in $save_libobjs -+ do -+ func_len " $obj" -+ func_arith $len + $func_len_result -+ len=$func_arith_result -+ if test "X$objlist" = X || -+ test "$len" -lt "$max_cmd_len"; then -+ func_append objlist " $obj" -+ else -+ # The command $test_cmds is almost too long, add a -+ # command to the queue. -+ if test "$k" -eq 1 ; then -+ # The first file doesn't have a previous command to add. -+ reload_objs=$objlist -+ eval concat_cmds=\"$reload_cmds\" -+ else -+ # All subsequent reloadable object files will link in -+ # the last one created. -+ reload_objs="$objlist $last_robj" -+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" -+ fi -+ last_robj=$output_objdir/$output_la-${k}.$objext -+ func_arith $k + 1 -+ k=$func_arith_result -+ output=$output_objdir/$output_la-${k}.$objext -+ objlist=" $obj" -+ func_len " $last_robj" -+ func_arith $len0 + $func_len_result -+ len=$func_arith_result -+ fi -+ done -+ # Handle the remaining objects by creating one last -+ # reloadable object file. All subsequent reloadable object -+ # files will link in the last one created. -+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -+ reload_objs="$objlist $last_robj" -+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" -+ if test -n "$last_robj"; then -+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" -+ fi -+ func_append delfiles " $output" - -- $echo >> $output "\ -- if test \"\$libtool_execute_magic\" != \"$magic\"; then -- # Run the actual program with our arguments. --" -- case $host in -- # win32 systems need to use the prog path for dll -- # lookup to work -- *-*-cygwin* | *-*-pw32*) -- $echo >> $output "\ -- exec \$progdir/\$program \${1+\"\$@\"} --" -- ;; -+ else -+ output= -+ fi - -- # Backslashes separate directories on plain windows -- *-*-mingw | *-*-os2*) -- $echo >> $output "\ -- exec \$progdir\\\\\$program \${1+\"\$@\"} --" -- ;; -+ if ${skipped_export-false}; then -+ func_verbose "generating symbol list for \`$libname.la'" -+ export_symbols="$output_objdir/$libname.exp" -+ $opt_dry_run || $RM $export_symbols -+ libobjs=$output -+ # Append the command to create the export file. -+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" -+ if test -n "$last_robj"; then -+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" -+ fi -+ fi - -- *) -- $echo >> $output "\ -- # Export the path to the program. -- PATH=\"\$progdir:\$PATH\" -- export PATH -+ test -n "$save_libobjs" && -+ func_verbose "creating a temporary reloadable object file: $output" - -- exec \$program \${1+\"\$@\"} --" -- ;; -- esac -- $echo >> $output "\ -- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" -- exit 1 -- fi -- else -- # The program doesn't exist. -- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 -- \$echo \"This script is just a wrapper for \$program.\" 1>&2 -- echo \"See the $PACKAGE documentation for more information.\" 1>&2 -- exit 1 -- fi --fi\ --" -- chmod +x $output -- fi -- exit 0 -- ;; -- esac -+ # Loop through the commands generated above and execute them. -+ save_ifs="$IFS"; IFS='~' -+ for cmd in $concat_cmds; do -+ IFS="$save_ifs" -+ $opt_silent || { -+ func_quote_for_expand "$cmd" -+ eval "func_echo $func_quote_for_expand_result" -+ } -+ $opt_dry_run || eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$opt_mode" = relink; then -+ ( cd "$output_objdir" && \ -+ $RM "${realname}T" && \ -+ $MV "${realname}U" "$realname" ) -+ fi - -- # See if we need to build an old-fashioned archive. -- for oldlib in $oldlibs; do -+ exit $lt_exit -+ } -+ done -+ IFS="$save_ifs" - -- if test "$build_libtool_libs" = convenience; then -- oldobjs="$libobjs_save" -- addlibs="$convenience" -- build_libtool_libs=no -- else -- if test "$build_libtool_libs" = module; then -- oldobjs="$libobjs_save" -- build_libtool_libs=no -- else -- oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` -- fi -- addlibs="$old_convenience" -- fi -+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then -+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' -+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"' -+ fi -+ fi - -- if test -n "$addlibs"; then -- gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "mkdir $gentop" -- $run mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi -- generated="$generated $gentop" -- -- # Add in members from convenience archives. -- for xlib in $addlibs; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -+ if ${skipped_export-false}; then -+ if test -n "$export_symbols" && test -n "$include_expsyms"; then -+ tmp_export_symbols="$export_symbols" -+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' -+ fi - -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "mkdir $xdir" -- $run mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -+ if test -n "$orig_export_symbols"; then -+ # The given exports_symbols file has to be filtered, so filter it. -+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" -+ # FIXME: $output_objdir/$libname.filter potentially contains lots of -+ # 's' commands which not all seds can handle. GNU sed should be fine -+ # though. Also, the filter scales superlinearly with the number of -+ # global variables. join(1) would be nice here, but unfortunately -+ # isn't a blessed tool. -+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" -+ export_symbols=$output_objdir/$libname.def -+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols -+ fi - fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - -- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` -- done -- fi -+ libobjs=$output -+ # Restore the value of output. -+ output=$save_output - -- # Do each command in the archive commands. -- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then -- eval cmds=\"$old_archive_from_new_cmds\" -- else -- # Ensure that we have .o objects in place in case we decided -- # not to build a shared library, and have fallen back to building -- # static libs even though --disable-static was passed! -- for oldobj in $oldobjs; do -- if test ! -f $oldobj; then -- xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$oldobj"; then -- xdir="." -+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" -+ test "X$libobjs" = "X " && libobjs= -+ fi -+ # Expand the library linking commands again to reset the -+ # value of $libobjs for piecewise linking. -+ -+ # Do each of the archive commands. -+ if test "$module" = yes && test -n "$module_cmds" ; then -+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -+ cmds=$module_expsym_cmds - else -- xdir="$xdir" -+ cmds=$module_cmds -+ fi -+ else -+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -+ cmds=$archive_expsym_cmds -+ else -+ cmds=$archive_cmds - fi -- baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` -- obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` -- $show "(cd $xdir && ${LN_S} $obj $baseobj)" -- $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? - fi -- done -- -- eval cmds=\"$old_archive_cmds\" -- fi -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- done -+ fi - -- if test -n "$generated"; then -- $show "${rm}r$generated" -- $run ${rm}r$generated -- fi -+ if test -n "$delfiles"; then -+ # Append the command to remove temporary files to $cmds. -+ eval cmds=\"\$cmds~\$RM $delfiles\" -+ fi - -- # Now create the libtool archive. -- case $output in -- *.la) -- old_library= -- test "$build_old_libs" = yes && old_library="$libname.$libext" -- $show "creating $output" -+ # Add any objects from preloaded convenience libraries -+ if test -n "$dlprefiles"; then -+ gentop="$output_objdir/${outputname}x" -+ func_append generated " $gentop" - -- # Preserve any variables that may affect compiler behavior -- for var in $variables_saved_for_relink; do -- if eval test -z \"\${$var+set}\"; then -- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" -- elif eval var_value=\$$var; test -z "$var_value"; then -- relink_command="$var=; export $var; $relink_command" -- else -- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` -- relink_command="$var=\"$var_value\"; export $var; $relink_command" -+ func_extract_archives $gentop $dlprefiles -+ func_append libobjs " $func_extract_archives_result" -+ test "X$libobjs" = "X " && libobjs= - fi -- done -- # Quote the link command for shipping. -- relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" -- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - -- # Only create the output if not a dry run. -- if test -z "$run"; then -- for installed in no yes; do -- if test "$installed" = yes; then -- if test -z "$install_libdir"; then -- break -+ save_ifs="$IFS"; IFS='~' -+ for cmd in $cmds; do -+ IFS="$save_ifs" -+ eval cmd=\"$cmd\" -+ $opt_silent || { -+ func_quote_for_expand "$cmd" -+ eval "func_echo $func_quote_for_expand_result" -+ } -+ $opt_dry_run || eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$opt_mode" = relink; then -+ ( cd "$output_objdir" && \ -+ $RM "${realname}T" && \ -+ $MV "${realname}U" "$realname" ) -+ fi -+ -+ exit $lt_exit -+ } -+ done -+ IFS="$save_ifs" -+ -+ # Restore the uninstalled library and exit -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? -+ -+ if test -n "$convenience"; then -+ if test -z "$whole_archive_flag_spec"; then -+ func_show_eval '${RM}r "$gentop"' - fi -- output="$output_objdir/$outputname"i -- # Replace all uninstalled libtool libraries with the installed ones -- newdependency_libs= -- for deplib in $dependency_libs; do -- case $deplib in -- *.la) -- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -- if test -z "$libdir"; then -- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -- newdependency_libs="$newdependency_libs $libdir/$name" -- ;; -- *) newdependency_libs="$newdependency_libs $deplib" ;; -- esac -- done -- dependency_libs="$newdependency_libs" -- newdlfiles= -- for lib in $dlfiles; do -- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -- if test -z "$libdir"; then -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -- newdlfiles="$newdlfiles $libdir/$name" -- done -- dlfiles="$newdlfiles" -- newdlprefiles= -- for lib in $dlprefiles; do -- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -- if test -z "$libdir"; then -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -- newdlprefiles="$newdlprefiles $libdir/$name" -- done -- dlprefiles="$newdlprefiles" - fi -- $rm $output -- # place dlname in correct position for cygwin -- tdlname=$dlname -- case $host,$output,$installed,$module,$dlname in -- *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; -- esac -- $echo > $output "\ --# $outputname - a libtool library file --# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP --# --# Please DO NOT delete this file! --# It is necessary for linking the library. - --# The name that we can dlopen(3). --dlname='$tdlname' -+ exit $EXIT_SUCCESS -+ fi - --# Names of this library. --library_names='$library_names' -+ # Create links to the real library. -+ for linkname in $linknames; do -+ if test "$realname" != "$linkname"; then -+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' -+ fi -+ done - --# The name of the static archive. --old_library='$old_library' -+ # If -module or -export-dynamic was specified, set the dlname. -+ if test "$module" = yes || test "$export_dynamic" = yes; then -+ # On all known operating systems, these are identical. -+ dlname="$soname" -+ fi -+ fi -+ ;; - --# Libraries that this one depends upon. --dependency_libs='$dependency_libs' -+ obj) -+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -+ func_warning "\`-dlopen' is ignored for objects" -+ fi - --# Version information for $libname. --current=$current --age=$age --revision=$revision -+ case " $deplibs" in -+ *\ -l* | *\ -L*) -+ func_warning "\`-l' and \`-L' are ignored for objects" ;; -+ esac - --# Is this an already installed library? --installed=$installed -+ test -n "$rpath" && \ -+ func_warning "\`-rpath' is ignored for objects" - --# Files to dlopen/dlpreopen --dlopen='$dlfiles' --dlpreopen='$dlprefiles' -+ test -n "$xrpath" && \ -+ func_warning "\`-R' is ignored for objects" - --# Directory that this library needs to be installed in: --libdir='$install_libdir'" -- if test "$installed" = no && test $need_relink = yes; then -- $echo >> $output "\ --relink_command=\"$relink_command\"" -- fi -- done -- fi -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info' is ignored for objects" - -- # Do a symbolic link so that the libtool archive can be found in -- # LD_LIBRARY_PATH before the program is installed. -- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" -- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? -- ;; -- esac -- exit 0 -- ;; -+ test -n "$release" && \ -+ func_warning "\`-release' is ignored for objects" - -- # libtool install mode -- install) -- modename="$modename: install" -+ case $output in -+ *.lo) -+ test -n "$objs$old_deplibs" && \ -+ func_fatal_error "cannot build library object \`$output' from non-libtool objects" - -- # There may be an optional sh(1) argument at the beginning of -- # install_prog (especially on Windows NT). -- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || -- # Allow the use of GNU shtool's install command. -- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then -- # Aesthetically quote it. -- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -+ libobj=$output -+ func_lo2o "$libobj" -+ obj=$func_lo2o_result -+ ;; -+ *) -+ libobj= -+ obj="$output" - ;; - esac -- install_prog="$arg " -- arg="$1" -- shift -- else -- install_prog= -- arg="$nonopt" -- fi - -- # The real first argument should be the name of the installation program. -- # Aesthetically quote it. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -- ;; -- esac -- install_prog="$install_prog$arg" -+ # Delete the old objects. -+ $opt_dry_run || $RM $obj $libobj - -- # We need to accept at least all the BSD install flags. -- dest= -- files= -- opts= -- prev= -- install_type= -- isdir=no -- stripme= -- for arg -- do -- if test -n "$dest"; then -- files="$files $dest" -- dest="$arg" -- continue -+ # Objects from convenience libraries. This assumes -+ # single-version convenience libraries. Whenever we create -+ # different ones for PIC/non-PIC, this we'll have to duplicate -+ # the extraction. -+ reload_conv_objs= -+ gentop= -+ # reload_cmds runs $LD directly, so let us get rid of -+ # -Wl from whole_archive_flag_spec and hope we can get by with -+ # turning comma into space.. -+ wl= -+ -+ if test -n "$convenience"; then -+ if test -n "$whole_archive_flag_spec"; then -+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" -+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` -+ else -+ gentop="$output_objdir/${obj}x" -+ func_append generated " $gentop" -+ -+ func_extract_archives $gentop $convenience -+ reload_conv_objs="$reload_objs $func_extract_archives_result" -+ fi - fi - -- case $arg in -- -d) isdir=yes ;; -- -f) prev="-f" ;; -- -g) prev="-g" ;; -- -m) prev="-m" ;; -- -o) prev="-o" ;; -- -s) -- stripme=" -s" -- continue -- ;; -- -*) ;; -+ # If we're not building shared, we need to use non_pic_objs -+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" - -- *) -- # If the previous option needed an argument, then skip it. -- if test -n "$prev"; then -- prev= -- else -- dest="$arg" -- continue -+ # Create the old-style object. -+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test -+ -+ output="$obj" -+ func_execute_cmds "$reload_cmds" 'exit $?' -+ -+ # Exit if we aren't doing a library object file. -+ if test -z "$libobj"; then -+ if test -n "$gentop"; then -+ func_show_eval '${RM}r "$gentop"' - fi -- ;; -- esac - -- # Aesthetically quote the argument. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -- ;; -+ exit $EXIT_SUCCESS -+ fi -+ -+ if test "$build_libtool_libs" != yes; then -+ if test -n "$gentop"; then -+ func_show_eval '${RM}r "$gentop"' -+ fi -+ -+ # Create an invalid libtool object if no PIC, so that we don't -+ # accidentally link it into a program. -+ # $show "echo timestamp > $libobj" -+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? -+ exit $EXIT_SUCCESS -+ fi -+ -+ if test -n "$pic_flag" || test "$pic_mode" != default; then -+ # Only do commands if we really have different PIC objects. -+ reload_objs="$libobjs $reload_conv_objs" -+ output="$libobj" -+ func_execute_cmds "$reload_cmds" 'exit $?' -+ fi -+ -+ if test -n "$gentop"; then -+ func_show_eval '${RM}r "$gentop"' -+ fi -+ -+ exit $EXIT_SUCCESS -+ ;; -+ -+ prog) -+ case $host in -+ *cygwin*) func_stripname '' '.exe' "$output" -+ output=$func_stripname_result.exe;; - esac -- install_prog="$install_prog $arg" -- done -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info' is ignored for programs" - -- if test -z "$install_prog"; then -- $echo "$modename: you must specify an install program" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test -n "$release" && \ -+ func_warning "\`-release' is ignored for programs" - -- if test -n "$prev"; then -- $echo "$modename: the \`$prev' option requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test "$preload" = yes \ -+ && test "$dlopen_support" = unknown \ -+ && test "$dlopen_self" = unknown \ -+ && test "$dlopen_self_static" = unknown && \ -+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - -- if test -z "$files"; then -- if test -z "$dest"; then -- $echo "$modename: no file or destination specified" 1>&2 -- else -- $echo "$modename: you must specify a destination" 1>&2 -- fi -- $echo "$help" 1>&2 -- exit 1 -- fi -+ case $host in -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # On Rhapsody replace the C library is the System framework -+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` -+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` -+ ;; -+ esac - -- # Strip any trailing slash from the destination. -- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` -+ case $host in -+ *-*-darwin*) -+ # Don't allow lazy linking, it breaks C++ global constructors -+ # But is supposedly fixed on 10.4 or later (yay!). -+ if test "$tagname" = CXX ; then -+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in -+ 10.[0123]) -+ func_append compile_command " ${wl}-bind_at_load" -+ func_append finalize_command " ${wl}-bind_at_load" -+ ;; -+ esac -+ fi -+ # Time to change all our "foo.ltframework" stuff back to "-framework foo" -+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` -+ ;; -+ esac - -- # Check to see that the destination is a directory. -- test -d "$dest" && isdir=yes -- if test "$isdir" = yes; then -- destdir="$dest" -- destname= -- else -- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` -- test "X$destdir" = "X$dest" && destdir=. -- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - -- # Not a directory, so check to see that there is only one file specified. -- set dummy $files -- if test $# -gt 2; then -- $echo "$modename: \`$dest' is not a directory" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -- fi -- case $destdir in -- [\\/]* | [A-Za-z]:[\\/]*) ;; -- *) -- for file in $files; do -- case $file in -- *.lo) ;; -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; - *) -- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -+ case " $compile_deplibs " in -+ *" -L$path/$objdir "*) -+ func_append new_libs " -L$path/$objdir" ;; -+ esac - ;; - esac - done -- ;; -- esac -- -- # This variable tells wrapper scripts just to set variables rather -- # than running their programs. -- libtool_install_magic="$magic" -- -- staticlibs= -- future_libdirs= -- current_libdirs= -- for file in $files; do -- -- # Do each installation. -- case $file in -- *.$libext) -- # Do the static libraries later. -- staticlibs="$staticlibs $file" -- ;; -+ for deplib in $compile_deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) func_append new_libs " $deplib" ;; -+ esac -+ ;; -+ *) func_append new_libs " $deplib" ;; -+ esac -+ done -+ compile_deplibs="$new_libs" - -- *.la) -- # Check to see that this really is a libtool archive. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -- else -- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi - -- library_names= -- old_library= -- relink_command= -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac -+ func_append compile_command " $compile_deplibs" -+ func_append finalize_command " $finalize_deplibs" - -- # Add the libdir to current_libdirs if it is the destination. -- if test "X$destdir" = "X$libdir"; then -- case "$current_libdirs " in -+ if test -n "$rpath$xrpath"; then -+ # If the user specified any rpath flags, then add them. -+ for libdir in $rpath $xrpath; do -+ # This is the magic to use -rpath. -+ case "$finalize_rpath " in - *" $libdir "*) ;; -- *) current_libdirs="$current_libdirs $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac -- else -- # Note the libdir as a future libdir. -- case "$future_libdirs " in -+ done -+ fi -+ -+ # Now hardcode the library paths -+ rpath= -+ hardcode_libdirs= -+ for libdir in $compile_rpath $finalize_rpath; do -+ if test -n "$hardcode_libdir_flag_spec"; then -+ if test -n "$hardcode_libdir_separator"; then -+ if test -z "$hardcode_libdirs"; then -+ hardcode_libdirs="$libdir" -+ else -+ # Just accumulate the unique libdirs. -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -+ ;; -+ *) -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" -+ ;; -+ esac -+ fi -+ else -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" -+ fi -+ elif test -n "$runpath_var"; then -+ case "$perm_rpath " in - *" $libdir "*) ;; -- *) future_libdirs="$future_libdirs $libdir" ;; -+ *) func_append perm_rpath " $libdir" ;; - esac - fi -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) -+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` -+ case :$dllsearchpath: in -+ *":$libdir:"*) ;; -+ ::) dllsearchpath=$libdir;; -+ *) func_append dllsearchpath ":$libdir";; -+ esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ ::) dllsearchpath=$testbindir;; -+ *) func_append dllsearchpath ":$testbindir";; -+ esac -+ ;; -+ esac -+ done -+ # Substitute the hardcoded libdirs into the rpath. -+ if test -n "$hardcode_libdir_separator" && -+ test -n "$hardcode_libdirs"; then -+ libdir="$hardcode_libdirs" -+ eval rpath=\" $hardcode_libdir_flag_spec\" -+ fi -+ compile_rpath="$rpath" - -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ -- test "X$dir" = "X$file/" && dir= -- dir="$dir$objdir" -- -- if test -n "$relink_command"; then -- $echo "$modename: warning: relinking \`$file'" 1>&2 -- $show "$relink_command" -- if $run eval "$relink_command"; then : -+ rpath= -+ hardcode_libdirs= -+ for libdir in $finalize_rpath; do -+ if test -n "$hardcode_libdir_flag_spec"; then -+ if test -n "$hardcode_libdir_separator"; then -+ if test -z "$hardcode_libdirs"; then -+ hardcode_libdirs="$libdir" -+ else -+ # Just accumulate the unique libdirs. -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -+ ;; -+ *) -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" -+ ;; -+ esac -+ fi - else -- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 -- continue -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi -+ elif test -n "$runpath_var"; then -+ case "$finalize_perm_rpath " in -+ *" $libdir "*) ;; -+ *) func_append finalize_perm_rpath " $libdir" ;; -+ esac - fi -+ done -+ # Substitute the hardcoded libdirs into the rpath. -+ if test -n "$hardcode_libdir_separator" && -+ test -n "$hardcode_libdirs"; then -+ libdir="$hardcode_libdirs" -+ eval rpath=\" $hardcode_libdir_flag_spec\" -+ fi -+ finalize_rpath="$rpath" - -- # See the names of the shared library. -- set dummy $library_names -- if test -n "$2"; then -- realname="$2" -- shift -- shift -+ if test -n "$libobjs" && test "$build_old_libs" = yes; then -+ # Transform all the library objects into standard objects. -+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` -+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` -+ fi - -- srcname="$realname" -- test -n "$relink_command" && srcname="$realname"T -+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - -- # Install the shared library and build the symlinks. -- $show "$install_prog $dir/$srcname $destdir/$realname" -- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? -- if test -n "$stripme" && test -n "$striplib"; then -- $show "$striplib $destdir/$realname" -- $run eval "$striplib $destdir/$realname" || exit $? -- fi -+ # template prelinking step -+ if test -n "$prelink_cmds"; then -+ func_execute_cmds "$prelink_cmds" 'exit $?' -+ fi - -- if test $# -gt 0; then -- # Delete the old symlinks, and create new ones. -- for linkname -- do -- if test "$linkname" != "$realname"; then -- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -- fi -- done -- fi -+ wrappers_required=yes -+ case $host in -+ *cegcc* | *mingw32ce*) -+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. -+ wrappers_required=no -+ ;; -+ *cygwin* | *mingw* ) -+ if test "$build_libtool_libs" != yes; then -+ wrappers_required=no -+ fi -+ ;; -+ *) -+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then -+ wrappers_required=no -+ fi -+ ;; -+ esac -+ if test "$wrappers_required" = no; then -+ # Replace the output file specification. -+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` -+ link_command="$compile_command$compile_rpath" - -- # Do each command in the postinstall commands. -- lib="$destdir/$realname" -- eval cmds=\"$postinstall_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -+ # We have no uninstalled library dependencies, so finalize right now. -+ exit_status=0 -+ func_show_eval "$link_command" 'exit_status=$?' -+ -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' - fi - -- # Install the pseudo-library for information purposes. -- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- instname="$dir/$name"i -- $show "$install_prog $instname $destdir/$name" -- $run eval "$install_prog $instname $destdir/$name" || exit $? -+ # Delete the generated files. -+ if test -f "$output_objdir/${outputname}S.${objext}"; then -+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' -+ fi - -- # Maybe install the static library, too. -- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" -- ;; -+ exit $exit_status -+ fi - -- *.lo) -- # Install (i.e. copy) a libtool object. -+ if test -n "$compile_shlibpath$finalize_shlibpath"; then -+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" -+ fi -+ if test -n "$finalize_shlibpath"; then -+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" -+ fi - -- # Figure out destination file name, if it wasn't already specified. -- if test -n "$destname"; then -- destfile="$destdir/$destname" -- else -- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- destfile="$destdir/$destfile" -+ compile_var= -+ finalize_var= -+ if test -n "$runpath_var"; then -+ if test -n "$perm_rpath"; then -+ # We should set the runpath_var. -+ rpath= -+ for dir in $perm_rpath; do -+ func_append rpath "$dir:" -+ done -+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -- -- # Deduce the name of the destination old-style object file. -- case $destfile in -- *.lo) -- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` -- ;; -- *.$objext) -- staticdest="$destfile" -- destfile= -- ;; -- *) -- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; -- esac -- -- # Install the libtool object if requested. -- if test -n "$destfile"; then -- $show "$install_prog $file $destfile" -- $run eval "$install_prog $file $destfile" || exit $? -+ if test -n "$finalize_perm_rpath"; then -+ # We should set the runpath_var. -+ rpath= -+ for dir in $finalize_perm_rpath; do -+ func_append rpath "$dir:" -+ done -+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -+ fi - -- # Install the old object if enabled. -- if test "$build_old_libs" = yes; then -- # Deduce the name of the old-style object file. -- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` -+ if test "$no_install" = yes; then -+ # We don't need to create a wrapper script. -+ link_command="$compile_var$compile_command$compile_rpath" -+ # Replace the output file specification. -+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` -+ # Delete the old output file. -+ $opt_dry_run || $RM $output -+ # Link the executable and exit -+ func_show_eval "$link_command" 'exit $?' - -- $show "$install_prog $staticobj $staticdest" -- $run eval "$install_prog \$staticobj \$staticdest" || exit $? -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' - fi -- exit 0 -- ;; - -- *) -- # Figure out destination file name, if it wasn't already specified. -- if test -n "$destname"; then -- destfile="$destdir/$destname" -+ exit $EXIT_SUCCESS -+ fi -+ -+ if test "$hardcode_action" = relink; then -+ # Fast installation is not supported -+ link_command="$compile_var$compile_command$compile_rpath" -+ relink_command="$finalize_var$finalize_command$finalize_rpath" -+ -+ func_warning "this platform does not like uninstalled shared libraries" -+ func_warning "\`$output' will be relinked during installation" -+ else -+ if test "$fast_install" != no; then -+ link_command="$finalize_var$compile_command$finalize_rpath" -+ if test "$fast_install" = yes; then -+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` -+ else -+ # fast_install is set to needless -+ relink_command= -+ fi - else -- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- destfile="$destdir/$destfile" -+ link_command="$compile_var$compile_command$compile_rpath" -+ relink_command="$finalize_var$finalize_command$finalize_rpath" - fi -+ fi - -- # Do a test to see if this is really a libtool program. -- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- notinst_deplibs= -- relink_command= -+ # Replace the output file specification. -+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac -+ # Delete the old output files. -+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - -- # Check the variables that should have been set. -- if test -z "$notinst_deplibs"; then -- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 -- exit 1 -- fi -+ func_show_eval "$link_command" 'exit $?' - -- finalize=yes -- for lib in $notinst_deplibs; do -- # Check to see that each library is installed. -- libdir= -- if test -f "$lib"; then -- # If there is no directory component, then add one. -- case $lib in -- */* | *\\*) . $lib ;; -- *) . ./$lib ;; -- esac -- fi -- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test -- if test -n "$libdir" && test ! -f "$libfile"; then -- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 -- finalize=no -- fi -- done -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output_objdir/$outputname" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi - -- relink_command= -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac -+ # Now create the wrapper script. -+ func_verbose "creating $output" - -- outputname= -- if test "$fast_install" = no && test -n "$relink_command"; then -- if test "$finalize" = yes && test -z "$run"; then -- tmpdir="/tmp" -- test -n "$TMPDIR" && tmpdir="$TMPDIR" -- tmpdir="$tmpdir/libtool-$$" -- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : -- else -- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 -- continue -- fi -- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- outputname="$tmpdir/$file" -- # Replace the output file specification. -- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` -+ # Quote the relink command for shipping. -+ if test -n "$relink_command"; then -+ # Preserve any variables that may affect compiler behavior -+ for var in $variables_saved_for_relink; do -+ if eval test -z \"\${$var+set}\"; then -+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" -+ elif eval var_value=\$$var; test -z "$var_value"; then -+ relink_command="$var=; export $var; $relink_command" -+ else -+ func_quote_for_eval "$var_value" -+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" -+ fi -+ done -+ relink_command="(cd `pwd`; $relink_command)" -+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ fi - -- $show "$relink_command" -- if $run eval "$relink_command"; then : -+ # Only actually do things if not in dry run mode. -+ $opt_dry_run || { -+ # win32 will think the script is a binary if it has -+ # a .exe suffix, so we strip it off here. -+ case $output in -+ *.exe) func_stripname '' '.exe' "$output" -+ output=$func_stripname_result ;; -+ esac -+ # test for cygwin because mv fails w/o .exe extensions -+ case $host in -+ *cygwin*) -+ exeext=.exe -+ func_stripname '' '.exe' "$outputname" -+ outputname=$func_stripname_result ;; -+ *) exeext= ;; -+ esac -+ case $host in -+ *cygwin* | *mingw* ) -+ func_dirname_and_basename "$output" "" "." -+ output_name=$func_basename_result -+ output_path=$func_dirname_result -+ cwrappersource="$output_path/$objdir/lt-$output_name.c" -+ cwrapper="$output_path/$output_name.exe" -+ $RM $cwrappersource $cwrapper -+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 -+ -+ func_emit_cwrapperexe_src > $cwrappersource -+ -+ # The wrapper executable is built using the $host compiler, -+ # because it contains $host paths and files. If cross- -+ # compiling, it, like the target executable, must be -+ # executed on the $host or under an emulation environment. -+ $opt_dry_run || { -+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource -+ $STRIP $cwrapper -+ } -+ -+ # Now, create the wrapper script for func_source use: -+ func_ltwrapper_scriptname $cwrapper -+ $RM $func_ltwrapper_scriptname_result -+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 -+ $opt_dry_run || { -+ # note: this script will not be executed, so do not chmod. -+ if test "x$build" = "x$host" ; then -+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else -- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 -- ${rm}r "$tmpdir" -- continue -+ func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi -- file="$outputname" -- else -- $echo "$modename: warning: cannot relink \`$file'" 1>&2 -- fi -- else -- # Install the binary that we compiled earlier. -- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` -- fi -- fi -+ } -+ ;; -+ * ) -+ $RM $output -+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - -- # remove .exe since cygwin /usr/bin/install will append another -- # one anyways -- case $install_prog,$host in -- /usr/bin/install*,*cygwin*) -- case $file:$destfile in -- *.exe:*.exe) -- # this is ok -- ;; -- *.exe:*) -- destfile=$destfile.exe -- ;; -- *:*.exe) -- destfile=`echo $destfile | sed -e 's,.exe$,,'` -- ;; -- esac -+ func_emit_wrapper no > $output -+ chmod +x $output - ;; - esac -- $show "$install_prog$stripme $file $destfile" -- $run eval "$install_prog\$stripme \$file \$destfile" || exit $? -- test -n "$outputname" && ${rm}r "$tmpdir" -- ;; -- esac -- done -- -- for file in $staticlibs; do -- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- -- # Set up the ranlib parameters. -- oldlib="$destdir/$name" -+ } -+ exit $EXIT_SUCCESS -+ ;; -+ esac - -- $show "$install_prog $file $oldlib" -- $run eval "$install_prog \$file \$oldlib" || exit $? -+ # See if we need to build an old-fashioned archive. -+ for oldlib in $oldlibs; do - -- if test -n "$stripme" && test -n "$striplib"; then -- $show "$old_striplib $oldlib" -- $run eval "$old_striplib $oldlib" || exit $? -+ if test "$build_libtool_libs" = convenience; then -+ oldobjs="$libobjs_save $symfileobj" -+ addlibs="$convenience" -+ build_libtool_libs=no -+ else -+ if test "$build_libtool_libs" = module; then -+ oldobjs="$libobjs_save" -+ build_libtool_libs=no -+ else -+ oldobjs="$old_deplibs $non_pic_objects" -+ if test "$preload" = yes && test -f "$symfileobj"; then -+ func_append oldobjs " $symfileobj" -+ fi -+ fi -+ addlibs="$old_convenience" - fi - -- # Do each command in the postinstall commands. -- eval cmds=\"$old_postinstall_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- done -- -- if test -n "$future_libdirs"; then -- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 -- fi -- -- if test -n "$current_libdirs"; then -- # Maybe just do a dry run. -- test -n "$run" && current_libdirs=" -n$current_libdirs" -- exec_cmd='$SHELL $0 --finish$current_libdirs' -- else -- exit 0 -- fi -- ;; -+ if test -n "$addlibs"; then -+ gentop="$output_objdir/${outputname}x" -+ func_append generated " $gentop" - -- # libtool finish mode -- finish) -- modename="$modename: finish" -- libdirs="$nonopt" -- admincmds= -+ func_extract_archives $gentop $addlibs -+ func_append oldobjs " $func_extract_archives_result" -+ fi - -- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -- for dir -- do -- libdirs="$libdirs $dir" -- done -+ # Do each command in the archive commands. -+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then -+ cmds=$old_archive_from_new_cmds -+ else - -- for libdir in $libdirs; do -- if test -n "$finish_cmds"; then -- # Do each command in the finish commands. -- eval cmds=\"$finish_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || admincmds="$admincmds -- $cmd" -+ # Add any objects from preloaded convenience libraries -+ if test -n "$dlprefiles"; then -+ gentop="$output_objdir/${outputname}x" -+ func_append generated " $gentop" -+ -+ func_extract_archives $gentop $dlprefiles -+ func_append oldobjs " $func_extract_archives_result" -+ fi -+ -+ # POSIX demands no paths to be encoded in archives. We have -+ # to avoid creating archives with duplicate basenames if we -+ # might have to extract them afterwards, e.g., when creating a -+ # static archive out of a convenience library, or when linking -+ # the entirety of a libtool archive into another (currently -+ # not supported by libtool). -+ if (for obj in $oldobjs -+ do -+ func_basename "$obj" -+ $ECHO "$func_basename_result" -+ done | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ echo "copying selected object files to avoid basename conflicts..." -+ gentop="$output_objdir/${outputname}x" -+ func_append generated " $gentop" -+ func_mkdir_p "$gentop" -+ save_oldobjs=$oldobjs -+ oldobjs= -+ counter=1 -+ for obj in $save_oldobjs -+ do -+ func_basename "$obj" -+ objbase="$func_basename_result" -+ case " $oldobjs " in -+ " ") oldobjs=$obj ;; -+ *[\ /]"$objbase "*) -+ while :; do -+ # Make sure we don't pick an alternate name that also -+ # overlaps. -+ newobj=lt$counter-$objbase -+ func_arith $counter + 1 -+ counter=$func_arith_result -+ case " $oldobjs " in -+ *[\ /]"$newobj "*) ;; -+ *) if test ! -f "$gentop/$newobj"; then break; fi ;; -+ esac -+ done -+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -+ func_append oldobjs " $gentop/$newobj" -+ ;; -+ *) func_append oldobjs " $obj" ;; -+ esac - done -- IFS="$save_ifs" -- fi -- if test -n "$finish_eval"; then -- # Do the single finish_eval. -- eval cmds=\"$finish_eval\" -- $run eval "$cmds" || admincmds="$admincmds -- $cmds" - fi -- done -- fi -- -- # Exit here if they wanted silent mode. -- test "$show" = ":" && exit 0 -+ eval cmds=\"$old_archive_cmds\" - -- echo "----------------------------------------------------------------------" -- echo "Libraries have been installed in:" -- for libdir in $libdirs; do -- echo " $libdir" -+ func_len " $cmds" -+ len=$func_len_result -+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ cmds=$old_archive_cmds -+ elif test -n "$archiver_list_spec"; then -+ func_verbose "using command file archive linking..." -+ for obj in $oldobjs -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > $output_objdir/$libname.libcmd -+ func_to_tool_file "$output_objdir/$libname.libcmd" -+ oldobjs=" $archiver_list_spec$func_to_tool_file_result" -+ cmds=$old_archive_cmds -+ else -+ # the command line is too long to link in one step, link in parts -+ func_verbose "using piecewise archive linking..." -+ save_RANLIB=$RANLIB -+ RANLIB=: -+ objlist= -+ concat_cmds= -+ save_oldobjs=$oldobjs -+ oldobjs= -+ # Is there a better way of finding the last object in the list? -+ for obj in $save_oldobjs -+ do -+ last_oldobj=$obj -+ done -+ eval test_cmds=\"$old_archive_cmds\" -+ func_len " $test_cmds" -+ len0=$func_len_result -+ len=$len0 -+ for obj in $save_oldobjs -+ do -+ func_len " $obj" -+ func_arith $len + $func_len_result -+ len=$func_arith_result -+ func_append objlist " $obj" -+ if test "$len" -lt "$max_cmd_len"; then -+ : -+ else -+ # the above command should be used before it gets too long -+ oldobjs=$objlist -+ if test "$obj" = "$last_oldobj" ; then -+ RANLIB=$save_RANLIB -+ fi -+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" -+ objlist= -+ len=$len0 -+ fi -+ done -+ RANLIB=$save_RANLIB -+ oldobjs=$objlist -+ if test "X$oldobjs" = "X" ; then -+ eval cmds=\"\$concat_cmds\" -+ else -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" -+ fi -+ fi -+ fi -+ func_execute_cmds "$cmds" 'exit $?' - done -- echo -- echo "If you ever happen to want to link against installed libraries" -- echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -- echo "flag during linking and do at least one of the following:" -- if test -n "$shlibpath_var"; then -- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -- echo " during execution" -- fi -- if test -n "$runpath_var"; then -- echo " - add LIBDIR to the \`$runpath_var' environment variable" -- echo " during linking" -- fi -- if test -n "$hardcode_libdir_flag_spec"; then -- libdir=LIBDIR -- eval flag=\"$hardcode_libdir_flag_spec\" -- -- echo " - use the \`$flag' linker flag" -- fi -- if test -n "$admincmds"; then -- echo " - have your system administrator run these commands:$admincmds" -- fi -- if test -f /etc/ld.so.conf; then -- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -- fi -- echo -- echo "See any operating system documentation about shared libraries for" -- echo "more information, such as the ld(1) and ld.so(8) manual pages." -- echo "----------------------------------------------------------------------" -- exit 0 -- ;; -- -- # libtool execute mode -- execute) -- modename="$modename: execute" - -- # The first argument is the command name. -- cmd="$nonopt" -- if test -z "$cmd"; then -- $echo "$modename: you must specify a COMMAND" 1>&2 -- $echo "$help" -- exit 1 -- fi -+ test -n "$generated" && \ -+ func_show_eval "${RM}r$generated" - -- # Handle -dlopen flags immediately. -- for file in $execute_dlfiles; do -- if test ! -f "$file"; then -- $echo "$modename: \`$file' is not a file" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ # Now create the libtool archive. -+ case $output in -+ *.la) -+ old_library= -+ test "$build_old_libs" = yes && old_library="$libname.$libext" -+ func_verbose "creating $output" - -- dir= -- case $file in -- *.la) -- # Check to see that this really is a libtool archive. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ # Preserve any variables that may affect compiler behavior -+ for var in $variables_saved_for_relink; do -+ if eval test -z \"\${$var+set}\"; then -+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" -+ elif eval var_value=\$$var; test -z "$var_value"; then -+ relink_command="$var=; export $var; $relink_command" - else -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -+ func_quote_for_eval "$var_value" -+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi -+ done -+ # Quote the link command for shipping. -+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" -+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ if test "$hardcode_automatic" = yes ; then -+ relink_command= -+ fi - -- # Read the libtool library. -- dlname= -- library_names= -+ # Only create the output if not a dry run. -+ $opt_dry_run || { -+ for installed in no yes; do -+ if test "$installed" = yes; then -+ if test -z "$install_libdir"; then -+ break -+ fi -+ output="$output_objdir/$outputname"i -+ # Replace all uninstalled libtool libraries with the installed ones -+ newdependency_libs= -+ for deplib in $dependency_libs; do -+ case $deplib in -+ *.la) -+ func_basename "$deplib" -+ name="$func_basename_result" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ test -z "$libdir" && \ -+ func_fatal_error "\`$deplib' is not a valid libtool archive" -+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ -L*) -+ func_stripname -L '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -L$func_replace_sysroot_result" -+ ;; -+ -R*) -+ func_stripname -R '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -R$func_replace_sysroot_result" -+ ;; -+ *) func_append newdependency_libs " $deplib" ;; -+ esac -+ done -+ dependency_libs="$newdependency_libs" -+ newdlfiles= -+ -+ for lib in $dlfiles; do -+ case $lib in -+ *.la) -+ func_basename "$lib" -+ name="$func_basename_result" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ test -z "$libdir" && \ -+ func_fatal_error "\`$lib' is not a valid libtool archive" -+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ *) func_append newdlfiles " $lib" ;; -+ esac -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ case $lib in -+ *.la) -+ # Only pass preopened files to the pseudo-archive (for -+ # eventual linking with the app. that links it) if we -+ # didn't already link the preopened objects directly into -+ # the library: -+ func_basename "$lib" -+ name="$func_basename_result" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ test -z "$libdir" && \ -+ func_fatal_error "\`$lib' is not a valid libtool archive" -+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ esac -+ done -+ dlprefiles="$newdlprefiles" -+ else -+ newdlfiles= -+ for lib in $dlfiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ func_append newdlfiles " $abs" -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ func_append newdlprefiles " $abs" -+ done -+ dlprefiles="$newdlprefiles" -+ fi -+ $RM $output -+ # place dlname in correct position for cygwin -+ # In fact, it would be nice if we could use this code for all target -+ # systems that can't hard-code library paths into their executables -+ # and that have no shared library path variable independent of PATH, -+ # but it turns out we can't easily determine that from inspecting -+ # libtool variables, so we have to hard-code the OSs to which it -+ # applies here; at the moment, that means platforms that use the PE -+ # object format with DLL files. See the long comment at the top of -+ # tests/bindir.at for full details. -+ tdlname=$dlname -+ case $host,$output,$installed,$module,$dlname in -+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) -+ # If a -bindir argument was supplied, place the dll there. -+ if test "x$bindir" != x ; -+ then -+ func_relative_path "$install_libdir" "$bindir" -+ tdlname=$func_relative_path_result$dlname -+ else -+ # Otherwise fall back on heuristic. -+ tdlname=../bin/$dlname -+ fi -+ ;; -+ esac -+ $ECHO > $output "\ -+# $outputname - a libtool library file -+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -+# -+# Please DO NOT delete this file! -+# It is necessary for linking the library. - -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac -+# The name that we can dlopen(3). -+dlname='$tdlname' - -- # Skip this library if it cannot be dlopened. -- if test -z "$dlname"; then -- # Warn if it was a shared library. -- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" -- continue -- fi -+# Names of this library. -+library_names='$library_names' - -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$file" && dir=. -+# The name of the static archive. -+old_library='$old_library' - -- if test -f "$dir/$objdir/$dlname"; then -- dir="$dir/$objdir" -- else -- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 -- exit 1 -- fi -- ;; -+# Linker flags that can not go in dependency_libs. -+inherited_linker_flags='$new_inherited_linker_flags' - -- *.lo) -- # Just add the directory containing the .lo file. -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$file" && dir=. -- ;; -+# Libraries that this one depends upon. -+dependency_libs='$dependency_libs' - -- *) -- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 -- continue -- ;; -- esac -+# Names of additional weak libraries provided by this library -+weak_library_names='$weak_libs' - -- # Get the absolute pathname. -- absdir=`cd "$dir" && pwd` -- test -n "$absdir" && dir="$absdir" -+# Version information for $libname. -+current=$current -+age=$age -+revision=$revision - -- # Now add the directory to shlibpath_var. -- if eval "test -z \"\$$shlibpath_var\""; then -- eval "$shlibpath_var=\"\$dir\"" -- else -- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" -- fi -- done -+# Is this an already installed library? -+installed=$installed - -- # This variable tells wrapper scripts just to set shlibpath_var -- # rather than running their programs. -- libtool_execute_magic="$magic" -+# Should we warn about portability when linking against -modules? -+shouldnotlink=$module - -- # Check if any of the arguments is a wrapper script. -- args= -- for file -- do -- case $file in -- -*) ;; -- *) -- # Do a test to see if this is really a libtool program. -- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac -+# Files to dlopen/dlpreopen -+dlopen='$dlfiles' -+dlpreopen='$dlprefiles' - -- # Transform arg to wrapped name. -- file="$progdir/$program" -- fi -- ;; -- esac -- # Quote arguments (to preserve shell metacharacters). -- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` -- args="$args \"$file\"" -- done -+# Directory that this library needs to be installed in: -+libdir='$install_libdir'" -+ if test "$installed" = no && test "$need_relink" = yes; then -+ $ECHO >> $output "\ -+relink_command=\"$relink_command\"" -+ fi -+ done -+ } - -- if test -z "$run"; then -- if test -n "$shlibpath_var"; then -- # Export the shlibpath_var. -- eval "export $shlibpath_var" -- fi -+ # Do a symbolic link so that the libtool archive can be found in -+ # LD_LIBRARY_PATH before the program is installed. -+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' -+ ;; -+ esac -+ exit $EXIT_SUCCESS -+} - -- # Restore saved enviroment variables -- if test "${save_LC_ALL+set}" = set; then -- LC_ALL="$save_LC_ALL"; export LC_ALL -- fi -- if test "${save_LANG+set}" = set; then -- LANG="$save_LANG"; export LANG -- fi -+{ test "$opt_mode" = link || test "$opt_mode" = relink; } && -+ func_mode_link ${1+"$@"} - -- # Now prepare to actually exec the command. -- exec_cmd='"$cmd"$args' -- else -- # Display what would be done. -- if test -n "$shlibpath_var"; then -- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" -- $echo "export $shlibpath_var" -- fi -- $echo "$cmd$args" -- exit 0 -- fi -- ;; - -- # libtool clean and uninstall mode -- clean | uninstall) -- modename="$modename: $mode" -- rm="$nonopt" -+# func_mode_uninstall arg... -+func_mode_uninstall () -+{ -+ $opt_debug -+ RM="$nonopt" - files= - rmforce= - exit_status=0 -@@ -4637,43 +9441,41 @@ - for arg - do - case $arg in -- -f) rm="$rm $arg"; rmforce=yes ;; -- -*) rm="$rm $arg" ;; -- *) files="$files $arg" ;; -+ -f) func_append RM " $arg"; rmforce=yes ;; -+ -*) func_append RM " $arg" ;; -+ *) func_append files " $arg" ;; - esac - done - -- if test -z "$rm"; then -- $echo "$modename: you must specify an RM program" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test -z "$RM" && \ -+ func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$dir" = "X$file"; then -- dir=. -- objdir="$objdir" -+ func_dirname "$file" "" "." -+ dir="$func_dirname_result" -+ if test "X$dir" = X.; then -+ odir="$objdir" - else -- objdir="$dir/$objdir" -+ odir="$dir/$objdir" - fi -- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- test $mode = uninstall && objdir="$dir" -+ func_basename "$file" -+ name="$func_basename_result" -+ test "$opt_mode" = uninstall && odir="$dir" - -- # Remember objdir for removal later, being careful to avoid duplicates -- if test $mode = clean; then -+ # Remember odir for removal later, being careful to avoid duplicates -+ if test "$opt_mode" = clean; then - case " $rmdirs " in -- *" $objdir "*) ;; -- *) rmdirs="$rmdirs $objdir" ;; -+ *" $odir "*) ;; -+ *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. -- if (test -L "$file") >/dev/null 2>&1 \ -- || (test -h "$file") >/dev/null 2>&1 \ -- || test -f "$file"; then -+ if { test -L "$file"; } >/dev/null 2>&1 || -+ { test -h "$file"; } >/dev/null 2>&1 || -+ test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 -@@ -4687,298 +9489,154 @@ - case $name in - *.la) - # Possibly a libtool archive, so verify it. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- . $dir/$name -+ if func_lalib_p "$file"; then -+ func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do -- rmfiles="$rmfiles $objdir/$n" -+ func_append rmfiles " $odir/$n" - done -- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ test -n "$old_library" && func_append rmfiles " $odir/$old_library" - -- if test $mode = uninstall; then -+ case "$opt_mode" in -+ clean) -+ case " $library_names " in -+ *" $dlname "*) ;; -+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; -+ esac -+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" -+ ;; -+ uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. -- eval cmds=\"$postuninstall_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- if test $? != 0 && test "$rmforce" != yes; then -- exit_status=1 -- fi -- done -- IFS="$save_ifs" -+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. -- eval cmds=\"$old_postuninstall_cmds\" -- save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- if test $? != 0 && test "$rmforce" != yes; then -- exit_status=1 -- fi -- done -- IFS="$save_ifs" -+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. -- fi -+ ;; -+ esac - fi - ;; - - *.lo) -- if test "$build_old_libs" = yes; then -- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` -- rmfiles="$rmfiles $dir/$oldobj" -+ # Possibly a libtool object, so verify it. -+ if func_lalib_p "$file"; then -+ -+ # Read the .lo file -+ func_source $dir/$name -+ -+ # Add PIC object to the list of files to remove. -+ if test -n "$pic_object" && -+ test "$pic_object" != none; then -+ func_append rmfiles " $dir/$pic_object" -+ fi -+ -+ # Add non-PIC object to the list of files to remove. -+ if test -n "$non_pic_object" && -+ test "$non_pic_object" != none; then -+ func_append rmfiles " $dir/$non_pic_object" -+ fi - fi - ;; - - *) -- # Do a test to see if this is a libtool program. -- if test $mode = clean && -- (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- relink_command= -- . $dir/$file -+ if test "$opt_mode" = clean ; then -+ noexename=$name -+ case $file in -+ *.exe) -+ func_stripname '' '.exe' "$file" -+ file=$func_stripname_result -+ func_stripname '' '.exe' "$name" -+ noexename=$func_stripname_result -+ # $file with .exe has already been added to rmfiles, -+ # add $file without .exe -+ func_append rmfiles " $file" -+ ;; -+ esac -+ # Do a test to see if this is a libtool program. -+ if func_ltwrapper_p "$file"; then -+ if func_ltwrapper_executable_p "$file"; then -+ func_ltwrapper_scriptname "$file" -+ relink_command= -+ func_source $func_ltwrapper_scriptname_result -+ func_append rmfiles " $func_ltwrapper_scriptname_result" -+ else -+ relink_command= -+ func_source $dir/$noexename -+ fi - -- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -- if test "$fast_install" = yes && test -n "$relink_command"; then -- rmfiles="$rmfiles $objdir/lt-$name" -+ # note $name still contains .exe if it was in $file originally -+ # as does the version of $file that was added into $rmfiles -+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" -+ if test "$fast_install" = yes && test -n "$relink_command"; then -+ func_append rmfiles " $odir/lt-$name" -+ fi -+ if test "X$noexename" != "X$name" ; then -+ func_append rmfiles " $odir/lt-${noexename}.c" -+ fi - fi - fi - ;; - esac -- $show "$rm $rmfiles" -- $run $rm $rmfiles || exit_status=1 -+ func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then -- $show "rmdir $dir" -- $run rmdir $dir >/dev/null 2>&1 -+ func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -- ;; -+} - -- "") -- $echo "$modename: you must specify a MODE" 1>&2 -- $echo "$generic_help" 1>&2 -- exit 1 -- ;; -- esac -+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && -+ func_mode_uninstall ${1+"$@"} - -- if test -z "$exec_cmd"; then -- $echo "$modename: invalid operation mode \`$mode'" 1>&2 -- $echo "$generic_help" 1>&2 -- exit 1 -- fi --fi # test -z "$show_help" -+test -z "$opt_mode" && { -+ help="$generic_help" -+ func_fatal_help "you must specify a MODE" -+} -+ -+test -z "$exec_cmd" && \ -+ func_fatal_help "invalid operation mode \`$opt_mode'" - - if test -n "$exec_cmd"; then -- eval exec $exec_cmd -- exit 1 -+ eval exec "$exec_cmd" -+ exit $EXIT_FAILURE - fi - --# We need to display help for each of the modes. --case $mode in --"") $echo \ --"Usage: $modename [OPTION]... [MODE-ARG]... -- --Provide generalized library-building support services. -- -- --config show all configuration variables -- --debug enable verbose shell tracing ---n, --dry-run display commands without modifying any files -- --features display basic configuration information and exit -- --finish same as \`--mode=finish' -- --help display this help message and exit -- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] -- --quiet same as \`--silent' -- --silent don't print informational messages -- --version print version information -- --MODE must be one of the following: -- -- clean remove files from the build directory -- compile compile a source file into a libtool object -- execute automatically set library path, then run a program -- finish complete the installation of libtool libraries -- install install libraries or executables -- link create a library or an executable -- uninstall remove libraries from an installed directory -- --MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for --a more detailed description of MODE." -- exit 0 -- ;; -- --clean) -- $echo \ --"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... -- --Remove files from the build directory. -- --RM is the name of the program to use to delete files associated with each FILE --(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed --to RM. -- --If FILE is a libtool library, object or program, all the files associated --with it are deleted. Otherwise, only FILE itself is deleted using RM." -- ;; -- --compile) -- $echo \ --"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE -- --Compile a source file into a libtool library object. -- --This mode accepts the following additional options: -- -- -o OUTPUT-FILE set the output file name to OUTPUT-FILE -- -prefer-pic try to building PIC objects only -- -prefer-non-pic try to building non-PIC objects only -- -static always build a \`.o' file suitable for static linking -- --COMPILE-COMMAND is a command to be used in creating a \`standard' object file --from the given SOURCEFILE. -- --The output file name is determined by removing the directory component from --SOURCEFILE, then substituting the C source code suffix \`.c' with the --library object suffix, \`.lo'." -- ;; -- --execute) -- $echo \ --"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... -- --Automatically set library path, then run a program. -- --This mode accepts the following additional options: -- -- -dlopen FILE add the directory containing FILE to the library path -- --This mode sets the library path environment variable according to \`-dlopen' --flags. -- --If any of the ARGS are libtool executable wrappers, then they are translated --into their corresponding uninstalled binary, and any of their required library --directories are added to the library path. -- --Then, COMMAND is executed, with ARGS as arguments." -- ;; -- --finish) -- $echo \ --"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... -- --Complete the installation of libtool libraries. -- --Each LIBDIR is a directory that contains libtool libraries. -- --The commands that this mode executes may require superuser privileges. Use --the \`--dry-run' option if you just want to see what would be executed." -- ;; -- --install) -- $echo \ --"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... -- --Install executables or libraries. -- --INSTALL-COMMAND is the installation command. The first component should be --either the \`install' or \`cp' program. -- --The rest of the components are interpreted as arguments to that command (only --BSD-compatible install options are recognized)." -- ;; -- --link) -- $echo \ --"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... -- --Link object files or libraries together to form another library, or to --create an executable program. -- --LINK-COMMAND is a command using the C compiler that you would use to create --a program from several object files. -- --The following components of LINK-COMMAND are treated specially: -- -- -all-static do not do any dynamic linking at all -- -avoid-version do not add a version suffix if possible -- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -- -export-symbols SYMFILE -- try to export only the symbols listed in SYMFILE -- -export-symbols-regex REGEX -- try to export only the symbols matching REGEX -- -LLIBDIR search LIBDIR for required installed libraries -- -lNAME OUTPUT-FILE requires the installed library libNAME -- -module build a library that can dlopened -- -no-fast-install disable the fast-install mode -- -no-install link a not-installable executable -- -no-undefined declare that a library does not refer to external symbols -- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -- -release RELEASE specify package release information -- -rpath LIBDIR the created library will eventually be installed in LIBDIR -- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -- -static do not do any dynamic linking of libtool libraries -- -version-info CURRENT[:REVISION[:AGE]] -- specify library version info [each variable defaults to 0] -- --All other options (arguments beginning with \`-') are ignored. -- --Every other argument is treated as a filename. Files ending in \`.la' are --treated as uninstalled libtool libraries, other files are standard or library --object files. -- --If the OUTPUT-FILE ends in \`.la', then a libtool library is created, --only library objects (\`.lo' files) may be specified, and \`-rpath' is --required, except when creating a convenience library. -- --If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created --using \`ar' and \`ranlib', or on Windows using \`lib'. -- --If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file --is created, otherwise an executable program is created." -- ;; -- --uninstall) -- $echo \ --"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... -- --Remove libraries from an installation directory. -- --RM is the name of the program to use to delete files associated with each FILE --(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed --to RM. -- --If FILE is a libtool library, all the files associated with it are deleted. --Otherwise, only FILE itself is deleted using RM." -- ;; -- --*) -- $echo "$modename: invalid operation mode \`$mode'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; --esac -+exit $exit_status - --echo --$echo "Try \`$modename --help' for more information about other modes." - --exit 0 -+# The TAGs below are defined such that we never get into a situation -+# in which we disable both kinds of libraries. Given conflicting -+# choices, we go for a static library, that is the most portable, -+# since we can't tell whether shared libraries were disabled because -+# the user asked for that or because the platform doesn't support -+# them. This is particularly important on AIX, because we don't -+# support having both static and shared libraries enabled at the same -+# time on that platform, so we default to a shared-only configuration. -+# If a disable-shared tag is given, we'll fallback to a static-only -+# configuration. But we'll never go from static-only to shared-only. -+ -+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -+build_libtool_libs=no -+build_old_libs=yes -+# ### END LIBTOOL TAG CONFIG: disable-shared -+ -+# ### BEGIN LIBTOOL TAG CONFIG: disable-static -+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -+# ### END LIBTOOL TAG CONFIG: disable-static - - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: -+# vi:sw=2 -+ diff --git a/debian/patches/019_nx-X11_expat-build-against-system-libxmltok.full.patch b/debian/patches/019_nx-X11_expat-build-against-system-libxmltok.full.patch deleted file mode 100644 index d32e570a3..000000000 --- a/debian/patches/019_nx-X11_expat-build-against-system-libxmltok.full.patch +++ /dev/null @@ -1,43 +0,0 @@ -Description: Building expat against system's libxmltok library - Provide support for building expat against the system's libxmltok library. - . - Not reported to upstream as this patch is mainly imported for being compliant - with Debian policy (lintian error: embedded-library). -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/lib/expat/Imakefile -+++ b/nx-X11/lib/expat/Imakefile -@@ -19,7 +19,7 @@ - EXPATSRC = $(EXPATTOP)/lib - EXPATINC = $(EXPATTOP)/lib - --INCLUDES = -I$(EXPATINC) -I$(EXPATTOP) -I. -+INCLUDES = -I/usr/include/xmltok -I/usr/local/include/xmltok -I$(EXPATINC) -I$(EXPATTOP) -I. - - /* - * Endianness (for short's) -@@ -31,8 +31,8 @@ - DEFINES = -DXML_BYTE_ORDER=0 -DX_BYTE_ORDER=$(X_BYTE_ORDER) - REQUIREDLIBS=$(LDPRELIBS) - --SRCS = xmlparse.c xmltok.c xmlrole.c --OBJS = xmlparse.o xmltok.o xmlrole.o -+#SRCS = xmlparse.c xmltok.c xmlrole.c -+#OBJS = xmlparse.o xmltok.o xmlrole.o - - HEADERS = expat.h - -@@ -45,9 +45,9 @@ - - DependTarget() - --LinkSourceFile(xmlparse.c,$(EXPATSRC)) --LinkSourceFile(xmltok.c,$(EXPATSRC)) --LinkSourceFile(xmlrole.c,$(EXPATSRC)) -+#LinkSourceFile(xmlparse.c,$(EXPATSRC)) -+#LinkSourceFile(xmltok.c,$(EXPATSRC)) -+#LinkSourceFile(xmlrole.c,$(EXPATSRC)) - LinkSourceFile(expat.h,$(EXPATINC)) - - diff --git a/debian/patches/series b/debian/patches/series index 0e6ec06e9..82c949ccd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,9 +14,6 @@ 014_nxcompshad_makefile-uninstall+autoconf.full.patch 015_nxproxy_makefile-uninstall.full+lite.patch 016_nx-X11_install-location.full.patch -017_nx-X11_update-autotools-helper-files.full.patch -018_nx-X11_update-libtool-ltmain-script.full.patch -019_nx-X11_expat-build-against-system-libxmltok.full.patch 024_fix-make-clean.full.patch 024_fix-make-clean.full+lite.patch 025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch -- cgit v1.2.3 From 0c42e33b4268ea405afab4c8a512716fa5c5e31c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:25:43 +0100 Subject: Update 031_nx-X11_parallel-make.full.patch. Don't patch .original files in NX code tree. --- debian/patches/031_nx-X11_parallel-make.full.patch | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'debian') diff --git a/debian/patches/031_nx-X11_parallel-make.full.patch b/debian/patches/031_nx-X11_parallel-make.full.patch index e87918a71..496020545 100644 --- a/debian/patches/031_nx-X11_parallel-make.full.patch +++ b/debian/patches/031_nx-X11_parallel-make.full.patch @@ -198,31 +198,3 @@ Last-Update: 2012-01-26 22:29:13.993994227 +0100 ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \ ---- a/nx-X11/lib/X11/Imakefile.NX.original -+++ b/nx-X11/lib/X11/Imakefile.NX.original -@@ -1159,21 +1159,17 @@ - - #ifdef SunArchitecture - $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) -- cd $(NX_XCOMPLIBDIR) && \ -- gmake -+ ${MAKE} -C $(NX_XCOMPLIBDIR) - - $(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) -- cd ../../../nxcompext && \ -- gmake -+ ${MAKE} -C ../../../nxcompext - - #else - $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) -- cd $(NX_XCOMPLIBDIR) && \ -- make -+ ${MAKE} -C $(NX_XCOMPLIBDIR) - - $(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) -- cd ../../../nxcompext && \ -- make -+ ${MAKE} -C ../../../nxcompext - - #endif - -- cgit v1.2.3 From 237d7487fc39a25108a2b690ec4c104edbd4b1c0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:26:51 +0100 Subject: Update 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't patch files matter to the NX code reduction efforts. --- ...nxcompext+nxcompshad_unique-libnames.full.patch | 24 ---------------------- 1 file changed, 24 deletions(-) (limited to 'debian') diff --git a/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch b/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch index 1f3fd11bd..7c21c6fe5 100644 --- a/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch +++ b/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch @@ -26,7 +26,6 @@ Last-Update: 2012-02-15 nx-X11/config/cf/lnxLib.tmpl | 4 nx-X11/lib/X11/Imakefile | 2 nx-X11/lib/XRes/Imakefile | 2 - nx-X11/lib/XTrap/Imakefile | 2 nx-X11/lib/Xau/Imakefile | 2 nx-X11/lib/Xcomposite/Imakefile | 2 nx-X11/lib/Xcomposite/xcomposite.pc.in | 2 @@ -38,7 +37,6 @@ Last-Update: 2012-02-15 nx-X11/lib/Xext/Imakefile | 2 nx-X11/lib/Xfixes/Imakefile | 2 nx-X11/lib/Xfixes/xfixes.pc.in | 2 - nx-X11/lib/Xfontcache/Imakefile | 2 nx-X11/lib/Xinerama/Imakefile | 2 nx-X11/lib/Xpm/Imakefile | 2 nx-X11/lib/Xrandr/Imakefile | 2 @@ -876,17 +874,6 @@ Last-Update: 2012-02-15 #define SoRev SOXRESREV #define LibHeaders NO ---- a/nx-X11/lib/XTrap/Imakefile -+++ b/nx-X11/lib/XTrap/Imakefile -@@ -4,7 +4,7 @@ - #define DoSharedLib SharedLibXTrap - #define DoDebugLib DebugLibXTrap - #define DoProfileLib ProfileLibXTrap --#define LibName XTrap -+#define LibName NX_XTrap - #define SoRev SOXTRAPREV - #define LibHeaders NO - --- a/nx-X11/lib/Xau/Imakefile +++ b/nx-X11/lib/Xau/Imakefile @@ -10,7 +10,7 @@ @@ -996,17 +983,6 @@ Last-Update: 2012-02-15 Cflags: -I${includedir} @X_CFLAGS@ -Libs: -L${libdir} -lXfixes @X_LIBS@ +Libs: -L${libdir} -lNX_Xfixes @X_LIBS@ ---- a/nx-X11/lib/Xfontcache/Imakefile -+++ b/nx-X11/lib/Xfontcache/Imakefile -@@ -9,7 +9,7 @@ - #define DoExtraLib SharedLibXfontcache - #define DoDebugLib DebugLibXfontcache - #define DoProfileLib ProfileLibXfontcache --#define LibName Xfontcache -+#define LibName NX_Xfontcache - #define SoRev SOXFONTCACHEREV - #define LibHeaders NO - --- a/nx-X11/lib/Xinerama/Imakefile +++ b/nx-X11/lib/Xinerama/Imakefile @@ -4,7 +4,7 @@ -- cgit v1.2.3 From 91dc4b5099128d024e98dce760c12f995ca4d8fc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:29:45 +0100 Subject: Drop 604_nx-X11_recent-freetype-API.full.patch. Not used in current build process. --- debian/patches/604_nx-X11_recent-freetype-API.full.patch | 15 --------------- debian/patches/series | 1 - 2 files changed, 16 deletions(-) delete mode 100644 debian/patches/604_nx-X11_recent-freetype-API.full.patch (limited to 'debian') diff --git a/debian/patches/604_nx-X11_recent-freetype-API.full.patch b/debian/patches/604_nx-X11_recent-freetype-API.full.patch deleted file mode 100644 index e751fb82d..000000000 --- a/debian/patches/604_nx-X11_recent-freetype-API.full.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Fix FTBFS against libfreetype6 (>= 2.5.0) -Author: Mike Gabriel ---- a/nx-X11/lib/Xft/xftglyphs.c -+++ b/nx-X11/lib/Xft/xftglyphs.c -@@ -23,7 +23,9 @@ - */ - - #include "xftint.h" --#include -+ -+#include -+#include FT_FREETYPE_H - - static const int filters[3][3] = { - /* red */ diff --git a/debian/patches/series b/debian/patches/series index 82c949ccd..e6398bc19 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -65,7 +65,6 @@ 601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch 602_nx-X11_initgroups.full.patch 603_nx-X11_compilation_warnings.full.patch -604_nx-X11_recent-freetype-API.full.patch 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch -- cgit v1.2.3 From 231ffa85e3383acb1537231de6d0ed0ef60e39e3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:31:35 +0100 Subject: Update 991_fix-hr-typos.full.patch. Don't patch files that get removed by the NX code reduction effort. --- debian/patches/991_fix-hr-typos.full.patch | 40 ------------------------------ 1 file changed, 40 deletions(-) (limited to 'debian') diff --git a/debian/patches/991_fix-hr-typos.full.patch b/debian/patches/991_fix-hr-typos.full.patch index cc862a8b4..3836adf55 100644 --- a/debian/patches/991_fix-hr-typos.full.patch +++ b/debian/patches/991_fix-hr-typos.full.patch @@ -1,35 +1,6 @@ Description: Fix several typos in nx-X11 Author: Mike Gabriel ---- a/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c -+++ b/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c -@@ -729,7 +729,7 @@ - for (i = 0; attr[i]; i += 2) { - if (!strcmp (attr[i], "driver")) driver = attr[i+1]; - else if (!strcmp (attr[i], "screen")) screen = attr[i+1]; -- else XML_WARNING("unkown device attribute: %s.", attr[i]); -+ else XML_WARNING("unknown device attribute: %s.", attr[i]); - } - if (driver && strcmp (driver, data->driverName)) - data->ignoringDevice = data->inDevice; -@@ -749,7 +749,7 @@ - for (i = 0; attr[i]; i += 2) { - if (!strcmp (attr[i], "name")) name = attr[i+1]; - else if (!strcmp (attr[i], "executable")) exec = attr[i+1]; -- else XML_WARNING("unkown application attribute: %s.", attr[i]); -+ else XML_WARNING("unknown application attribute: %s.", attr[i]); - } - if (exec && strcmp (exec, data->execName)) - data->ignoringApp = data->inApp; -@@ -762,7 +762,7 @@ - for (i = 0; attr[i]; i += 2) { - if (!strcmp (attr[i], "name")) name = attr[i+1]; - else if (!strcmp (attr[i], "value")) value = attr[i+1]; -- else XML_WARNING("unkown option attribute: %s.", attr[i]); -+ else XML_WARNING("unknown option attribute: %s.", attr[i]); - } - if (!name) XML_WARNING1 ("name attribute missing in option."); - if (!value) XML_WARNING1 ("value attribute missing in option."); --- a/nx-X11/extras/Mesa/src/mesa/main/debug.c +++ b/nx-X11/extras/Mesa/src/mesa/main/debug.c @@ -43,7 +43,7 @@ @@ -52,17 +23,6 @@ Author: Mike Gabriel err = GL_TRUE; } else { ---- a/nx-X11/extras/Mesa/src/mesa/shader/slang/Include/InfoSink.h -+++ b/nx-X11/extras/Mesa/src/mesa/shader/slang/Include/InfoSink.h -@@ -88,7 +88,7 @@ - case EPrefixError: append("ERROR: "); break; - case EPrefixInternalError: append("INTERNAL ERROR: "); break; - case EPrefixUnimplemented: append("UNIMPLEMENTED: "); break; -- default: append("UNKOWN ERROR: "); break; -+ default: append("UNKNOWN ERROR: "); break; - } - } - void location(TSourceLoc loc) { --- a/nx-X11/ChangeLog.X.org +++ b/nx-X11/ChangeLog.X.org @@ -12733,7 +12733,7 @@ -- cgit v1.2.3 From 4db6f0fdba904d00c1cfc3909b9b2c09655abf87 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 Feb 2015 04:59:13 +0100 Subject: Add patch 700_nx-X11_mesa-initialize-server-support-correctly.full.patch. Initialize server_support array with correct size. Fix Mesa upstream bugzilla bug #7353. (Fixes: #776). --- debian/changelog | 5 +++ ...-initialize-server-support-correctly.full.patch | 49 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 55 insertions(+) create mode 100644 debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bebcf51e8..a5e08c030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -100,6 +100,11 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium launched as x2goagent, use X2Go-specific paths for the keystrokes.cfg file. (Fixes: #744). + [ Heinrich Schuchardt ] + + Add patch 700_nx-X11_mesa-initialize-server-support-correctly.full.patch. + Initialize server_support array with correct size. Fix Mesa upstream + bugzilla bug #7353. (Fixes: #776). + [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. diff --git a/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch b/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch new file mode 100644 index 000000000..3fe8c5745 --- /dev/null +++ b/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch @@ -0,0 +1,49 @@ +From 7ef4a07165d49e671f6f569ee87bfe893b1e7fcf Mon Sep 17 00:00:00 2001 +From: Ian Romanick +Date: Thu, 13 Jul 2006 15:27:37 +0000 +Subject: [PATCH] Move initialization of server_support from + __glXProcessServerString to __glXCalcualteUsableExtensions. By having both + callers of __glXProcessServerString initialize the bit-fields passed in, we + guarantee that the correct amount of data is initialized: + +This fixes bugzilla #7353. +--- + nx-X11/extras/Mesa/src/glx/x11/glxextensions.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c b/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c +index c3bc930..d00bdbb 100644 +--- a/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c ++++ b/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c +@@ -319,6 +319,11 @@ set_glx_extension( const struct extension_info * ext, + * + * \param server_string GLX extension string from the server. + * \param server_support Bit-field of supported extensions. ++ * ++ * \note ++ * This function is used to process both GLX and GL extension strings. The ++ * bit-fields used to track each of these have different sizes. Therefore, ++ * the data pointed by \c server_support must be preinitialized to zero. + */ + static void + __glXProcessServerString( const struct extension_info * ext, +@@ -328,8 +333,6 @@ __glXProcessServerString( const struct extension_info * ext, + unsigned base; + unsigned len; + +- (void) memset( server_support, 0, sizeof( server_support ) ); +- + for ( base = 0 ; server_string[ base ] != NUL ; /* empty */ ) { + /* Determine the length of the next extension name. + */ +@@ -580,6 +583,8 @@ __glXCalculateUsableExtensions( __GLXscreenConfigs *psc, + + __glXExtensionsCtr(); + __glXExtensionsCtrScreen( psc ); ++ ++ (void) memset( server_support, 0, sizeof( server_support ) ); + __glXProcessServerString( known_glx_extensions, + psc->serverGLXexts, server_support ); + +-- +2.1.4 diff --git a/debian/patches/series b/debian/patches/series index e6398bc19..1b0e2b545 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,6 +68,7 @@ 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch +700_nx-X11_mesa-initialize-server-support-correctly.full.patch 990_fix-DEBUG-and-TEST-builds.full.patch 991_fix-hr-typos.full+lite.patch 991_fix-hr-typos.full.patch -- cgit v1.2.3 From 939492d83d5be30d139519367e6c8451cef95608 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 10:32:49 +0100 Subject: Revert "Add patch 700_nx-X11_mesa-initialize-server-support-correctly.full.patch. Initialize server_support array with correct size. Fix Mesa upstream bugzilla bug #7353. (Fixes: #776)." This reverts commit 4db6f0fdba904d00c1cfc3909b9b2c09655abf87. Reason: the file nx-X11/extras/Mesa/src/glx/x11/glxextensions.c is not used at build time and has been removed from the code base in NX 3.6. --- debian/changelog | 5 --- ...-initialize-server-support-correctly.full.patch | 49 ---------------------- debian/patches/series | 1 - 3 files changed, 55 deletions(-) delete mode 100644 debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a5e08c030..bebcf51e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -100,11 +100,6 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium launched as x2goagent, use X2Go-specific paths for the keystrokes.cfg file. (Fixes: #744). - [ Heinrich Schuchardt ] - + Add patch 700_nx-X11_mesa-initialize-server-support-correctly.full.patch. - Initialize server_support array with correct size. Fix Mesa upstream - bugzilla bug #7353. (Fixes: #776). - [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. diff --git a/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch b/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch deleted file mode 100644 index 3fe8c5745..000000000 --- a/debian/patches/700_nx-X11_mesa-initialize-server-support-correctly.full.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7ef4a07165d49e671f6f569ee87bfe893b1e7fcf Mon Sep 17 00:00:00 2001 -From: Ian Romanick -Date: Thu, 13 Jul 2006 15:27:37 +0000 -Subject: [PATCH] Move initialization of server_support from - __glXProcessServerString to __glXCalcualteUsableExtensions. By having both - callers of __glXProcessServerString initialize the bit-fields passed in, we - guarantee that the correct amount of data is initialized: - -This fixes bugzilla #7353. ---- - nx-X11/extras/Mesa/src/glx/x11/glxextensions.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c b/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c -index c3bc930..d00bdbb 100644 ---- a/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c -+++ b/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c -@@ -319,6 +319,11 @@ set_glx_extension( const struct extension_info * ext, - * - * \param server_string GLX extension string from the server. - * \param server_support Bit-field of supported extensions. -+ * -+ * \note -+ * This function is used to process both GLX and GL extension strings. The -+ * bit-fields used to track each of these have different sizes. Therefore, -+ * the data pointed by \c server_support must be preinitialized to zero. - */ - static void - __glXProcessServerString( const struct extension_info * ext, -@@ -328,8 +333,6 @@ __glXProcessServerString( const struct extension_info * ext, - unsigned base; - unsigned len; - -- (void) memset( server_support, 0, sizeof( server_support ) ); -- - for ( base = 0 ; server_string[ base ] != NUL ; /* empty */ ) { - /* Determine the length of the next extension name. - */ -@@ -580,6 +583,8 @@ __glXCalculateUsableExtensions( __GLXscreenConfigs *psc, - - __glXExtensionsCtr(); - __glXExtensionsCtrScreen( psc ); -+ -+ (void) memset( server_support, 0, sizeof( server_support ) ); - __glXProcessServerString( known_glx_extensions, - psc->serverGLXexts, server_support ); - --- -2.1.4 diff --git a/debian/patches/series b/debian/patches/series index 1b0e2b545..e6398bc19 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,7 +68,6 @@ 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch -700_nx-X11_mesa-initialize-server-support-correctly.full.patch 990_fix-DEBUG-and-TEST-builds.full.patch 991_fix-hr-typos.full+lite.patch 991_fix-hr-typos.full.patch -- cgit v1.2.3 From eb55dc8fd6974ca6f3325d2d30e56c96f28d2876 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 10:37:17 +0100 Subject: Drop not-used-anymore NX source tree clean-up code. Source tree has been cleaned up natively. --- debian/roll-tarballs.sh | 29 ----------------------------- debian/rules | 26 -------------------------- nx-libs.spec | 26 -------------------------- 3 files changed, 81 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 9b63529f7..a8d3cf63f 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -139,39 +139,10 @@ mv -v debian/changelog doc/changelog test -f Makefile || test -f debian/Makefile.nx-libs && cp -v debian/Makefile.nx-libs Makefile test -f replace.sh || test -f debian/Makefile.replace.sh && cp -v debian/Makefile.replace.sh replace.sh - - -#### stuff we do not needed -UNUSED_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-UNUSED` -CLEANUP_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-BRUTAL` -UNNEEDED_BACKUPS=`cat debian/CODE-REDUCTION_CLEANUP-BACKUPFILES` -PRESERVE_SYMLINKED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-SYMLINKED` -PRESERVE_INCLUDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-INCLUDED` -PRESERVE_NEEDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-NEEDED` - # remove folders that we do not want to roll into the tarball rm -Rf ".pc/" rm -Rf "debian/" -mkdir -p .preserve/ -for path in ${PRESERVE_SYMLINKED_FILES} ${PRESERVE_INCLUDED_FILES} ${PRESERVE_NEEDED_FILES}; do - if [ ! -d $path ]; then - path_dirname=$(dirname "$path") - else - path_dirname="$path" - fi - mkdir -vp ".preserve/$path_dirname" - cp -av "$path" ".preserve/$path" -done - -for path in ${UNUSED_FOLDERS} ${CLEANUP_FOLDERS} ${UNNEEDED_BACKUPS}; do - rm -R "$path" -done - -# re-create the to-be-preserved files -cp -a .preserve/* ./ -rm -Rf .preserve/ - # remove files, that we do not want in the tarballs (build cruft) rm -Rf nx*/configure nx*/autom4te.cache* diff --git a/debian/rules b/debian/rules index 099050b7d..b8e4ad4e1 100755 --- a/debian/rules +++ b/debian/rules @@ -13,14 +13,6 @@ export INCLUDEDIR = "/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARC %: CONFIGURE="./configure --with-symbols --prefix=/usr --libdir=$(LIBDIR) --includedir=$(INCLUDEDIR)" dh $@ --with quilt -# before build, we will remove unused code / bundled libraries (keep this in sync with roll-tarball.sh) -UNUSED_FOLDERS = "debian/CODE-REDUCTION_CLEANUP-UNUSED" -CLEANUP_FOLDERS = "debian/CODE-REDUCTION_CLEANUP-BRUTAL" -UNNEEDED_BACKUPS = "debian/CODE-REDUCTION_CLEANUP-BACKUPFILES" -PRESERVE_SYMLINKED_FILES = "debian/CODE-REDUCTION_PRESERVE-SYMLINKED" -PRESERVE_NEEDED_FILES = "debian/CODE-REDUCTION_PRESERVE-NEEDED" -PRESERVE_INCLUDED_FILES = "debian/CODE-REDUCTION_PRESERVE-INCLUDED" - override_dh_auto_clean: rm -Rf nx-X11/.build-exports dh_auto_clean @@ -121,24 +113,6 @@ override_dh_auto_build: # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst - # make a copy of code to be preserved for build - mkdir -p .preserve - for path in `cat $(PRESERVE_SYMLINKED_FILES)` `cat $(PRESERVE_NEEDED_FILES)` `cat $(PRESERVE_INCLUDED_FILES)`; do \ - if echo $$path | grep -E "^#.*"; then continue; fi; \ - test -d $$path && mkdir -p .preserve/$$path || mkdir -p .preserve/$$(dirname $$path); \ - cp -av $$path .preserve/$$path; \ - done - - # remove unused code / bundled libraries (see at the top of the debian/rules file) - # for the exact list of files and folders - rm -Rf `cat $(UNUSED_FOLDERS)` - rm -Rf `cat $(CLEANUP_FOLDERS)` - rm -Rf `cat $(UNNEEDED_BACKUPS)` - - # copy to-be-preserved files back into code tree - cp -av .preserve/* . - rm -Rf .preserve/ - LOCAL_LDFLAGS=$(LDFLAGS) SHLIBGLOBALSFLAGS=$(LDFLAGS) SHLIBDIR=$(LIBDIR) PREFIX=/usr dh_auto_build --parallel override_dh_strip: diff --git a/nx-libs.spec b/nx-libs.spec index 93549d9d1..0085221c3 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -672,32 +672,6 @@ cp -v debian/x2goagent.keyboard etc/x2goagent.keyboard cp -v debian/VERSION VERSION.x2goagent cp -v debian/VERSION nxcomp/VERSION -### remove bundled libraries (also taken from roll-tarball.sh) -UNUSED_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-UNUSED` -CLEANUP_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-BRUTAL` -UNNEEDED_BACKUPS=`cat debian/CODE-REDUCTION_CLEANUP-BACKUPFILES` -PRESERVE_SYMLINKED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-SYMLINKED` -PRESERVE_INCLUDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-INCLUDED` -PRESERVE_NEEDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-NEEDED` -mkdir -p .preserve/ -for path in ${PRESERVE_SYMLINKED_FILES} ${PRESERVE_INCLUDED_FILES} ${PRESERVE_NEEDED_FILES}; do - if [ ! -d $path ]; then - path_dirname=$(dirname "$path") - else - path_dirname="$path" - fi - mkdir -vp ".preserve/$path_dirname" - cp -av "$path" ".preserve/$path" -done -for path in ${UNUSED_FOLDERS} ${CLEANUP_FOLDERS} ${UNNEEDED_BACKUPS}; do - rm -R "$path" -done - -# re-create the to-be-preserved files -cp -a .preserve/* ./ -rm -Rf .preserve/ -### end of remove bundle libraries - # remove build cruft that is in Git (also taken from roll-tarball.sh) rm -Rf nx*/configure nx*/autom4te.cache* # Install into /usr -- cgit v1.2.3 From abbe9386166a062755b190c1ee8755b430201c64 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 10:46:10 +0100 Subject: fix long-line in changelog --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bebcf51e8..bbd4372d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -84,7 +84,8 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium library package (names) as obsolete. + Don't depend on nx-libs base package with fixed version. + Don't fail if removing *.a files fails due to the files being non-present. - + Set PREFIX=%{_prefix} USRLIBDIR=%{_libdir} SHLIBDIR=%{_libdir} at build time. + + Set PREFIX=%{_prefix} USRLIBDIR=%{_libdir} SHLIBDIR=%{_libdir} at build + time. + Assure that BuildRoot: is set. + On SLE 11.x: libX* packages are prefixed with "xorg-x11-". -- cgit v1.2.3 From 7a1bd6b29b1b780569a09b0c534000a9841a70b6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 11:44:17 +0100 Subject: Provide README.NX-development file. Drop README.NX-redistribution file. --- README.NX-development | 32 +++++++++++++++ ...00_add-NX-redistribution-README.full+lite.patch | 48 ---------------------- debian/patches/series | 1 - 3 files changed, 32 insertions(+), 49 deletions(-) create mode 100644 README.NX-development delete mode 100644 debian/patches/000_add-NX-redistribution-README.full+lite.patch (limited to 'debian') diff --git a/README.NX-development b/README.NX-development new file mode 100644 index 000000000..50bc505a6 --- /dev/null +++ b/README.NX-development @@ -0,0 +1,32 @@ +NX development by ArcticaProject and X2Go +----------------------------------------- + +This source tree started as a re-distribution of those NX packages needed +to setup FreeNX and/or X2Go on a Linux server. + +The NX re-distribution (3.5.0.x) has been maintained by the X2Go Project: +http://wiki.x2go.org + +Since 2015, the Arctica Project has joined in the NX development. The +core devs of X2Go and Arctica have agreed on stopping to redistribute +NX and instead of that: continue the development of NX 3.x as new +upstream (starting with NX 3.5.99). + +Our goal is: + - provide _one_ tarball that builds NX projects via a common Makefile + - provide _one_ tarball for distribution packagers + - provide support for security issues + - provide support for latest X11 extensions + - improve NX where possible + +This source tree is maintained on Github: + + https://github.com/ArcticaProject/nx-libs (3.6.x branch) + + +If you have any questions about this NX development or want to file a +bug, then please contact the Arctica or the X2Go developers via the +Github issue tracker. + +thanks+light+love, 20150209 +Mike Gabriel diff --git a/debian/patches/000_add-NX-redistribution-README.full+lite.patch b/debian/patches/000_add-NX-redistribution-README.full+lite.patch deleted file mode 100644 index 3e1f2e878..000000000 --- a/debian/patches/000_add-NX-redistribution-README.full+lite.patch +++ /dev/null @@ -1,48 +0,0 @@ -Description: Add README.NX-redistributed -Author: Mike Gabriel - ---- /dev/null -+++ b/README.NX-redistributed -@@ -0,0 +1,42 @@ -+NX redistribution by X2Go -+------------------------- -+This source tree is a re-distribution of those NX packages needed to -+setup FreeNX and/or X2Go on a Linux server. -+ -+The NX re-distribution currently is maintained by the X2Go Project: -+http://wiki.x2go.org -+ -+Our goal is: -+ - provide _one_ tarball that builds NX projects via a common Makefile -+ - provide _one_ tarball for distribution packagers -+ -+This re-distribution contains the following tarballs derived from -+NoMachine (http://www.nomachine.com/sources.php): -+ -+ nxcomp -+ nxcompext -+ nxcompshad -+ nxproxy -+ nx-X11 -+ nxagent -+ nxauth -+ -+The patches we apply are shipped with this tarball, for further introspection -+please refer to this folder: -+ -+ doc/applied-patches -+ -+This source tree is maintained on the X2Go Git server: -+Browsing... http://code.x2go.org/gitweb?p=nx-libs.git;a=summary -+Git-Cloning... git clone git://code.x2go.org/nx-libs.git -+ -+If you have any questions about this NX redistribution or want to file -+a bug, then please contact the X2Go developers on -+ -+ x2go-dev@lists.berlios.de -+ -+The X2Go-Dev mailing list requires subscription before you can post to it: -+http://lists.berlios.de/mailman/listinfo/x2go-dev -+ -+thanks+light+love -+Mike Gabriel diff --git a/debian/patches/series b/debian/patches/series index e6398bc19..4eb064ea0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -000_add-NX-redistribution-README.full+lite.patch 002_nxcompshad_build-against-nx-x11-only.full.patch 003_nxcompshad_gcc43.full.patch 004_nx-X11_fix-nxcompshad-build.full.patch -- cgit v1.2.3 From 3b4a915984b3136f6fddb0cdfdec01cf64715c46 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 11:46:07 +0100 Subject: Build nxcompshad against nx-X11 (002_nxcompshad_build-against-nx-x11-only.full.patch). Make sure nxcompshad get built against nx-X11. . Furthermore /usr/X11R6/lib is an outdated path on current Debian systems. --- ...nxcompshad_build-against-nx-x11-only.full.patch | 39 ---------------------- debian/patches/series | 1 - nxcompshad/Makefile.in | 4 +-- nxcompshad/configure.in | 2 +- 4 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 debian/patches/002_nxcompshad_build-against-nx-x11-only.full.patch (limited to 'debian') diff --git a/debian/patches/002_nxcompshad_build-against-nx-x11-only.full.patch b/debian/patches/002_nxcompshad_build-against-nx-x11-only.full.patch deleted file mode 100644 index 4e92c3b04..000000000 --- a/debian/patches/002_nxcompshad_build-against-nx-x11-only.full.patch +++ /dev/null @@ -1,39 +0,0 @@ -Description: Build nxcompshad against nx-X11. - Make sure nxcompshad get built against nx-X11. - . - Furthermore /usr/X11R6/lib is an outdated path on - current Debian systems. -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nxcompshad/Makefile.in -+++ b/nxcompshad/Makefile.in -@@ -48,7 +48,7 @@ - CCDEFINES = - - LDFLAGS = @LDFLAGS@ --LIBS = @LIBS@ -L/usr/X11R6/lib -lX11 -+LIBS = @LIBS@ -lX11 - - # - # Only if THREADS is defined. -@@ -162,7 +162,7 @@ - -Wl,--enable-auto-import \ - -Wl,--whole-archive ${LIBARCHIVE} \ - -Wl,--no-whole-archive \ -- ${LIBS} -L/usr/X11R6/lib -+ ${LIBS} - - $(PROGRAM): $(MOBJ) $(COBJ) $(CXXOBJ) $(LIBDLL) - # $(CC) $(CCFLAGS) -o $@ $(MOBJ) $(MLIBS) ---- a/nxcompshad/configure.in -+++ b/nxcompshad/configure.in -@@ -19,7 +19,7 @@ - - if test -d "../nx-X11/exports/include" ; then - CXXFLAGS="$CXXFLAGS -I../nx-X11/exports/include" -- LIBS="$LIBS -L../nx-X11/exports/lib" -+ LIBS="-L../nx-X11/exports/lib" - fi - - dnl Check whether --with-ipaq was given. diff --git a/debian/patches/series b/debian/patches/series index 4eb064ea0..e410e2024 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -002_nxcompshad_build-against-nx-x11-only.full.patch 003_nxcompshad_gcc43.full.patch 004_nx-X11_fix-nxcompshad-build.full.patch 005_nxcomp_gcc43.full+lite.patch diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 1580a3594..c6aeaf0cb 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -48,7 +48,7 @@ CCINCLUDES = CCDEFINES = LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -L/usr/X11R6/lib -lX11 +LIBS = @LIBS@ -lX11 # # Only if THREADS is defined. @@ -162,7 +162,7 @@ $(LIBDLL): $(LIBARCHIVE) -Wl,--enable-auto-import \ -Wl,--whole-archive ${LIBARCHIVE} \ -Wl,--no-whole-archive \ - ${LIBS} -L/usr/X11R6/lib + ${LIBS} $(PROGRAM): $(MOBJ) $(COBJ) $(CXXOBJ) $(LIBDLL) # $(CC) $(CCFLAGS) -o $@ $(MOBJ) $(MLIBS) diff --git a/nxcompshad/configure.in b/nxcompshad/configure.in index 3f16ee97f..f0bdecd12 100644 --- a/nxcompshad/configure.in +++ b/nxcompshad/configure.in @@ -19,7 +19,7 @@ dnl Prefer headers and libraries from nx-X11, if present. if test -d "../nx-X11/exports/include" ; then CXXFLAGS="$CXXFLAGS -I../nx-X11/exports/include" - LIBS="$LIBS -L../nx-X11/exports/lib" + LIBS="-L../nx-X11/exports/lib" fi dnl Check whether --with-ipaq was given. -- cgit v1.2.3 From b3496d0a7a76cb0808bbe0f7c84355e4e88878d0 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 9 Feb 2015 11:53:47 +0100 Subject: gcc43 fix (003_nxcompshad_gcc43.full.patch) Use builtin includes to build with gcc43. --- debian/patches/003_nxcompshad_gcc43.full.patch | 33 -------------------------- debian/patches/series | 1 - nxcompshad/Logger.h | 4 ++-- nxcompshad/Misc.h | 4 ++-- 4 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 debian/patches/003_nxcompshad_gcc43.full.patch (limited to 'debian') diff --git a/debian/patches/003_nxcompshad_gcc43.full.patch b/debian/patches/003_nxcompshad_gcc43.full.patch deleted file mode 100644 index 165c30035..000000000 --- a/debian/patches/003_nxcompshad_gcc43.full.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: gcc43 fix - Use builtin includes to build with gcc43. - . - Originally contributed by Marcelo Boveto Shima . -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nxcompshad/Logger.h -+++ b/nxcompshad/Logger.h -@@ -18,8 +18,8 @@ - #ifndef Logger_H - #define Logger_H - --#include --#include -+#include -+#include - - // - // Error handling macros. ---- a/nxcompshad/Misc.h -+++ b/nxcompshad/Misc.h -@@ -20,8 +20,8 @@ - - #include - --#include --#include -+#include -+#include - - using namespace std; - diff --git a/debian/patches/series b/debian/patches/series index e410e2024..3dfca5e33 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -003_nxcompshad_gcc43.full.patch 004_nx-X11_fix-nxcompshad-build.full.patch 005_nxcomp_gcc43.full+lite.patch 006_nxcomp_libpng15.full+lite.patch diff --git a/nxcompshad/Logger.h b/nxcompshad/Logger.h index 94e4da857..2e6430b48 100644 --- a/nxcompshad/Logger.h +++ b/nxcompshad/Logger.h @@ -18,8 +18,8 @@ #ifndef Logger_H #define Logger_H -#include -#include +#include +#include // // Error handling macros. diff --git a/nxcompshad/Misc.h b/nxcompshad/Misc.h index 6dc86359f..27f267036 100644 --- a/nxcompshad/Misc.h +++ b/nxcompshad/Misc.h @@ -20,8 +20,8 @@ #include -#include -#include +#include +#include using namespace std; -- cgit v1.2.3 From dd20ab5e6222bb415245829af8915259da4eae3f Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 11:56:14 +0100 Subject: Description: Fix build on Debian (004_nx-X11_fix-nxcompshad-build.full.patch) By an unknown reason this patch currently is needed to build nx-X11, nxcomp, nxcompshad and nxcompext with dpkg-buildpackage and debuild. --- .../patches/004_nx-X11_fix-nxcompshad-build.full.patch | 18 ------------------ debian/patches/series | 1 - nx-X11/programs/Xserver/Imakefile | 2 +- 3 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 debian/patches/004_nx-X11_fix-nxcompshad-build.full.patch (limited to 'debian') diff --git a/debian/patches/004_nx-X11_fix-nxcompshad-build.full.patch b/debian/patches/004_nx-X11_fix-nxcompshad-build.full.patch deleted file mode 100644 index f65fb7877..000000000 --- a/debian/patches/004_nx-X11_fix-nxcompshad-build.full.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Fix build on Debian - By an unknown reason this patch currently is needed to - build nx-X11, nxcomp, nxcompshad and nxcompext with - dpkg-buildpackage and debuild. -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1047,7 +1047,7 @@ - #else - $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) - cd $(NX_XSHADOWLIBDIR) && \ -- make -+ rm -f *.o && make - #endif - - ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \ diff --git a/debian/patches/series b/debian/patches/series index 3dfca5e33..fef54678f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -004_nx-X11_fix-nxcompshad-build.full.patch 005_nxcomp_gcc43.full+lite.patch 006_nxcomp_libpng15.full+lite.patch 007_nxcompshad_clean-gch-files.full.patch diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 6bf7801e7..1d12173fb 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1047,7 +1047,7 @@ $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) #else $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) cd $(NX_XSHADOWLIBDIR) && \ - make + rm -f *.o && make #endif ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \ -- cgit v1.2.3 From 48c82810715011513dc38dc1fd39d67134d899c5 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 9 Feb 2015 11:57:55 +0100 Subject: Description: gcc43 fix (005_nxcomp_gcc43.full+lite.patch) Use builtin includes to build with gcc43. --- debian/patches/005_nxcomp_gcc43.full+lite.patch | 77 ------------------------- debian/patches/series | 1 - nxcomp/Message.cpp | 4 +- nxcomp/Misc.cpp | 8 +-- nxcomp/Misc.h | 4 +- nxcomp/Proxy.cpp | 4 +- nxcomp/Split.cpp | 2 +- 7 files changed, 11 insertions(+), 89 deletions(-) delete mode 100644 debian/patches/005_nxcomp_gcc43.full+lite.patch (limited to 'debian') diff --git a/debian/patches/005_nxcomp_gcc43.full+lite.patch b/debian/patches/005_nxcomp_gcc43.full+lite.patch deleted file mode 100644 index bb758c2bd..000000000 --- a/debian/patches/005_nxcomp_gcc43.full+lite.patch +++ /dev/null @@ -1,77 +0,0 @@ -Description: gcc43 fix - Use builtin includes to build with gcc43. - . - Originally contributed by Marcelo Boveto Shima . -Forwarded: not-yet -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nxcomp/Message.cpp 2012-03-01 03:46:39.220943822 +0100 -+++ b/nxcomp/Message.cpp 2012-03-01 03:47:27.605712530 +0100 -@@ -15,9 +15,9 @@ - /* */ - /**************************************************************************/ - --#include -+#include - #include --#include -+#include - - #include - ---- a/nxcomp/Misc.cpp 2012-03-01 03:46:39.220943822 +0100 -+++ b/nxcomp/Misc.cpp 2012-03-01 03:47:27.605712530 +0100 -@@ -15,11 +15,11 @@ - /* */ - /**************************************************************************/ - --#include --#include --#include -+#include -+#include -+#include - #include --#include -+#include - - #include - #include ---- a/nxcomp/Misc.h 2012-03-01 03:46:39.220943822 +0100 -+++ b/nxcomp/Misc.h 2012-03-01 03:47:27.605712530 +0100 -@@ -21,8 +21,8 @@ - #include - #include - --#include --#include -+#include -+#include - - #ifdef __sun - ---- a/nxcomp/Proxy.cpp 2012-03-01 03:46:39.224943897 +0100 -+++ b/nxcomp/Proxy.cpp 2012-03-01 03:47:27.605712530 +0100 -@@ -15,9 +15,9 @@ - /* */ - /**************************************************************************/ - --#include -+#include - #include --#include -+#include - #include - #include - ---- a/nxcomp/Split.cpp 2012-03-01 03:46:39.224943897 +0100 -+++ b/nxcomp/Split.cpp 2012-03-01 03:47:27.605712530 +0100 -@@ -16,7 +16,7 @@ - /**************************************************************************/ - - #include --#include -+#include - #include - #include - #include diff --git a/debian/patches/series b/debian/patches/series index fef54678f..9779715e4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -005_nxcomp_gcc43.full+lite.patch 006_nxcomp_libpng15.full+lite.patch 007_nxcompshad_clean-gch-files.full.patch 008_nxcomp_sa-restorer.full+lite.patch diff --git a/nxcomp/Message.cpp b/nxcomp/Message.cpp index 72d4fff3d..188ed9a0e 100644 --- a/nxcomp/Message.cpp +++ b/nxcomp/Message.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include +#include #include -#include +#include #include diff --git a/nxcomp/Misc.cpp b/nxcomp/Misc.cpp index 2c72259e3..7303c595b 100644 --- a/nxcomp/Misc.cpp +++ b/nxcomp/Misc.cpp @@ -15,11 +15,11 @@ /* */ /**************************************************************************/ -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include diff --git a/nxcomp/Misc.h b/nxcomp/Misc.h index 200831757..3f37836f5 100644 --- a/nxcomp/Misc.h +++ b/nxcomp/Misc.h @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #ifdef __sun diff --git a/nxcomp/Proxy.cpp b/nxcomp/Proxy.cpp index 3b4df7eb6..d6c67e0e8 100644 --- a/nxcomp/Proxy.cpp +++ b/nxcomp/Proxy.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include +#include #include -#include +#include #include #include diff --git a/nxcomp/Split.cpp b/nxcomp/Split.cpp index 50627e793..35a4ed4a2 100644 --- a/nxcomp/Split.cpp +++ b/nxcomp/Split.cpp @@ -16,7 +16,7 @@ /**************************************************************************/ #include -#include +#include #include #include #include -- cgit v1.2.3 From f27e7424fc314e50f826036fd078ca64fe3f31ba Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 14:16:10 +0100 Subject: Fix building against libpng 1.5 (006_nxcomp_libpng15.full+lite.patch). From the libpng homepage... The libpng 1.5.x series continues the evolution of the libpng API, finally hiding the contents of the venerable and hoary png_struct and png_info data structures inside private (i.e., non-installed) header files. Instead of direct struct-access, applications should be using the various png_get_xxx() and png_set_xxx() accessor functions, which have existed for almost as long as libpng itself. (Apps that compiled against libpng 1.4 without warnings about deprecated features should happily compile against 1.5, too. Patch origin: Fedora packagers of libXcomp3. --- debian/patches/006_nxcomp_libpng15.full+lite.patch | 43 ---------------------- debian/patches/series | 1 - nxcomp/Pgn.cpp | 6 +-- 3 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 debian/patches/006_nxcomp_libpng15.full+lite.patch (limited to 'debian') diff --git a/debian/patches/006_nxcomp_libpng15.full+lite.patch b/debian/patches/006_nxcomp_libpng15.full+lite.patch deleted file mode 100644 index a75c59bac..000000000 --- a/debian/patches/006_nxcomp_libpng15.full+lite.patch +++ /dev/null @@ -1,43 +0,0 @@ -Description: Fix building against libpng 1.5. - From the libpng homepage... - - The libpng 1.5.x series continues the evolution of the libpng API, - finally hiding the contents of the venerable and hoary png_struct and - png_info data structures inside private (i.e., non-installed) header - files. Instead of direct struct-access, applications should be using - the various png_get_xxx() and png_set_xxx() accessor functions, which - have existed for almost as long as libpng itself. (Apps that compiled - against libpng 1.4 without warnings about deprecated features should - happily compile against 1.5, too. -Forwarded: pending... -Author: Fedora packagers of NX -Last-Update: 2012-02-06 ---- a/nxcomp/Pgn.cpp 2010-03-01 19:18:59.000000000 +0200 -+++ b/nxcomp/Pgn.cpp 2011-09-13 16:35:12.000000000 +0300 -@@ -414,7 +414,7 @@ - - png_read_info(pngPtr, infoPtr); - -- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) -+ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) - { - png_set_expand(pngPtr); - } -@@ -565,7 +565,7 @@ - - png_read_info( pngPtr, infoPtr ) ; - -- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) -+ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) - { - png_set_expand(pngPtr); - } -@@ -709,7 +709,7 @@ - png_read_info(pngPtr, infoPtr) ; - - -- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) -+ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) - { - png_set_expand(pngPtr); - } diff --git a/debian/patches/series b/debian/patches/series index 9779715e4..f82c87bf0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -006_nxcomp_libpng15.full+lite.patch 007_nxcompshad_clean-gch-files.full.patch 008_nxcomp_sa-restorer.full+lite.patch 009_nxproxy_add-man-page.full+lite.patch diff --git a/nxcomp/Pgn.cpp b/nxcomp/Pgn.cpp index a68373441..af26724ef 100644 --- a/nxcomp/Pgn.cpp +++ b/nxcomp/Pgn.cpp @@ -414,7 +414,7 @@ int DecompressPng16(unsigned char *compressedData, int compressedLen, png_read_info(pngPtr, infoPtr); - if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) + if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) { png_set_expand(pngPtr); } @@ -565,7 +565,7 @@ int DecompressPng24(unsigned char *compressedData, int compressedLen, png_read_info( pngPtr, infoPtr ) ; - if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) + if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) { png_set_expand(pngPtr); } @@ -709,7 +709,7 @@ int DecompressPng32(unsigned char *compressedData, int compressedLen, png_read_info(pngPtr, infoPtr) ; - if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE) + if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE) { png_set_expand(pngPtr); } -- cgit v1.2.3 From a720908a60a2bc8da177582f80537ecf3eee45d8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 14:18:50 +0100 Subject: Remove .gch files during cleanup (007_nxcompshad_clean-gch-files.full.patch). When building nxcompshad .gch files get created. On cleanup these should be removed. --- .../patches/007_nxcompshad_clean-gch-files.full.patch | 17 ----------------- debian/patches/series | 1 - nxcompshad/Makefile.in | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 debian/patches/007_nxcompshad_clean-gch-files.full.patch (limited to 'debian') diff --git a/debian/patches/007_nxcompshad_clean-gch-files.full.patch b/debian/patches/007_nxcompshad_clean-gch-files.full.patch deleted file mode 100644 index 897e27890..000000000 --- a/debian/patches/007_nxcompshad_clean-gch-files.full.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Remove .gch files during cleanup. - When building nxcompshad .gch files get created. On - cleanup these should be removed. -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2012-12-31 ---- a/nxcompshad/Makefile.in -+++ b/nxcompshad/Makefile.in -@@ -185,7 +185,7 @@ - install.man: - - clean: -- -rm -f *~ *.o *.bak st?????? core core.* *.out.* *.exe.stackdump \ -+ -rm -f *~ *.o *.gch *.bak st?????? core core.* *.out.* *.exe.stackdump \ - $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe - - distclean: clean diff --git a/debian/patches/series b/debian/patches/series index f82c87bf0..81a71d3a1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -007_nxcompshad_clean-gch-files.full.patch 008_nxcomp_sa-restorer.full+lite.patch 009_nxproxy_add-man-page.full+lite.patch 009_nxagent_add-man-page.full.patch diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index c6aeaf0cb..caf9eb14c 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -185,7 +185,7 @@ install.bin: install.man: clean: - -rm -f *~ *.o *.bak st?????? core core.* *.out.* *.exe.stackdump \ + -rm -f *~ *.o *.gch *.bak st?????? core core.* *.out.* *.exe.stackdump \ $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe distclean: clean -- cgit v1.2.3 From a0b2fd836883e8ec429d5f31779c61f31b1a204d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 14:20:22 +0100 Subject: sa_restorer vs. memset (008_nxcomp_sa-restorer.full+lite.patch). Use memset instead of setting sa_restorer to NULL. Original-Author: Alexander Morozov --- .../patches/008_nxcomp_sa-restorer.full+lite.patch | 46 ---------------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 23 ++--------- 3 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 debian/patches/008_nxcomp_sa-restorer.full+lite.patch (limited to 'debian') diff --git a/debian/patches/008_nxcomp_sa-restorer.full+lite.patch b/debian/patches/008_nxcomp_sa-restorer.full+lite.patch deleted file mode 100644 index f1447ccb0..000000000 --- a/debian/patches/008_nxcomp_sa-restorer.full+lite.patch +++ /dev/null @@ -1,46 +0,0 @@ -Description: sa_restorer vs. memset - Use memset instead of setting sa_restorer to NULL. -Forwarded: pending -Author: Alexander Morozov -Last-Update: 2012-02-07 ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -5884,20 +5884,9 @@ - - struct sigaction newAction; - -- newAction.sa_handler = HandleSignal; -- -- // -- // This field doesn't exist on most OSes except -- // Linux. We keep setting the field to NULL to -- // avoid side-effects in the case the field is -- // a value return. -- // -+ memset(&newAction, 0, sizeof(newAction)); - -- #if defined(__linux__) -- -- newAction.sa_restorer = NULL; -- -- #endif -+ newAction.sa_handler = HandleSignal; - - sigemptyset(&(newAction.sa_mask)); - -@@ -6509,13 +6498,9 @@ - - struct sigaction action; - -- action.sa_handler = HandleTimer; -- -- #if defined(__linux__) -+ memset(&action, 0, sizeof(action)); - -- action.sa_restorer = NULL; -- -- #endif -+ action.sa_handler = HandleTimer; - - sigemptyset(&action.sa_mask); - diff --git a/debian/patches/series b/debian/patches/series index 81a71d3a1..9f56169bf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -008_nxcomp_sa-restorer.full+lite.patch 009_nxproxy_add-man-page.full+lite.patch 009_nxagent_add-man-page.full.patch 010_nxauth_fix-binary-name-in-man-page.full.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 92b6fc28f..14e5ee795 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -5884,20 +5884,9 @@ void InstallSignal(int signal, int action) struct sigaction newAction; - newAction.sa_handler = HandleSignal; - - // - // This field doesn't exist on most OSes except - // Linux. We keep setting the field to NULL to - // avoid side-effects in the case the field is - // a value return. - // + memset(&newAction, 0, sizeof(newAction)); - #if defined(__linux__) - - newAction.sa_restorer = NULL; - - #endif + newAction.sa_handler = HandleSignal; sigemptyset(&(newAction.sa_mask)); @@ -6509,13 +6498,9 @@ void SetTimer(int value) struct sigaction action; - action.sa_handler = HandleTimer; - - #if defined(__linux__) + memset(&action, 0, sizeof(action)); - action.sa_restorer = NULL; - - #endif + action.sa_handler = HandleTimer; sigemptyset(&action.sa_mask); -- cgit v1.2.3 From 27ddd1695541ff333104d5a3e441a0c37308750e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 14:23:12 +0100 Subject: Work on man pages. 009_nxproxy_add-man-page.full+lite.patch 009_nxagent_add-man-page.full.patch 010_nxauth_fix-binary-name-in-man-page.full.patch --- debian/patches/009_nxagent_add-man-page.full.patch | 43 -------- .../009_nxproxy_add-man-page.full+lite.patch | 33 ------ ...0_nxauth_fix-binary-name-in-man-page.full.patch | 119 --------------------- debian/patches/series | 3 - nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 37 +++++++ nx-X11/programs/nxauth/nxauth.man | 42 ++++---- nxproxy/man/nxproxy.1 | 27 +++++ 7 files changed, 85 insertions(+), 219 deletions(-) delete mode 100644 debian/patches/009_nxagent_add-man-page.full.patch delete mode 100644 debian/patches/009_nxproxy_add-man-page.full+lite.patch delete mode 100644 debian/patches/010_nxauth_fix-binary-name-in-man-page.full.patch create mode 100644 nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 create mode 100644 nxproxy/man/nxproxy.1 (limited to 'debian') diff --git a/debian/patches/009_nxagent_add-man-page.full.patch b/debian/patches/009_nxagent_add-man-page.full.patch deleted file mode 100644 index cec8c7527..000000000 --- a/debian/patches/009_nxagent_add-man-page.full.patch +++ /dev/null @@ -1,43 +0,0 @@ -Description: man page for nxagent -Author: Mike Gabriel - ---- /dev/null -+++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 -@@ -0,0 +1,37 @@ -+.TH NXAGENT 1 -+.SH NAME -+nxagent \- NoMachine's NX Agent. -+.SH SYNOPSIS -+.B nxagent -+.I "[options]" -+ -+.SH DESCRIPTION -+\fBnxagent\fR is an Xnest-like X server for remote application/desktop access. -+.PP -+\fBnxagent\fR implements a very efficient compression of the X11 protocol. -+.PP -+This increases performance when using X applications over high latency and -+low bandwidth networks, while providing a local (LAN-like) usage experience -+even if connecting from off-site locations (via cable modem or GSM). -+.PP -+\fBnxagent\fR is not designed to be used as a standalone application. -+It has to be launched on the server side by remote desktop frameworks like FreeNX. -+.PP -+Available clients are -+NoMachine's \fBnxclient\fR or the community projects \fBqtnx\fR and \fBremmina\fR -+(with NX plugin). -+ -+.SH OPTIONS -+.TP -+.B \--help -+Lists all others options that are not listed here. -+ -+.SH FURTHER READINGS -+Information on NX: http://www.nomachine.com -+.PP -+Information on FreeNX: http://freenx.berlios.de -+ -+.SH AUTHOR -+This manual page was written by Per Hansen , -+and modified by Marcelo Boveto Shima and -+Mike Gabriel . diff --git a/debian/patches/009_nxproxy_add-man-page.full+lite.patch b/debian/patches/009_nxproxy_add-man-page.full+lite.patch deleted file mode 100644 index b60e218ee..000000000 --- a/debian/patches/009_nxproxy_add-man-page.full+lite.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: man page for nxproxy -Author: Mike Gabriel - ---- /dev/null -+++ b/nxproxy/man/nxproxy.1 -@@ -0,0 +1,27 @@ -+'\" -*- coding: utf-8 -*- -+.if \n(.g .ds T< \\FC -+.if \n(.g .ds T> \\F[\n[.fam]] -+.de URL -+\\$2 \(la\\$1\(ra\\$3 -+.. -+.if \n(.g .mso www.tmac -+.TH nxproxy 1 "Nov 2011" "Version 3.5.0" "NX Proxy" -+.SH NAME -+nxproxy \- NX Proxy Tool -+.SH SYNOPSIS -+'nh -+.fi -+.ad l -+\fBnxproxy\fR -+ -+.SH DESCRIPTION -+\fBnxproxy\fR is a tool that allows one to tunnel X sessions through -+the NX compression libraries. \fBnxproxy\fR is a backend application -+utilized by the X2GoClient GUI and some other NX/X2Go clients. -+.PP -+.SH OPTIONS -+For an insight in \fBnxproxy\fR options use \fBnxproxy \-\-help\fR on the command line. -+.PP -+.SH AUTHOR -+This manual has been written by Mike Gabriel for the X2Go project -+(http://www.x2go.org). diff --git a/debian/patches/010_nxauth_fix-binary-name-in-man-page.full.patch b/debian/patches/010_nxauth_fix-binary-name-in-man-page.full.patch deleted file mode 100644 index c8f76b51a..000000000 --- a/debian/patches/010_nxauth_fix-binary-name-in-man-page.full.patch +++ /dev/null @@ -1,119 +0,0 @@ -Description: Fix binary name in man page for nxauth. - The NX auth man page in upstream still uses xauth as - binary name. -Author: Mike Gabriel -Last-Update: 2012-12-31 ---- a/nx-X11/programs/nxauth/nxauth.man -+++ b/nx-X11/programs/nxauth/nxauth.man -@@ -27,51 +27,51 @@ - .\" - .TH XAUTH 1 __xorgversion__ - .SH NAME --xauth \- X authority file utility -+nxauth \- NoMachine X authority file utility - .SH SYNOPSIS --.B xauth -+.B nxauth - [ \fB\-f\fP \fIauthfile\fP ] [ \fB\-vqib\fP ] [ \fIcommand arg ...\fP ] - .SH DESCRIPTION - .PP --The \fIxauth\fP program is used to edit and display the authorization -+The \fInxauth\fP program is used to edit and display the authorization - information used in connecting to the X server. This program is usually - used to extract authorization records from one machine and merge them in on - another (as is the case when using remote logins or granting access to - other users). Commands (described below) may be entered interactively, --on the \fIxauth\fP command line, or in scripts. Note that this program -+on the \fInxauth\fP command line, or in scripts. Note that this program - does \fBnot\fP contact the X server except when the generate command is used. --Normally \fIxauth\fP is not used to create the authority file entry in -+Normally \fInxauth\fP is not used to create the authority file entry in - the first place; \fIxdm\fP does that. - .SH OPTIONS --The following options may be used with \fIxauth\fP. They may be given -+The following options may be used with \fInxauth\fP. They may be given - individually (e.g., \fI\-q \-i\|\fP) or may combined (e.g., \fI\-qi\|\fP). - .TP 8 - .B "\-f \fIauthfile\fP" - This option specifies the name of the authority file to use. By default, --\fIxauth\fP will use the file specified by the XAUTHORITY environment variable -+\fInxauth\fP will use the file specified by the nxauthORITY environment variable - or \fI\.Xauthority\fP in the user's home directory. - .TP 8 - .B \-q --This option indicates that \fIxauth\fP should operate quietly and not print --unsolicited status messages. This is the default if an \fIxauth\fP command is -+This option indicates that \fInxauth\fP should operate quietly and not print -+unsolicited status messages. This is the default if an \fInxauth\fP command is - is given on the command line or if the standard output is not directed to a - terminal. - .TP 8 - .B \-v --This option indicates that \fIxauth\fP should operate verbosely and print -+This option indicates that \fInxauth\fP should operate verbosely and print - status messages indicating the results of various operations (e.g., how many --records have been read in or written out). This is the default if \fIxauth\fP -+records have been read in or written out). This is the default if \fInxauth\fP - is reading commands from its standard input and its standard output is - directed to a terminal. - .TP 8 - .B \-i --This option indicates that \fIxauth\fP should ignore any authority file --locks. Normally, \fIxauth\fP will refuse to read or edit any authority files -+This option indicates that \fInxauth\fP should ignore any authority file -+locks. Normally, \fInxauth\fP will refuse to read or edit any authority files - that have been locked by other programs (usually \fIxdm\fP or another --\fIxauth\fP). -+\fInxauth\fP). - .TP 8 - .B \-b --This option indicates that \fIxauth\fP should attempt to break any authority -+This option indicates that \fInxauth\fP should attempt to break any authority - file locks before proceeding. Use this option only to clean up stale locks. - .SH COMMANDS - The following commands may be used to manipulate authority files: -@@ -157,14 +157,14 @@ - authority file. - .TP 8 - .B "source \fIfilename" --The specified file is treated as a script containing \fIxauth\fP commands -+The specified file is treated as a script containing \fInxauth\fP commands - to execute. Blank lines and lines beginning with a sharp sign (#) are - ignored. A single dash may be used to indicate the standard input, if it - hasn't already been read. - .TP 8 - .B "info" - Information describing the authorization file, whether or not any changes --have been made, and from where \fIxauth\fP commands are being read -+have been made, and from where \fInxauth\fP commands are being read - is printed on the standard output. - .TP 8 - .B "exit" -@@ -194,12 +194,12 @@ - local entries for different machines may be stored in one authority file. - .SH EXAMPLE - .PP --The most common use for \fIxauth\fP is to extract the entry for the -+The most common use for \fInxauth\fP is to extract the entry for the - current display, copy it to another machine, and merge it into the - user's authority file on the remote machine: - .sp - .nf -- % xauth extract \- $DISPLAY | rsh otherhost xauth merge \- -+ % nxauth extract \- $DISPLAY | rsh otherhost nxauth merge \- - .fi - .PP - .sp -@@ -207,10 +207,10 @@ - authorization using the MIT-MAGIC-COOKIE-1 protocol. Clients that - connect with this authorization will be untrusted. - .nf -- % xauth generate :0 . -+ % nxauth generate :0 . - .fi - .SH ENVIRONMENT --This \fIxauth\fP program uses the following environment variables: -+This \fInxauth\fP program uses the following environment variables: - .TP 8 - .B XAUTHORITY - to get the name of the authority file to use if the \fI\-f\fP option isn't diff --git a/debian/patches/series b/debian/patches/series index 9f56169bf..8bbb69182 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,3 @@ -009_nxproxy_add-man-page.full+lite.patch -009_nxagent_add-man-page.full.patch -010_nxauth_fix-binary-name-in-man-page.full.patch 012_nxcomp_makefile-uninstall+autoconf.full+lite.patch 013_nxcompext_makefile-uninstall+autoconf.full.patch 014_nxcompshad_makefile-uninstall+autoconf.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 new file mode 100644 index 000000000..198632312 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -0,0 +1,37 @@ +.TH NXAGENT 1 +.SH NAME +nxagent \- NoMachine's NX Agent. +.SH SYNOPSIS +.B nxagent +.I "[options]" + +.SH DESCRIPTION +\fBnxagent\fR is an Xnest-like X server for remote application/desktop access. +.PP +\fBnxagent\fR implements a very efficient compression of the X11 protocol. +.PP +This increases performance when using X applications over high latency and +low bandwidth networks, while providing a local (LAN-like) usage experience +even if connecting from off-site locations (via cable modem or GSM). +.PP +\fBnxagent\fR is not designed to be used as a standalone application. +It has to be launched on the server side by remote desktop frameworks like FreeNX. +.PP +Available clients are +NoMachine's \fBnxclient\fR or the community projects \fBqtnx\fR and \fBremmina\fR +(with NX plugin). + +.SH OPTIONS +.TP +.B \--help +Lists all others options that are not listed here. + +.SH FURTHER READINGS +Information on NX: http://www.nomachine.com +.PP +Information on FreeNX: http://freenx.berlios.de + +.SH AUTHOR +This manual page was written by Per Hansen , +and modified by Marcelo Boveto Shima and +Mike Gabriel . diff --git a/nx-X11/programs/nxauth/nxauth.man b/nx-X11/programs/nxauth/nxauth.man index a414afad4..b9df3737d 100644 --- a/nx-X11/programs/nxauth/nxauth.man +++ b/nx-X11/programs/nxauth/nxauth.man @@ -27,51 +27,51 @@ .\" .TH XAUTH 1 __xorgversion__ .SH NAME -xauth \- X authority file utility +nxauth \- NoMachine X authority file utility .SH SYNOPSIS -.B xauth +.B nxauth [ \fB\-f\fP \fIauthfile\fP ] [ \fB\-vqib\fP ] [ \fIcommand arg ...\fP ] .SH DESCRIPTION .PP -The \fIxauth\fP program is used to edit and display the authorization +The \fInxauth\fP program is used to edit and display the authorization information used in connecting to the X server. This program is usually used to extract authorization records from one machine and merge them in on another (as is the case when using remote logins or granting access to other users). Commands (described below) may be entered interactively, -on the \fIxauth\fP command line, or in scripts. Note that this program +on the \fInxauth\fP command line, or in scripts. Note that this program does \fBnot\fP contact the X server except when the generate command is used. -Normally \fIxauth\fP is not used to create the authority file entry in +Normally \fInxauth\fP is not used to create the authority file entry in the first place; \fIxdm\fP does that. .SH OPTIONS -The following options may be used with \fIxauth\fP. They may be given +The following options may be used with \fInxauth\fP. They may be given individually (e.g., \fI\-q \-i\|\fP) or may combined (e.g., \fI\-qi\|\fP). .TP 8 .B "\-f \fIauthfile\fP" This option specifies the name of the authority file to use. By default, -\fIxauth\fP will use the file specified by the XAUTHORITY environment variable +\fInxauth\fP will use the file specified by the nxauthORITY environment variable or \fI\.Xauthority\fP in the user's home directory. .TP 8 .B \-q -This option indicates that \fIxauth\fP should operate quietly and not print -unsolicited status messages. This is the default if an \fIxauth\fP command is +This option indicates that \fInxauth\fP should operate quietly and not print +unsolicited status messages. This is the default if an \fInxauth\fP command is is given on the command line or if the standard output is not directed to a terminal. .TP 8 .B \-v -This option indicates that \fIxauth\fP should operate verbosely and print +This option indicates that \fInxauth\fP should operate verbosely and print status messages indicating the results of various operations (e.g., how many -records have been read in or written out). This is the default if \fIxauth\fP +records have been read in or written out). This is the default if \fInxauth\fP is reading commands from its standard input and its standard output is directed to a terminal. .TP 8 .B \-i -This option indicates that \fIxauth\fP should ignore any authority file -locks. Normally, \fIxauth\fP will refuse to read or edit any authority files +This option indicates that \fInxauth\fP should ignore any authority file +locks. Normally, \fInxauth\fP will refuse to read or edit any authority files that have been locked by other programs (usually \fIxdm\fP or another -\fIxauth\fP). +\fInxauth\fP). .TP 8 .B \-b -This option indicates that \fIxauth\fP should attempt to break any authority +This option indicates that \fInxauth\fP should attempt to break any authority file locks before proceeding. Use this option only to clean up stale locks. .SH COMMANDS The following commands may be used to manipulate authority files: @@ -157,14 +157,14 @@ Authorization entries matching the specified displays are removed from the authority file. .TP 8 .B "source \fIfilename" -The specified file is treated as a script containing \fIxauth\fP commands +The specified file is treated as a script containing \fInxauth\fP commands to execute. Blank lines and lines beginning with a sharp sign (#) are ignored. A single dash may be used to indicate the standard input, if it hasn't already been read. .TP 8 .B "info" Information describing the authorization file, whether or not any changes -have been made, and from where \fIxauth\fP commands are being read +have been made, and from where \fInxauth\fP commands are being read is printed on the standard output. .TP 8 .B "exit" @@ -194,12 +194,12 @@ referred to as \fIhostname\fP/unix:\fIdisplaynumber\fP so that local entries for different machines may be stored in one authority file. .SH EXAMPLE .PP -The most common use for \fIxauth\fP is to extract the entry for the +The most common use for \fInxauth\fP is to extract the entry for the current display, copy it to another machine, and merge it into the user's authority file on the remote machine: .sp .nf - % xauth extract \- $DISPLAY | rsh otherhost xauth merge \- + % nxauth extract \- $DISPLAY | rsh otherhost nxauth merge \- .fi .PP .sp @@ -207,10 +207,10 @@ The following command contacts the server :0 to create an authorization using the MIT-MAGIC-COOKIE-1 protocol. Clients that connect with this authorization will be untrusted. .nf - % xauth generate :0 . + % nxauth generate :0 . .fi .SH ENVIRONMENT -This \fIxauth\fP program uses the following environment variables: +This \fInxauth\fP program uses the following environment variables: .TP 8 .B XAUTHORITY to get the name of the authority file to use if the \fI\-f\fP option isn't diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1 new file mode 100644 index 000000000..0432380f8 --- /dev/null +++ b/nxproxy/man/nxproxy.1 @@ -0,0 +1,27 @@ +'\" -*- coding: utf-8 -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH nxproxy 1 "Nov 2011" "Version 3.5.0" "NX Proxy" +.SH NAME +nxproxy \- NX Proxy Tool +.SH SYNOPSIS +'nh +.fi +.ad l +\fBnxproxy\fR + +.SH DESCRIPTION +\fBnxproxy\fR is a tool that allows one to tunnel X sessions through +the NX compression libraries. \fBnxproxy\fR is a backend application +utilized by the X2GoClient GUI and some other NX/X2Go clients. +.PP +.SH OPTIONS +For an insight in \fBnxproxy\fR options use \fBnxproxy \-\-help\fR on the command line. +.PP +.SH AUTHOR +This manual has been written by Mike Gabriel for the X2Go project +(http://www.x2go.org). -- cgit v1.2.3 From 4bc550e867f6168c1090aa4e1959a22238be84f1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 14:26:02 +0100 Subject: nxcomp*,nxproxy: Add clean rules to Makefile.in templates. --- ...omp_makefile-uninstall+autoconf.full+lite.patch | 74 ---------------------- ...xcompext_makefile-uninstall+autoconf.full.patch | 66 ------------------- ...compshad_makefile-uninstall+autoconf.full.patch | 70 -------------------- .../015_nxproxy_makefile-uninstall.full+lite.patch | 40 ------------ debian/patches/series | 4 -- nxcomp/Makefile.in | 39 +++++++++++- nxcompext/Makefile.in | 31 ++++++++- nxcompshad/Makefile.in | 35 +++++++++- nxproxy/Makefile.in | 17 ++++- 9 files changed, 115 insertions(+), 261 deletions(-) delete mode 100644 debian/patches/012_nxcomp_makefile-uninstall+autoconf.full+lite.patch delete mode 100644 debian/patches/013_nxcompext_makefile-uninstall+autoconf.full.patch delete mode 100644 debian/patches/014_nxcompshad_makefile-uninstall+autoconf.full.patch delete mode 100644 debian/patches/015_nxproxy_makefile-uninstall.full+lite.patch (limited to 'debian') diff --git a/debian/patches/012_nxcomp_makefile-uninstall+autoconf.full+lite.patch b/debian/patches/012_nxcomp_makefile-uninstall+autoconf.full+lite.patch deleted file mode 100644 index af778fefc..000000000 --- a/debian/patches/012_nxcomp_makefile-uninstall+autoconf.full+lite.patch +++ /dev/null @@ -1,74 +0,0 @@ -Description: Add install and uninstall stanzas to nxcomp/Makefile, honor ac dirs - Provide install and uninstall functionality in nxcomp/Makefile. - . - Honor autoconf's libdir (and includedir, while at it). This is a - must-have for multiarch platforms like x86_64 et al where multiple - forms of libraries can be installed at the same time. -Forwarded: pending... -Author: Mike Gabriel -Author: Jan Engelhardt -Last-Update: 2012-02-14 ---- a/nxcomp/Makefile.in -+++ b/nxcomp/Makefile.in -@@ -64,10 +64,15 @@ - bindir = @bindir@ - man1dir = @mandir@/man1 - VPATH = @srcdir@ -+libdir = @libdir@ -+includedir = @includedir@ - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ -+INSTALL_LINK = cp -av -+DESTDIR = -+RM_FILE = rm -f - - # - # This should be autodetected. -@@ -264,12 +269,44 @@ - fi - touch depend.status - --install: install.bin install.man -+install: install.bin install.lib install.man - - install.bin: - -+install.lib: all -+ ./mkinstalldirs $(DESTDIR)${libdir} -+ ./mkinstalldirs $(DESTDIR)${includedir}/nx -+ $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcomp.so.3 $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcomp.so $(DESTDIR)${libdir} -+ $(INSTALL_DATA) libXcomp.a $(DESTDIR)${libdir} -+ $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx -+ $(INSTALL_DATA) MD5.h $(DESTDIR)${includedir}/nx -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ - install.man: - -+uninstall: uninstall.bin uninstall.lib uninstall.man -+ -+uninstall.bin: -+ -+uninstall.lib: -+ $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so.3 -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.a -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXalert.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NX.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXmitshm.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXpack.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXproto.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXrender.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXvars.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/MD5.h -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ -+uninstall.man: -+ - clean: - -rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* \ - @ALL@ diff --git a/debian/patches/013_nxcompext_makefile-uninstall+autoconf.full.patch b/debian/patches/013_nxcompext_makefile-uninstall+autoconf.full.patch deleted file mode 100644 index 300c0a39e..000000000 --- a/debian/patches/013_nxcompext_makefile-uninstall+autoconf.full.patch +++ /dev/null @@ -1,66 +0,0 @@ -Description: Add install and uninstall stanzas to nxcompext/Makefile, honor autoconf dirs. - Provide install and uninstall functionality in nxcompext/Makefile. - . - Honor autoconf's libdir (and includedir, while at it). This is a - must-have for multiarch platforms like x86_64 et al where multiple - forms of libraries can be installed at the same time. -Forwarded: pending... -Author: Mike Gabriel -Author: Jan Engelhardt -Last-Update: 2012-02-14 ---- a/nxcompext/Makefile.in -+++ b/nxcompext/Makefile.in -@@ -56,11 +56,15 @@ - bindir = @bindir@ - man1dir = @mandir@/man1 - VPATH = @srcdir@ -+libdir = @libdir@ -+includedir = @includedir@ - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ -- -+INSTALL_LINK = cp -av -+DESTDIR = -+RM_FILE = rm -f - # - # This should be autodetected. - # -@@ -147,12 +151,35 @@ - fi - touch depend.status - --install: install.bin install.man -+install: install.bin install.lib install.man - - install.bin: - -+install.lib: all -+ ./mkinstalldirs $(DESTDIR)${libdir} -+ ./mkinstalldirs $(DESTDIR)${includedir}/nx -+ $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcompext.so.3 $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcompext.so $(DESTDIR)${libdir} -+ $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ - install.man: - -+uninstall: uninstall.bin uninstall.lib uninstall.man -+ -+uninstall.bin: -+ -+uninstall.lib: -+ $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so.3 -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlib.h -+ $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlibint.h -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ -+uninstall.man: -+ - clean: - -rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* \ - @ALL@ diff --git a/debian/patches/014_nxcompshad_makefile-uninstall+autoconf.full.patch b/debian/patches/014_nxcompshad_makefile-uninstall+autoconf.full.patch deleted file mode 100644 index 921eccc4f..000000000 --- a/debian/patches/014_nxcompshad_makefile-uninstall+autoconf.full.patch +++ /dev/null @@ -1,70 +0,0 @@ -Description: Add install and uninstall stanzas to nxcompshad/Makefile, honor autoconf dirs - Provide install and uninstall functionality in nxcompshad/Makefile. - . - Honor autoconf's libdir (and includedir, while at it). This is a - must-have for multiarch platforms like x86_64 et al where multiple - forms of libraries can be installed at the same time. -Forwarded: pending... -Author: Mike Gabriel -Author: Jan Engelhardt -Last-Update: 2012-02-14 ---- a/nxcompshad/Makefile.in -+++ b/nxcompshad/Makefile.in -@@ -74,10 +74,17 @@ - bindir = @bindir@ - man1dir = @mandir@/man1 - VPATH = @srcdir@ -+libdir = @libdir@ -+includedir = @includedir@ - - INSTALL = @INSTALL@ -+INSTALL_DIR = $(INSTALL) -d -o root -g root -m 0755 - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ -+INSTALL_LINK = cp -av -+DESTDIR = -+RM_FILE = rm -f -+RM_DIR = rmdir -p --ignore-fail-on-non-empty - - # - # This should be autodetected. -@@ -178,12 +185,38 @@ - fi - touch depend.status - --install: install.bin install.man -+install: install.bin install.lib install.man - - install.bin: - -+install.lib: all -+ $(INSTALL_DIR) $(DESTDIR)${libdir} -+ $(INSTALL_DIR) $(DESTDIR)${includedir}/nx -+ $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcompshad.so.3 $(DESTDIR)${libdir} -+ $(INSTALL_LINK) libXcompshad.so $(DESTDIR)${libdir} -+ $(INSTALL_DATA) *.a $(DESTDIR)${libdir} -+ $(INSTALL_DATA) *.h $(DESTDIR)${includedir}/nx -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ - install.man: - -+uninstall: uninstall.bin uninstall.lib uninstall.man -+ -+uninstall.bin: -+ -+uninstall.lib: -+ $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so.3 -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so -+ $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.a -+ for header in *.h; do $(RM_FILE) $(DESTDIR)${includedir}/nx/$$header; done -+ $(RM_DIR) $(DESTDIR)${libdir}/nx/ -+ $(RM_DIR) $(DESTDIR)${includedir}/nx/ -+ echo "Running ldconfig tool, this may take a while..." && ldconfig || true -+ -+uninstall.man: -+ - clean: - -rm -f *~ *.o *.gch *.bak st?????? core core.* *.out.* *.exe.stackdump \ - $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe diff --git a/debian/patches/015_nxproxy_makefile-uninstall.full+lite.patch b/debian/patches/015_nxproxy_makefile-uninstall.full+lite.patch deleted file mode 100644 index 554c86aa4..000000000 --- a/debian/patches/015_nxproxy_makefile-uninstall.full+lite.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: Add install and uninstall stanzas to nxcomp/Makefile - Provide install and uninstall functionality in nxcomp/Makefile. -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nxproxy/Makefile.in -+++ b/nxproxy/Makefile.in -@@ -41,6 +41,8 @@ - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ -+DESTDIR = -+RM_FILE = rm -f - - # - # This should be autodetected. -@@ -87,11 +89,20 @@ - install: install.bin install.man - - install.bin: $(PROGRAM) -- $(srcdir)/mkinstalldirs $(bindir) -- $(INSTALL) $(PROGRAM) $(bindir)/$(PROGRAM) -+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) -+ $(INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) - - install.man: -- $(srcdir)/mkinstalldirs $(man1dir) -+ $(srcdir)/mkinstalldirs $(DESTDIR)$(man1dir) -+ $(INSTALL_DATA) man/$(PROGRAM).1 $(DESTDIR)$(man1dir)/$(PROGRAM).1 -+ -+uninstall: uninstall.bin uninstall.man -+ -+uninstall.bin: -+ $(RM_FILE) $(DESTDIR)$(bindir)/$(PROGRAM) -+ -+uninstall.man: -+ $(RM_FILE) $(DESTDIR)$(man1dir)/nxproxy.1 - - clean: - -rm -f *~ *.o *.bak st?????? core core.* *.out.* \ diff --git a/debian/patches/series b/debian/patches/series index 8bbb69182..f3678f428 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,3 @@ -012_nxcomp_makefile-uninstall+autoconf.full+lite.patch -013_nxcompext_makefile-uninstall+autoconf.full.patch -014_nxcompshad_makefile-uninstall+autoconf.full.patch -015_nxproxy_makefile-uninstall.full+lite.patch 016_nx-X11_install-location.full.patch 024_fix-make-clean.full.patch 024_fix-make-clean.full+lite.patch diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index 434118b4e..d291c3967 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -64,10 +64,15 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ man1dir = @mandir@/man1 VPATH = @srcdir@ +libdir = @libdir@ +includedir = @includedir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +INSTALL_LINK = cp -av +DESTDIR = +RM_FILE = rm -f # # This should be autodetected. @@ -264,12 +269,44 @@ depend.status: fi touch depend.status -install: install.bin install.man +install: install.bin install.lib install.man install.bin: +install.lib: all + ./mkinstalldirs $(DESTDIR)${libdir} + ./mkinstalldirs $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcomp.so.3 $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcomp.so $(DESTDIR)${libdir} + $(INSTALL_DATA) libXcomp.a $(DESTDIR)${libdir} + $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) MD5.h $(DESTDIR)${includedir}/nx + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + install.man: +uninstall: uninstall.bin uninstall.lib uninstall.man + +uninstall.bin: + +uninstall.lib: + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) + $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so.3 + $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so + $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.a + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXalert.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NX.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXmitshm.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXpack.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXproto.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXrender.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXvars.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/MD5.h + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + +uninstall.man: + clean: -rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* \ @ALL@ diff --git a/nxcompext/Makefile.in b/nxcompext/Makefile.in index cdf0b1cd9..51bc06ed2 100644 --- a/nxcompext/Makefile.in +++ b/nxcompext/Makefile.in @@ -56,11 +56,15 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ man1dir = @mandir@/man1 VPATH = @srcdir@ +libdir = @libdir@ +includedir = @includedir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ - +INSTALL_LINK = cp -av +DESTDIR = +RM_FILE = rm -f # # This should be autodetected. # @@ -147,12 +151,35 @@ depend.status: fi touch depend.status -install: install.bin install.man +install: install.bin install.lib install.man install.bin: +install.lib: all + ./mkinstalldirs $(DESTDIR)${libdir} + ./mkinstalldirs $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcompext.so.3 $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcompext.so $(DESTDIR)${libdir} + $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + install.man: +uninstall: uninstall.bin uninstall.lib uninstall.man + +uninstall.bin: + +uninstall.lib: + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) + $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so.3 + $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlib.h + $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlibint.h + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + +uninstall.man: + clean: -rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* \ @ALL@ diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index caf9eb14c..26a92bdce 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -74,10 +74,17 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ man1dir = @mandir@/man1 VPATH = @srcdir@ +libdir = @libdir@ +includedir = @includedir@ INSTALL = @INSTALL@ +INSTALL_DIR = $(INSTALL) -d -o root -g root -m 0755 INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +INSTALL_LINK = cp -av +DESTDIR = +RM_FILE = rm -f +RM_DIR = rmdir -p --ignore-fail-on-non-empty # # This should be autodetected. @@ -178,12 +185,38 @@ depend.status: fi touch depend.status -install: install.bin install.man +install: install.bin install.lib install.man install.bin: +install.lib: all + $(INSTALL_DIR) $(DESTDIR)${libdir} + $(INSTALL_DIR) $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcompshad.so.3 $(DESTDIR)${libdir} + $(INSTALL_LINK) libXcompshad.so $(DESTDIR)${libdir} + $(INSTALL_DATA) *.a $(DESTDIR)${libdir} + $(INSTALL_DATA) *.h $(DESTDIR)${includedir}/nx + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + install.man: +uninstall: uninstall.bin uninstall.lib uninstall.man + +uninstall.bin: + +uninstall.lib: + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) + $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so.3 + $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so + $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.a + for header in *.h; do $(RM_FILE) $(DESTDIR)${includedir}/nx/$$header; done + $(RM_DIR) $(DESTDIR)${libdir}/nx/ + $(RM_DIR) $(DESTDIR)${includedir}/nx/ + echo "Running ldconfig tool, this may take a while..." && ldconfig || true + +uninstall.man: + clean: -rm -f *~ *.o *.gch *.bak st?????? core core.* *.out.* *.exe.stackdump \ $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe diff --git a/nxproxy/Makefile.in b/nxproxy/Makefile.in index 928e0d34e..5d78972b9 100644 --- a/nxproxy/Makefile.in +++ b/nxproxy/Makefile.in @@ -41,6 +41,8 @@ VPATH = @srcdir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +DESTDIR = +RM_FILE = rm -f # # This should be autodetected. @@ -87,11 +89,20 @@ depend.status: install: install.bin install.man install.bin: $(PROGRAM) - $(srcdir)/mkinstalldirs $(bindir) - $(INSTALL) $(PROGRAM) $(bindir)/$(PROGRAM) + $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) install.man: - $(srcdir)/mkinstalldirs $(man1dir) + $(srcdir)/mkinstalldirs $(DESTDIR)$(man1dir) + $(INSTALL_DATA) man/$(PROGRAM).1 $(DESTDIR)$(man1dir)/$(PROGRAM).1 + +uninstall: uninstall.bin uninstall.man + +uninstall.bin: + $(RM_FILE) $(DESTDIR)$(bindir)/$(PROGRAM) + +uninstall.man: + $(RM_FILE) $(DESTDIR)$(man1dir)/nxproxy.1 clean: -rm -f *~ *.o *.bak st?????? core core.* *.out.* \ -- cgit v1.2.3 From 9b72eeaa21ada21b117433b05c745b656b42963a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 15:12:11 +0100 Subject: FHS adaptation for Debian packaging (016_nx-X11_install-location.full.patch). From tarball, NX libraries and binaries are installed to /usr/local/lib/nx. . FIXME: The paths in this patch get superceded by current build logic in nx-libs.spec and debian/rules. This should be merged into the NX build logic finally. --- .../patches/016_nx-X11_install-location.full.patch | 154 --------------------- debian/patches/series | 1 - nx-X11/config/cf/Imake.tmpl | 6 +- nx-X11/config/cf/X11.rules | 16 +-- nx-X11/config/cf/X11.tmpl | 4 +- nx-X11/config/cf/linux.cf | 2 +- nx-X11/config/cf/site.def | 4 +- 7 files changed, 16 insertions(+), 171 deletions(-) delete mode 100644 debian/patches/016_nx-X11_install-location.full.patch (limited to 'debian') diff --git a/debian/patches/016_nx-X11_install-location.full.patch b/debian/patches/016_nx-X11_install-location.full.patch deleted file mode 100644 index 6571aea9e..000000000 --- a/debian/patches/016_nx-X11_install-location.full.patch +++ /dev/null @@ -1,154 +0,0 @@ -Description: FHS adaptation for Debian packaging - From tarball, NX libraries and binaries are installed to - /usr/local/lib/nx. -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2012-12-31 ---- a/nx-X11/config/cf/Imake.tmpl -+++ b/nx-X11/config/cf/Imake.tmpl -@@ -820,12 +820,12 @@ - - #ifndef UsrLibDir - #ifdef ProjectRoot --#define UsrLibDir Concat3(ProjectRoot,/,LibDirName) -+#define UsrLibDir Concat4(ProjectRoot,/,LibDirName,/nx) - #ifndef AlternateUsrLibDir - #define AlternateUsrLibDir YES - #endif - #else --#define UsrLibDir Concat3(/usr,/,LibDirName) -+#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx) - #ifndef AlternateUsrLibDir - #define AlternateUsrLibDir NO - #endif -@@ -863,7 +863,7 @@ - #endif - #ifndef IncRoot - #ifdef ProjectRoot --#define IncRoot Concat(ProjectRoot,/include) -+#define IncRoot Concat(ProjectRoot,/include/nx) - #ifndef AlternateIncRoot - #define AlternateIncRoot YES - #endif ---- a/nx-X11/config/cf/X11.rules -+++ b/nx-X11/config/cf/X11.rules -@@ -36,17 +36,17 @@ - #endif - - #if defined(X11ProjectRoot) --# define XBinDir $(XPROJECTROOT)/bin -+# define XBinDir $(XPROJECTROOT)/lib/nx/bin - #elif defined(ProjectRoot) --# define XBinDir $(PROJECTROOT)/bin -+# define XBinDir $(PROJECTROOT)/lib/nx/bin - #else - # define XBinDir $(BINDIR) - #endif - - #ifdef X11ProjectRoot --# define XUsrLibDirPath $(USRLIBDIR):$(XPROJECTROOT)/lib -+# define XUsrLibDirPath $(USRLIBDIR)/nx:$(XPROJECTROOT) - #else --# define XUsrLibDirPath $(USRLIBDIR) -+# define XUsrLibDirPath $(USRLIBDIR)/nx - #endif - #ifdef UsrLibDirPath - # undef UsrLibDirPath -@@ -60,7 +60,7 @@ - #if ImportX11 - # define XLdPreLibs -L$(LIBSRC) - #elif defined(UseInstalledX11) && defined(X11ProjectRoot) --# define XLdPreLibs -L$(XPROJECTROOT)/lib -+# define XLdPreLibs -L$(XPROJECTROOT) - #else - # define XLdPreLibs /**/ - #endif -@@ -70,7 +70,7 @@ - #define LdPreLibs LdPreLib XLdPreLibs - - #ifdef X11ProjectRoot --# define XLdPostLibs -L$(XPROJECTROOT)/lib -+# define XLdPostLibs -L$(XPROJECTROOT) - #else - # define XLdPostLibs /**/ - #endif -@@ -86,7 +86,7 @@ - # define TopXInclude -I$(TOP)/exports/include - #else - # ifdef X11ProjectRoot --# define TopXInclude -I$(XPROJECTROOT)/include -+# define TopXInclude -I$(XPROJECTROOT)/../../include/nx - # else - # define TopXInclude /**/ - # endif -@@ -98,7 +98,7 @@ - #define TopIncludes TopInclude $(TOP_X_INCLUDES) - - #if UseInstalledX11 && defined(X11ProjectRoot) --# define X11BuildLibPath $(XPROJECTROOT)/lib -+# define X11BuildLibPath $(XPROJECTROOT) - #elif UseInstalledX11 - # define X11BuildLibPath $(USRLIBDIR) - #elif ImportX11 ---- a/nx-X11/config/cf/X11.tmpl -+++ b/nx-X11/config/cf/X11.tmpl -@@ -1401,7 +1401,7 @@ - - #ifndef BinDir - #ifdef ProjectRoot --#define BinDir Concat(ProjectRoot,/bin) -+#define BinDir Concat(ProjectRoot,/lib/nx/bin) - #else - #define BinDir /usr/bin/X11 - #endif -@@ -1461,7 +1461,7 @@ - #endif - #ifndef LibDir - # ifdef ProjectRoot --# define LibDir Concat(ProjectRoot,/lib/X11) -+# define LibDir Concat(ProjectRoot,/lib/nx/X11) - # else - # define LibDir /usr/lib/X11 - # endif ---- a/nx-X11/config/cf/linux.cf -+++ b/nx-X11/config/cf/linux.cf -@@ -1054,7 +1054,7 @@ - - #if HaveLib64 - # ifndef LibDirName --# define LibDirName lib64 -+# define LibDirName lib - # endif - # ifndef SystemUsrLibDir - # define SystemUsrLibDir /usr/lib64 ---- a/nx-X11/config/cf/site.def -+++ b/nx-X11/config/cf/site.def -@@ -72,7 +72,7 @@ - #ifdef AfterVendorCF - - #ifndef ProjectRoot --#define ProjectRoot /usr/local/lib/nx -+#define ProjectRoot /usr/local - #endif - - /* -@@ -87,7 +87,7 @@ - * ProjectRoot rather than in /etc/X11. See also HasVarDirectory, - * UseEtcX11 and UseSeparateConfDir. - * --#define EtcX11Directory ProjectRoot/etc -+#define EtcX11Directory /etc/nx - */ - - ---- a/nxproxy/Makefile.in -+++ b/nxproxy/Makefile.in -@@ -33,7 +33,7 @@ - - srcdir = @srcdir@ - prefix = @prefix@ --exec_prefix = @exec_prefix@ -+exec_prefix = @exec_prefix@/lib/nx - bindir = @bindir@ - man1dir = @mandir@/man1 - VPATH = @srcdir@ diff --git a/debian/patches/series b/debian/patches/series index f3678f428..70c573c38 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -016_nx-X11_install-location.full.patch 024_fix-make-clean.full.patch 024_fix-make-clean.full+lite.patch 025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index 26811085d..6ca974f57 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -820,12 +820,12 @@ TCLIBDIR = TclLibDir #ifndef UsrLibDir #ifdef ProjectRoot -#define UsrLibDir Concat3(ProjectRoot,/,LibDirName) +#define UsrLibDir Concat4(ProjectRoot,/,LibDirName,/nx) #ifndef AlternateUsrLibDir #define AlternateUsrLibDir YES #endif #else -#define UsrLibDir Concat3(/usr,/,LibDirName) +#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx) #ifndef AlternateUsrLibDir #define AlternateUsrLibDir NO #endif @@ -863,7 +863,7 @@ TCLIBDIR = TclLibDir #endif #ifndef IncRoot #ifdef ProjectRoot -#define IncRoot Concat(ProjectRoot,/include) +#define IncRoot Concat(ProjectRoot,/include/nx) #ifndef AlternateIncRoot #define AlternateIncRoot YES #endif diff --git a/nx-X11/config/cf/X11.rules b/nx-X11/config/cf/X11.rules index 8a176c7a3..51ae38c7d 100644 --- a/nx-X11/config/cf/X11.rules +++ b/nx-X11/config/cf/X11.rules @@ -36,17 +36,17 @@ XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ #endif #if defined(X11ProjectRoot) -# define XBinDir $(XPROJECTROOT)/bin +# define XBinDir $(XPROJECTROOT)/lib/nx/bin #elif defined(ProjectRoot) -# define XBinDir $(PROJECTROOT)/bin +# define XBinDir $(PROJECTROOT)/lib/nx/bin #else # define XBinDir $(BINDIR) #endif #ifdef X11ProjectRoot -# define XUsrLibDirPath $(USRLIBDIR):$(XPROJECTROOT)/lib +# define XUsrLibDirPath $(USRLIBDIR)/nx:$(XPROJECTROOT) #else -# define XUsrLibDirPath $(USRLIBDIR) +# define XUsrLibDirPath $(USRLIBDIR)/nx #endif #ifdef UsrLibDirPath # undef UsrLibDirPath @@ -60,7 +60,7 @@ XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ #if ImportX11 # define XLdPreLibs -L$(LIBSRC) #elif defined(UseInstalledX11) && defined(X11ProjectRoot) -# define XLdPreLibs -L$(XPROJECTROOT)/lib +# define XLdPreLibs -L$(XPROJECTROOT) #else # define XLdPreLibs /**/ #endif @@ -70,7 +70,7 @@ XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ #define LdPreLibs LdPreLib XLdPreLibs #ifdef X11ProjectRoot -# define XLdPostLibs -L$(XPROJECTROOT)/lib +# define XLdPostLibs -L$(XPROJECTROOT) #else # define XLdPostLibs /**/ #endif @@ -86,7 +86,7 @@ XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ # define TopXInclude -I$(TOP)/exports/include #else # ifdef X11ProjectRoot -# define TopXInclude -I$(XPROJECTROOT)/include +# define TopXInclude -I$(XPROJECTROOT)/../../include/nx # else # define TopXInclude /**/ # endif @@ -98,7 +98,7 @@ XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ #define TopIncludes TopInclude $(TOP_X_INCLUDES) #if UseInstalledX11 && defined(X11ProjectRoot) -# define X11BuildLibPath $(XPROJECTROOT)/lib +# define X11BuildLibPath $(XPROJECTROOT) #elif UseInstalledX11 # define X11BuildLibPath $(USRLIBDIR) #elif ImportX11 diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 12967d1d5..c1c92ca10 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1401,7 +1401,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #ifndef BinDir #ifdef ProjectRoot -#define BinDir Concat(ProjectRoot,/bin) +#define BinDir Concat(ProjectRoot,/lib/nx/bin) #else #define BinDir /usr/bin/X11 #endif @@ -1461,7 +1461,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef LibDir # ifdef ProjectRoot -# define LibDir Concat(ProjectRoot,/lib/X11) +# define LibDir Concat(ProjectRoot,/lib/nx/X11) # else # define LibDir /usr/lib/X11 # endif diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index 98981d7a7..25d254787 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -1054,7 +1054,7 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class #if HaveLib64 # ifndef LibDirName -# define LibDirName lib64 +# define LibDirName lib # endif # ifndef SystemUsrLibDir # define SystemUsrLibDir /usr/lib64 diff --git a/nx-X11/config/cf/site.def b/nx-X11/config/cf/site.def index c242f0ef9..071116f3f 100644 --- a/nx-X11/config/cf/site.def +++ b/nx-X11/config/cf/site.def @@ -72,7 +72,7 @@ XCOMM site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Ex #ifdef AfterVendorCF #ifndef ProjectRoot -#define ProjectRoot /usr/local/lib/nx +#define ProjectRoot /usr/local #endif /* @@ -87,7 +87,7 @@ XCOMM site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Ex * ProjectRoot rather than in /etc/X11. See also HasVarDirectory, * UseEtcX11 and UseSeparateConfDir. * -#define EtcX11Directory ProjectRoot/etc +#define EtcX11Directory /etc/nx */ -- cgit v1.2.3 From 236ee4ffa8e4fa92bb748301986307841ef060ab Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 15:16:30 +0100 Subject: nxcomp*, nxproxy: Fix clean-up of source tree via Makefile.in templates. 024_fix-make-clean.full.patch 024_fix-make-clean.full+lite.patch --- debian/patches/024_fix-make-clean.full+lite.patch | 19 --------- debian/patches/024_fix-make-clean.full.patch | 51 ----------------------- debian/patches/series | 2 - nx-X11/Makefile | 10 ++++- nxcomp/Makefile.in | 2 +- nxcompext/Makefile.in | 2 +- nxcompshad/Makefile.in | 2 +- nxproxy/Makefile.in | 2 +- 8 files changed, 12 insertions(+), 78 deletions(-) delete mode 100644 debian/patches/024_fix-make-clean.full+lite.patch delete mode 100644 debian/patches/024_fix-make-clean.full.patch (limited to 'debian') diff --git a/debian/patches/024_fix-make-clean.full+lite.patch b/debian/patches/024_fix-make-clean.full+lite.patch deleted file mode 100644 index 7f0b327cf..000000000 --- a/debian/patches/024_fix-make-clean.full+lite.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: fix clean rule in nxcomp's Makefile.in -Author: Mike Gabriel - ---- a/nxcomp/Makefile.in -+++ b/nxcomp/Makefile.in -@@ -313,4 +313,4 @@ - - distclean: clean - -rm -rf autom4te.cache config.status config.log \ -- config.cache depend.status Makefile tags -+ config.cache depend.status Makefile tags configure ---- a/nxproxy/Makefile.in -+++ b/nxproxy/Makefile.in -@@ -109,4 +109,4 @@ - $(PROGRAM) $(PROGRAM).exe $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) - - distclean: clean -- -rm -f config.status config.log config.cache depend.status Makefile tags -+ -rm -rf autom4te.cache config.status config.log config.cache depend.status Makefile tags configure diff --git a/debian/patches/024_fix-make-clean.full.patch b/debian/patches/024_fix-make-clean.full.patch deleted file mode 100644 index 356ce47d8..000000000 --- a/debian/patches/024_fix-make-clean.full.patch +++ /dev/null @@ -1,51 +0,0 @@ -Description: Provide main Makefile for whole source tree - By design this patch is not needed to be sent upstream. -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2012-10-19 ---- a/nx-X11/Makefile -+++ b/nx-X11/Makefile -@@ -138,6 +138,7 @@ - - xmakefile: Imakefile - $(RM) xmakefile -+ @rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def; - $(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) - - World.Win32: -@@ -197,11 +198,16 @@ - # a copy of every rule that might be invoked at top level - - clean: -- $(MAKE_CMD) $@ -+ -$(MAKE_CMD) $@ -+ find config -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done -+ find lib -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done -+ find programs -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done -+ find include -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done -+ rm -f config/cf/{version.def,date.def} - dangerous_strip_clean: - $(MAKE_CMD) $@ - distclean: -- $(MAKE_CMD) $@ -+ -$(MAKE_CMD) $@ - $(RM) xmakefile $(IRULESRC)/version.def $(IRULESRC)/date.def - depend: - $(MAKE_CMD) $@ ---- a/nxcompext/Makefile.in -+++ b/nxcompext/Makefile.in -@@ -185,5 +185,5 @@ - @ALL@ - - distclean: clean -- -rm -rf autom4te.cache config.status config.log \ -+ -rm -rf autom4te.cache config.status config.log configure \ - config.cache depend.status Makefile tags ---- a/nxcompshad/Makefile.in -+++ b/nxcompshad/Makefile.in -@@ -222,4 +222,4 @@ - $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe - - distclean: clean -- -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache -+ -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache configure diff --git a/debian/patches/series b/debian/patches/series index 70c573c38..63bc3dc43 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ -024_fix-make-clean.full.patch -024_fix-make-clean.full+lite.patch 025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch 026_nxcompext_honour-optflags.full.patch 026_nxcomp_honour-optflags.full+lite.patch diff --git a/nx-X11/Makefile b/nx-X11/Makefile index 3aefb7974..7c4090a95 100644 --- a/nx-X11/Makefile +++ b/nx-X11/Makefile @@ -138,6 +138,7 @@ Makefile:: xmakefile: Imakefile $(RM) xmakefile + @rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def; $(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) World.Win32: @@ -197,11 +198,16 @@ World.OS2: # a copy of every rule that might be invoked at top level clean: - $(MAKE_CMD) $@ + -$(MAKE_CMD) $@ + find config -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done + find lib -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done + find programs -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done + find include -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done + rm -f config/cf/{version.def,date.def} dangerous_strip_clean: $(MAKE_CMD) $@ distclean: - $(MAKE_CMD) $@ + -$(MAKE_CMD) $@ $(RM) xmakefile $(IRULESRC)/version.def $(IRULESRC)/date.def depend: $(MAKE_CMD) $@ diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index d291c3967..1be928167 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -313,4 +313,4 @@ clean: distclean: clean -rm -rf autom4te.cache config.status config.log \ - config.cache depend.status Makefile tags + config.cache depend.status Makefile tags configure diff --git a/nxcompext/Makefile.in b/nxcompext/Makefile.in index 51bc06ed2..9fd2c7d7d 100644 --- a/nxcompext/Makefile.in +++ b/nxcompext/Makefile.in @@ -185,5 +185,5 @@ clean: @ALL@ distclean: clean - -rm -rf autom4te.cache config.status config.log \ + -rm -rf autom4te.cache config.status config.log configure \ config.cache depend.status Makefile tags diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 26a92bdce..00bca25c9 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -222,4 +222,4 @@ clean: $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe distclean: clean - -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache + -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache configure diff --git a/nxproxy/Makefile.in b/nxproxy/Makefile.in index 5d78972b9..c00df91dc 100644 --- a/nxproxy/Makefile.in +++ b/nxproxy/Makefile.in @@ -109,4 +109,4 @@ clean: $(PROGRAM) $(PROGRAM).exe $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) distclean: clean - -rm -f config.status config.log config.cache depend.status Makefile tags + -rm -rf autom4te.cache config.status config.log config.cache depend.status Makefile tags configure -- cgit v1.2.3 From 78efa8bf9889a006cd5c0a34a22d458de59ee60a Mon Sep 17 00:00:00 2001 From: Gabriel Marcano Date: Mon, 9 Feb 2015 15:19:12 +0100 Subject: Fix FTBFS against libjpeg9a (025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch). --- ...nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch | 40 ---------------------- debian/patches/series | 1 - nxcomp/Jpeg.cpp | 8 ++--- 3 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 debian/patches/025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch (limited to 'debian') diff --git a/debian/patches/025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch b/debian/patches/025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch deleted file mode 100644 index 66ca8c33e..000000000 --- a/debian/patches/025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: Fix FTBFS when built against libjpeg9a -Author: Gabriel Marcano ---- a/nxcomp/Jpeg.cpp 2014-08-19 22:23:36.139072400 -0400 -+++ b/nxcomp/Jpeg.cpp 2014-08-19 22:25:24.323182800 -0400 -@@ -440,7 +440,7 @@ - - JpegSetSrcManager(&cinfo, compressedData, compressedLen); - -- jpeg_read_header(&cinfo, 1); -+ jpeg_read_header(&cinfo, TRUE); - - if (jpegError) goto AbortDecompressJpeg16; - -@@ -581,7 +581,7 @@ - - JpegSetSrcManager(&cinfo, compressedData, compressedLen); - -- jpeg_read_header(&cinfo, 1); -+ jpeg_read_header(&cinfo, TRUE); - - if (jpegError) goto AbortDecompressJpeg24; - -@@ -718,7 +718,7 @@ - - JpegSetSrcManager(&cinfo, compressedData, compressedLen); - -- jpeg_read_header(&cinfo, 1); -+ jpeg_read_header(&cinfo, TRUE); - - if (jpegError) goto AbortDecompressJpeg32; - -@@ -833,7 +833,7 @@ - jpegSrcManager.bytes_in_buffer = jpegBufferLen; - jpegSrcManager.next_input_byte = (JOCTET *)jpegBufferPtr; - -- return 1; -+ return TRUE; - } - - static void JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes) diff --git a/debian/patches/series b/debian/patches/series index 63bc3dc43..6eadd7bd9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch 026_nxcompext_honour-optflags.full.patch 026_nxcomp_honour-optflags.full+lite.patch 026_nxcompshad_honour-optflags.full.patch diff --git a/nxcomp/Jpeg.cpp b/nxcomp/Jpeg.cpp index b3973227c..9f71cbadf 100644 --- a/nxcomp/Jpeg.cpp +++ b/nxcomp/Jpeg.cpp @@ -440,7 +440,7 @@ int DecompressJpeg16(unsigned char *compressedData, int compressedLen, JpegSetSrcManager(&cinfo, compressedData, compressedLen); - jpeg_read_header(&cinfo, 1); + jpeg_read_header(&cinfo, TRUE); if (jpegError) goto AbortDecompressJpeg16; @@ -581,7 +581,7 @@ int DecompressJpeg24(unsigned char *compressedData, int compressedLen, JpegSetSrcManager(&cinfo, compressedData, compressedLen); - jpeg_read_header(&cinfo, 1); + jpeg_read_header(&cinfo, TRUE); if (jpegError) goto AbortDecompressJpeg24; @@ -718,7 +718,7 @@ int DecompressJpeg32(unsigned char *compressedData, int compressedLen, JpegSetSrcManager(&cinfo, compressedData, compressedLen); - jpeg_read_header(&cinfo, 1); + jpeg_read_header(&cinfo, TRUE); if (jpegError) goto AbortDecompressJpeg32; @@ -833,7 +833,7 @@ static boolean JpegFillInputBuffer(j_decompress_ptr cinfo) jpegSrcManager.bytes_in_buffer = jpegBufferLen; jpegSrcManager.next_input_byte = (JOCTET *)jpegBufferPtr; - return 1; + return TRUE; } static void JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes) -- cgit v1.2.3 From 3384aba386c44ec26d3f131b897f77da440324d7 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Feb 2015 15:22:07 +0100 Subject: Honour compiler/linker option flags. 026_nxcompext_honour-optflags.full.patch 026_nxcomp_honour-optflags.full+lite.patch 026_nxcompshad_honour-optflags.full.patch --- .../026_nxcomp_honour-optflags.full+lite.patch | 31 ---------------------- .../026_nxcompext_honour-optflags.full.patch | 17 ------------ .../026_nxcompshad_honour-optflags.full.patch | 17 ------------ debian/patches/series | 3 --- nxcomp/configure.in | 4 +-- nxcompext/configure.in | 4 +-- nxcompshad/configure.in | 4 +-- nxproxy/configure.in | 4 +-- 8 files changed, 8 insertions(+), 76 deletions(-) delete mode 100644 debian/patches/026_nxcomp_honour-optflags.full+lite.patch delete mode 100644 debian/patches/026_nxcompext_honour-optflags.full.patch delete mode 100644 debian/patches/026_nxcompshad_honour-optflags.full.patch (limited to 'debian') diff --git a/debian/patches/026_nxcomp_honour-optflags.full+lite.patch b/debian/patches/026_nxcomp_honour-optflags.full+lite.patch deleted file mode 100644 index a2713a1bc..000000000 --- a/debian/patches/026_nxcomp_honour-optflags.full+lite.patch +++ /dev/null @@ -1,31 +0,0 @@ -Description: Honour compiler/linker option flags -Forwarded: pending -Author: Orion Poplawski -diff -up a/nxcomp/configure.in b/nxcomp/configure.in ---- a/nxcomp/configure.in 2012-11-10 06:40:55.000000000 -0700 -+++ b/nxcomp/configure.in 2012-12-11 13:13:19.390229196 -0700 -@@ -7,8 +7,8 @@ AC_PREREQ(2.13) - - dnl Set our default compilation flags. - --CXXFLAGS="-O3 -fno-rtti -fno-exceptions" --CFLAGS="-O3" -+CXXFLAGS="$CXXFLAGS -O3 -fno-rtti -fno-exceptions" -+CFLAGS="$CFLAGS -O3" - - dnl Reset default linking directives. - -diff -up a/nxproxy/configure.in b/nxproxy/configure.in ---- a/nxproxy/configure.in 2012-11-10 06:40:55.000000000 -0700 -+++ b/nxproxy/configure.in 2012-12-11 13:16:19.955301045 -0700 -@@ -7,8 +7,8 @@ AC_PREREQ(2.13) - - dnl Reset default compilation flags. - --CXXFLAGS="-O3" --CPPFLAGS="-O3" -+CXXFLAGS="$CXXFLAGS -O3" -+CPPFLAGS="$CPPFLAGS -O3" - - dnl Prefer headers and libraries from nx-X11 if present. - diff --git a/debian/patches/026_nxcompext_honour-optflags.full.patch b/debian/patches/026_nxcompext_honour-optflags.full.patch deleted file mode 100644 index 4d5df3e6b..000000000 --- a/debian/patches/026_nxcompext_honour-optflags.full.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Honour compiler/linker option flags -Forwarded: pending -Author: Orion Poplawski -diff -up a/nxcompext/configure.in b/nxcompext/configure.in ---- a/nxcompext/configure.in 2012-11-10 06:40:55.000000000 -0700 -+++ b/nxcompext/configure.in 2012-12-11 13:15:26.712576302 -0700 -@@ -7,8 +7,8 @@ AC_PREREQ(2.13) - - dnl Reset default compilation flags. - --CXXFLAGS="-O3" --CFLAGS="-O3" -+CXXFLAGS="$CXXFLAGS -O3" -+CFLAGS="$CFLAGS -O3" - - dnl Reset default linking directives. - diff --git a/debian/patches/026_nxcompshad_honour-optflags.full.patch b/debian/patches/026_nxcompshad_honour-optflags.full.patch deleted file mode 100644 index ea1d2ad80..000000000 --- a/debian/patches/026_nxcompshad_honour-optflags.full.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Honour compiler/linker option flags -Forwarded: pending -Author: Orion Poplawski -diff -up a/nxcompshad/configure.in b/nxcompshad/configure.in ---- a/nxcompshad/configure.in 2012-11-10 06:40:56.000000000 -0700 -+++ b/nxcompshad/configure.in 2012-12-11 13:13:25.915196300 -0700 -@@ -7,8 +7,8 @@ AC_PREREQ(2.13) - - dnl Reset default compilation flags. - --CXXFLAGS="-O3" --CPPFLAGS="-O3" -+CXXFLAGS="$CXXFLAGS -O3" -+CPPFLAGS="$CPPFLAGS -O3" - - dnl Reset default linking directives. - diff --git a/debian/patches/series b/debian/patches/series index 6eadd7bd9..ca6b6dcdc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,3 @@ -026_nxcompext_honour-optflags.full.patch -026_nxcomp_honour-optflags.full+lite.patch -026_nxcompshad_honour-optflags.full.patch 027_nxcomp_abstract-X11-socket.full+lite.patch 028_nx-X11_abstract-kernel-sockets.full.patch 029_nxcomp_ppc64.full+lite.patch diff --git a/nxcomp/configure.in b/nxcomp/configure.in index e9ab81da8..6fa9757a7 100644 --- a/nxcomp/configure.in +++ b/nxcomp/configure.in @@ -7,8 +7,8 @@ AC_PREREQ(2.13) dnl Set our default compilation flags. -CXXFLAGS="-O3 -fno-rtti -fno-exceptions" -CFLAGS="-O3" +CXXFLAGS="$CXXFLAGS -O3 -fno-rtti -fno-exceptions" +CFLAGS="$CFLAGS -O3" dnl Reset default linking directives. diff --git a/nxcompext/configure.in b/nxcompext/configure.in index fe5abf7cb..08c48a751 100644 --- a/nxcompext/configure.in +++ b/nxcompext/configure.in @@ -7,8 +7,8 @@ AC_PREREQ(2.13) dnl Reset default compilation flags. -CXXFLAGS="-O3" -CFLAGS="-O3" +CXXFLAGS="$CXXFLAGS -O3" +CFLAGS="$CFLAGS -O3" dnl Reset default linking directives. diff --git a/nxcompshad/configure.in b/nxcompshad/configure.in index f0bdecd12..13149b3a0 100644 --- a/nxcompshad/configure.in +++ b/nxcompshad/configure.in @@ -7,8 +7,8 @@ AC_PREREQ(2.13) dnl Reset default compilation flags. -CXXFLAGS="-O3" -CPPFLAGS="-O3" +CXXFLAGS="$CXXFLAGS -O3" +CPPFLAGS="$CPPFLAGS -O3" dnl Reset default linking directives. diff --git a/nxproxy/configure.in b/nxproxy/configure.in index bd930f166..b86828d02 100644 --- a/nxproxy/configure.in +++ b/nxproxy/configure.in @@ -7,8 +7,8 @@ AC_PREREQ(2.13) dnl Reset default compilation flags. -CXXFLAGS="-O3" -CPPFLAGS="-O3" +CXXFLAGS="$CXXFLAGS -O3" +CPPFLAGS="$CPPFLAGS -O3" dnl Prefer headers and libraries from nx-X11 if present. -- cgit v1.2.3 From aaf4a59e4c4ec54a26283bce6bf25281e12f0424 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 15:27:46 +0100 Subject: Add X11 abstract socket support to nxcomp/nxproxy (027_nxcomp_abstract-X11-socket.full+lite.patch). --- .../027_nxcomp_abstract-X11-socket.full+lite.patch | 59 ---------------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 38 ++++++++++++++ 3 files changed, 38 insertions(+), 60 deletions(-) delete mode 100644 debian/patches/027_nxcomp_abstract-X11-socket.full+lite.patch (limited to 'debian') diff --git a/debian/patches/027_nxcomp_abstract-X11-socket.full+lite.patch b/debian/patches/027_nxcomp_abstract-X11-socket.full+lite.patch deleted file mode 100644 index 4c457c5d5..000000000 --- a/debian/patches/027_nxcomp_abstract-X11-socket.full+lite.patch +++ /dev/null @@ -1,59 +0,0 @@ -Description: Add X11 abstract socket support to nxcomp/nxproxy -Author: Mike Gabriel - -diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp -index 92b6fc2..d86809d 100644 ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -4250,6 +4250,39 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, - // where the socket will be created. - // - -+ // Try abstract X11 socket first (via a test connect), if that fails -+ // fall back to Unix domain socket file. -+ -+ #ifdef __linux__ -+ int testSocketFD; -+ testSocketFD = socket(xServerAddrFamily, SOCK_STREAM, PF_UNSPEC); -+ -+ int len = sprintf(unixSocketName + 1, "/tmp/.X11-unix/X%d", xPort); -+ unixSocketName[0] = '\0'; -+ -+ sockaddr_un *xServerAddrABSTRACT = new sockaddr_un; -+ memset(xServerAddrABSTRACT, 0, xServerAddrLength); -+ xServerAddrABSTRACT -> sun_family = AF_UNIX; -+ memcpy(xServerAddrABSTRACT -> sun_path, unixSocketName, len+1); -+ xServerAddrLength = len +3; -+ -+ int ret = connect(testSocketFD, (struct sockaddr *) xServerAddrABSTRACT, xServerAddrLength); -+ if (ret == 0) { -+ -+ cerr << "Info" << ": Using abstract X11 socket in kernel namespace " -+ << "for accessing DISPLAY=:" << xPort << ".\n"; -+ -+ close(testSocketFD); -+ xServerAddr = (sockaddr *) xServerAddrABSTRACT; -+ return 1; -+ -+ } else { -+ -+ cerr << "Info" << ": Falling back to file system X11 socket " -+ << "for accessing DISPLAY=:" << xPort << ".\n"; -+ -+ #endif -+ - struct stat statInfo; - - char unixSocketDir[DEFAULT_STRING_LENGTH]; -@@ -4322,6 +4355,11 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, - - xServerAddr = (sockaddr *) xServerAddrUNIX; - xServerAddrLength = sizeof(sockaddr_un); -+ -+ #ifdef __linux__ -+ -+ } -+ #endif - } - else - { diff --git a/debian/patches/series b/debian/patches/series index ca6b6dcdc..8da3bdbf9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -027_nxcomp_abstract-X11-socket.full+lite.patch 028_nx-X11_abstract-kernel-sockets.full.patch 029_nxcomp_ppc64.full+lite.patch 030_nx-X11_configure-args.full.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 14e5ee795..6fd772912 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -4250,6 +4250,39 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, // where the socket will be created. // + // Try abstract X11 socket first (via a test connect), if that fails + // fall back to Unix domain socket file. + + #ifdef __linux__ + int testSocketFD; + testSocketFD = socket(xServerAddrFamily, SOCK_STREAM, PF_UNSPEC); + + int len = sprintf(unixSocketName + 1, "/tmp/.X11-unix/X%d", xPort); + unixSocketName[0] = '\0'; + + sockaddr_un *xServerAddrABSTRACT = new sockaddr_un; + memset(xServerAddrABSTRACT, 0, xServerAddrLength); + xServerAddrABSTRACT -> sun_family = AF_UNIX; + memcpy(xServerAddrABSTRACT -> sun_path, unixSocketName, len+1); + xServerAddrLength = len +3; + + int ret = connect(testSocketFD, (struct sockaddr *) xServerAddrABSTRACT, xServerAddrLength); + if (ret == 0) { + + cerr << "Info" << ": Using abstract X11 socket in kernel namespace " + << "for accessing DISPLAY=:" << xPort << ".\n"; + + close(testSocketFD); + xServerAddr = (sockaddr *) xServerAddrABSTRACT; + return 1; + + } else { + + cerr << "Info" << ": Falling back to file system X11 socket " + << "for accessing DISPLAY=:" << xPort << ".\n"; + + #endif + struct stat statInfo; char unixSocketDir[DEFAULT_STRING_LENGTH]; @@ -4322,6 +4355,11 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, xServerAddr = (sockaddr *) xServerAddrUNIX; xServerAddrLength = sizeof(sockaddr_un); + + #ifdef __linux__ + + } + #endif } else { -- cgit v1.2.3 From f6619070bad8c20f8467ceb3c161d7699cc00aff Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 9 Feb 2015 15:29:53 +0100 Subject: Support abstract local sockets for Linux systems (028_nx-X11_abstract-kernel-sockets.full.patch). Relevant code taken from xtrans 1.2.7 on 2014-06-11. --- .../028_nx-X11_abstract-kernel-sockets.full.patch | 321 --------------------- debian/patches/series | 1 - nx-X11/lib/xtrans/Xtransint.h | 3 +- nx-X11/lib/xtrans/Xtranssock.c | 126 ++++++-- 4 files changed, 99 insertions(+), 352 deletions(-) delete mode 100644 debian/patches/028_nx-X11_abstract-kernel-sockets.full.patch (limited to 'debian') diff --git a/debian/patches/028_nx-X11_abstract-kernel-sockets.full.patch b/debian/patches/028_nx-X11_abstract-kernel-sockets.full.patch deleted file mode 100644 index 279f9a9af..000000000 --- a/debian/patches/028_nx-X11_abstract-kernel-sockets.full.patch +++ /dev/null @@ -1,321 +0,0 @@ -Author: Mike Gabriel -Description: Support abstract local sockets for Linux systems -Abstract: - Relevant code taken from xtrans 1.2.7 on 2014-06-11. - ---- a/nx-X11/lib/xtrans/Xtranssock.c -+++ b/nx-X11/lib/xtrans/Xtranssock.c -@@ -172,6 +172,8 @@ - sock_init();\ - IBMsockInit = 1;\ - } -+ -+ - #undef EINTR - #define EINTR SOCEINTR - #undef EINVAL -@@ -192,6 +194,10 @@ - #define SocketInitOnce() /**/ - #endif - -+#if defined(linux) -+#define HAVE_ABSTRACT_SOCKETS -+#endif -+ - #define MIN_BACKLOG 128 - #ifdef SOMAXCONN - #if SOMAXCONN > MIN_BACKLOG -@@ -532,7 +538,7 @@ - - void TRANS(SocketRejectConnection) (XtransConnInfo ciptr) - { -- size_t sa_l = sizeof(struct sockaddr); -+ socklen_t sa_l = sizeof(struct sockaddr); - struct sockaddr sa; - fd_set fs; - struct timeval t; -@@ -914,9 +920,11 @@ - struct sockaddr_in socknamev4; - void *socknamePtr; - #if defined(SVR4) || defined(__SCO__) -+# define SOCKLEN_T_PTR void* - size_t namelen; - #else -- int namelen; -+# define SOCKLEN_T_PTR socklen_t* -+ socklen_t namelen; - #endif - - PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0); -@@ -935,7 +943,7 @@ - } - - if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr, -- (void *)&namelen) < 0) -+ (SOCKLEN_T_PTR)&namelen) < 0) - { - #ifdef WIN32 - errno = WSAGetLastError(); -@@ -1477,23 +1485,28 @@ - - #ifdef UNIXCONN - static int --set_sun_path(const char *port, const char *upath, char *path) -+set_sun_path(const char *port, const char *upath, char *path, int abstract) - { - struct sockaddr_un s; - int maxlen = sizeof(s.sun_path) - 1; -+ const char *at = ""; - - if (!port || !*port || !path) - return -1; - -- if (*port == '/') { /* a full pathname */ -- if (strlen(port) > maxlen) -- return -1; -- sprintf(path, "%s", port); -- } else { -- if (strlen(port) + strlen(upath) > maxlen) -- return -1; -- sprintf(path, "%s%s", upath, port); -- } -+#ifdef HAVE_ABSTRACT_SOCKETS -+ if (port[0] == '@') -+ upath = ""; -+ else if (abstract) -+ at = "@"; -+#endif -+ -+ if (*port == '/') /* a full pathname */ -+ upath = ""; -+ -+ if (strlen(port) + strlen(upath) > maxlen) -+ return -1; -+ snprintf(path, sizeof(s.sun_path), "%s%s%s", at, upath, port); - return 0; - } - #endif -@@ -1726,6 +1739,12 @@ - int oldUmask; - int status; - unsigned int mode; -+ char tmpport[108]; -+ -+ int abstract = 0; -+#ifdef HAVE_ABSTRACT_SOCKETS -+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT; -+#endif - - PRMSG (2, "SocketUNIXCreateListener(%s)\n", - port ? port : "NULL", 0, 0); -@@ -1741,11 +1760,11 @@ - mode = 0777; - #endif - #ifdef NX_TRANS_SOCKET -- if (trans_mkdir(_NXGetUnixDir(UNIX_DIR), mode) == -1) { -+ if (!abstract && trans_mkdir(_NXGetUnixDir(UNIX_DIR), mode) == -1) { - PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n", - _NXGetUnixDir(UNIX_DIR), errno, 0); - #else -- if (trans_mkdir(UNIX_DIR, mode) == -1) { -+ if (!abstract && trans_mkdir(UNIX_DIR, mode) == -1) { - PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n", - UNIX_DIR, errno, 0); - #endif -@@ -1754,13 +1773,18 @@ - } - #endif - -+ memset(&sockname, 0, sizeof(sockname)); - sockname.sun_family = AF_UNIX; - -+ if (!(port && *port)) { -+ snprintf (tmpport, sizeof(tmpport), "%s%ld", UNIX_PATH, (long)getpid()); -+ port = tmpport; -+ } - if (port && *port) { - #ifdef NX_TRANS_SOCKET -- if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path) != 0) { -+ if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path, abstract) != 0) { - #else -- if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) { -+ if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) { - #endif - PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0); - return TRANS_CREATE_LISTENER_FAILED; -@@ -1784,7 +1808,12 @@ - fprintf(stderr, "SocketUNIXCreateListener: Unlinking path [%s] for ciptr at [%p].\n", - sockname.sun_path, (void *) ciptr); - #endif -- unlink (sockname.sun_path); -+ if (abstract) { -+ sockname.sun_path[0] = '\0'; -+ namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]); -+ } -+ else -+ unlink (sockname.sun_path); - - if ((status = TRANS(SocketCreateListener) (ciptr, - (struct sockaddr *) &sockname, namelen, flags)) < 0) -@@ -1814,6 +1843,9 @@ - return TRANS_CREATE_LISTENER_FAILED; - } - -+ if (abstract) -+ sockname.sun_path[0] = '@'; -+ - ciptr->family = sockname.sun_family; - ciptr->addrlen = namelen; - memcpy (ciptr->addr, &sockname, ciptr->addrlen); -@@ -1823,7 +1855,6 @@ - return 0; - } - -- - static int - TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) - -@@ -1836,15 +1867,20 @@ - struct stat statb; - int status = TRANS_RESET_NOOP; - unsigned int mode; -+ int abstract = 0; -+#ifdef HAVE_ABSTRACT_SOCKETS -+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT; -+#endif - - PRMSG (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd, 0); - -- if (stat (unsock->sun_path, &statb) == -1 || -+ if (!abstract && ( -+ stat (unsock->sun_path, &statb) == -1 || - ((statb.st_mode & S_IFMT) != - #if (defined (sun) && defined(SVR4)) || defined(NCR) || defined(SCO325) || !defined(S_IFSOCK) - S_IFIFO)) - #else -- S_IFSOCK)) -+ S_IFSOCK))) - #endif - { - int oldUmask = umask (0); -@@ -2034,6 +2070,11 @@ - } - - -+ /* -+ * if the socket is abstract, we already modified the address to have a -+ * @ instead of the initial NUL, so no need to do that again here. -+ */ -+ - newciptr->addrlen = ciptr->addrlen; - memcpy (newciptr->addr, ciptr->addr, newciptr->addrlen); - -@@ -2626,6 +2667,12 @@ - struct sockaddr_un sockname; - int namelen; - -+ -+ int abstract = 0; -+#ifdef HAVE_ABSTRACT_SOCKETS -+ abstract = ciptr->transptr->flags & TRANS_ABSTRACT; -+#endif -+ - #if defined(hpux) && defined(X11_t) - struct sockaddr_un old_sockname; - int old_namelen; -@@ -2674,9 +2721,9 @@ - sockname.sun_family = AF_UNIX; - - #ifdef NX_TRANS_SOCKET -- if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path) != 0) { -+ if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path, abstract) != 0) { - #else -- if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) { -+ if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) { - #endif - PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0); - return TRANS_CONNECT_FAILED; -@@ -2722,6 +2769,14 @@ - #endif - - /* -+ * Adjust the socket path if using abstract sockets. -+ * Done here because otherwise all the strlen() calls above would fail. -+ */ -+ -+ if (abstract) -+ sockname.sun_path[0] = '\0'; -+ -+ /* - * Do the connect() - */ - -@@ -2757,12 +2812,18 @@ - * should try again. - */ - -- if (olderrno == ENOENT || olderrno == EINTR) -- return TRANS_TRY_CONNECT_AGAIN; -- else if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS) -+ if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS) - return TRANS_IN_PROGRESS; -- else -- { -+ else if (olderrno == EINTR) -+ return TRANS_TRY_CONNECT_AGAIN; -+ else if (olderrno == ENOENT || olderrno == ECONNREFUSED) -+ /* If opening as abstract failed, try again normally */ -+ if (abstract) { -+ ciptr->transptr->flags &= ~(TRANS_ABSTRACT); -+ return TRANS_TRY_CONNECT_AGAIN; -+ } else { -+ return TRANS_CONNECT_FAILED; -+ } else { - PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n", - EGET(),0, 0); - -@@ -2791,6 +2852,9 @@ - return TRANS_CONNECT_FAILED; - } - -+ if (abstract) -+ sockname.sun_path[0] = '@'; -+ - ciptr->family = AF_UNIX; - ciptr->addrlen = namelen; - ciptr->peeraddrlen = namelen; -@@ -3323,7 +3387,11 @@ - Xtransport TRANS(SocketLocalFuncs) = { - /* Socket Interface */ - "local", -+#ifdef HAVE_ABSTRACT_SOCKETS -+ TRANS_ABSTRACT, -+#else - 0, -+#endif - #ifdef TRANS_CLIENT - TRANS(SocketOpenCOTSClient), - #endif /* TRANS_CLIENT */ -@@ -3369,7 +3437,7 @@ - Xtransport TRANS(SocketUNIXFuncs) = { - /* Socket Interface */ - "unix", --#if !defined(LOCALCONN) -+#if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS) - TRANS_ALIAS, - #else - 0, ---- a/nx-X11/lib/xtrans/Xtransint.h -+++ b/nx-X11/lib/xtrans/Xtransint.h -@@ -374,9 +374,10 @@ - #define TRANS_DISABLED (1<<2) /* Don't open this one */ - #define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */ - #define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */ -+#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */ - - /* Flags to preserve when setting others */ --#define TRANS_KEEPFLAGS (TRANS_NOUNLINK) -+#define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT) - - /* - * readv() and writev() don't exist or don't work correctly on some diff --git a/debian/patches/series b/debian/patches/series index 8da3bdbf9..b184a1fb0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -028_nx-X11_abstract-kernel-sockets.full.patch 029_nxcomp_ppc64.full+lite.patch 030_nx-X11_configure-args.full.patch 031_nx-X11_parallel-make.full.patch diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 88d223074..1e63a1406 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -374,9 +374,10 @@ typedef struct _Xtransport_table { #define TRANS_DISABLED (1<<2) /* Don't open this one */ #define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */ #define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */ +#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */ /* Flags to preserve when setting others */ -#define TRANS_KEEPFLAGS (TRANS_NOUNLINK) +#define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT) /* * readv() and writev() don't exist or don't work correctly on some diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c index 50b677057..091fc1ccd 100644 --- a/nx-X11/lib/xtrans/Xtranssock.c +++ b/nx-X11/lib/xtrans/Xtranssock.c @@ -172,6 +172,8 @@ static int IBMsockInit = 0; sock_init();\ IBMsockInit = 1;\ } + + #undef EINTR #define EINTR SOCEINTR #undef EINVAL @@ -192,6 +194,10 @@ static int IBMsockInit = 0; #define SocketInitOnce() /**/ #endif +#if defined(linux) +#define HAVE_ABSTRACT_SOCKETS +#endif + #define MIN_BACKLOG 128 #ifdef SOMAXCONN #if SOMAXCONN > MIN_BACKLOG @@ -532,7 +538,7 @@ static char *_NXGetOldUnixPath(char *path) void TRANS(SocketRejectConnection) (XtransConnInfo ciptr) { - size_t sa_l = sizeof(struct sockaddr); + socklen_t sa_l = sizeof(struct sockaddr); struct sockaddr sa; fd_set fs; struct timeval t; @@ -914,9 +920,11 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr) struct sockaddr_in socknamev4; void *socknamePtr; #if defined(SVR4) || defined(__SCO__) +# define SOCKLEN_T_PTR void* size_t namelen; #else - int namelen; +# define SOCKLEN_T_PTR socklen_t* + socklen_t namelen; #endif PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0); @@ -935,7 +943,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr) } if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr, - (void *)&namelen) < 0) + (SOCKLEN_T_PTR)&namelen) < 0) { #ifdef WIN32 errno = WSAGetLastError(); @@ -1477,23 +1485,28 @@ TRANS(SocketSetOption) (XtransConnInfo ciptr, int option, int arg) #ifdef UNIXCONN static int -set_sun_path(const char *port, const char *upath, char *path) +set_sun_path(const char *port, const char *upath, char *path, int abstract) { struct sockaddr_un s; int maxlen = sizeof(s.sun_path) - 1; + const char *at = ""; if (!port || !*port || !path) return -1; - if (*port == '/') { /* a full pathname */ - if (strlen(port) > maxlen) - return -1; - sprintf(path, "%s", port); - } else { - if (strlen(port) + strlen(upath) > maxlen) - return -1; - sprintf(path, "%s%s", upath, port); - } +#ifdef HAVE_ABSTRACT_SOCKETS + if (port[0] == '@') + upath = ""; + else if (abstract) + at = "@"; +#endif + + if (*port == '/') /* a full pathname */ + upath = ""; + + if (strlen(port) + strlen(upath) > maxlen) + return -1; + snprintf(path, sizeof(s.sun_path), "%s%s%s", at, upath, port); return 0; } #endif @@ -1726,6 +1739,12 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, int oldUmask; int status; unsigned int mode; + char tmpport[108]; + + int abstract = 0; +#ifdef HAVE_ABSTRACT_SOCKETS + abstract = ciptr->transptr->flags & TRANS_ABSTRACT; +#endif PRMSG (2, "SocketUNIXCreateListener(%s)\n", port ? port : "NULL", 0, 0); @@ -1741,11 +1760,11 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, mode = 0777; #endif #ifdef NX_TRANS_SOCKET - if (trans_mkdir(_NXGetUnixDir(UNIX_DIR), mode) == -1) { + if (!abstract && trans_mkdir(_NXGetUnixDir(UNIX_DIR), mode) == -1) { PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n", _NXGetUnixDir(UNIX_DIR), errno, 0); #else - if (trans_mkdir(UNIX_DIR, mode) == -1) { + if (!abstract && trans_mkdir(UNIX_DIR, mode) == -1) { PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n", UNIX_DIR, errno, 0); #endif @@ -1754,13 +1773,18 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, } #endif + memset(&sockname, 0, sizeof(sockname)); sockname.sun_family = AF_UNIX; + if (!(port && *port)) { + snprintf (tmpport, sizeof(tmpport), "%s%ld", UNIX_PATH, (long)getpid()); + port = tmpport; + } if (port && *port) { #ifdef NX_TRANS_SOCKET - if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path) != 0) { + if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path, abstract) != 0) { #else - if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) { + if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) { #endif PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0); return TRANS_CREATE_LISTENER_FAILED; @@ -1784,7 +1808,12 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, fprintf(stderr, "SocketUNIXCreateListener: Unlinking path [%s] for ciptr at [%p].\n", sockname.sun_path, (void *) ciptr); #endif - unlink (sockname.sun_path); + if (abstract) { + sockname.sun_path[0] = '\0'; + namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]); + } + else + unlink (sockname.sun_path); if ((status = TRANS(SocketCreateListener) (ciptr, (struct sockaddr *) &sockname, namelen, flags)) < 0) @@ -1814,6 +1843,9 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, return TRANS_CREATE_LISTENER_FAILED; } + if (abstract) + sockname.sun_path[0] = '@'; + ciptr->family = sockname.sun_family; ciptr->addrlen = namelen; memcpy (ciptr->addr, &sockname, ciptr->addrlen); @@ -1823,7 +1855,6 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, return 0; } - static int TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) @@ -1836,15 +1867,20 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) struct stat statb; int status = TRANS_RESET_NOOP; unsigned int mode; + int abstract = 0; +#ifdef HAVE_ABSTRACT_SOCKETS + abstract = ciptr->transptr->flags & TRANS_ABSTRACT; +#endif PRMSG (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd, 0); - if (stat (unsock->sun_path, &statb) == -1 || + if (!abstract && ( + stat (unsock->sun_path, &statb) == -1 || ((statb.st_mode & S_IFMT) != #if (defined (sun) && defined(SVR4)) || defined(NCR) || defined(SCO325) || !defined(S_IFSOCK) S_IFIFO)) #else - S_IFSOCK)) + S_IFSOCK))) #endif { int oldUmask = umask (0); @@ -2034,6 +2070,11 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) } + /* + * if the socket is abstract, we already modified the address to have a + * @ instead of the initial NUL, so no need to do that again here. + */ + newciptr->addrlen = ciptr->addrlen; memcpy (newciptr->addr, ciptr->addr, newciptr->addrlen); @@ -2626,6 +2667,12 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) struct sockaddr_un sockname; int namelen; + + int abstract = 0; +#ifdef HAVE_ABSTRACT_SOCKETS + abstract = ciptr->transptr->flags & TRANS_ABSTRACT; +#endif + #if defined(hpux) && defined(X11_t) struct sockaddr_un old_sockname; int old_namelen; @@ -2674,9 +2721,9 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) sockname.sun_family = AF_UNIX; #ifdef NX_TRANS_SOCKET - if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path) != 0) { + if (set_sun_path(port, _NXGetUnixPath(UNIX_PATH), sockname.sun_path, abstract) != 0) { #else - if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) { + if (set_sun_path(port, UNIX_PATH, sockname.sun_path, abstract) != 0) { #endif PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0); return TRANS_CONNECT_FAILED; @@ -2721,6 +2768,14 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) #endif + /* + * Adjust the socket path if using abstract sockets. + * Done here because otherwise all the strlen() calls above would fail. + */ + + if (abstract) + sockname.sun_path[0] = '\0'; + /* * Do the connect() */ @@ -2757,12 +2812,18 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) * should try again. */ - if (olderrno == ENOENT || olderrno == EINTR) - return TRANS_TRY_CONNECT_AGAIN; - else if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS) + if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS) return TRANS_IN_PROGRESS; - else - { + else if (olderrno == EINTR) + return TRANS_TRY_CONNECT_AGAIN; + else if (olderrno == ENOENT || olderrno == ECONNREFUSED) + /* If opening as abstract failed, try again normally */ + if (abstract) { + ciptr->transptr->flags &= ~(TRANS_ABSTRACT); + return TRANS_TRY_CONNECT_AGAIN; + } else { + return TRANS_CONNECT_FAILED; + } else { PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n", EGET(),0, 0); @@ -2791,6 +2852,9 @@ SocketUNIXConnectPost: return TRANS_CONNECT_FAILED; } + if (abstract) + sockname.sun_path[0] = '@'; + ciptr->family = AF_UNIX; ciptr->addrlen = namelen; ciptr->peeraddrlen = namelen; @@ -3323,7 +3387,11 @@ Xtransport TRANS(SocketINET6Funcs) = { Xtransport TRANS(SocketLocalFuncs) = { /* Socket Interface */ "local", +#ifdef HAVE_ABSTRACT_SOCKETS + TRANS_ABSTRACT, +#else 0, +#endif #ifdef TRANS_CLIENT TRANS(SocketOpenCOTSClient), #endif /* TRANS_CLIENT */ @@ -3369,7 +3437,7 @@ static char* unix_nolisten[] = { "local" , NULL }; Xtransport TRANS(SocketUNIXFuncs) = { /* Socket Interface */ "unix", -#if !defined(LOCALCONN) +#if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS) TRANS_ALIAS, #else 0, -- cgit v1.2.3 From bd10fe5919594afe37d0019bf58c359e79b54979 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 9 Feb 2015 15:31:46 +0100 Subject: Fix BIGENDIAN issue in nxcomp (relevant on PPC64 arch) (029_nxcomp_ppc64.full+lite.patch) --- debian/patches/029_nxcomp_ppc64.full+lite.patch | 17 ----------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 4 ++-- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 debian/patches/029_nxcomp_ppc64.full+lite.patch (limited to 'debian') diff --git a/debian/patches/029_nxcomp_ppc64.full+lite.patch b/debian/patches/029_nxcomp_ppc64.full+lite.patch deleted file mode 100644 index 9d454d5db..000000000 --- a/debian/patches/029_nxcomp_ppc64.full+lite.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Fix BIGENDIAN issue in nxcomp (relevant on PPC64 arch) -Author: Mihai Moldovan - ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -6832,9 +6832,9 @@ - { - sockaddr_in newAddr; - -- size_t addrLen = sizeof(sockaddr_in); -+ socklen_t addrLen = sizeof(sockaddr_in); - -- newFD = accept(proxyFD, (sockaddr *) &newAddr, (socklen_t *) &addrLen); -+ newFD = accept(proxyFD, (sockaddr *) &newAddr, &addrLen); - - if (newFD == -1) - { diff --git a/debian/patches/series b/debian/patches/series index b184a1fb0..de6e0905a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -029_nxcomp_ppc64.full+lite.patch 030_nx-X11_configure-args.full.patch 031_nx-X11_parallel-make.full.patch 051_nxcomp_macos105-fdisset.full+lite.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 6fd772912..7e2b990de 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -6832,9 +6832,9 @@ int WaitForRemote(int portNum) { sockaddr_in newAddr; - size_t addrLen = sizeof(sockaddr_in); + socklen_t addrLen = sizeof(sockaddr_in); - newFD = accept(proxyFD, (sockaddr *) &newAddr, (socklen_t *) &addrLen); + newFD = accept(proxyFD, (sockaddr *) &newAddr, &addrLen); if (newFD == -1) { -- cgit v1.2.3 From 9f4b494fa49db53a440f544246d6922dbd0c4684 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 9 Feb 2015 15:34:02 +0100 Subject: Allow to pass in configure args (030_nx-X11_configure-args.full.patch). --- .../patches/030_nx-X11_configure-args.full.patch | 51 ---------------------- debian/patches/series | 1 - nx-X11/lib/X11/Imakefile | 6 ++- nx-X11/programs/Xserver/Imakefile | 4 +- 4 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 debian/patches/030_nx-X11_configure-args.full.patch (limited to 'debian') diff --git a/debian/patches/030_nx-X11_configure-args.full.patch b/debian/patches/030_nx-X11_configure-args.full.patch deleted file mode 100644 index 67184d330..000000000 --- a/debian/patches/030_nx-X11_configure-args.full.patch +++ /dev/null @@ -1,51 +0,0 @@ -Description: Allow to pass in configure args. - Allow to pass in configure args. -Forward: pending -Author: Jan Engelhardt -Last-Update: 2012-02-14 ---- - nx-X11/lib/X11/Imakefile | 6 ++++-- - nx-X11/programs/Xserver/Imakefile | 4 +++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -Index: nx-X11/lib/X11/Imakefile -=================================================================== ---- a/nx-X11/lib/X11/Imakefile -+++ b/nx-X11/lib/X11/Imakefile -@@ -1147,15 +1147,17 @@ ks_tables.h: $(XINCLUDESRC)/keysymdef.h - - includes:: ks_tables.h - -+CONFIGURE ?= ./configure -+ - #if NXLibraries - - $(NX_XCOMPCONFIGTARGET): - cd ../../../nxcomp && \ -- ./configure -+ ${CONFIGURE} - - $(NX_XCOMPEXTCONFIGTARGET): - cd ../../../nxcompext && \ -- ./configure -+ ${CONFIGURE} - - #ifdef SunArchitecture - $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) -Index: nx-X11/programs/Xserver/Imakefile -=================================================================== ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1036,9 +1036,11 @@ NX_XSHADOWLIBDIR = $(XTOP)/../nxcomps - NX_XSHADOWLIBTARGET = $(NX_XSHADOWLIBDIR)/$(NX_XSHADOWLIBNAME) - NX_XSHADOWCONFIGTARGET = $(NX_XSHADOWLIBDIR)/config.status - -+CONFIGURE ?= ./configure -+ - $(NX_XSHADOWCONFIGTARGET): - cd $(NX_XSHADOWLIBDIR) && \ -- ./configure -+ ${CONFIGURE} - - #ifdef SunArchitecture - $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) diff --git a/debian/patches/series b/debian/patches/series index de6e0905a..1288ab3f4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -030_nx-X11_configure-args.full.patch 031_nx-X11_parallel-make.full.patch 051_nxcomp_macos105-fdisset.full+lite.patch 052_nxcomp_macos10-nxauth-location.full+lite.patch diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index d8d0601b8..24319499c 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -1147,15 +1147,17 @@ ks_tables.h: $(XINCLUDESRC)/keysymdef.h util/makekeys.c includes:: ks_tables.h +CONFIGURE ?= ./configure + #if NXLibraries $(NX_XCOMPCONFIGTARGET): cd ../../../nxcomp && \ - ./configure + ${CONFIGURE} $(NX_XCOMPEXTCONFIGTARGET): cd ../../../nxcompext && \ - ./configure + ${CONFIGURE} #ifdef SunArchitecture $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 1d12173fb..b5e5b5b29 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1036,9 +1036,11 @@ NX_XSHADOWLIBDIR = $(XTOP)/../nxcompshad NX_XSHADOWLIBTARGET = $(NX_XSHADOWLIBDIR)/$(NX_XSHADOWLIBNAME) NX_XSHADOWCONFIGTARGET = $(NX_XSHADOWLIBDIR)/config.status +CONFIGURE ?= ./configure + $(NX_XSHADOWCONFIGTARGET): cd $(NX_XSHADOWLIBDIR) && \ - ./configure + ${CONFIGURE} #ifdef SunArchitecture $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) -- cgit v1.2.3 From 6101bd9564d6334dea7c0de778536e3fe1a5e9b9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 9 Feb 2015 15:38:59 +0100 Subject: Description: Enable parallel make (031_nx-X11_parallel-make.full.patch). Restore ability to build things in parallel. (${MAKE} must always appear in the rule directly, and not be hidden through expansions of other variables to get this to work.) --- debian/patches/031_nx-X11_parallel-make.full.patch | 200 --------------------- debian/patches/series | 1 - nx-X11/Makefile | 64 +++---- nx-X11/config/imake/Makefile.ini | 1 - nx-X11/lib/X11/Imakefile | 18 +- nx-X11/programs/Xserver/Imakefile | 4 +- 6 files changed, 42 insertions(+), 246 deletions(-) delete mode 100644 debian/patches/031_nx-X11_parallel-make.full.patch (limited to 'debian') diff --git a/debian/patches/031_nx-X11_parallel-make.full.patch b/debian/patches/031_nx-X11_parallel-make.full.patch deleted file mode 100644 index 496020545..000000000 --- a/debian/patches/031_nx-X11_parallel-make.full.patch +++ /dev/null @@ -1,200 +0,0 @@ -Description: Enable parallel make - Restore ability to build things in parallel. - (${MAKE} must always appear in the rule directly, and not be - hidden through expansions of other variables to get this to work.) -Forward: pending -Author: Jan Engelhardt -Last-Update: 2012-01-26 22:29:13.993994227 +0100 - ---- - nx-X11/Makefile | 64 +++++++++++++++++----------------- - nx-X11/config/imake/Makefile.ini | 1 - nx-X11/lib/X11/Imakefile | 12 ++---- - nx-X11/programs/Xserver/Imakefile | 4 +- - 10 files changed, 60 insertions(+), 69 deletions(-) - ---- a/nx-X11/Makefile -+++ b/nx-X11/Makefile -@@ -32,8 +32,8 @@ - VERSPROG = $(CONFIGSRC)/util/printver.exe - - all: -- @$(MAKE_CMD) xmakefile-exists || $(MAKE) all-initial -- @$(MAKE_CMD) $@ -+ @${MAKE} ${MAKE_OPTS} xmakefile-exists || $(MAKE) all-initial -+ @${MAKE} ${MAKE_OPTS} $@ - - all-initial: - @echo Please use make World, or on NT use nmake World.Win32. -@@ -57,8 +57,8 @@ - @date - @echo "" - @if [ -f xmakefile ]; then \ -- $(MAKE_CMD) -k distclean || \ -- $(MAKE_CMD) -k clean || \ -+ ${MAKE} ${MAKE_OPTS} -k distclean || \ -+ ${MAKE} ${MAKE_OPTS} -k clean || \ - $(RM) xmakefile; \ - fi - @if [ ! -f $(IRULESRC)/host.def ]; then \ -@@ -84,14 +84,14 @@ - # fi - cd $(IMAKESRC) && $(MAKE) $(FLAGS) clean - $(MAKE) $(MFLAGS) Makefile.boot -- $(MAKE_CMD) $(MFLAGS) version.def -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) version.def - $(MAKE) $(MFLAGS) Makefile.boot -- $(MAKE_CMD) $(MFLAGS) VerifyOS -- $(MAKE_CMD) $(MFLAGS) Makefiles -- $(MAKE_CMD) $(MFLAGS) BOOTSTRAPSUBDIRS= clean -- $(MAKE_CMD) $(MFLAGS) includes -- $(MAKE_CMD) $(MFLAGS) depend -- $(MAKE_CMD) $(MFLAGS) $(WORLDOPTS) World -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) VerifyOS -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) Makefiles -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) BOOTSTRAPSUBDIRS= clean -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) includes -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) depend -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) $(WORLDOPTS) World - @echo "" - @date - @echo "" -@@ -154,15 +154,15 @@ - -if exist xmakefile.bak del xmakefile.bak - -if exist xmakefile ren xmakefile xmakefile.bak - $(IMAKE:/=\) -s xmakefile -I$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) -- $(MAKE_CMD) $(MFLAGS) VerifyOS -- $(MAKE_CMD) $(MFLAGS) Makefiles -- $(MAKE_CMD) $(MFLAGS) clean -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) VerifyOS -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) Makefiles -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) clean - cd $(CONFIGSRC)\util - $(MAKE) mkdirhier.exe - cd ..\.. -- $(MAKE_CMD) $(MFLAGS) includes -- $(MAKE_CMD) $(MFLAGS) depend -- $(MAKE_CMD) $(MFLAGS) $(WIN32WORLDOPTS) -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) includes -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) depend -+ ${MAKE} ${MAKE_OPTS} $(MFLAGS) $(WIN32WORLDOPTS) - @echo : - @echo : - @echo Full build of $(RELEASE) complete. -@@ -198,38 +198,38 @@ - # a copy of every rule that might be invoked at top level - - clean: -- -$(MAKE_CMD) $@ -+ -${MAKE_CMD} ${MAKE_OPTS} $@ - find config -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done - find lib -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done - find programs -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done - find include -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done - rm -f config/cf/{version.def,date.def} - dangerous_strip_clean: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - distclean: -- -$(MAKE_CMD) $@ -+ -${MAKE} ${MAKE_OPTS} $@ - $(RM) xmakefile $(IRULESRC)/version.def $(IRULESRC)/date.def - depend: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - Everything: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - external.ln: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - includes: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - install.sdk: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - install.ln: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - install.man: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - install: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - Makefiles: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - man_keywords: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - tags: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ - VerifyOS: -- $(MAKE_CMD) $@ -+ ${MAKE} ${MAKE_OPTS} $@ ---- a/nx-X11/config/imake/Makefile.ini -+++ b/nx-X11/config/imake/Makefile.ini -@@ -21,7 +21,6 @@ - SHELL = /bin/sh - RM = rm -f - MV = mv --MAKE = make - RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \ - tags TAGS make.log - NPROC = 1 ---- a/nx-X11/lib/X11/Imakefile -+++ b/nx-X11/lib/X11/Imakefile -@@ -1161,25 +1161,23 @@ - - #ifdef SunArchitecture - $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) -- cd $(NX_XCOMPLIBDIR) && \ -- gmake -+ ${MAKE} -C $(NX_XCOMPLIBDIR) - - $(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) -- cd ../../../nxcompext && \ -- gmake -+ ${MAKE} -C ../../../nxcompext - - #else - $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) -- cd $(NX_XCOMPLIBDIR) && \ -- make -+ ${MAKE} -C $(NX_XCOMPLIBDIR) - --$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) -- cd ../../../nxcompext && \ -- make -+$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) $(NX_XCOMPLIBTARGET) lib$(LIBNAME).so.$(SOXLIBREV) -+ ${MAKE} -C ../../../nxcompext - - #endif - --depend:: $(NX_XCOMPLIBTARGET) -+depend:: -+ -+lib$(LIBNAME).so.$(SOXLIBREV): $(NX_XCOMPLIBTARGET) - - all:: $(NX_XCOMPLIBTARGET) - ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1045,11 +1045,11 @@ - #ifdef SunArchitecture - $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) - cd $(NX_XSHADOWLIBDIR) && \ -- gmake -+ ${MAKE} - #else - $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) - cd $(NX_XSHADOWLIBDIR) && \ -- rm -f *.o && make -+ rm -f *.o && ${MAKE} - #endif - - ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \ - diff --git a/debian/patches/series b/debian/patches/series index 1288ab3f4..2c9811e29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -031_nx-X11_parallel-make.full.patch 051_nxcomp_macos105-fdisset.full+lite.patch 052_nxcomp_macos10-nxauth-location.full+lite.patch 053_nx-X11_no-xcomp1-install-target.full.patch diff --git a/nx-X11/Makefile b/nx-X11/Makefile index 7c4090a95..3533c914e 100644 --- a/nx-X11/Makefile +++ b/nx-X11/Makefile @@ -32,8 +32,8 @@ VERSSRC = $(CONFIGSRC)/util/printver.c VERSPROG = $(CONFIGSRC)/util/printver.exe all: - @$(MAKE_CMD) xmakefile-exists || $(MAKE) all-initial - @$(MAKE_CMD) $@ + @${MAKE} ${MAKE_OPTS} xmakefile-exists || $(MAKE) all-initial + @${MAKE} ${MAKE_OPTS} $@ all-initial: @echo Please use make World, or on NT use nmake World.Win32. @@ -57,8 +57,8 @@ World: @date @echo "" @if [ -f xmakefile ]; then \ - $(MAKE_CMD) -k distclean || \ - $(MAKE_CMD) -k clean || \ + ${MAKE} ${MAKE_OPTS} -k distclean || \ + ${MAKE} ${MAKE_OPTS} -k clean || \ $(RM) xmakefile; \ fi @if [ ! -f $(IRULESRC)/host.def ]; then \ @@ -84,14 +84,14 @@ World: # fi cd $(IMAKESRC) && $(MAKE) $(FLAGS) clean $(MAKE) $(MFLAGS) Makefile.boot - $(MAKE_CMD) $(MFLAGS) version.def + ${MAKE} ${MAKE_OPTS} $(MFLAGS) version.def $(MAKE) $(MFLAGS) Makefile.boot - $(MAKE_CMD) $(MFLAGS) VerifyOS - $(MAKE_CMD) $(MFLAGS) Makefiles - $(MAKE_CMD) $(MFLAGS) BOOTSTRAPSUBDIRS= clean - $(MAKE_CMD) $(MFLAGS) includes - $(MAKE_CMD) $(MFLAGS) depend - $(MAKE_CMD) $(MFLAGS) $(WORLDOPTS) World + ${MAKE} ${MAKE_OPTS} $(MFLAGS) VerifyOS + ${MAKE} ${MAKE_OPTS} $(MFLAGS) Makefiles + ${MAKE} ${MAKE_OPTS} $(MFLAGS) BOOTSTRAPSUBDIRS= clean + ${MAKE} ${MAKE_OPTS} $(MFLAGS) includes + ${MAKE} ${MAKE_OPTS} $(MFLAGS) depend + ${MAKE} ${MAKE_OPTS} $(MFLAGS) $(WORLDOPTS) World @echo "" @date @echo "" @@ -154,15 +154,15 @@ World.Win32: -if exist xmakefile.bak del xmakefile.bak -if exist xmakefile ren xmakefile xmakefile.bak $(IMAKE:/=\) -s xmakefile -I$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) - $(MAKE_CMD) $(MFLAGS) VerifyOS - $(MAKE_CMD) $(MFLAGS) Makefiles - $(MAKE_CMD) $(MFLAGS) clean + ${MAKE} ${MAKE_OPTS} $(MFLAGS) VerifyOS + ${MAKE} ${MAKE_OPTS} $(MFLAGS) Makefiles + ${MAKE} ${MAKE_OPTS} $(MFLAGS) clean cd $(CONFIGSRC)\util $(MAKE) mkdirhier.exe cd ..\.. - $(MAKE_CMD) $(MFLAGS) includes - $(MAKE_CMD) $(MFLAGS) depend - $(MAKE_CMD) $(MFLAGS) $(WIN32WORLDOPTS) + ${MAKE} ${MAKE_OPTS} $(MFLAGS) includes + ${MAKE} ${MAKE_OPTS} $(MFLAGS) depend + ${MAKE} ${MAKE_OPTS} $(MFLAGS) $(WIN32WORLDOPTS) @echo : @echo : @echo Full build of $(RELEASE) complete. @@ -198,38 +198,38 @@ World.OS2: # a copy of every rule that might be invoked at top level clean: - -$(MAKE_CMD) $@ + -${MAKE_CMD} ${MAKE_OPTS} $@ find config -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done find lib -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done find programs -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done find include -type f | egrep '.*/Makefile$$' | while read makefile; do rm -f $$makefile; done rm -f config/cf/{version.def,date.def} dangerous_strip_clean: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ distclean: - -$(MAKE_CMD) $@ + -${MAKE} ${MAKE_OPTS} $@ $(RM) xmakefile $(IRULESRC)/version.def $(IRULESRC)/date.def depend: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ Everything: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ external.ln: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ includes: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ install.sdk: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ install.ln: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ install.man: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ install: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ Makefiles: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ man_keywords: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ tags: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ VerifyOS: - $(MAKE_CMD) $@ + ${MAKE} ${MAKE_OPTS} $@ diff --git a/nx-X11/config/imake/Makefile.ini b/nx-X11/config/imake/Makefile.ini index b9c22963e..93dca8584 100644 --- a/nx-X11/config/imake/Makefile.ini +++ b/nx-X11/config/imake/Makefile.ini @@ -21,7 +21,6 @@ IMAKEMDEP_CROSSCOMPILE = -DCROSSCOMPILE_CPP SHELL = /bin/sh RM = rm -f MV = mv -MAKE = make RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \ tags TAGS make.log NPROC = 1 diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 24319499c..cad223f1c 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -1161,25 +1161,23 @@ $(NX_XCOMPEXTCONFIGTARGET): #ifdef SunArchitecture $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) - cd $(NX_XCOMPLIBDIR) && \ - gmake + ${MAKE} -C $(NX_XCOMPLIBDIR) $(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) - cd ../../../nxcompext && \ - gmake + ${MAKE} -C ../../../nxcompext #else $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET) - cd $(NX_XCOMPLIBDIR) && \ - make + ${MAKE} -C $(NX_XCOMPLIBDIR) -$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) - cd ../../../nxcompext && \ - make +$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) $(NX_XCOMPLIBTARGET) lib$(LIBNAME).so.$(SOXLIBREV) + ${MAKE} -C ../../../nxcompext #endif -depend:: $(NX_XCOMPLIBTARGET) +depend:: + +lib$(LIBNAME).so.$(SOXLIBREV): $(NX_XCOMPLIBTARGET) all:: $(NX_XCOMPLIBTARGET) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index b5e5b5b29..b01fc2e48 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1045,11 +1045,11 @@ $(NX_XSHADOWCONFIGTARGET): #ifdef SunArchitecture $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) cd $(NX_XSHADOWLIBDIR) && \ - gmake + ${MAKE} #else $(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET) cd $(NX_XSHADOWLIBDIR) && \ - rm -f *.o && make + rm -f *.o && ${MAKE} #endif ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \ -- cgit v1.2.3 From 9054786947b2f6b82078f6e5f965c3b0b629c880 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 9 Feb 2015 15:41:35 +0100 Subject: workaround for Mac OS X 10.5 (051_nxcomp_macos105-fdisset.full+lite.patch( The Mac OS X 10.5 SDK requires the second argument of FD_ISSET to be writeable, although it does only access the data. Given that we have a const pointer for a const struct, copy and pass that. . Note that this is merely a workaround for OS X 10.5, as 10.6 and later define the second argument of FD_ISSET as const struct const *foo, too. . It is safe, as data is accessed read-only by FD_ISSET, even on 10.5. --- .../051_nxcomp_macos105-fdisset.full+lite.patch | 82 ---------------------- debian/patches/series | 1 - nxcomp/Agent.h | 28 +++++--- 3 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 debian/patches/051_nxcomp_macos105-fdisset.full+lite.patch (limited to 'debian') diff --git a/debian/patches/051_nxcomp_macos105-fdisset.full+lite.patch b/debian/patches/051_nxcomp_macos105-fdisset.full+lite.patch deleted file mode 100644 index 6b78a6bc2..000000000 --- a/debian/patches/051_nxcomp_macos105-fdisset.full+lite.patch +++ /dev/null @@ -1,82 +0,0 @@ -Description: workaround for Mac OS X 10.5 - The Mac OS X 10.5 SDK requires the second argument of FD_ISSET to be - writeable, although it does only access the data. Given that we have a - const pointer for a const struct, copy and pass that. - . - Note that this is merely a workaround for OS X 10.5, as 10.6 and later - define the second argument of FD_ISSET as const struct const *foo, too. - . - It is safe, as data is accessed read-only by FD_ISSET, even on 10.5. -Forward: pending -Author: Mihai Moldovan ---- - nxcomp/Agent.h | 28 ++++++++++++++++++++-------- - 1 files changed, 20 insertions(+), 8 deletions(-) - ---- a/nxcomp/Agent.h -+++ b/nxcomp/Agent.h -@@ -149,30 +149,38 @@ - - int remoteCanRead(const fd_set * const readSet) - { -+ // OS X 10.5 requires the second argument to be non-const, so copy readSet. -+ // It's safe though, as FD_ISSET does not operate on it. -+ fd_set readWorkSet = *readSet; -+ - #if defined(TEST) || defined(INFO) - *logofs << "Agent: remoteCanRead() is " << -- (FD_ISSET(remoteFd_, readSet) && transport_ -> dequeuable() != 0) -- << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, readSet) -+ (FD_ISSET(remoteFd_, &readWorkSet) && transport_ -> dequeuable() != 0) -+ << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, &readWorkSet) - << " and dequeuable " << transport_ -> dequeuable() - << ".\n" << logofs_flush; - #endif - -- return (FD_ISSET(remoteFd_, readSet) && -+ return (FD_ISSET(remoteFd_, &readWorkSet) && - transport_ -> dequeuable() != 0); - } - - int remoteCanWrite(const fd_set * const writeSet) - { -+ // OS X 10.5 requires the second argument to be non-const, so copy writeSet. -+ // It's safe though, as FD_ISSET does not operate on it. -+ fd_set writeWorkSet = *writeSet; -+ - #if defined(TEST) || defined(INFO) - *logofs << "Agent: remoteCanWrite() is " << -- (FD_ISSET(remoteFd_, writeSet) && transport_ -> -+ (FD_ISSET(remoteFd_, &writeWorkSet) && transport_ -> - queuable() != 0 && canRead_ == 1) << " with FD_ISSET() " -- << (int) FD_ISSET(remoteFd_, writeSet) << " queueable " -+ << (int) FD_ISSET(remoteFd_, &writeWorkSet) << " queueable " - << transport_ -> queuable() << " channel can read " - << canRead_ << ".\n" << logofs_flush; - #endif - -- return (FD_ISSET(remoteFd_, writeSet) && -+ return (FD_ISSET(remoteFd_, &writeWorkSet) && - transport_ -> queuable() != 0 && - canRead_ == 1); - } -@@ -203,13 +211,17 @@ - - int proxyCanRead(const fd_set * const readSet) - { -+ // OS X 10.5 requires the second argument to be non-const, so copy readSet. -+ // It's safe though, as FD_ISSET does not operate on it. -+ fd_set readWorkSet = *readSet; -+ - #if defined(TEST) || defined(INFO) - *logofs << "Agent: proxyCanRead() is " -- << ((int) FD_ISSET(proxy -> getFd(), readSet) -+ << ((int) FD_ISSET(proxy -> getFd(), &readWorkSet) - << ".\n" << logofs_flush; - #endif - -- return (FD_ISSET(proxy -> getFd(), readSet)); -+ return (FD_ISSET(proxy -> getFd(), &readWorkSet)); - } - - int enqueueData(const char *data, const int size) const diff --git a/debian/patches/series b/debian/patches/series index 2c9811e29..214bf6a69 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -051_nxcomp_macos105-fdisset.full+lite.patch 052_nxcomp_macos10-nxauth-location.full+lite.patch 053_nx-X11_no-xcomp1-install-target.full.patch 054_nx-X11_ppc64-ftbfs.full.patch diff --git a/nxcomp/Agent.h b/nxcomp/Agent.h index fac5acd43..ded344d84 100644 --- a/nxcomp/Agent.h +++ b/nxcomp/Agent.h @@ -149,30 +149,38 @@ class Agent int remoteCanRead(const fd_set * const readSet) { + // OS X 10.5 requires the second argument to be non-const, so copy readSet. + // It's safe though, as FD_ISSET does not operate on it. + fd_set readWorkSet = *readSet; + #if defined(TEST) || defined(INFO) *logofs << "Agent: remoteCanRead() is " << - (FD_ISSET(remoteFd_, readSet) && transport_ -> dequeuable() != 0) - << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, readSet) + (FD_ISSET(remoteFd_, &readWorkSet) && transport_ -> dequeuable() != 0) + << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, &readWorkSet) << " and dequeuable " << transport_ -> dequeuable() << ".\n" << logofs_flush; #endif - return (FD_ISSET(remoteFd_, readSet) && + return (FD_ISSET(remoteFd_, &readWorkSet) && transport_ -> dequeuable() != 0); } int remoteCanWrite(const fd_set * const writeSet) { + // OS X 10.5 requires the second argument to be non-const, so copy writeSet. + // It's safe though, as FD_ISSET does not operate on it. + fd_set writeWorkSet = *writeSet; + #if defined(TEST) || defined(INFO) *logofs << "Agent: remoteCanWrite() is " << - (FD_ISSET(remoteFd_, writeSet) && transport_ -> + (FD_ISSET(remoteFd_, &writeWorkSet) && transport_ -> queuable() != 0 && canRead_ == 1) << " with FD_ISSET() " - << (int) FD_ISSET(remoteFd_, writeSet) << " queueable " + << (int) FD_ISSET(remoteFd_, &writeWorkSet) << " queueable " << transport_ -> queuable() << " channel can read " << canRead_ << ".\n" << logofs_flush; #endif - return (FD_ISSET(remoteFd_, writeSet) && + return (FD_ISSET(remoteFd_, &writeWorkSet) && transport_ -> queuable() != 0 && canRead_ == 1); } @@ -203,13 +211,17 @@ class Agent int proxyCanRead(const fd_set * const readSet) { + // OS X 10.5 requires the second argument to be non-const, so copy readSet. + // It's safe though, as FD_ISSET does not operate on it. + fd_set readWorkSet = *readSet; + #if defined(TEST) || defined(INFO) *logofs << "Agent: proxyCanRead() is " - << ((int) FD_ISSET(proxy -> getFd(), readSet) + << ((int) FD_ISSET(proxy -> getFd(), &readWorkSet) << ".\n" << logofs_flush; #endif - return (FD_ISSET(proxy -> getFd(), readSet)); + return (FD_ISSET(proxy -> getFd(), &readWorkSet)); } int enqueueData(const char *data, const int size) const -- cgit v1.2.3 From e736fff09871bbbc6101f3da444afbccd473a915 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 9 Feb 2015 15:45:33 +0100 Subject: Fix nxauth location on Mac OS X 10 (052_nxcomp_macos10-nxauth-location.full+lite.patch) --- ..._nxcomp_macos10-nxauth-location.full+lite.patch | 41 ---------------------- debian/patches/series | 1 - nxcomp/Auth.cpp | 17 ++++++--- 3 files changed, 13 insertions(+), 46 deletions(-) delete mode 100644 debian/patches/052_nxcomp_macos10-nxauth-location.full+lite.patch (limited to 'debian') diff --git a/debian/patches/052_nxcomp_macos10-nxauth-location.full+lite.patch b/debian/patches/052_nxcomp_macos10-nxauth-location.full+lite.patch deleted file mode 100644 index 813363e69..000000000 --- a/debian/patches/052_nxcomp_macos10-nxauth-location.full+lite.patch +++ /dev/null @@ -1,41 +0,0 @@ -Description: Fix nxauth location on Mac OS X 10 -Author: Mihai Moldovan - ---- a/nxcomp/Auth.cpp -+++ b/nxcomp/Auth.cpp -@@ -217,22 +217,31 @@ - - // - // Use the nxauth command on Windows and the Mac, xauth -- // on all the other platforms. On Windows and on the Mac -- // we assume that the nxauth command is located under -- // bin in the client installation directory. On all the -+ // on all the other platforms. On Windows we assume that -+ // the nxauth command is located under bin in the client -+ // installation directory. On Mac OS X we assume that the -+ // command is located directly in the client installation -+ // directory, to make bundle shipping easier. On all the - // other platforms we use the default xauth command that - // is in our path. - // - - char command[DEFAULT_STRING_LIMIT]; - -- #if defined(__CYGWIN32__) || defined(__APPLE__) -+ #if defined(__CYGWIN32__) - - snprintf(command, DEFAULT_STRING_LIMIT - 1, - "%s/bin/nxauth", control -> SystemPath); - - *(command + DEFAULT_STRING_LIMIT - 1) = '\0'; - -+ #elif defined(__APPLE__) -+ -+ snprintf(command, DEFAULT_STRING_LIMIT - 1, -+ "%s/nxauth", control -> SystemPath); -+ -+ *(command + DEFAULT_STRING_LIMIT - 1) = '\0'; -+ - #else - - strcpy(command, "xauth"); diff --git a/debian/patches/series b/debian/patches/series index 214bf6a69..138d87ae9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -052_nxcomp_macos10-nxauth-location.full+lite.patch 053_nx-X11_no-xcomp1-install-target.full.patch 054_nx-X11_ppc64-ftbfs.full.patch 055_nx-X11_imake-Werror-format-security.full.patch diff --git a/nxcomp/Auth.cpp b/nxcomp/Auth.cpp index d8e999132..c52392a51 100644 --- a/nxcomp/Auth.cpp +++ b/nxcomp/Auth.cpp @@ -217,22 +217,31 @@ int Auth::getCookie() // // Use the nxauth command on Windows and the Mac, xauth - // on all the other platforms. On Windows and on the Mac - // we assume that the nxauth command is located under - // bin in the client installation directory. On all the + // on all the other platforms. On Windows we assume that + // the nxauth command is located under bin in the client + // installation directory. On Mac OS X we assume that the + // command is located directly in the client installation + // directory, to make bundle shipping easier. On all the // other platforms we use the default xauth command that // is in our path. // char command[DEFAULT_STRING_LIMIT]; - #if defined(__CYGWIN32__) || defined(__APPLE__) + #if defined(__CYGWIN32__) snprintf(command, DEFAULT_STRING_LIMIT - 1, "%s/bin/nxauth", control -> SystemPath); *(command + DEFAULT_STRING_LIMIT - 1) = '\0'; + #elif defined(__APPLE__) + + snprintf(command, DEFAULT_STRING_LIMIT - 1, + "%s/nxauth", control -> SystemPath); + + *(command + DEFAULT_STRING_LIMIT - 1) = '\0'; + #else strcpy(command, "xauth"); -- cgit v1.2.3 From 9ea734b21c6f5485b0db305fa04b023b513e2490 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Feb 2015 15:47:44 +0100 Subject: Avoid building libXcomp.so.1 (which is identical to libXcomp.so.3), (053_nx-X11_no-xcomp1-install-target.full.patch). --- .../053_nx-X11_no-xcomp1-install-target.full.patch | 32 ---------------------- debian/patches/series | 1 - nx-X11/lib/X11/Imakefile | 11 +------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 debian/patches/053_nx-X11_no-xcomp1-install-target.full.patch (limited to 'debian') diff --git a/debian/patches/053_nx-X11_no-xcomp1-install-target.full.patch b/debian/patches/053_nx-X11_no-xcomp1-install-target.full.patch deleted file mode 100644 index acf9374e5..000000000 --- a/debian/patches/053_nx-X11_no-xcomp1-install-target.full.patch +++ /dev/null @@ -1,32 +0,0 @@ -Description: Avoid building libXcomp.so.1 (which is identical to libXcomp.so.3) -Author: Orion Poplawski - ---- a/nx-X11/lib/X11/Imakefile 2013-01-04 05:25:49.000000000 -0700 -+++ b/nx-X11/lib/X11/Imakefile 2013-01-15 15:26:07.969167259 -0700 -@@ -63,7 +63,6 @@ NX_XCOMPLIBDIR = $(XTOP)/../nxcomp - NX_XCOMPLIBLINK = Xcomp - NX_XCOMPLIBTARGET = $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) - NX_REQUIREDLIBS = -L$(NX_XCOMPLIBDIR) -l$(NX_XCOMPLIBLINK) --NX_XCOMPDEPTARGET = $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) - NX_XCOMPCONFIGTARGET = $(NX_XCOMPLIBDIR)/config.status - - NX_XCOMPEXTLIBDIR = $(XTOP)/../nxcompext -@@ -1181,17 +1180,9 @@ lib$(LIBNAME).so.$(SOXLIBREV): $(NX_XCOM - - all:: $(NX_XCOMPLIBTARGET) - --$(NX_XCOMPDEPTARGET): -- ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) -- ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME).1 $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME).1 -- - depend:: $(NX_XCOMPLIBTARGET) - --all:: $(NX_XCOMPDEPTARGET) $(NX_XCOMPEXTLIBTARGET) -- --clean:: -- rm -f $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) -- rm -f $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME).1 -+all:: $(NX_XCOMPEXTLIBTARGET) - - #endif - diff --git a/debian/patches/series b/debian/patches/series index 138d87ae9..5e2e29e68 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -053_nx-X11_no-xcomp1-install-target.full.patch 054_nx-X11_ppc64-ftbfs.full.patch 055_nx-X11_imake-Werror-format-security.full.patch 056_nx-X11_Werror-format-security.full.patch diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index cad223f1c..c0ae81071 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -63,7 +63,6 @@ NX_XCOMPLIBDIR = $(XTOP)/../nxcomp NX_XCOMPLIBLINK = Xcomp NX_XCOMPLIBTARGET = $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) NX_REQUIREDLIBS = -L$(NX_XCOMPLIBDIR) -l$(NX_XCOMPLIBLINK) -NX_XCOMPDEPTARGET = $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) NX_XCOMPCONFIGTARGET = $(NX_XCOMPLIBDIR)/config.status NX_XCOMPEXTLIBDIR = $(XTOP)/../nxcompext @@ -1181,17 +1180,9 @@ lib$(LIBNAME).so.$(SOXLIBREV): $(NX_XCOMPLIBTARGET) all:: $(NX_XCOMPLIBTARGET) -$(NX_XCOMPDEPTARGET): - ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) - ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME).1 $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME).1 - depend:: $(NX_XCOMPLIBTARGET) -all:: $(NX_XCOMPDEPTARGET) $(NX_XCOMPEXTLIBTARGET) - -clean:: - rm -f $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME) - rm -f $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME).1 +all:: $(NX_XCOMPEXTLIBTARGET) #endif -- cgit v1.2.3 From 0b711de48cdb04f4328eff75f82b97f9a07cbfbf Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Feb 2015 15:49:51 +0100 Subject: Fix FTBFS on ppc64 architecture (054_nx-X11_ppc64-ftbfs.full.patch). --- debian/patches/054_nx-X11_ppc64-ftbfs.full.patch | 14 -------------- debian/patches/series | 1 - nx-X11/lib/GL/mesa/main/Imakefile.inc | 3 +++ 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 debian/patches/054_nx-X11_ppc64-ftbfs.full.patch (limited to 'debian') diff --git a/debian/patches/054_nx-X11_ppc64-ftbfs.full.patch b/debian/patches/054_nx-X11_ppc64-ftbfs.full.patch deleted file mode 100644 index d60426e91..000000000 --- a/debian/patches/054_nx-X11_ppc64-ftbfs.full.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: Fix FTBFS on ppc64 architecture -Author: Orion Poplawski -diff -up a/nx-X11/lib/GL/mesa/main/Imakefile.inc b/nx-X11/lib/GL/mesa/main/Imakefile.inc ---- a/nx-X11/lib/GL/mesa/main/Imakefile.inc 2014-01-04 13:39:35.000000000 -0700 -+++ b/nx-X11/lib/GL/mesa/main/Imakefile.inc 2014-01-24 12:04:00.085272615 -0700 -@@ -1,5 +1,8 @@ - XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile.inc,v 1.7tsi Exp $ - -+/* gcc on ppc64 defines this, causes macro recursion with pixel below */ -+#undef pixel -+ - #ifndef MesaBuildDir - #define MesaBuildDir $(GLXLIBSRC)/mesa/main/ - #endif diff --git a/debian/patches/series b/debian/patches/series index 5e2e29e68..1b731170f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -054_nx-X11_ppc64-ftbfs.full.patch 055_nx-X11_imake-Werror-format-security.full.patch 056_nx-X11_Werror-format-security.full.patch 057_nx-X11_sanitize-eventmasks.full.patch diff --git a/nx-X11/lib/GL/mesa/main/Imakefile.inc b/nx-X11/lib/GL/mesa/main/Imakefile.inc index 5deaf1038..80b3aef07 100644 --- a/nx-X11/lib/GL/mesa/main/Imakefile.inc +++ b/nx-X11/lib/GL/mesa/main/Imakefile.inc @@ -1,5 +1,8 @@ XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile.inc,v 1.7tsi Exp $ +/* gcc on ppc64 defines this, causes macro recursion with pixel below */ +#undef pixel + #ifndef MesaBuildDir #define MesaBuildDir $(GLXLIBSRC)/mesa/main/ #endif -- cgit v1.2.3 From 95dbaa6149b496a6851fc6422f54dd8393217269 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Feb 2015 15:51:26 +0100 Subject: Fix FTBFS when compiled with -Werror=format-security (055_nx-X11_imake-Werror-format-security.full.patch). --- ..._nx-X11_imake-Werror-format-security.full.patch | 1090 -------------------- debian/patches/series | 1 - nx-X11/config/imake/imake.c | 429 ++++---- 3 files changed, 208 insertions(+), 1312 deletions(-) delete mode 100644 debian/patches/055_nx-X11_imake-Werror-format-security.full.patch (limited to 'debian') diff --git a/debian/patches/055_nx-X11_imake-Werror-format-security.full.patch b/debian/patches/055_nx-X11_imake-Werror-format-security.full.patch deleted file mode 100644 index 6e5b4c80e..000000000 --- a/debian/patches/055_nx-X11_imake-Werror-format-security.full.patch +++ /dev/null @@ -1,1090 +0,0 @@ -Description: Fix FTBFS when compiled with -Werror=format-security -Author: Orion Poplawski -diff -up a/nx-X11/config/imake/imake.c b/nx-X11/config/imake/imake.c ---- a/nx-X11/config/imake/imake.c 2014-01-04 13:39:35.000000000 -0700 -+++ b/nx-X11/config/imake/imake.c 2014-01-24 13:55:53.940697330 -0700 -@@ -7,8 +7,6 @@ - * be passed to the template file. * - * * - ***************************************************************************/ --/* $XFree86: xc/config/imake/imake.c,v 3.63tsi Exp $ */ -- - /* - * - Copyright (c) 1985, 1986, 1987, 1998 The Open Group -@@ -153,23 +151,14 @@ in this Software without prior written a - #endif - #include - #include --#ifdef MONOLITH --# include "Xosdefs.h" --#else --# include --#endif -+#include -+#include -+#include - #include - #include - #ifdef WIN32 - # include "Xw32defs.h" - #endif --#if 0 --#ifndef X_NOT_POSIX --# ifndef _POSIX_SOURCE --# define _POSIX_SOURCE --# endif --#endif --#endif - #include - #include - #ifdef X_NOT_POSIX -@@ -231,22 +220,16 @@ typedef union wait waitType; - # define WIFEXITED(w) waitCode(w) - # endif - #endif /* X_NOT_POSIX */ --# include --#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ --char *malloc(), *realloc(); --#endif /* macII */ -+#include - #include - #ifdef __minix_vmd --#define USE_FREOPEN 1 -+# define USE_FREOPEN 1 - #endif - --#if !((defined(sun) && !defined(SVR4)) || defined(macII)) --#define USE_STRERROR 1 --#endif - #ifndef WIN32 --#include -+# include - #else --#include -+# include - #endif - #ifndef SYS_NMLN - # ifdef _SYS_NMLN -@@ -256,39 +239,22 @@ char *malloc(), *realloc(); - # endif - #endif - #if defined(linux) || defined(__GNU__) || defined(__GLIBC__) --#include --#include -+# include -+# include - #endif - #ifdef __QNX__ --#include --#endif -- --/* -- * This define of strerror is copied from (and should be identical to) -- * Xos.h, which we don't want to include here for bootstrapping reasons. -- */ --#ifndef USE_STRERROR --# ifndef strerror --extern char *sys_errlist[]; --extern int sys_nerr; --# define strerror(n) \ -- (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") --# endif -+# include - #endif - - #if defined(__NetBSD__) /* see code clock in init() below */ --#include --#endif -- --#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !defined (__CYGWIN__) --#define HAS_MKSTEMP -+# include - #endif - - typedef unsigned char boolean; - #define TRUE 1 - #define FALSE 0 - --# include "imakemdep.h" -+#include "imakemdep.h" - #ifdef CROSSCOMPILE - # include "imakemdep_cpp.h" - #endif -@@ -305,7 +271,7 @@ int xvariables[10]; - #endif - - #ifndef PATH_MAX --#define PATH_MAX 1024 -+# define PATH_MAX 1024 - #endif - - /* -@@ -331,11 +297,13 @@ void KludgeOutputLine(char **), KludgeRe - # endif - #endif - --char *cpp = NULL; -+const char *cpp = NULL; - --char *tmpMakefile = "/tmp/Imf.XXXXXX"; --char *tmpImakefile = "/tmp/IIf.XXXXXX"; --char *make_argv[ ARGUMENTS ] = { -+const char *tmpMakefile; -+const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX"; -+const char *tmpImakefile; -+const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX"; -+const char *make_argv[ ARGUMENTS ] = { - #ifdef WIN32 - "nmake" - #else -@@ -345,53 +313,53 @@ char *make_argv[ ARGUMENTS ] = { - - int make_argindex; - int cpp_argindex; --char *Imakefile = NULL; --char *Makefile = "Makefile"; --char *Template = "Imake.tmpl"; --char *ImakefileC = "Imakefile.c"; -+const char *Imakefile = NULL; -+const char *Makefile = "Makefile"; -+const char *Template = "Imake.tmpl"; -+const char *ImakefileC = "Imakefile.c"; - boolean haveImakefileC = FALSE; --char *cleanedImakefile = NULL; --char *program; --char *FindImakefile(char *Imakefile); --char *ReadLine(FILE *tmpfd, char *tmpfname); --char *CleanCppInput(char *imakefile); --char *Strdup(char *cp); -+const char *cleanedImakefile = NULL; -+const char *program; -+const char *FindImakefile(const char *Imakefile); -+char *ReadLine(FILE *tmpfd, const char *tmpfname); -+const char *CleanCppInput(const char *imakefile); -+char *Strdup(const char *cp); - char *Emalloc(int size); --void LogFatalI(char *s, int i), LogFatal(char *x0, char *x1), -- LogMsg(char *x0, char *x1); -+void LogFatal(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2); -+void LogMsg(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2); - - void showit(FILE *fd); - void wrapup(void); - void init(void); --void AddMakeArg(char *arg); --void AddCppArg(char *arg); -+void AddMakeArg(const char *arg); -+void AddCppArg(const char *arg); - #ifdef CROSSCOMPILE - char *CrossCompileCPP(void); - #endif - void SetOpts(int argc, char **argv); --void CheckImakefileC(char *masterc); --void cppit(char *imakefile, char *template, char *masterc, -- FILE *outfd, char *outfname); -+void CheckImakefileC(const char *masterc); -+void cppit(const char *imakefile, const char *template, const char *masterc, -+ FILE *outfd, const char *outfname); - void makeit(void); --void CleanCppOutput(FILE *tmpfd, char *tmpfname); -+void CleanCppOutput(FILE *tmpfd, const char *tmpfname); - boolean isempty(char *line); --void writetmpfile(FILE *fd, char *buf, int cnt, char *fname); -+void writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname); - #ifdef SIGNALRETURNSINT - int catch(int sig); - #else - void catch(int sig); - #endif --void showargs(char **argv); --boolean optional_include(FILE *inFile, char *defsym, char *fname); --void doit(FILE *outfd, char *cmd, char **argv); -+void showargs(const char **argv); -+boolean optional_include(FILE *inFile, const char *defsym, const char *fname); -+void doit(FILE *outfd, const char *cmd, const char **argv); - boolean define_os_defaults(FILE *inFile); - #ifdef CROSSCOMPILE - static void get_cross_compile_dir(FILE *inFile); - #endif - #ifdef CROSSCOMPILEDIR --char *CrossCompileDir = CROSSCOMPILEDIR; -+const char *CrossCompileDir = CROSSCOMPILEDIR; - #else --char *CrossCompileDir = ""; -+const char *CrossCompileDir = ""; - #endif - boolean CrossCompiling = FALSE; - -@@ -428,24 +396,25 @@ main(int argc, char *argv[]) - if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL) - LogFatal("Cannot create temporary file %s.", tmpMakefile); - } else { --#ifdef HAS_MKSTEMP -+#ifdef HAVE_MKSTEMP - int fd; - #endif -- tmpMakefile = Strdup(tmpMakefile); --#ifndef HAS_MKSTEMP -- if (mktemp(tmpMakefile) == NULL || -- (tmpfd = fopen(tmpMakefile, "w+")) == NULL) { -- LogFatal("Cannot create temporary file %s.", tmpMakefile); -+ char *tmpMakefileName = Strdup(tmpMakefileTemplate); -+#ifndef HAVE_MKSTEMP -+ if (mktemp(tmpMakefileName) == NULL || -+ (tmpfd = fopen(tmpMakefileName, "w+")) == NULL) { -+ LogFatal("Cannot create temporary file %s.", tmpMakefileName); - } - #else -- fd = mkstemp(tmpMakefile); -+ fd = mkstemp(tmpMakefileName); - if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) { - if (fd != -1) { -- unlink(tmpMakefile); close(fd); -+ unlink(tmpMakefileName); close(fd); - } -- LogFatal("Cannot create temporary file %s.", tmpMakefile); -+ LogFatal("Cannot create temporary file %s.", tmpMakefileName); - } - #endif -+ tmpMakefile = tmpMakefileName; - } - AddMakeArg("-f"); - AddMakeArg( tmpMakefile ); -@@ -498,7 +467,7 @@ void - catch(int sig) - { - errno = 0; -- LogFatalI("Signal %d.", sig); -+ LogFatal("Signal %d.", sig); - } - - /* -@@ -572,21 +541,21 @@ init(void) - } - - void --AddMakeArg(char *arg) -+AddMakeArg(const char *arg) - { - errno = 0; - if (make_argindex >= ARGUMENTS-1) -- LogFatal("Out of internal storage.", ""); -+ LogFatal("Out of internal storage."); - make_argv[ make_argindex++ ] = arg; - make_argv[ make_argindex ] = NULL; - } - - void --AddCppArg(char *arg) -+AddCppArg(const char *arg) - { - errno = 0; - if (cpp_argindex >= ARGUMENTS-1) -- LogFatal("Out of internal storage.", ""); -+ LogFatal("Out of internal storage."); - cpp_argv[ cpp_argindex++ ] = arg; - cpp_argv[ cpp_argindex ] = NULL; - } -@@ -618,7 +587,7 @@ SetOpts(int argc, char **argv) - else { - argc--, argv++; - if (! argc) -- LogFatal("No description arg after -f flag", ""); -+ LogFatal("No description arg after -f flag"); - Imakefile = argv[0]; - } - } else if (argv[0][1] == 's') { -@@ -628,7 +597,7 @@ SetOpts(int argc, char **argv) - else { - argc--, argv++; - if (!argc) -- LogFatal("No description arg after -s flag", ""); -+ LogFatal("No description arg after -s flag"); - Makefile = ((argv[0][0] == '-') && !argv[0][1]) ? - NULL : argv[0]; - } -@@ -642,7 +611,7 @@ SetOpts(int argc, char **argv) - else { - argc--, argv++; - if (! argc) -- LogFatal("No description arg after -T flag", ""); -+ LogFatal("No description arg after -T flag"); - Template = argv[0]; - } - } else if (argv[0][1] == 'C') { -@@ -651,7 +620,7 @@ SetOpts(int argc, char **argv) - else { - argc--, argv++; - if (! argc) -- LogFatal("No imakeCfile arg after -C flag", ""); -+ LogFatal("No imakeCfile arg after -C flag"); - ImakefileC = argv[0]; - } - } else if (argv[0][1] == 'v') { -@@ -667,10 +636,10 @@ SetOpts(int argc, char **argv) - if (!cpp) - { - AddCppArg("-E"); --#ifdef __GNUC__ -+# ifdef __GNUC__ - if (verbose) - AddCppArg("-v"); --#endif -+# endif - cpp = DEFAULT_CC; - } - # else -@@ -686,8 +655,8 @@ SetOpts(int argc, char **argv) - AddCppArg(ImakefileC); - } - --char * --FindImakefile(char *Imakefile) -+const char * -+FindImakefile(const char *Imakefile) - { - if (Imakefile) { - if (access(Imakefile, R_OK) < 0) -@@ -695,7 +664,7 @@ FindImakefile(char *Imakefile) - } else { - if (access("Imakefile", R_OK) < 0) { - if (access("imakefile", R_OK) < 0) -- LogFatal("No description file.", ""); -+ LogFatal("No description file."); - else - Imakefile = "imakefile"; - } else -@@ -704,44 +673,50 @@ FindImakefile(char *Imakefile) - return(Imakefile); - } - --void --LogFatalI(char *s, int i) -+static void _X_ATTRIBUTE_PRINTF(1, 0) -+vLogMsg(const char *fmt, va_list args) - { -- /*NOSTRICT*/ -- LogFatal(s, (char *)(long)i); -+ int error_number = errno; -+ -+ if (error_number) { -+ fprintf(stderr, "%s: ", program); -+ fprintf(stderr, "%s\n", strerror(error_number)); -+ } -+ fprintf(stderr, "%s: ", program); -+ vfprintf(stderr, fmt, args); -+ fprintf(stderr, "\n"); - } - - void --LogFatal(char *x0, char *x1) -+LogFatal(const char *fmt, ...) - { - static boolean entered = FALSE; -+ va_list args; - - if (entered) - return; - entered = TRUE; - -- LogMsg(x0, x1); -+ va_start(args, fmt); -+ vLogMsg(fmt, args); -+ va_end(args); - fprintf(stderr, " Stop.\n"); - wrapup(); - exit(1); - } - - void --LogMsg(char *x0, char *x1) -+LogMsg(const char *fmt, ...) - { -- int error_number = errno; -+ va_list args; - -- if (error_number) { -- fprintf(stderr, "%s: ", program); -- fprintf(stderr, "%s\n", strerror(error_number)); -- } -- fprintf(stderr, "%s: ", program); -- fprintf(stderr, x0, x1); -- fprintf(stderr, "\n"); -+ va_start(args, fmt); -+ vLogMsg(fmt, args); -+ va_end(args); - } - - void --showargs(char **argv) -+showargs(const char **argv) - { - for (; *argv; argv++) - fprintf(stderr, "%s ", *argv); -@@ -751,7 +726,7 @@ showargs(char **argv) - #define ImakefileCHeader "/* imake - temporary file */" - - void --CheckImakefileC(char *masterc) -+CheckImakefileC(const char *masterc) - { - char mkcbuf[1024]; - FILE *inFile; -@@ -767,7 +742,8 @@ CheckImakefileC(char *masterc) - fclose(inFile); - LogFatal("Refuse to overwrite: %s", masterc); - } -- fclose(inFile); -+ else -+ fclose(inFile); - } - } - -@@ -778,7 +754,7 @@ CheckImakefileC(char *masterc) - #define OverrideWarning "Warning: local file \"%s\" overrides global macros." - - boolean --optional_include(FILE *inFile, char *defsym, char *fname) -+optional_include(FILE *inFile, const char *defsym, const char *fname) - { - errno = 0; - if (access(fname, R_OK) == 0) { -@@ -790,7 +766,7 @@ optional_include(FILE *inFile, char *def - } - - void --doit(FILE *outfd, char *cmd, char **argv) -+doit(FILE *outfd, const char *cmd, const char **argv) - { - int pid; - waitType status; -@@ -805,18 +781,18 @@ doit(FILE *outfd, char *cmd, char **argv - if (status < 0) - LogFatal("Cannot spawn %s.", cmd); - if (status > 0) -- LogFatalI("Exit code %d.", status); -+ LogFatal("Exit code %d.", status); - #else - pid = fork(); - if (pid < 0) -- LogFatal("Cannot fork.", ""); -+ LogFatal("Cannot fork."); - if (pid) { /* parent... simply wait */ - while (wait(&status) > 0) { - errno = 0; - if (WIFSIGNALED(status)) -- LogFatalI("Signal %d.", waitSig(status)); -+ LogFatal("Signal %d.", waitSig(status)); - if (WIFEXITED(status) && waitCode(status)) -- LogFatalI("Exit code %d.", waitCode(status)); -+ LogFatal("Exit code %d.", waitCode(status)); - } - } - else { /* child... dup and exec cmd */ -@@ -832,7 +808,7 @@ doit(FILE *outfd, char *cmd, char **argv - - #if !defined WIN32 - static void --parse_utsname(struct utsname *name, char *fmt, char *result, char *msg) -+parse_utsname(struct utsname *name, const char *fmt, char *result, const char *msg) - { - char buf[SYS_NMLN * 5 + 1]; - char *ptr = buf; -@@ -892,7 +868,7 @@ parse_utsname(struct utsname *name, char - - /* Just in case... */ - if (strlen(buf) >= sizeof(buf)) -- LogFatal("Buffer overflow parsing uname.", ""); -+ LogFatal("Buffer overflow parsing uname."); - - /* Parse the buffer. The sscanf() return value is rarely correct. */ - *result = '\0'; -@@ -978,13 +954,23 @@ const char *libc_c= - static void - get_libc_version(FILE *inFile) - { -- char aout[] = "/tmp/imakeXXXXXX"; -+ char aout[4096], *tmpdir; - FILE *fp; - const char *format = "%s -o %s -x c -"; - char *cc; - int len; - char *command; - -+ /* If $TMPDIR is defined and has an acceptable length, -+ * use that as tmp dir, else use /tmp. That fixes -+ * problems with /tmp mounted "noexec". -+ */ -+ if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (4096-13)) -+ strcpy(aout, tmpdir); -+ else -+ strcpy(aout, "/tmp"); -+ strcat(aout, "/imakeXXXXXX"); -+ - /* Pre-create temp file safely */ - { - /* Linux + ELF has mkstemp() */ -@@ -1000,7 +986,8 @@ get_libc_version(FILE *inFile) - cc = "gcc"; - len = strlen (aout) + strlen (format) + strlen (cc); - if (len < 128) len = 128; -- command = alloca (len); -+ if((command = alloca (len)) == NULL) -+ abort(); - - if (snprintf (command , len, format, cc, aout) == len) - abort (); -@@ -1015,12 +1002,16 @@ get_libc_version(FILE *inFile) - abort (); - - while (fgets (command, len, fp)) -- fprintf (inFile, command); -+ fputs (command, inFile); - - len = pclose (fp); - remove (aout); -- if (len) -- abort (); -+ if (len) { -+ /* handwave furiously */ -+ printf("#define DefaultLinuxCLibMajorVersion 6\n"); -+ printf("#define DefaultLinuxCLibMinorVersion 12\n"); -+ printf("#define DefaultLinuxCLibTeenyVersion 0\n"); -+ } - } - #endif - -@@ -1031,14 +1022,14 @@ get_stackprotector(FILE *inFile) - FILE *fp; - char *cc; - char command[1024], buf[1024]; -- -+ - cc = getenv("CC"); - if (cc == NULL) { - cc = "cc"; - } - snprintf(command, sizeof(command), "%s -v 2>&1", cc); - fp = popen(command, "r"); -- if (fp == NULL) -+ if (fp == NULL) - abort(); - while (fgets(buf, sizeof(buf), fp)) { - if (strstr(buf, "propolice") != NULL) { -@@ -1046,11 +1037,10 @@ get_stackprotector(FILE *inFile) - break; - } - } -- if (pclose(fp)) -- abort(); -+ pclose(fp); - } - #endif -- -+ - - #if defined CROSSCOMPILE || defined linux || defined(__GLIBC__) - static void -@@ -1058,9 +1048,9 @@ get_distrib(FILE *inFile) - { - struct stat sb; - -- static char* suse = "/etc/SuSE-release"; -- static char* redhat = "/etc/redhat-release"; -- static char* debian = "/etc/debian_version"; -+ static const char* suse = "/etc/SuSE-release"; -+ static const char* redhat = "/etc/redhat-release"; -+ static const char* debian = "/etc/debian_version"; - - fprintf (inFile, "%s\n", "#define LinuxUnknown 0"); - fprintf (inFile, "%s\n", "#define LinuxSuSE 1"); -@@ -1076,14 +1066,14 @@ get_distrib(FILE *inFile) - fprintf (inFile, "%s\n", "#define LinuxWare 11"); - fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12"); - --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (CrossCompiling) { - fprintf (inFile, "%s\n", - "#define DefaultLinuxDistribution LinuxUnknown"); - fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Unknown"); - return; - } --#endif -+# endif - if (lstat (suse, &sb) == 0) { - fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxSuSE"); - fprintf (inFile, "%s\n", "#define DefaultLinuxDistName SuSE"); -@@ -1116,7 +1106,7 @@ get_ld_version(FILE *inFile) - int ldmajor, ldminor; - const char *ld = "ld -v"; - --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (CrossCompiling) { - char cmd[PATH_MAX]; - strcpy (cmd, CrossCompileDir); -@@ -1124,7 +1114,7 @@ get_ld_version(FILE *inFile) - strcat (cmd,ld); - ldprog = popen (cmd, "r"); - } else --#endif -+# endif - ldprog = popen (ld, "r"); - - if (ldprog) { -@@ -1192,7 +1182,7 @@ get_binary_format(FILE *inFile) - * Returns: 0 if successful, -1 if not. - */ - static int --ask_sun_compiler_for_versions(const char *cmd, const char *path, -+ask_sun_compiler_for_versions(const char *cmd, const char *path, - int *cmajor, int *cminor) - { - char buf[BUFSIZ]; -@@ -1201,7 +1191,7 @@ ask_sun_compiler_for_versions(const char - FILE* ccproc; - const char vflag[] = " -V 2>&1"; - int retval = -1; -- -+ - int len = strlen(cmd) + sizeof(vflag); - - if (path != NULL) { -@@ -1229,7 +1219,7 @@ ask_sun_compiler_for_versions(const char - } - } - if (retval != 0) { -- fprintf(stderr, -+ fprintf(stderr, - "warning: could not parse version number in output of:\n" - " %s\n", cmdtorun); - } -@@ -1247,23 +1237,22 @@ get_sun_compiler_versions (FILE *inFile) - { - const char* sunpro_path = "/opt/SUNWspro/bin"; - int cmajor, cminor, found = 0; -- struct stat sb; - - /* If cross-compiling, only check CrossCompilerDir for compilers. -- * If not cross-compiling, first check cc in users $PATH, -+ * If not cross-compiling, first check cc in users $PATH, - * then try /opt/SUNWspro if not found in the users $PATH - */ - --#if defined CROSSCOMPILE -+# if defined CROSSCOMPILE - if (CrossCompiling) { - if (ask_sun_compiler_for_versions("cc", CrossCompileDir, - &cmajor, &cminor) == 0) { - found = 1; - } -- } -+ } - else --#endif -- { -+# endif -+ { - if (ask_sun_compiler_for_versions("cc", NULL, &cmajor, &cminor) == 0) { - found = 1; - } else if (ask_sun_compiler_for_versions("cc", sunpro_path, -@@ -1282,22 +1271,22 @@ get_sun_compiler_versions (FILE *inFile) - - /* Now do it again for C++ compiler (CC) */ - found = 0; --#if defined CROSSCOMPILE -+# if defined CROSSCOMPILE - if (CrossCompiling) { - if (ask_sun_compiler_for_versions("CC", CrossCompileDir, - &cmajor, &cminor) == 0) { - found = 1; - } -- } -+ } - else --#endif -- { -+# endif -+ { - if (ask_sun_compiler_for_versions("CC", NULL, &cmajor, &cminor) == 0) { - found = 1; - } else if (ask_sun_compiler_for_versions("CC", sunpro_path, - &cmajor, &cminor) == 0) { - found = 1; -- fprintf(inFile, -+ fprintf(inFile, - "#define DefaultSunProCplusplusCompilerDir %s", sunpro_path); - } - } -@@ -1318,7 +1307,7 @@ static void - get_gcc_version(FILE *inFile, char *name) - { - fprintf (inFile, "#define HasGcc 1\n"); --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (CrossCompiling) - { - if (gnu_c > 1) { -@@ -1329,20 +1318,20 @@ get_gcc_version(FILE *inFile, char *name - fprintf (inFile, "#define GccMajorVersion %d\n", gnu_c); - fprintf (inFile, "#define GccMinorVersion %d\n", gnu_c_minor); - } else --#endif -+# endif - { --#if __GNUC__ > 1 -+# if __GNUC__ > 1 - fprintf (inFile, "#define HasGcc2 1\n"); --# if __GNUC__ > 2 -+# if __GNUC__ > 2 - fprintf (inFile, "#define HasGcc3 1\n"); -+# endif - # endif --#endif - fprintf (inFile, "#define GccMajorVersion %d\n", __GNUC__); - fprintf (inFile, "#define GccMinorVersion %d\n", __GNUC_MINOR__); - } --#if defined(HAS_MERGE_CONSTANTS) -+# if defined(HAS_MERGE_CONSTANTS) - fprintf (inFile, "#define HasGccMergeConstants %d\n", HAS_MERGE_CONSTANTS); --#endif -+# endif - } - #endif - -@@ -1350,8 +1339,8 @@ static boolean - get_gcc(char *cmd) - { - struct stat sb; -- static char* gcc_path[] = { --# if defined(linux) || \ -+ static const char* gcc_path[] = { -+#if defined(linux) || \ - defined(__NetBSD__) || \ - defined(__OpenBSD__) || \ - defined(__FreeBSD__) || \ -@@ -1362,14 +1351,14 @@ get_gcc(char *cmd) - defined(__GNU__) || \ - defined(__GLIBC__) - "/usr/bin/cc", /* for Linux PostIncDir */ --# endif -+#endif - "/usr/local/bin/gcc", - "/opt/gnu/bin/gcc", - "/usr/pkg/bin/gcc" - }; - - #ifdef CROSSCOMPILE -- static char* cross_cc_name[] = { -+ static const char* cross_cc_name[] = { - "cc", - "gcc" - }; -@@ -1399,7 +1388,7 @@ get_gcc(char *cmd) - return FALSE; - } - --#if defined CROSSCOMPILE || !defined __UNIXOS2__ -+#ifdef CROSSCOMPILE - static void - get_gcc_incdir(FILE *inFile, char* name) - { -@@ -1428,14 +1417,14 @@ get_gcc_incdir(FILE *inFile, char* name) - boolean - define_os_defaults(FILE *inFile) - { --#if defined CROSSCOMPILE || ( !defined(WIN32) && !defined(__UNIXOS2__) ) --#ifdef CROSSCOMPILE --#ifdef __GNUC__ -+#if defined CROSSCOMPILE || !defined(WIN32) -+# ifdef CROSSCOMPILE -+# ifdef __GNUC__ - if (1) --#else -+# else - if ((sys != win32) && (sys != emx)) --#endif --#endif -+# endif -+# endif - { - # if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \ - defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) -@@ -1444,16 +1433,16 @@ define_os_defaults(FILE *inFile) - char buf[SYS_NMLN * 5 + 1]; - - /* Obtain the system information. */ --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (!CrossCompiling) --#endif -+# endif - { - if (uname(&uts_name) < 0) -- LogFatal("Cannot invoke uname", ""); -+ LogFatal("Cannot invoke uname"); - else - name = &uts_name; - } --#if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__)) -+# if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__)) - else { - strncpy(uts_name.sysname,cross_uts_sysname,SYS_NMLN); - strncpy(uts_name.release,cross_uts_release,SYS_NMLN); -@@ -1461,14 +1450,14 @@ define_os_defaults(FILE *inFile) - strncpy(uts_name.machine,cross_uts_machine,SYS_NMLN); - name = &uts_name; - } --#endif --# ifdef __FreeBSD__ -+# endif -+# ifdef __FreeBSD__ - /* Override for compiling in chroot of other OS version, such as - * in the bento build cluster. - */ - { - char *e; -- if ((e = getenv("OSREL")) != NULL && -+ if ((e = getenv("OSREL")) != NULL && - strlen(name->sysname) + strlen(e) + 1 < SYS_NMLN) { - strcpy(name->release, e); - strcpy(name->version, name->sysname); -@@ -1476,7 +1465,7 @@ define_os_defaults(FILE *inFile) - strcat(name->version, e); - } - } --# endif -+# endif - - # if defined DEFAULT_OS_NAME - # if defined CROSSCOMPILE -@@ -1648,10 +1637,8 @@ define_os_defaults(FILE *inFile) - char name[PATH_MAX]; - if (get_gcc(name)) { - get_gcc_version (inFile,name); --# if defined CROSSCOMPILE || !defined __UNIXOS2__ --# if defined CROSSCOMPILE -+# if defined CROSSCOMPILE - if (sys != emx) --# endif - get_gcc_incdir(inFile,name); - # endif - } -@@ -1664,7 +1651,7 @@ define_os_defaults(FILE *inFile) - get_binary_format(inFile); - # endif - } --#endif /* !WIN32 && !__UNIXOS2__*/ -+#endif /* !WIN32 */ - #if defined WIN32 - # ifdef CROSSCOMPILE - else if (sys == win32 && !CrossCompiling) -@@ -1688,8 +1675,6 @@ define_os_defaults(FILE *inFile) - #endif /* WIN32 */ - #ifdef CROSSCOMPILE - else if (sys == emx) --#endif --#if defined CROSSCOMPILE || defined __UNIXOS2__ - { - fprintf(inFile, "#define DefaultOSMajorVersion 4\n"); - fprintf(inFile, "#define DefaultOSMinorVersion 0\n"); -@@ -1703,8 +1688,8 @@ define_os_defaults(FILE *inFile) - } - - void --cppit(char *imakefile, char *template, char *masterc, -- FILE *outfd, char *outfname) -+cppit(const char *imakefile, const char *template, const char *masterc, -+ FILE *outfd, const char *outfname) - { - FILE *inFile; - -@@ -1721,8 +1706,11 @@ cppit(char *imakefile, char *template, c - fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 || - optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") || - optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") || -- fflush(inFile) || -- fclose(inFile)) -+ fflush(inFile)) { -+ fclose(inFile); -+ LogFatal("Cannot write to %s.", masterc); -+ } -+ else if (fclose(inFile)) - LogFatal("Cannot write to %s.", masterc); - /* - * Fork and exec cpp -@@ -1737,8 +1725,8 @@ makeit(void) - doit(NULL, make_argv[0], make_argv); - } - --char * --CleanCppInput(char *imakefile) -+const char * -+CleanCppInput(const char *imakefile) - { - FILE *outFile = NULL; - FILE *inFile; -@@ -1792,28 +1780,29 @@ CleanCppInput(char *imakefile) - strcmp(ptoken, "pragma") && - strcmp(ptoken, "undef")) { - if (outFile == NULL) { --#ifdef HAS_MKSTEMP -+#ifdef HAVE_MKSTEMP - int fd; - #endif -- tmpImakefile = Strdup(tmpImakefile); --#ifndef HAS_MKSTEMP -- if (mktemp(tmpImakefile) == NULL || -- (outFile = fopen(tmpImakefile, "w+")) == NULL) { -+ char *tmpImakefileName = Strdup(tmpImakefileTemplate); -+#ifndef HAVE_MKSTEMP -+ if (mktemp(tmpImakefileName) == NULL || -+ (outFile = fopen(tmpImakefileName, "w+")) == NULL) { - LogFatal("Cannot open %s for write.", -- tmpImakefile); -+ tmpImakefileName); - } - #else -- fd=mkstemp(tmpImakefile); -+ fd=mkstemp(tmpImakefileName); - if (fd != -1) - outFile = fdopen(fd, "w"); - if (outFile == NULL) { - if (fd != -1) { -- unlink(tmpImakefile); close(fd); -+ unlink(tmpImakefileName); close(fd); - } - LogFatal("Cannot open %s for write.", -- tmpImakefile); -+ tmpImakefileName); - } - #endif -+ tmpImakefile = tmpImakefileName; - } - writetmpfile(outFile, punwritten, pbuf-punwritten, - tmpImakefile); -@@ -1838,7 +1827,7 @@ CleanCppInput(char *imakefile) - } - - void --CleanCppOutput(FILE *tmpfd, char *tmpfname) -+CleanCppOutput(FILE *tmpfd, const char *tmpfname) - { - char *input; - int blankline = 0; -@@ -1960,7 +1949,7 @@ isempty(char *line) - - /*ARGSUSED*/ - char * --ReadLine(FILE *tmpfd, char *tmpfname) -+ReadLine(FILE *tmpfd, const char *tmpfname) - { - static boolean initialized = FALSE; - static char *buf, *pline, *end; -@@ -1988,10 +1977,10 @@ ReadLine(FILE *tmpfd, char *tmpfname) - fseek(tmpfd, 0, 0); - #if defined(SYSV) || defined(WIN32) || defined(USE_FREOPEN) - tmpfd = freopen(tmpfname, "w+", tmpfd); --#ifdef WIN32 -+# ifdef WIN32 - if (! tmpfd) /* if failed try again */ - tmpfd = freopen(tmpfname, "w+", fp); --#endif -+# endif - if (! tmpfd) - LogFatal("cannot reopen %s\n", tmpfname); - #else /* !SYSV */ -@@ -1999,8 +1988,6 @@ ReadLine(FILE *tmpfd, char *tmpfname) - #endif /* !SYSV */ - initialized = TRUE; - fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n"); -- fprintf (tmpfd, "# %s\n", -- "$Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $"); - } - - for (p1 = pline; p1 < end; p1++) { -@@ -2036,7 +2023,7 @@ ReadLine(FILE *tmpfd, char *tmpfname) - } - - void --writetmpfile(FILE *fd, char *buf, int cnt, char *fname) -+writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname) - { - if (fwrite(buf, sizeof(char), cnt, fd) == -1) - LogFatal("Cannot write to %s.", fname); -@@ -2048,7 +2035,7 @@ Emalloc(int size) - char *p; - - if ((p = malloc(size)) == NULL) -- LogFatalI("Cannot allocate %d bytes", size); -+ LogFatal("Cannot allocate %d bytes", size); - return(p); - } - -@@ -2066,10 +2053,10 @@ KludgeOutputLine(char **pline) - break; - case ' ': /*May need a tab*/ - default: --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (inline_syntax) --#endif --#if defined CROSSCOMPILE || defined INLINE_SYNTAX -+# endif -+# if defined CROSSCOMPILE || defined INLINE_SYNTAX - { - if (*p == '<' && p[1] == '<') { /* inline file close */ - InInline--; -@@ -2077,7 +2064,7 @@ KludgeOutputLine(char **pline) - break; - } - } --#endif -+# endif - /* - * The following cases should not be treated as beginning of - * rules: -@@ -2116,26 +2103,26 @@ KludgeOutputLine(char **pline) - quotechar = ']'; - break; - case '=': --#ifdef CROSSCOMPILE -+# ifdef CROSSCOMPILE - if (remove_cpp_leadspace) --#endif --#if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE -+# endif -+# if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE - { - if (!InRule && **pline == ' ') { - while (**pline == ' ') - (*pline)++; - } - } --#endif -+# endif - goto breakfor; --#if defined CROSSCOMPILE || defined INLINE_SYNTAX -+# if defined CROSSCOMPILE || defined INLINE_SYNTAX - case '<': - if (inline_syntax) { - if (p[1] == '<') /* inline file start */ - InInline++; - } - break; --#endif -+# endif - case ':': - if (p[1] == '=') - goto breakfor; -@@ -2159,7 +2146,7 @@ KludgeResetRule(void) - } - #endif - char * --Strdup(char *cp) -+Strdup(const char *cp) - { - char *new = Emalloc(strlen(cp) + 1); - diff --git a/debian/patches/series b/debian/patches/series index 1b731170f..afae768fa 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -055_nx-X11_imake-Werror-format-security.full.patch 056_nx-X11_Werror-format-security.full.patch 057_nx-X11_sanitize-eventmasks.full.patch 101_nxagent_set-rgb-path.full.patch diff --git a/nx-X11/config/imake/imake.c b/nx-X11/config/imake/imake.c index 46e03daf2..86b9ad6c1 100644 --- a/nx-X11/config/imake/imake.c +++ b/nx-X11/config/imake/imake.c @@ -7,8 +7,6 @@ * be passed to the template file. * * * ***************************************************************************/ -/* $XFree86: xc/config/imake/imake.c,v 3.63tsi Exp $ */ - /* * Copyright (c) 1985, 1986, 1987, 1998 The Open Group @@ -153,23 +151,14 @@ in this Software without prior written authorization from The Open Group. #endif #include #include -#ifdef MONOLITH -# include "Xosdefs.h" -#else -# include -#endif +#include +#include +#include #include #include #ifdef WIN32 # include "Xw32defs.h" #endif -#if 0 -#ifndef X_NOT_POSIX -# ifndef _POSIX_SOURCE -# define _POSIX_SOURCE -# endif -#endif -#endif #include #include #ifdef X_NOT_POSIX @@ -231,22 +220,16 @@ typedef union wait waitType; # define WIFEXITED(w) waitCode(w) # endif #endif /* X_NOT_POSIX */ -# include -#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ -char *malloc(), *realloc(); -#endif /* macII */ +#include #include #ifdef __minix_vmd -#define USE_FREOPEN 1 +# define USE_FREOPEN 1 #endif -#if !((defined(sun) && !defined(SVR4)) || defined(macII)) -#define USE_STRERROR 1 -#endif #ifndef WIN32 -#include +# include #else -#include +# include #endif #ifndef SYS_NMLN # ifdef _SYS_NMLN @@ -256,39 +239,22 @@ char *malloc(), *realloc(); # endif #endif #if defined(linux) || defined(__GNU__) || defined(__GLIBC__) -#include -#include +# include +# include #endif #ifdef __QNX__ -#include -#endif - -/* - * This define of strerror is copied from (and should be identical to) - * Xos.h, which we don't want to include here for bootstrapping reasons. - */ -#ifndef USE_STRERROR -# ifndef strerror -extern char *sys_errlist[]; -extern int sys_nerr; -# define strerror(n) \ - (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") -# endif +# include #endif #if defined(__NetBSD__) /* see code clock in init() below */ -#include -#endif - -#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !defined (__CYGWIN__) -#define HAS_MKSTEMP +# include #endif typedef unsigned char boolean; #define TRUE 1 #define FALSE 0 -# include "imakemdep.h" +#include "imakemdep.h" #ifdef CROSSCOMPILE # include "imakemdep_cpp.h" #endif @@ -305,7 +271,7 @@ int xvariables[10]; #endif #ifndef PATH_MAX -#define PATH_MAX 1024 +# define PATH_MAX 1024 #endif /* @@ -331,11 +297,13 @@ void KludgeOutputLine(char **), KludgeResetRule(void); # endif #endif -char *cpp = NULL; +const char *cpp = NULL; -char *tmpMakefile = "/tmp/Imf.XXXXXX"; -char *tmpImakefile = "/tmp/IIf.XXXXXX"; -char *make_argv[ ARGUMENTS ] = { +const char *tmpMakefile; +const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX"; +const char *tmpImakefile; +const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX"; +const char *make_argv[ ARGUMENTS ] = { #ifdef WIN32 "nmake" #else @@ -345,53 +313,53 @@ char *make_argv[ ARGUMENTS ] = { int make_argindex; int cpp_argindex; -char *Imakefile = NULL; -char *Makefile = "Makefile"; -char *Template = "Imake.tmpl"; -char *ImakefileC = "Imakefile.c"; +const char *Imakefile = NULL; +const char *Makefile = "Makefile"; +const char *Template = "Imake.tmpl"; +const char *ImakefileC = "Imakefile.c"; boolean haveImakefileC = FALSE; -char *cleanedImakefile = NULL; -char *program; -char *FindImakefile(char *Imakefile); -char *ReadLine(FILE *tmpfd, char *tmpfname); -char *CleanCppInput(char *imakefile); -char *Strdup(char *cp); +const char *cleanedImakefile = NULL; +const char *program; +const char *FindImakefile(const char *Imakefile); +char *ReadLine(FILE *tmpfd, const char *tmpfname); +const char *CleanCppInput(const char *imakefile); +char *Strdup(const char *cp); char *Emalloc(int size); -void LogFatalI(char *s, int i), LogFatal(char *x0, char *x1), - LogMsg(char *x0, char *x1); +void LogFatal(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2); +void LogMsg(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2); void showit(FILE *fd); void wrapup(void); void init(void); -void AddMakeArg(char *arg); -void AddCppArg(char *arg); +void AddMakeArg(const char *arg); +void AddCppArg(const char *arg); #ifdef CROSSCOMPILE char *CrossCompileCPP(void); #endif void SetOpts(int argc, char **argv); -void CheckImakefileC(char *masterc); -void cppit(char *imakefile, char *template, char *masterc, - FILE *outfd, char *outfname); +void CheckImakefileC(const char *masterc); +void cppit(const char *imakefile, const char *template, const char *masterc, + FILE *outfd, const char *outfname); void makeit(void); -void CleanCppOutput(FILE *tmpfd, char *tmpfname); +void CleanCppOutput(FILE *tmpfd, const char *tmpfname); boolean isempty(char *line); -void writetmpfile(FILE *fd, char *buf, int cnt, char *fname); +void writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname); #ifdef SIGNALRETURNSINT int catch(int sig); #else void catch(int sig); #endif -void showargs(char **argv); -boolean optional_include(FILE *inFile, char *defsym, char *fname); -void doit(FILE *outfd, char *cmd, char **argv); +void showargs(const char **argv); +boolean optional_include(FILE *inFile, const char *defsym, const char *fname); +void doit(FILE *outfd, const char *cmd, const char **argv); boolean define_os_defaults(FILE *inFile); #ifdef CROSSCOMPILE static void get_cross_compile_dir(FILE *inFile); #endif #ifdef CROSSCOMPILEDIR -char *CrossCompileDir = CROSSCOMPILEDIR; +const char *CrossCompileDir = CROSSCOMPILEDIR; #else -char *CrossCompileDir = ""; +const char *CrossCompileDir = ""; #endif boolean CrossCompiling = FALSE; @@ -428,24 +396,25 @@ main(int argc, char *argv[]) if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL) LogFatal("Cannot create temporary file %s.", tmpMakefile); } else { -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP int fd; #endif - tmpMakefile = Strdup(tmpMakefile); -#ifndef HAS_MKSTEMP - if (mktemp(tmpMakefile) == NULL || - (tmpfd = fopen(tmpMakefile, "w+")) == NULL) { - LogFatal("Cannot create temporary file %s.", tmpMakefile); + char *tmpMakefileName = Strdup(tmpMakefileTemplate); +#ifndef HAVE_MKSTEMP + if (mktemp(tmpMakefileName) == NULL || + (tmpfd = fopen(tmpMakefileName, "w+")) == NULL) { + LogFatal("Cannot create temporary file %s.", tmpMakefileName); } #else - fd = mkstemp(tmpMakefile); + fd = mkstemp(tmpMakefileName); if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) { if (fd != -1) { - unlink(tmpMakefile); close(fd); + unlink(tmpMakefileName); close(fd); } - LogFatal("Cannot create temporary file %s.", tmpMakefile); + LogFatal("Cannot create temporary file %s.", tmpMakefileName); } #endif + tmpMakefile = tmpMakefileName; } AddMakeArg("-f"); AddMakeArg( tmpMakefile ); @@ -498,7 +467,7 @@ void catch(int sig) { errno = 0; - LogFatalI("Signal %d.", sig); + LogFatal("Signal %d.", sig); } /* @@ -572,21 +541,21 @@ init(void) } void -AddMakeArg(char *arg) +AddMakeArg(const char *arg) { errno = 0; if (make_argindex >= ARGUMENTS-1) - LogFatal("Out of internal storage.", ""); + LogFatal("Out of internal storage."); make_argv[ make_argindex++ ] = arg; make_argv[ make_argindex ] = NULL; } void -AddCppArg(char *arg) +AddCppArg(const char *arg) { errno = 0; if (cpp_argindex >= ARGUMENTS-1) - LogFatal("Out of internal storage.", ""); + LogFatal("Out of internal storage."); cpp_argv[ cpp_argindex++ ] = arg; cpp_argv[ cpp_argindex ] = NULL; } @@ -618,7 +587,7 @@ SetOpts(int argc, char **argv) else { argc--, argv++; if (! argc) - LogFatal("No description arg after -f flag", ""); + LogFatal("No description arg after -f flag"); Imakefile = argv[0]; } } else if (argv[0][1] == 's') { @@ -628,7 +597,7 @@ SetOpts(int argc, char **argv) else { argc--, argv++; if (!argc) - LogFatal("No description arg after -s flag", ""); + LogFatal("No description arg after -s flag"); Makefile = ((argv[0][0] == '-') && !argv[0][1]) ? NULL : argv[0]; } @@ -642,7 +611,7 @@ SetOpts(int argc, char **argv) else { argc--, argv++; if (! argc) - LogFatal("No description arg after -T flag", ""); + LogFatal("No description arg after -T flag"); Template = argv[0]; } } else if (argv[0][1] == 'C') { @@ -651,7 +620,7 @@ SetOpts(int argc, char **argv) else { argc--, argv++; if (! argc) - LogFatal("No imakeCfile arg after -C flag", ""); + LogFatal("No imakeCfile arg after -C flag"); ImakefileC = argv[0]; } } else if (argv[0][1] == 'v') { @@ -667,10 +636,10 @@ SetOpts(int argc, char **argv) if (!cpp) { AddCppArg("-E"); -#ifdef __GNUC__ +# ifdef __GNUC__ if (verbose) AddCppArg("-v"); -#endif +# endif cpp = DEFAULT_CC; } # else @@ -686,8 +655,8 @@ SetOpts(int argc, char **argv) AddCppArg(ImakefileC); } -char * -FindImakefile(char *Imakefile) +const char * +FindImakefile(const char *Imakefile) { if (Imakefile) { if (access(Imakefile, R_OK) < 0) @@ -695,7 +664,7 @@ FindImakefile(char *Imakefile) } else { if (access("Imakefile", R_OK) < 0) { if (access("imakefile", R_OK) < 0) - LogFatal("No description file.", ""); + LogFatal("No description file."); else Imakefile = "imakefile"; } else @@ -704,44 +673,50 @@ FindImakefile(char *Imakefile) return(Imakefile); } -void -LogFatalI(char *s, int i) +static void _X_ATTRIBUTE_PRINTF(1, 0) +vLogMsg(const char *fmt, va_list args) { - /*NOSTRICT*/ - LogFatal(s, (char *)(long)i); + int error_number = errno; + + if (error_number) { + fprintf(stderr, "%s: ", program); + fprintf(stderr, "%s\n", strerror(error_number)); + } + fprintf(stderr, "%s: ", program); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); } void -LogFatal(char *x0, char *x1) +LogFatal(const char *fmt, ...) { static boolean entered = FALSE; + va_list args; if (entered) return; entered = TRUE; - LogMsg(x0, x1); + va_start(args, fmt); + vLogMsg(fmt, args); + va_end(args); fprintf(stderr, " Stop.\n"); wrapup(); exit(1); } void -LogMsg(char *x0, char *x1) +LogMsg(const char *fmt, ...) { - int error_number = errno; + va_list args; - if (error_number) { - fprintf(stderr, "%s: ", program); - fprintf(stderr, "%s\n", strerror(error_number)); - } - fprintf(stderr, "%s: ", program); - fprintf(stderr, x0, x1); - fprintf(stderr, "\n"); + va_start(args, fmt); + vLogMsg(fmt, args); + va_end(args); } void -showargs(char **argv) +showargs(const char **argv) { for (; *argv; argv++) fprintf(stderr, "%s ", *argv); @@ -751,7 +726,7 @@ showargs(char **argv) #define ImakefileCHeader "/* imake - temporary file */" void -CheckImakefileC(char *masterc) +CheckImakefileC(const char *masterc) { char mkcbuf[1024]; FILE *inFile; @@ -767,7 +742,8 @@ CheckImakefileC(char *masterc) fclose(inFile); LogFatal("Refuse to overwrite: %s", masterc); } - fclose(inFile); + else + fclose(inFile); } } @@ -778,7 +754,7 @@ CheckImakefileC(char *masterc) #define OverrideWarning "Warning: local file \"%s\" overrides global macros." boolean -optional_include(FILE *inFile, char *defsym, char *fname) +optional_include(FILE *inFile, const char *defsym, const char *fname) { errno = 0; if (access(fname, R_OK) == 0) { @@ -790,7 +766,7 @@ optional_include(FILE *inFile, char *defsym, char *fname) } void -doit(FILE *outfd, char *cmd, char **argv) +doit(FILE *outfd, const char *cmd, const char **argv) { int pid; waitType status; @@ -805,18 +781,18 @@ doit(FILE *outfd, char *cmd, char **argv) if (status < 0) LogFatal("Cannot spawn %s.", cmd); if (status > 0) - LogFatalI("Exit code %d.", status); + LogFatal("Exit code %d.", status); #else pid = fork(); if (pid < 0) - LogFatal("Cannot fork.", ""); + LogFatal("Cannot fork."); if (pid) { /* parent... simply wait */ while (wait(&status) > 0) { errno = 0; if (WIFSIGNALED(status)) - LogFatalI("Signal %d.", waitSig(status)); + LogFatal("Signal %d.", waitSig(status)); if (WIFEXITED(status) && waitCode(status)) - LogFatalI("Exit code %d.", waitCode(status)); + LogFatal("Exit code %d.", waitCode(status)); } } else { /* child... dup and exec cmd */ @@ -832,7 +808,7 @@ doit(FILE *outfd, char *cmd, char **argv) #if !defined WIN32 static void -parse_utsname(struct utsname *name, char *fmt, char *result, char *msg) +parse_utsname(struct utsname *name, const char *fmt, char *result, const char *msg) { char buf[SYS_NMLN * 5 + 1]; char *ptr = buf; @@ -892,7 +868,7 @@ parse_utsname(struct utsname *name, char *fmt, char *result, char *msg) /* Just in case... */ if (strlen(buf) >= sizeof(buf)) - LogFatal("Buffer overflow parsing uname.", ""); + LogFatal("Buffer overflow parsing uname."); /* Parse the buffer. The sscanf() return value is rarely correct. */ *result = '\0'; @@ -978,13 +954,23 @@ const char *libc_c= static void get_libc_version(FILE *inFile) { - char aout[] = "/tmp/imakeXXXXXX"; + char aout[4096], *tmpdir; FILE *fp; const char *format = "%s -o %s -x c -"; char *cc; int len; char *command; + /* If $TMPDIR is defined and has an acceptable length, + * use that as tmp dir, else use /tmp. That fixes + * problems with /tmp mounted "noexec". + */ + if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (4096-13)) + strcpy(aout, tmpdir); + else + strcpy(aout, "/tmp"); + strcat(aout, "/imakeXXXXXX"); + /* Pre-create temp file safely */ { /* Linux + ELF has mkstemp() */ @@ -1000,7 +986,8 @@ get_libc_version(FILE *inFile) cc = "gcc"; len = strlen (aout) + strlen (format) + strlen (cc); if (len < 128) len = 128; - command = alloca (len); + if((command = alloca (len)) == NULL) + abort(); if (snprintf (command , len, format, cc, aout) == len) abort (); @@ -1015,12 +1002,16 @@ get_libc_version(FILE *inFile) abort (); while (fgets (command, len, fp)) - fprintf (inFile, command); + fputs (command, inFile); len = pclose (fp); remove (aout); - if (len) - abort (); + if (len) { + /* handwave furiously */ + printf("#define DefaultLinuxCLibMajorVersion 6\n"); + printf("#define DefaultLinuxCLibMinorVersion 12\n"); + printf("#define DefaultLinuxCLibTeenyVersion 0\n"); + } } #endif @@ -1031,14 +1022,14 @@ get_stackprotector(FILE *inFile) FILE *fp; char *cc; char command[1024], buf[1024]; - + cc = getenv("CC"); if (cc == NULL) { cc = "cc"; } snprintf(command, sizeof(command), "%s -v 2>&1", cc); fp = popen(command, "r"); - if (fp == NULL) + if (fp == NULL) abort(); while (fgets(buf, sizeof(buf), fp)) { if (strstr(buf, "propolice") != NULL) { @@ -1046,11 +1037,10 @@ get_stackprotector(FILE *inFile) break; } } - if (pclose(fp)) - abort(); + pclose(fp); } #endif - + #if defined CROSSCOMPILE || defined linux || defined(__GLIBC__) static void @@ -1058,9 +1048,9 @@ get_distrib(FILE *inFile) { struct stat sb; - static char* suse = "/etc/SuSE-release"; - static char* redhat = "/etc/redhat-release"; - static char* debian = "/etc/debian_version"; + static const char* suse = "/etc/SuSE-release"; + static const char* redhat = "/etc/redhat-release"; + static const char* debian = "/etc/debian_version"; fprintf (inFile, "%s\n", "#define LinuxUnknown 0"); fprintf (inFile, "%s\n", "#define LinuxSuSE 1"); @@ -1076,14 +1066,14 @@ get_distrib(FILE *inFile) fprintf (inFile, "%s\n", "#define LinuxWare 11"); fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12"); -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (CrossCompiling) { fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown"); fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Unknown"); return; } -#endif +# endif if (lstat (suse, &sb) == 0) { fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxSuSE"); fprintf (inFile, "%s\n", "#define DefaultLinuxDistName SuSE"); @@ -1116,7 +1106,7 @@ get_ld_version(FILE *inFile) int ldmajor, ldminor; const char *ld = "ld -v"; -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (CrossCompiling) { char cmd[PATH_MAX]; strcpy (cmd, CrossCompileDir); @@ -1124,7 +1114,7 @@ get_ld_version(FILE *inFile) strcat (cmd,ld); ldprog = popen (cmd, "r"); } else -#endif +# endif ldprog = popen (ld, "r"); if (ldprog) { @@ -1192,7 +1182,7 @@ get_binary_format(FILE *inFile) * Returns: 0 if successful, -1 if not. */ static int -ask_sun_compiler_for_versions(const char *cmd, const char *path, +ask_sun_compiler_for_versions(const char *cmd, const char *path, int *cmajor, int *cminor) { char buf[BUFSIZ]; @@ -1201,7 +1191,7 @@ ask_sun_compiler_for_versions(const char *cmd, const char *path, FILE* ccproc; const char vflag[] = " -V 2>&1"; int retval = -1; - + int len = strlen(cmd) + sizeof(vflag); if (path != NULL) { @@ -1229,7 +1219,7 @@ ask_sun_compiler_for_versions(const char *cmd, const char *path, } } if (retval != 0) { - fprintf(stderr, + fprintf(stderr, "warning: could not parse version number in output of:\n" " %s\n", cmdtorun); } @@ -1247,23 +1237,22 @@ get_sun_compiler_versions (FILE *inFile) { const char* sunpro_path = "/opt/SUNWspro/bin"; int cmajor, cminor, found = 0; - struct stat sb; /* If cross-compiling, only check CrossCompilerDir for compilers. - * If not cross-compiling, first check cc in users $PATH, + * If not cross-compiling, first check cc in users $PATH, * then try /opt/SUNWspro if not found in the users $PATH */ -#if defined CROSSCOMPILE +# if defined CROSSCOMPILE if (CrossCompiling) { if (ask_sun_compiler_for_versions("cc", CrossCompileDir, &cmajor, &cminor) == 0) { found = 1; } - } + } else -#endif - { +# endif + { if (ask_sun_compiler_for_versions("cc", NULL, &cmajor, &cminor) == 0) { found = 1; } else if (ask_sun_compiler_for_versions("cc", sunpro_path, @@ -1282,22 +1271,22 @@ get_sun_compiler_versions (FILE *inFile) /* Now do it again for C++ compiler (CC) */ found = 0; -#if defined CROSSCOMPILE +# if defined CROSSCOMPILE if (CrossCompiling) { if (ask_sun_compiler_for_versions("CC", CrossCompileDir, &cmajor, &cminor) == 0) { found = 1; } - } + } else -#endif - { +# endif + { if (ask_sun_compiler_for_versions("CC", NULL, &cmajor, &cminor) == 0) { found = 1; } else if (ask_sun_compiler_for_versions("CC", sunpro_path, &cmajor, &cminor) == 0) { found = 1; - fprintf(inFile, + fprintf(inFile, "#define DefaultSunProCplusplusCompilerDir %s", sunpro_path); } } @@ -1318,7 +1307,7 @@ static void get_gcc_version(FILE *inFile, char *name) { fprintf (inFile, "#define HasGcc 1\n"); -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (CrossCompiling) { if (gnu_c > 1) { @@ -1329,20 +1318,20 @@ get_gcc_version(FILE *inFile, char *name) fprintf (inFile, "#define GccMajorVersion %d\n", gnu_c); fprintf (inFile, "#define GccMinorVersion %d\n", gnu_c_minor); } else -#endif +# endif { -#if __GNUC__ > 1 +# if __GNUC__ > 1 fprintf (inFile, "#define HasGcc2 1\n"); -# if __GNUC__ > 2 +# if __GNUC__ > 2 fprintf (inFile, "#define HasGcc3 1\n"); +# endif # endif -#endif fprintf (inFile, "#define GccMajorVersion %d\n", __GNUC__); fprintf (inFile, "#define GccMinorVersion %d\n", __GNUC_MINOR__); } -#if defined(HAS_MERGE_CONSTANTS) +# if defined(HAS_MERGE_CONSTANTS) fprintf (inFile, "#define HasGccMergeConstants %d\n", HAS_MERGE_CONSTANTS); -#endif +# endif } #endif @@ -1350,8 +1339,8 @@ static boolean get_gcc(char *cmd) { struct stat sb; - static char* gcc_path[] = { -# if defined(linux) || \ + static const char* gcc_path[] = { +#if defined(linux) || \ defined(__NetBSD__) || \ defined(__OpenBSD__) || \ defined(__FreeBSD__) || \ @@ -1362,14 +1351,14 @@ get_gcc(char *cmd) defined(__GNU__) || \ defined(__GLIBC__) "/usr/bin/cc", /* for Linux PostIncDir */ -# endif +#endif "/usr/local/bin/gcc", "/opt/gnu/bin/gcc", "/usr/pkg/bin/gcc" }; #ifdef CROSSCOMPILE - static char* cross_cc_name[] = { + static const char* cross_cc_name[] = { "cc", "gcc" }; @@ -1399,7 +1388,7 @@ get_gcc(char *cmd) return FALSE; } -#if defined CROSSCOMPILE || !defined __UNIXOS2__ +#ifdef CROSSCOMPILE static void get_gcc_incdir(FILE *inFile, char* name) { @@ -1428,14 +1417,14 @@ get_gcc_incdir(FILE *inFile, char* name) boolean define_os_defaults(FILE *inFile) { -#if defined CROSSCOMPILE || ( !defined(WIN32) && !defined(__UNIXOS2__) ) -#ifdef CROSSCOMPILE -#ifdef __GNUC__ +#if defined CROSSCOMPILE || !defined(WIN32) +# ifdef CROSSCOMPILE +# ifdef __GNUC__ if (1) -#else +# else if ((sys != win32) && (sys != emx)) -#endif -#endif +# endif +# endif { # if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \ defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) @@ -1444,16 +1433,16 @@ define_os_defaults(FILE *inFile) char buf[SYS_NMLN * 5 + 1]; /* Obtain the system information. */ -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (!CrossCompiling) -#endif +# endif { if (uname(&uts_name) < 0) - LogFatal("Cannot invoke uname", ""); + LogFatal("Cannot invoke uname"); else name = &uts_name; } -#if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__)) +# if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__)) else { strncpy(uts_name.sysname,cross_uts_sysname,SYS_NMLN); strncpy(uts_name.release,cross_uts_release,SYS_NMLN); @@ -1461,14 +1450,14 @@ define_os_defaults(FILE *inFile) strncpy(uts_name.machine,cross_uts_machine,SYS_NMLN); name = &uts_name; } -#endif -# ifdef __FreeBSD__ +# endif +# ifdef __FreeBSD__ /* Override for compiling in chroot of other OS version, such as * in the bento build cluster. */ { char *e; - if ((e = getenv("OSREL")) != NULL && + if ((e = getenv("OSREL")) != NULL && strlen(name->sysname) + strlen(e) + 1 < SYS_NMLN) { strcpy(name->release, e); strcpy(name->version, name->sysname); @@ -1476,7 +1465,7 @@ define_os_defaults(FILE *inFile) strcat(name->version, e); } } -# endif +# endif # if defined DEFAULT_OS_NAME # if defined CROSSCOMPILE @@ -1648,10 +1637,8 @@ define_os_defaults(FILE *inFile) char name[PATH_MAX]; if (get_gcc(name)) { get_gcc_version (inFile,name); -# if defined CROSSCOMPILE || !defined __UNIXOS2__ -# if defined CROSSCOMPILE +# if defined CROSSCOMPILE if (sys != emx) -# endif get_gcc_incdir(inFile,name); # endif } @@ -1664,7 +1651,7 @@ define_os_defaults(FILE *inFile) get_binary_format(inFile); # endif } -#endif /* !WIN32 && !__UNIXOS2__*/ +#endif /* !WIN32 */ #if defined WIN32 # ifdef CROSSCOMPILE else if (sys == win32 && !CrossCompiling) @@ -1688,8 +1675,6 @@ define_os_defaults(FILE *inFile) #endif /* WIN32 */ #ifdef CROSSCOMPILE else if (sys == emx) -#endif -#if defined CROSSCOMPILE || defined __UNIXOS2__ { fprintf(inFile, "#define DefaultOSMajorVersion 4\n"); fprintf(inFile, "#define DefaultOSMinorVersion 0\n"); @@ -1703,8 +1688,8 @@ define_os_defaults(FILE *inFile) } void -cppit(char *imakefile, char *template, char *masterc, - FILE *outfd, char *outfname) +cppit(const char *imakefile, const char *template, const char *masterc, + FILE *outfd, const char *outfname) { FILE *inFile; @@ -1721,8 +1706,11 @@ cppit(char *imakefile, char *template, char *masterc, fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 || optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") || optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") || - fflush(inFile) || - fclose(inFile)) + fflush(inFile)) { + fclose(inFile); + LogFatal("Cannot write to %s.", masterc); + } + else if (fclose(inFile)) LogFatal("Cannot write to %s.", masterc); /* * Fork and exec cpp @@ -1737,8 +1725,8 @@ makeit(void) doit(NULL, make_argv[0], make_argv); } -char * -CleanCppInput(char *imakefile) +const char * +CleanCppInput(const char *imakefile) { FILE *outFile = NULL; FILE *inFile; @@ -1792,28 +1780,29 @@ CleanCppInput(char *imakefile) strcmp(ptoken, "pragma") && strcmp(ptoken, "undef")) { if (outFile == NULL) { -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP int fd; #endif - tmpImakefile = Strdup(tmpImakefile); -#ifndef HAS_MKSTEMP - if (mktemp(tmpImakefile) == NULL || - (outFile = fopen(tmpImakefile, "w+")) == NULL) { + char *tmpImakefileName = Strdup(tmpImakefileTemplate); +#ifndef HAVE_MKSTEMP + if (mktemp(tmpImakefileName) == NULL || + (outFile = fopen(tmpImakefileName, "w+")) == NULL) { LogFatal("Cannot open %s for write.", - tmpImakefile); + tmpImakefileName); } #else - fd=mkstemp(tmpImakefile); + fd=mkstemp(tmpImakefileName); if (fd != -1) outFile = fdopen(fd, "w"); if (outFile == NULL) { if (fd != -1) { - unlink(tmpImakefile); close(fd); + unlink(tmpImakefileName); close(fd); } LogFatal("Cannot open %s for write.", - tmpImakefile); + tmpImakefileName); } #endif + tmpImakefile = tmpImakefileName; } writetmpfile(outFile, punwritten, pbuf-punwritten, tmpImakefile); @@ -1838,7 +1827,7 @@ CleanCppInput(char *imakefile) } void -CleanCppOutput(FILE *tmpfd, char *tmpfname) +CleanCppOutput(FILE *tmpfd, const char *tmpfname) { char *input; int blankline = 0; @@ -1960,7 +1949,7 @@ isempty(char *line) /*ARGSUSED*/ char * -ReadLine(FILE *tmpfd, char *tmpfname) +ReadLine(FILE *tmpfd, const char *tmpfname) { static boolean initialized = FALSE; static char *buf, *pline, *end; @@ -1988,10 +1977,10 @@ ReadLine(FILE *tmpfd, char *tmpfname) fseek(tmpfd, 0, 0); #if defined(SYSV) || defined(WIN32) || defined(USE_FREOPEN) tmpfd = freopen(tmpfname, "w+", tmpfd); -#ifdef WIN32 +# ifdef WIN32 if (! tmpfd) /* if failed try again */ tmpfd = freopen(tmpfname, "w+", fp); -#endif +# endif if (! tmpfd) LogFatal("cannot reopen %s\n", tmpfname); #else /* !SYSV */ @@ -1999,8 +1988,6 @@ ReadLine(FILE *tmpfd, char *tmpfname) #endif /* !SYSV */ initialized = TRUE; fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n"); - fprintf (tmpfd, "# %s\n", - "$Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $"); } for (p1 = pline; p1 < end; p1++) { @@ -2036,7 +2023,7 @@ ReadLine(FILE *tmpfd, char *tmpfname) } void -writetmpfile(FILE *fd, char *buf, int cnt, char *fname) +writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname) { if (fwrite(buf, sizeof(char), cnt, fd) == -1) LogFatal("Cannot write to %s.", fname); @@ -2048,7 +2035,7 @@ Emalloc(int size) char *p; if ((p = malloc(size)) == NULL) - LogFatalI("Cannot allocate %d bytes", size); + LogFatal("Cannot allocate %d bytes", size); return(p); } @@ -2066,10 +2053,10 @@ KludgeOutputLine(char **pline) break; case ' ': /*May need a tab*/ default: -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (inline_syntax) -#endif -#if defined CROSSCOMPILE || defined INLINE_SYNTAX +# endif +# if defined CROSSCOMPILE || defined INLINE_SYNTAX { if (*p == '<' && p[1] == '<') { /* inline file close */ InInline--; @@ -2077,7 +2064,7 @@ KludgeOutputLine(char **pline) break; } } -#endif +# endif /* * The following cases should not be treated as beginning of * rules: @@ -2116,26 +2103,26 @@ KludgeOutputLine(char **pline) quotechar = ']'; break; case '=': -#ifdef CROSSCOMPILE +# ifdef CROSSCOMPILE if (remove_cpp_leadspace) -#endif -#if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE +# endif +# if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE { if (!InRule && **pline == ' ') { while (**pline == ' ') (*pline)++; } } -#endif +# endif goto breakfor; -#if defined CROSSCOMPILE || defined INLINE_SYNTAX +# if defined CROSSCOMPILE || defined INLINE_SYNTAX case '<': if (inline_syntax) { if (p[1] == '<') /* inline file start */ InInline++; } break; -#endif +# endif case ':': if (p[1] == '=') goto breakfor; @@ -2159,7 +2146,7 @@ KludgeResetRule(void) } #endif char * -Strdup(char *cp) +Strdup(const char *cp) { char *new = Emalloc(strlen(cp) + 1); -- cgit v1.2.3 From 4dac57f3db5b283eb419f1e108cc8510bad1b0af Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 9 Feb 2015 15:58:22 +0100 Subject: Fix -Werror=format-security errors (056_nx-X11_Werror-format-security.full.patch). The below patch fixes more -Werror=format-security errors. Interestingly, most of the errors only showed up on our arm builds. No idea why. --- .../056_nx-X11_Werror-format-security.full.patch | 107 --------------------- debian/patches/series | 1 - nx-X11/lib/xtrans/Xtransint.h | 8 +- nx-X11/programs/Xserver/GL/glx/glximports.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Error.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 2 +- nx-X11/programs/Xserver/os/log.c | 4 +- nx-X11/programs/nxauth/process.c | 2 +- 8 files changed, 11 insertions(+), 119 deletions(-) delete mode 100644 debian/patches/056_nx-X11_Werror-format-security.full.patch (limited to 'debian') diff --git a/debian/patches/056_nx-X11_Werror-format-security.full.patch b/debian/patches/056_nx-X11_Werror-format-security.full.patch deleted file mode 100644 index a047de774..000000000 --- a/debian/patches/056_nx-X11_Werror-format-security.full.patch +++ /dev/null @@ -1,107 +0,0 @@ -Description: Fix -Werror=format-security errors -Author: Orion Poplawski -Abstract: - The below patch fixes more -Werror=format-security errors. - Interestingly, most of the errors only showed up on our arm builds. No - idea why. ---- a/nx-X11/lib/xtrans/Xtransint.h -+++ b/nx-X11/lib/xtrans/Xtransint.h -@@ -444,7 +444,7 @@ - int hack= 0, saveerrno=errno; \ - struct timeval tp;\ - gettimeofday(&tp,0); \ -- ErrorF(__xtransname); \ -+ ErrorF("%s",__xtransname); \ - ErrorF(x+hack,a,b,c); \ - ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ - errno=saveerrno; \ -@@ -454,7 +454,7 @@ - int hack= 0, saveerrno=errno; \ - struct timeval tp;\ - gettimeofday(&tp,0); \ -- fprintf(stderr, __xtransname); fflush(stderr); \ -+ fprintf(stderr, "%s",__xtransname); fflush(stderr); \ - fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ - fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ - fflush(stderr); \ -@@ -466,14 +466,14 @@ - /* Use ErrorF() for the X server */ - #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ - int hack= 0, saveerrno=errno; \ -- ErrorF(__xtransname); \ -+ ErrorF("%s",__xtransname); \ - ErrorF(x+hack,a,b,c); \ - errno=saveerrno; \ - } else ((void)0) - #else - #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ - int hack= 0, saveerrno=errno; \ -- fprintf(stderr, __xtransname); fflush(stderr); \ -+ fprintf(stderr, "%s",__xtransname); fflush(stderr); \ - fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ - errno=saveerrno; \ - } else ((void)0) ---- a/nx-X11/programs/nxauth/process.c -+++ b/nx-X11/programs/nxauth/process.c -@@ -974,7 +974,7 @@ - char *hex; - - hex = bintohex(len, cp); -- fprintf(fp, hex); -+ fprintf(fp, "%s", hex); - free(hex); - } - ---- a/nx-X11/programs/Xserver/GL/glx/glximports.c -+++ b/nx-X11/programs/Xserver/GL/glx/glximports.c -@@ -110,12 +110,12 @@ - - void __glXImpWarning(__GLcontext *gc, char *msg) - { -- ErrorF((char *)msg); -+ ErrorF("%s",(char *)msg); - } - - void __glXImpFatal(__GLcontext *gc, char *msg) - { -- ErrorF((char *)msg); -+ ErrorF("%s",(char *)msg); - __glXAbort(); - } - ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c -@@ -232,7 +232,7 @@ - - int nxagentExitHandler(const char *message) - { -- FatalError(message); -+ FatalError("%s", message); - - return 0; - } ---- a/nx-X11/programs/Xserver/hw/nxagent/Init.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c -@@ -481,7 +481,7 @@ - - nxagentStartRedirectToClientsLog(); - -- fprintf(stderr, buffer); -+ fprintf(stderr, "%s", buffer); - - nxagentEndRedirectToClientsLog(); - } ---- a/nx-X11/programs/Xserver/os/log.c -+++ b/nx-X11/programs/Xserver/os/log.c -@@ -692,9 +692,9 @@ - return; - sprintf(err, "%s: ", str); - strcat(err, strerror(saveErrno)); -- LogWrite(-1, err); -+ LogWrite(-1, "%s", err); - } else -- LogWrite(-1, strerror(saveErrno)); -+ LogWrite(-1, "%s", strerror(saveErrno)); - } - - void diff --git a/debian/patches/series b/debian/patches/series index afae768fa..ef4671ef7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -056_nx-X11_Werror-format-security.full.patch 057_nx-X11_sanitize-eventmasks.full.patch 101_nxagent_set-rgb-path.full.patch 102_xserver-xext_set-securitypolicy-path.full.patch diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 1e63a1406..5ca0d9328 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -444,7 +444,7 @@ static int trans_mkdir ( int hack= 0, saveerrno=errno; \ struct timeval tp;\ gettimeofday(&tp,0); \ - ErrorF(__xtransname); \ + ErrorF("%s",__xtransname); \ ErrorF(x+hack,a,b,c); \ ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ errno=saveerrno; \ @@ -454,7 +454,7 @@ static int trans_mkdir ( int hack= 0, saveerrno=errno; \ struct timeval tp;\ gettimeofday(&tp,0); \ - fprintf(stderr, __xtransname); fflush(stderr); \ + fprintf(stderr, "%s",__xtransname); fflush(stderr); \ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ fflush(stderr); \ @@ -466,14 +466,14 @@ static int trans_mkdir ( /* Use ErrorF() for the X server */ #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ int hack= 0, saveerrno=errno; \ - ErrorF(__xtransname); \ + ErrorF("%s",__xtransname); \ ErrorF(x+hack,a,b,c); \ errno=saveerrno; \ } else ((void)0) #else #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ int hack= 0, saveerrno=errno; \ - fprintf(stderr, __xtransname); fflush(stderr); \ + fprintf(stderr, "%s",__xtransname); fflush(stderr); \ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ errno=saveerrno; \ } else ((void)0) diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index fae2346b9..435caca58 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -110,12 +110,12 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) void __glXImpWarning(__GLcontext *gc, char *msg) { - ErrorF((char *)msg); + ErrorF("%s",(char *)msg); } void __glXImpFatal(__GLcontext *gc, char *msg) { - ErrorF((char *)msg); + ErrorF("%s",(char *)msg); __glXAbort(); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c index 43bf85900..d9016436e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c @@ -232,7 +232,7 @@ static int nxagentPrintError(dpy, event, fp) int nxagentExitHandler(const char *message) { - FatalError(message); + FatalError("%s", message); return 0; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index a50e8a5fc..acd5d419c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -481,7 +481,7 @@ void OsVendorVErrorFFunction(const char *f, va_list args) nxagentStartRedirectToClientsLog(); - fprintf(stderr, buffer); + fprintf(stderr, "%s", buffer); nxagentEndRedirectToClientsLog(); } diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c index 04e24b8df..1b28bb141 100644 --- a/nx-X11/programs/Xserver/os/log.c +++ b/nx-X11/programs/Xserver/os/log.c @@ -692,9 +692,9 @@ Error(char *str) return; sprintf(err, "%s: ", str); strcat(err, strerror(saveErrno)); - LogWrite(-1, err); + LogWrite(-1, "%s", err); } else - LogWrite(-1, strerror(saveErrno)); + LogWrite(-1, "%s", strerror(saveErrno)); } void diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c index 57090e23e..76259d76a 100644 --- a/nx-X11/programs/nxauth/process.c +++ b/nx-X11/programs/nxauth/process.c @@ -974,7 +974,7 @@ fprintfhex(register FILE *fp, int len, char *cp) char *hex; hex = bintohex(len, cp); - fprintf(fp, hex); + fprintf(fp, "%s", hex); free(hex); } -- cgit v1.2.3 From 2d68caca72bd36b168b36b252c8035643c69e692 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 10 Feb 2015 18:41:08 +0100 Subject: Create Windows and fix drawing issues on Big Endian 64bit systems (057_nx-X11_sanitize-eventmasks.full.patch). Multiple endiannes issues were setting incorrect event masks when creating and drawing X11 windows. This time, a smaller integer has been casted to a bigger one and passed to some function actually setting its value. This meant, that garbage from stack was attached to the smaller integer value, putting unknown memory into the lower bytes of the bigger integer. Fix this by creating a big, initialized temporary variable, let the function do its magic on that one and pass the value back to the smaller variable--and cross your fingers the smaller variable can hold it without overrunning. (The last bit is a design issue we can't really fix and has been around even before this patch.) --- .../057_nx-X11_sanitize-eventmasks.full.patch | 70 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 15 ++++- 4 files changed, 16 insertions(+), 75 deletions(-) delete mode 100644 debian/patches/057_nx-X11_sanitize-eventmasks.full.patch (limited to 'debian') diff --git a/debian/patches/057_nx-X11_sanitize-eventmasks.full.patch b/debian/patches/057_nx-X11_sanitize-eventmasks.full.patch deleted file mode 100644 index 9c1171712..000000000 --- a/debian/patches/057_nx-X11_sanitize-eventmasks.full.patch +++ /dev/null @@ -1,70 +0,0 @@ -Description: Create Windows and fix drawing issues on Big Endian 64bit systems -Author: Mihai Moldovan -Abstract: - Multiple endiannes issues were setting incorrect event masks when creating and - drawing X11 windows. - . - This time, a smaller integer has been casted to a bigger one and passed to some - function actually setting its value. - . - This meant, that garbage from stack was attached to the smaller integer value, - putting unknown memory into the lower bytes of the bigger integer. - . - Fix this by creating a big, initialized temporary variable, let the function do - its magic on that one and pass the value back to the smaller variable--and - cross your fingers the smaller variable can hold it without overrunning. (The - last bit is a design issue we can't really fix and has been around even before - this patch.) - ---- a/nx-X11/programs/Xserver/hw/nxagent/Window.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c -@@ -327,7 +327,10 @@ - - if (mask & CWEventMask) - { -- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); -+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ -+ Mask tmp_mask = attributes.event_mask; -+ nxagentGetEventMask(pWin, &tmp_mask); -+ attributes.event_mask = (int)tmp_mask; - } - #ifdef WARNING - else -@@ -2891,7 +2894,10 @@ - - if (mask & CWEventMask) - { -- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); -+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ -+ Mask tmp_mask = attributes.event_mask; -+ nxagentGetEventMask(pWin, &tmp_mask); -+ attributes.event_mask = (int)tmp_mask; - } - #ifdef WARNING - else -@@ -3352,7 +3358,10 @@ - - if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) - { -- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); -+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ -+ Mask tmp_mask = attributes.event_mask; -+ nxagentGetEventMask(pWin, &tmp_mask); -+ attributes.event_mask = (int)tmp_mask; - - XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes); - } ---- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c -@@ -1665,7 +1665,10 @@ - - attributes.background_pixel = nxagentBlackPixel; - -- nxagentGetDefaultEventMask((Mask*)&attributes.event_mask); -+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ -+ Mask tmp_mask = attributes.event_mask; -+ nxagentGetDefaultEventMask(&tmp_mask); -+ attributes.event_mask = (int)tmp_mask; - - attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); - diff --git a/debian/patches/series b/debian/patches/series index ef4671ef7..fed95824d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -057_nx-X11_sanitize-eventmasks.full.patch 101_nxagent_set-rgb-path.full.patch 102_xserver-xext_set-securitypolicy-path.full.patch 103_nxagent_set-X0-config-path.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 9957a7dfd..f0ce4dacf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1665,7 +1665,10 @@ N/A attributes.background_pixel = nxagentBlackPixel; - nxagentGetDefaultEventMask((Mask*)&attributes.event_mask); + /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ + Mask tmp_mask = attributes.event_mask; + nxagentGetDefaultEventMask(&tmp_mask); + attributes.event_mask = (int)tmp_mask; attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 35a35984a..2ba37a550 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -327,7 +327,10 @@ FIXME: We need to set save under on the real display? if (mask & CWEventMask) { - nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); + /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ + Mask tmp_mask = attributes.event_mask; + nxagentGetEventMask(pWin, &tmp_mask); + attributes.event_mask = (int)tmp_mask; } #ifdef WARNING else @@ -2891,7 +2894,10 @@ FIXME: Do we need to set save unders attribute here? if (mask & CWEventMask) { - nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); + /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ + Mask tmp_mask = attributes.event_mask; + nxagentGetEventMask(pWin, &tmp_mask); + attributes.event_mask = (int)tmp_mask; } #ifdef WARNING else @@ -3352,7 +3358,10 @@ void nxagentSetTopLevelEventMask(pWin) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask); + /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ + Mask tmp_mask = attributes.event_mask; + nxagentGetEventMask(pWin, &tmp_mask); + attributes.event_mask = (int)tmp_mask; XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes); } -- cgit v1.2.3 From ceb70505c8c9796fe601b888d02cd98d62e47939 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Tue, 10 Feb 2015 18:48:39 +0100 Subject: FHS path fix for rgb file This patch is needed on Debian only, not reporting this path addition to upstream. Patch was modified by Mike Gabriel --- debian/patches/101_nxagent_set-rgb-path.full.patch | 19 ------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/os/oscolor.c | 2 +- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 debian/patches/101_nxagent_set-rgb-path.full.patch (limited to 'debian') diff --git a/debian/patches/101_nxagent_set-rgb-path.full.patch b/debian/patches/101_nxagent_set-rgb-path.full.patch deleted file mode 100644 index 9d20bee24..000000000 --- a/debian/patches/101_nxagent_set-rgb-path.full.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: FHS path fix for rgb file - This patch is needed on Debian only, not reporting this path - addition to upstream. - . - Originally contributed by Marcelo Boveto Shima . -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2012-01-12 ---- a/nx-X11/programs/Xserver/os/oscolor.c -+++ b/nx-X11/programs/Xserver/os/oscolor.c -@@ -53,7 +53,7 @@ - #include - #include - --static char* nxAltRgbPaths[] = {"/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; -+static char* nxAltRgbPaths[] = {"/etc/nxagent/rgb", "/usr/share/nx/rgb", "/usr/local/share/nx/rgb", "/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; - static char _NXRgbPath[1024]; - - #endif diff --git a/debian/patches/series b/debian/patches/series index fed95824d..ceeaa8a97 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -101_nxagent_set-rgb-path.full.patch 102_xserver-xext_set-securitypolicy-path.full.patch 103_nxagent_set-X0-config-path.full.patch 105_nxagent_export-remote-keyboard-config.full.patch diff --git a/nx-X11/programs/Xserver/os/oscolor.c b/nx-X11/programs/Xserver/os/oscolor.c index cf79857f4..d18e7b647 100644 --- a/nx-X11/programs/Xserver/os/oscolor.c +++ b/nx-X11/programs/Xserver/os/oscolor.c @@ -53,7 +53,7 @@ SOFTWARE. #include #include -static char* nxAltRgbPaths[] = {"/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; +static char* nxAltRgbPaths[] = {"/etc/nxagent/rgb", "/usr/share/nx/rgb", "/usr/local/share/nx/rgb", "/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; static char _NXRgbPath[1024]; #endif -- cgit v1.2.3 From 057999efabe7f1d857f6a94116bcafdeaa309fcf Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Tue, 10 Feb 2015 18:52:39 +0100 Subject: FHS path fix for SecurityPolicy file (102_xserver-xext_set-securitypolicy-path.full.patch). This patch is needed for Tarball installation mode of NX (redistributed) only, not reporting this path change to upstream. --- ...02_xserver-xext_set-securitypolicy-path.full.patch | 19 ------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/Xext/security.c | 2 +- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 debian/patches/102_xserver-xext_set-securitypolicy-path.full.patch (limited to 'debian') diff --git a/debian/patches/102_xserver-xext_set-securitypolicy-path.full.patch b/debian/patches/102_xserver-xext_set-securitypolicy-path.full.patch deleted file mode 100644 index 9d27a372f..000000000 --- a/debian/patches/102_xserver-xext_set-securitypolicy-path.full.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: FHS path fix for SecurityPolicy file - This patch is needed for Tarball installation mode of NX (redistributed) - only, not reporting this path change to upstream. - . - Originally contributed by Marcelo Boveto Shima . -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2012-01-12 ---- a/nx-X11/programs/Xserver/Xext/security.c -+++ b/nx-X11/programs/Xserver/Xext/security.c -@@ -86,7 +86,7 @@ - - #ifdef NXAGENT_SERVER - --#define NX_ALTERNATIVEPOLICYFILE "/usr/lib/xserver/SecurityPolicy" -+#define NX_ALTERNATIVEPOLICYFILE "/usr/local/share/nx/SecurityPolicy" - - #endif - diff --git a/debian/patches/series b/debian/patches/series index ceeaa8a97..d84cbd8b2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -102_xserver-xext_set-securitypolicy-path.full.patch 103_nxagent_set-X0-config-path.full.patch 105_nxagent_export-remote-keyboard-config.full.patch 106_nxagent_utf8-copy-clipboard.full.patch diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index 2139425b4..8e97a7e54 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -86,7 +86,7 @@ extern unsigned char LbxReqCode; #ifdef NXAGENT_SERVER -#define NX_ALTERNATIVEPOLICYFILE "/usr/lib/xserver/SecurityPolicy" +#define NX_ALTERNATIVEPOLICYFILE "/usr/local/share/nx/SecurityPolicy" #endif -- cgit v1.2.3 From c106ad8e833f05bbe181e28e8e8826115f8424cd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 18:54:29 +0100 Subject: FHS path fix for keyboard config file (103_nxagent_set-X0-config-path.full.patch). This patch is needed for Tarball installation and on Distros like Debian, not reporting this path addition to upstream. Originally contributed by FreeNX Team. --- .../103_nxagent_set-X0-config-path.full.patch | 40 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 9 ++--- 3 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 debian/patches/103_nxagent_set-X0-config-path.full.patch (limited to 'debian') diff --git a/debian/patches/103_nxagent_set-X0-config-path.full.patch b/debian/patches/103_nxagent_set-X0-config-path.full.patch deleted file mode 100644 index eb705ca81..000000000 --- a/debian/patches/103_nxagent_set-X0-config-path.full.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: FHS path fix for keyboard config file - This patch is needed for Tarball installation and on Distros like - Debian, not reporting this path addition to upstream. - . - Originally contributed by FreeNX Team. -Forwarded: not-needed -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -@@ -136,7 +136,7 @@ - #define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" - #endif - #ifndef XKB_CONFIG_FILE --#define XKB_CONFIG_FILE "X0-config.keyboard" -+#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard" - #endif - #ifndef XKB_DFLT_RULES_FILE - #define XKB_DFLT_RULES_FILE "xfree86" -@@ -985,8 +985,7 @@ - - XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); - -- nxagentXkbConfigFilePathSize = strlen(XkbBaseDirectory) + -- strlen(XKB_CONFIG_FILE) + 1; -+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE); - - nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char)); - -@@ -995,9 +994,7 @@ - FatalError("nxagentKeyboardProc: malloc failed."); - } - -- strcpy(nxagentXkbConfigFilePath, XkbBaseDirectory); -- strcat(nxagentXkbConfigFilePath, "/"); -- strcat(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); -+ strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); - - #ifdef TEST - fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n", diff --git a/debian/patches/series b/debian/patches/series index d84cbd8b2..cfe913d4b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -103_nxagent_set-X0-config-path.full.patch 105_nxagent_export-remote-keyboard-config.full.patch 106_nxagent_utf8-copy-clipboard.full.patch 107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index e3b58b6c7..6039e5c43 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -136,7 +136,7 @@ extern Status XkbGetControls( #define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" #endif #ifndef XKB_CONFIG_FILE -#define XKB_CONFIG_FILE "X0-config.keyboard" +#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard" #endif #ifndef XKB_DFLT_RULES_FILE #define XKB_DFLT_RULES_FILE "xfree86" @@ -985,8 +985,7 @@ XkbError: XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); - nxagentXkbConfigFilePathSize = strlen(XkbBaseDirectory) + - strlen(XKB_CONFIG_FILE) + 1; + nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE); nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char)); @@ -995,9 +994,7 @@ XkbError: FatalError("nxagentKeyboardProc: malloc failed."); } - strcpy(nxagentXkbConfigFilePath, XkbBaseDirectory); - strcat(nxagentXkbConfigFilePath, "/"); - strcat(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); + strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n", -- cgit v1.2.3 From c91fe980b952d4d357a291fcda89f35ea1a83993 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Tue, 10 Feb 2015 18:56:59 +0100 Subject: Export remote keyboard configuration to session directory (105_nxagent_export-remote-keyboard-config.full.patch) Let nxagent write the keyboard configuration to /keyboard and make it available within the NX session. --- ...xagent_export-remote-keyboard-config.full.patch | 96 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Error.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Error.h | 2 + nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 45 ++++++++++ 5 files changed, 48 insertions(+), 98 deletions(-) delete mode 100644 debian/patches/105_nxagent_export-remote-keyboard-config.full.patch (limited to 'debian') diff --git a/debian/patches/105_nxagent_export-remote-keyboard-config.full.patch b/debian/patches/105_nxagent_export-remote-keyboard-config.full.patch deleted file mode 100644 index 389feaf92..000000000 --- a/debian/patches/105_nxagent_export-remote-keyboard-config.full.patch +++ /dev/null @@ -1,96 +0,0 @@ -Description: Export remote keyboard configuration to session directory - Let nxagent write the keyboard configuration to /keyboard - and make it available within the NX session. - . - Originally contributed by Marcelo Boveto Shima . -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c -@@ -497,7 +497,7 @@ - return rootPath; - } - --char *nxagentGetSessionPath() -+char *nxagentGetSessionPath(void) - { - - char *rootPath; ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.h -@@ -34,4 +34,6 @@ - - void nxagentEndRedirectToClientsLog(void); - -+char *nxagentGetSessionPath(void); -+ - #endif /* __Error_H__ */ ---- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -@@ -52,6 +52,7 @@ - #include "Keyboard.h" - #include "Events.h" - #include "Options.h" -+#include "Error.h" - - #include "NXlib.h" - -@@ -72,6 +73,8 @@ - - #include "Xatom.h" - -+#include -+ - static int nxagentXkbGetNames(char **rules, char **model, char **layout, - char **variant, char **options); - -@@ -1790,6 +1793,48 @@ - } - #endif - -+ if (drulesLen != 0) -+ { -+ char *sessionpath = nxagentGetSessionPath(); -+ if (sessionpath != NULL){ -+ int keyboard_file_path_size = strlen(sessionpath) + strlen("/keyboard"); -+ char *keyboard_file_path = malloc((keyboard_file_path_size + 1) * sizeof(char)); -+ FILE *keyboard_file; -+ if ( keyboard_file_path == NULL) -+ { -+ FatalError("nxagentKeyboardProc: malloc failed."); -+ } -+ strcpy(keyboard_file_path, sessionpath); -+ strcat(keyboard_file_path, "/keyboard"); -+ if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) { -+ if ( drules != NULL ) -+ fprintf(keyboard_file, "rules=%s\n", drules); -+ if ( dmodel != NULL ) -+ fprintf(keyboard_file, "model=%s\n", dmodel); -+ if ( dlayout != NULL ) -+ fprintf(keyboard_file, "layout=%s\n", dlayout); -+ if ( dvariant != NULL ) -+ fprintf(keyboard_file, "variant=%s\n", dvariant); -+ if ( doptions != NULL ) -+ fprintf(keyboard_file, "options=%s\n", doptions); -+ fclose(keyboard_file); -+ fprintf(stderr, "keyboard file created\n"); -+ } -+ else { -+ int save_err = errno; -+ fprintf(stderr, "keyboard file not created: %s\n", strerror(save_err)); -+ } -+ free(keyboard_file_path); -+ } -+ else { -+ fprintf(stderr, "SessionPath not defined\n"); -+ } -+ } -+ else -+ { -+ fprintf(stderr, "Failed to create the keyboard file\n"); -+ } -+ - if (nxagentOption(ClientOs) == ClientOsLinux && - drules != NULL && dmodel != NULL && - (strcmp(drules, "evdev") == 0 || diff --git a/debian/patches/series b/debian/patches/series index cfe913d4b..d34201547 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -105_nxagent_export-remote-keyboard-config.full.patch 106_nxagent_utf8-copy-clipboard.full.patch 107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch 108_nxagent_wine-close-delay.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c index d9016436e..df62cf4f7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c @@ -497,7 +497,7 @@ char *nxagentGetRootPath(void) return rootPath; } -char *nxagentGetSessionPath() +char *nxagentGetSessionPath(void) { char *rootPath; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.h b/nx-X11/programs/Xserver/hw/nxagent/Error.h index e55fd71a5..51d6171da 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.h @@ -34,4 +34,6 @@ void nxagentStartRedirectToClientsLog(void); void nxagentEndRedirectToClientsLog(void); +char *nxagentGetSessionPath(void); + #endif /* __Error_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 6039e5c43..1637f0c4c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -52,6 +52,7 @@ is" without express or implied warranty. #include "Keyboard.h" #include "Events.h" #include "Options.h" +#include "Error.h" #include "NXlib.h" @@ -72,6 +73,8 @@ is" without express or implied warranty. #include "Xatom.h" +#include + static int nxagentXkbGetNames(char **rules, char **model, char **layout, char **variant, char **options); @@ -1790,6 +1793,48 @@ void nxagentKeycodeConversionSetup(void) } #endif + if (drulesLen != 0) + { + char *sessionpath = nxagentGetSessionPath(); + if (sessionpath != NULL){ + int keyboard_file_path_size = strlen(sessionpath) + strlen("/keyboard"); + char *keyboard_file_path = malloc((keyboard_file_path_size + 1) * sizeof(char)); + FILE *keyboard_file; + if ( keyboard_file_path == NULL) + { + FatalError("nxagentKeyboardProc: malloc failed."); + } + strcpy(keyboard_file_path, sessionpath); + strcat(keyboard_file_path, "/keyboard"); + if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) { + if ( drules != NULL ) + fprintf(keyboard_file, "rules=%s\n", drules); + if ( dmodel != NULL ) + fprintf(keyboard_file, "model=%s\n", dmodel); + if ( dlayout != NULL ) + fprintf(keyboard_file, "layout=%s\n", dlayout); + if ( dvariant != NULL ) + fprintf(keyboard_file, "variant=%s\n", dvariant); + if ( doptions != NULL ) + fprintf(keyboard_file, "options=%s\n", doptions); + fclose(keyboard_file); + fprintf(stderr, "keyboard file created\n"); + } + else { + int save_err = errno; + fprintf(stderr, "keyboard file not created: %s\n", strerror(save_err)); + } + free(keyboard_file_path); + } + else { + fprintf(stderr, "SessionPath not defined\n"); + } + } + else + { + fprintf(stderr, "Failed to create the keyboard file\n"); + } + if (nxagentOption(ClientOs) == ClientOsLinux && drules != NULL && dmodel != NULL && (strcmp(drules, "evdev") == 0 || -- cgit v1.2.3 From 9674c43460e69eb88fa97f6b69911d61d0f767cd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:00:06 +0100 Subject: UTF-8 Clipboard copying (106_nxagent_utf8-copy-clipboard.full.patch). Enable UTF-8 clipboard copies. Originally contributed by FreeNX Team (dimbor). --- .../106_nxagent_utf8-copy-clipboard.full.patch | 52 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 16 +++++-- 3 files changed, 12 insertions(+), 57 deletions(-) delete mode 100644 debian/patches/106_nxagent_utf8-copy-clipboard.full.patch (limited to 'debian') diff --git a/debian/patches/106_nxagent_utf8-copy-clipboard.full.patch b/debian/patches/106_nxagent_utf8-copy-clipboard.full.patch deleted file mode 100644 index 9c0a047d6..000000000 --- a/debian/patches/106_nxagent_utf8-copy-clipboard.full.patch +++ /dev/null @@ -1,52 +0,0 @@ -Description: UTF-8 Clipboard copying - Enable UTF-8 clipboard copies. - . - Originally contributed by FreeNX Team (dimbor). -Forwarded: not-yet -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c -@@ -166,7 +166,9 @@ - - if (target == XA_STRING) return True; - if (target == serverTEXT) return True; -- -+ /* by dimbor */ -+ if (target == serverUTF8_STRING) return True; -+ - return False; - } - -@@ -402,7 +404,12 @@ - lastServerProperty = X->xselectionrequest.property; - lastServerRequestor = X->xselectionrequest.requestor; - lastServerTarget = X->xselectionrequest.target; -- lastServerTime = X->xselectionrequest.time; -+ -+ /* by dimbor */ -+ if (lastServerTarget != XA_STRING) -+ lastServerTarget = serverUTF8_STRING; -+ -+ lastServerTime = X->xselectionrequest.time; - - x.u.u.type = SelectionRequest; - x.u.selectionRequest.time = GetTimeInMillis(); -@@ -424,11 +431,12 @@ - - x.u.selectionRequest.selection = CurrentSelections[i].selection; - -- /* -- * x.u.selectionRequest.target = X->xselectionrequest.target; -- */ -- -- x.u.selectionRequest.target = XA_STRING; -+ /* by dimbor (idea from zahvatov) */ -+ if (X->xselectionrequest.target != XA_STRING) -+ x.u.selectionRequest.target = clientUTF8_STRING; -+ else -+ x.u.selectionRequest.target = XA_STRING; -+ - x.u.selectionRequest.property = clientCutProperty; - - (void) TryClientEvents(lastSelectionOwner[i].client, &x, 1, diff --git a/debian/patches/series b/debian/patches/series index d34201547..c0c34264a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -106_nxagent_utf8-copy-clipboard.full.patch 107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch 108_nxagent_wine-close-delay.full.patch 110_nxagent_createpixmap-bounds-check.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 2742e147f..d17f154cd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -166,6 +166,8 @@ Bool nxagentValidServerTargets(Atom target) if (target == XA_STRING) return True; if (target == serverTEXT) return True; + /* by dimbor */ + if (target == serverUTF8_STRING) return True; return False; } @@ -402,6 +404,11 @@ FIXME: Do we need this? lastServerProperty = X->xselectionrequest.property; lastServerRequestor = X->xselectionrequest.requestor; lastServerTarget = X->xselectionrequest.target; + + /* by dimbor */ + if (lastServerTarget != XA_STRING) + lastServerTarget = serverUTF8_STRING; + lastServerTime = X->xselectionrequest.time; x.u.u.type = SelectionRequest; @@ -424,11 +431,12 @@ FIXME: Do we need this? x.u.selectionRequest.selection = CurrentSelections[i].selection; - /* - * x.u.selectionRequest.target = X->xselectionrequest.target; - */ + /* by dimbor (idea from zahvatov) */ + if (X->xselectionrequest.target != XA_STRING) + x.u.selectionRequest.target = clientUTF8_STRING; + else + x.u.selectionRequest.target = XA_STRING; - x.u.selectionRequest.target = XA_STRING; x.u.selectionRequest.property = clientCutProperty; (void) TryClientEvents(lastSelectionOwner[i].client, &x, 1, -- cgit v1.2.3 From 658d07e939261da0cb4835f03ab908e16540b57c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:04:00 +0100 Subject: Prevent sending COMPOUND_TEXT (107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch). Do not send COMPOUND_TEXT to client. Originally contributed by FreeNX Team (dimbor). --- ...board-compound-text+small-bed-sheets.full.patch | 47 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 ++-- nx-X11/programs/Xserver/hw/nxagent/Image.c | 7 ++++ 4 files changed, 11 insertions(+), 51 deletions(-) delete mode 100644 debian/patches/107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch (limited to 'debian') diff --git a/debian/patches/107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch b/debian/patches/107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch deleted file mode 100644 index 129cb707e..000000000 --- a/debian/patches/107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch +++ /dev/null @@ -1,47 +0,0 @@ -Description: Prevent sending COMPOUND_TEXT - Do not send COMPOUND_TEXT to client. - . - Originally contributed by FreeNX Team (dimbor). -Forwarded: not-yet -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c -@@ -1226,10 +1226,11 @@ - Atom xa_STRING[4]; - xEvent x; - -+ /* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */ - xa_STRING[0] = XA_STRING; -- xa_STRING[1] = clientTEXT; -- xa_STRING[2] = clientCOMPOUND_TEXT; -- xa_STRING[3] = clientUTF8_STRING; -+ xa_STRING[1] = clientUTF8_STRING; -+ xa_STRING[2] = clientTEXT; -+ xa_STRING[3] = clientCOMPOUND_TEXT; - - ChangeWindowProperty(pWin, - property, ---- a/nx-X11/programs/Xserver/hw/nxagent/Image.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c -@@ -644,6 +644,10 @@ - pDrawable -> depth != 1 && - nxagentOption(DeferLevel) >= 1) - { -+ /* -- changed by dimbor (small "bed-sheets" never need be prevented - always put) --*/ -+ if (dstHeight > 16) -+ { -+ /* -------------------------------------------------------------------------------- */ - #ifdef TEST - fprintf(stderr, "nxagentPutImage: WARNING! Prevented operation on region [%d,%d,%d,%d] " - "for drawable at [%p] with drawable pixmap.\n", pRegion -> extents.x1, -@@ -654,6 +658,9 @@ - nxagentMarkCorruptedRegion(pDrawable, pRegion); - - goto nxagentPutImageEnd; -+ /* --- changed by dimbor ---*/ -+ } -+ /* ------------------------- */ - } - - if (pDrawable -> type == DRAWABLE_WINDOW && diff --git a/debian/patches/series b/debian/patches/series index c0c34264a..7f8abfcba 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -107_nxagent_clipboard-compound-text+small-bed-sheets.full.patch 108_nxagent_wine-close-delay.full.patch 110_nxagent_createpixmap-bounds-check.full.patch 200_nxagent_check-binary-x2go-flavour.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index d17f154cd..2e409e41c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1226,10 +1226,11 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, Atom xa_STRING[4]; xEvent x; + /* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */ xa_STRING[0] = XA_STRING; - xa_STRING[1] = clientTEXT; - xa_STRING[2] = clientCOMPOUND_TEXT; - xa_STRING[3] = clientUTF8_STRING; + xa_STRING[1] = clientUTF8_STRING; + xa_STRING[2] = clientTEXT; + xa_STRING[3] = clientCOMPOUND_TEXT; ChangeWindowProperty(pWin, property, diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index e499b7a11..1f0b735b0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -644,6 +644,10 @@ FIXME: Should use these. pDrawable -> depth != 1 && nxagentOption(DeferLevel) >= 1) { + /* -- changed by dimbor (small "bed-sheets" never need be prevented - always put) --*/ + if (dstHeight > 16) + { + /* -------------------------------------------------------------------------------- */ #ifdef TEST fprintf(stderr, "nxagentPutImage: WARNING! Prevented operation on region [%d,%d,%d,%d] " "for drawable at [%p] with drawable pixmap.\n", pRegion -> extents.x1, @@ -654,6 +658,9 @@ FIXME: Should use these. nxagentMarkCorruptedRegion(pDrawable, pRegion); goto nxagentPutImageEnd; + /* --- changed by dimbor ---*/ + } + /* ------------------------- */ } if (pDrawable -> type == DRAWABLE_WINDOW && -- cgit v1.2.3 From 223f5548b70910a2d745b7b48d2096f29b560def Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:14:04 +0100 Subject: Wine Close Delay (108_nxagent_wine-close-delay.full.patch). Wine close delay. Originally contributed by FreeNX team (dimbor). --- .../108_nxagent_wine-close-delay.full.patch | 60 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Window.c | 30 +++++++++++ 3 files changed, 30 insertions(+), 61 deletions(-) delete mode 100644 debian/patches/108_nxagent_wine-close-delay.full.patch (limited to 'debian') diff --git a/debian/patches/108_nxagent_wine-close-delay.full.patch b/debian/patches/108_nxagent_wine-close-delay.full.patch deleted file mode 100644 index 7a9c18cf2..000000000 --- a/debian/patches/108_nxagent_wine-close-delay.full.patch +++ /dev/null @@ -1,60 +0,0 @@ -Description: Wine Close Delay - Wine close delay. - . - Originally contributed by FreeNX Team (dimbor). -Forwarded: not-yet -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Window.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c -@@ -176,6 +176,14 @@ - - static int nxagentForceExposure(WindowPtr pWin, pointer ptr); - -+/* by dimbor */ -+typedef struct -+{ -+ CARD32 state; -+ Window icon; -+} -+nxagentWMStateRec; -+ - /* - * This is currently unused. - */ -@@ -1861,6 +1869,17 @@ - nxagentAddConfiguredWindow(pWin, CWStackingOrder); - nxagentAddConfiguredWindow(pWin, CW_Shape); - -+ /* add by dimbor */ -+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) -+ { -+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); -+ nxagentWMStateRec wmState; -+ wmState.state = 1; /* NormalState */ -+ wmState.icon = None; -+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) -+ fprintf(stderr, "nxagentRealizeWindow: Additing WM_STATE fail.\n"); -+ } -+ - #ifdef SHAPE - - /* -@@ -1907,6 +1926,17 @@ - return True; - } - -+ /* add by dimbor */ -+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) -+ { -+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); -+ nxagentWMStateRec wmState; -+ wmState.state = 3; /* WithdrawnState */ -+ wmState.icon = None; -+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) -+ fprintf(stderr, "nxagentUnRealizeWindow: Changing WM_STATE failed.\n"); -+ } -+ - XUnmapWindow(nxagentDisplay, nxagentWindow(pWin)); - - return True; diff --git a/debian/patches/series b/debian/patches/series index 7f8abfcba..c904d1894 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -108_nxagent_wine-close-delay.full.patch 110_nxagent_createpixmap-bounds-check.full.patch 200_nxagent_check-binary-x2go-flavour.full.patch 201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 2ba37a550..c4aedf482 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -176,6 +176,14 @@ static void nxagentReconfigureWindow(pointer, XID, pointer); static int nxagentForceExposure(WindowPtr pWin, pointer ptr); +/* by dimbor */ +typedef struct +{ + CARD32 state; + Window icon; +} +nxagentWMStateRec; + /* * This is currently unused. */ @@ -1861,6 +1869,17 @@ Bool nxagentRealizeWindow(WindowPtr pWin) nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CW_Shape); + /* add by dimbor */ + if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) + { + Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); + nxagentWMStateRec wmState; + wmState.state = 1; /* NormalState */ + wmState.icon = None; + if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) + fprintf(stderr, "nxagentRealizeWindow: Adding WM_STATE fail.\n"); + } + #ifdef SHAPE /* @@ -1907,6 +1926,17 @@ Bool nxagentUnrealizeWindow(pWin) return True; } + /* add by dimbor */ + if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) + { + Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); + nxagentWMStateRec wmState; + wmState.state = 3; /* WithdrawnState */ + wmState.icon = None; + if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success) + fprintf(stderr, "nxagentUnRealizeWindow: Changing WM_STATE failed.\n"); + } + XUnmapWindow(nxagentDisplay, nxagentWindow(pWin)); return True; -- cgit v1.2.3 From 471223907081355a288a315b33a2b70eb4c8fb1e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:17:58 +0100 Subject: Avoid large pixmaps (110_nxagent_createpixmap-bounds-check.full.patch). It is allowed to try and allocate a pixmap which is larger than 32767 in either dimension. However, all of the framebuffer code is buggy and does not reliably draw to such big pixmaps, basically because the Region data structure operates with signed shorts for the rectangles in it. Furthermore, several places in the X server computes the size in bytes of the pixmap and tries to store it in an integer. This integer can overflow and cause the allocated size to be much smaller. So, such big pixmaps are rejected here with a BadAlloc Originally contributed by FreeNX Team --- ...10_nxagent_createpixmap-bounds-check.full.patch | 44 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 17 +++++++++ 3 files changed, 17 insertions(+), 45 deletions(-) delete mode 100644 debian/patches/110_nxagent_createpixmap-bounds-check.full.patch (limited to 'debian') diff --git a/debian/patches/110_nxagent_createpixmap-bounds-check.full.patch b/debian/patches/110_nxagent_createpixmap-bounds-check.full.patch deleted file mode 100644 index d65862bdc..000000000 --- a/debian/patches/110_nxagent_createpixmap-bounds-check.full.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Avoid large pixmaps - It is allowed to try and allocate a pixmap which is larger than - 32767 in either dimension. However, all of the framebuffer code - is buggy and does not reliably draw to such big pixmaps, basically - because the Region data structure operates with signed shorts - for the rectangles in it. - . - Furthermore, several places in the X server computes the - size in bytes of the pixmap and tries to store it in an - integer. This integer can overflow and cause the allocated size - to be much smaller. - . - So, such big pixmaps are rejected here with a BadAlloc - . - Originally contributed by FreeNX Team -Forwarded: pending... -Author: Mike Gabriel -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c -@@ -1973,6 +1973,23 @@ - client->errorValue = 0; - return BadValue; - } -+ if (stuff->width > 32767 || stuff->height > 32767) -+ { -+ /* It is allowed to try and allocate a pixmap which is larger than -+ * 32767 in either dimension. However, all of the framebuffer code -+ * is buggy and does not reliably draw to such big pixmaps, basically -+ * because the Region data structure operates with signed shorts -+ * for the rectangles in it. -+ * -+ * Furthermore, several places in the X server computes the -+ * size in bytes of the pixmap and tries to store it in an -+ * integer. This integer can overflow and cause the allocated size -+ * to be much smaller. -+ * -+ * So, such big pixmaps are rejected here with a BadAlloc -+ */ -+ return BadAlloc; -+ } - if (stuff->depth != 1) - { - pDepth = pDraw->pScreen->allowedDepths; diff --git a/debian/patches/series b/debian/patches/series index c904d1894..5a5a30e08 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -110_nxagent_createpixmap-bounds-check.full.patch 200_nxagent_check-binary-x2go-flavour.full.patch 201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch 202_nx-X11_enable-xinerama.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 4f59b8098..77e2bf473 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -1973,6 +1973,23 @@ ProcCreatePixmap(client) client->errorValue = 0; return BadValue; } + if (stuff->width > 32767 || stuff->height > 32767) + { + /* It is allowed to try and allocate a pixmap which is larger than + * 32767 in either dimension. However, all of the framebuffer code + * is buggy and does not reliably draw to such big pixmaps, basically + * because the Region data structure operates with signed shorts + * for the rectangles in it. + * + * Furthermore, several places in the X server computes the + * size in bytes of the pixmap and tries to store it in an + * integer. This integer can overflow and cause the allocated size + * to be much smaller. + * + * So, such big pixmaps are rejected here with a BadAlloc + */ + return BadAlloc; + } if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; -- cgit v1.2.3 From 1681f1110ece0e5ad0accda009f106a2081c660c Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:19:25 +0100 Subject: Detect nxagent/x2goagent flavour (200_nxagent_check-binary-x2go-flavour.full.patch). Whether the agent runs in X2Go or NX mode is decide by the name of the binary that executes the code. Binary name equal to nxagent -> (Free)NX flavour Binary name equal to x2goagent -> X2Go flavour --- ...00_nxagent_check-binary-x2go-flavour.full.patch | 64 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Init.c | 28 ++++++++++ nx-X11/programs/Xserver/hw/nxagent/Init.h | 2 + 4 files changed, 30 insertions(+), 65 deletions(-) delete mode 100644 debian/patches/200_nxagent_check-binary-x2go-flavour.full.patch (limited to 'debian') diff --git a/debian/patches/200_nxagent_check-binary-x2go-flavour.full.patch b/debian/patches/200_nxagent_check-binary-x2go-flavour.full.patch deleted file mode 100644 index c69202088..000000000 --- a/debian/patches/200_nxagent_check-binary-x2go-flavour.full.patch +++ /dev/null @@ -1,64 +0,0 @@ -Description: Detect nxagent/x2goagent flavour - Whether the agent runs in X2Go or NX mode is decide by the - name of the binary that executes the code. - . - Binary name equal to nxagent -> (Free)NX flavour - Binary name equal to x2goagent -> X2Go flavour -Forwarded: not-needed -Author: Oleksandr Shneyder -Last-Update: 2012-01-11 ---- a/nx-X11/programs/Xserver/hw/nxagent/Init.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c -@@ -177,6 +177,29 @@ - - int nxagentDoFullGeneration = 1; - -+ /* -+ * 1 if agent running as X2goAgent -+ * 0 if NX Agent -+ */ -+int nxagentX2go; -+ -+/* -+ * Checking if agent is x2go agent -+ */ -+ -+void checkX2goAgent() -+{ -+ extern const char *__progname; -+ if( strcasecmp(__progname,"x2goagent") == 0) -+ { -+ fprintf(stderr, "\nrunning as X2Go Agent\n"); -+ nxagentX2go=1; -+ } -+ else -+ nxagentX2go=0; -+} -+ -+ - /* - * Called at X server's initialization. - */ -@@ -193,6 +216,11 @@ - #endif - - /* -+ * Check if we running as X2Go Agent -+ */ -+ checkX2goAgent(); -+ -+ /* - * Print our pid and version information. - */ - ---- a/nx-X11/programs/Xserver/hw/nxagent/Init.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h -@@ -37,6 +37,8 @@ - extern int nxagentBackingStore; - extern int nxagentSaveUnder; - -+extern int nxagentX2go; -+ - extern ServerGrabInfoRec nxagentGrabServerInfo; - - #endif /* __Init_H__ */ diff --git a/debian/patches/series b/debian/patches/series index 5a5a30e08..f1c8a87b1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -200_nxagent_check-binary-x2go-flavour.full.patch 201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch 202_nx-X11_enable-xinerama.full.patch 203_nxagent_disable-rootless-exit.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index acd5d419c..1794f1551 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -177,6 +177,29 @@ int nxagentSaveUnder; int nxagentDoFullGeneration = 1; + /* + * 1 if agent running as X2goAgent + * 0 if NX Agent + */ +int nxagentX2go; + +/* + * Checking if agent is x2go agent + */ + +void checkX2goAgent() +{ + extern const char *__progname; + if( strcasecmp(__progname,"x2goagent") == 0) + { + fprintf(stderr, "\nrunning as X2Go Agent\n"); + nxagentX2go=1; + } + else + nxagentX2go=0; +} + + /* * Called at X server's initialization. */ @@ -192,6 +215,11 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) #endif + /* + * Check if we running as X2Go Agent + */ + checkX2goAgent(); + /* * Print our pid and version information. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.h b/nx-X11/programs/Xserver/hw/nxagent/Init.h index 2dc0f5c02..b516c7b34 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h @@ -37,6 +37,8 @@ extern int nxagentDoFullGeneration; extern int nxagentBackingStore; extern int nxagentSaveUnder; +extern int nxagentX2go; + extern ServerGrabInfoRec nxagentGrabServerInfo; #endif /* __Init_H__ */ -- cgit v1.2.3 From 6aa18cc28c4adee20b7a6494c8acb430380c4c98 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:21:35 +0100 Subject: X2Go icon when run with x2goagent flavour (201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch). Depending on the binary name of the agent either nxagent.xpm or x2go.xpm is used as window icon. --- ...t_set-x2go-icon-if-x2goagent-flavour.full.patch | 219 --------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Display.c | 24 ++- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 + nx-X11/programs/Xserver/hw/nxagent/x2go.xpm | 148 ++++++++++++++ 5 files changed, 171 insertions(+), 223 deletions(-) delete mode 100644 debian/patches/201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch create mode 100644 nx-X11/programs/Xserver/hw/nxagent/x2go.xpm (limited to 'debian') diff --git a/debian/patches/201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch b/debian/patches/201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch deleted file mode 100644 index 48e4c4a4b..000000000 --- a/debian/patches/201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch +++ /dev/null @@ -1,219 +0,0 @@ -Description: X2Go icon when run with x2goagent flavour - Depending on the binary name of the agent either nxagent.xpm - or x2go.xpm is used as window icon. -Forwarded: not-needed -Author: Oleksandr Shneyder -Last-Update: 2012-01-11 ---- a/nx-X11/programs/Xserver/hw/nxagent/Display.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c -@@ -77,6 +77,7 @@ - #include "NXlib.h" - - #include NXAGENT_ICON_NAME -+#include X2GOAGENT_ICON_NAME - - /* - * Set here the required log level. -@@ -1941,12 +1942,29 @@ - Bool success = False; - XlibPixmap IconPixmap; - XlibPixmap IconShape; -+ char* agent_icon_name; -+ char* agentIconData; - -- snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME); -+ /* -+ * selecting x2go icon when running as X2Go agent -+ */ -+ if(nxagentX2go) -+ { -+ agent_icon_name=X2GOAGENT_ICON_NAME; -+ agentIconData=x2goagentIconData; -+ } -+ else -+ { -+ agent_icon_name=NXAGENT_ICON_NAME; -+ agentIconData=nxagentIconData; -+ } -+ -+ -+ snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", agent_icon_name); - - if ((icon_fp = fopen(default_path, "r")) == NULL) - { -- icon_fp = nxagentLookForIconFile(NXAGENT_ICON_NAME, "r", icon_path); -+ icon_fp = nxagentLookForIconFile(agent_icon_name, "r", icon_path); - - if (icon_fp != NULL) - { -@@ -1985,7 +2003,7 @@ - { - status = XpmCreatePixmapFromData(display, - DefaultRootWindow(display), -- nxagentIconData, -+ agentIconData, - &IconPixmap, - &IconShape, - NULL); ---- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h -@@ -24,6 +24,8 @@ - - #define NXAGENT_ICON_NAME "nxagent.xpm" - -+#define X2GOAGENT_ICON_NAME "x2go.xpm" -+ - #define NXAGENT_PLACEHOLDER_NAME "nxmissing.xpm" - - #endif /* __Icons_H__ */ ---- /dev/null -+++ b/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm -@@ -0,0 +1,148 @@ -+/* XPM */ -+static char *x2goagentIconData[]={ -+"128 128 17 1", -+". c None", -+"m c #323232", -+"l c #323232", -+"f c #323232", -+"e c #323232", -+"o c #323232", -+"# c #323232", -+"h c #323232", -+"i c #323232", -+"n c #323232", -+"d c #323232", -+"a c #323232", -+"g c #323232", -+"j c #323232", -+"b c #323232", -+"k c #323232", -+"c c #323232", -+".....#abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbde.....", -+"...fbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccgf...", -+"..#ccccaheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeijccckf..", -+".ecccgl..................................................................................................................ejcckf.", -+".bccd.....................................................................................................................mdccg.", -+"#cca.......................................................................................................................mjcce", -+"gckm........................................................................................................................eccd", -+"ccn..........................................................................................................................jcb", -+"cce..........................................................................................................................icc", -+"ccm..........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc............................................meeee..........................................................................ecc", -+"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccc....#ggggggggggggggggggggggggggggf.............ggggggggggggggggggggggf....ecc", -+"cc....meeeeoiiiiiiiinggggggggjccccccccccccccccccccc....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", -+"cc....................................meeeeeeeeoiii....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", -+"cc.......................................................menbccccccccccccccccccbhe..................logccccccccccccghe.......ecc", -+"cc...........................................................iccccccccccccccccdm.......................#cccccccccke..........ecc", -+"cc..............................................lee...........#cccccccccccccckm.........................jccccccckm...........ecc", -+"cc........feeeeeeeeoiiiiiiiiiaggggggggjcccccccccccc............icccccccccccccd..........................icccccccf............ecc", -+"cc....meeeeeoiiiiiiiinggggggggjcccccccccccccccccccciiiiii#m.....jcccccccccccci..........................icccccci.............ecc", -+"cc......................................eeeeeeeeeiiiiiiiiigl....eccccccccccccd..........................dcccccj..............ecc", -+"cc...............................................................dcccccccccccj..........................bccccce..............ecc", -+"cc...............................................................lccccccccccccl........................lccccca...............ecc", -+"cc.............................................meeeeeeee#iiiie....dccccccccccch........................icccccl...............ecc", -+"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccb....ecccccccccccb........................bccccn................ecc", -+"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccc#....gccccccccccco......................#cccckm................ecc", -+"cc....................................meeeeeeeeeiiiiiiiiiaggggd....#cccccccccccg......................bcccci.................ecc", -+"cc..................................................................bcccccccccccf....................#cccckm.................ecc", -+"cc..................................................................hcccccccccccd...................mkcccci..................ecc", -+"cc............................................meeeeeeeeoiiiiiiiil...mkcccccccccccl..................icccckm..................ecc", -+"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccn....dccccccccccci.................mkcccci...................ecc", -+"cc....meeeeeiiiiiiiiiaggggggggbccccccccccccccccccccccccccccccccckm...lccccccccccck.................icccckm...................ecc", -+"cc.....................................leeeeeeeeoiiiiiiiiigggggggo....accccccccccc#...............mkcccch....................ecc", -+"cc....................................................................ecccccccccccb...............iccccb.....................ecc", -+"cc.....................................................................jccccccccccce.............mkcccc#.....................ecc", -+"cc.............................................meeeeeeeeehiiiiiiii#....#ccccccccccca.............nccccb......................ecc", -+"cc........feeeeeeee#iiiiiiiiigggggggggkccccccccccccccccccccccccccccl....kcccccccccccl...........lccccc#......................ecc", -+"cc....meeeeeoiiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccd....icccccccccccd...........dccccb.......................ecc", -+"cc......................................leeeeeeeeoiiiiiiiingggggggga....mccccccccccckm.........lccccc#.......................ecc", -+"cc.......................................................................dccccccccccch.........dccccb........................ecc", -+"cc.......................................................................lcccccccccccb........lccccc#........................ecc", -+"cc.............................................meeeeeeeeoiiiiiiiingggo....gccccccccccc#.......dccccg.........................ecc", -+"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccccccg....occcccccccccg......lccccce.........................ecc", -+"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccccccccccce....bccccccccccce.....gccccg..........................ecc", -+"cc....................................meeeeeeeeeiiiiiiiiigggggggggkcccd....#cccccccccccd....eccccce..........................ecc", -+"cc.........................................................................mkcccccccccccl...gccccg...........................ecc", -+"cc..........................................................................nccccccccccci..eccccce...........................ecc", -+"cc............................................meeeeeeeeoiiiiiiiingggggggm...lccccccccccckm.gccccg............................ecc", -+"cc.........eeeeeeeeoiiiiiiiinggggggggjcccccccccccccccccccccccccccccccccc#....dccccccccccc#eccccce............................ecc", -+"cc....meeeeeiiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccccccccccb....ecccccccccccbgccccg.............................ecc", -+"cc.....................................leeeeeeeeoiiiiiiiiigggggggggkccccco....gccccccccccccccccl.............................ecc", -+"cc............................................................................#cccccccccccccccd..............................ecc", -+"cc.............................................................................bccccccccccccccl..............................ecc", -+"cc.............................................leeeeeeeeeiiiiiiiiiagggggggi....icccccccccccccd...............................ecc", -+"cc........feeeeeeee#iiiiiiiingggggggggkccccccccccccccccccccccccccccccccccckm...mkccccccccccccl...............................ecc", -+"cc....meeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccccccccci....dccccccccccca................................ecc", -+"cc......................................leeeeeeeeoiiiiiiiiigggggggggccccccck....lccccccccccckm...............................ecc", -+"cc...............................................................................accccccccccc#...............................ecc", -+"cc...............................................................................ecccccccccccb...............................ecc", -+"cc............................................leeeeeeeeeiiiiiiiiiaggggggggbcce....bccccccccccce..............................ecc", -+"cc.......feeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccccccd....#cccccccccccg..............................ecc", -+"cc....meeeeeeoiiiiiiiingggggggggccccccccccccccccccccccccccccccccccccccccccccccl....kcccccccccccl.............................ecc", -+"cc.......................................feeeeeeeehiiiiiiiidggggggggbccccccccci....ncccccccccccd.............................ecc", -+"cc...........................................................................mm....bccccccccccccm............................ecc", -+"cc................................................................................#ccccccccccccci............................ecc", -+"cc..........................................leeeeeeee#iiiiiiiidggggggggbcccccl....bccccccccccccck............................ecc", -+"cc......feeeeeeeehiiiiiiiiaggggggggkccccccccccccccccccccccccccccccccccccccccd....#ccccccccccccccc#...........................ecc", -+"cc....meeeeeee#iiiiiiiidggggggggjcccccccccccccccccccccccccccccccccccccccccccl....bcccccccccccccccb...........................ecc", -+"cc.......................................meeeeeeeeeiiiiiiiiigggggggggkcccccd....#cccccbccccccccccce..........................ecc", -+"cc..............................................................................bccccdhcccccccccccg..........................ecc", -+"cc.............................................................................#ccccclmkcccccccccccl.........................ecc", -+"cc..........................................meeeeeeeeeiiiiiiiiiaggggggggbkm....bccccd..ncccccccccccd.........................ecc", -+"cc.....leeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccci....hcccckl..lccccccccccccm........................ecc", -+"cc....meeeeeeeehiiiiiiiidggggggggbcccccccccccccccccccccccccccccccccccccckm...mkcccci....dccccccccccci........................ecc", -+"cc........................................leeeeeeee#iiiiiiiinggggggggjcci....icccckm....eccccccccccck........................ecc", -+"cc..........................................................................mkcccci......gccccccccccc#.......................ecc", -+"cc..........................................................................icccckm......#cccccccccccb.......................ecc", -+"cc.........................................leeeeeeeeoiiiiiiiiigggggggga....mkcccci........bccccccccccce......................ecc", -+"cc....meeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccci....icccckm........hcccccccccccg......................ecc", -+"cc.....feeeeeeeehiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccckm...mkcccci.........mkcccccccccccl.....................ecc", -+"cc.........................................feeeeeeeehiiiiiiiiagggggggh....icccckm..........icccccccccccd.....................ecc", -+"cc.......................................................................mkcccci...........lccccccccccccm....................ecc", -+"cc.......................................................................icccckm............dccccccccccci....................ecc", -+"cc...........................................eeeeeeeeehiiiiiiiidggga....mkcccci.............fccccccccccck....................ecc", -+"cc......feeeeeeee#iiiiiiiingggggggggccccccccccccccccccccccccccccccci....iccccb...............gccccccccccc#...................ecc", -+"cc....meeeeeeeoiiiiiiiiigggggggggbcccccccccccccccccccccccccccccccckm...mkcccc#...............occcccccccccb...................ecc", -+"cc........................................meeeeeeeeeiiiiiiiiidgggg#....iccccb.................bccccccccccce..................ecc", -+"cc....................................................................mkcccc#.................#cccccccccccg..................ecc", -+"cc....................................................................iccccb..................mkcccccccccccl.................ecc", -+"cc..........................................eeeeeeeeeiiiiiiiiiaga....mkcccc#...................icccccccccccd.................ecc", -+"cc.....leeeeeeee#iiiiiiiinggggggggjccccccccccccccccccccccccccccci....iccccb....................lccccccccccccm................ecc", -+"cc....meeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccckm...mkcccc#.....................dccccccccccci................ecc", -+"cc.........................................leeeeeeeeoiiiiiiiiiah....iccccb......................lccccccccccck................ecc", -+"cc.................................................................mkcccc#.......................gccccccccccc#...............ecc", -+"cc.................................................................dccccj........................ecccccccccccj...............ecc", -+"cc..........................................leeeeeeeeeiiiiiiih....lccccce.........................bccccccccccce..............ecc", -+"cc....meeeeeeeeeiiiiiiiiidgggggggggcccccccccccccccccccccccccci....dccccg..........................#ccccccccccca..............ecc", -+"cc.....feeeeeeeeiiiiiiiinggggggggbcccccccccccccccccccccccccckm...lccccce...........................kcccccccccccl.............ecc", -+"cc........................................leeeeeeeehiiiiiiiih....dccccg............................ncccccccccccd.............ecc", -+"cc..............................................................lccccce............................fccccccccccccf............ecc", -+"cc..............................................................dccccb..............................jcccccccccccg............ecc", -+"cc.........................................meeeeeeeeoiiiiil....lcccccn..............................icccccccccccce...........ecc", -+"cc......feeeeeeeehiiiiiiiigggggggggccccccccccccccccjgggggo.....gccccc#..............................eccccccccccccbm..........ecc", -+"cc....meeeeeeeoiiiiiiiiidgggggggggccccccccccccccccc...........hcccccco...............................cccccccccccccn..........ecc", -+"cc.........................................leeeeeee..........ecccccccn..............................lcccccccccccccc#.........ecc", -+"cc..........................................................#kccccccckf.............................nccccccccccccccc#........ecc", -+"cc........................................................ldcccccccccck#m.........................lncccccccccccccccccdl......ecc", -+"cc.........................................feeeeeee....ogjcccccccccccccccggi..................oggbcccccccccccccccccccccja....ecc", -+"cc.....leeeeeeee#iiiiiiiidggggggggbcccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", -+"cc....meeeeeeeehiiiiiiiiaggggggggkccccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", -+"cc........................................feeeeeeee..........................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cc...........................................................................................................................ecc", -+"cce..........................................................................................................................hcc", -+"ccn..........................................................................................................................acb", -+"jcb.........................................................................................................................lcca", -+"hcci........................................................................................................................acc#", -+"mkcc#......................................................................................................................dccb.", -+".occci...................................................................................................................macccf.", -+"..#cccbne.............................................................................................................menkccc#..", -+"...okccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbe...", -+"....mhjccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccg#....."}; diff --git a/debian/patches/series b/debian/patches/series index f1c8a87b1..d9b63cce7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch 202_nx-X11_enable-xinerama.full.patch 203_nxagent_disable-rootless-exit.full.patch 204_nxagent_repaint-solidpict.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 9031c25c7..201d9dd74 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -77,6 +77,7 @@ is" without express or implied warranty. #include "NXlib.h" #include NXAGENT_ICON_NAME +#include X2GOAGENT_ICON_NAME /* * Set here the required log level. @@ -1941,12 +1942,29 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) Bool success = False; XlibPixmap IconPixmap; XlibPixmap IconShape; + char* agent_icon_name; + char* agentIconData; - snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME); + /* + * selecting x2go icon when running as X2Go agent + */ + if(nxagentX2go) + { + agent_icon_name=X2GOAGENT_ICON_NAME; + agentIconData=x2goagentIconData; + } + else + { + agent_icon_name=NXAGENT_ICON_NAME; + agentIconData=nxagentIconData; + } + + + snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", agent_icon_name); if ((icon_fp = fopen(default_path, "r")) == NULL) { - icon_fp = nxagentLookForIconFile(NXAGENT_ICON_NAME, "r", icon_path); + icon_fp = nxagentLookForIconFile(agent_icon_name, "r", icon_path); if (icon_fp != NULL) { @@ -1985,7 +2003,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) { status = XpmCreatePixmapFromData(display, DefaultRootWindow(display), - nxagentIconData, + agentIconData, &IconPixmap, &IconShape, NULL); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h index 0601584d4..98e879662 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h @@ -24,6 +24,8 @@ #define NXAGENT_ICON_NAME "nxagent.xpm" +#define X2GOAGENT_ICON_NAME "x2go.xpm" + #define NXAGENT_PLACEHOLDER_NAME "nxmissing.xpm" #endif /* __Icons_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm b/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm new file mode 100644 index 000000000..fbe245d0f --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/x2go.xpm @@ -0,0 +1,148 @@ +/* XPM */ +static char *x2goagentIconData[]={ +"128 128 17 1", +". c None", +"m c #323232", +"l c #323232", +"f c #323232", +"e c #323232", +"o c #323232", +"# c #323232", +"h c #323232", +"i c #323232", +"n c #323232", +"d c #323232", +"a c #323232", +"g c #323232", +"j c #323232", +"b c #323232", +"k c #323232", +"c c #323232", +".....#abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbde.....", +"...fbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccgf...", +"..#ccccaheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeijccckf..", +".ecccgl..................................................................................................................ejcckf.", +".bccd.....................................................................................................................mdccg.", +"#cca.......................................................................................................................mjcce", +"gckm........................................................................................................................eccd", +"ccn..........................................................................................................................jcb", +"cce..........................................................................................................................icc", +"ccm..........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc............................................meeee..........................................................................ecc", +"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccc....#ggggggggggggggggggggggggggggf.............ggggggggggggggggggggggf....ecc", +"cc....meeeeoiiiiiiiinggggggggjccccccccccccccccccccc....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", +"cc....................................meeeeeeeeoiii....icccccccccccccccccccccccccccce.............cccccccccccccccccccccce....ecc", +"cc.......................................................menbccccccccccccccccccbhe..................logccccccccccccghe.......ecc", +"cc...........................................................iccccccccccccccccdm.......................#cccccccccke..........ecc", +"cc..............................................lee...........#cccccccccccccckm.........................jccccccckm...........ecc", +"cc........feeeeeeeeoiiiiiiiiiaggggggggjcccccccccccc............icccccccccccccd..........................icccccccf............ecc", +"cc....meeeeeoiiiiiiiinggggggggjcccccccccccccccccccciiiiii#m.....jcccccccccccci..........................icccccci.............ecc", +"cc......................................eeeeeeeeeiiiiiiiiigl....eccccccccccccd..........................dcccccj..............ecc", +"cc...............................................................dcccccccccccj..........................bccccce..............ecc", +"cc...............................................................lccccccccccccl........................lccccca...............ecc", +"cc.............................................meeeeeeee#iiiie....dccccccccccch........................icccccl...............ecc", +"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccb....ecccccccccccb........................bccccn................ecc", +"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccc#....gccccccccccco......................#cccckm................ecc", +"cc....................................meeeeeeeeeiiiiiiiiiaggggd....#cccccccccccg......................bcccci.................ecc", +"cc..................................................................bcccccccccccf....................#cccckm.................ecc", +"cc..................................................................hcccccccccccd...................mkcccci..................ecc", +"cc............................................meeeeeeeeoiiiiiiiil...mkcccccccccccl..................icccckm..................ecc", +"cc.........eeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccn....dccccccccccci.................mkcccci...................ecc", +"cc....meeeeeiiiiiiiiiaggggggggbccccccccccccccccccccccccccccccccckm...lccccccccccck.................icccckm...................ecc", +"cc.....................................leeeeeeeeoiiiiiiiiigggggggo....accccccccccc#...............mkcccch....................ecc", +"cc....................................................................ecccccccccccb...............iccccb.....................ecc", +"cc.....................................................................jccccccccccce.............mkcccc#.....................ecc", +"cc.............................................meeeeeeeeehiiiiiiii#....#ccccccccccca.............nccccb......................ecc", +"cc........feeeeeeee#iiiiiiiiigggggggggkccccccccccccccccccccccccccccl....kcccccccccccl...........lccccc#......................ecc", +"cc....meeeeeoiiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccd....icccccccccccd...........dccccb.......................ecc", +"cc......................................leeeeeeeeoiiiiiiiingggggggga....mccccccccccckm.........lccccc#.......................ecc", +"cc.......................................................................dccccccccccch.........dccccb........................ecc", +"cc.......................................................................lcccccccccccb........lccccc#........................ecc", +"cc.............................................meeeeeeeeoiiiiiiiingggo....gccccccccccc#.......dccccg.........................ecc", +"cc.........meeeeeeeeoiiiiiiiinggggggggjccccccccccccccccccccccccccccccg....occcccccccccg......lccccce.........................ecc", +"cc....meeeeiiiiiiiiiaggggggggbcccccccccccccccccccccccccccccccccccccccce....bccccccccccce.....gccccg..........................ecc", +"cc....................................meeeeeeeeeiiiiiiiiigggggggggkcccd....#cccccccccccd....eccccce..........................ecc", +"cc.........................................................................mkcccccccccccl...gccccg...........................ecc", +"cc..........................................................................nccccccccccci..eccccce...........................ecc", +"cc............................................meeeeeeeeoiiiiiiiingggggggm...lccccccccccckm.gccccg............................ecc", +"cc.........eeeeeeeeoiiiiiiiinggggggggjcccccccccccccccccccccccccccccccccc#....dccccccccccc#eccccce............................ecc", +"cc....meeeeeiiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccccccccccb....ecccccccccccbgccccg.............................ecc", +"cc.....................................leeeeeeeeoiiiiiiiiigggggggggkccccco....gccccccccccccccccl.............................ecc", +"cc............................................................................#cccccccccccccccd..............................ecc", +"cc.............................................................................bccccccccccccccl..............................ecc", +"cc.............................................leeeeeeeeeiiiiiiiiiagggggggi....icccccccccccccd...............................ecc", +"cc........feeeeeeee#iiiiiiiingggggggggkccccccccccccccccccccccccccccccccccckm...mkccccccccccccl...............................ecc", +"cc....meeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccccccccci....dccccccccccca................................ecc", +"cc......................................leeeeeeeeoiiiiiiiiigggggggggccccccck....lccccccccccckm...............................ecc", +"cc...............................................................................accccccccccc#...............................ecc", +"cc...............................................................................ecccccccccccb...............................ecc", +"cc............................................leeeeeeeeeiiiiiiiiiaggggggggbcce....bccccccccccce..............................ecc", +"cc.......feeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccccccccccccccd....#cccccccccccg..............................ecc", +"cc....meeeeeeoiiiiiiiingggggggggccccccccccccccccccccccccccccccccccccccccccccccl....kcccccccccccl.............................ecc", +"cc.......................................feeeeeeeehiiiiiiiidggggggggbccccccccci....ncccccccccccd.............................ecc", +"cc...........................................................................mm....bccccccccccccm............................ecc", +"cc................................................................................#ccccccccccccci............................ecc", +"cc..........................................leeeeeeee#iiiiiiiidggggggggbcccccl....bccccccccccccck............................ecc", +"cc......feeeeeeeehiiiiiiiiaggggggggkccccccccccccccccccccccccccccccccccccccccd....#ccccccccccccccc#...........................ecc", +"cc....meeeeeee#iiiiiiiidggggggggjcccccccccccccccccccccccccccccccccccccccccccl....bcccccccccccccccb...........................ecc", +"cc.......................................meeeeeeeeeiiiiiiiiigggggggggkcccccd....#cccccbccccccccccce..........................ecc", +"cc..............................................................................bccccdhcccccccccccg..........................ecc", +"cc.............................................................................#ccccclmkcccccccccccl.........................ecc", +"cc..........................................meeeeeeeeeiiiiiiiiiaggggggggbkm....bccccd..ncccccccccccd.........................ecc", +"cc.....leeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccccci....hcccckl..lccccccccccccm........................ecc", +"cc....meeeeeeeehiiiiiiiidggggggggbcccccccccccccccccccccccccccccccccccccckm...mkcccci....dccccccccccci........................ecc", +"cc........................................leeeeeeee#iiiiiiiinggggggggjcci....icccckm....eccccccccccck........................ecc", +"cc..........................................................................mkcccci......gccccccccccc#.......................ecc", +"cc..........................................................................icccckm......#cccccccccccb.......................ecc", +"cc.........................................leeeeeeeeoiiiiiiiiigggggggga....mkcccci........bccccccccccce......................ecc", +"cc....meeeeeeeeoiiiiiiiiigggggggggkccccccccccccccccccccccccccccccccccci....icccckm........hcccccccccccg......................ecc", +"cc.....feeeeeeeehiiiiiiiiaggggggggkcccccccccccccccccccccccccccccccccckm...mkcccci.........mkcccccccccccl.....................ecc", +"cc.........................................feeeeeeeehiiiiiiiiagggggggh....icccckm..........icccccccccccd.....................ecc", +"cc.......................................................................mkcccci...........lccccccccccccm....................ecc", +"cc.......................................................................icccckm............dccccccccccci....................ecc", +"cc...........................................eeeeeeeeehiiiiiiiidggga....mkcccci.............fccccccccccck....................ecc", +"cc......feeeeeeee#iiiiiiiingggggggggccccccccccccccccccccccccccccccci....iccccb...............gccccccccccc#...................ecc", +"cc....meeeeeeeoiiiiiiiiigggggggggbcccccccccccccccccccccccccccccccckm...mkcccc#...............occcccccccccb...................ecc", +"cc........................................meeeeeeeeeiiiiiiiiidgggg#....iccccb.................bccccccccccce..................ecc", +"cc....................................................................mkcccc#.................#cccccccccccg..................ecc", +"cc....................................................................iccccb..................mkcccccccccccl.................ecc", +"cc..........................................eeeeeeeeeiiiiiiiiiaga....mkcccc#...................icccccccccccd.................ecc", +"cc.....leeeeeeee#iiiiiiiinggggggggjccccccccccccccccccccccccccccci....iccccb....................lccccccccccccm................ecc", +"cc....meeeeeeee#iiiiiiiiigggggggggkcccccccccccccccccccccccccccckm...mkcccc#.....................dccccccccccci................ecc", +"cc.........................................leeeeeeeeoiiiiiiiiiah....iccccb......................lccccccccccck................ecc", +"cc.................................................................mkcccc#.......................gccccccccccc#...............ecc", +"cc.................................................................dccccj........................ecccccccccccj...............ecc", +"cc..........................................leeeeeeeeeiiiiiiih....lccccce.........................bccccccccccce..............ecc", +"cc....meeeeeeeeeiiiiiiiiidgggggggggcccccccccccccccccccccccccci....dccccg..........................#ccccccccccca..............ecc", +"cc.....feeeeeeeeiiiiiiiinggggggggbcccccccccccccccccccccccccckm...lccccce...........................kcccccccccccl.............ecc", +"cc........................................leeeeeeeehiiiiiiiih....dccccg............................ncccccccccccd.............ecc", +"cc..............................................................lccccce............................fccccccccccccf............ecc", +"cc..............................................................dccccb..............................jcccccccccccg............ecc", +"cc.........................................meeeeeeeeoiiiiil....lcccccn..............................icccccccccccce...........ecc", +"cc......feeeeeeeehiiiiiiiigggggggggccccccccccccccccjgggggo.....gccccc#..............................eccccccccccccbm..........ecc", +"cc....meeeeeeeoiiiiiiiiidgggggggggccccccccccccccccc...........hcccccco...............................cccccccccccccn..........ecc", +"cc.........................................leeeeeee..........ecccccccn..............................lcccccccccccccc#.........ecc", +"cc..........................................................#kccccccckf.............................nccccccccccccccc#........ecc", +"cc........................................................ldcccccccccck#m.........................lncccccccccccccccccdl......ecc", +"cc.........................................feeeeeee....ogjcccccccccccccccggi..................oggbcccccccccccccccccccccja....ecc", +"cc.....leeeeeeee#iiiiiiiidggggggggbcccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", +"cc....meeeeeeeehiiiiiiiiaggggggggkccccccccccccccccc....icccccccccccccccccccg..................icccccccccccccccccccccccccc....ecc", +"cc........................................feeeeeeee..........................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cc...........................................................................................................................ecc", +"cce..........................................................................................................................hcc", +"ccn..........................................................................................................................acb", +"jcb.........................................................................................................................lcca", +"hcci........................................................................................................................acc#", +"mkcc#......................................................................................................................dccb.", +".occci...................................................................................................................macccf.", +"..#cccbne.............................................................................................................menkccc#..", +"...okccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccbe...", +"....mhjccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccg#....."}; -- cgit v1.2.3 From d26930d59838e2a8305c66b67aaa163db157920c Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:23:16 +0100 Subject: Enable Xinerama support for NX (202_nx-X11_enable-xinerama.full.patch). This patch adds Xinerama awareness to NX agent windows. The advantage of Xinerama awareness is that an NX session window will only maximize to the dimensions of the active physical display. --- .../patches/202_nx-X11_enable-xinerama.full.patch | 292 --------------------- debian/patches/series | 1 - nx-X11/config/cf/X11.tmpl | 2 +- nx-X11/config/cf/host.def | 2 +- nx-X11/lib/Xinerama/Xinerama.c | 98 +++++-- nx-X11/programs/Xserver/Imakefile | 2 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 9 - nx-X11/programs/Xserver/Xext/panoramiX.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 +- nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c | 30 ++- 10 files changed, 93 insertions(+), 347 deletions(-) delete mode 100644 debian/patches/202_nx-X11_enable-xinerama.full.patch (limited to 'debian') diff --git a/debian/patches/202_nx-X11_enable-xinerama.full.patch b/debian/patches/202_nx-X11_enable-xinerama.full.patch deleted file mode 100644 index 6845ec51e..000000000 --- a/debian/patches/202_nx-X11_enable-xinerama.full.patch +++ /dev/null @@ -1,292 +0,0 @@ -Description: Enable Xinerama support for NX - This patch adds Xinerama awareness to NX agent windows. - . - The advantage of Xinerama awareness is that an NX session window - will only maximize to the dimensions of the active physical - display. -Forwarded: pending -Author: Oleksandr Shneyder -Last-Update: 2012-01-13 ---- a/nx-X11/config/cf/host.def -+++ b/nx-X11/config/cf/host.def -@@ -686,7 +686,7 @@ - * - #define BuildXinerama NO - */ --#define BuildXinerama NO -+#define BuildXinerama YES - - /* - * If you don't want to build support for the GLX extension, uncomment this. ---- a/nx-X11/config/cf/X11.tmpl -+++ b/nx-X11/config/cf/X11.tmpl -@@ -456,7 +456,7 @@ - #define BuildXinerama NO - #endif - #ifndef BuildXineramaLibrary --#define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly) -+#define BuildXineramaLibrary (BuildXinerama) - #endif - #ifndef BuildDmxDevelTools - #define BuildDmxDevelTools NO ---- a/nx-X11/lib/Xinerama/Xinerama.c -+++ b/nx-X11/lib/Xinerama/Xinerama.c -@@ -34,7 +34,7 @@ - #include - #include - #include -- -+#include - - static XExtensionInfo _panoramiX_ext_info_data; - static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; -@@ -249,6 +249,16 @@ - xXineramaIsActiveReq *req; - XExtDisplayInfo *info = find_display (dpy); - -+ -+ FILE* fptr; -+ if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))!=NULL) { -+ fclose (fptr); -+ return True; -+ } -+ else { -+ return False; -+ } -+ - if(!XextHasExtension(info)) - return False; /* server doesn't even have the extension */ - -@@ -266,7 +276,6 @@ - return rep.state; - } - --#include - - XineramaScreenInfo * - XineramaQueryScreens( -@@ -279,39 +288,72 @@ - xXineramaQueryScreensReq *req; - XineramaScreenInfo *scrnInfo = NULL; - -- PanoramiXCheckExtension (dpy, info, 0); -+ int i; -+ int x,y,w,h; -+ FILE* fptr; -+ if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))==NULL) { -+ PanoramiXCheckExtension (dpy, info, 0); -+ LockDisplay (dpy); -+ GetReq (XineramaQueryScreens, req); -+ req->reqType = info->codes->major_opcode; -+ req->panoramiXReqType = X_XineramaQueryScreens; -+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { -+ UnlockDisplay (dpy); -+ SyncHandle (); -+ return NULL; -+ } -+ if(rep.number) { -+ if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { -+ xXineramaScreenInfo scratch; -+ int i; -+ -+ for(i = 0; i < rep.number; i++) { -+ _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); -+ scrnInfo[i].screen_number = i; -+ scrnInfo[i].x_org = scratch.x_org; -+ scrnInfo[i].y_org = scratch.y_org; -+ scrnInfo[i].width = scratch.width; -+ scrnInfo[i].height = scratch.height; -+ } -+ -+ *number = rep.number; -+ } else { -+ _XEatData(dpy, rep.length << 2); -+ } -+ } - -- LockDisplay (dpy); -- GetReq (XineramaQueryScreens, req); -- req->reqType = info->codes->major_opcode; -- req->panoramiXReqType = X_XineramaQueryScreens; -- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); -- return NULL; -- } - -- if(rep.number) { -- if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { -- xXineramaScreenInfo scratch; -- int i; -- -- for(i = 0; i < rep.number; i++) { -- _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); -- scrnInfo[i].screen_number = i; -- scrnInfo[i].x_org = scratch.x_org; -- scrnInfo[i].y_org = scratch.y_org; -- scrnInfo[i].width = scratch.width; -- scrnInfo[i].height = scratch.height; -- } -+ } else { - -- *number = rep.number; -- } else -- _XEatData(dpy, rep.length << 2); -+ i=0; -+ while(!feof(fptr)) { -+ w=h=0; -+ fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); -+ if(w&&h) -+ i++; -+ } -+ rewind(fptr); -+ *number=i; -+ if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * i))) { -+ i=0; -+ while(!feof(fptr)){ -+ w=h=0; -+ fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); -+ if(w&&h){ -+ scrnInfo[i].screen_number=i; -+ scrnInfo[i].x_org=x; -+ scrnInfo[i].y_org=y; -+ scrnInfo[i].width=w; -+ scrnInfo[i].height=h; -+ i++; -+ } -+ } -+ } -+ fclose(fptr); - } - -- UnlockDisplay (dpy); -- SyncHandle (); - return scrnInfo; - } - ---- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile -+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile -@@ -206,7 +206,7 @@ - -UNX_DEBUG_INPUT \ - -DRANDR_10_INTERFACE \ - -DRANDR_12_INTERFACE \ -- -UPANORAMIX \ -+ -DPANORAMIX \ - -UDEBUG_TREE - - all:: $(OBJS) ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c -@@ -275,17 +275,19 @@ - case xv_PutVideo: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvPutVideo(client)); break; -+ result = (XineramaXvPutVideo(client)); - else - #endif -- result = (ProcXvPutVideo(client)); break; -+ result = (ProcXvPutVideo(client)); -+ break; - case xv_PutStill: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvPutStill(client)); break -+ result = (XineramaXvPutStill(client)); - else - #endif -- result = (ProcXvPutStill(client)); break; -+ result = (ProcXvPutStill(client)); -+ break; - case xv_GetVideo: result = (ProcXvGetVideo(client)); break; - case xv_GetStill: result = (ProcXvGetStill(client)); break; - case xv_GrabPort: result = (ProcXvGrabPort(client)); break; -@@ -295,35 +297,39 @@ - case xv_StopVideo: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvStopVideo(client)); break; -+ result = (XineramaXvStopVideo(client)); - else - #endif -- result = (ProcXvStopVideo(client)); break; -+ result = (ProcXvStopVideo(client)); -+ break; - case xv_SetPortAttribute: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvSetPortAttribute(client)); break; -+ result = (XineramaXvSetPortAttribute(client)); - else - #endif -- result = (ProcXvSetPortAttribute(client)); break; -+ result = (ProcXvSetPortAttribute(client)); -+ break; - case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break; - case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break; - case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break; - case xv_PutImage: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvPutImage(client)); break; -+ result = (XineramaXvPutImage(client)); - else - #endif -- result = (ProcXvPutImage(client)); break; -+ result = (ProcXvPutImage(client)); -+ break; - #ifdef MITSHM - case xv_ShmPutImage: - #ifdef PANORAMIX - if(!noPanoramiXExtension) -- result = (XineramaXvShmPutImage(client)); break; -+ result = (XineramaXvShmPutImage(client)); - else - #endif -- result = (ProcXvShmPutImage(client)); break; -+ result = (ProcXvShmPutImage(client)); -+ break; - #endif - case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break; - case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break; ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1021,7 +1021,7 @@ - #else - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -+ -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama - #endif - - #endif ---- a/nx-X11/programs/Xserver/Xext/panoramiX.c -+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c -@@ -1045,16 +1045,7 @@ - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; --#if 1 -- { -- /* The following hack fools clients into thinking that Xinerama -- * is disabled even though it is not. */ -- extern Bool PanoramiXExtensionDisabledHack; -- rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack; -- } --#else - rep.state = !noPanoramiXExtension; --#endif - if (client->swapped) { - register int n; - swaps (&rep.sequenceNumber, n); ---- a/nx-X11/programs/Xserver/Xext/panoramiX.h -+++ b/nx-X11/programs/Xserver/Xext/panoramiX.h -@@ -44,7 +44,7 @@ - #define _PANORAMIX_H_ - - #include --#include "gcstruct.h" -+/*#include "gcstruct.h"*/ - - - typedef struct _PanoramiXData { diff --git a/debian/patches/series b/debian/patches/series index d9b63cce7..746c6ad43 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -202_nx-X11_enable-xinerama.full.patch 203_nxagent_disable-rootless-exit.full.patch 204_nxagent_repaint-solidpict.full.patch 205_nxagent_refresh-adsl.full.patch diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index c1c92ca10..accba403c 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -456,7 +456,7 @@ XORGRELSTRING = XorgManVersionString #define BuildXinerama NO #endif #ifndef BuildXineramaLibrary -#define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly) +#define BuildXineramaLibrary (BuildXinerama) #endif #ifndef BuildDmxDevelTools #define BuildDmxDevelTools NO diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index e9f53c2a9..7d0511f36 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -686,7 +686,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define BuildXinerama NO */ -#define BuildXinerama NO +#define BuildXinerama YES /* * If you don't want to build support for the GLX extension, uncomment this. diff --git a/nx-X11/lib/Xinerama/Xinerama.c b/nx-X11/lib/Xinerama/Xinerama.c index 43084b213..fd717dd22 100644 --- a/nx-X11/lib/Xinerama/Xinerama.c +++ b/nx-X11/lib/Xinerama/Xinerama.c @@ -34,7 +34,7 @@ Equipment Corporation. #include #include #include - +#include static XExtensionInfo _panoramiX_ext_info_data; static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; @@ -249,6 +249,16 @@ Bool XineramaIsActive(Display *dpy) xXineramaIsActiveReq *req; XExtDisplayInfo *info = find_display (dpy); + + FILE* fptr; + if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))!=NULL) { + fclose (fptr); + return True; + } + else { + return False; + } + if(!XextHasExtension(info)) return False; /* server doesn't even have the extension */ @@ -266,7 +276,6 @@ Bool XineramaIsActive(Display *dpy) return rep.state; } -#include XineramaScreenInfo * XineramaQueryScreens( @@ -279,39 +288,72 @@ XineramaQueryScreens( xXineramaQueryScreensReq *req; XineramaScreenInfo *scrnInfo = NULL; - PanoramiXCheckExtension (dpy, info, 0); + int i; + int x,y,w,h; + FILE* fptr; + if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))==NULL) { + PanoramiXCheckExtension (dpy, info, 0); + LockDisplay (dpy); + GetReq (XineramaQueryScreens, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_XineramaQueryScreens; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + if(rep.number) { + if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < rep.number; i++) { + _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); + scrnInfo[i].screen_number = i; + scrnInfo[i].x_org = scratch.x_org; + scrnInfo[i].y_org = scratch.y_org; + scrnInfo[i].width = scratch.width; + scrnInfo[i].height = scratch.height; + } + + *number = rep.number; + } else { + _XEatData(dpy, rep.length << 2); + } + } - LockDisplay (dpy); - GetReq (XineramaQueryScreens, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_XineramaQueryScreens; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay (dpy); SyncHandle (); - return NULL; - } - if(rep.number) { - if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { - xXineramaScreenInfo scratch; - int i; - - for(i = 0; i < rep.number; i++) { - _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); - scrnInfo[i].screen_number = i; - scrnInfo[i].x_org = scratch.x_org; - scrnInfo[i].y_org = scratch.y_org; - scrnInfo[i].width = scratch.width; - scrnInfo[i].height = scratch.height; - } + } else { - *number = rep.number; - } else - _XEatData(dpy, rep.length << 2); + i=0; + while(!feof(fptr)) { + w=h=0; + fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); + if(w&&h) + i++; + } + rewind(fptr); + *number=i; + if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * i))) { + i=0; + while(!feof(fptr)){ + w=h=0; + fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); + if(w&&h){ + scrnInfo[i].screen_number=i; + scrnInfo[i].x_org=x; + scrnInfo[i].y_org=y; + scrnInfo[i].width=w; + scrnInfo[i].height=h; + i++; + } + } + } + fclose(fptr); } - UnlockDisplay (dpy); - SyncHandle (); return scrnInfo; } diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index b01fc2e48..8ecb338b2 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1021,7 +1021,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite + -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama #endif #endif diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index 33faedc57..a1a5b9f1f 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -1045,16 +1045,7 @@ ProcXineramaIsActive(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; -#if 1 - { - /* The following hack fools clients into thinking that Xinerama - * is disabled even though it is not. */ - extern Bool PanoramiXExtensionDisabledHack; - rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack; - } -#else rep.state = !noPanoramiXExtension; -#endif if (client->swapped) { register int n; swaps (&rep.sequenceNumber, n); diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h index 5fa4ed35c..4178b985f 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.h +++ b/nx-X11/programs/Xserver/Xext/panoramiX.h @@ -44,7 +44,7 @@ Equipment Corporation. #define _PANORAMIX_H_ #include -#include "gcstruct.h" +/*#include "gcstruct.h"*/ typedef struct _PanoramiXData { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 96579583b..a8e162102 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -206,7 +206,7 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) \ -UNX_DEBUG_INPUT \ -DRANDR_10_INTERFACE \ -DRANDR_12_INTERFACE \ - -UPANORAMIX \ + -DPANORAMIX \ -UDEBUG_TREE all:: $(OBJS) diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c index f6dad312a..cbb3f63e8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c @@ -275,17 +275,19 @@ ProcXvDispatch(ClientPtr client) case xv_PutVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutVideo(client)); break; + result = (XineramaXvPutVideo(client)); else #endif - result = (ProcXvPutVideo(client)); break; + result = (ProcXvPutVideo(client)); + break; case xv_PutStill: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutStill(client)); break + result = (XineramaXvPutStill(client)); else #endif - result = (ProcXvPutStill(client)); break; + result = (ProcXvPutStill(client)); + break; case xv_GetVideo: result = (ProcXvGetVideo(client)); break; case xv_GetStill: result = (ProcXvGetStill(client)); break; case xv_GrabPort: result = (ProcXvGrabPort(client)); break; @@ -295,35 +297,39 @@ ProcXvDispatch(ClientPtr client) case xv_StopVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvStopVideo(client)); break; + result = (XineramaXvStopVideo(client)); else #endif - result = (ProcXvStopVideo(client)); break; + result = (ProcXvStopVideo(client)); + break; case xv_SetPortAttribute: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvSetPortAttribute(client)); break; + result = (XineramaXvSetPortAttribute(client)); else #endif - result = (ProcXvSetPortAttribute(client)); break; + result = (ProcXvSetPortAttribute(client)); + break; case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break; case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break; case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break; case xv_PutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutImage(client)); break; + result = (XineramaXvPutImage(client)); else #endif - result = (ProcXvPutImage(client)); break; + result = (ProcXvPutImage(client)); + break; #ifdef MITSHM case xv_ShmPutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvShmPutImage(client)); break; + result = (XineramaXvShmPutImage(client)); else #endif - result = (ProcXvShmPutImage(client)); break; + result = (ProcXvShmPutImage(client)); + break; #endif case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break; case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break; -- cgit v1.2.3 From 4f5dc807a7a421aa0c5f52b84cd33ff41505de38 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:26:42 +0100 Subject: Add -norootlessexit cmdline option to nxagent (203_nxagent_disable-rootless-exit.full.patch). This change enables to launch an nxagent in rootless mode that waits forever for Xclients to appear. This feature got added when X2Go introduced Published Applications support. --- .../203_nxagent_disable-rootless-exit.full.patch | 63 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Args.c | 7 +++ nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Options.c | 1 + nx-X11/programs/Xserver/hw/nxagent/Options.h | 7 +++ 6 files changed, 16 insertions(+), 65 deletions(-) delete mode 100644 debian/patches/203_nxagent_disable-rootless-exit.full.patch (limited to 'debian') diff --git a/debian/patches/203_nxagent_disable-rootless-exit.full.patch b/debian/patches/203_nxagent_disable-rootless-exit.full.patch deleted file mode 100644 index 74579f4d8..000000000 --- a/debian/patches/203_nxagent_disable-rootless-exit.full.patch +++ /dev/null @@ -1,63 +0,0 @@ -Description: Add -norootlessexit cmdline option to nxagent -Author: Oleksandr Shneyder - ---- a/nx-X11/programs/Xserver/hw/nxagent/Args.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c -@@ -672,6 +672,12 @@ - return 1; - } - -+ if (!strcmp(argv[i], "-norootlessexit")) { -+ nxagentChangeOption(NoRootlessExit, True); -+ return 1; -+ } -+ -+ - if (!strcmp(argv[i], "-noonce")) - { - nxagentOnce = False; -@@ -1855,6 +1861,7 @@ - ErrorF("The NX system adds the following arguments:\n"); - ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n"); - ErrorF("-timeout int auto-disconnect timeout in seconds (minimum allowed: 60)\n"); -+ ErrorF("-norootlessexit don't exit if there are no clients in rootless mode\n"); - #ifdef RENDER - ErrorF("-norender disable the use of the render extension\n"); - ErrorF("-nocomposite disable the use of the composite extension\n"); ---- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c -@@ -219,7 +219,7 @@ - - if (nxagentOption(Rootless) && - nxagentLastWindowDestroyed && nxagentRootlessDialogPid == 0 && -- now > nxagentLastWindowDestroyedTime + 30 * 1000) -+ now > nxagentLastWindowDestroyedTime + 30 * 1000 && !nxagentOption(NoRootlessExit)) - { - #ifdef WARNING - fprintf(stderr, "nxagentBlockHandler: No application running. Closing the session.\n"); ---- a/nx-X11/programs/Xserver/hw/nxagent/Options.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c -@@ -56,6 +56,7 @@ - nxagentOptions.Persistent = 1; - nxagentOptions.Rootless = UNDEFINED; - nxagentOptions.Fullscreen = UNDEFINED; -+ nxagentOptions.NoRootlessExit = False; - - nxagentOptions.X = 0; - nxagentOptions.Y = 0; ---- a/nx-X11/programs/Xserver/hw/nxagent/Options.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h -@@ -381,6 +381,13 @@ - - int ImageRateLimit; - -+ /* -+ * True if agent should not exit if there are no -+ * clients in rootless mode -+ */ -+ -+ int NoRootlessExit; -+ - } AgentOptionsRec; - - typedef AgentOptionsRec *AgentOptionsPtr; diff --git a/debian/patches/series b/debian/patches/series index 746c6ad43..424c3e990 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -203_nxagent_disable-rootless-exit.full.patch 204_nxagent_repaint-solidpict.full.patch 205_nxagent_refresh-adsl.full.patch 206_nxagent_clipboard-as-nxoption.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index ecf04e226..6666393e4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -672,6 +672,12 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-norootlessexit")) { + nxagentChangeOption(NoRootlessExit, True); + return 1; + } + + if (!strcmp(argv[i], "-noonce")) { nxagentOnce = False; @@ -1855,6 +1861,7 @@ void ddxUseMsg() ErrorF("The NX system adds the following arguments:\n"); ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n"); ErrorF("-timeout int auto-disconnect timeout in seconds (minimum allowed: 60)\n"); + ErrorF("-norootlessexit don't exit if there are no clients in rootless mode\n"); #ifdef RENDER ErrorF("-norender disable the use of the render extension\n"); ErrorF("-nocomposite disable the use of the composite extension\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index 332816fe0..1fc6bbf8b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -219,7 +219,7 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask) if (nxagentOption(Rootless) && nxagentLastWindowDestroyed && nxagentRootlessDialogPid == 0 && - now > nxagentLastWindowDestroyedTime + 30 * 1000) + now > nxagentLastWindowDestroyedTime + 30 * 1000 && !nxagentOption(NoRootlessExit)) { #ifdef WARNING fprintf(stderr, "nxagentBlockHandler: No application running. Closing the session.\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c index ca5be0b5f..7eac3d8a2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c @@ -56,6 +56,7 @@ void nxagentInitOptions() nxagentOptions.Persistent = 1; nxagentOptions.Rootless = UNDEFINED; nxagentOptions.Fullscreen = UNDEFINED; + nxagentOptions.NoRootlessExit = False; nxagentOptions.X = 0; nxagentOptions.Y = 0; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index 40cb1790e..0e4869926 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -381,6 +381,13 @@ typedef struct _AgentOptions int ImageRateLimit; + /* + * True if agent should not exit if there are no + * clients in rootless mode + */ + + int NoRootlessExit; + } AgentOptionsRec; typedef AgentOptionsRec *AgentOptionsPtr; -- cgit v1.2.3 From db870556433fd737640f7038e0583242724e2d52 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:29:53 +0100 Subject: Fix repainting of SolidFill pictures with libcairo > 1.12.x (204_nxagent_repaint-solidpict.full.patch). --- .../204_nxagent_repaint-solidpict.full.patch | 53 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Render.c | 16 +++++-- nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c | 4 ++ .../programs/Xserver/hw/nxagent/X/NXpicturestr.h | 1 + 5 files changed, 16 insertions(+), 59 deletions(-) delete mode 100644 debian/patches/204_nxagent_repaint-solidpict.full.patch (limited to 'debian') diff --git a/debian/patches/204_nxagent_repaint-solidpict.full.patch b/debian/patches/204_nxagent_repaint-solidpict.full.patch deleted file mode 100644 index 139a46ad3..000000000 --- a/debian/patches/204_nxagent_repaint-solidpict.full.patch +++ /dev/null @@ -1,53 +0,0 @@ -Description: Fix repainting of SolidFill pictures with libcairo > 1.12.x -Author: Oleksandr Shneyder -diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c ---- a/nx-X11/programs/Xserver/hw/nxagent/Render.c 2012-05-16 18:05:07.000000000 +0200 -+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c 2012-09-20 20:53:37.893459269 +0200 -@@ -2689,11 +2689,17 @@ void nxagentReconnectPicture(pointer p0, - #endif - } - -- if (!pForm) -+ if (!pForm && pPicture->pSourcePict) - { -- *pBool = False; -- -- return; -+ /*possible we need to add support for other picture types, for example gradients...*/ -+ switch(pPicture->pSourcePict->type) -+ { -+ case SourcePictTypeSolidFill: -+ nxagentPicturePriv(pPicture) -> picture = XRenderCreateSolidFill(nxagentDisplay, -+ (const XRenderColor*) &pPicture->pSourcePict->solidFill.fullColor); -+ break; -+ } -+ return; - } - - #ifdef TEST -diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c 2010-11-11 21:18:00.000000000 +0100 -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c 2012-09-20 20:54:50.209817849 +0200 -@@ -1137,6 +1137,10 @@ CreateSolidPicture (Picture pid, xRender - } - pPicture->pSourcePict->type = SourcePictTypeSolidFill; - pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color); -+ pPicture->pSourcePict->solidFill.fullColor.alpha=color->alpha; -+ pPicture->pSourcePict->solidFill.fullColor.red=color->red; -+ pPicture->pSourcePict->solidFill.fullColor.green=color->green; -+ pPicture->pSourcePict->solidFill.fullColor.blue=color->blue; - return pPicture; - } - -diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h 2010-10-22 16:04:24.000000000 +0200 -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h 2012-09-20 20:55:31.106020653 +0200 -@@ -95,6 +95,7 @@ typedef struct _PictTransform { - typedef struct _PictSolidFill { - unsigned int type; - CARD32 color; -+ xRenderColor fullColor; - } PictSolidFill, *PictSolidFillPtr; - - typedef struct _PictGradientStop { - diff --git a/debian/patches/series b/debian/patches/series index 424c3e990..82d5eb9aa 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -204_nxagent_repaint-solidpict.full.patch 205_nxagent_refresh-adsl.full.patch 206_nxagent_clipboard-as-nxoption.full.patch 207_nxagent_fix-xfixes-selection.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 29bffaa35..41a1ec02e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -2689,11 +2689,17 @@ void nxagentReconnectPicture(pointer p0, XID x1, void *p2) #endif } - if (!pForm) - { - *pBool = False; - - return; + if (!pForm && pPicture->pSourcePict) + { + /*possible we need to add support for other picture types, for example gradients...*/ + switch(pPicture->pSourcePict->type) + { + case SourcePictTypeSolidFill: + nxagentPicturePriv(pPicture) -> picture = XRenderCreateSolidFill(nxagentDisplay, + (const XRenderColor*) &pPicture->pSourcePict->solidFill.fullColor); + break; + } + return; } #ifdef TEST diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c index d9054b4b6..4b342ebcf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c @@ -1137,6 +1137,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) } pPicture->pSourcePict->type = SourcePictTypeSolidFill; pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color); + pPicture->pSourcePict->solidFill.fullColor.alpha=color->alpha; + pPicture->pSourcePict->solidFill.fullColor.red=color->red; + pPicture->pSourcePict->solidFill.fullColor.green=color->green; + pPicture->pSourcePict->solidFill.fullColor.blue=color->blue; return pPicture; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h index 0d1a8e1d8..b2679257c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h @@ -95,6 +95,7 @@ typedef struct _PictTransform { typedef struct _PictSolidFill { unsigned int type; CARD32 color; + xRenderColor fullColor; } PictSolidFill, *PictSolidFillPtr; typedef struct _PictGradientStop { -- cgit v1.2.3 From 35aab85c79200d861c906b691bf8b6be99d58590 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:32:12 +0100 Subject: Fix refresh errors on Win2012 RDP connections with speed=ADS (205_nxagent_refresh-adsl.full.patch). --- debian/patches/205_nxagent_refresh-adsl.full.patch | 14 -------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 debian/patches/205_nxagent_refresh-adsl.full.patch (limited to 'debian') diff --git a/debian/patches/205_nxagent_refresh-adsl.full.patch b/debian/patches/205_nxagent_refresh-adsl.full.patch deleted file mode 100644 index 4840ea7ce..000000000 --- a/debian/patches/205_nxagent_refresh-adsl.full.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: Fix refresh errors on Win2012 RDP connections with speed=ADSL -Author: Oleksandr Shneyder -diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c ---- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c 2014-05-06 12:52:35.082288455 +0200 -+++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c 2014-05-06 12:54:00.258710819 +0200 -@@ -339,7 +339,7 @@ FIXME: The popup could be synchronized w - */ - - if ((pDstDrawable -> type == DRAWABLE_PIXMAP && -- nxagentOption(DeferLevel) > 0) || nxagentOption(DeferLevel) >= 2) -+ nxagentOption(DeferLevel) > 0) || nxagentOption(DeferLevel) >= 3) - { - pClipRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, - width, height); diff --git a/debian/patches/series b/debian/patches/series index 82d5eb9aa..4bbe897df 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -205_nxagent_refresh-adsl.full.patch 206_nxagent_clipboard-as-nxoption.full.patch 207_nxagent_fix-xfixes-selection.full.patch 209_x2goagent_add-man-page.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index e18b034eb..c489d12c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -339,7 +339,7 @@ FIXME: The popup could be synchronized with one */ if ((pDstDrawable -> type == DRAWABLE_PIXMAP && - nxagentOption(DeferLevel) > 0) || nxagentOption(DeferLevel) >= 2) + nxagentOption(DeferLevel) > 0) || nxagentOption(DeferLevel) >= 3) { pClipRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, width, height); -- cgit v1.2.3 From 4ef611eea9b10ed5851abb990835ce73bbac6a9f Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:33:51 +0100 Subject: Add -clipboard cmdline option to nxagent (206_nxagent_clipboard-as-nxoption.full.patch). --- .../206_nxagent_clipboard-as-nxoption.full.patch | 53 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Args.c | 27 ++++++++++- 3 files changed, 25 insertions(+), 56 deletions(-) delete mode 100644 debian/patches/206_nxagent_clipboard-as-nxoption.full.patch (limited to 'debian') diff --git a/debian/patches/206_nxagent_clipboard-as-nxoption.full.patch b/debian/patches/206_nxagent_clipboard-as-nxoption.full.patch deleted file mode 100644 index 12b51dc0e..000000000 --- a/debian/patches/206_nxagent_clipboard-as-nxoption.full.patch +++ /dev/null @@ -1,53 +0,0 @@ -Descripion: Add -clipboard cmdline option to nxagent -Author: Mike Gabriel - ---- a/nx-X11/programs/Xserver/hw/nxagent/Args.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c -@@ -984,7 +984,7 @@ - - if (!strcmp(argv[i], "-clipboard")) - { -- if (!strcmp(argv[i+1], "both")) -+ if ((!strcmp(argv[i+1], "both")) || (!strcmp(argv[i+1], "1"))) - { - nxagentChangeOption(Clipboard, ClipboardBoth); - } -@@ -996,7 +996,7 @@ - { - nxagentChangeOption(Clipboard, ClipboardServer); - } -- else if (!strcmp(argv[i+1], "none")) -+ else if ((!strcmp(argv[i+1], "none")) || (!strcmp(argv[i+1], "1"))) - { - nxagentChangeOption(Clipboard, ClipboardNone); - } -@@ -1255,6 +1255,29 @@ - - return; - } -+ else if (strcmp(name, "clipboard") == 0) -+ { -+ if ((strcmp(value, "both") == 0) || (strcmp(value, "1") == 0)) -+ { -+ nxagentChangeOption(Clipboard, ClipboardBoth); -+ } -+ else if (strcmp(value, "client") == 0) -+ { -+ nxagentChangeOption(Clipboard, ClipboardClient); -+ } -+ else if (strcmp(value, "server") == 0) -+ { -+ nxagentChangeOption(Clipboard, ClipboardServer); -+ } -+ else if ((strcmp(value, "none") == 0) || (strcmp(value, "0") == 0)) -+ { -+ nxagentChangeOption(Clipboard, ClipboardNone); -+ } -+ else -+ { -+ nxagentChangeOption(Clipboard, ClipboardBoth); -+ } -+ } - else - { - #ifdef DEBUG diff --git a/debian/patches/series b/debian/patches/series index 4bbe897df..dbc6d9ce6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -206_nxagent_clipboard-as-nxoption.full.patch 207_nxagent_fix-xfixes-selection.full.patch 209_x2goagent_add-man-page.full.patch 210_nxagent_save_session_state.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 6666393e4..c72b9c4e8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -984,7 +984,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-clipboard")) { - if (!strcmp(argv[i+1], "both")) + if ((!strcmp(argv[i+1], "both")) || (!strcmp(argv[i+1], "1"))) { nxagentChangeOption(Clipboard, ClipboardBoth); } @@ -996,7 +996,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) { nxagentChangeOption(Clipboard, ClipboardServer); } - else if (!strcmp(argv[i+1], "none")) + else if ((!strcmp(argv[i+1], "none")) || (!strcmp(argv[i+1], "1"))) { nxagentChangeOption(Clipboard, ClipboardNone); } @@ -1255,6 +1255,29 @@ static void nxagentParseOptions(char *name, char *value) return; } + else if (strcmp(name, "clipboard") == 0) + { + if ((strcmp(value, "both") == 0) || (strcmp(value, "1") == 0)) + { + nxagentChangeOption(Clipboard, ClipboardBoth); + } + else if (strcmp(value, "client") == 0) + { + nxagentChangeOption(Clipboard, ClipboardClient); + } + else if (strcmp(value, "server") == 0) + { + nxagentChangeOption(Clipboard, ClipboardServer); + } + else if ((strcmp(value, "none") == 0) || (strcmp(value, "0") == 0)) + { + nxagentChangeOption(Clipboard, ClipboardNone); + } + else + { + nxagentChangeOption(Clipboard, ClipboardBoth); + } + } else { #ifdef DEBUG -- cgit v1.2.3 From 57a58c73cfe91c94d8a18a6e823bc687fab45d8f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 10 Feb 2015 19:36:57 +0100 Subject: Fix XFIXES selection handling (copy and paste via middle mouse button) (207_nxagent_fix-xfixes-selection.full.patch). When nxagent has the XFIXES extension enabled copy and paste from outside applications to applications within the session that rely on XFixesSelectSelectionInput (e.g. qt applications like konsole) did never receive any notifications because the nxagent did not register itself at the real X server to receive them. Fixes X2Go Bug #585 (http://bugs.x2go.org/585). --- .../207_nxagent_fix-xfixes-selection.full.patch | 33 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 12 +++++--- 3 files changed, 8 insertions(+), 38 deletions(-) delete mode 100644 debian/patches/207_nxagent_fix-xfixes-selection.full.patch (limited to 'debian') diff --git a/debian/patches/207_nxagent_fix-xfixes-selection.full.patch b/debian/patches/207_nxagent_fix-xfixes-selection.full.patch deleted file mode 100644 index 712b36914..000000000 --- a/debian/patches/207_nxagent_fix-xfixes-selection.full.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: Fix XFIXES selection handling (copy and paste via middle mouse button). -Abstract: - When nxagent has the XFIXES extension enabled copy and - paste from outside applications to applications within the session - that rely on XFixesSelectSelectionInput (e.g. qt applications like - konsole) did never receive any notifications because the nxagent did - not register itself at the real X server to receive them. Fixes Bug - #585. -Author: Ulrich Sibiller - -Index: nx-libs/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c -=================================================================== ---- nx-libs.orig/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c 2014-11-04 22:42:50.893569624 +0100 -+++ nx-libs/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c 2014-11-04 22:42:50.893569624 +0100 -@@ -1556,10 +1556,14 @@ - fprintf(stderr, "nxagentInitClipboard: Registering for XFixesSelectionNotify events.\n"); - #endif - -- XFixesSelectSelectionInput(nxagentDisplay, iWindow, nxagentClipboardAtom, -- XFixesSetSelectionOwnerNotifyMask | -- XFixesSelectionWindowDestroyNotifyMask | -- XFixesSelectionClientCloseNotifyMask); -+ for (i = 0; i < nxagentMaxSelections; i++) -+ { -+ XFixesSelectSelectionInput(nxagentDisplay, iWindow, -+ lastSelectionOwner[i].selection, -+ XFixesSetSelectionOwnerNotifyMask | -+ XFixesSelectionWindowDestroyNotifyMask | -+ XFixesSelectionClientCloseNotifyMask); -+ } - - nxagentXFixesInfo.Initialized = 1; - } diff --git a/debian/patches/series b/debian/patches/series index dbc6d9ce6..4ebb735ca 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -207_nxagent_fix-xfixes-selection.full.patch 209_x2goagent_add-man-page.full.patch 210_nxagent_save_session_state.full.patch 210_nxcomp_save_session_state.full+lite.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 2e409e41c..557798e7f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1556,10 +1556,14 @@ int nxagentInitClipboard(WindowPtr pWin) fprintf(stderr, "nxagentInitClipboard: Registering for XFixesSelectionNotify events.\n"); #endif - XFixesSelectSelectionInput(nxagentDisplay, iWindow, nxagentClipboardAtom, - XFixesSetSelectionOwnerNotifyMask | - XFixesSelectionWindowDestroyNotifyMask | - XFixesSelectionClientCloseNotifyMask); + for (i = 0; i < nxagentMaxSelections; i++) + { + XFixesSelectSelectionInput(nxagentDisplay, iWindow, + lastSelectionOwner[i].selection, + XFixesSetSelectionOwnerNotifyMask | + XFixesSelectionWindowDestroyNotifyMask | + XFixesSelectionClientCloseNotifyMask); + } nxagentXFixesInfo.Initialized = 1; } -- cgit v1.2.3 From 4a6ccd5037c8410f24dc177c9286272c2f47cd9d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 19:38:45 +0100 Subject: Add x2goagent man page (209_x2goagent_add-man-page.full.patch). --- .../patches/209_x2goagent_add-man-page.full.patch | 41 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 | 35 ++++++++++++++++++ 3 files changed, 35 insertions(+), 42 deletions(-) delete mode 100644 debian/patches/209_x2goagent_add-man-page.full.patch create mode 100644 nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 (limited to 'debian') diff --git a/debian/patches/209_x2goagent_add-man-page.full.patch b/debian/patches/209_x2goagent_add-man-page.full.patch deleted file mode 100644 index 310fa87d6..000000000 --- a/debian/patches/209_x2goagent_add-man-page.full.patch +++ /dev/null @@ -1,41 +0,0 @@ -Description: Add x2goagent man page -Author: Mike Gabriel - ---- /dev/null -+++ b/nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 -@@ -0,0 +1,35 @@ -+.TH x2goagent 1 -+.SH NAME -+x2goagent \- X2Go Agent. -+.SH SYNOPSIS -+.B x2goagent -+.I "[options]" -+ -+.SH DESCRIPTION -+\fBx2goagent\fR is an Xnest-like X server for remote application/desktop access. -+.PP -+\fBx2goagent\fR implements a very efficient compression of the X11 protocol. -+.PP -+This increases performance when using X applications over high latency and -+low bandwidth networks, while providing a local (LAN-like) usage experience -+even if connecting from off-site locations (via cable modem or GSM). -+.PP -+\fBx2goagent\fR is not designed to be used as a standalone application. -+It has to be launched on the server side by the X2Go server software. -+.PP -+Available clients are -+\fBx2goclient\fR, \fBpyhoca-gui\fR and \fBpyhoca-gui\fR (using the -+Python X2Go API). -+ -+.SH OPTIONS -+.TP -+.B \--help -+Lists all others options that are not listed here. -+ -+.SH FURTHER READINGS -+Information on X2Go: http://wiki.x2go.org -+.PP -+Information on NX: http://www.nomachine.com -+ -+.SH AUTHOR -+This manual page was written by Mike Gabriel . diff --git a/debian/patches/series b/debian/patches/series index 4ebb735ca..48b9abddc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -209_x2goagent_add-man-page.full.patch 210_nxagent_save_session_state.full.patch 210_nxcomp_save_session_state.full+lite.patch 211_nxcomp_set_default_options.full+lite.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 new file mode 100644 index 000000000..b9e8ddab5 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 @@ -0,0 +1,35 @@ +.TH x2goagent 1 +.SH NAME +x2goagent \- X2Go Agent. +.SH SYNOPSIS +.B x2goagent +.I "[options]" + +.SH DESCRIPTION +\fBx2goagent\fR is an Xnest-like X server for remote application/desktop access. +.PP +\fBx2goagent\fR implements a very efficient compression of the X11 protocol. +.PP +This increases performance when using X applications over high latency and +low bandwidth networks, while providing a local (LAN-like) usage experience +even if connecting from off-site locations (via cable modem or GSM). +.PP +\fBx2goagent\fR is not designed to be used as a standalone application. +It has to be launched on the server side by the X2Go server software. +.PP +Available clients are +\fBx2goclient\fR, \fBpyhoca-gui\fR and \fBpyhoca-gui\fR (using the +Python X2Go API). + +.SH OPTIONS +.TP +.B \--help +Lists all others options that are not listed here. + +.SH FURTHER READINGS +Information on X2Go: http://wiki.x2go.org +.PP +Information on NX: http://www.nomachine.com + +.SH AUTHOR +This manual page was written by Mike Gabriel . -- cgit v1.2.3 From 8c1b852abf692af4898368132292eb8c7278a7c2 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:43:41 +0100 Subject: Save session state in file. 210_nxagent_save_session_state.full.patch 210_nxcomp_save_session_state.full+lite.patch This patch adds a "state" option to NX (agent) which allows one to specify a file where nxagent will write its session state into. --- .../210_nxagent_save_session_state.full.patch | 176 --------------------- .../210_nxcomp_save_session_state.full+lite.patch | 15 -- debian/patches/series | 2 - nx-X11/programs/Xserver/hw/nxagent/Args.c | 11 ++ nx-X11/programs/Xserver/hw/nxagent/Init.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 33 ++++ nx-X11/programs/Xserver/hw/nxagent/Reconnect.h | 2 + nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c | 3 + nxcomp/Loop.cpp | 3 +- 9 files changed, 53 insertions(+), 195 deletions(-) delete mode 100644 debian/patches/210_nxagent_save_session_state.full.patch delete mode 100644 debian/patches/210_nxcomp_save_session_state.full+lite.patch (limited to 'debian') diff --git a/debian/patches/210_nxagent_save_session_state.full.patch b/debian/patches/210_nxagent_save_session_state.full.patch deleted file mode 100644 index 223d0bc7a..000000000 --- a/debian/patches/210_nxagent_save_session_state.full.patch +++ /dev/null @@ -1,176 +0,0 @@ -Description: Save session state in file -Author: Oleksandr Shneyder - ---- a/nx-X11/programs/Xserver/hw/nxagent/Args.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c -@@ -60,6 +60,7 @@ - #endif - #include "Handlers.h" - #include "Error.h" -+#include "Reconnect.h" - - /* - * NX includes and definitions. -@@ -1090,6 +1091,11 @@ - - return; - } -+ else if (!strcmp(name, "state")) -+ { -+ setStatePath(value); -+ return; -+ } - else if (!strcmp(name, "fullscreen")) - { - if (nxagentReconnectTrap == True) -@@ -1369,6 +1375,11 @@ - validateString(nxagentOptionFile)); - #endif - -+ /* -+ * Init statePath -+ */ -+ setStatePath(""); -+ - if (nxagentOptionFile == NULL) - { - return; ---- a/nx-X11/programs/Xserver/hw/nxagent/Init.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c -@@ -63,7 +63,7 @@ - - #include "NX.h" - #include "NXlib.h" -- -+#include "Reconnect.h" - /* - * Set here the required log level. - */ -@@ -233,6 +233,7 @@ - fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid()); - - fprintf(stderr, "Session: Starting session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("STARTING"); - } - - /* ---- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c -@@ -118,6 +118,33 @@ - - static enum RECONNECTION_STEP failedStep; - -+#include -+ -+/* -+ * Path of state File -+ */ -+char stateFile[PATH_MAX]; -+ -+ -+void setStatePath(char* path) -+{ -+ strncpy(stateFile, path, PATH_MAX-1); -+} -+ -+void saveAgentState(char* state) -+{ -+ FILE* fptr; -+ if(strlen(stateFile)) -+ { -+ fptr=fopen(stateFile, "w"); -+ if(!fptr) -+ return; -+ fprintf(fptr,"%s", state); -+ fclose(fptr); -+ } -+} -+ -+ - int nxagentHandleConnectionStates(void) - { - #ifdef TEST -@@ -211,6 +238,7 @@ - fprintf(stderr, "Session: Display failure detected at '%s'.\n", GetTimeAsString()); - - fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("SUSPENDING"); - } - - nxagentDisconnectSession(); -@@ -265,6 +293,7 @@ - fprintf(stderr, "Session: Session suspended at '%s'.\n", GetTimeAsString()); - #endif - } -+ saveAgentState("SUSPENDED"); - - nxagentResetDisplayHandlers(); - -@@ -622,6 +651,7 @@ - #else - fprintf(stderr, "Session: Session resumed at '%s'.\n", GetTimeAsString()); - #endif -+ saveAgentState("RUNNING"); - - nxagentRemoveSplashWindow(NULL); - -@@ -785,12 +815,14 @@ - if (nxagentSessionState == SESSION_GOING_DOWN) - { - fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("SUSPENDING"); - - nxagentDisconnectSession(); - } - else if (nxagentSessionState == SESSION_GOING_UP) - { - fprintf(stderr, "Session: Resuming session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("RESUMING"); - - if (nxagentReconnectSession()) - { -@@ -803,6 +835,7 @@ - fprintf(stderr, "Session: Display failure detected at '%s'.\n", GetTimeAsString()); - - fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("SUSPENDING"); - - nxagentDisconnectSession(); - } ---- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h -@@ -34,6 +34,8 @@ - Bool nxagentReconnectSession(void); - int nxagentHandleConnectionStates(void); - void nxagentHandleConnectionChanges(void); -+void setStatePath(char*); -+void saveAgentState(char*); - - enum SESSION_STATE - { ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c -@@ -609,6 +609,7 @@ - #endif - - nxagentSessionState = SESSION_UP; -+ saveAgentState("RUNNING"); - } - - #ifdef BLOCKS -@@ -823,6 +824,7 @@ - */ - - fprintf(stderr, "Session: Terminating session at '%s'.\n", GetTimeAsString()); -+ saveAgentState("TERMINATING"); - - nxagentWaitDisplay(); - -@@ -833,6 +835,7 @@ - { - NXShadowDestroy(); - } -+ saveAgentState("TERMINATED"); - - KillAllClients(); - DEALLOCATE_LOCAL(clientReady); diff --git a/debian/patches/210_nxcomp_save_session_state.full+lite.patch b/debian/patches/210_nxcomp_save_session_state.full+lite.patch deleted file mode 100644 index 1ef4440d8..000000000 --- a/debian/patches/210_nxcomp_save_session_state.full+lite.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Ignore state= option in nxproxy/nxcomp -Author: Oleksandr Shneyder - ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -8872,7 +8872,8 @@ - } - else if (strcasecmp(name, "defer") == 0 || - strcasecmp(name, "tile") == 0 || -- strcasecmp(name, "menu") == 0) -+ strcasecmp(name, "menu") == 0 || -+ strcasecmp(name, "state") == 0 ) - { - #ifdef DEBUG - *logofs << "Loop: Ignoring agent option '" << name diff --git a/debian/patches/series b/debian/patches/series index 48b9abddc..9e0e64701 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ -210_nxagent_save_session_state.full.patch -210_nxcomp_save_session_state.full+lite.patch 211_nxcomp_set_default_options.full+lite.patch 212_nxcomp_build-on-Android.full+lite.patch 220_nxproxy_bind-loopback-only.full+lite.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index c72b9c4e8..7074a1818 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -60,6 +60,7 @@ is" without express or implied warranty. #endif #include "Handlers.h" #include "Error.h" +#include "Reconnect.h" /* * NX includes and definitions. @@ -1090,6 +1091,11 @@ static void nxagentParseOptions(char *name, char *value) return; } + else if (!strcmp(name, "state")) + { + setStatePath(value); + return; + } else if (!strcmp(name, "fullscreen")) { if (nxagentReconnectTrap == True) @@ -1369,6 +1375,11 @@ void nxagentProcessOptionsFile() validateString(nxagentOptionFile)); #endif + /* + * Init statePath + */ + setStatePath(""); + if (nxagentOptionFile == NULL) { return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 1794f1551..8d4eed2b6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -63,7 +63,7 @@ is" without express or implied warranty. #include "NX.h" #include "NXlib.h" - +#include "Reconnect.h" /* * Set here the required log level. */ @@ -233,6 +233,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid()); fprintf(stderr, "Session: Starting session at '%s'.\n", GetTimeAsString()); + saveAgentState("STARTING"); } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 3c576c6e0..b26fa9cfe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -118,6 +118,33 @@ void *reconnectLossyLevel[STEP_NONE]; static enum RECONNECTION_STEP failedStep; +#include + +/* + * Path of state File + */ +char stateFile[PATH_MAX]; + + +void setStatePath(char* path) +{ + strncpy(stateFile, path, PATH_MAX-1); +} + +void saveAgentState(char* state) +{ + FILE* fptr; + if(strlen(stateFile)) + { + fptr=fopen(stateFile, "w"); + if(!fptr) + return; + fprintf(fptr,"%s", state); + fclose(fptr); + } +} + + int nxagentHandleConnectionStates(void) { #ifdef TEST @@ -211,6 +238,7 @@ TODO: This should be reset only when fprintf(stderr, "Session: Display failure detected at '%s'.\n", GetTimeAsString()); fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); + saveAgentState("SUSPENDING"); } nxagentDisconnectSession(); @@ -265,6 +293,7 @@ TODO: This should be reset only when fprintf(stderr, "Session: Session suspended at '%s'.\n", GetTimeAsString()); #endif } + saveAgentState("SUSPENDED"); nxagentResetDisplayHandlers(); @@ -622,6 +651,7 @@ Bool nxagentReconnectSession(void) #else fprintf(stderr, "Session: Session resumed at '%s'.\n", GetTimeAsString()); #endif + saveAgentState("RUNNING"); nxagentRemoveSplashWindow(NULL); @@ -785,12 +815,14 @@ void nxagentHandleConnectionChanges() if (nxagentSessionState == SESSION_GOING_DOWN) { fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); + saveAgentState("SUSPENDING"); nxagentDisconnectSession(); } else if (nxagentSessionState == SESSION_GOING_UP) { fprintf(stderr, "Session: Resuming session at '%s'.\n", GetTimeAsString()); + saveAgentState("RESUMING"); if (nxagentReconnectSession()) { @@ -803,6 +835,7 @@ void nxagentHandleConnectionChanges() fprintf(stderr, "Session: Display failure detected at '%s'.\n", GetTimeAsString()); fprintf(stderr, "Session: Suspending session at '%s'.\n", GetTimeAsString()); + saveAgentState("SUSPENDING"); nxagentDisconnectSession(); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h index c321bfada..5be2928b8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h @@ -34,6 +34,8 @@ void nxagentInitReconnector(void); Bool nxagentReconnectSession(void); int nxagentHandleConnectionStates(void); void nxagentHandleConnectionChanges(void); +void setStatePath(char*); +void saveAgentState(char*); enum SESSION_STATE { diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c index 69ad30d2d..f18c09fe4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c @@ -609,6 +609,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #endif nxagentSessionState = SESSION_UP; + saveAgentState("RUNNING"); } #ifdef BLOCKS @@ -823,6 +824,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio */ fprintf(stderr, "Session: Terminating session at '%s'.\n", GetTimeAsString()); + saveAgentState("TERMINATING"); nxagentWaitDisplay(); @@ -833,6 +835,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio { NXShadowDestroy(); } + saveAgentState("TERMINATED"); KillAllClients(); DEALLOCATE_LOCAL(clientReady); diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 7e2b990de..12a858b0f 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -8872,7 +8872,8 @@ int ParseEnvironmentOptions(const char *env, int force) } else if (strcasecmp(name, "defer") == 0 || strcasecmp(name, "tile") == 0 || - strcasecmp(name, "menu") == 0) + strcasecmp(name, "menu") == 0 || + strcasecmp(name, "state") == 0 ) { #ifdef DEBUG *logofs << "Loop: Ignoring agent option '" << name -- cgit v1.2.3 From 46c2aebca5196ad4c10bb4f6f2558d656c22f5d9 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 19:46:04 +0100 Subject: Set default pack and link options to avoid damage of session (211_nxcomp_set_default_options.full+lite.patch). --- .../211_nxcomp_set_default_options.full+lite.patch | 27 ---------------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 8 +++---- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 debian/patches/211_nxcomp_set_default_options.full+lite.patch (limited to 'debian') diff --git a/debian/patches/211_nxcomp_set_default_options.full+lite.patch b/debian/patches/211_nxcomp_set_default_options.full+lite.patch deleted file mode 100644 index 7bd8a781d..000000000 --- a/debian/patches/211_nxcomp_set_default_options.full+lite.patch +++ /dev/null @@ -1,27 +0,0 @@ -Description: Set default pack and link options to avoid damage of session. -Author: Oleksandr Shneyder - ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -8328,8 +8328,8 @@ - - cerr << "Error" << ": Can't identify 'link' option in string '" - << value << "'.\n"; -- -- return -1; -+ if (ParseLinkOption("adsl") < 0) -+ return -1; - } - } - else if (strcasecmp(name, "limit") == 0) -@@ -8783,8 +8783,8 @@ - - cerr << "Error" << ": Can't identify pack method for string '" - << value << "'.\n"; -- -- return -1; -+ if (ParsePackOption("nopack")<0) -+ return -1; - } - } - else if (strcasecmp(name, "core") == 0) diff --git a/debian/patches/series b/debian/patches/series index 9e0e64701..0174ca194 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -211_nxcomp_set_default_options.full+lite.patch 212_nxcomp_build-on-Android.full+lite.patch 220_nxproxy_bind-loopback-only.full+lite.patch 300_nxagent_set-wm-class.full.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 12a858b0f..d5c8eb25d 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -8328,8 +8328,8 @@ int ParseEnvironmentOptions(const char *env, int force) cerr << "Error" << ": Can't identify 'link' option in string '" << value << "'.\n"; - - return -1; + if (ParseLinkOption("adsl") < 0) + return -1; } } else if (strcasecmp(name, "limit") == 0) @@ -8783,8 +8783,8 @@ int ParseEnvironmentOptions(const char *env, int force) cerr << "Error" << ": Can't identify pack method for string '" << value << "'.\n"; - - return -1; + if (ParsePackOption("nopack")<0) + return -1; } } else if (strcasecmp(name, "core") == 0) -- cgit v1.2.3 From 79f218b563f6a4d3b17e92ee85ad242575daf8da Mon Sep 17 00:00:00 2001 From: Nito Martinez Date: Tue, 10 Feb 2015 19:47:58 +0100 Subject: Fix FTBFS of nxproxy/nxcomp on Android (212_nxcomp_build-on-Android.full+lite.patch). --- .../212_nxcomp_build-on-Android.full+lite.patch | 253 --------------------- debian/patches/series | 1 - nxcomp/Jpeg.cpp | 3 + nxcomp/Loop.cpp | 12 +- nxcomp/Pgn.cpp | 3 + nxcomp/Proxy.cpp | 7 + nxcomp/ServerChannel.cpp | 52 ++++- 7 files changed, 64 insertions(+), 267 deletions(-) delete mode 100644 debian/patches/212_nxcomp_build-on-Android.full+lite.patch (limited to 'debian') diff --git a/debian/patches/212_nxcomp_build-on-Android.full+lite.patch b/debian/patches/212_nxcomp_build-on-Android.full+lite.patch deleted file mode 100644 index 528d33b74..000000000 --- a/debian/patches/212_nxcomp_build-on-Android.full+lite.patch +++ /dev/null @@ -1,253 +0,0 @@ -Author: Nito Martinez -Description: Fix FTBFS of nxproxy/nxcomp on Android - ---- a/nxcomp/Jpeg.cpp -+++ b/nxcomp/Jpeg.cpp -@@ -17,6 +17,9 @@ - - #include - -+#ifdef ANDROID -+#include -+#endif - #include - #include - #include ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -4187,7 +4187,7 @@ - - #endif - -- char *separator = rindex(display, ':'); -+ char *separator = strrchr(display, ':'); - - if ((separator == NULL) || !isdigit(*(separator + 1))) - { -@@ -8240,7 +8240,7 @@ - char *name; - char *value; - -- value = rindex(nextOpts, ':'); -+ value = strrchr(nextOpts, ':'); - - if (value != NULL) - { -@@ -11010,7 +11010,7 @@ - packMethod == PACK_LOSSLESS || - packMethod == PACK_ADAPTIVE) - { -- const char *dash = rindex(opt, '-'); -+ const char *dash = strrchr(opt, '-'); - - if (dash != NULL && strlen(dash) == 2 && - *(dash + 1) >= '0' && *(dash + 1) <= '9') -@@ -12275,6 +12275,10 @@ - control -> ShmemServer = 0; - } - -+ // For android, no shared memory available -+ control -> ShmemServer = 0; -+ control -> ShmemClientSize = 0; -+ - return 1; - } - -@@ -13525,7 +13529,7 @@ - - int newPort = port; - -- const char *separator = rindex(opt, ':'); -+ const char *separator = strrchr(opt, ':'); - - if (separator != NULL) - { ---- a/nxcomp/Pgn.cpp -+++ b/nxcomp/Pgn.cpp -@@ -23,6 +23,9 @@ - - #include - -+#ifdef ANDROID -+#include -+#endif - #include - #include - #include ---- a/nxcomp/Proxy.cpp -+++ b/nxcomp/Proxy.cpp -@@ -20,6 +20,11 @@ - #include - #include - #include -+#ifdef ANDROID -+#include -+#include -+#include -+#endif - - #include "Misc.h" - -@@ -31,9 +36,11 @@ - #include - #endif - -+#ifndef ANDROID - #include - #include - #include -+#endif - - #if defined(__EMX__ ) || defined(__CYGWIN32__) - ---- a/nxcomp/ServerChannel.cpp -+++ b/nxcomp/ServerChannel.cpp -@@ -18,7 +18,9 @@ - #include - #include - #include -+#ifndef ANDROID - #include -+#endif - - #include - #include -@@ -1079,7 +1081,6 @@ - - priority_++; - } -- - // - // Account this data to the original opcode. - // -@@ -1500,7 +1501,6 @@ - continue; - } - } -- - // - // Check if user pressed the CTRL+ALT+SHIFT+ESC key - // sequence because was unable to kill the session -@@ -5475,7 +5475,7 @@ - *logofs << "handleColormap: Dumping colormap entries:\n" - << logofs_flush; - -- const unsigned char *p = unpackState_[resource] -> colormap -> data; -+ const unsigned char *p = (const unsigned char *) unpackState_[resource] -> colormap -> data; - - for (unsigned int i = 0; i < unpackState_[resource] -> - colormap -> entries; i++) -@@ -7100,7 +7100,12 @@ - { - encodeBuffer.encodeValue(stage, 2); - -+#ifndef ANDROID - shmemState_ -> present = *(buffer + 8); -+#else -+ shmemState_ -> present = 0; -+ cerr << "Info: handleShmemReply: In android no shared memory. Setting present to 0 hardcoded\n"; -+#endif - shmemState_ -> opcode = *(buffer + 9); - shmemState_ -> event = *(buffer + 10); - shmemState_ -> error = *(buffer + 11); -@@ -7128,7 +7133,12 @@ - cerr << "Info" << ": Using shared memory parameters 1/" - << (shmemState_ -> size / 1024) << "K.\n"; - -+#ifndef ANDROID - shmemState_ -> enabled = 1; -+#else -+ cerr << "Info: handleShmemReply: In android no shared memory. Setting enabled to -1. This should not be displayed\n"; -+ shmemState_ -> enabled = -1; -+#endif - - encodeBuffer.encodeBoolValue(1); - } -@@ -7241,7 +7251,7 @@ - // memory support is disabled by the - // user. - // -- -+#ifndef ANDROID - if (control -> ShmemServer == 1 && - control -> ShmemServerSize > 0 && - enableServer == 1) -@@ -7252,8 +7262,12 @@ - { - memcpy(buffer + 8, "NO-MIT-", 7); - } -+#else -+ cerr << "Info: handleShmemRequest: In android no shared memory. Returning NO-MIT- answer\n"; - -- sequenceQueue_.push(clientSequence_, opcode, -+ memcpy(buffer + 8, "NO-MIT-", 7); -+#endif -+ sequenceQueue_.push(clientSequence_, opcode, - opcodeStore_ -> getShmemParameters, stage); - - // -@@ -7289,9 +7303,13 @@ - - shmemState_ -> size = control -> ShmemServerSize; - -+#ifndef ANDROID - shmemState_ -> id = shmget(IPC_PRIVATE, shmemState_ -> size, - IPC_CREAT | permissions); -- -+#else -+ cerr << "Info: handleShmemReqyest: In android no shared memory (shmget). This message should not be displayed present should never be 1 in android\n"; -+ shmemState_ -> id = -1; -+#endif - if (shmemState_ -> id >= 0) - { - #if defined(TEST) || defined(INFO) -@@ -7302,8 +7320,12 @@ - #endif - - -+#ifndef ANDROID - shmemState_ -> address = shmat(shmemState_ -> id, 0, 0); -- -+#else -+ cerr << "Info: handleShmemReqyest: In android no shared memory (shmat). This message should not be displayed. present should never be 1 in android\n"; -+ shmemState_ -> address = NULL; -+#endif - if (shmemState_ -> address != NULL) - { - #ifdef TEST -@@ -7437,6 +7459,10 @@ - - return 0; - } -+#ifdef ANDROID -+ cerr << "Info: handleShmem: In android no shared memory. enabled should never be 1. This should not be displayed\n"; -+ return 0; -+#endif - - // - // Ignore null requests and requests that will not result -@@ -8054,14 +8080,22 @@ - { - if (shmemState_ != NULL) - { -- if (shmemState_ -> address != NULL) -+ if (shmemState_ -> address != NULL) - { -- shmdt((char *) shmemState_ -> address); -+#ifndef ANDROID -+ shmdt((char *) shmemState_ -> address); -+#else -+ cerr << "Info: handleShmemStateRemove: In android no shared memory. This should not be displayed. address should always be NULL\n"; -+#endif - } - - if (shmemState_ -> id > 0) - { -+#ifndef ANDROID - shmctl(shmemState_ -> id, IPC_RMID, 0); -+#else -+ cerr << "Info: handleShmemStateRemove: In android no shared memory. This should not be displayed. id should always be 0\n"; -+#endif - } - - delete shmemState_; diff --git a/debian/patches/series b/debian/patches/series index 0174ca194..b6a467730 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -212_nxcomp_build-on-Android.full+lite.patch 220_nxproxy_bind-loopback-only.full+lite.patch 300_nxagent_set-wm-class.full.patch 301_nx-X11_use-shared-libs.full.patch diff --git a/nxcomp/Jpeg.cpp b/nxcomp/Jpeg.cpp index 9f71cbadf..414d373ef 100644 --- a/nxcomp/Jpeg.cpp +++ b/nxcomp/Jpeg.cpp @@ -17,6 +17,9 @@ #include +#ifdef ANDROID +#include +#endif #include #include #include diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index d5c8eb25d..05b514570 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -4187,7 +4187,7 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, #endif - char *separator = rindex(display, ':'); + char *separator = strrchr(display, ':'); if ((separator == NULL) || !isdigit(*(separator + 1))) { @@ -8240,7 +8240,7 @@ int ParseEnvironmentOptions(const char *env, int force) char *name; char *value; - value = rindex(nextOpts, ':'); + value = strrchr(nextOpts, ':'); if (value != NULL) { @@ -11010,7 +11010,7 @@ int ParsePackOption(const char *opt) packMethod == PACK_LOSSLESS || packMethod == PACK_ADAPTIVE) { - const char *dash = rindex(opt, '-'); + const char *dash = strrchr(opt, '-'); if (dash != NULL && strlen(dash) == 2 && *(dash + 1) >= '0' && *(dash + 1) <= '9') @@ -12275,6 +12275,10 @@ int SetShmem() control -> ShmemServer = 0; } + // For android, no shared memory available + control -> ShmemServer = 0; + control -> ShmemClientSize = 0; + return 1; } @@ -13525,7 +13529,7 @@ int ParseHostOption(const char *opt, char *host, int &port) int newPort = port; - const char *separator = rindex(opt, ':'); + const char *separator = strrchr(opt, ':'); if (separator != NULL) { diff --git a/nxcomp/Pgn.cpp b/nxcomp/Pgn.cpp index af26724ef..cdcde84ce 100644 --- a/nxcomp/Pgn.cpp +++ b/nxcomp/Pgn.cpp @@ -23,6 +23,9 @@ #include +#ifdef ANDROID +#include +#endif #include #include #include diff --git a/nxcomp/Proxy.cpp b/nxcomp/Proxy.cpp index d6c67e0e8..9b38661b4 100644 --- a/nxcomp/Proxy.cpp +++ b/nxcomp/Proxy.cpp @@ -20,6 +20,11 @@ #include #include #include +#ifdef ANDROID +#include +#include +#include +#endif #include "Misc.h" @@ -31,9 +36,11 @@ #include #endif +#ifndef ANDROID #include #include #include +#endif #if defined(__EMX__ ) || defined(__CYGWIN32__) diff --git a/nxcomp/ServerChannel.cpp b/nxcomp/ServerChannel.cpp index 4e6dea324..0f3a3e552 100644 --- a/nxcomp/ServerChannel.cpp +++ b/nxcomp/ServerChannel.cpp @@ -18,7 +18,9 @@ #include #include #include +#ifndef ANDROID #include +#endif #include #include @@ -1079,7 +1081,6 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m priority_++; } - // // Account this data to the original opcode. // @@ -1500,7 +1501,6 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m continue; } } - // // Check if user pressed the CTRL+ALT+SHIFT+ESC key // sequence because was unable to kill the session @@ -5475,7 +5475,7 @@ int ServerChannel::handleColormap(unsigned char &opcode, unsigned char *&buffer, *logofs << "handleColormap: Dumping colormap entries:\n" << logofs_flush; - const unsigned char *p = unpackState_[resource] -> colormap -> data; + const unsigned char *p = (const unsigned char *) unpackState_[resource] -> colormap -> data; for (unsigned int i = 0; i < unpackState_[resource] -> colormap -> entries; i++) @@ -7100,7 +7100,12 @@ int ServerChannel::handleShmemReply(EncodeBuffer &encodeBuffer, const unsigned c { encodeBuffer.encodeValue(stage, 2); +#ifndef ANDROID shmemState_ -> present = *(buffer + 8); +#else + shmemState_ -> present = 0; + cerr << "Info: handleShmemReply: In android no shared memory. Setting present to 0 hardcoded\n"; +#endif shmemState_ -> opcode = *(buffer + 9); shmemState_ -> event = *(buffer + 10); shmemState_ -> error = *(buffer + 11); @@ -7128,7 +7133,12 @@ int ServerChannel::handleShmemReply(EncodeBuffer &encodeBuffer, const unsigned c cerr << "Info" << ": Using shared memory parameters 1/" << (shmemState_ -> size / 1024) << "K.\n"; +#ifndef ANDROID shmemState_ -> enabled = 1; +#else + cerr << "Info: handleShmemReply: In android no shared memory. Setting enabled to -1. This should not be displayed\n"; + shmemState_ -> enabled = -1; +#endif encodeBuffer.encodeBoolValue(1); } @@ -7241,7 +7251,7 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char // memory support is disabled by the // user. // - +#ifndef ANDROID if (control -> ShmemServer == 1 && control -> ShmemServerSize > 0 && enableServer == 1) @@ -7252,8 +7262,12 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char { memcpy(buffer + 8, "NO-MIT-", 7); } +#else + cerr << "Info: handleShmemRequest: In android no shared memory. Returning NO-MIT- answer\n"; - sequenceQueue_.push(clientSequence_, opcode, + memcpy(buffer + 8, "NO-MIT-", 7); +#endif + sequenceQueue_.push(clientSequence_, opcode, opcodeStore_ -> getShmemParameters, stage); // @@ -7289,9 +7303,13 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char shmemState_ -> size = control -> ShmemServerSize; +#ifndef ANDROID shmemState_ -> id = shmget(IPC_PRIVATE, shmemState_ -> size, IPC_CREAT | permissions); - +#else + cerr << "Info: handleShmemReqyest: In android no shared memory (shmget). This message should not be displayed present should never be 1 in android\n"; + shmemState_ -> id = -1; +#endif if (shmemState_ -> id >= 0) { #if defined(TEST) || defined(INFO) @@ -7302,8 +7320,12 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char #endif +#ifndef ANDROID shmemState_ -> address = shmat(shmemState_ -> id, 0, 0); - +#else + cerr << "Info: handleShmemReqyest: In android no shared memory (shmat). This message should not be displayed. present should never be 1 in android\n"; + shmemState_ -> address = NULL; +#endif if (shmemState_ -> address != NULL) { #ifdef TEST @@ -7437,6 +7459,10 @@ int ServerChannel::handleShmem(unsigned char &opcode, unsigned char *&buffer, return 0; } +#ifdef ANDROID + cerr << "Info: handleShmem: In android no shared memory. enabled should never be 1. This should not be displayed\n"; + return 0; +#endif // // Ignore null requests and requests that will not result @@ -8054,14 +8080,22 @@ void ServerChannel::handleShmemStateRemove() { if (shmemState_ != NULL) { - if (shmemState_ -> address != NULL) + if (shmemState_ -> address != NULL) { - shmdt((char *) shmemState_ -> address); +#ifndef ANDROID + shmdt((char *) shmemState_ -> address); +#else + cerr << "Info: handleShmemStateRemove: In android no shared memory. This should not be displayed. address should always be NULL\n"; +#endif } if (shmemState_ -> id > 0) { +#ifndef ANDROID shmctl(shmemState_ -> id, IPC_RMID, 0); +#else + cerr << "Info: handleShmemStateRemove: In android no shared memory. This should not be displayed. id should always be 0\n"; +#endif } delete shmemState_; -- cgit v1.2.3 From 1be1c4a21bb54e60ec60456374d9ef55aaf55e2f Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 10 Feb 2015 21:11:27 +0100 Subject: Force NX proxy to bind to loopback devices only (loopback option) (220_nxproxy_bind-loopback-only.full+lite.patch). --- .../220_nxproxy_bind-loopback-only.full+lite.patch | 130 --------------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 41 ++++++- nxcomp/Misc.cpp | 10 ++ nxcomp/Misc.h | 8 ++ 5 files changed, 55 insertions(+), 135 deletions(-) delete mode 100644 debian/patches/220_nxproxy_bind-loopback-only.full+lite.patch (limited to 'debian') diff --git a/debian/patches/220_nxproxy_bind-loopback-only.full+lite.patch b/debian/patches/220_nxproxy_bind-loopback-only.full+lite.patch deleted file mode 100644 index c65b85501..000000000 --- a/debian/patches/220_nxproxy_bind-loopback-only.full+lite.patch +++ /dev/null @@ -1,130 +0,0 @@ -Description: Force NX proxy to bind to loopback devices only (loopback option) -Author: Mike Gabriel ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -952,6 +952,7 @@ - static char displayHost[DEFAULT_STRING_LENGTH] = { 0 }; - static char authCookie[DEFAULT_STRING_LENGTH] = { 0 }; - -+static int loopbackBind = DEFAULT_LOOPBACK_BIND; - static int proxyPort = DEFAULT_NX_PROXY_PORT; - static int xPort = DEFAULT_NX_X_PORT; - -@@ -3959,7 +3960,14 @@ - - tcpAddr.sin_family = AF_INET; - tcpAddr.sin_port = htons(proxyPortTCP); -- tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ if ( loopbackBind ) -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ } -+ else -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ } - - if (bind(tcpFD, (sockaddr *) &tcpAddr, sizeof(tcpAddr)) == -1) - { -@@ -4550,7 +4558,14 @@ - - tcpAddr.sin_family = AF_INET; - tcpAddr.sin_port = htons(portTCP); -- tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ if ( loopbackBind ) -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ } -+ else -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ } - - if (bind(newFD, (sockaddr *) &tcpAddr, sizeof(tcpAddr)) == -1) - { -@@ -6718,7 +6733,14 @@ - - #ifdef __APPLE__ - -- tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ if ( loopbackBind ) -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ } -+ else -+ { -+ tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); -+ } - - #else - -@@ -8397,6 +8419,10 @@ - - listenPort = ValidateArg("local", name, value); - } -+ else if (strcasecmp(name, "loopback") == 0) -+ { -+ loopbackBind = ValidateArg("local", name, value); -+ } - else if (strcasecmp(name, "accept") == 0) - { - if (*connectHost != '\0') -@@ -13778,7 +13804,14 @@ - } - else - { -- address = htonl(INADDR_ANY); -+ if ( loopbackBind ) -+ { -+ address = htonl(INADDR_LOOPBACK); -+ } -+ else -+ { -+ address = htonl(INADDR_ANY); -+ } - } - } - else ---- a/nxcomp/Misc.cpp -+++ b/nxcomp/Misc.cpp -@@ -42,6 +42,14 @@ - #undef DEBUG - - // -+// By default nxproxy binds to all network interfaces, setting -+// DEFAULT_LOOPBACK_BIND to 1 enables binding to the loopback -+// device only. -+// -+ -+const int DEFAULT_LOOPBACK_BIND = 0; -+ -+// - // TCP port offset applied to any NX port specification. - // - -@@ -137,6 +145,8 @@ - \n\ - listen=n Local port used for accepting the proxy connection.\n\ - \n\ -+ loopback=b Bind to the loopback device only.\n\ -+\n\ - accept=s Name or IP of host that can connect to the proxy.\n\ - \n\ - connect=s Name or IP of host that the proxy will connect to.\n\ ---- a/nxcomp/Misc.h -+++ b/nxcomp/Misc.h -@@ -90,6 +90,14 @@ - extern const int DEFAULT_NX_SLAVE_PORT_SERVER_OFFSET; - - // -+// NX proxy binds to all network interfaces by default -+// With the -loopback parameter, you can switch -+// over to binding to the loopback device only. -+// -+ -+extern const int DEFAULT_LOOPBACK_BIND; -+ -+// - // Return strings containing various info. - // - diff --git a/debian/patches/series b/debian/patches/series index b6a467730..30ed936f9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -220_nxproxy_bind-loopback-only.full+lite.patch 300_nxagent_set-wm-class.full.patch 301_nx-X11_use-shared-libs.full.patch 302_nx-X11_xkbbasedir-detection.full.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 05b514570..77b0c806c 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -952,6 +952,7 @@ static char listenHost[DEFAULT_STRING_LENGTH] = { 0 }; static char displayHost[DEFAULT_STRING_LENGTH] = { 0 }; static char authCookie[DEFAULT_STRING_LENGTH] = { 0 }; +static int loopbackBind = DEFAULT_LOOPBACK_BIND; static int proxyPort = DEFAULT_NX_PROXY_PORT; static int xPort = DEFAULT_NX_X_PORT; @@ -3959,7 +3960,14 @@ int SetupTcpSocket() tcpAddr.sin_family = AF_INET; tcpAddr.sin_port = htons(proxyPortTCP); - tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + if ( loopbackBind ) + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + } + else + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + } if (bind(tcpFD, (sockaddr *) &tcpAddr, sizeof(tcpAddr)) == -1) { @@ -4550,7 +4558,14 @@ int ListenConnection(int port, const char *label) tcpAddr.sin_family = AF_INET; tcpAddr.sin_port = htons(portTCP); - tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + if ( loopbackBind ) + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + } + else + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + } if (bind(newFD, (sockaddr *) &tcpAddr, sizeof(tcpAddr)) == -1) { @@ -6718,7 +6733,14 @@ int WaitForRemote(int portNum) #ifdef __APPLE__ - tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + if ( loopbackBind ) + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + } + else + { + tcpAddr.sin_addr.s_addr = htonl(INADDR_ANY); + } #else @@ -8397,6 +8419,10 @@ int ParseEnvironmentOptions(const char *env, int force) listenPort = ValidateArg("local", name, value); } + else if (strcasecmp(name, "loopback") == 0) + { + loopbackBind = ValidateArg("local", name, value); + } else if (strcasecmp(name, "accept") == 0) { if (*connectHost != '\0') @@ -13778,7 +13804,14 @@ int ParseListenOption(int &address) } else { - address = htonl(INADDR_ANY); + if ( loopbackBind ) + { + address = htonl(INADDR_LOOPBACK); + } + else + { + address = htonl(INADDR_ANY); + } } } else diff --git a/nxcomp/Misc.cpp b/nxcomp/Misc.cpp index 7303c595b..0095eaa74 100644 --- a/nxcomp/Misc.cpp +++ b/nxcomp/Misc.cpp @@ -41,6 +41,14 @@ #undef TEST #undef DEBUG +// +// By default nxproxy binds to all network interfaces, setting +// DEFAULT_LOOPBACK_BIND to 1 enables binding to the loopback +// device only. +// + +const int DEFAULT_LOOPBACK_BIND = 0; + // // TCP port offset applied to any NX port specification. // @@ -136,6 +144,8 @@ static const char UsageInfo[] = to be forwarded by the proxy running on the client.\n\ \n\ listen=n Local port used for accepting the proxy connection.\n\ +\n\ + loopback=b Bind to the loopback device only.\n\ \n\ accept=s Name or IP of host that can connect to the proxy.\n\ \n\ diff --git a/nxcomp/Misc.h b/nxcomp/Misc.h index 3f37836f5..21a503082 100644 --- a/nxcomp/Misc.h +++ b/nxcomp/Misc.h @@ -89,6 +89,14 @@ extern const int DEFAULT_NX_FONT_PORT_OFFSET; extern const int DEFAULT_NX_SLAVE_PORT_CLIENT_OFFSET; extern const int DEFAULT_NX_SLAVE_PORT_SERVER_OFFSET; +// +// NX proxy binds to all network interfaces by default +// With the -loopback parameter, you can switch +// over to binding to the loopback device only. +// + +extern const int DEFAULT_LOOPBACK_BIND; + // // Return strings containing various info. // -- cgit v1.2.3 From 1e99734ec8862a68b8f46cf6714d269fff625ec3 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Tue, 10 Feb 2015 21:45:19 +0100 Subject: Set WM_CLASS to X2GoAgent/NXAgent (300_nxagent_set-wm-class.full.patch). Depending on the binary name of the agent either NXAgent or X2GoAgent is set as WM_Class. This is needed for some window managers (like the one shipped with Maemo) The original WM_CLASS patch has been taken from the FreeNX patch series, author unknown. The nxagent/x2goagent has been done by the X2Go Project, author see below. --- debian/patches/300_nxagent_set-wm-class.full.patch | 60 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Screen.c | 36 +++++++++++++ 3 files changed, 36 insertions(+), 61 deletions(-) delete mode 100644 debian/patches/300_nxagent_set-wm-class.full.patch (limited to 'debian') diff --git a/debian/patches/300_nxagent_set-wm-class.full.patch b/debian/patches/300_nxagent_set-wm-class.full.patch deleted file mode 100644 index 70b1c9212..000000000 --- a/debian/patches/300_nxagent_set-wm-class.full.patch +++ /dev/null @@ -1,60 +0,0 @@ -Description: Set WM_CLASS to X2GoAgent/NXAgent - Depending on the binary name of the agent either NXAgent - or X2GoAgent is set as WM_Class. - . - This is needed for some window managers (like the one shipped with - Maemo) - . - The original WM_CLASS patch has been taken from the FreeNX patch - series, author unknown. - . - The nxagent/x2goagent has been done by the X2Go Project, author - see below. -Forwarded: not-needed -Author: Oleksandr Shneyder -Last-Update: 2012-01-11 ---- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c -@@ -1762,6 +1762,42 @@ - nxagentDefaultWindows[pScreen->myNum]); - #endif - -+ /* -+ * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode -+ * we need it to properly display all window parameters by some WMs -+ * (for example on Maemo) -+ */ -+ if(nxagentX2go) -+ { -+ #ifdef TEST -+ fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", -+ nxagentDefaultWindows[pScreen->myNum]); -+ #endif -+ XClassHint hint; -+ hint.res_name=malloc(strlen("X2GoAgent")+1); -+ hint.res_class=malloc(strlen("X2GoAgent")+1); -+ strcpy(hint.res_name,"X2GoAgent"); -+ strcpy(hint.res_class,"X2GoAgent"); -+ XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint); -+ free(hint.res_name); -+ free(hint.res_class); -+ } else { -+ #ifdef TEST -+ fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", -+ nxagentDefaultWindows[pScreen->myNum]); -+ #endif -+ -+ XClassHint hint; -+ hint.res_name=malloc(strlen("NXAgent")+1); -+ hint.res_class=malloc(strlen("NXAgent")+1); -+ strcpy(hint.res_name,"NXAgent"); -+ strcpy(hint.res_class,"NXAgent"); -+ XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint); -+ free(hint.res_name); -+ free(hint.res_class); -+ } -+ -+ - if (nxagentOption(Fullscreen)) - { - nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum]; diff --git a/debian/patches/series b/debian/patches/series index 30ed936f9..503a51155 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -300_nxagent_set-wm-class.full.patch 301_nx-X11_use-shared-libs.full.patch 302_nx-X11_xkbbasedir-detection.full.patch 320_nxagent_configurable-keystrokes.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index f0ce4dacf..d0608a900 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1762,6 +1762,42 @@ N/A nxagentDefaultWindows[pScreen->myNum]); #endif + /* + * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode + * we need it to properly display all window parameters by some WMs + * (for example on Maemo) + */ + if(nxagentX2go) + { + #ifdef TEST + fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", + nxagentDefaultWindows[pScreen->myNum]); + #endif + XClassHint hint; + hint.res_name=malloc(strlen("X2GoAgent")+1); + hint.res_class=malloc(strlen("X2GoAgent")+1); + strcpy(hint.res_name,"X2GoAgent"); + strcpy(hint.res_class,"X2GoAgent"); + XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint); + free(hint.res_name); + free(hint.res_class); + } else { + #ifdef TEST + fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", + nxagentDefaultWindows[pScreen->myNum]); + #endif + + XClassHint hint; + hint.res_name=malloc(strlen("NXAgent")+1); + hint.res_class=malloc(strlen("NXAgent")+1); + strcpy(hint.res_name,"NXAgent"); + strcpy(hint.res_class,"NXAgent"); + XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint); + free(hint.res_name); + free(hint.res_class); + } + + if (nxagentOption(Fullscreen)) { nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum]; -- cgit v1.2.3 From 6fc37fa762efc55e5d59158eb180cfe1c0405b26 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2015 21:47:31 +0100 Subject: Use shared libraries (301_nx-X11_use-shared-libs.full.patch). Many distributions have a policy to reduce code duplications. One means to avoid such duplications is to use shared libraries instead of using libs that are ofter shipped for convenience. Fedora: http://fedoraproject.org/wiki/Packaging:Guidelines#Shared_Libraries Debian (Section 10.7.4 of Debian policy): http://www.debian.org/doc/debian-policy/ch-files.html --- .../patches/301_nx-X11_use-shared-libs.full.patch | 106 --------------------- debian/patches/series | 1 - nx-X11/config/cf/host.def | 11 ++- nx-X11/programs/Xserver/Imakefile | 6 +- nx-X11/programs/nxauth/Imakefile | 2 +- 5 files changed, 10 insertions(+), 116 deletions(-) delete mode 100644 debian/patches/301_nx-X11_use-shared-libs.full.patch (limited to 'debian') diff --git a/debian/patches/301_nx-X11_use-shared-libs.full.patch b/debian/patches/301_nx-X11_use-shared-libs.full.patch deleted file mode 100644 index 200147449..000000000 --- a/debian/patches/301_nx-X11_use-shared-libs.full.patch +++ /dev/null @@ -1,106 +0,0 @@ -Description: Use shared libraries - Many distributions have a policy to reduce code duplications. - One means to avoid such duplications is to use shared libraries - instead of using libs that are ofter shipped for convenience. - . - Fedora: - http://fedoraproject.org/wiki/Packaging:Guidelines#Shared_Libraries - . - Debian (Section 10.7.4 of Debian policy): - http://www.debian.org/doc/debian-policy/ch-files.html -Forwarded: pending... -Author: Jan Engelhardt -Last-Update: 2012-02-14 ---- - nx-X11/config/cf/host.def | 11 ++++++----- - nx-X11/programs/Xserver/Imakefile | 6 +++--- - nx-X11/programs/nxauth/Imakefile | 2 +- - 3 files changed, 10 insertions(+), 9 deletions(-) - -Index: nx-X11/config/cf/host.def -=================================================================== ---- a/nx-X11/config/cf/host.def -+++ b/nx-X11/config/cf/host.def -@@ -138,7 +138,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.de - #define BuildRenderLibrary YES - #define SharedLibFreetype2 YES - #define NormalLibFreetype2 YES --#define FontLibSharedFreeType NO -+#define FontLibSharedFreeType YES - #endif - - /* -@@ -649,6 +649,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.de - * - #define XserverStaticFontLib NO - */ -+#define XserverStaticFontLib YES - - /* - * To enable binary compatibility with previous versions of the font -@@ -733,7 +734,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.de - #define BuildXKB YES - #define BuildXKBlib YES - --#define SharedLibXau NO -+#define SharedLibXau YES - - /* - * If you are running NetBSD 0.9C or later, and have the aperture driver -@@ -956,9 +957,9 @@ XCOMM $XFree86: xc/config/cf/xf86site.de - #define BuildXterm YES - */ - --#define SharedLibXau NO -+#define SharedLibXau YES - --#define SharedLibXdmcp NO -+#define SharedLibXdmcp YES - - #define BuildXaw7 YES - -@@ -976,7 +977,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.de - #define BuildFontServer NO - #define BuildFreeType NO - #define BuildXTrueType NO --#define FontLibSharedFreeType NO -+#define FontLibSharedFreeType YES - #endif - - #if !defined(NXZaurusXServer) && defined(NXiPAQXServer) -Index: nx-X11/programs/Xserver/Imakefile -=================================================================== ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1013,15 +1013,15 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTS - #if defined(SunArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -+ -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp - #elif defined(cygwinArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ -- -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -+ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp - #else - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -+ -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp - #endif - - #endif -Index: nx-X11/programs/nxauth/Imakefile -=================================================================== ---- a/nx-X11/programs/nxauth/Imakefile -+++ b/nx-X11/programs/nxauth/Imakefile -@@ -26,7 +26,7 @@ XCOMM $XFree86: xc/programs/xauth/Imakef - - INCLUDES=-I../../lib - DEPLIBS = $(DEPXAUTHLIB) -- LOCAL_LIBRARIES = ../../exports/lib/libXau.a -+ LOCAL_LIBRARIES = $(XAUTHLIB) - SRCS = xauth.c gethost.c process.c parsedpy.c - OBJS = xauth.o gethost.o process.o parsedpy.o - CONN_DEFINES = $(CONNECTION_FLAGS) diff --git a/debian/patches/series b/debian/patches/series index 503a51155..a901010c2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -301_nx-X11_use-shared-libs.full.patch 302_nx-X11_xkbbasedir-detection.full.patch 320_nxagent_configurable-keystrokes.full.patch 321_nxagent_x2go-specific-keystroke-config.full.patch diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 7d0511f36..2193a4711 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -138,7 +138,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildRenderLibrary YES #define SharedLibFreetype2 YES #define NormalLibFreetype2 YES -#define FontLibSharedFreeType NO +#define FontLibSharedFreeType YES #endif /* @@ -649,6 +649,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define XserverStaticFontLib NO */ +#define XserverStaticFontLib YES /* * To enable binary compatibility with previous versions of the font @@ -733,7 +734,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildXKB YES #define BuildXKBlib YES -#define SharedLibXau NO +#define SharedLibXau YES /* * If you are running NetBSD 0.9C or later, and have the aperture driver @@ -956,9 +957,9 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildXterm YES */ -#define SharedLibXau NO +#define SharedLibXau YES -#define SharedLibXdmcp NO +#define SharedLibXdmcp YES #define BuildXaw7 YES @@ -976,7 +977,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildFontServer NO #define BuildFreeType NO #define BuildXTrueType NO -#define FontLibSharedFreeType NO +#define FontLibSharedFreeType YES #endif #if !defined(NXZaurusXServer) && defined(NXiPAQXServer) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 8ecb338b2..c803a9915 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1013,15 +1013,15 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite + -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama + -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp #endif #endif diff --git a/nx-X11/programs/nxauth/Imakefile b/nx-X11/programs/nxauth/Imakefile index 07b1ca752..278904f05 100644 --- a/nx-X11/programs/nxauth/Imakefile +++ b/nx-X11/programs/nxauth/Imakefile @@ -26,7 +26,7 @@ XCOMM $XFree86: xc/programs/xauth/Imakefile,v 3.5 2001/03/30 02:15:23 keithp Exp INCLUDES=-I../../lib DEPLIBS = $(DEPXAUTHLIB) - LOCAL_LIBRARIES = ../../exports/lib/libXau.a + LOCAL_LIBRARIES = $(XAUTHLIB) SRCS = xauth.c gethost.c process.c parsedpy.c OBJS = xauth.o gethost.o process.o parsedpy.o CONN_DEFINES = $(CONNECTION_FLAGS) -- cgit v1.2.3 From 4436e97903aa6e2a7732fb98dcb46758a73fe130 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Wed, 11 Feb 2015 19:02:57 -0500 Subject: Fix build when LDFLAGS (etc) contains spaces. Was needed and was tested on Ubuntu 14.04. --- debian/rules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index b8e4ad4e1..e406f56e7 100755 --- a/debian/rules +++ b/debian/rules @@ -2,10 +2,10 @@ NULL = -export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) -export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) -export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) +export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS --export=cmdline) +export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS --export=cmdline) +export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS --export=cmdline) +export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS --export=cmdline) export LIBDIR = "/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" export INCLUDEDIR = "/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" -- cgit v1.2.3 From a7cc4edef158a1d7c02eb074baf74b7bd3cb0fec Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Feb 2015 09:59:12 +0100 Subject: Remove upstream nx-libs ChangeLog during override_dh_clean. --- debian/changelog | 1 + debian/rules | 1 + 2 files changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bbd4372d9..00523babe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -70,6 +70,7 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium etc/x2goagent.keyboard) before dh_auto_build. + Add to B-D: expat. + Install upstream ChangeLogs into bin:packages. + + Remove upstream nx-libs ChangeLog during override_dh_clean. * nx-libs.spec: + The gpg-offline bin:package is not available in our SLE repo. We can do diff --git a/debian/rules b/debian/rules index e406f56e7..1a9b12341 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,7 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure rm -f nx*/changelog + rm -f doc/changelog rm -f nx-X11/programs/Xserver/hw/nxagent/changelog rm -f nx-X11/programs/nxauth/changelog if [ ! -f replace.sh ] && [ ! -h replace.sh ]; then ln -s debian/Makefile.replace.sh replace.sh; fi -- cgit v1.2.3 From d569145e640c40ea4cccbdd8703a254618b10c73 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Feb 2015 09:59:57 +0100 Subject: Makefile.nx-libs: Run make install for nxproxy first, then create the wrapper script. --- debian/Makefile.nx-libs | 6 ++++-- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/Makefile.nx-libs b/debian/Makefile.nx-libs index e85f40447..3aeda739b 100644 --- a/debian/Makefile.nx-libs +++ b/debian/Makefile.nx-libs @@ -60,10 +60,12 @@ install: install-lite: $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - for f in nxproxy; do \ - $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done for d in nxcomp nxproxy; do \ $(MAKE) -C $$d install; done + mkdir -p $(DESTDIR)$(NXLIBDIR)/bin/ + mv $(DESTDIR)$(BINDIR)/nxproxy $(DESTDIR)$(NXLIBDIR)/bin/ + for f in nxproxy; do \ + $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ $(INSTALL_FILE) nxproxy/man/nxproxy.1 $(DESTDIR)$(PREFIX)/share/man/man1/ diff --git a/debian/changelog b/debian/changelog index 00523babe..515186119 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,8 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium * Makefile.nx-libs: Don't allow symlinks to point into buildroot. * Makefile.nx-libs: Install man pages via main Makefile. * Add Description: and Author: fields to various patch headers. + * Makefile.nx-libs: Run make install for nxproxy first, then create the + wrapper script. * NX code reduction efforts (from 93Mb to 41Mb): - Drop more unused code in nx-X11/programs/Xserver/hw/. Do this in -- cgit v1.2.3 From fa8fb728824ab71cf578b1463e0daddc601f5fc8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Feb 2015 10:07:40 +0100 Subject: changelog: add 3.5.0.x entry for commit 4436e97 --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 515186119..369440453 100644 --- a/debian/changelog +++ b/debian/changelog @@ -104,6 +104,10 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium launched as x2goagent, use X2Go-specific paths for the keystrokes.cfg file. (Fixes: #744). + [ Michael DePaulo ] + * debian/rules: + + Fix build for LDFLAGS containing spaces. + [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. -- cgit v1.2.3 From 08114b1e41f4128cd753217bdb4e037d4be64140 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 1 Feb 2015 22:27:06 +0100 Subject: Fix patch rollout in tarball --- debian/roll-tarballs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index a8d3cf63f..3ff7667f7 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -82,9 +82,9 @@ mkdir -p doc/applied-patches # prepare patches for lite and full tarball if [ "x$MODE" = "xfull" ]; then - find debian/patches | sort | egrep "(debian/patches/[0-9]+_.*\.(full|full\+lite)\.patch)" | while read file + cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file do - cp -v $file doc/applied-patches + cp -v debian/patches/$file doc/applied-patches echo ${file##*/} >> doc/applied-patches/series done mkdir -p ./etc/ @@ -96,9 +96,9 @@ else rm -Rf "nxcompshad"* rm -Rf "nxcompext"* rm -Rf "nx-X11"* - find debian/patches | sort | egrep "(debian/patches/[0-9]+_.*\.full\+lite\.patch)" | while read file + cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file do - cp -v $file doc/applied-patches + cp -v debian/patches/$file doc/applied-patches echo ${file##*/} >> doc/applied-patches/series done fi -- cgit v1.2.3 From a43c49594ca0c894cdc460f6b5c538122b6c224d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 Feb 2015 05:11:09 +0100 Subject: update changelog --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 369440453..a8c2480f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,18 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium - Makefile.nx-libs: Don't install Mesa header files into DESTDIR anymore. - Unify source tree reduction (debian/rules vs. roll-tarball.sh) via file/ folder lists in text files named debian/CODE-REDUCTION_*. + - Update 991_fix-hr-typos.full.patch. Don't patch files that get removed by + the NX code reduction effort. + - Drop 604_nx-X11_recent-freetype-API.full.patch. Not used in current build + process. + - Update 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't + patch files matter to the NX code reduction efforts. + - Update 031_nx-X11_parallel-make.full.patch. Don't patch .original files in + NX code tree. + - Drop patches: 017_nx-X11_update-autotools-helper-files.full.patch, + 018_nx-X11_update-libtool-ltmain-script.full.patch, + 019_nx-X11_expat-build-against-system-libxmltok.full.patch. They patch files + that are not used at build time. * Debian/Ubuntu packaging: + Fully rework the way nx-libs gets packaged for Debian/Ubuntu. -- cgit v1.2.3 From 4dc1bd0043aed6b92526cbda26991be1f611a121 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 13 Feb 2015 09:49:52 +0100 Subject: Test for xkb/rules/base instead of xkb/keymap.dir for setting XkbBaseDir (302_nx-X11_xkbbasedir-detection.full.patch). In recent (as of 2014/06) X.org release, the keymap.dir file has become obsolete. Let's test for the xkb/rules/base file instead. --- .../302_nx-X11_xkbbasedir-detection.full.patch | 84 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/xkb/ddxLoad.c | 32 ++++----- 3 files changed, 16 insertions(+), 101 deletions(-) delete mode 100644 debian/patches/302_nx-X11_xkbbasedir-detection.full.patch (limited to 'debian') diff --git a/debian/patches/302_nx-X11_xkbbasedir-detection.full.patch b/debian/patches/302_nx-X11_xkbbasedir-detection.full.patch deleted file mode 100644 index dac3d8a08..000000000 --- a/debian/patches/302_nx-X11_xkbbasedir-detection.full.patch +++ /dev/null @@ -1,84 +0,0 @@ -Description: Test for xkb/rules/base instead of xkb/keymap.dir for setting XkbBaseDir -Author: Mike Gabriel -Abstract: - In recent (as of 2014/06) X.org release, the keymap.dir file - has become obsolete. Let's test for the xkb/rules/base file - instead. ---- a/nx-X11/programs/Xserver/xkb/ddxLoad.c -+++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c -@@ -180,7 +180,7 @@ - - #define NX_XKB_BASE_DIRECTORY "/usr/lib/X11/xkb" - #define NX_XKB_ALTERNATE_BASE_DIRECTORY "/usr/share/X11/xkb" --#define NX_KEYMAP_DIR_FILE "keymap.dir" -+#define NX_XKB_RULES_BASE_FILE "rules/base" - #define NX_ALT_XKBCOMP_PATH "/usr/bin" - - static char _NXXkbBasePath[PATH_MAX]; -@@ -189,43 +189,43 @@ - static int NXVerifyXkbBaseDirectory(const char *dirPath) - { - int size; -- char *keymapDirFilePath; -- struct stat keymapDirFileStat; -+ char *rulesBaseFilePath; -+ struct stat rulesBaseFileStat; - - /* -- * If keymap.dir file -- * is not present into -- * Xkb Base Directory, -+ * If rules/base file -+ * is not present inside -+ * the Xkb Base Directory, - * we suppose that the - * path is not valid. - */ - - size = strlen(dirPath) + strlen("/") + -- strlen(NX_KEYMAP_DIR_FILE) + 1; -+ strlen(NX_XKB_RULES_BASE_FILE) + 1; - -- if ((keymapDirFilePath = malloc((size + 1) * sizeof(char))) == NULL) -+ if ((rulesBaseFilePath = malloc((size + 1) * sizeof(char))) == NULL) - { - FatalError("NXVerifyXkbBaseDirectory: malloc failed.\n"); - } - -- strcpy(keymapDirFilePath, dirPath); -- strcat(keymapDirFilePath, "/"); -- strcat(keymapDirFilePath, NX_KEYMAP_DIR_FILE); -+ strcpy(rulesBaseFilePath, dirPath); -+ strcat(rulesBaseFilePath, "/"); -+ strcat(rulesBaseFilePath, NX_XKB_RULES_BASE_FILE); - - #ifdef TEST - fprintf(stderr, "NXVerifyXkbBaseDirectory: Looking for [%s] file.\n", -- keymapDirFilePath); -+ rulesBaseFilePath); - #endif - -- if (stat(keymapDirFilePath, &keymapDirFileStat) != 0) -+ if (stat(rulesBaseFilePath, &rulesBaseFileStat) != 0) - { - - #ifdef TEST - fprintf(stderr, "NXVerifyXkbBaseDirectory: Can't find the keymap.dir file [%s].\n", -- keymapDirFilePath); -+ rulesBaseFilePath); - #endif - -- free(keymapDirFilePath); -+ free(rulesBaseFilePath); - - return 0; - } -@@ -235,7 +235,7 @@ - dirPath); - #endif - -- free(keymapDirFilePath); -+ free(rulesBaseFilePath); - - return 1; - } diff --git a/debian/patches/series b/debian/patches/series index a901010c2..5780128b2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -302_nx-X11_xkbbasedir-detection.full.patch 320_nxagent_configurable-keystrokes.full.patch 321_nxagent_x2go-specific-keystroke-config.full.patch 400_nxcomp-version.full+lite.patch diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index e69d95670..0b779b719 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -180,7 +180,7 @@ Win32System(const char *cmdline) #define NX_XKB_BASE_DIRECTORY "/usr/lib/X11/xkb" #define NX_XKB_ALTERNATE_BASE_DIRECTORY "/usr/share/X11/xkb" -#define NX_KEYMAP_DIR_FILE "keymap.dir" +#define NX_XKB_RULES_BASE_FILE "rules/base" #define NX_ALT_XKBCOMP_PATH "/usr/bin" static char _NXXkbBasePath[PATH_MAX]; @@ -189,43 +189,43 @@ static char _NXXkbCompPath[PATH_MAX]; static int NXVerifyXkbBaseDirectory(const char *dirPath) { int size; - char *keymapDirFilePath; - struct stat keymapDirFileStat; + char *rulesBaseFilePath; + struct stat rulesBaseFileStat; /* - * If keymap.dir file - * is not present into - * Xkb Base Directory, + * If rules/base file + * is not present inside + * the Xkb Base Directory, * we suppose that the * path is not valid. */ size = strlen(dirPath) + strlen("/") + - strlen(NX_KEYMAP_DIR_FILE) + 1; + strlen(NX_XKB_RULES_BASE_FILE) + 1; - if ((keymapDirFilePath = malloc((size + 1) * sizeof(char))) == NULL) + if ((rulesBaseFilePath = malloc((size + 1) * sizeof(char))) == NULL) { FatalError("NXVerifyXkbBaseDirectory: malloc failed.\n"); } - strcpy(keymapDirFilePath, dirPath); - strcat(keymapDirFilePath, "/"); - strcat(keymapDirFilePath, NX_KEYMAP_DIR_FILE); + strcpy(rulesBaseFilePath, dirPath); + strcat(rulesBaseFilePath, "/"); + strcat(rulesBaseFilePath, NX_XKB_RULES_BASE_FILE); #ifdef TEST fprintf(stderr, "NXVerifyXkbBaseDirectory: Looking for [%s] file.\n", - keymapDirFilePath); + rulesBaseFilePath); #endif - if (stat(keymapDirFilePath, &keymapDirFileStat) != 0) + if (stat(rulesBaseFilePath, &rulesBaseFileStat) != 0) { #ifdef TEST fprintf(stderr, "NXVerifyXkbBaseDirectory: Can't find the keymap.dir file [%s].\n", - keymapDirFilePath); + rulesBaseFilePath); #endif - free(keymapDirFilePath); + free(rulesBaseFilePath); return 0; } @@ -235,7 +235,7 @@ static int NXVerifyXkbBaseDirectory(const char *dirPath) dirPath); #endif - free(keymapDirFilePath); + free(rulesBaseFilePath); return 1; } -- cgit v1.2.3 From e91277d02bf1288909daed3b0de8f876f6403acf Mon Sep 17 00:00:00 2001 From: Alexander Wuerstlein Date: Fri, 13 Feb 2015 09:52:21 +0100 Subject: Make nxagent-specific keyboard bindings configurable (320_nxagent_configurable-keystrokes.full.patch). Replaces the hardcoded nxagent keybindings by a configurable table of keybindings. The default configuration is the same as the original one, to maintain compatibility. A user/administrator can either specify a command line parameter, environment variable or place a file in ~/.nx/config/keystrokes.cfg or /etc/nxagent/keystrokes.cfg to reconfigure these keybindings. The configuration file format is XML, a dependency on libxml2 is added to allow parsing the configuration. --- .../320_nxagent_configurable-keystrokes.full.patch | 1031 -------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/Imakefile | 9 +- nx-X11/programs/Xserver/hw/nxagent/Args.c | 16 + nx-X11/programs/Xserver/hw/nxagent/Args.h | 2 + nx-X11/programs/Xserver/hw/nxagent/Imakefile | 9 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 700 ++++++++----- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 47 + 8 files changed, 546 insertions(+), 1269 deletions(-) delete mode 100644 debian/patches/320_nxagent_configurable-keystrokes.full.patch (limited to 'debian') diff --git a/debian/patches/320_nxagent_configurable-keystrokes.full.patch b/debian/patches/320_nxagent_configurable-keystrokes.full.patch deleted file mode 100644 index c799c8b93..000000000 --- a/debian/patches/320_nxagent_configurable-keystrokes.full.patch +++ /dev/null @@ -1,1031 +0,0 @@ -Author: Alexander Wuerstlein -Description: Make nxagent-specific keyboard bindings configurable - Replaces the hardcoded nxagent keybindings by a configurable - table of keybindings. The default configuration is the same as the - original one, to maintain compatibility. A user/administrator can either - specify a command line parameter, environment variable or place a file - in ~/.nx/config/keystrokes.cfg or /etc/nxagent/keystrokes.cfg to reconfigure - these keybindings. - . - The configuration file format is XML, a dependency on libxml2 is added - to allow parsing the configuration. ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -1013,15 +1013,18 @@ - #if defined(SunArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp -+ -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp \ -+`pkg-config --libs libxml-2.0` - #elif defined(cygwinArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ -- -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp -+ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ -+`pkg-config --libs libxml-2.0` - #else - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp -+ -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp \ -+`pkg-config --libs libxml-2.0` - #endif - - #endif ---- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile -+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile -@@ -142,7 +142,8 @@ - -I../../miext/damage -I../../miext/cw \ - -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) \ -- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) -+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ -+ `pkg-config --cflags-only-I libxml-2.0` - #ifdef SunArchitecture - INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ - -I../../../../extras/Mesa/include \ -@@ -152,7 +153,8 @@ - -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ - -I../../miext/damage -I../../miext/cw \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) \ -- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) -+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ -+ `pkg-config --cflags-only-I libxml-2.0` - #else - #ifdef cygwinArchitecture - INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ -@@ -162,7 +164,8 @@ - -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ - -I../../../../extras/Mesa/include \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) \ -- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) -+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ -+ `pkg-config --cflags-only-I libxml-2.0` - #endif - #endif - ---- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c -@@ -28,8 +28,15 @@ - #include "Keystroke.h" - #include "Drawable.h" - -+#include -+ -+#include -+#include -+ - extern Bool nxagentWMIsRunning; - extern Bool nxagentIpaq; -+extern char *nxagentKeystrokeFile; -+Bool nxagentKeystrokeFileParsed = False; - - #ifdef NX_DEBUG_INPUT - int nxagentDebugInputDevices = 0; -@@ -47,297 +54,528 @@ - #undef DEBUG - #undef DUMP - --int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) --{ -- KeySym sym; -- int index = 0; - -- *result = doNothing; -+/* this table is used to parse actions given on the command line or in the -+ * config file, therefore indices have to match the enum in Keystroke.h */ -+char * nxagentSpecialKeystrokeNames[] = { -+ "end_marker", -+ "close_session", -+ "switch_all_screens", -+ "minimize", -+ "left", -+ "up", -+ "right", -+ "down", -+ "resize", -+ "defer", -+ "ignore", -+ "force_synchronization", -+ -+ "debug_tree", -+ "regions_on_screen", -+ "test_input", -+ "deactivate_input_devices_grab", -+ -+ "fullscreen", -+ "viewport_move_left", -+ "viewport_move_up", -+ "viewport_move_right", -+ "viewport_move_down", -+ NULL, -+}; -+ -+struct nxagentSpecialKeystrokeMap default_map[] = { -+ /* stroke, modifierMask, modifierAltMeta, keysym */ -+ {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_q}, -+ {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_Q}, -+ {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_t}, -+ {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_T}, -+ {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_f}, -+ {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_F}, -+ {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_m}, -+ {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_M}, -+ {KEYSTROKE_LEFT, ControlMask, 1, XK_Left}, -+ {KEYSTROKE_LEFT, ControlMask, 1, XK_KP_Left}, -+ {KEYSTROKE_UP, ControlMask, 1, XK_Up}, -+ {KEYSTROKE_UP, ControlMask, 1, XK_KP_Up}, -+ {KEYSTROKE_RIGHT, ControlMask, 1, XK_Right}, -+ {KEYSTROKE_RIGHT, ControlMask, 1, XK_KP_Right}, -+ {KEYSTROKE_DOWN, ControlMask, 1, XK_Down}, -+ {KEYSTROKE_DOWN, ControlMask, 1, XK_KP_Down}, -+ {KEYSTROKE_RESIZE, ControlMask, 1, XK_r}, -+ {KEYSTROKE_RESIZE, ControlMask, 1, XK_R}, -+ {KEYSTROKE_DEFER, ControlMask, 1, XK_e}, -+ {KEYSTROKE_DEFER, ControlMask, 1, XK_E}, -+ {KEYSTROKE_IGNORE, ControlMask, 1, XK_BackSpace}, -+ {KEYSTROKE_IGNORE, 0, 0, XK_Terminate_Server}, -+ {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_j}, -+ {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_J}, -+ {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_a}, -+ {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_A}, -+ {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_x}, -+ {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_X}, -+ {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_y}, -+ {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_Y}, -+ {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_f}, -+ {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_F}, -+ {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_Left}, -+ {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_KP_Left}, -+ {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_Up}, -+ {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_KP_Up}, -+ {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_Right}, -+ {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_KP_Right}, -+ {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_Down}, -+ {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_KP_Down}, -+ {KEYSTROKE_END_MARKER, 0, 0, 0}, -+}; -+struct nxagentSpecialKeystrokeMap *map = default_map; - -- /* -- * I don't know how much hard work is doing this operation. -- * Do we need a cache ? -+static int modifier_matches(unsigned int mask, int compare_alt_meta, unsigned int state) -+{ -+ /* nxagentAltMetaMask needs special handling -+ * it seems to me its an and-ed mask of all possible meta and alt keys -+ * somehow... -+ * -+ * otherwise this function would be just a simple bitop - */ -+ int ret = 1; - -- sym = XKeycodeToKeysym(nxagentDisplay, X -> keycode, index); -+ if (compare_alt_meta) { -+ if (! (state & nxagentAltMetaMask)) { -+ ret = 0; -+ } - -- if (sym == XK_VoidSymbol || sym == NoSymbol) -- { -- return 0; -+ mask &= ~nxagentAltMetaMask; - } - -- #ifdef TEST -- fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - sym %lx\n", -- X -> keycode, X -> state, sym); -- #endif -- -- /* -- * Check special keys. -- */ -- -- /* -- * FIXME: We should use the keysym instead that the keycode -- * here. -- */ -+ /* all modifiers except meta/alt have to match exactly, extra bits are evil */ -+ if ((mask & state) != mask) { -+ ret = 0; -+ } - -- if (X -> keycode == 130 && nxagentIpaq) -- { -- *result = doStartKbd; -+ return ret; -+} - -- return 1; -- } -+static int read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystrokeMap *ret) -+{ -+ int successful = 0; -+ struct nxagentSpecialKeystrokeMap new = {0, 0, 0, 0}; -+ xmlAttr *attr; - -- if ((X -> state & nxagentAltMetaMask) && -- ((X -> state & (ControlMask | ShiftMask)) == ControlMask)) -+ for (attr = node->properties; attr; attr = attr->next) - { -- switch (sym) -+ /* ignore attributes without data (which should never happen anyways) */ -+ if (attr->children->content == NULL) - { -- #ifdef DEBUG_TREE -- -- case XK_q: -- case XK_Q: -- { -- *result = doDebugTree; -- -- break; -- } -- -- #endif /* DEBUG_TREE */ -- -- case XK_t: -- case XK_T: -- { -- *result = doCloseSession; -- -- break; -- } -- case XK_f: -- case XK_F: -+ char *aname = (attr->name)?(attr->name):"unknown"; -+ fprintf(stderr, "attribute %s with NULL value", aname); -+ continue; -+ } -+ if (strcmp((char *)attr->name, "action") == 0) -+ { -+ int i; -+ for (i = 0; nxagentSpecialKeystrokeNames[i] != NULL; i++) - { -- if (nxagentOption(Rootless) == False) -+ if (strcmp(nxagentSpecialKeystrokeNames[i],(char *)attr->children->content) == 0) - { -- *result = doSwitchAllScreens; -+ /* this relies on the values of enum nxagentSpecialKeystroke and the -+ * indices of nxagentSpecialKeystrokeNames being in sync */ -+ new.stroke = i; -+ break; - } -- -- break; - } -- case XK_m: -- case XK_M: -+ continue; -+ } -+ else if (strcmp((char *)attr->name, "key") == 0) -+ { -+ new.keysym = XStringToKeysym((char *)attr->children->content); -+ /* NoSymbol is usually 0, but could there be weird implementations? */ -+ if (new.keysym == NoSymbol) - { -- if (nxagentOption(Rootless) == False) -- { -- *result = doMinimize; -- } -- -- break; -+ new.keysym = 0; - } -- case XK_Left: -- case XK_KP_Left: -- { -- if (nxagentOption(Rootless) == False && -- nxagentOption(DesktopResize) == False) -- { -- *result = doViewportLeft; -- } -+ continue; -+ } - -- break; -- } -- case XK_Up: -- case XK_KP_Up: -- { -- if (nxagentOption(Rootless) == False && -- nxagentOption(DesktopResize) == False) -- { -- *result = doViewportUp; -- } -+ /* ignore attributes with value="0" or "false", everything else is interpreted as true */ -+ if (strcmp((char *)attr->children->content, "0") == 0 || strcmp((char *)attr->children->content, "false") == 0) -+ continue; - -- break; -- } -- case XK_Right: -- case XK_KP_Right: -- { -- if (nxagentOption(Rootless) == False && -- nxagentOption(DesktopResize) == False) -- { -- *result = doViewportRight; -- } -+ if (strcmp((char *)attr->name, "Mod1") == 0) -+ { -+ new.modifierMask |= Mod1Mask; -+ } -+ else if (strcmp((char *)attr->name, "Mod2") == 0) -+ { -+ new.modifierMask |= Mod2Mask; -+ } -+ else if (strcmp((char *)attr->name, "Mod3") == 0) -+ { -+ new.modifierMask |= Mod3Mask; -+ } -+ else if (strcmp((char *)attr->name, "Mod4") == 0) -+ { -+ new.modifierMask |= Mod4Mask; -+ } -+ else if (strcmp((char *)attr->name, "Control") == 0) -+ { -+ new.modifierMask |= ControlMask; -+ } -+ else if (strcmp((char *)attr->name, "Shift") == 0) -+ { -+ new.modifierMask |= ShiftMask; -+ } -+ else if (strcmp((char *)attr->name, "Lock") == 0) -+ { -+ new.modifierMask |= LockMask; -+ } -+ else if (strcmp((char *)attr->name, "AltMeta") == 0) -+ { -+ new.modifierAltMeta = 1; -+ } -+ } - -- break; -- } -- case XK_Down: -- case XK_KP_Down: -- { -- if (nxagentOption(Rootless) == 0 && -- nxagentOption(DesktopResize) == 0) -- { -- *result = doViewportDown; -- } -+ if (new.stroke != 0 && new.keysym != 0) -+ { -+ /* keysym and stroke are required, everything else is optional */ -+ successful = 1; -+ memcpy(ret, &new, sizeof(struct nxagentSpecialKeystrokeMap)); -+ } -+ return successful; -+} - -- break; -- } -- case XK_R: -- case XK_r: -- { -- if (nxagentOption(Rootless) == 0) -- { -- *result = doSwitchResizeMode; -- } -+/* -+ * searches a keystroke xml file -+ * -+ * search order: -+ * - '-keystrokefile' commandline parameter -+ * - $NXAGENT_KEYSTROKEFILE environment variable -+ * - $HOME/.nx/config/keystrokes.cfg -+ * - /etc/nxagent/keystrokes.cfg -+ * - hardcoded traditional NX default settings -+ */ -+static void parse_keystroke_file(void) -+{ -+ char *filename = NULL; - -- break; -- } -- case XK_E: -- case XK_e: -- { -- *result = doSwitchDeferMode; -+ char *homefile = "/.nx/config/keystrokes.cfg"; -+ char *etcfile = "/etc/nxagent/keystrokes.cfg"; - -- break; -+ if (nxagentKeystrokeFile != NULL && access(nxagentKeystrokeFile, R_OK) == 0) -+ { -+ filename = strdup(nxagentKeystrokeFile); -+ if (filename == NULL) -+ { -+ fprintf(stderr, "malloc failed"); -+ exit(EXIT_FAILURE); -+ } -+ } -+ else if ((filename = getenv("NXAGENT_KEYSTROKEFILE")) != NULL && access(filename, R_OK) == 0) -+ { -+ filename = strdup(filename); -+ if (filename == NULL) -+ { -+ fprintf(stderr, "malloc failed"); -+ exit(EXIT_FAILURE); -+ } -+ } -+ else -+ { -+ char *homedir = getenv("HOME"); -+ filename = NULL; -+ if (homedir != NULL) -+ { -+ homedir = strdup(homedir); -+ if (homedir == NULL) -+ { -+ fprintf(stderr, "malloc failed"); -+exit(EXIT_FAILURE); - } -- case XK_BackSpace: -- case XK_Terminate_Server: -+ filename = calloc(1, strlen(homefile) + strlen(homedir) + 1); -+ if (filename == NULL) - { -- /* -- * Discard Ctrl-Alt-BackSpace key. -- */ -- -- return 1; -- -- break; -+ fprintf(stderr, "malloc failed"); -+ exit(EXIT_FAILURE); - } -- -- case XK_J: -- case XK_j: -+ strcpy(filename, homedir); -+ strcpy(filename + strlen(homedir), homefile); -+ if (homedir) - { -- nxagentForceSynchronization = 1; -- -- return 1; -+ free(homedir); - } -+ } - -- #ifdef DUMP -- -- case XK_A: -- case XK_a: -+ if (access(filename, R_OK) == 0) -+ { -+ /* empty */ -+ } -+ else if (access(etcfile, R_OK) == 0) -+ { -+ if (filename) -+ free(filename); -+ filename = strdup(etcfile); -+ if (filename == NULL) - { -- /* -- * Used to test the lazy encoding. -- */ -- -- nxagentRegionsOnScreen(); -- -- return 1; -+ fprintf(stderr, "malloc failed"); -+ exit(EXIT_FAILURE); - } -+ } -+ else -+ { -+ if (filename) -+free(filename); -+ filename = NULL; -+ } -+ } - -- #endif -- -- #ifdef NX_DEBUG_INPUT -+ /* now we know which file to read, if any */ -+ if (filename) -+ { -+ xmlDoc *doc = NULL; -+ xmlNode *root = NULL; -+ LIBXML_TEST_VERSION -+ doc = xmlReadFile(filename, NULL, 0); -+ if (doc != NULL) -+ { -+ xmlNode *cur = NULL; -+ root = xmlDocGetRootElement(doc); - -- case XK_X: -- case XK_x: -+ for (cur = root; cur; cur = cur->next) - { -- /* -- * Used to test the input devices state. -- */ -+ if (cur->type == XML_ELEMENT_NODE && strcmp((char *)cur->name, "keystrokes") == 0) -+{ -+ xmlNode *bindings = NULL; -+ int num = 0; -+ int idx = 0; - -- if (X -> type == KeyPress) -- { -- if (nxagentDebugInputDevices == 0) -+ for (bindings = cur->children; bindings; bindings = bindings->next) - { -- fprintf(stderr, "Info: Turning input devices debug ON.\n"); -- -- nxagentDebugInputDevices = 1; -+ if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0) -+ { -+ num++; -+ } - } -- else -+ map = calloc((num + 1), sizeof(struct nxagentSpecialKeystrokeMap)); -+ if (map == NULL) - { -- fprintf(stderr, "Info: Turning input devices debug OFF.\n"); -- -- nxagentDebugInputDevices = 0; -- -- nxagentLastInputDevicesDumpTime = 0; -+ fprintf(stderr, "malloc failed"); -+ exit(EXIT_FAILURE); - } -- } -- -- return 1; -- } - -- case XK_Y: -- case XK_y: -- { -- /* -- * Used to deactivate input devices grab. -- */ -+ for (bindings = cur->children; bindings; bindings = bindings->next) -+ { -+ if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0) -+ { -+ int res = 0; -+ res = read_binding_from_xmlnode(bindings, &(map[idx])); -+ if (res) -+ idx++; -+ } -+ } - -- if (X -> type == KeyPress) -- { -- nxagentDeactivateInputDevicesGrabs(); -+ map[idx].stroke = KEYSTROKE_END_MARKER; - } -- -- return 1; - } - -+ xmlFreeDoc(doc); -+ xmlCleanupParser(); -+ } -+ else -+ { -+ #ifdef DEBUG -+ fprintf("XML parsing for %s failed\n", filename); - #endif - } -+ free(filename); - } -- else if ((X -> state & nxagentAltMetaMask) && -- ((X -> state & (ControlMask | ShiftMask)) == (ControlMask | -- ShiftMask))) -+} -+ -+static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) -+{ -+ KeySym keysym = XKeycodeToKeysym(nxagentDisplay, X->keycode, 0); -+ struct nxagentSpecialKeystrokeMap *cur = map; -+ -+ if (! nxagentKeystrokeFileParsed) - { -- switch (sym) -- { -- case XK_f: -- case XK_F: -- { -- if (nxagentOption(Rootless) == 0) -- { -- *result = doSwitchFullscreen; -- } -+ parse_keystroke_file(); -+ nxagentKeystrokeFileParsed = True; -+ } - -- break; -- } -- case XK_Left: -- case XK_KP_Left: -- { -- if (nxagentOption(Rootless) == 0 && -- nxagentOption(DesktopResize) == 0) -- { -- *result = doViewportMoveLeft; -- } -+ enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING; - -- break; -- } -- case XK_Up: -- case XK_KP_Up: -- { -- if (nxagentOption(Rootless) == 0 && -- nxagentOption(DesktopResize) == 0) -- { -- *result = doViewportMoveUp; -- } -+ while (cur->stroke != KEYSTROKE_END_MARKER) { -+ if (cur->keysym == keysym && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) { -+ return cur->stroke; -+ } -+ cur++; -+ } - -- break; -- } -- case XK_Right: -- case XK_KP_Right: -- { -- if (nxagentOption(Rootless) == 0 && -- nxagentOption(DesktopResize) == 0) -- { -- *result = doViewportMoveRight; -- } -+ return ret; -+} - -- break; -- } -- case XK_Down: -- case XK_KP_Down: -- { -- if (nxagentOption(Rootless) == 0 && -- nxagentOption(DesktopResize) == 0) -- { -- *result = doViewportMoveDown; -- } -+int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) -+{ -+ KeySym sym; -+ int index = 0; -+ enum nxagentSpecialKeystroke stroke = find_keystroke(X); - -- break; -- } -- } -+ *result = doNothing; -+ -+ /* -+ * I don't know how much hard work is doing this operation. -+ * Do we need a cache ? -+ */ -+ -+ sym = XKeycodeToKeysym(nxagentDisplay, X -> keycode, index); -+ -+ if (sym == XK_VoidSymbol || sym == NoSymbol) -+ { -+ return 0; - } - -+ #ifdef TEST -+ fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - sym %lx\n", -+ X -> keycode, X -> state, sym); -+ #endif -+ -+ /* -+ * Check special keys. -+ */ -+ -+ /* -+ * FIXME: We should use the keysym instead that the keycode -+ * here. -+ */ -+ -+ if (X -> keycode == 130 && nxagentIpaq) -+ { -+ *result = doStartKbd; -+ -+ return 1; -+ } -+ -+ switch (stroke) { -+ case KEYSTROKE_DEBUG_TREE: -+ #ifdef DEBUG_TREE -+ *result = doDebugTree; -+ #endif -+ break; -+ case KEYSTROKE_CLOSE_SESSION: -+ *result = doCloseSession; -+ break; -+ case KEYSTROKE_SWITCH_ALL_SCREENS: -+ if (nxagentOption(Rootless) == False) { -+ *result = doSwitchAllScreens; -+ } -+ break; -+ case KEYSTROKE_MINIMIZE: -+ if (nxagentOption(Rootless) == False) { -+ *result = doMinimize; -+ } -+ break; -+ case KEYSTROKE_LEFT: -+ if (nxagentOption(Rootless) == False && -+ nxagentOption(DesktopResize) == False) { -+ *result = doViewportLeft; -+ } -+ break; -+ case KEYSTROKE_UP: -+ if (nxagentOption(Rootless) == False && -+ nxagentOption(DesktopResize) == False) { -+ *result = doViewportUp; -+ } -+ break; -+ case KEYSTROKE_RIGHT: -+ if (nxagentOption(Rootless) == False && -+ nxagentOption(DesktopResize) == False) { -+ *result = doViewportRight; -+ } -+ break; -+ case KEYSTROKE_DOWN: -+ if (nxagentOption(Rootless) == False && -+ nxagentOption(DesktopResize) == False) { -+ *result = doViewportDown; -+ } -+ break; -+ case KEYSTROKE_RESIZE: -+ if (nxagentOption(Rootless) == False) { -+ *result = doSwitchResizeMode; -+ } -+ break; -+ case KEYSTROKE_DEFER: -+ *result = doSwitchDeferMode; -+ break; -+ case KEYSTROKE_IGNORE: -+ /* this is used e.g. to ignore C-A-Backspace aka XK_Terminate_Server */ -+ return 1; -+ break; -+ case KEYSTROKE_FORCE_SYNCHRONIZATION: -+ nxagentForceSynchronization = 1; -+ break; -+ case KEYSTROKE_REGIONS_ON_SCREEN: -+ #ifdef DUMP -+ nxagentRegionsOnScreen(); -+ #endif -+ break; -+ case KEYSTROKE_TEST_INPUT: -+ /* -+ * Used to test the input devices state. -+ */ -+ #ifdef NX_DEBUG_INPUT -+ if (X -> type == KeyPress) { -+ if (nxagentDebugInputDevices == 0) { -+ fprintf(stderr, "Info: Turning input devices debug ON.\n"); -+ nxagentDebugInputDevices = 1; -+ } else { -+ fprintf(stderr, "Info: Turning input devices debug OFF.\n"); -+ nxagentDebugInputDevices = 0; -+ nxagentLastInputDevicesDumpTime = 0; -+ } -+ } -+ return 1; -+ #endif -+ break; -+ case KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB: -+ #ifdef NX_DEBUG_INPUT -+ if (X->type == KeyPress) { -+ nxagentDeactivateInputDevicesGrab(); -+ } -+ return 1; -+ #endif -+ break; -+ case KEYSTROKE_FULLSCREEN: -+ if (nxagentOption(Rootless) == 0) { -+ *result = doSwitchFullscreen; -+ } -+ break; -+ case KEYSTROKE_VIEWPORT_MOVE_LEFT: -+ if (nxagentOption(Rootless) == 0 && -+ nxagentOption(DesktopResize) == 0) { -+ *result = doViewportMoveLeft; -+ } -+ break; -+ case KEYSTROKE_VIEWPORT_MOVE_UP: -+ if (nxagentOption(Rootless) == 0 && -+ nxagentOption(DesktopResize) == 0) { -+ *result = doViewportMoveUp; -+ } -+ break; -+ case KEYSTROKE_VIEWPORT_MOVE_RIGHT: -+ if (nxagentOption(Rootless) == 0 && -+ nxagentOption(DesktopResize) == 0) { -+ *result = doViewportMoveRight; -+ } -+ break; -+ case KEYSTROKE_VIEWPORT_MOVE_DOWN: -+ if (nxagentOption(Rootless) == 0 && -+ nxagentOption(DesktopResize) == 0) { -+ *result = doViewportMoveDown; -+ } -+ break; -+ case KEYSTROKE_NOTHING: /* do nothing. difference to KEYSTROKE_IGNORE is the return value */ -+ case KEYSTROKE_END_MARKER: /* just to make gcc STFU */ -+ case KEYSTROKE_MAX: -+ break; -+ } - return (*result == doNothing) ? 0 : 1; - } ---- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h -@@ -24,4 +24,51 @@ - - unsigned int nxagentAltMetaMask; - -+/* keep this sorted, do not rely on any numerical value in this enum, and be aware -+ * that KEYSTROKE_MAX may be used in a malloc */ -+ -+/* also be aware that if changing any numerical values, you also need to change values -+ * Keystroke.c nxagentSpecialKeystrokeNames */ -+enum nxagentSpecialKeystroke { -+ /* 0 is used as end marker */ -+ KEYSTROKE_END_MARKER = 0, -+ KEYSTROKE_CLOSE_SESSION = 1, -+ KEYSTROKE_SWITCH_ALL_SCREENS = 2, -+ KEYSTROKE_MINIMIZE = 3, -+ KEYSTROKE_LEFT = 4, -+ KEYSTROKE_UP = 5, -+ KEYSTROKE_RIGHT = 6, -+ KEYSTROKE_DOWN = 7, -+ KEYSTROKE_RESIZE = 8, -+ KEYSTROKE_DEFER = 9, -+ KEYSTROKE_IGNORE = 10, -+ KEYSTROKE_FORCE_SYNCHRONIZATION = 11, -+ -+ /* stuff used for debugging, probably not useful for most people */ -+ KEYSTROKE_DEBUG_TREE = 12, -+ KEYSTROKE_REGIONS_ON_SCREEN = 13, -+ KEYSTROKE_TEST_INPUT = 14, -+ KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB = 15, -+ -+ KEYSTROKE_FULLSCREEN = 16, -+ KEYSTROKE_VIEWPORT_MOVE_LEFT = 17, -+ KEYSTROKE_VIEWPORT_MOVE_UP = 18, -+ KEYSTROKE_VIEWPORT_MOVE_RIGHT = 19, -+ KEYSTROKE_VIEWPORT_MOVE_DOWN = 20, -+ -+ KEYSTROKE_NOTHING = 21, -+ -+ /* insert more here, increment KEYSTROKE_MAX accordingly. -+ * then update string translation below */ -+ -+ KEYSTROKE_MAX=22, -+}; -+ -+struct nxagentSpecialKeystrokeMap { -+ enum nxagentSpecialKeystroke stroke; -+ unsigned int modifierMask; /* everything except alt/meta */ -+ int modifierAltMeta; /* modifier combination should include alt/meta */ -+ KeySym keysym; -+}; -+ - #endif /* __Keystroke_H__ */ ---- /dev/null -+++ b/README.keystrokes -@@ -0,0 +1,83 @@ -+Configurable keybindings in nxagent -+ -+Keybindings in the redistributed x2go version of nxagent can now be configured -+by the user. This is done via a configuration file. -+ -+File location -+------------- -+ -+nxagent searches for the configuration file in the following order: -+- in the location given by the '-keystrokefile' command line parameter -+- in the location given by the NXAGENT_KEYSTROKEFILE environment variable -+- in ~/.nx/config/keystrokes.cfg -+- in /etc/nxagent/keystrokes.cfg -+ -+If none of those files is accessible, the default configuration is used which -+is the same as the old, traditional nxagent keybindings. -+ -+File format -+----------- -+ -+The configuration file is XML with the following format: -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+Each 'action' defines an action to be executed when receiving that keystroke. A -+list of possible actions is given below. Some of those actions are only -+available with debug builds of nxagent. -+ -+Keys are given as a combination of 'key' and (optionally) a number of -+modifiers. The key attribute is evaluated into a X11 key via the usual -+XStringToKeysym function. A list of possible keys can be found in -+/usr/include/X11/keysymdef.h, the names are specified without the leading -+'XK_'. Evaluation is case-sensitive, so, 'space' and 'Escape' will work while -+'Space' and 'escape' won't. -+ -+Modifiers are given as boolean attributes, possible modifiers are Mod1, Mod2, -+Mod3, Mod4, Control, Shift, Lock. Sensible combinations strongly depend on your -+keyboard configuration, but usually you will need Mod1 and Control. Boolean in -+this context means '0', 'false' and an unspecified attribute are false, anything -+else is considered true. -+ -+Everything in this file is case-sensitive. Unknown lines are ignored. -+Keybindings are evaluated from top to bottom, so if a keybinding matches, other -+keybindings further down will be ignored. The contents of the file replaces the -+default keybindings, and only one file is read, no merging between different -+configuration files is done. This also means that an empty or invalid configuration -+file deactivates all keybindings. -+ -+List of possible 'action' attributes: -+------------------------------------- -+ -+close_session -+switch_all_screens -+minimize -+left -+up -+right -+down -+resize -+defer -+ignore -+fullscreen -+viewport_move_left -+viewport_move_up -+viewport_move_right -+viewport_move_down -+ -+Only in builds with certain debugging options enabled, ignored otherwise: -+force_synchronization -+debug_tree -+regions_on_screen -+test_input -+deactivate_input_devices_grab ---- a/nx-X11/programs/Xserver/hw/nxagent/Args.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c -@@ -149,6 +149,8 @@ - - char nxagentVerbose = 0; - -+char *nxagentKeystrokeFile = NULL; -+ - int ddxProcessArgument(int argc, char *argv[], int i) - { - /* -@@ -1022,6 +1024,20 @@ - return 1; - } - -+ if (!strcmp(argv[i], "-keystrokefile")) -+ { -+ if (i + 1 < argc) -+ { -+ if (NULL != (nxagentKeystrokeFile = strdup(argv[i + 1]))) -+ { -+ return 2; -+ } else { -+ FatalError("malloc failed"); -+ } -+ } -+ return 0; -+ } -+ - return 0; - } - ---- a/nx-X11/programs/Xserver/hw/nxagent/Args.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.h -@@ -83,4 +83,6 @@ - - extern int nxagentRemoteMajor; - -+extern char *nxagentKeystrokeFile; -+ - #endif /* __Args_H__ */ diff --git a/debian/patches/series b/debian/patches/series index 5780128b2..764a6fe1f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -320_nxagent_configurable-keystrokes.full.patch 321_nxagent_x2go-specific-keystroke-config.full.patch 400_nxcomp-version.full+lite.patch #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index c803a9915..c31102bbc 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -1013,15 +1013,18 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp + -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp \ +`pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ +`pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp + -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp \ +`pkg-config --libs libxml-2.0` #endif #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 7074a1818..07e967065 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -149,6 +149,8 @@ static int nxagentGetDialogName(void); char nxagentVerbose = 0; +char *nxagentKeystrokeFile = NULL; + int ddxProcessArgument(int argc, char *argv[], int i) { /* @@ -1022,6 +1024,20 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-keystrokefile")) + { + if (i + 1 < argc) + { + if (NULL != (nxagentKeystrokeFile = strdup(argv[i + 1]))) + { + return 2; + } else { + FatalError("malloc failed"); + } + } + return 0; + } + return 0; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.h b/nx-X11/programs/Xserver/hw/nxagent/Args.h index 8f4d05d6c..85734be23 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.h @@ -83,4 +83,6 @@ extern int nxagentUserDefinedFontPath; extern int nxagentRemoteMajor; +extern char *nxagentKeystrokeFile; + #endif /* __Args_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index a8e162102..d812c7f70 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -142,7 +142,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../ -I../../miext/damage -I../../miext/cw \ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) + $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + `pkg-config --cflags-only-I libxml-2.0` #ifdef SunArchitecture INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ @@ -152,7 +153,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I../../miext/damage -I../../miext/cw \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) + $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + `pkg-config --cflags-only-I libxml-2.0` #else #ifdef cygwinArchitecture INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ @@ -162,7 +164,8 @@ INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) + $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + `pkg-config --cflags-only-I libxml-2.0` #endif #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 6c6e477ab..d61c65b1a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -28,8 +28,15 @@ #include "Keystroke.h" #include "Drawable.h" +#include + +#include +#include + extern Bool nxagentWMIsRunning; extern Bool nxagentIpaq; +extern char *nxagentKeystrokeFile; +Bool nxagentKeystrokeFileParsed = False; #ifdef NX_DEBUG_INPUT int nxagentDebugInputDevices = 0; @@ -47,10 +54,370 @@ extern void nxagentDeactivateInputDevicesGrabs(); #undef DEBUG #undef DUMP + +/* this table is used to parse actions given on the command line or in the + * config file, therefore indices have to match the enum in Keystroke.h */ +char * nxagentSpecialKeystrokeNames[] = { + "end_marker", + "close_session", + "switch_all_screens", + "minimize", + "left", + "up", + "right", + "down", + "resize", + "defer", + "ignore", + "force_synchronization", + + "debug_tree", + "regions_on_screen", + "test_input", + "deactivate_input_devices_grab", + + "fullscreen", + "viewport_move_left", + "viewport_move_up", + "viewport_move_right", + "viewport_move_down", + NULL, +}; + +struct nxagentSpecialKeystrokeMap default_map[] = { + /* stroke, modifierMask, modifierAltMeta, keysym */ + {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_q}, + {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_Q}, + {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_t}, + {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_T}, + {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_f}, + {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_F}, + {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_m}, + {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_M}, + {KEYSTROKE_LEFT, ControlMask, 1, XK_Left}, + {KEYSTROKE_LEFT, ControlMask, 1, XK_KP_Left}, + {KEYSTROKE_UP, ControlMask, 1, XK_Up}, + {KEYSTROKE_UP, ControlMask, 1, XK_KP_Up}, + {KEYSTROKE_RIGHT, ControlMask, 1, XK_Right}, + {KEYSTROKE_RIGHT, ControlMask, 1, XK_KP_Right}, + {KEYSTROKE_DOWN, ControlMask, 1, XK_Down}, + {KEYSTROKE_DOWN, ControlMask, 1, XK_KP_Down}, + {KEYSTROKE_RESIZE, ControlMask, 1, XK_r}, + {KEYSTROKE_RESIZE, ControlMask, 1, XK_R}, + {KEYSTROKE_DEFER, ControlMask, 1, XK_e}, + {KEYSTROKE_DEFER, ControlMask, 1, XK_E}, + {KEYSTROKE_IGNORE, ControlMask, 1, XK_BackSpace}, + {KEYSTROKE_IGNORE, 0, 0, XK_Terminate_Server}, + {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_j}, + {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_J}, + {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_a}, + {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_A}, + {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_x}, + {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_X}, + {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_y}, + {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_Y}, + {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_f}, + {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_F}, + {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_Left}, + {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_KP_Left}, + {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_Up}, + {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_KP_Up}, + {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_Right}, + {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_KP_Right}, + {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_Down}, + {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_KP_Down}, + {KEYSTROKE_END_MARKER, 0, 0, 0}, +}; +struct nxagentSpecialKeystrokeMap *map = default_map; + +static int modifier_matches(unsigned int mask, int compare_alt_meta, unsigned int state) +{ + /* nxagentAltMetaMask needs special handling + * it seems to me its an and-ed mask of all possible meta and alt keys + * somehow... + * + * otherwise this function would be just a simple bitop + */ + int ret = 1; + + if (compare_alt_meta) { + if (! (state & nxagentAltMetaMask)) { + ret = 0; + } + + mask &= ~nxagentAltMetaMask; + } + + /* all modifiers except meta/alt have to match exactly, extra bits are evil */ + if ((mask & state) != mask) { + ret = 0; + } + + return ret; +} + +static int read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystrokeMap *ret) +{ + int successful = 0; + struct nxagentSpecialKeystrokeMap new = {0, 0, 0, 0}; + xmlAttr *attr; + + for (attr = node->properties; attr; attr = attr->next) + { + /* ignore attributes without data (which should never happen anyways) */ + if (attr->children->content == NULL) + { + char *aname = (attr->name)?(attr->name):"unknown"; + fprintf(stderr, "attribute %s with NULL value", aname); + continue; + } + if (strcmp((char *)attr->name, "action") == 0) + { + int i; + for (i = 0; nxagentSpecialKeystrokeNames[i] != NULL; i++) + { + if (strcmp(nxagentSpecialKeystrokeNames[i],(char *)attr->children->content) == 0) + { + /* this relies on the values of enum nxagentSpecialKeystroke and the + * indices of nxagentSpecialKeystrokeNames being in sync */ + new.stroke = i; + break; + } + } + continue; + } + else if (strcmp((char *)attr->name, "key") == 0) + { + new.keysym = XStringToKeysym((char *)attr->children->content); + /* NoSymbol is usually 0, but could there be weird implementations? */ + if (new.keysym == NoSymbol) + { + new.keysym = 0; + } + continue; + } + + /* ignore attributes with value="0" or "false", everything else is interpreted as true */ + if (strcmp((char *)attr->children->content, "0") == 0 || strcmp((char *)attr->children->content, "false") == 0) + continue; + + if (strcmp((char *)attr->name, "Mod1") == 0) + { + new.modifierMask |= Mod1Mask; + } + else if (strcmp((char *)attr->name, "Mod2") == 0) + { + new.modifierMask |= Mod2Mask; + } + else if (strcmp((char *)attr->name, "Mod3") == 0) + { + new.modifierMask |= Mod3Mask; + } + else if (strcmp((char *)attr->name, "Mod4") == 0) + { + new.modifierMask |= Mod4Mask; + } + else if (strcmp((char *)attr->name, "Control") == 0) + { + new.modifierMask |= ControlMask; + } + else if (strcmp((char *)attr->name, "Shift") == 0) + { + new.modifierMask |= ShiftMask; + } + else if (strcmp((char *)attr->name, "Lock") == 0) + { + new.modifierMask |= LockMask; + } + else if (strcmp((char *)attr->name, "AltMeta") == 0) + { + new.modifierAltMeta = 1; + } + } + + if (new.stroke != 0 && new.keysym != 0) + { + /* keysym and stroke are required, everything else is optional */ + successful = 1; + memcpy(ret, &new, sizeof(struct nxagentSpecialKeystrokeMap)); + } + return successful; +} + +/* + * searches a keystroke xml file + * + * search order: + * - '-keystrokefile' commandline parameter + * - $NXAGENT_KEYSTROKEFILE environment variable + * - $HOME/.nx/config/keystrokes.cfg + * - /etc/nxagent/keystrokes.cfg + * - hardcoded traditional NX default settings + */ +static void parse_keystroke_file(void) +{ + char *filename = NULL; + + char *homefile = "/.nx/config/keystrokes.cfg"; + char *etcfile = "/etc/nxagent/keystrokes.cfg"; + + if (nxagentKeystrokeFile != NULL && access(nxagentKeystrokeFile, R_OK) == 0) + { + filename = strdup(nxagentKeystrokeFile); + if (filename == NULL) + { + fprintf(stderr, "malloc failed"); + exit(EXIT_FAILURE); + } + } + else if ((filename = getenv("NXAGENT_KEYSTROKEFILE")) != NULL && access(filename, R_OK) == 0) + { + filename = strdup(filename); + if (filename == NULL) + { + fprintf(stderr, "malloc failed"); + exit(EXIT_FAILURE); + } + } + else + { + char *homedir = getenv("HOME"); + filename = NULL; + if (homedir != NULL) + { + homedir = strdup(homedir); + if (homedir == NULL) + { + fprintf(stderr, "malloc failed"); +exit(EXIT_FAILURE); + } + filename = calloc(1, strlen(homefile) + strlen(homedir) + 1); + if (filename == NULL) + { + fprintf(stderr, "malloc failed"); + exit(EXIT_FAILURE); + } + strcpy(filename, homedir); + strcpy(filename + strlen(homedir), homefile); + if (homedir) + { + free(homedir); + } + } + + if (access(filename, R_OK) == 0) + { + /* empty */ + } + else if (access(etcfile, R_OK) == 0) + { + if (filename) + free(filename); + filename = strdup(etcfile); + if (filename == NULL) + { + fprintf(stderr, "malloc failed"); + exit(EXIT_FAILURE); + } + } + else + { + if (filename) +free(filename); + filename = NULL; + } + } + + /* now we know which file to read, if any */ + if (filename) + { + xmlDoc *doc = NULL; + xmlNode *root = NULL; + LIBXML_TEST_VERSION + doc = xmlReadFile(filename, NULL, 0); + if (doc != NULL) + { + xmlNode *cur = NULL; + root = xmlDocGetRootElement(doc); + + for (cur = root; cur; cur = cur->next) + { + if (cur->type == XML_ELEMENT_NODE && strcmp((char *)cur->name, "keystrokes") == 0) +{ + xmlNode *bindings = NULL; + int num = 0; + int idx = 0; + + for (bindings = cur->children; bindings; bindings = bindings->next) + { + if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0) + { + num++; + } + } + map = calloc((num + 1), sizeof(struct nxagentSpecialKeystrokeMap)); + if (map == NULL) + { + fprintf(stderr, "malloc failed"); + exit(EXIT_FAILURE); + } + + for (bindings = cur->children; bindings; bindings = bindings->next) + { + if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0) + { + int res = 0; + res = read_binding_from_xmlnode(bindings, &(map[idx])); + if (res) + idx++; + } + } + + map[idx].stroke = KEYSTROKE_END_MARKER; + } + } + + xmlFreeDoc(doc); + xmlCleanupParser(); + } + else + { + #ifdef DEBUG + fprintf("XML parsing for %s failed\n", filename); + #endif + } + free(filename); + } +} + +static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) +{ + KeySym keysym = XKeycodeToKeysym(nxagentDisplay, X->keycode, 0); + struct nxagentSpecialKeystrokeMap *cur = map; + + if (! nxagentKeystrokeFileParsed) + { + parse_keystroke_file(); + nxagentKeystrokeFileParsed = True; + } + + enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING; + + while (cur->stroke != KEYSTROKE_END_MARKER) { + if (cur->keysym == keysym && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) { + return cur->stroke; + } + cur++; + } + + return ret; +} + int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { KeySym sym; int index = 0; + enum nxagentSpecialKeystroke stroke = find_keystroke(X); *result = doNothing; @@ -87,257 +454,128 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) return 1; } - if ((X -> state & nxagentAltMetaMask) && - ((X -> state & (ControlMask | ShiftMask)) == ControlMask)) - { - switch (sym) - { + switch (stroke) { + case KEYSTROKE_DEBUG_TREE: #ifdef DEBUG_TREE - - case XK_q: - case XK_Q: - { - *result = doDebugTree; - - break; - } - - #endif /* DEBUG_TREE */ - - case XK_t: - case XK_T: - { - *result = doCloseSession; - - break; - } - case XK_f: - case XK_F: - { - if (nxagentOption(Rootless) == False) - { - *result = doSwitchAllScreens; - } - - break; - } - case XK_m: - case XK_M: - { - if (nxagentOption(Rootless) == False) - { - *result = doMinimize; - } - - break; - } - case XK_Left: - case XK_KP_Left: - { - if (nxagentOption(Rootless) == False && - nxagentOption(DesktopResize) == False) - { - *result = doViewportLeft; - } - - break; - } - case XK_Up: - case XK_KP_Up: - { - if (nxagentOption(Rootless) == False && - nxagentOption(DesktopResize) == False) - { - *result = doViewportUp; - } - - break; + *result = doDebugTree; + #endif + break; + case KEYSTROKE_CLOSE_SESSION: + *result = doCloseSession; + break; + case KEYSTROKE_SWITCH_ALL_SCREENS: + if (nxagentOption(Rootless) == False) { + *result = doSwitchAllScreens; } - case XK_Right: - case XK_KP_Right: - { - if (nxagentOption(Rootless) == False && - nxagentOption(DesktopResize) == False) - { - *result = doViewportRight; - } - - break; + break; + case KEYSTROKE_MINIMIZE: + if (nxagentOption(Rootless) == False) { + *result = doMinimize; } - case XK_Down: - case XK_KP_Down: - { - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) - { - *result = doViewportDown; - } - - break; + break; + case KEYSTROKE_LEFT: + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { + *result = doViewportLeft; } - case XK_R: - case XK_r: - { - if (nxagentOption(Rootless) == 0) - { - *result = doSwitchResizeMode; - } - - break; + break; + case KEYSTROKE_UP: + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { + *result = doViewportUp; } - case XK_E: - case XK_e: - { - *result = doSwitchDeferMode; - - break; + break; + case KEYSTROKE_RIGHT: + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { + *result = doViewportRight; } - case XK_BackSpace: - case XK_Terminate_Server: - { - /* - * Discard Ctrl-Alt-BackSpace key. - */ - - return 1; - - break; + break; + case KEYSTROKE_DOWN: + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { + *result = doViewportDown; } - - case XK_J: - case XK_j: - { - nxagentForceSynchronization = 1; - - return 1; + break; + case KEYSTROKE_RESIZE: + if (nxagentOption(Rootless) == False) { + *result = doSwitchResizeMode; } - + break; + case KEYSTROKE_DEFER: + *result = doSwitchDeferMode; + break; + case KEYSTROKE_IGNORE: + /* this is used e.g. to ignore C-A-Backspace aka XK_Terminate_Server */ + return 1; + break; + case KEYSTROKE_FORCE_SYNCHRONIZATION: + nxagentForceSynchronization = 1; + break; + case KEYSTROKE_REGIONS_ON_SCREEN: #ifdef DUMP - - case XK_A: - case XK_a: - { - /* - * Used to test the lazy encoding. - */ - - nxagentRegionsOnScreen(); - - return 1; - } - + nxagentRegionsOnScreen(); #endif - + break; + case KEYSTROKE_TEST_INPUT: + /* + * Used to test the input devices state. + */ #ifdef NX_DEBUG_INPUT - - case XK_X: - case XK_x: - { - /* - * Used to test the input devices state. - */ - - if (X -> type == KeyPress) - { - if (nxagentDebugInputDevices == 0) - { - fprintf(stderr, "Info: Turning input devices debug ON.\n"); - - nxagentDebugInputDevices = 1; - } - else - { - fprintf(stderr, "Info: Turning input devices debug OFF.\n"); - - nxagentDebugInputDevices = 0; - - nxagentLastInputDevicesDumpTime = 0; - } + if (X -> type == KeyPress) { + if (nxagentDebugInputDevices == 0) { + fprintf(stderr, "Info: Turning input devices debug ON.\n"); + nxagentDebugInputDevices = 1; + } else { + fprintf(stderr, "Info: Turning input devices debug OFF.\n"); + nxagentDebugInputDevices = 0; + nxagentLastInputDevicesDumpTime = 0; } - - return 1; } - - case XK_Y: - case XK_y: - { - /* - * Used to deactivate input devices grab. - */ - - if (X -> type == KeyPress) - { - nxagentDeactivateInputDevicesGrabs(); - } - - return 1; + return 1; + #endif + break; + case KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB: + #ifdef NX_DEBUG_INPUT + if (X->type == KeyPress) { + nxagentDeactivateInputDevicesGrab(); } - + return 1; #endif - } - } - else if ((X -> state & nxagentAltMetaMask) && - ((X -> state & (ControlMask | ShiftMask)) == (ControlMask | - ShiftMask))) - { - switch (sym) - { - case XK_f: - case XK_F: - { - if (nxagentOption(Rootless) == 0) - { - *result = doSwitchFullscreen; - } - - break; + break; + case KEYSTROKE_FULLSCREEN: + if (nxagentOption(Rootless) == 0) { + *result = doSwitchFullscreen; } - case XK_Left: - case XK_KP_Left: - { - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) - { - *result = doViewportMoveLeft; - } - - break; + break; + case KEYSTROKE_VIEWPORT_MOVE_LEFT: + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) { + *result = doViewportMoveLeft; } - case XK_Up: - case XK_KP_Up: - { - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) - { - *result = doViewportMoveUp; - } - - break; + break; + case KEYSTROKE_VIEWPORT_MOVE_UP: + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) { + *result = doViewportMoveUp; } - case XK_Right: - case XK_KP_Right: - { - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) - { - *result = doViewportMoveRight; - } - - break; + break; + case KEYSTROKE_VIEWPORT_MOVE_RIGHT: + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) { + *result = doViewportMoveRight; } - case XK_Down: - case XK_KP_Down: - { - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) - { - *result = doViewportMoveDown; - } - - break; + break; + case KEYSTROKE_VIEWPORT_MOVE_DOWN: + if (nxagentOption(Rootless) == 0 && + nxagentOption(DesktopResize) == 0) { + *result = doViewportMoveDown; } - } + break; + case KEYSTROKE_NOTHING: /* do nothing. difference to KEYSTROKE_IGNORE is the return value */ + case KEYSTROKE_END_MARKER: /* just to make gcc STFU */ + case KEYSTROKE_MAX: + break; } - return (*result == doNothing) ? 0 : 1; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index ef71a8851..d9575c875 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -24,4 +24,51 @@ extern int nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); unsigned int nxagentAltMetaMask; +/* keep this sorted, do not rely on any numerical value in this enum, and be aware + * that KEYSTROKE_MAX may be used in a malloc */ + +/* also be aware that if changing any numerical values, you also need to change values + * Keystroke.c nxagentSpecialKeystrokeNames */ +enum nxagentSpecialKeystroke { + /* 0 is used as end marker */ + KEYSTROKE_END_MARKER = 0, + KEYSTROKE_CLOSE_SESSION = 1, + KEYSTROKE_SWITCH_ALL_SCREENS = 2, + KEYSTROKE_MINIMIZE = 3, + KEYSTROKE_LEFT = 4, + KEYSTROKE_UP = 5, + KEYSTROKE_RIGHT = 6, + KEYSTROKE_DOWN = 7, + KEYSTROKE_RESIZE = 8, + KEYSTROKE_DEFER = 9, + KEYSTROKE_IGNORE = 10, + KEYSTROKE_FORCE_SYNCHRONIZATION = 11, + + /* stuff used for debugging, probably not useful for most people */ + KEYSTROKE_DEBUG_TREE = 12, + KEYSTROKE_REGIONS_ON_SCREEN = 13, + KEYSTROKE_TEST_INPUT = 14, + KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB = 15, + + KEYSTROKE_FULLSCREEN = 16, + KEYSTROKE_VIEWPORT_MOVE_LEFT = 17, + KEYSTROKE_VIEWPORT_MOVE_UP = 18, + KEYSTROKE_VIEWPORT_MOVE_RIGHT = 19, + KEYSTROKE_VIEWPORT_MOVE_DOWN = 20, + + KEYSTROKE_NOTHING = 21, + + /* insert more here, increment KEYSTROKE_MAX accordingly. + * then update string translation below */ + + KEYSTROKE_MAX=22, +}; + +struct nxagentSpecialKeystrokeMap { + enum nxagentSpecialKeystroke stroke; + unsigned int modifierMask; /* everything except alt/meta */ + int modifierAltMeta; /* modifier combination should include alt/meta */ + KeySym keysym; +}; + #endif /* __Keystroke_H__ */ -- cgit v1.2.3 From fea8fb5aeeeb77ecfd3e98791bd6f77a9782b588 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Fri, 13 Feb 2015 13:06:53 +0100 Subject: Adapt paths of keystrokes.cfg if nxagent runs as x2goagent (321_nxagent_x2go-specific-keystroke-config.full.patch). --- ...agent_x2go-specific-keystroke-config.full.patch | 25 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 6 ++++++ 3 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 debian/patches/321_nxagent_x2go-specific-keystroke-config.full.patch (limited to 'debian') diff --git a/debian/patches/321_nxagent_x2go-specific-keystroke-config.full.patch b/debian/patches/321_nxagent_x2go-specific-keystroke-config.full.patch deleted file mode 100644 index 795f10b76..000000000 --- a/debian/patches/321_nxagent_x2go-specific-keystroke-config.full.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Adapt paths of keystrokes.cfg if nxagent runs as x2goagent -Author: Horst Schirmeier - ---- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c -@@ -27,6 +27,7 @@ - #include "Options.h" - #include "Keystroke.h" - #include "Drawable.h" -+#include "Init.h" /* extern int nxagentX2go */ - - #include - -@@ -261,6 +262,11 @@ static void parse_keystroke_file(void) - char *homefile = "/.nx/config/keystrokes.cfg"; - char *etcfile = "/etc/nxagent/keystrokes.cfg"; - -+ if (nxagentX2go) { -+ homefile = "/.x2go/config/keystrokes.cfg"; -+ etcfile = "/etc/x2go/keystrokes.cfg"; -+ } -+ - if (nxagentKeystrokeFile != NULL && access(nxagentKeystrokeFile, R_OK) == 0) - { - filename = strdup(nxagentKeystrokeFile); diff --git a/debian/patches/series b/debian/patches/series index 764a6fe1f..86575ece8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -321_nxagent_x2go-specific-keystroke-config.full.patch 400_nxcomp-version.full+lite.patch #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index d61c65b1a..404ed035d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -27,6 +27,7 @@ #include "Options.h" #include "Keystroke.h" #include "Drawable.h" +#include "Init.h" /* extern int nxagentX2go */ #include @@ -261,6 +262,11 @@ static void parse_keystroke_file(void) char *homefile = "/.nx/config/keystrokes.cfg"; char *etcfile = "/etc/nxagent/keystrokes.cfg"; + if (nxagentX2go) { + homefile = "/.x2go/config/keystrokes.cfg"; + etcfile = "/etc/x2go/keystrokes.cfg"; + } + if (nxagentKeystrokeFile != NULL && access(nxagentKeystrokeFile, R_OK) == 0) { filename = strdup(nxagentKeystrokeFile); -- cgit v1.2.3 From d4d3fe0e6e77a58e68defc5895a589a681d7d092 Mon Sep 17 00:00:00 2001 From: Nito Martinez Date: Fri, 13 Feb 2015 13:26:27 +0100 Subject: Allow version 4-digit version comparison/handshake (400_nxcomp-version.full+lite.patch). --- debian/patches/400_nxcomp-version.full+lite.patch | 240 ---------------------- debian/patches/series | 1 - nxcomp/Control.cpp | 40 +--- nxcomp/Control.h | 9 + nxcomp/Loop.cpp | 3 +- nxcomp/Makefile.in | 3 +- nxcomp/NX.h | 6 + 7 files changed, 26 insertions(+), 276 deletions(-) delete mode 100644 debian/patches/400_nxcomp-version.full+lite.patch (limited to 'debian') diff --git a/debian/patches/400_nxcomp-version.full+lite.patch b/debian/patches/400_nxcomp-version.full+lite.patch deleted file mode 100644 index 703cec823..000000000 --- a/debian/patches/400_nxcomp-version.full+lite.patch +++ /dev/null @@ -1,240 +0,0 @@ -Description: Allow version 4-digit version comparison/handshake -Author: Nito Martinez ---- a/nxcomp/Control.cpp -+++ b/nxcomp/Control.cpp -@@ -15,6 +15,7 @@ - /* */ - /**************************************************************************/ - -+#include "NX.h" - #include "NXpack.h" - - #include "Control.h" -@@ -594,44 +595,17 @@ - RemoteVersionMajor = -1; - RemoteVersionMinor = -1; - RemoteVersionPatch = -1; -+ RemoteVersionMaintenancePatch = -1; - - CompatVersionMajor = -1; - CompatVersionMinor = -1; - CompatVersionPatch = -1; -+ CompatVersionMaintenancePatch = -1; - -- char version[32]; -- -- strcpy(version, VERSION); -- -- char *value; -- -- value = strtok(version, "."); -- -- for (int i = 0; value != NULL && i < 3; i++) -- { -- switch (i) -- { -- case 0: -- -- LocalVersionMajor = atoi(value); -- -- break; -- -- case 1: -- -- LocalVersionMinor = atoi(value); -- -- break; -- -- case 2: -- -- LocalVersionPatch = atoi(value); -- -- break; -- } -- -- value = strtok(NULL, "."); -- } -+ LocalVersionMajor = NXMajorVersion(); -+ LocalVersionMinor = NXMinorVersion(); -+ LocalVersionPatch = NXPatchVersion(); -+ LocalVersionMaintenancePatch = NXMaintenancePatchVersion(); - - #ifdef TEST - *logofs << "Control: Major version is " << LocalVersionMajor ---- a/nxcomp/Control.h -+++ b/nxcomp/Control.h -@@ -299,17 +299,26 @@ - // Version number of local and remote proxy. - // - -+ /* -+ * LocalVersionMaintenancePatch, RemoteVersionMaintenancePatch -+ * CompatVersionMaintenancePatch -+ * -+ * currently not used, for future compatibility checks -+ */ - int LocalVersionMajor; - int LocalVersionMinor; - int LocalVersionPatch; -+ int LocalVersionMaintenancePatch; - - int RemoteVersionMajor; - int RemoteVersionMinor; - int RemoteVersionPatch; -+ int RemoteVersionMaintenancePatch; - - int CompatVersionMajor; - int CompatVersionMinor; - int CompatVersionPatch; -+ int CompatVersionMaintenancePatch; - - // - // Which unpack methods are implemented in proxy? ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -14250,7 +14250,8 @@ - cerr << "NXPROXY - " << "Version " - << control -> LocalVersionMajor << "." - << control -> LocalVersionMinor << "." -- << control -> LocalVersionPatch; -+ << control -> LocalVersionPatch << "." -+ << control -> LocalVersionMaintenancePatch; - - cerr << endl; - } ---- a/nxcomp/Makefile.in -+++ b/nxcomp/Makefile.in -@@ -105,7 +105,8 @@ - - CSRC = MD5.c \ - Pack.c \ -- Vars.c -+ Vars.c \ -+ Version.c - - CXXSRC = Loop.cpp \ - Children.cpp \ ---- a/nxcomp/NX.h -+++ b/nxcomp/NX.h -@@ -442,6 +442,12 @@ - - extern void NXTransCleanup(void) __attribute__((noreturn)); - -+extern const char* NXVersion(); -+extern int NXMajorVersion(); -+extern int NXMinorVersion(); -+extern int NXPatchVersion(); -+extern int NXMaintenancePatchVersion(); -+ - #ifdef __cplusplus - } - #endif ---- /dev/null -+++ b/nxcomp/Version.c -@@ -0,0 +1,106 @@ -+/**************************************************************************/ -+/* */ -+/* Copyright (C) 2014 Qindel http://qindel.com and QVD http://theqvd.com */ -+/* */ -+/* 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 3 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, see . */ -+/* */ -+/* Additional permission under GNU GPL version 3 section 7 */ -+/* */ -+/* If you modify this Program, or any covered work, by linking or */ -+/* combining it with [name of library] (or a modified version of that */ -+/* library), containing parts covered by the terms of [name of library's */ -+/* license], the licensors of this Program grant you additional */ -+/* permission to convey the resulting work. {Corresponding Source for a */ -+/* non-source form of such a combination shall include the source code */ -+/* for the parts of [name of library] used as well as that of the covered */ -+/* work.} */ -+/* */ -+/* */ -+/**************************************************************************/ -+ -+#include -+#include -+#include -+#include "NX.h" -+ -+ -+static int _NXVersionMajor = -1; -+static int _NXVersionMinor = -1; -+static int _NXVersionPatch = -1; -+static int _NXVersionMaintenancePatch = -1; -+ -+ -+const char* NXVersion() { -+ const char *version = VERSION; -+ return version; -+} -+ -+void _parseNXVersion() { -+ char version[32]; -+ int i; -+ strcpy(version, VERSION); -+ -+ char *value; -+ /* Reset values to 0 if undefined */ -+ _NXVersionMajor = _NXVersionMinor = _NXVersionPatch = _NXVersionMaintenancePatch = 0; -+ -+ -+#define NXVERSIONSEPARATOR "." -+ value = strtok(version, NXVERSIONSEPARATOR); -+ -+ for (i = 0; value != NULL && i < 4; i++) -+ { -+ switch (i) -+ { -+ case 0: -+ _NXVersionMajor = atoi(value); -+ break; -+ -+ case 1: -+ _NXVersionMinor = atoi(value); -+ break; -+ -+ case 2: -+ _NXVersionPatch = atoi(value); -+ break; -+ -+ case 3: -+ _NXVersionMaintenancePatch = atoi(value); -+ break; -+ } -+ -+ value = strtok(NULL, NXVERSIONSEPARATOR); -+ } -+} -+ -+int NXMajorVersion() { -+ if (_NXVersionMajor == -1) -+ _parseNXVersion(); -+ return _NXVersionMajor; -+} -+int NXMinorVersion() { -+ if (_NXVersionMinor == -1) -+ _parseNXVersion(); -+ return _NXVersionMinor; -+} -+int NXPatchVersion() { -+ if (_NXVersionPatch == -1) -+ _parseNXVersion(); -+ return _NXVersionPatch; -+} -+int NXMaintenancePatchVersion() { -+ if (_NXVersionMaintenancePatch == -1) -+ _parseNXVersion(); -+ return _NXVersionMaintenancePatch; -+} diff --git a/debian/patches/series b/debian/patches/series index 86575ece8..b00553eed 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -400_nxcomp-version.full+lite.patch #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch 601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch diff --git a/nxcomp/Control.cpp b/nxcomp/Control.cpp index ce99567d7..062654235 100644 --- a/nxcomp/Control.cpp +++ b/nxcomp/Control.cpp @@ -15,6 +15,7 @@ /* */ /**************************************************************************/ +#include "NX.h" #include "NXpack.h" #include "Control.h" @@ -594,44 +595,17 @@ Control::Control() RemoteVersionMajor = -1; RemoteVersionMinor = -1; RemoteVersionPatch = -1; + RemoteVersionMaintenancePatch = -1; CompatVersionMajor = -1; CompatVersionMinor = -1; CompatVersionPatch = -1; + CompatVersionMaintenancePatch = -1; - char version[32]; - - strcpy(version, VERSION); - - char *value; - - value = strtok(version, "."); - - for (int i = 0; value != NULL && i < 3; i++) - { - switch (i) - { - case 0: - - LocalVersionMajor = atoi(value); - - break; - - case 1: - - LocalVersionMinor = atoi(value); - - break; - - case 2: - - LocalVersionPatch = atoi(value); - - break; - } - - value = strtok(NULL, "."); - } + LocalVersionMajor = NXMajorVersion(); + LocalVersionMinor = NXMinorVersion(); + LocalVersionPatch = NXPatchVersion(); + LocalVersionMaintenancePatch = NXMaintenancePatchVersion(); #ifdef TEST *logofs << "Control: Major version is " << LocalVersionMajor diff --git a/nxcomp/Control.h b/nxcomp/Control.h index c21477544..71f357c4a 100644 --- a/nxcomp/Control.h +++ b/nxcomp/Control.h @@ -299,17 +299,26 @@ class Control // Version number of local and remote proxy. // + /* + * LocalVersionMaintenancePatch, RemoteVersionMaintenancePatch + * CompatVersionMaintenancePatch + * + * currently not used, for future compatibility checks + */ int LocalVersionMajor; int LocalVersionMinor; int LocalVersionPatch; + int LocalVersionMaintenancePatch; int RemoteVersionMajor; int RemoteVersionMinor; int RemoteVersionPatch; + int RemoteVersionMaintenancePatch; int CompatVersionMajor; int CompatVersionMinor; int CompatVersionPatch; + int CompatVersionMaintenancePatch; // // Which unpack methods are implemented in proxy? diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 77b0c806c..c8c95bd72 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -14250,7 +14250,8 @@ void PrintVersionInfo() cerr << "NXPROXY - " << "Version " << control -> LocalVersionMajor << "." << control -> LocalVersionMinor << "." - << control -> LocalVersionPatch; + << control -> LocalVersionPatch << "." + << control -> LocalVersionMaintenancePatch; cerr << endl; } diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index 1be928167..93bb0b38c 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -105,7 +105,8 @@ MSRC = CSRC = MD5.c \ Pack.c \ - Vars.c + Vars.c \ + Version.c CXXSRC = Loop.cpp \ Children.cpp \ diff --git a/nxcomp/NX.h b/nxcomp/NX.h index d98af79bb..2dbf68662 100644 --- a/nxcomp/NX.h +++ b/nxcomp/NX.h @@ -442,6 +442,12 @@ extern int NXTransParseEnvironment(const char *env, int force); extern void NXTransCleanup(void) __attribute__((noreturn)); +extern const char* NXVersion(); +extern int NXMajorVersion(); +extern int NXMinorVersion(); +extern int NXPatchVersion(); +extern int NXMaintenancePatchVersion(); + #ifdef __cplusplus } #endif -- cgit v1.2.3 From c4a8556c45786c83b04b2e958234cb4c724e1910 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 13 Feb 2015 13:27:42 +0100 Subject: Unique Library Names Patch (600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch). We really want to make use of rpm's automatic dependency finding. Binaries are scanned for DT_NEEDED entries, the latter of which are then used for populating the "Requires"-type deps. The "nxagent" binary for example would require libX11.so.6. That incurs problems: 1. A package manager told to install nxagent could select xorg-x11 rather than nx-libs, even though nxagent depends on the NX version. 2. A package manager told to install $some_program could select nx-libs rather than xorg-x11 (since both provide libX11.so.6), but, since the NX library is in an obscure directory, running $some_program would fail as libX11.so.6 is not found. To solve this, give the NX libraries unique names different from the Xorg ones. --- ...nxcompext+nxcompshad_unique-libnames.full.patch | 1183 -------------------- debian/patches/series | 1 - nx-X11/config/cf/Imake.rules | 12 +- nx-X11/config/cf/X11.tmpl | 240 ++-- nx-X11/config/cf/lnxLib.rules | 16 +- nx-X11/config/cf/lnxLib.tmpl | 4 +- nx-X11/lib/X11/Imakefile | 2 +- nx-X11/lib/XRes/Imakefile | 2 +- nx-X11/lib/Xau/Imakefile | 2 +- nx-X11/lib/Xcomposite/Imakefile | 2 +- nx-X11/lib/Xcomposite/xcomposite.pc.in | 2 +- nx-X11/lib/Xcursor/Imakefile | 2 +- nx-X11/lib/Xcursor/xcursor.pc.in | 2 +- nx-X11/lib/Xdamage/Imakefile | 2 +- nx-X11/lib/Xdamage/xdamage.pc.in | 2 +- nx-X11/lib/Xdmcp/Imakefile | 2 +- nx-X11/lib/Xext/Imakefile | 2 +- nx-X11/lib/Xfixes/Imakefile | 2 +- nx-X11/lib/Xfixes/xfixes.pc.in | 2 +- nx-X11/lib/Xinerama/Imakefile | 2 +- nx-X11/lib/Xpm/Imakefile | 2 +- nx-X11/lib/Xrandr/Imakefile | 2 +- nx-X11/lib/Xrender/Imakefile | 2 +- nx-X11/lib/Xrender/xrender.pc.in | 2 +- nx-X11/lib/Xtst/Imakefile | 2 +- nx-X11/lib/font/Imakefile | 2 +- nx-X11/lib/oldX/Imakefile | 2 +- nx-X11/lib/xkbfile/Imakefile | 2 +- nx-X11/lib/xkbui/Imakefile | 2 +- nx-X11/programs/Xserver/Imakefile | 18 +- nxcompext/Makefile.in | 4 +- nxcompshad/Makefile.in | 4 +- 32 files changed, 172 insertions(+), 1356 deletions(-) delete mode 100644 debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch (limited to 'debian') diff --git a/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch b/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch deleted file mode 100644 index 7c21c6fe5..000000000 --- a/debian/patches/600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch +++ /dev/null @@ -1,1183 +0,0 @@ -Description: Unique Library Names Patch - Patch from the RPM folks... - . - We really want to make use of rpm's automatic dependency finding. - Binaries are scanned for DT_NEEDED entries, the latter of which are - then used for populating the "Requires"-type deps. The "nxagent" - binary for example would require libX11.so.6. That incurs problems: - . - 1. A package manager told to install nxagent could select xorg-x11 - rather than nx-libs, even though nxagent depends on the NX version. - . - 2. A package manager told to install $some_program could select nx-libs - rather than xorg-x11 (since both provide libX11.so.6), but, since - the NX library is in an obscure directory, running $some_program - would fail as libX11.so.6 is not found. - . - To solve this, give the NX libraries unique names different from the - Xorg ones. -Forward: pending -Author: Jan Engelhardt -Last-Update: 2012-02-15 ---- - nx-X11/config/cf/Imake.rules | 12 - - nx-X11/config/cf/X11.tmpl | 240 ++++++++++---------- - nx-X11/config/cf/lnxLib.rules | 16 - - nx-X11/config/cf/lnxLib.tmpl | 4 - nx-X11/lib/X11/Imakefile | 2 - nx-X11/lib/XRes/Imakefile | 2 - nx-X11/lib/Xau/Imakefile | 2 - nx-X11/lib/Xcomposite/Imakefile | 2 - nx-X11/lib/Xcomposite/xcomposite.pc.in | 2 - nx-X11/lib/Xcursor/Imakefile | 2 - nx-X11/lib/Xcursor/xcursor.pc.in | 2 - nx-X11/lib/Xdamage/Imakefile | 2 - nx-X11/lib/Xdamage/xdamage.pc.in | 2 - nx-X11/lib/Xdmcp/Imakefile | 2 - nx-X11/lib/Xext/Imakefile | 2 - nx-X11/lib/Xfixes/Imakefile | 2 - nx-X11/lib/Xfixes/xfixes.pc.in | 2 - nx-X11/lib/Xinerama/Imakefile | 2 - nx-X11/lib/Xpm/Imakefile | 2 - nx-X11/lib/Xrandr/Imakefile | 2 - nx-X11/lib/Xrender/Imakefile | 2 - nx-X11/lib/Xrender/xrender.pc.in | 2 - nx-X11/lib/Xtst/Imakefile | 2 - nx-X11/lib/font/Imakefile | 2 - nx-X11/lib/oldX/Imakefile | 2 - nx-X11/lib/xkbfile/Imakefile | 2 - nx-X11/lib/xkbui/Imakefile | 2 - nx-X11/programs/Xserver/Imakefile | 18 - - nxcompext/Makefile.in | 4 - nxcompshad/Makefile.in | 4 - 103 files changed, 294 insertions(+), 294 deletions(-) - ---- a/nx-X11/config/cf/Imake.rules -+++ b/nx-X11/config/cf/Imake.rules -@@ -2124,9 +2124,9 @@ - */ - #ifndef ProjectUnsharedFontLibReferences - #define ProjectUnsharedFontLibReferences() @@\ --DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(Xfont)) @@\ --FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ --LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) -+DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(NX_Xfont)) @@\ -+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ -+LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) - #endif - - /* -@@ -2142,9 +2142,9 @@ - #ifndef SharedFontLibReferences - #define SharedFontLibReferences() @@\ - SOFONTREV = SharedFontRev @@\ --DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\ --FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ --LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) -+DEPFONTLIB = SharedLibDependencies(NX_Xfont,$(FONTLIBSRC),SOFONTREV) @@\ -+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ -+LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) - #endif - - /* ---- a/nx-X11/config/cf/X11.tmpl -+++ b/nx-X11/config/cf/X11.tmpl -@@ -1835,9 +1835,9 @@ - #ifndef SharedX11Rev - #define SharedX11Rev 6.2 - #endif --SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) -+SharedLibReferences(XONLY,NX_X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) - #else --ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) - #endif - /* Common alternate spellings */ - DEPXLIBONLY = $(DEPXONLYLIB) -@@ -2466,9 +2466,9 @@ - #ifndef SharedXextRev - #define SharedXextRev 6.4 - #endif --SharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev) -+SharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev) - #else --ProjectUnsharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),XBuildLibDir) - #endif - LINTEXTENSIONLIB = $(LINTEXTENSION) - DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) -@@ -2480,9 +2480,9 @@ - #ifndef SharedXssRev - #define SharedXssRev 1.0 - #endif --SharedLibReferences(XSS,Xss,$(XSSLIBSRC),SOXSSREV,SharedXssRev) -+SharedLibReferences(XSS,NX_Xss,$(XSSLIBSRC),SOXSSREV,SharedXssRev) - #else --ProjectUnsharedLibReferences(XSS,Xss,$(XSSLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XSS,NX_Xss,$(XSSLIBSRC),XBuildLibDir) - #endif - - XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc -@@ -2490,9 +2490,9 @@ - #ifndef SharedXxf86miscRev - #define SharedXxf86miscRev 1.1 - #endif --SharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),SOXXF86MISCREV,SharedXxf86miscRev) -+SharedLibReferences(XXF86MISC,NX_Xxf86misc,$(XXF86MISCLIBSRC),SOXXF86MISCREV,SharedXxf86miscRev) - #else --ProjectUnsharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XXF86MISC,NX_Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir) - #endif - - XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm -@@ -2500,9 +2500,9 @@ - #ifndef SharedXxf86vmRev - #define SharedXxf86vmRev 1.0 - #endif --SharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),SOXXF86VMREV,SharedXxf86vmRev) -+SharedLibReferences(XXF86VM,NX_Xxf86vm,$(XXF86VMLIBSRC),SOXXF86VMREV,SharedXxf86vmRev) - #else --ProjectUnsharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XXF86VM,NX_Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir) - #endif - - XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga -@@ -2510,9 +2510,9 @@ - #ifndef SharedXxf86dgaRev - #define SharedXxf86dgaRev 1.0 - #endif --SharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev) -+SharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev) - #else --ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) - #endif - - #if BuildDmxLibrary -@@ -2544,9 +2544,9 @@ - #ifndef SharedXxf86rushRev - #define SharedXxf86rushRev 1.0 - #endif --SharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86rushRev) -+SharedLibReferences(XXF86RUSH,NX_Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86rushRev) - #else --ProjectUnsharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XXF86RUSH,NX_Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir) - #endif - - -@@ -2555,9 +2555,9 @@ - #ifndef SharedXvRev - #define SharedXvRev 1.0 - #endif --SharedLibReferences(XV,Xv,$(XVLIBSRC),SOXVREV,SharedXvRev) -+SharedLibReferences(XV,NX_Xv,$(XVLIBSRC),SOXVREV,SharedXvRev) - #else --ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XV,NX_Xv,$(XVLIBSRC),XBuildLibDir) - #endif - - -@@ -2566,9 +2566,9 @@ - #ifndef SharedXvMCRev - #define SharedXvMCRev 1.0 - #endif --SharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),SOXVMCREV,SharedXvMCRev) -+SharedLibReferences(XVMC,NX_XvMC,$(XVMCLIBSRC),SOXVMCREV,SharedXvMCRev) - #else --ProjectUnsharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XVMC,NX_XvMC,$(XVMCLIBSRC),XBuildLibDir) - #endif - - XINERAMALIBSRC = $(LIBSRC)/Xinerama -@@ -2576,9 +2576,9 @@ - #ifndef SharedXineramaRev - #define SharedXineramaRev 1.0 - #endif --SharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev) -+SharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev) - #else --ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir) - #endif - - XRESLIBSRC = $(LIBSRC)/XRes -@@ -2586,9 +2586,9 @@ - #ifndef SharedXResRev - #define SharedXResRev 1.0 - #endif --SharedLibReferences(XRES,XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev) -+SharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev) - #else --ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),XBuildLibDir) - #endif - - DMXLIBSRC = $(LIBSRC)/dmx -@@ -2596,9 +2596,9 @@ - #ifndef SharedDmxRev - #define SharedDmxRev 1.0 - #endif --SharedLibReferences(DMX,dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) -+SharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) - #else --ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),XBuildLibDir) - #endif - - DPSLIBSRC = $(LIBSRC)/dps -@@ -2606,9 +2606,9 @@ - #ifndef SharedDpsRev - #define SharedDpsRev 1.0 - #endif --SharedLibReferences(DPS,dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev) -+SharedLibReferences(DPS,NX_dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev) - #else --ProjectUnsharedLibReferences(DPS,dps,$(DPSLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(DPS,NX_dps,$(DPSLIBSRC),XBuildLibDir) - #endif - - DPSTKLIBSRC = $(LIBSRC)/dpstk -@@ -2616,9 +2616,9 @@ - #ifndef SharedDpsTkRev - #define SharedDpsTkRev 1.0 - #endif --SharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev) -+SharedLibReferences(DPSTK,NX_dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev) - #else --ProjectUnsharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(DPSTK,NX_dpstk,$(DPSTKLIBSRC),XBuildLibDir) - #endif - - PSRESLIBSRC = $(LIBSRC)/psres -@@ -2626,9 +2626,9 @@ - #ifndef SharedPSResRev - #define SharedPSResRev 1.0 - #endif --SharedLibReferences(PSRES,psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev) -+SharedLibReferences(PSRES,NX_psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev) - #else --ProjectUnsharedLibReferences(PSRES,psres,$(PSRESLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(PSRES,NX_psres,$(PSRESLIBSRC),XBuildLibDir) - #endif - - GLULIBSRC = $(LIBSRC)/GLU -@@ -2636,9 +2636,9 @@ - #ifndef SharedGluRev - #define SharedGluRev 1.3 - #endif --SharedLibReferences(GLU,GLU,$(GLULIBSRC),SOGLUREV,SharedGluRev) -+SharedLibReferences(GLU,NX_GLU,$(GLULIBSRC),SOGLUREV,SharedGluRev) - #else --ProjectUnsharedLibReferences(GLU,GLU,$(GLULIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(GLU,NX_GLU,$(GLULIBSRC),XBuildLibDir) - #endif - - GLXLIBSRC = $(LIBSRC)/GL -@@ -2646,18 +2646,18 @@ - #ifndef SharedGlxRev - #define SharedGlxRev 1.2 - #endif --SharedLibReferences(GLX,GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev) -+SharedLibReferences(GLX,NX_GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev) - #else --ProjectUnsharedLibReferences(GLX,GL,$(GLXLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(GLX,NX_GL,$(GLXLIBSRC),XBuildLibDir) - #endif - GLWIDGETSRC = $(LIBSRC)/GLw - #if SharedLibGLw - #ifndef SharedGLwRev - #define SharedGLwRev 1.0 /* used to name the shared library */ - #endif --SharedDSLibReferences(GLW,GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev) -+SharedDSLibReferences(GLW,NX_GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev) - #else --ProjectUnsharedLibReferences(GLW,GLw,$(GLWIDGETSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(GLW,NX_GLw,$(GLWIDGETSRC),XBuildLibDir) - #endif - - XRENDERLIBSRC = $(LIBSRC)/Xrender -@@ -2665,9 +2665,9 @@ - #ifndef SharedXrenderRev - #define SharedXrenderRev 1.2.2 - #endif --SharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) -+SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) - #else --ProjectUnsharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir) - #endif - - XRANDRLIBSRC = $(LIBSRC)/Xrandr -@@ -2675,9 +2675,9 @@ - #ifndef SharedXrandrRev - #define SharedXrandrRev 2.0 - #endif --SharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev) -+SharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev) - #else --ProjectUnsharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),XBuildLibDir) - #endif - - XFIXESLIBSRC = $(LIBSRC)/Xfixes -@@ -2685,9 +2685,9 @@ - #ifndef SharedXfixesRev - #define SharedXfixesRev 3.0 - #endif --SharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) -+SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) - #else --ProjectUnsharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) - #endif - - XDAMAGELIBSRC = $(LIBSRC)/Xdamage -@@ -2695,9 +2695,9 @@ - #ifndef SharedXdamageRev - #define SharedXdamageRev 1.0 - #endif --SharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) -+SharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) - #else --ProjectUnsharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) - #endif - - XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite -@@ -2705,9 +2705,9 @@ - #ifndef SharedXcompositeRev - #define SharedXcompositeRev 1.0 - #endif --SharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev) -+SharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev) - #else --ProjectUnsharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir) - #endif - - XEVIELIBSRC = $(LIBSRC)/Xevie -@@ -2715,9 +2715,9 @@ - #ifndef SharedXevieRev - #define SharedXevieRev 1.0 - #endif --SharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),SOXEVIEREV,SharedXevieRev) -+SharedLibReferences(XEVIE,NX_Xevie,$(XEVIELIBSRC),SOXEVIEREV,SharedXevieRev) - #else --ProjectUnsharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XEVIE,NX_Xevie,$(XEVIELIBSRC),XBuildLibDir) - #endif - - XCURSORLIBSRC = $(LIBSRC)/Xcursor -@@ -2725,9 +2725,9 @@ - #ifndef SharedXcursorRev - #define SharedXcursorRev 1.0.2 - #endif --SharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),SOXCURSORREV,SharedXcursorRev) -+SharedLibReferences(XCURSOR,NX_Xcursor,$(XCURSORLIBSRC),SOXCURSORREV,SharedXcursorRev) - #else --ProjectUnsharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XCURSOR,NX_Xcursor,$(XCURSORLIBSRC),XBuildLibDir) - #endif - - APPLEWMLIBSRC = $(LIBSRC)/apple -@@ -2735,9 +2735,9 @@ - #ifndef SharedAppleWMRev - #define SharedAppleWMRev 1.0 - #endif --SharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),SOAPPLEWMREV,SharedAppleWMRev) -+SharedLibReferences(APPLEWM,NX_AppleWM,$(APPLEWMLIBSRC),SOAPPLEWMREV,SharedAppleWMRev) - #else --ProjectUnsharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(APPLEWM,NX_AppleWM,$(APPLEWMLIBSRC),XBuildLibDir) - #endif - - WINDOWSWMLIBSRC = $(LIBSRC)/windows -@@ -2745,9 +2745,9 @@ - #ifndef SharedWindowsWMRev - #define SharedWindowsWMRev 1.0 - #endif --SharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,SharedWindowsWMRev) -+SharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,SharedWindowsWMRev) - #else --ProjectUnsharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir) - #endif - - # ifndef SharedLibXfontcache -@@ -2768,9 +2768,9 @@ - #ifndef SharedXfontcacheRev - #define SharedXfontcacheRev 1.2 - #endif --SharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev) -+SharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev) - #else --ProjectUnsharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXau -@@ -2790,12 +2790,12 @@ - #ifndef SharedXauRev - #define SharedXauRev 6.0 - #endif --SharedLibReferences(XAUTH,Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev) -+SharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev) - #else - #if !UseInstalledXauLib --ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),XBuildLibDir) - #else --ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),$(USRLIBDIR)) -+ProjectUnsharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),$(USRLIBDIR)) - #endif - #endif - -@@ -2816,12 +2816,12 @@ - #ifndef SharedXdmcpRev - #define SharedXdmcpRev 6.0 - #endif --SharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev) -+SharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev) - #else - #if !UseInstalledXdmcpLib --ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),XBuildLibDir) - #else --ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) -+ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) - #endif - #endif - -@@ -2842,9 +2842,9 @@ - #ifndef SharedXmuRev - #define SharedXmuRev 6.2 - #endif --SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev) -+SharedDSLibReferences(XMU,NX_Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev) - #else --ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XMU,NX_Xmu,$(XMUSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXmuu -@@ -2864,9 +2864,9 @@ - #ifndef SharedXmuuRev - #define SharedXmuuRev 1.0 - #endif --SharedLibReferences(XMUU,Xmuu,$(XMUUSRC),SOXMUUREV,SharedXmuuRev) -+SharedLibReferences(XMUU,NX_Xmuu,$(XMUUSRC),SOXMUUREV,SharedXmuuRev) - #else --ProjectUnsharedLibReferences(XMUU,Xmuu,$(XMUUSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XMUU,NX_Xmuu,$(XMUUSRC),XBuildLibDir) - #endif - - #ifndef SharedOldX -@@ -2886,9 +2886,9 @@ - #ifndef SharedOldXRev - #define SharedOldXRev 6.0 - #endif --SharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev) -+SharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev) - #else --ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXp -@@ -2908,9 +2908,9 @@ - #ifndef SharedXpRev - #define SharedXpRev 6.2 - #endif --SharedLibReferences(XP,Xp,$(XPLIBSRC),SOXPREV,SharedXpRev) -+SharedLibReferences(XP,NX_Xp,$(XPLIBSRC),SOXPREV,SharedXpRev) - #else --ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XP,NX_Xp,$(XPLIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXt -@@ -2930,9 +2930,9 @@ - #ifndef SharedXtRev - #define SharedXtRev 6.0 - #endif --SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev) -+SharedDSLibReferences(XTOOLONLY,NX_Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev) - #else --ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XTOOLONLY,NX_Xt,$(TOOLKITSRC),XBuildLibDir) - #endif - DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) - XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) -@@ -2956,9 +2956,9 @@ - #ifndef SharedXaRev - #define SharedXaRev 1.0 - #endif --SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev) -+SharedLibReferences(XA,NX_Xa,$(XALIBSRC),SOXAREV,SharedXaRev) - #else --UnsharedLibReferences(XA,Xa,$(XALIBSRC)) -+UnsharedLibReferences(XA,NX_Xa,$(XALIBSRC)) - #endif - - #ifndef BuildXaw -@@ -2985,9 +2985,9 @@ - #ifndef SharedXawRev - #define SharedXawRev 8.0 - #endif --SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev) -+SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev) - #else --ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGETSRC),XBuildLibDir) - #endif - #endif - -@@ -3013,14 +3013,14 @@ - #ifndef SharedXaw7Rev - #define SharedXaw7Rev 7.0 - #endif --SharedDSLibReferences(XAW7,Xaw,$(AWIDGET7SRC),SOXAW7REV,SharedXaw7Rev) -+SharedDSLibReferences(XAW7,NX_Xaw,$(AWIDGET7SRC),SOXAW7REV,SharedXaw7Rev) - #if !BuildXaw --SharedDSLibReferences(XAW,Xaw,$(AWIDGET7SRC),SOXAWREV,SharedXawRev) -+SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGET7SRC),SOXAWREV,SharedXawRev) - #endif - #else --ProjectUnsharedLibReferences(XAW7,Xaw,$(AWIDGET7SRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAW7,NX_Xaw,$(AWIDGET7SRC),XBuildLibDir) - #if !BuildXaw --ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET7SRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGET7SRC),XBuildLibDir) - #endif - #endif - #endif -@@ -3048,14 +3048,14 @@ - #ifndef SharedXaw6Rev - #define SharedXaw6Rev 6.1 - #endif --SharedDSLibReferences(XAW6,Xaw,$(AWIDGET6SRC),SOXAW6REV,SharedXaw6Rev) -+SharedDSLibReferences(XAW6,NX_Xaw,$(AWIDGET6SRC),SOXAW6REV,SharedXaw6Rev) - #if !BuildXaw && !BuildXaw7 --SharedDSLibReferences(XAW,Xaw,$(AWIDGET6SRC),SOXAWREV,SharedXawRev) -+SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGET6SRC),SOXAWREV,SharedXawRev) - #endif - #else --ProjectUnsharedLibReferences(XAW6,Xaw,$(AWIDGET6SRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAW6,NX_Xaw,$(AWIDGET6SRC),XBuildLibDir) - #if !BuildXaw && !BuildXaw7 --ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET6SRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGET6SRC),XBuildLibDir) - #endif - #endif - #endif -@@ -3077,9 +3077,9 @@ - #ifndef SharedXiRev - #define SharedXiRev 6.0 - #endif --SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev) -+SharedLibReferences(XI,NX_Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev) - #else --ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XI,NX_Xi,$(XILIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXtst -@@ -3099,12 +3099,12 @@ - #ifndef SharedXtstRev - #define SharedXtstRev 6.1 - #endif --SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) -+SharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) - #else --ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),XBuildLibDir) - #endif - --ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir) -+ProjectUnsharedLibReferences(XBSD,NX_Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir) - - #ifndef SharedLibICE - #define SharedLibICE HasSharedLibraries -@@ -3123,9 +3123,9 @@ - #ifndef SharedICERev - #define SharedICERev 6.4 - #endif --SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev) -+SharedLibReferences(ICE,NX_ICE,$(ICESRC),SOICEREV,SharedICERev) - #else --ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir) -+ProjectUnsharedLibReferences(ICE,NX_ICE,$(ICESRC),XBuildLibDir) - #endif - - #ifndef SharedLibSM -@@ -3145,9 +3145,9 @@ - #ifndef SharedSMRev - #define SharedSMRev 6.0 - #endif --SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev) -+SharedLibReferences(SM,NX_SM,$(SMSRC),SOSMREV,SharedSMRev) - #else --ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(SM,NX_SM,$(SMSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXkey -@@ -3167,9 +3167,9 @@ - #ifndef SharedXkeyRev - #define SharedXkeyRev 6.0 - #endif --SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev) -+SharedLibReferences(XKEY,NX_Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev) - #else --ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XKEY,NX_Xkey,$(XKEYSRC),XBuildLibDir) - #endif - - #ifndef SharedLibFS -@@ -3189,9 +3189,9 @@ - #ifndef SharedFSRev - #define SharedFSRev 6.0 - #endif --SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev) -+SharedLibReferences(FS,NX_FS,$(FSLIBSRC),SOFSREV,SharedFSRev) - #else --ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(FS,NX_FS,$(FSLIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibFont -@@ -3212,14 +3212,14 @@ - #define SharedFontRev 1.5 - #endif - SharedFontLibReferences() --XCOMM SharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev) -+XCOMM SharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev) - #else - ProjectUnsharedFontLibReferences() --XCOMM ProjectUnsharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),XBuildLibDir) -+XCOMM ProjectUnsharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),XBuildLibDir) - #endif - - FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs --ProjectUnsharedLibReferences(FONTSTUB,fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(FONTSTUB,NX_fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) - DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) - FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) - -@@ -3241,9 +3241,9 @@ - #ifndef SharedFontEncRev - #define SharedFontEncRev 1.0 - #endif --SharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev) -+SharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev) - #else --ProjectUnsharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),XBuildLibDir) - #endif - - #ifndef SharedLibXpm -@@ -3263,9 +3263,9 @@ - #ifndef SharedXpmRev - #define SharedXpmRev 4.11 - #endif --SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) -+SharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) - #else --ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),XBuildLibDir) - #endif - - #if UseFreetype2 -@@ -3313,9 +3313,9 @@ - #define SharedFreetype2Rev 9.0 - #endif - #endif --SharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev) -+SharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev) - #else --ProjectUnsharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),XBuildLibDir) - #endif - - #ifdef UseInstalled -@@ -3470,9 +3470,9 @@ - #define SharedExpatRev 4.0 - #endif - #endif --SharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),SOEXPATREV,SharedExpatRev) -+SharedLibReferences(EXPAT,NX_expat,$(EXPATLIBSRC),SOEXPATREV,SharedExpatRev) - #else --ProjectUnsharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(EXPAT,NX_expat,$(EXPATLIBSRC),XBuildLibDir) - #endif - - #if UseExpat -@@ -3552,9 +3552,9 @@ - #ifndef SharedXft1Rev - #define SharedXft1Rev 1.1 - #endif --SharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev) -+SharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev) - #else --ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),XBuildLibDir) - #endif - - #ifndef Xft1ClientDepLibs -@@ -3589,9 +3589,9 @@ - #ifndef SharedXftRev - #define SharedXftRev 2.1.2 - #endif --SharedLibReferences(XFT,Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) -+SharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) - #else --ProjectUnsharedLibReferences(XFT,Xft,$(XFTLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),XBuildLibDir) - #endif - - #ifndef XftClientDepLibs -@@ -3622,9 +3622,9 @@ - #ifndef SharedFontconfigRev - #define SharedFontconfigRev 1.0.4 - #endif --SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) -+SharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) - #else --ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir) - #endif - - #ifdef UseInstalled -@@ -3827,9 +3827,9 @@ - # ifndef SharedxkbfileRev - # define SharedxkbfileRev 1.0 - # endif --SharedLibReferences(XKBFILE,xkbfile,$(XKBFILESRC),SOXKBFILEREV, SharedxkbfileRev) -+SharedLibReferences(XKBFILE,NX_xkbfile,$(XKBFILESRC),SOXKBFILEREV, SharedxkbfileRev) - #else --ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XKBFILE,NX_xkbfile,$(XKBFILELIBSRC),XBuildLibDir) - #endif - - #if BuildXKBlib -@@ -3899,9 +3899,9 @@ - # ifndef SharedxkbuiRev - # define SharedxkbuiRev 1.0 - # endif --SharedLibReferences(XKBUI,xkbui,$(XKBUISRC),SOXKBUIREV, SharedxkbuiRev) -+SharedLibReferences(XKBUI,NX_xkbui,$(XKBUISRC),SOXKBUIREV, SharedxkbuiRev) - #else --ProjectUnsharedLibReferences(XKBUI,xkbui,$(XKBUILIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XKBUI,NX_xkbui,$(XKBUILIBSRC),XBuildLibDir) - #endif - - #ifndef XkbuiLibs -@@ -3974,9 +3974,9 @@ - #ifndef SharedXTrapRev - #define SharedXTrapRev 6.4 - #endif --SharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),SOXTRAPREV,SharedXTrapRev) -+SharedLibReferences(XTRAP,NX_XTrap,$(XTRAPLIBSRC),SOXTRAPREV,SharedXTrapRev) - #else --ProjectUnsharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),XBuildLibDir) -+ProjectUnsharedLibReferences(XTRAP,NX_XTrap,$(XTRAPLIBSRC),XBuildLibDir) - #endif - - #ifndef NeedDefaultDepLibs ---- a/nx-X11/config/cf/lnxLib.rules -+++ b/nx-X11/config/cf/lnxLib.rules -@@ -389,7 +389,7 @@ - XCOMM libX11.so (X11, SM, ICE) - JUMP_ROOT_X11 = $(XLIBSRC) - JUMP_IS_HOST_X11 = YES --JUMP_STUBLIBS_X11 = libX11.sa libSM.sa libICE.sa -+JUMP_STUBLIBS_X11 = libNX_X11.sa libNX_SM.sa libNX_ICE.sa - JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE) - JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared - JUMP_DEFS_X11 = $(XDMAUTHDEFS) $(XKB_DEFINES) -@@ -400,9 +400,9 @@ - JUMP_ADDRESS_X11 = 0x60200000 - JUMP_JUMPTABLESIZE_X11 = 0x4000 - JUMP_GOTSIZE_X11 = 4096 --JUMP_STUBNAMES_X11 = libX11 libSM libICE -+JUMP_STUBNAMES_X11 = libNX_X11 libNX_SM libNX_ICE - JUMP_STUBS_IMPORT_X11 = $(LIBC_SA) --JUMP_SIBARS_X11 = jump/libSM.a~ jump/libICE.a~ -+JUMP_SIBARS_X11 = jump/libNX_SM.a~ jump/libNX_ICE.a~ - JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc) - - XCOMM libSM (part of libX11.so) -@@ -435,9 +435,9 @@ - JUMP_GOTSIZE_Xt = 4096 - JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst libXp - JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11) --JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~ jump/libXp.a~ --JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libICE.sa \ -- $(JUMP_ROOT_SM)/libSM.sa $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc) -+JUMP_SIBARS_Xt = jump/libNX_Xmu.a~ jump/libNX_Xext.a~ jump/libNX_Xi.a~ jump/libNX_Xtst.a~ jump/libNX_Xp.a~ -+JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libNX_ICE.sa \ -+ $(JUMP_ROOT_SM)/libNX_SM.sa $(JUMP_ROOT_X11)/libNX_X11.sa $(JUMP_LDLIBS_libc) - - XCOMM libXmu (part of libXt.so) - JUMP_ROOT_Xmu = $(XMUSRC) -@@ -485,8 +485,8 @@ - JUMP_GOTSIZE_Xaw = 4096 - JUMP_STUBNAMES_Xaw = libXaw - JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11) --JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \ -- $(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \ -+JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libNX_Xt.sa $(JUMP_ROOT_Xt)/libNX_Xmu.sa \ -+ $(JUMP_ROOT_Xt)/libNX_Xext.sa $(JUMP_ROOT_X11)/libNX_X11.sa \ - $(JUMP_LDLIBS_libc) - - # endif /* !UseInstalled */ ---- a/nx-X11/config/cf/lnxLib.tmpl -+++ b/nx-X11/config/cf/lnxLib.tmpl -@@ -9,7 +9,7 @@ - - #ifndef FixupLibReferences - #define FixupLibReferences() @@\ --XMULIBONLY = -lXmu @@\ -+XMULIBONLY = -lNX_Xmu @@\ - XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) - #endif - -@@ -66,7 +66,7 @@ - - #ifndef FixupLibReferences - #define FixupLibReferences() @@\ --XMULIB = -lXmu $(XLIB) -+XMULIB = -lNX_Xmu $(XLIB) - #endif - - #endif /* UseElfFormat */ ---- a/nx-X11/lib/X11/Imakefile -+++ b/nx-X11/lib/X11/Imakefile -@@ -82,7 +82,7 @@ - #define DoExtraLib SharedLibX11 - #define DoDebugLib DebugLibX11 - #define DoProfileLib ProfileLibX11 --#define LibName X11 -+#define LibName NX_X11 - #define SoRev SOXLIBREV - #define HugeLibrary YES - #define IncSubdir X11 ---- a/nx-X11/lib/XRes/Imakefile -+++ b/nx-X11/lib/XRes/Imakefile -@@ -4,7 +4,7 @@ - #define DoSharedLib SharedLibXRes - #define DoDebugLib DebugLibXRes - #define DoProfileLib ProfileLibXRes --#define LibName XRes -+#define LibName NX_XRes - #define SoRev SOXRESREV - #define LibHeaders NO - ---- a/nx-X11/lib/Xau/Imakefile -+++ b/nx-X11/lib/Xau/Imakefile -@@ -10,7 +10,7 @@ - #define DoExtraLib SharedLibXau - #define DoDebugLib DebugLibXau - #define DoProfileLib ProfileLibXau --#define LibName Xau -+#define LibName NX_Xau - #define SoRev SOXAUTHREV - #define IncSubdir X11 - ---- a/nx-X11/lib/Xcomposite/Imakefile -+++ b/nx-X11/lib/Xcomposite/Imakefile -@@ -14,7 +14,7 @@ - #define DoDebugLib DebugLibXcomposite - #define DoProfileLib ProfileLibXcomposite - --#define LibName Xcomposite -+#define LibName NX_Xcomposite - #define SoRev SOXCOMPOSITEREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/lib/Xcomposite/xcomposite.pc.in -+++ b/nx-X11/lib/Xcomposite/xcomposite.pc.in -@@ -7,4 +7,4 @@ - Description: X Composite Library - Version: @VERSION@ - Cflags: -I${includedir} @XCOMPOSITE_CFLAGS@ @X_CFLAGS@ --Libs: -L${libdir} -lXcomposite @XCOMPOSITE_LIBS@ @X_LIBS@ -+Libs: -L${libdir} -lNX_Xcomposite @XCOMPOSITE_LIBS@ @X_LIBS@ ---- a/nx-X11/lib/Xcursor/Imakefile -+++ b/nx-X11/lib/Xcursor/Imakefile -@@ -15,7 +15,7 @@ - #define DoDebugLib DebugLibXcursor - #define DoProfileLib ProfileLibXcursor - --#define LibName Xcursor -+#define LibName NX_Xcursor - #define SoRev SOXCURSORREV - #define IncSubdir X11 - #define IncSubSubdir Xcursor ---- a/nx-X11/lib/Xcursor/xcursor.pc.in -+++ b/nx-X11/lib/Xcursor/xcursor.pc.in -@@ -12,4 +12,4 @@ - Version: @VERSION@ - Requires: xrender - Cflags: -I${includedir} ${xrendercflags} ${xcflags} --Libs: -L${libdir} -lXcursor ${xrenderlibs} ${xlibs} -+Libs: -L${libdir} -lNX_Xcursor ${xrenderlibs} ${xlibs} ---- a/nx-X11/lib/Xdamage/Imakefile -+++ b/nx-X11/lib/Xdamage/Imakefile -@@ -14,7 +14,7 @@ - #define DoDebugLib DebugLibXdamage - #define DoProfileLib ProfileLibXdamage - --#define LibName Xdamage -+#define LibName NX_Xdamage - #define SoRev SOXDAMAGEREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/lib/Xdamage/xdamage.pc.in -+++ b/nx-X11/lib/Xdamage/xdamage.pc.in -@@ -7,4 +7,4 @@ - Description: X Damage Library - Version: @VERSION@ - Cflags: -I${includedir} @XDAMAGE_CFLAGS@ @X_CFLAGS@ --Libs: -L${libdir} -lXdamage @XDAMAGE_LIBS@ @X_LIBS@ -+Libs: -L${libdir} -lNX_Xdamage @XDAMAGE_LIBS@ @X_LIBS@ ---- a/nx-X11/lib/Xdmcp/Imakefile -+++ b/nx-X11/lib/Xdmcp/Imakefile -@@ -10,7 +10,7 @@ - #define DoExtraLib SharedLibXdmcp - #define DoDebugLib DebugLibXdmcp - #define DoProfileLib ProfileLibXdmcp --#define LibName Xdmcp -+#define LibName NX_Xdmcp - #define SoRev SOXDMCPREV - #define IncSubdir X11 - ---- a/nx-X11/lib/Xext/Imakefile -+++ b/nx-X11/lib/Xext/Imakefile -@@ -10,7 +10,7 @@ - #define DoExtraLib SharedLibXext - #define DoDebugLib DebugLibXext - #define DoProfileLib ProfileLibXext --#define LibName Xext -+#define LibName NX_Xext - #define SoRev SOXEXTREV - #define LibHeaders NO - ---- a/nx-X11/lib/Xfixes/Imakefile -+++ b/nx-X11/lib/Xfixes/Imakefile -@@ -14,7 +14,7 @@ - #define DoDebugLib DebugLibXfixes - #define DoProfileLib ProfileLibXfixes - --#define LibName Xfixes -+#define LibName NX_Xfixes - #define SoRev SOXFIXESREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/lib/Xfixes/xfixes.pc.in -+++ b/nx-X11/lib/Xfixes/xfixes.pc.in -@@ -7,4 +7,4 @@ - Description: X Fixes Library - Version: @VERSION@ - Cflags: -I${includedir} @X_CFLAGS@ --Libs: -L${libdir} -lXfixes @X_LIBS@ -+Libs: -L${libdir} -lNX_Xfixes @X_LIBS@ ---- a/nx-X11/lib/Xinerama/Imakefile -+++ b/nx-X11/lib/Xinerama/Imakefile -@@ -4,7 +4,7 @@ - #define DoSharedLib SharedLibXinerama - #define DoDebugLib DebugLibXinerama - #define DoProfileLib ProfileLibXinerama --#define LibName Xinerama -+#define LibName NX_Xinerama - #define SoRev SOXINERAMAREV - #define LibHeaders NO - ---- a/nx-X11/lib/Xpm/Imakefile -+++ b/nx-X11/lib/Xpm/Imakefile -@@ -12,7 +12,7 @@ - #define DoDebugLib DebugLibXpm - #define DoProfileLib ProfileLibXpm - #define HasSharedData NO --#define LibName Xpm -+#define LibName NX_Xpm - #define SoRev SOXPMREV - #define IncSubdir X11 - ---- a/nx-X11/lib/Xrandr/Imakefile -+++ b/nx-X11/lib/Xrandr/Imakefile -@@ -5,7 +5,7 @@ - #define DoSharedLib SharedLibXrandr - #define DoDebugLib DebugLibXrandr - #define DoProfileLib ProfileLibXrandr --#define LibName Xrandr -+#define LibName NX_Xrandr - #define SoRev SOXRANDRREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/lib/Xrender/Imakefile -+++ b/nx-X11/lib/Xrender/Imakefile -@@ -74,7 +74,7 @@ - #define DoSharedLib SharedLibXrender - #define DoDebugLib DebugLibXrender - #define DoProfileLib ProfileLibXrender --#define LibName Xrender -+#define LibName NX_Xrender - #define SoRev SOXRENDERREV - - #ifdef XBuildIncDir ---- a/nx-X11/lib/Xrender/xrender.pc.in -+++ b/nx-X11/lib/Xrender/xrender.pc.in -@@ -8,4 +8,4 @@ - Version: @VERSION@ - Requires: @X_REQUIRES@ - Cflags: -I${includedir} @RENDER_CFLAGS@ @X_NON_PKG_CFLAGS@ --Libs: -L${libdir} -lXrender @X_NON_PKG_LIBS@ -+Libs: -L${libdir} -lNX_Xrender @X_NON_PKG_LIBS@ ---- a/nx-X11/lib/Xtst/Imakefile -+++ b/nx-X11/lib/Xtst/Imakefile -@@ -10,7 +10,7 @@ - #define DoExtraLib SharedLibXtst - #define DoDebugLib DebugLibXtst - #define DoProfileLib ProfileLibXtst --#define LibName Xtst -+#define LibName NX_Xtst - #define SoRev SOXTESTREV - #define LibHeaders NO - ---- a/nx-X11/lib/font/Imakefile -+++ b/nx-X11/lib/font/Imakefile -@@ -31,7 +31,7 @@ - STUBDIRS = stubs - #endif - --LIBNAME = Xfont -+LIBNAME = NX_Xfont - SOREV = $(SOFONTREV) - - #ifndef SeparateSharedCompile ---- a/nx-X11/lib/oldX/Imakefile -+++ b/nx-X11/lib/oldX/Imakefile -@@ -10,7 +10,7 @@ - #define DoExtraLib SharedOldX - #define DoDebugLib DebugOldX - #define DoProfileLib ProfileOldX --#define LibName oldX -+#define LibName NX_oldX - #define SoRev SOOLDXREV - #define IncSubdir X11 - ---- a/nx-X11/lib/xkbfile/Imakefile -+++ b/nx-X11/lib/xkbfile/Imakefile -@@ -11,7 +11,7 @@ - #define DoDebugLib DebugLibxkbfile - #define DoProfileLib ProfileLibxkbfile - #define HasSharedData NO --#define LibName xkbfile -+#define LibName NX_xkbfile - #define SoRev SOXKBFILEREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/lib/xkbui/Imakefile -+++ b/nx-X11/lib/xkbui/Imakefile -@@ -6,7 +6,7 @@ - #define DoDebugLib DebugLibxkbui - #define DoProfileLib ProfileLibxkbui - #define HasSharedData NO --#define LibName xkbui -+#define LibName NX_xkbui - #define SoRev SOXKBUIREV - #define IncSubdir X11 - #define IncSubSubdir extensions ---- a/nx-X11/programs/Xserver/Imakefile -+++ b/nx-X11/programs/Xserver/Imakefile -@@ -313,7 +313,7 @@ - FONTBASE = $(FONTLIBSRC)/fontbase.o \ - $(FONTLIBSRC)/LibraryTargetName(fontbase) - #if XserverStaticFontLib -- FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) $(FREETYPE2LIB) -+ FONT = $(FONTLIBSRC)/LibraryTargetName(NX_Xfont) $(FREETYPE2LIB) - #else - FONT = $(LDPRELIB) $(XFONTLIB) $(FREETYPE2LIB) - #endif -@@ -994,7 +994,7 @@ - dix/main.o - #endif - --XPMLIB = -lXpm -+XPMLIB = -lNX_Xpm - NXAGENT = hw/nxagent/LibraryTargetName(nxagent) - NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI) - NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) -@@ -1012,18 +1012,18 @@ - - #if defined(SunArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -- -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp \ -+ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes \ -+ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \ - `pkg-config --libs libxml-2.0` - #elif defined(cygwinArchitecture) - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -- -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ -- -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ -+ -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes \ -+ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \ - `pkg-config --libs libxml-2.0` - #else - NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -- -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ -- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp \ -+ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes \ -+ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \ - `pkg-config --libs libxml-2.0` - #endif - -@@ -1078,7 +1078,7 @@ - else exit 0; fi - $(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \ - $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) $(FONTLIBS) \ -- $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lXext -lX11 $(EXTRA_LOAD_FLAGS) -+ $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS) - #endif /* NXAgentServer */ - - #if defined(XnonServer) && XnonServer ---- a/nxcompext/Makefile.in -+++ b/nxcompext/Makefile.in -@@ -42,12 +42,12 @@ - CCDEFINES = - - LDFLAGS = @LDFLAGS@ -L../nxcomp --LIBS = @LIBS@ -lz -lX11 -lXcomp -+LIBS = @LIBS@ -lz -lNX_X11 -lXcomp - - # - # Only if THREADS is defined - # --# LIBS = @LIBS@ -lz -ljpeg -lpthread -lX11 -lXcomp -+# LIBS = @LIBS@ -lz -ljpeg -lpthread -lNX_X11 -lXcomp - # - - srcdir = @srcdir@ ---- a/nxcompshad/Makefile.in -+++ b/nxcompshad/Makefile.in -@@ -48,7 +48,7 @@ - CCDEFINES = - - LDFLAGS = @LDFLAGS@ --LIBS = @LIBS@ -lX11 -+LIBS = @LIBS@ -lNX_X11 - - # - # Only if THREADS is defined. -@@ -139,7 +139,7 @@ - - else - --EXTRALIBS = -lXtst -lXrandr -lXdamage -+EXTRALIBS = -lNX_Xtst -lNX_Xrandr -lNX_Xdamage - - all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) - diff --git a/debian/patches/series b/debian/patches/series index b00553eed..6a20a8f47 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch 601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch 602_nx-X11_initgroups.full.patch 603_nx-X11_compilation_warnings.full.patch diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules index 21c223d8e..3923e4a10 100644 --- a/nx-X11/config/cf/Imake.rules +++ b/nx-X11/config/cf/Imake.rules @@ -2124,9 +2124,9 @@ LintLibReferences(varname,libname,libsource) */ #ifndef ProjectUnsharedFontLibReferences #define ProjectUnsharedFontLibReferences() @@\ -DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(Xfont)) @@\ -FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ -LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) +DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(NX_Xfont)) @@\ +FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ +LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) #endif /* @@ -2142,9 +2142,9 @@ LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) #ifndef SharedFontLibReferences #define SharedFontLibReferences() @@\ SOFONTREV = SharedFontRev @@\ -DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\ -FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ -LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) +DEPFONTLIB = SharedLibDependencies(NX_Xfont,$(FONTLIBSRC),SOFONTREV) @@\ +FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ +LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) #endif /* diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index accba403c..778e3099a 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1835,9 +1835,9 @@ VENDORSUPPORTDEFS = VendorSupportDefines #ifndef SharedX11Rev #define SharedX11Rev 6.2 #endif -SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) +SharedLibReferences(XONLY,NX_X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) #else -ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #endif /* Common alternate spellings */ DEPXLIBONLY = $(DEPXONLYLIB) @@ -2466,9 +2466,9 @@ ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir) #ifndef SharedXextRev #define SharedXextRev 6.4 #endif -SharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev) +SharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev) #else -ProjectUnsharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),XBuildLibDir) #endif LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) @@ -2480,9 +2480,9 @@ LINTEXTENSIONLIB = $(LINTEXTENSION) #ifndef SharedXssRev #define SharedXssRev 1.0 #endif -SharedLibReferences(XSS,Xss,$(XSSLIBSRC),SOXSSREV,SharedXssRev) +SharedLibReferences(XSS,NX_Xss,$(XSSLIBSRC),SOXSSREV,SharedXssRev) #else -ProjectUnsharedLibReferences(XSS,Xss,$(XSSLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XSS,NX_Xss,$(XSSLIBSRC),XBuildLibDir) #endif XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc @@ -2490,9 +2490,9 @@ ProjectUnsharedLibReferences(XSS,Xss,$(XSSLIBSRC),XBuildLibDir) #ifndef SharedXxf86miscRev #define SharedXxf86miscRev 1.1 #endif -SharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),SOXXF86MISCREV,SharedXxf86miscRev) +SharedLibReferences(XXF86MISC,NX_Xxf86misc,$(XXF86MISCLIBSRC),SOXXF86MISCREV,SharedXxf86miscRev) #else -ProjectUnsharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XXF86MISC,NX_Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir) #endif XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm @@ -2500,9 +2500,9 @@ ProjectUnsharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir #ifndef SharedXxf86vmRev #define SharedXxf86vmRev 1.0 #endif -SharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),SOXXF86VMREV,SharedXxf86vmRev) +SharedLibReferences(XXF86VM,NX_Xxf86vm,$(XXF86VMLIBSRC),SOXXF86VMREV,SharedXxf86vmRev) #else -ProjectUnsharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XXF86VM,NX_Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir) #endif XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga @@ -2510,9 +2510,9 @@ ProjectUnsharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir) #ifndef SharedXxf86dgaRev #define SharedXxf86dgaRev 1.0 #endif -SharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev) +SharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev) #else -ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) #endif #if BuildDmxLibrary @@ -2544,9 +2544,9 @@ ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) #ifndef SharedXxf86rushRev #define SharedXxf86rushRev 1.0 #endif -SharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86rushRev) +SharedLibReferences(XXF86RUSH,NX_Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86rushRev) #else -ProjectUnsharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XXF86RUSH,NX_Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir) #endif @@ -2555,9 +2555,9 @@ ProjectUnsharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir #ifndef SharedXvRev #define SharedXvRev 1.0 #endif -SharedLibReferences(XV,Xv,$(XVLIBSRC),SOXVREV,SharedXvRev) +SharedLibReferences(XV,NX_Xv,$(XVLIBSRC),SOXVREV,SharedXvRev) #else -ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XV,NX_Xv,$(XVLIBSRC),XBuildLibDir) #endif @@ -2566,9 +2566,9 @@ ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir) #ifndef SharedXvMCRev #define SharedXvMCRev 1.0 #endif -SharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),SOXVMCREV,SharedXvMCRev) +SharedLibReferences(XVMC,NX_XvMC,$(XVMCLIBSRC),SOXVMCREV,SharedXvMCRev) #else -ProjectUnsharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XVMC,NX_XvMC,$(XVMCLIBSRC),XBuildLibDir) #endif XINERAMALIBSRC = $(LIBSRC)/Xinerama @@ -2576,9 +2576,9 @@ ProjectUnsharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),XBuildLibDir) #ifndef SharedXineramaRev #define SharedXineramaRev 1.0 #endif -SharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev) +SharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev) #else -ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir) #endif XRESLIBSRC = $(LIBSRC)/XRes @@ -2586,9 +2586,9 @@ ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir) #ifndef SharedXResRev #define SharedXResRev 1.0 #endif -SharedLibReferences(XRES,XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev) +SharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev) #else -ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),XBuildLibDir) #endif DMXLIBSRC = $(LIBSRC)/dmx @@ -2596,9 +2596,9 @@ ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir) #ifndef SharedDmxRev #define SharedDmxRev 1.0 #endif -SharedLibReferences(DMX,dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) +SharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) #else -ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),XBuildLibDir) #endif DPSLIBSRC = $(LIBSRC)/dps @@ -2606,9 +2606,9 @@ ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir) #ifndef SharedDpsRev #define SharedDpsRev 1.0 #endif -SharedLibReferences(DPS,dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev) +SharedLibReferences(DPS,NX_dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev) #else -ProjectUnsharedLibReferences(DPS,dps,$(DPSLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(DPS,NX_dps,$(DPSLIBSRC),XBuildLibDir) #endif DPSTKLIBSRC = $(LIBSRC)/dpstk @@ -2616,9 +2616,9 @@ ProjectUnsharedLibReferences(DPS,dps,$(DPSLIBSRC),XBuildLibDir) #ifndef SharedDpsTkRev #define SharedDpsTkRev 1.0 #endif -SharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev) +SharedLibReferences(DPSTK,NX_dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev) #else -ProjectUnsharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(DPSTK,NX_dpstk,$(DPSTKLIBSRC),XBuildLibDir) #endif PSRESLIBSRC = $(LIBSRC)/psres @@ -2626,9 +2626,9 @@ ProjectUnsharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),XBuildLibDir) #ifndef SharedPSResRev #define SharedPSResRev 1.0 #endif -SharedLibReferences(PSRES,psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev) +SharedLibReferences(PSRES,NX_psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev) #else -ProjectUnsharedLibReferences(PSRES,psres,$(PSRESLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(PSRES,NX_psres,$(PSRESLIBSRC),XBuildLibDir) #endif GLULIBSRC = $(LIBSRC)/GLU @@ -2636,9 +2636,9 @@ ProjectUnsharedLibReferences(PSRES,psres,$(PSRESLIBSRC),XBuildLibDir) #ifndef SharedGluRev #define SharedGluRev 1.3 #endif -SharedLibReferences(GLU,GLU,$(GLULIBSRC),SOGLUREV,SharedGluRev) +SharedLibReferences(GLU,NX_GLU,$(GLULIBSRC),SOGLUREV,SharedGluRev) #else -ProjectUnsharedLibReferences(GLU,GLU,$(GLULIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(GLU,NX_GLU,$(GLULIBSRC),XBuildLibDir) #endif GLXLIBSRC = $(LIBSRC)/GL @@ -2646,18 +2646,18 @@ ProjectUnsharedLibReferences(GLU,GLU,$(GLULIBSRC),XBuildLibDir) #ifndef SharedGlxRev #define SharedGlxRev 1.2 #endif -SharedLibReferences(GLX,GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev) +SharedLibReferences(GLX,NX_GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev) #else -ProjectUnsharedLibReferences(GLX,GL,$(GLXLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(GLX,NX_GL,$(GLXLIBSRC),XBuildLibDir) #endif GLWIDGETSRC = $(LIBSRC)/GLw #if SharedLibGLw #ifndef SharedGLwRev #define SharedGLwRev 1.0 /* used to name the shared library */ #endif -SharedDSLibReferences(GLW,GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev) +SharedDSLibReferences(GLW,NX_GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev) #else -ProjectUnsharedLibReferences(GLW,GLw,$(GLWIDGETSRC),XBuildLibDir) +ProjectUnsharedLibReferences(GLW,NX_GLw,$(GLWIDGETSRC),XBuildLibDir) #endif XRENDERLIBSRC = $(LIBSRC)/Xrender @@ -2665,9 +2665,9 @@ ProjectUnsharedLibReferences(GLW,GLw,$(GLWIDGETSRC),XBuildLibDir) #ifndef SharedXrenderRev #define SharedXrenderRev 1.2.2 #endif -SharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) +SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) #else -ProjectUnsharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir) #endif XRANDRLIBSRC = $(LIBSRC)/Xrandr @@ -2675,9 +2675,9 @@ ProjectUnsharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),XBuildLibDir) #ifndef SharedXrandrRev #define SharedXrandrRev 2.0 #endif -SharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev) +SharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev) #else -ProjectUnsharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),XBuildLibDir) #endif XFIXESLIBSRC = $(LIBSRC)/Xfixes @@ -2685,9 +2685,9 @@ ProjectUnsharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),XBuildLibDir) #ifndef SharedXfixesRev #define SharedXfixesRev 3.0 #endif -SharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) +SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) #else -ProjectUnsharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) #endif XDAMAGELIBSRC = $(LIBSRC)/Xdamage @@ -2695,9 +2695,9 @@ ProjectUnsharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),XBuildLibDir) #ifndef SharedXdamageRev #define SharedXdamageRev 1.0 #endif -SharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) +SharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) #else -ProjectUnsharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) #endif XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite @@ -2705,9 +2705,9 @@ XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite #ifndef SharedXcompositeRev #define SharedXcompositeRev 1.0 #endif -SharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev) +SharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev) #else -ProjectUnsharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir) #endif XEVIELIBSRC = $(LIBSRC)/Xevie @@ -2715,9 +2715,9 @@ XEVIELIBSRC = $(LIBSRC)/Xevie #ifndef SharedXevieRev #define SharedXevieRev 1.0 #endif -SharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),SOXEVIEREV,SharedXevieRev) +SharedLibReferences(XEVIE,NX_Xevie,$(XEVIELIBSRC),SOXEVIEREV,SharedXevieRev) #else -ProjectUnsharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XEVIE,NX_Xevie,$(XEVIELIBSRC),XBuildLibDir) #endif XCURSORLIBSRC = $(LIBSRC)/Xcursor @@ -2725,9 +2725,9 @@ ProjectUnsharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),XBuildLibDir) #ifndef SharedXcursorRev #define SharedXcursorRev 1.0.2 #endif -SharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),SOXCURSORREV,SharedXcursorRev) +SharedLibReferences(XCURSOR,NX_Xcursor,$(XCURSORLIBSRC),SOXCURSORREV,SharedXcursorRev) #else -ProjectUnsharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XCURSOR,NX_Xcursor,$(XCURSORLIBSRC),XBuildLibDir) #endif APPLEWMLIBSRC = $(LIBSRC)/apple @@ -2735,9 +2735,9 @@ ProjectUnsharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),XBuildLibDir) #ifndef SharedAppleWMRev #define SharedAppleWMRev 1.0 #endif -SharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),SOAPPLEWMREV,SharedAppleWMRev) +SharedLibReferences(APPLEWM,NX_AppleWM,$(APPLEWMLIBSRC),SOAPPLEWMREV,SharedAppleWMRev) #else -ProjectUnsharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(APPLEWM,NX_AppleWM,$(APPLEWMLIBSRC),XBuildLibDir) #endif WINDOWSWMLIBSRC = $(LIBSRC)/windows @@ -2745,9 +2745,9 @@ ProjectUnsharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),XBuildLibDir) #ifndef SharedWindowsWMRev #define SharedWindowsWMRev 1.0 #endif -SharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,SharedWindowsWMRev) +SharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,SharedWindowsWMRev) #else -ProjectUnsharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir) #endif # ifndef SharedLibXfontcache @@ -2768,9 +2768,9 @@ ProjectUnsharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir #ifndef SharedXfontcacheRev #define SharedXfontcacheRev 1.2 #endif -SharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev) +SharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev) #else -ProjectUnsharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir) #endif #ifndef SharedLibXau @@ -2790,12 +2790,12 @@ ProjectUnsharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),XBuildLib #ifndef SharedXauRev #define SharedXauRev 6.0 #endif -SharedLibReferences(XAUTH,Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev) +SharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev) #else #if !UseInstalledXauLib -ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),XBuildLibDir) #else -ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),$(USRLIBDIR)) +ProjectUnsharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),$(USRLIBDIR)) #endif #endif @@ -2816,12 +2816,12 @@ ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),$(USRLIBDIR)) #ifndef SharedXdmcpRev #define SharedXdmcpRev 6.0 #endif -SharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev) +SharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev) #else #if !UseInstalledXdmcpLib -ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),XBuildLibDir) #else -ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) +ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) #endif #endif @@ -2842,9 +2842,9 @@ ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) #ifndef SharedXmuRev #define SharedXmuRev 6.2 #endif -SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev) +SharedDSLibReferences(XMU,NX_Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev) #else -ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XMU,NX_Xmu,$(XMUSRC),XBuildLibDir) #endif #ifndef SharedLibXmuu @@ -2864,9 +2864,9 @@ ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir) #ifndef SharedXmuuRev #define SharedXmuuRev 1.0 #endif -SharedLibReferences(XMUU,Xmuu,$(XMUUSRC),SOXMUUREV,SharedXmuuRev) +SharedLibReferences(XMUU,NX_Xmuu,$(XMUUSRC),SOXMUUREV,SharedXmuuRev) #else -ProjectUnsharedLibReferences(XMUU,Xmuu,$(XMUUSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XMUU,NX_Xmuu,$(XMUUSRC),XBuildLibDir) #endif #ifndef SharedOldX @@ -2886,9 +2886,9 @@ ProjectUnsharedLibReferences(XMUU,Xmuu,$(XMUUSRC),XBuildLibDir) #ifndef SharedOldXRev #define SharedOldXRev 6.0 #endif -SharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev) +SharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev) #else -ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),XBuildLibDir) #endif #ifndef SharedLibXp @@ -2908,9 +2908,9 @@ ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir) #ifndef SharedXpRev #define SharedXpRev 6.2 #endif -SharedLibReferences(XP,Xp,$(XPLIBSRC),SOXPREV,SharedXpRev) +SharedLibReferences(XP,NX_Xp,$(XPLIBSRC),SOXPREV,SharedXpRev) #else -ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XP,NX_Xp,$(XPLIBSRC),XBuildLibDir) #endif #ifndef SharedLibXt @@ -2930,9 +2930,9 @@ ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir) #ifndef SharedXtRev #define SharedXtRev 6.0 #endif -SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev) +SharedDSLibReferences(XTOOLONLY,NX_Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev) #else -ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XTOOLONLY,NX_Xt,$(TOOLKITSRC),XBuildLibDir) #endif DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) @@ -2956,9 +2956,9 @@ ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir) #ifndef SharedXaRev #define SharedXaRev 1.0 #endif -SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev) +SharedLibReferences(XA,NX_Xa,$(XALIBSRC),SOXAREV,SharedXaRev) #else -UnsharedLibReferences(XA,Xa,$(XALIBSRC)) +UnsharedLibReferences(XA,NX_Xa,$(XALIBSRC)) #endif #ifndef BuildXaw @@ -2985,9 +2985,9 @@ UnsharedLibReferences(XA,Xa,$(XALIBSRC)) #ifndef SharedXawRev #define SharedXawRev 8.0 #endif -SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev) +SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev) #else -ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGETSRC),XBuildLibDir) #endif #endif @@ -3013,14 +3013,14 @@ ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir) #ifndef SharedXaw7Rev #define SharedXaw7Rev 7.0 #endif -SharedDSLibReferences(XAW7,Xaw,$(AWIDGET7SRC),SOXAW7REV,SharedXaw7Rev) +SharedDSLibReferences(XAW7,NX_Xaw,$(AWIDGET7SRC),SOXAW7REV,SharedXaw7Rev) #if !BuildXaw -SharedDSLibReferences(XAW,Xaw,$(AWIDGET7SRC),SOXAWREV,SharedXawRev) +SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGET7SRC),SOXAWREV,SharedXawRev) #endif #else -ProjectUnsharedLibReferences(XAW7,Xaw,$(AWIDGET7SRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAW7,NX_Xaw,$(AWIDGET7SRC),XBuildLibDir) #if !BuildXaw -ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET7SRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGET7SRC),XBuildLibDir) #endif #endif #endif @@ -3048,14 +3048,14 @@ ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET7SRC),XBuildLibDir) #ifndef SharedXaw6Rev #define SharedXaw6Rev 6.1 #endif -SharedDSLibReferences(XAW6,Xaw,$(AWIDGET6SRC),SOXAW6REV,SharedXaw6Rev) +SharedDSLibReferences(XAW6,NX_Xaw,$(AWIDGET6SRC),SOXAW6REV,SharedXaw6Rev) #if !BuildXaw && !BuildXaw7 -SharedDSLibReferences(XAW,Xaw,$(AWIDGET6SRC),SOXAWREV,SharedXawRev) +SharedDSLibReferences(XAW,NX_Xaw,$(AWIDGET6SRC),SOXAWREV,SharedXawRev) #endif #else -ProjectUnsharedLibReferences(XAW6,Xaw,$(AWIDGET6SRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAW6,NX_Xaw,$(AWIDGET6SRC),XBuildLibDir) #if !BuildXaw && !BuildXaw7 -ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET6SRC),XBuildLibDir) +ProjectUnsharedLibReferences(XAW,NX_Xaw,$(AWIDGET6SRC),XBuildLibDir) #endif #endif #endif @@ -3077,9 +3077,9 @@ ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET6SRC),XBuildLibDir) #ifndef SharedXiRev #define SharedXiRev 6.0 #endif -SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev) +SharedLibReferences(XI,NX_Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev) #else -ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XI,NX_Xi,$(XILIBSRC),XBuildLibDir) #endif #ifndef SharedLibXtst @@ -3099,12 +3099,12 @@ ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir) #ifndef SharedXtstRev #define SharedXtstRev 6.1 #endif -SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) +SharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) #else -ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),XBuildLibDir) #endif -ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir) +ProjectUnsharedLibReferences(XBSD,NX_Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir) #ifndef SharedLibICE #define SharedLibICE HasSharedLibraries @@ -3123,9 +3123,9 @@ ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir) #ifndef SharedICERev #define SharedICERev 6.4 #endif -SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev) +SharedLibReferences(ICE,NX_ICE,$(ICESRC),SOICEREV,SharedICERev) #else -ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir) +ProjectUnsharedLibReferences(ICE,NX_ICE,$(ICESRC),XBuildLibDir) #endif #ifndef SharedLibSM @@ -3145,9 +3145,9 @@ ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir) #ifndef SharedSMRev #define SharedSMRev 6.0 #endif -SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev) +SharedLibReferences(SM,NX_SM,$(SMSRC),SOSMREV,SharedSMRev) #else -ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir) +ProjectUnsharedLibReferences(SM,NX_SM,$(SMSRC),XBuildLibDir) #endif #ifndef SharedLibXkey @@ -3167,9 +3167,9 @@ ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir) #ifndef SharedXkeyRev #define SharedXkeyRev 6.0 #endif -SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev) +SharedLibReferences(XKEY,NX_Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev) #else -ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XKEY,NX_Xkey,$(XKEYSRC),XBuildLibDir) #endif #ifndef SharedLibFS @@ -3189,9 +3189,9 @@ ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir) #ifndef SharedFSRev #define SharedFSRev 6.0 #endif -SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev) +SharedLibReferences(FS,NX_FS,$(FSLIBSRC),SOFSREV,SharedFSRev) #else -ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(FS,NX_FS,$(FSLIBSRC),XBuildLibDir) #endif #ifndef SharedLibFont @@ -3212,14 +3212,14 @@ ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir) #define SharedFontRev 1.5 #endif SharedFontLibReferences() -XCOMM SharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev) +XCOMM SharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev) #else ProjectUnsharedFontLibReferences() -XCOMM ProjectUnsharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),XBuildLibDir) +XCOMM ProjectUnsharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),XBuildLibDir) #endif FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs -ProjectUnsharedLibReferences(FONTSTUB,fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(FONTSTUB,NX_fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) @@ -3241,9 +3241,9 @@ ProjectUnsharedLibReferences(FONTSTUB,fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) #ifndef SharedFontEncRev #define SharedFontEncRev 1.0 #endif -SharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev) +SharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev) #else -ProjectUnsharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),XBuildLibDir) #endif #ifndef SharedLibXpm @@ -3263,9 +3263,9 @@ ProjectUnsharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),XBuildLibDir) #ifndef SharedXpmRev #define SharedXpmRev 4.11 #endif -SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) +SharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) #else -ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),XBuildLibDir) #endif #if UseFreetype2 @@ -3313,9 +3313,9 @@ ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) #define SharedFreetype2Rev 9.0 #endif #endif -SharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev) +SharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev) #else -ProjectUnsharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),XBuildLibDir) #endif #ifdef UseInstalled @@ -3470,9 +3470,9 @@ MOTIFINCLUDES = -I$(MOTIFINCDIR) #define SharedExpatRev 4.0 #endif #endif -SharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),SOEXPATREV,SharedExpatRev) +SharedLibReferences(EXPAT,NX_expat,$(EXPATLIBSRC),SOEXPATREV,SharedExpatRev) #else -ProjectUnsharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(EXPAT,NX_expat,$(EXPATLIBSRC),XBuildLibDir) #endif #if UseExpat @@ -3552,9 +3552,9 @@ EXPATDEFINES = -DEXPAT #ifndef SharedXft1Rev #define SharedXft1Rev 1.1 #endif -SharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev) +SharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev) #else -ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),XBuildLibDir) #endif #ifndef Xft1ClientDepLibs @@ -3589,9 +3589,9 @@ ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),XBuildLibDir) #ifndef SharedXftRev #define SharedXftRev 2.1.2 #endif -SharedLibReferences(XFT,Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) +SharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) #else -ProjectUnsharedLibReferences(XFT,Xft,$(XFTLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),XBuildLibDir) #endif #ifndef XftClientDepLibs @@ -3622,9 +3622,9 @@ ProjectUnsharedLibReferences(XFT,Xft,$(XFTLIBSRC),XBuildLibDir) #ifndef SharedFontconfigRev #define SharedFontconfigRev 1.0.4 #endif -SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) +SharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) #else -ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir) #endif #ifdef UseInstalled @@ -3827,9 +3827,9 @@ LIBPNGLIB = -L$(LIBPNGLIBDIR) LinkerRuntimeLibraryPathFlag($(LIBPNGLIBDIR)) -lpn # ifndef SharedxkbfileRev # define SharedxkbfileRev 1.0 # endif -SharedLibReferences(XKBFILE,xkbfile,$(XKBFILESRC),SOXKBFILEREV, SharedxkbfileRev) +SharedLibReferences(XKBFILE,NX_xkbfile,$(XKBFILESRC),SOXKBFILEREV, SharedxkbfileRev) #else -ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XKBFILE,NX_xkbfile,$(XKBFILELIBSRC),XBuildLibDir) #endif #if BuildXKBlib @@ -3899,9 +3899,9 @@ ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir) # ifndef SharedxkbuiRev # define SharedxkbuiRev 1.0 # endif -SharedLibReferences(XKBUI,xkbui,$(XKBUISRC),SOXKBUIREV, SharedxkbuiRev) +SharedLibReferences(XKBUI,NX_xkbui,$(XKBUISRC),SOXKBUIREV, SharedxkbuiRev) #else -ProjectUnsharedLibReferences(XKBUI,xkbui,$(XKBUILIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XKBUI,NX_xkbui,$(XKBUILIBSRC),XBuildLibDir) #endif #ifndef XkbuiLibs @@ -3974,9 +3974,9 @@ EXTRAXAWCLIENTLIBS = ExtraXawClientLibs #ifndef SharedXTrapRev #define SharedXTrapRev 6.4 #endif -SharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),SOXTRAPREV,SharedXTrapRev) +SharedLibReferences(XTRAP,NX_XTrap,$(XTRAPLIBSRC),SOXTRAPREV,SharedXTrapRev) #else -ProjectUnsharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XTRAP,NX_XTrap,$(XTRAPLIBSRC),XBuildLibDir) #endif #ifndef NeedDefaultDepLibs diff --git a/nx-X11/config/cf/lnxLib.rules b/nx-X11/config/cf/lnxLib.rules index 0cc71d325..409203137 100644 --- a/nx-X11/config/cf/lnxLib.rules +++ b/nx-X11/config/cf/lnxLib.rules @@ -389,7 +389,7 @@ JUMP_LDLIBS_libc = `$(CC) --print-libgcc-file-name` -lc XCOMM libX11.so (X11, SM, ICE) JUMP_ROOT_X11 = $(XLIBSRC) JUMP_IS_HOST_X11 = YES -JUMP_STUBLIBS_X11 = libX11.sa libSM.sa libICE.sa +JUMP_STUBLIBS_X11 = libNX_X11.sa libNX_SM.sa libNX_ICE.sa JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE) JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared JUMP_DEFS_X11 = $(XDMAUTHDEFS) $(XKB_DEFINES) @@ -400,9 +400,9 @@ JUMP_EXPORT_X11 = $(JUMP_DIR_X11)/jump.vars JUMP_ADDRESS_X11 = 0x60200000 JUMP_JUMPTABLESIZE_X11 = 0x4000 JUMP_GOTSIZE_X11 = 4096 -JUMP_STUBNAMES_X11 = libX11 libSM libICE +JUMP_STUBNAMES_X11 = libNX_X11 libNX_SM libNX_ICE JUMP_STUBS_IMPORT_X11 = $(LIBC_SA) -JUMP_SIBARS_X11 = jump/libSM.a~ jump/libICE.a~ +JUMP_SIBARS_X11 = jump/libNX_SM.a~ jump/libNX_ICE.a~ JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc) XCOMM libSM (part of libX11.so) @@ -435,9 +435,9 @@ JUMP_JUMPTABLESIZE_Xt = 0x4000 JUMP_GOTSIZE_Xt = 4096 JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst libXp JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11) -JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~ jump/libXp.a~ -JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libICE.sa \ - $(JUMP_ROOT_SM)/libSM.sa $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc) +JUMP_SIBARS_Xt = jump/libNX_Xmu.a~ jump/libNX_Xext.a~ jump/libNX_Xi.a~ jump/libNX_Xtst.a~ jump/libNX_Xp.a~ +JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libNX_ICE.sa \ + $(JUMP_ROOT_SM)/libNX_SM.sa $(JUMP_ROOT_X11)/libNX_X11.sa $(JUMP_LDLIBS_libc) XCOMM libXmu (part of libXt.so) JUMP_ROOT_Xmu = $(XMUSRC) @@ -485,8 +485,8 @@ JUMP_JUMPTABLESIZE_Xaw = 0x4000 JUMP_GOTSIZE_Xaw = 4096 JUMP_STUBNAMES_Xaw = libXaw JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11) -JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \ - $(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \ +JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libNX_Xt.sa $(JUMP_ROOT_Xt)/libNX_Xmu.sa \ + $(JUMP_ROOT_Xt)/libNX_Xext.sa $(JUMP_ROOT_X11)/libNX_X11.sa \ $(JUMP_LDLIBS_libc) # endif /* !UseInstalled */ diff --git a/nx-X11/config/cf/lnxLib.tmpl b/nx-X11/config/cf/lnxLib.tmpl index f1eb5ac4b..788733c1f 100644 --- a/nx-X11/config/cf/lnxLib.tmpl +++ b/nx-X11/config/cf/lnxLib.tmpl @@ -9,7 +9,7 @@ XCOMM $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ #ifndef FixupLibReferences #define FixupLibReferences() @@\ -XMULIBONLY = -lXmu @@\ +XMULIBONLY = -lNX_Xmu @@\ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) #endif @@ -66,7 +66,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) #ifndef FixupLibReferences #define FixupLibReferences() @@\ -XMULIB = -lXmu $(XLIB) +XMULIB = -lNX_Xmu $(XLIB) #endif #endif /* UseElfFormat */ diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index c0ae81071..9f0b682b3 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -82,7 +82,7 @@ NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status #define DoExtraLib SharedLibX11 #define DoDebugLib DebugLibX11 #define DoProfileLib ProfileLibX11 -#define LibName X11 +#define LibName NX_X11 #define SoRev SOXLIBREV #define HugeLibrary YES #define IncSubdir X11 diff --git a/nx-X11/lib/XRes/Imakefile b/nx-X11/lib/XRes/Imakefile index 410f57ff5..fbc067a4a 100644 --- a/nx-X11/lib/XRes/Imakefile +++ b/nx-X11/lib/XRes/Imakefile @@ -4,7 +4,7 @@ XCOMM $XFree86: xc/lib/XRes/Imakefile,v 1.3 2003/10/13 21:19:28 herrb Exp $ #define DoSharedLib SharedLibXRes #define DoDebugLib DebugLibXRes #define DoProfileLib ProfileLibXRes -#define LibName XRes +#define LibName NX_XRes #define SoRev SOXRESREV #define LibHeaders NO diff --git a/nx-X11/lib/Xau/Imakefile b/nx-X11/lib/Xau/Imakefile index 49cb7dcd3..331d29c09 100644 --- a/nx-X11/lib/Xau/Imakefile +++ b/nx-X11/lib/Xau/Imakefile @@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.5 1999/04/17 09:08:11 dawes Exp $ #define DoExtraLib SharedLibXau #define DoDebugLib DebugLibXau #define DoProfileLib ProfileLibXau -#define LibName Xau +#define LibName NX_Xau #define SoRev SOXAUTHREV #define IncSubdir X11 diff --git a/nx-X11/lib/Xcomposite/Imakefile b/nx-X11/lib/Xcomposite/Imakefile index 053df3d70..a3b94145c 100644 --- a/nx-X11/lib/Xcomposite/Imakefile +++ b/nx-X11/lib/Xcomposite/Imakefile @@ -14,7 +14,7 @@ SOXCOMPOSITEREV=1.0.0 #define DoDebugLib DebugLibXcomposite #define DoProfileLib ProfileLibXcomposite -#define LibName Xcomposite +#define LibName NX_Xcomposite #define SoRev SOXCOMPOSITEREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/lib/Xcomposite/xcomposite.pc.in b/nx-X11/lib/Xcomposite/xcomposite.pc.in index 770adf515..c319694f1 100644 --- a/nx-X11/lib/Xcomposite/xcomposite.pc.in +++ b/nx-X11/lib/Xcomposite/xcomposite.pc.in @@ -7,4 +7,4 @@ Name: Xcomposite Description: X Composite Library Version: @VERSION@ Cflags: -I${includedir} @XCOMPOSITE_CFLAGS@ @X_CFLAGS@ -Libs: -L${libdir} -lXcomposite @XCOMPOSITE_LIBS@ @X_LIBS@ +Libs: -L${libdir} -lNX_Xcomposite @XCOMPOSITE_LIBS@ @X_LIBS@ diff --git a/nx-X11/lib/Xcursor/Imakefile b/nx-X11/lib/Xcursor/Imakefile index 3e50841ff..53b41e893 100644 --- a/nx-X11/lib/Xcursor/Imakefile +++ b/nx-X11/lib/Xcursor/Imakefile @@ -15,7 +15,7 @@ SOXCURSORREV=1.0.2 #define DoDebugLib DebugLibXcursor #define DoProfileLib ProfileLibXcursor -#define LibName Xcursor +#define LibName NX_Xcursor #define SoRev SOXCURSORREV #define IncSubdir X11 #define IncSubSubdir Xcursor diff --git a/nx-X11/lib/Xcursor/xcursor.pc.in b/nx-X11/lib/Xcursor/xcursor.pc.in index c39fce712..87aba1209 100644 --- a/nx-X11/lib/Xcursor/xcursor.pc.in +++ b/nx-X11/lib/Xcursor/xcursor.pc.in @@ -12,4 +12,4 @@ Description: X Cursor Library Version: @VERSION@ Requires: xrender Cflags: -I${includedir} ${xrendercflags} ${xcflags} -Libs: -L${libdir} -lXcursor ${xrenderlibs} ${xlibs} +Libs: -L${libdir} -lNX_Xcursor ${xrenderlibs} ${xlibs} diff --git a/nx-X11/lib/Xdamage/Imakefile b/nx-X11/lib/Xdamage/Imakefile index 260dfeb56..d0d767a20 100644 --- a/nx-X11/lib/Xdamage/Imakefile +++ b/nx-X11/lib/Xdamage/Imakefile @@ -14,7 +14,7 @@ SOXDAMAGEREV=1.0.1 #define DoDebugLib DebugLibXdamage #define DoProfileLib ProfileLibXdamage -#define LibName Xdamage +#define LibName NX_Xdamage #define SoRev SOXDAMAGEREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/lib/Xdamage/xdamage.pc.in b/nx-X11/lib/Xdamage/xdamage.pc.in index dbf77ac57..d1c9f5de6 100644 --- a/nx-X11/lib/Xdamage/xdamage.pc.in +++ b/nx-X11/lib/Xdamage/xdamage.pc.in @@ -7,4 +7,4 @@ Name: Xdamage Description: X Damage Library Version: @VERSION@ Cflags: -I${includedir} @XDAMAGE_CFLAGS@ @X_CFLAGS@ -Libs: -L${libdir} -lXdamage @XDAMAGE_LIBS@ @X_LIBS@ +Libs: -L${libdir} -lNX_Xdamage @XDAMAGE_LIBS@ @X_LIBS@ diff --git a/nx-X11/lib/Xdmcp/Imakefile b/nx-X11/lib/Xdmcp/Imakefile index 08b91cd45..1fc7b6de3 100644 --- a/nx-X11/lib/Xdmcp/Imakefile +++ b/nx-X11/lib/Xdmcp/Imakefile @@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xdmcp/Imakefile,v 3.4 1999/04/17 09:08:12 dawes Exp $ #define DoExtraLib SharedLibXdmcp #define DoDebugLib DebugLibXdmcp #define DoProfileLib ProfileLibXdmcp -#define LibName Xdmcp +#define LibName NX_Xdmcp #define SoRev SOXDMCPREV #define IncSubdir X11 diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index b323dc7c2..c43361f12 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.12 2002/10/16 00:37:27 dawes Exp $ #define DoExtraLib SharedLibXext #define DoDebugLib DebugLibXext #define DoProfileLib ProfileLibXext -#define LibName Xext +#define LibName NX_Xext #define SoRev SOXEXTREV #define LibHeaders NO diff --git a/nx-X11/lib/Xfixes/Imakefile b/nx-X11/lib/Xfixes/Imakefile index c053aa2b5..bbf88e1d0 100644 --- a/nx-X11/lib/Xfixes/Imakefile +++ b/nx-X11/lib/Xfixes/Imakefile @@ -14,7 +14,7 @@ SOXFIXESREV=3.0.0 #define DoDebugLib DebugLibXfixes #define DoProfileLib ProfileLibXfixes -#define LibName Xfixes +#define LibName NX_Xfixes #define SoRev SOXFIXESREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/lib/Xfixes/xfixes.pc.in b/nx-X11/lib/Xfixes/xfixes.pc.in index 6180ea371..54e9ac709 100644 --- a/nx-X11/lib/Xfixes/xfixes.pc.in +++ b/nx-X11/lib/Xfixes/xfixes.pc.in @@ -7,4 +7,4 @@ Name: Xfixes Description: X Fixes Library Version: @VERSION@ Cflags: -I${includedir} @X_CFLAGS@ -Libs: -L${libdir} -lXfixes @X_LIBS@ +Libs: -L${libdir} -lNX_Xfixes @X_LIBS@ diff --git a/nx-X11/lib/Xinerama/Imakefile b/nx-X11/lib/Xinerama/Imakefile index 99271306b..910f98da6 100644 --- a/nx-X11/lib/Xinerama/Imakefile +++ b/nx-X11/lib/Xinerama/Imakefile @@ -4,7 +4,7 @@ XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.4 2002/10/16 00:37:31 dawes Exp $ #define DoSharedLib SharedLibXinerama #define DoDebugLib DebugLibXinerama #define DoProfileLib ProfileLibXinerama -#define LibName Xinerama +#define LibName NX_Xinerama #define SoRev SOXINERAMAREV #define LibHeaders NO diff --git a/nx-X11/lib/Xpm/Imakefile b/nx-X11/lib/Xpm/Imakefile index dd98b2fb8..35e961083 100644 --- a/nx-X11/lib/Xpm/Imakefile +++ b/nx-X11/lib/Xpm/Imakefile @@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/Xpm/Imakefile,v 1.1 1999/01/11 14:40:02 dawes Exp $ #define DoDebugLib DebugLibXpm #define DoProfileLib ProfileLibXpm #define HasSharedData NO -#define LibName Xpm +#define LibName NX_Xpm #define SoRev SOXPMREV #define IncSubdir X11 diff --git a/nx-X11/lib/Xrandr/Imakefile b/nx-X11/lib/Xrandr/Imakefile index 15167a9f6..5cf70a516 100644 --- a/nx-X11/lib/Xrandr/Imakefile +++ b/nx-X11/lib/Xrandr/Imakefile @@ -5,7 +5,7 @@ XCOMM $XdotOrg: xc/lib/Xrandr/Imakefile,v 1.5 2005/10/24 23:30:21 alanc Exp $ #define DoSharedLib SharedLibXrandr #define DoDebugLib DebugLibXrandr #define DoProfileLib ProfileLibXrandr -#define LibName Xrandr +#define LibName NX_Xrandr #define SoRev SOXRANDRREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/lib/Xrender/Imakefile b/nx-X11/lib/Xrender/Imakefile index c690dc0f0..c4fd0aa67 100644 --- a/nx-X11/lib/Xrender/Imakefile +++ b/nx-X11/lib/Xrender/Imakefile @@ -74,7 +74,7 @@ clean:: #define DoSharedLib SharedLibXrender #define DoDebugLib DebugLibXrender #define DoProfileLib ProfileLibXrender -#define LibName Xrender +#define LibName NX_Xrender #define SoRev SOXRENDERREV #ifdef XBuildIncDir diff --git a/nx-X11/lib/Xrender/xrender.pc.in b/nx-X11/lib/Xrender/xrender.pc.in index 5cc898b0a..ec8abb5aa 100644 --- a/nx-X11/lib/Xrender/xrender.pc.in +++ b/nx-X11/lib/Xrender/xrender.pc.in @@ -8,4 +8,4 @@ Description: X Render Library Version: @VERSION@ Requires: @X_REQUIRES@ Cflags: -I${includedir} @RENDER_CFLAGS@ @X_NON_PKG_CFLAGS@ -Libs: -L${libdir} -lXrender @X_NON_PKG_LIBS@ +Libs: -L${libdir} -lNX_Xrender @X_NON_PKG_LIBS@ diff --git a/nx-X11/lib/Xtst/Imakefile b/nx-X11/lib/Xtst/Imakefile index b3dd9f7e7..f32129436 100644 --- a/nx-X11/lib/Xtst/Imakefile +++ b/nx-X11/lib/Xtst/Imakefile @@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xtst/Imakefile,v 1.2 1998/12/20 11:57:12 dawes Exp $ #define DoExtraLib SharedLibXtst #define DoDebugLib DebugLibXtst #define DoProfileLib ProfileLibXtst -#define LibName Xtst +#define LibName NX_Xtst #define SoRev SOXTESTREV #define LibHeaders NO diff --git a/nx-X11/lib/font/Imakefile b/nx-X11/lib/font/Imakefile index 02ddd8eaa..f47fe963c 100644 --- a/nx-X11/lib/font/Imakefile +++ b/nx-X11/lib/font/Imakefile @@ -31,7 +31,7 @@ XCOMM $XFree86: xc/lib/font/Imakefile,v 3.37 2003/10/24 16:21:12 tsi Exp $ STUBDIRS = stubs #endif -LIBNAME = Xfont +LIBNAME = NX_Xfont SOREV = $(SOFONTREV) #ifndef SeparateSharedCompile diff --git a/nx-X11/lib/oldX/Imakefile b/nx-X11/lib/oldX/Imakefile index ae80d268e..663d11019 100644 --- a/nx-X11/lib/oldX/Imakefile +++ b/nx-X11/lib/oldX/Imakefile @@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.2 1998/12/20 11:57:19 dawes Exp $ #define DoExtraLib SharedOldX #define DoDebugLib DebugOldX #define DoProfileLib ProfileOldX -#define LibName oldX +#define LibName NX_oldX #define SoRev SOOLDXREV #define IncSubdir X11 diff --git a/nx-X11/lib/xkbfile/Imakefile b/nx-X11/lib/xkbfile/Imakefile index 7b751c903..d7693819e 100644 --- a/nx-X11/lib/xkbfile/Imakefile +++ b/nx-X11/lib/xkbfile/Imakefile @@ -11,7 +11,7 @@ XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.5 2003/10/15 21:23:38 herrb Exp $ #define DoDebugLib DebugLibxkbfile #define DoProfileLib ProfileLibxkbfile #define HasSharedData NO -#define LibName xkbfile +#define LibName NX_xkbfile #define SoRev SOXKBFILEREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/lib/xkbui/Imakefile b/nx-X11/lib/xkbui/Imakefile index f27bad64d..a017d681c 100644 --- a/nx-X11/lib/xkbui/Imakefile +++ b/nx-X11/lib/xkbui/Imakefile @@ -6,7 +6,7 @@ XCOMM $XFree86: xc/lib/xkbui/Imakefile,v 3.4 2003/10/15 21:23:38 herrb Exp $ #define DoDebugLib DebugLibxkbui #define DoProfileLib ProfileLibxkbui #define HasSharedData NO -#define LibName xkbui +#define LibName NX_xkbui #define SoRev SOXKBUIREV #define IncSubdir X11 #define IncSubSubdir extensions diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index c31102bbc..24e8850d9 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -313,7 +313,7 @@ XPFBLIBS = dix/LibraryTargetName(xpstubs) FONTBASE = $(FONTLIBSRC)/fontbase.o \ $(FONTLIBSRC)/LibraryTargetName(fontbase) #if XserverStaticFontLib - FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) $(FREETYPE2LIB) + FONT = $(FONTLIBSRC)/LibraryTargetName(NX_Xfont) $(FREETYPE2LIB) #else FONT = $(LDPRELIB) $(XFONTLIB) $(FREETYPE2LIB) #endif @@ -994,7 +994,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ dix/main.o #endif -XPMLIB = -lXpm +XPMLIB = -lNX_Xpm NXAGENT = hw/nxagent/LibraryTargetName(nxagent) NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI) NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) @@ -1012,18 +1012,18 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp \ + -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ + -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes \ + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \ - -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp \ + -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #endif @@ -1078,7 +1078,7 @@ nxagent_static_nolibs: nxagent else exit 0; fi $(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \ $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) $(FONTLIBS) \ - $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lXext -lX11 $(EXTRA_LOAD_FLAGS) + $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS) #endif /* NXAgentServer */ #if defined(XnonServer) && XnonServer diff --git a/nxcompext/Makefile.in b/nxcompext/Makefile.in index 9fd2c7d7d..7987c7563 100644 --- a/nxcompext/Makefile.in +++ b/nxcompext/Makefile.in @@ -42,12 +42,12 @@ CCINCLUDES = -I. -I../nxcomp CCDEFINES = LDFLAGS = @LDFLAGS@ -L../nxcomp -LIBS = @LIBS@ -lz -lX11 -lXcomp +LIBS = @LIBS@ -lz -lNX_X11 -lXcomp # # Only if THREADS is defined # -# LIBS = @LIBS@ -lz -ljpeg -lpthread -lX11 -lXcomp +# LIBS = @LIBS@ -lz -ljpeg -lpthread -lNX_X11 -lXcomp # srcdir = @srcdir@ diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 00bca25c9..f7e89a6f2 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -48,7 +48,7 @@ CCINCLUDES = CCDEFINES = LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -lX11 +LIBS = @LIBS@ -lNX_X11 # # Only if THREADS is defined. @@ -139,7 +139,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL) else -EXTRALIBS = -lXtst -lXrandr -lXdamage +EXTRALIBS = -lNX_Xtst -lNX_Xrandr -lNX_Xdamage all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) -- cgit v1.2.3 From 456f887d95ca34974c1192a477dfca117827457f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 13 Feb 2015 13:30:31 +0100 Subject: Do not build bundled libraries (601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch). This commit has been submitted by Orion in two portions. One was submitted to X2Go BTS and created on Wed, 10 Jul 2013. The other portion has been taken from the Fedora package by Mike Gabriel and worked into this patch on Fri, 06 Dec 2013. --- ...changes-to-not-use-bundled-libraries.full.patch | 99 ---------------------- debian/patches/series | 1 - nx-X11/config/cf/host.def | 17 +++- nx-X11/lib/Imakefile | 6 -- nx-X11/lib/font/include/Imakefile | 2 +- 5 files changed, 14 insertions(+), 111 deletions(-) delete mode 100644 debian/patches/601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch (limited to 'debian') diff --git a/debian/patches/601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch b/debian/patches/601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch deleted file mode 100644 index dbb2e85b0..000000000 --- a/debian/patches/601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch +++ /dev/null @@ -1,99 +0,0 @@ -Description: Do not build bundled libraries. -Author: Orion Poplawski -Abstract: - This commit has been submitted by Orion in two - portions. One was submitted to X2Go BTS and created - on Wed, 10 Jul 2013. - . - The other portion has been taken from the Fedora - package by Mike Gabriel and worked into this - patch on Fri, 06 Dec 2013. ---- - nx-X11/config/cf/host.def | 10 +++++++--- - nx-X11/lib/font/include/Imakefile | 2 +- - 2 files changed, 8 insertions(+), 4 deletions(-) - ---- a/nx-X11/config/cf/host.def -+++ b/nx-X11/config/cf/host.def -@@ -311,6 +311,7 @@ - * - #define BuildFreeType NO - */ -+#define BuildFreeType NO - - /* - * To set non-default build options for the underlying FreeType libraries, -@@ -892,7 +893,7 @@ - * - #define HasFreetype2 NO - */ --#define HasFreetype2 NO -+#define HasFreetype2 YES - - /* - * To use a FreeType library already installed outside the default search -@@ -909,7 +910,7 @@ - * - #define HasFontconfig NO - */ --#define HasFontconfig NO -+#define HasFontconfig YES - - /* - * To use a Fontconfig library already installed outside the default search -@@ -925,7 +926,7 @@ - * - #define HasExpat NO - */ --#define HasExpat NO -+#define HasExpat YES - - /* - * To use a Expat library already installed outside the default search -@@ -961,7 +962,7 @@ - - #define SharedLibXdmcp YES - --#define BuildXaw7 YES -+#define BuildXaw7 NO - - #else /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */ - -@@ -1019,3 +1020,11 @@ - #endif - - #endif /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */ -+ -+#define BuildRman NO -+#define BuildFontEncLib NO -+#define BuildXcursorLibrary NO -+#define BuildXftLibrary NO -+#define BuildXft1Library NO -+#define SharedLibFont NO -+#define BuildLoadableXlibI18n NO ---- a/nx-X11/lib/font/include/Imakefile -+++ b/nx-X11/lib/font/include/Imakefile -@@ -1,5 +1,5 @@ - XCOMM $Xorg$ -- HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h fontenc.h \ -+ HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h \ - fontencc.h fontmisc.h fontmod.h fontshow.h fontutil.h \ - fontxlfd.h - all:: ---- a/nx-X11/lib/Imakefile -+++ b/nx-X11/lib/Imakefile -@@ -213,14 +213,8 @@ - - #if BuildLibraries - OLDXLIBDIR = oldX --ICELIBDIR = ICE --SMLIBDIR = SM --XTLIBDIR = Xt --XMULIBDIR = Xmu --XMUULIBDIR = Xmuu - XPMLIBDIR = Xpm - XTSTLIBDIR = Xtst --FSLIBDIR = FS - #endif - - diff --git a/debian/patches/series b/debian/patches/series index 6a20a8f47..21cf21d53 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch 602_nx-X11_initgroups.full.patch 603_nx-X11_compilation_warnings.full.patch 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 2193a4711..9b482c620 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -311,6 +311,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define BuildFreeType NO */ +#define BuildFreeType NO /* * To set non-default build options for the underlying FreeType libraries, @@ -892,7 +893,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define HasFreetype2 NO */ -#define HasFreetype2 NO +#define HasFreetype2 YES /* * To use a FreeType library already installed outside the default search @@ -909,7 +910,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define HasFontconfig NO */ -#define HasFontconfig NO +#define HasFontconfig YES /* * To use a Fontconfig library already installed outside the default search @@ -925,7 +926,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define HasExpat NO */ -#define HasExpat NO +#define HasExpat YES /* * To use a Expat library already installed outside the default search @@ -961,7 +962,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define SharedLibXdmcp YES -#define BuildXaw7 YES +#define BuildXaw7 NO #else /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */ @@ -1019,3 +1020,11 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #endif #endif /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */ + +#define BuildRman NO +#define BuildFontEncLib NO +#define BuildXcursorLibrary NO +#define BuildXftLibrary NO +#define BuildXft1Library NO +#define SharedLibFont NO +#define BuildLoadableXlibI18n NO diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 240e8b330..cf4109bd0 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -213,14 +213,8 @@ XEXTLIBDIR = Xext #if BuildLibraries OLDXLIBDIR = oldX -ICELIBDIR = ICE -SMLIBDIR = SM -XTLIBDIR = Xt -XMULIBDIR = Xmu -XMUULIBDIR = Xmuu XPMLIBDIR = Xpm XTSTLIBDIR = Xtst -FSLIBDIR = FS #endif diff --git a/nx-X11/lib/font/include/Imakefile b/nx-X11/lib/font/include/Imakefile index 91c84e6ec..73e65a41c 100644 --- a/nx-X11/lib/font/include/Imakefile +++ b/nx-X11/lib/font/include/Imakefile @@ -1,5 +1,5 @@ XCOMM $Xorg$ - HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h fontenc.h \ + HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h \ fontencc.h fontmisc.h fontmod.h fontshow.h fontutil.h \ fontxlfd.h all:: -- cgit v1.2.3 From 415b20b6fbf562d4132fca90a00b6c32d94040ed Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 13 Feb 2015 13:32:17 +0100 Subject: Be compliant with POS36-C: Observe correct revocation order while relinquishing privileges (602_nx-X11_initgroups.full.patch). The Fedora review of NX (redistributed) caught the following rpmlint issue: This executable is calling setuid and setgid without setgroups or initgroups. There is a high probability this mean it didn't relinquish all groups, and this would be a potential security issue to be fixed. Seek POS36-C on the web for details about the problem. Ref POS36-C: https://www.securecoding.cert.org/confluence/display/seccode/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges This patch adds initgroups() calls to the code to initialize the supplemental group list. --- debian/patches/602_nx-X11_initgroups.full.patch | 67 ------------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/os/utils.c | 7 +++ nxcomp/Pipe.cpp | 3 ++ 4 files changed, 10 insertions(+), 68 deletions(-) delete mode 100644 debian/patches/602_nx-X11_initgroups.full.patch (limited to 'debian') diff --git a/debian/patches/602_nx-X11_initgroups.full.patch b/debian/patches/602_nx-X11_initgroups.full.patch deleted file mode 100644 index 182b378dc..000000000 --- a/debian/patches/602_nx-X11_initgroups.full.patch +++ /dev/null @@ -1,67 +0,0 @@ -Description: Be compliant with POS36-C: Observe correct revocation order while relinquishing privileges -Author: Orion Poplawski -Abstract: - The Fedora review of NX (redistributed) caught the following rpmlint issue: - . - This executable is calling setuid and setgid without setgroups or initgroups. - There is a high probability this mean it didn't relinquish all groups, and this - would be a potential security issue to be fixed. Seek POS36-C on the web for - details about the problem. - . - Ref POS36-C: - https://www.securecoding.cert.org/confluence/display/seccode/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges - . - This patch adds initgroups() calls to the code to initialize the supplemental group list. -diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c -index 7e62654..9b2431a 100644 ---- a/nx-X11/programs/Xserver/os/utils.c -+++ b/nx-X11/programs/Xserver/os/utils.c -@@ -112,6 +112,9 @@ OR PERFORMANCE OF THIS SOFTWARE. - #include - #include /* for isspace */ - #include -+#include -+#include -+#include - - #if defined(DGUX) - #include -@@ -1770,6 +1773,7 @@ System(char *command) - void (*csig)(int); - #endif - int status; -+ struct passwd *pwent; - - if (!command) - return(1); -@@ -1791,6 +1795,9 @@ System(char *command) - case -1: /* error */ - p = -1; - case 0: /* child */ -+ pwent = getpwuid(getuid()); -+ if (initgroups(pwent->pw_name,getgid()) == -1) -+ _exit(127); - if (setgid(getgid()) == -1) - _exit(127); - if (setuid(getuid()) == -1) -diff --git a/nxcomp/Pipe.cpp b/nxcomp/Pipe.cpp -index 7238d0c..aacbbae 100644 ---- a/nxcomp/Pipe.cpp -+++ b/nxcomp/Pipe.cpp -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #include "Pipe.h" - #include "Misc.h" -@@ -234,6 +235,8 @@ FILE *Popen(char * const parameters[], const char *type) - // Child. - // - -+ struct passwd *pwent = getpwuid(getuid()); -+ if (pwent) initgroups(pwent->pw_name,getgid()); - setgid(getgid()); - setuid(getuid()); - diff --git a/debian/patches/series b/debian/patches/series index 21cf21d53..c80570682 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -602_nx-X11_initgroups.full.patch 603_nx-X11_compilation_warnings.full.patch 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 7e626542e..9b2431af7 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -112,6 +112,9 @@ OR PERFORMANCE OF THIS SOFTWARE. #include #include /* for isspace */ #include +#include +#include +#include #if defined(DGUX) #include @@ -1770,6 +1773,7 @@ System(char *command) void (*csig)(int); #endif int status; + struct passwd *pwent; if (!command) return(1); @@ -1791,6 +1795,9 @@ System(char *command) case -1: /* error */ p = -1; case 0: /* child */ + pwent = getpwuid(getuid()); + if (initgroups(pwent->pw_name,getgid()) == -1) + _exit(127); if (setgid(getgid()) == -1) _exit(127); if (setuid(getuid()) == -1) diff --git a/nxcomp/Pipe.cpp b/nxcomp/Pipe.cpp index 7238d0c73..aacbbaeb3 100644 --- a/nxcomp/Pipe.cpp +++ b/nxcomp/Pipe.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "Pipe.h" #include "Misc.h" @@ -234,6 +235,8 @@ FILE *Popen(char * const parameters[], const char *type) // Child. // + struct passwd *pwent = getpwuid(getuid()); + if (pwent) initgroups(pwent->pw_name,getgid()); setgid(getgid()); setuid(getuid()); -- cgit v1.2.3 From 96d5e74a30ea8571c3e403bd5d5b3080aaa193f1 Mon Sep 17 00:00:00 2001 From: Mirraz Mirraz Date: Fri, 13 Feb 2015 13:34:16 +0100 Subject: Handle some serious compilation warnings (603_nx-X11_compilation_warnings.full.patch). --- .../603_nx-X11_compilation_warnings.full.patch | 38 ---------------------- debian/patches/series | 1 - nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c | 1 - nx-X11/lib/X11/imLcPrs.c | 2 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 6 ++++ 5 files changed, 7 insertions(+), 41 deletions(-) delete mode 100644 debian/patches/603_nx-X11_compilation_warnings.full.patch (limited to 'debian') diff --git a/debian/patches/603_nx-X11_compilation_warnings.full.patch b/debian/patches/603_nx-X11_compilation_warnings.full.patch deleted file mode 100644 index 3656461b6..000000000 --- a/debian/patches/603_nx-X11_compilation_warnings.full.patch +++ /dev/null @@ -1,38 +0,0 @@ -Description: Handle some serious compilation warnings -Author: Mirraz Mirraz ---- a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c 2013-08-30 20:18:40.000000000 +0600 -+++ b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c 2013-09-30 18:39:42.357560169 +0600 -@@ -3259,7 +3259,6 @@ - vp->SrcReg[0].Swizzle = SWIZZLE_NOOP; - vp->SrcReg[1].Swizzle = SWIZZLE_NOOP; - vp->SrcReg[2].Swizzle = SWIZZLE_NOOP; -- vp->SrcReg[3].Swizzle = SWIZZLE_NOOP; - vp->DstReg.WriteMask = 0xf; - - switch (type) { ---- a/nx-X11/lib/X11/imLcPrs.c 2013-08-30 20:18:40.000000000 +0600 -+++ b/nx-X11/lib/X11/imLcPrs.c 2013-09-30 19:02:56.925125678 +0600 -@@ -589,7 +589,7 @@ - - l = _Xmbstoutf8(local_utf8_buf, rhs_string_mb, LOCAL_UTF8_BUFSIZE - 1); - if (l == LOCAL_UTF8_BUFSIZE - 1) { -- local_wc_buf[l] = '\0'; -+ local_utf8_buf[l] = '\0'; - } - if( (rhs_string_utf8 = (char *)Xmalloc(l + 1)) == NULL ) { - Xfree( rhs_string_wc ); ---- a/nx-X11/programs/Xserver/xkb/ddxLoad.c 2013-08-30 20:18:40.000000000 +0600 -+++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c 2013-09-30 18:56:27.358995920 +0600 -@@ -37,6 +37,12 @@ - #include - #include - #include -+ -+/* stat() */ -+#include -+#include -+#include -+ - #define NEED_EVENTS 1 - #include - #include diff --git a/debian/patches/series b/debian/patches/series index c80570682..1d0f53bf9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -603_nx-X11_compilation_warnings.full.patch 605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch diff --git a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c index 57891b234..ed1cbd908 100644 --- a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c +++ b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c @@ -3259,7 +3259,6 @@ parse_vp_instruction (GLcontext * ctx, GLubyte ** inst, vp->SrcReg[0].Swizzle = SWIZZLE_NOOP; vp->SrcReg[1].Swizzle = SWIZZLE_NOOP; vp->SrcReg[2].Swizzle = SWIZZLE_NOOP; - vp->SrcReg[3].Swizzle = SWIZZLE_NOOP; vp->DstReg.WriteMask = 0xf; switch (type) { diff --git a/nx-X11/lib/X11/imLcPrs.c b/nx-X11/lib/X11/imLcPrs.c index fbad5a220..9736e135c 100644 --- a/nx-X11/lib/X11/imLcPrs.c +++ b/nx-X11/lib/X11/imLcPrs.c @@ -589,7 +589,7 @@ parseline( l = _Xmbstoutf8(local_utf8_buf, rhs_string_mb, LOCAL_UTF8_BUFSIZE - 1); if (l == LOCAL_UTF8_BUFSIZE - 1) { - local_wc_buf[l] = '\0'; + local_utf8_buf[l] = '\0'; } if( (rhs_string_utf8 = (char *)Xmalloc(l + 1)) == NULL ) { Xfree( rhs_string_wc ); diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index 0b779b719..7caf9b1cb 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -37,6 +37,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include + +/* stat() */ +#include +#include +#include + #define NEED_EVENTS 1 #include #include -- cgit v1.2.3 From ab8d1276f5c7ebef6f959cfb691cce5fff6867b4 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Fri, 13 Feb 2015 13:35:40 +0100 Subject: In Types.h, don't use STL internals on libc++ (605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch). The nx-libs-lite package does not compile on OS X Mavericks because Apple's clang compilers now default to compiling against the libc++ STL rather than (their outdated copy of) libstdc++. While the compiler still allows changing that, we should not rely on this being possible forever. The compiler chokes in Types.h, specifically the clear() methods in subclasses of vectors that use implementation details of the GNU STL. The attached patch fixes these compilation issues by not overriding the clear() method when compiling against libc++, since the libc++ headers seem to do essentially the same as the overriden method. --- ...ont-use-STL-internals-on-libc++.full+lite.patch | 52 ---------------------- debian/patches/series | 1 - nxcomp/Types.h | 8 ++++ 3 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch (limited to 'debian') diff --git a/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch b/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch deleted file mode 100644 index 60f33ce3f..000000000 --- a/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch +++ /dev/null @@ -1,52 +0,0 @@ -Description: In Types.h, don't use STL internals on libc++. -Author: Clemens Lang -Abstract: - The nx-libs-lite package does not compile on OS X Mavericks because - Apple's clang compilers now default to compiling against the libc++ STL - rather than (their outdated copy of) libstdc++. - . - While the compiler still allows changing that, we should not rely on - this being possible forever. - . - The compiler chokes in Types.h, specifically the clear() methods in - subclasses of vectors that use implementation details of the GNU STL. - The attached patch fixes these compilation issues by not overriding the - clear() method when compiling against libc++, since the libc++ headers - seem to do essentially the same as the overriden method. ---- a/nxcomp/Types.h 2013-11-05 01:35:22.000000000 +0100 -+++ b/nxcomp/Types.h 2013-11-05 01:37:30.000000000 +0100 -@@ -55,6 +55,9 @@ - return &*(vector < unsigned char >::begin()); - } - -+ // Avoid overriding clear() when using libc++. Fiddling with STL internals -+ // doesn't really seem like a good idea to me anyway. -+ #ifndef _LIBCPP_VECTOR - void clear() - { - #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) -@@ -95,12 +98,16 @@ - - #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */ - } -+ #endif /* #ifdef _LIBCPP_VECTOR */ - }; - - class T_messages : public vector < Message * > - { - public: - -+ // Avoid overriding clear() when using libc++. Fiddling with STL internals -+ // doesn't really seem like a good idea to me anyway. -+ #ifndef _LIBCPP_VECTOR - void clear() - { - #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) -@@ -141,6 +148,7 @@ - - #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */ - } -+ #endif /* #ifndef _LIBCPP_VECTOR */ - }; - - typedef md5_byte_t * T_checksum; diff --git a/debian/patches/series b/debian/patches/series index 1d0f53bf9..ee95c5b49 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch 606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch 990_fix-DEBUG-and-TEST-builds.full.patch diff --git a/nxcomp/Types.h b/nxcomp/Types.h index 05f62bd00..b3fe40e31 100644 --- a/nxcomp/Types.h +++ b/nxcomp/Types.h @@ -55,6 +55,9 @@ class T_data : public vector < unsigned char > return &*(vector < unsigned char >::begin()); } + // Avoid overriding clear() when using libc++. Fiddling with STL internals + // doesn't really seem like a good idea to me anyway. + #ifndef _LIBCPP_VECTOR void clear() { #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) @@ -95,12 +98,16 @@ class T_data : public vector < unsigned char > #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */ } + #endif /* #ifdef _LIBCPP_VECTOR */ }; class T_messages : public vector < Message * > { public: + // Avoid overriding clear() when using libc++. Fiddling with STL internals + // doesn't really seem like a good idea to me anyway. + #ifndef _LIBCPP_VECTOR void clear() { #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) @@ -141,6 +148,7 @@ class T_messages : public vector < Message * > #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */ } + #endif /* #ifndef _LIBCPP_VECTOR */ }; typedef md5_byte_t * T_checksum; -- cgit v1.2.3 From 31cdd874cf2ca5b5cfad699ff1d283f0747821e4 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 13 Feb 2015 13:37:33 +0100 Subject: Provide build support for aarch64 architecture (606_nx-X11_build-on-aarch64.full.patch). --- .../patches/606_nx-X11_build-on-aarch64.full.patch | 77 ---------------------- debian/patches/series | 1 - nx-X11/config/cf/Imake.cf | 3 + nx-X11/config/cf/Imake.tmpl | 4 ++ nx-X11/config/cf/linux.cf | 10 +++ nx-X11/programs/Xserver/include/servermd.h | 22 +++++++ 6 files changed, 39 insertions(+), 78 deletions(-) delete mode 100644 debian/patches/606_nx-X11_build-on-aarch64.full.patch (limited to 'debian') diff --git a/debian/patches/606_nx-X11_build-on-aarch64.full.patch b/debian/patches/606_nx-X11_build-on-aarch64.full.patch deleted file mode 100644 index bda43399a..000000000 --- a/debian/patches/606_nx-X11_build-on-aarch64.full.patch +++ /dev/null @@ -1,77 +0,0 @@ -Description: Provide build support for aarch64 architecture -Author: Orion Poplawski ---- a/nx-X11/config/cf/Imake.cf -+++ b/nx-X11/config/cf/Imake.cf -@@ -908,6 +908,9 @@ - # endif - # undef __ARMEB__ - # endif -+# ifdef __aarch64__ -+# define Arm64Architecture -+# endif - # ifdef mc68000 - # define Mc68020Architecture - # undef mc68000 ---- a/nx-X11/config/cf/linux.cf -+++ b/nx-X11/config/cf/linux.cf -@@ -844,6 +844,16 @@ - # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines - #endif /* Arm32Achitecture */ - -+#ifdef Arm64Architecture -+# define DefaultCCOptions -+# ifndef OptimizedCDebugFlags -+# define OptimizedCDebugFlags -O3 -+# endif -+# define LinuxMachineDefines -D__aarch64__ -U__arm -Uarm -+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -+#endif /* Arm64Achitecture */ -+ - #ifdef HPArchitecture - # define OptimizedCDebugFlags -O2 GccAliasingArgs - # define LinuxMachineDefines -D__hppa__ ---- a/nx-X11/config/cf/Imake.tmpl -+++ b/nx-X11/config/cf/Imake.tmpl -@@ -526,6 +526,10 @@ - #define ByteOrder X_BIG_ENDIAN - #elif defined(Arm32Architecture) - #define ByteOrder X_LITTLE_ENDIAN -+#elif defined(Arm64ebArchitecture) -+#define ByteOrder X_BIG_ENDIAN -+#elif defined(Arm64Architecture) -+#define ByteOrder X_LITTLE_ENDIAN - #elif defined(RsArchitecture) - #define ByteOrder X_BIG_ENDIAN - #elif defined(PpcArchitecture) || defined(Ppc64Architecture) ---- a/nx-X11/programs/Xserver/include/servermd.h -+++ b/nx-X11/programs/Xserver/include/servermd.h -@@ -154,6 +154,28 @@ - - #endif /* __arm32__ */ - -+#ifdef __aarch64__ -+ -+#ifdef __AARCH64EL__ -+#define IMAGE_BYTE_ORDER LSBFirst -+#define BITMAP_BIT_ORDER LSBFirst -+#endif -+#ifdef __AARCH64EB__ -+#define IMAGE_BYTE_ORDER MSBFirst -+#define BITMAP_BIT_ORDER MSBFirst -+#endif -+ -+# if defined(XF86MONOVGA) || defined(XF86VGA16) -+# define BITMAP_SCANLINE_UNIT 8 -+# endif -+ -+#define GLYPHPADBYTES 4 -+#define GETLEFTBITS_ALIGNMENT 1 -+#define LARGE_INSTRUCTION_CACHE -+#define AVOID_MEMORY_READ -+ -+#endif /* __aarch64__ */ -+ - #if defined (hpux) || defined __hppa__ - - #define IMAGE_BYTE_ORDER MSBFirst diff --git a/debian/patches/series b/debian/patches/series index ee95c5b49..e975e3cac 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -606_nx-X11_build-on-aarch64.full.patch 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch 990_fix-DEBUG-and-TEST-builds.full.patch 991_fix-hr-typos.full+lite.patch diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf index 1be537b80..16b79c834 100644 --- a/nx-X11/config/cf/Imake.cf +++ b/nx-X11/config/cf/Imake.cf @@ -908,6 +908,9 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 # endif # undef __ARMEB__ # endif +# ifdef __aarch64__ +# define Arm64Architecture +# endif # ifdef mc68000 # define Mc68020Architecture # undef mc68000 diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index 6ca974f57..595617267 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -526,6 +526,10 @@ XCOMM the platform-specific parameters - edit site.def to change #define ByteOrder X_BIG_ENDIAN #elif defined(Arm32Architecture) #define ByteOrder X_LITTLE_ENDIAN +#elif defined(Arm64ebArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Arm64Architecture) +#define ByteOrder X_LITTLE_ENDIAN #elif defined(RsArchitecture) #define ByteOrder X_BIG_ENDIAN #elif defined(PpcArchitecture) || defined(Ppc64Architecture) diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index 25d254787..32b7a8658 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -844,6 +844,16 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* Arm32Achitecture */ +#ifdef Arm64Architecture +# define DefaultCCOptions +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O3 +# endif +# define LinuxMachineDefines -D__aarch64__ -U__arm -Uarm +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* Arm64Achitecture */ + #ifdef HPArchitecture # define OptimizedCDebugFlags -O2 GccAliasingArgs # define LinuxMachineDefines -D__hppa__ diff --git a/nx-X11/programs/Xserver/include/servermd.h b/nx-X11/programs/Xserver/include/servermd.h index cce6b329c..a04c2aa5e 100644 --- a/nx-X11/programs/Xserver/include/servermd.h +++ b/nx-X11/programs/Xserver/include/servermd.h @@ -154,6 +154,28 @@ SOFTWARE. #endif /* __arm32__ */ +#ifdef __aarch64__ + +#ifdef __AARCH64EL__ +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#endif +#ifdef __AARCH64EB__ +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#endif + +# if defined(XF86MONOVGA) || defined(XF86VGA16) +# define BITMAP_SCANLINE_UNIT 8 +# endif + +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 +#define LARGE_INSTRUCTION_CACHE +#define AVOID_MEMORY_READ + +#endif /* __aarch64__ */ + #if defined (hpux) || defined __hppa__ #define IMAGE_BYTE_ORDER MSBFirst -- cgit v1.2.3 From a8fb7d4f5149e28216ffd38838af1cbfd6527002 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 13 Feb 2015 13:38:39 +0100 Subject: Detection for Mac OS X's launchd service on Mac OS X 10.10 and beyond (607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch). --- ...comp_macosx-X11-launcher-in-private-tmp.full+lite.patch | 14 -------------- debian/patches/series | 1 - nxcomp/Loop.cpp | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 debian/patches/607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch (limited to 'debian') diff --git a/debian/patches/607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch b/debian/patches/607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch deleted file mode 100644 index 535671fef..000000000 --- a/debian/patches/607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: Detection for Mac OS X's launchd service on Mac OS X 10.10 and beyond -Author: Mike Gabriel - ---- a/nxcomp/Loop.cpp -+++ b/nxcomp/Loop.cpp -@@ -4183,7 +4183,7 @@ - - #ifdef __APPLE__ - -- if (strncasecmp(display, "/tmp/launch", 11) == 0) -+ if ((strncasecmp(display, "/tmp/launch", 11) == 0) || (strncasecmp(display, "/private/tmp/com.apple.launchd", 30) == 0)) - { - #ifdef TEST - *logofs << "Loop: Using launchd service on socket '" diff --git a/debian/patches/series b/debian/patches/series index e975e3cac..0c9d34366 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch 990_fix-DEBUG-and-TEST-builds.full.patch 991_fix-hr-typos.full+lite.patch 991_fix-hr-typos.full.patch diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index c8c95bd72..7bc154f36 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -4183,7 +4183,7 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, #ifdef __APPLE__ - if (strncasecmp(display, "/tmp/launch", 11) == 0) + if ((strncasecmp(display, "/tmp/launch", 11) == 0) || (strncasecmp(display, "/private/tmp/com.apple.launchd", 30) == 0)) { #ifdef TEST *logofs << "Loop: Using launchd service on socket '" -- cgit v1.2.3 From 6e662473126d0668493732ece7e3c3bb1b0ea72c Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 13 Feb 2015 13:41:31 +0100 Subject: Several fixes for building debug versions of NX (990_fix-DEBUG-and-TEST-builds.full.patch). (1) In nx-X11/programs/Xserver/dix: Fix several compile errors when specifying -DDEBUG globally. Previous GCC versions were more liberal and the code thus compiled. Also initialize/reset a count variable correctly. (2) In nx-X11/programs/Xserver/hw/nxagent/Render.c: Check for pSrc->pDrawable to exist instead of having nxagent segfault when it does not. This enables the possibility of compiling all nxagent modules in TEST mode. --- .../990_fix-DEBUG-and-TEST-builds.full.patch | 69 ---------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/dix/dixfonts.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Render.c | 9 +-- nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c | 2 +- 6 files changed, 8 insertions(+), 77 deletions(-) delete mode 100644 debian/patches/990_fix-DEBUG-and-TEST-builds.full.patch (limited to 'debian') diff --git a/debian/patches/990_fix-DEBUG-and-TEST-builds.full.patch b/debian/patches/990_fix-DEBUG-and-TEST-builds.full.patch deleted file mode 100644 index 23c8508a2..000000000 --- a/debian/patches/990_fix-DEBUG-and-TEST-builds.full.patch +++ /dev/null @@ -1,69 +0,0 @@ -Author: Mihai Moldovan -Description: Several fixes for building debug versions of NX -Abstract: - (1) In nx-X11/programs/Xserver/dix: - . - Fix several compile errors when specifying -DDEBUG globally. Previous GCC - versions were more liberal and the code thus compiled. - . - Also initialize/reset a count variable correctly. - . - . - (2) In nx-X11/programs/Xserver/hw/nxagent/Render.c: - . - Check for pSrc->pDrawable to exist instead of having nxagent segfault when - it does not. - . - This enables the possibility of compiling all nxagent modules in TEST mode. - ---- a/nx-X11/programs/Xserver/dix/dixfonts.c -+++ b/nx-X11/programs/Xserver/dix/dixfonts.c -@@ -2203,7 +2203,7 @@ - byte = 0; - for (l = 0; l <= (cip->metrics.rightSideBearing - - cip->metrics.leftSideBearing); l++) { -- if (maskTab[l & 7] & row[l >> 3]) -+ if (maskTab[l & 7] & (((int*)row)[l >> 3])) - putchar('X'); - else - putchar('.'); ---- a/nx-X11/programs/Xserver/hw/nxagent/Render.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c -@@ -1678,10 +1678,11 @@ - - #ifdef TEST - -- fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n", -- (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), -- pSrc -> pDrawable -> width, pSrc -> pDrawable -> height); -- -+ if (pSrc->pDrawable) { -+ fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n", -+ (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), -+ pSrc -> pDrawable -> width, pSrc -> pDrawable -> height); -+ } - if (pSrc ->pDrawable != pDst -> pDrawable) - { - fprintf(stderr, "nxagentTrapezoids: Destination is a [%s] of geometry [%d,%d].\n", ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c -@@ -735,7 +735,7 @@ - - client->sequence++; - #ifdef DEBUG -- if (client->requestLogIndex == MAX_REQUEST_LOG) -+ if ((client->requestLogIndex >= MAX_REQUEST_LOG) || (client->requestLogIndex <= 0)) - client->requestLogIndex = 0; - client->requestLog[client->requestLogIndex] = MAJOROP; - client->requestLogIndex++; ---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c -@@ -2351,7 +2351,7 @@ - byte = 0; - for (l = 0; l <= (cip->metrics.rightSideBearing - - cip->metrics.leftSideBearing); l++) { -- if (maskTab[l & 7] & row[l >> 3]) -+ if (maskTab[l & 7] & (((int *)row)[l >> 3])) - putchar('X'); - else - putchar('.'); diff --git a/debian/patches/series b/debian/patches/series index 0c9d34366..76709c4ad 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -990_fix-DEBUG-and-TEST-builds.full.patch 991_fix-hr-typos.full+lite.patch 991_fix-hr-typos.full.patch 999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index b66fe23bd..193f5558c 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -2203,7 +2203,7 @@ dump_char_ascii(CharInfoPtr cip) byte = 0; for (l = 0; l <= (cip->metrics.rightSideBearing - cip->metrics.leftSideBearing); l++) { - if (maskTab[l & 7] & row[l >> 3]) + if (maskTab[l & 7] & (((int*)row)[l >> 3])) putchar('X'); else putchar('.'); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 41a1ec02e..c5fd06352 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -1678,10 +1678,11 @@ FIXME: Is this useful or just a waste of bandwidth? #ifdef TEST - fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n", - (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - pSrc -> pDrawable -> width, pSrc -> pDrawable -> height); - + if (pSrc->pDrawable) { + fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n", + (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + pSrc -> pDrawable -> width, pSrc -> pDrawable -> height); + } if (pSrc ->pDrawable != pDst -> pDrawable) { fprintf(stderr, "nxagentTrapezoids: Destination is a [%s] of geometry [%d,%d].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c index f18c09fe4..3d9ee8c7f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c @@ -735,7 +735,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio client->sequence++; #ifdef DEBUG - if (client->requestLogIndex == MAX_REQUEST_LOG) + if ((client->requestLogIndex >= MAX_REQUEST_LOG) || (client->requestLogIndex <= 0)) client->requestLogIndex = 0; client->requestLog[client->requestLogIndex] = MAJOROP; client->requestLogIndex++; diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c index 3234c9929..2b642692f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c @@ -2351,7 +2351,7 @@ dump_char_ascii(CharInfoPtr cip) byte = 0; for (l = 0; l <= (cip->metrics.rightSideBearing - cip->metrics.leftSideBearing); l++) { - if (maskTab[l & 7] & row[l >> 3]) + if (maskTab[l & 7] & (((int *)row)[l >> 3])) putchar('X'); else putchar('.'); -- cgit v1.2.3 From 23fb617551f7d89dbc1fc9e216b7f12d2936e1a2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 13 Feb 2015 13:43:54 +0100 Subject: Fix several typos in nxcomp. Former patch file names: 991_fix-hr-typos.full+lite.patch 991_fix-hr-typos.full.patch --- debian/patches/991_fix-hr-typos.full+lite.patch | 97 ----------------------- debian/patches/991_fix-hr-typos.full.patch | 36 --------- debian/patches/series | 2 - nx-X11/ChangeLog.X.org | 2 +- nx-X11/extras/Mesa/src/mesa/main/debug.c | 2 +- nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c | 2 +- nxcomp/CHANGELOG | 2 +- nxcomp/ClientReadBuffer.cpp | 2 +- nxcomp/EncodeBuffer.cpp | 4 +- nxcomp/GenericChannel.cpp | 2 +- nxcomp/ProxyReadBuffer.cpp | 2 +- nxcomp/ServerReadBuffer.cpp | 2 +- nxcomp/Transport.h | 2 +- nxcomp/Types.h | 2 +- 14 files changed, 12 insertions(+), 147 deletions(-) delete mode 100644 debian/patches/991_fix-hr-typos.full+lite.patch delete mode 100644 debian/patches/991_fix-hr-typos.full.patch (limited to 'debian') diff --git a/debian/patches/991_fix-hr-typos.full+lite.patch b/debian/patches/991_fix-hr-typos.full+lite.patch deleted file mode 100644 index 4ff18462e..000000000 --- a/debian/patches/991_fix-hr-typos.full+lite.patch +++ /dev/null @@ -1,97 +0,0 @@ -Description: Fix several typos in nxcomp -Author: Mike Gabriel - ---- a/nxcomp/CHANGELOG -+++ b/nxcomp/CHANGELOG -@@ -668,7 +668,7 @@ - - nxcomp-2.0.0-69 - --- Changed the format of the persistent cache to accomodate the new -+- Changed the format of the persistent cache to accommodate the new - encoding of the render opcodes. Caches from the 1.4.0 and 1.5.0 - should be still loaded and saved correctly when connected to and - old version of the library. ---- a/nxcomp/ClientReadBuffer.cpp -+++ b/nxcomp/ClientReadBuffer.cpp -@@ -29,7 +29,7 @@ - // - // Even if the pending data is not - // enough to make a complete message, -- // resize the buffer to accomodate -+ // resize the buffer to accommodate - // it all. - // - ---- a/nxcomp/EncodeBuffer.cpp -+++ b/nxcomp/EncodeBuffer.cpp -@@ -505,12 +505,12 @@ - { - #ifdef PANIC - *logofs << "EncodeBuffer: PANIC! Error in context [C] " -- << "growing buffer to accomodate " << numBytes -+ << "growing buffer to accommodate " << numBytes - << " bytes .\n" << logofs_flush; - #endif - - cerr << "Error" << ": Error in context [C] " -- << "growing encode buffer to accomodate " -+ << "growing encode buffer to accommodate " - << numBytes << " bytes.\n"; - - HandleAbort(); ---- a/nxcomp/GenericChannel.cpp -+++ b/nxcomp/GenericChannel.cpp -@@ -210,7 +210,7 @@ - // All data has been read from the read buffer. - // We still need to mark the end of the encode - // buffer just before sending the frame. This -- // allows us to accomodate multiple reads in -+ // allows us to accommodate multiple reads in - // a single frame. - // - ---- a/nxcomp/ProxyReadBuffer.cpp -+++ b/nxcomp/ProxyReadBuffer.cpp -@@ -50,7 +50,7 @@ - // - // Even if the readable data is not - // enough to make a complete message, -- // resize the buffer to accomodate -+ // resize the buffer to accommodate - // it all. - // - ---- a/nxcomp/ServerReadBuffer.cpp -+++ b/nxcomp/ServerReadBuffer.cpp -@@ -46,7 +46,7 @@ - // - // Even if the readable data is not - // enough to make a complete message, -- // resize the buffer to accomodate -+ // resize the buffer to accommodate - // it all. - // - ---- a/nxcomp/Transport.h -+++ b/nxcomp/Transport.h -@@ -226,7 +226,7 @@ - protected: - - // -- // Make room in the buffer to accomodate -+ // Make room in the buffer to accommodate - // at least size bytes. - // - ---- a/nxcomp/Types.h -+++ b/nxcomp/Types.h -@@ -179,7 +179,7 @@ - typedef list < int > T_list; - - // --// Used to accomodate data to be read and -+// Used to accommodate data to be read and - // written to a socket. - // - diff --git a/debian/patches/991_fix-hr-typos.full.patch b/debian/patches/991_fix-hr-typos.full.patch deleted file mode 100644 index 3836adf55..000000000 --- a/debian/patches/991_fix-hr-typos.full.patch +++ /dev/null @@ -1,36 +0,0 @@ -Description: Fix several typos in nx-X11 -Author: Mike Gabriel - ---- a/nx-X11/extras/Mesa/src/mesa/main/debug.c -+++ b/nx-X11/extras/Mesa/src/mesa/main/debug.c -@@ -43,7 +43,7 @@ - "GL_QUAD_STRIP", - "GL_POLYGON", - "outside begin/end", -- "inside unkown primitive", -+ "inside unknown primitive", - "unknown state" - }; - ---- a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c -+++ b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c -@@ -4106,7 +4106,7 @@ - if (*inst++ != REVISION) { - _mesa_set_program_error (ctx, 0, "Grammar version mismatch"); - _mesa_error(ctx, GL_INVALID_OPERATION, -- "glProgramStringARB(Grammar verison mismatch)"); -+ "glProgramStringARB(Grammar version mismatch)"); - err = GL_TRUE; - } - else { ---- a/nx-X11/ChangeLog.X.org -+++ b/nx-X11/ChangeLog.X.org -@@ -12733,7 +12733,7 @@ - * programs/xkill/xkill.c: (get_window_id): - Changed cursor for the 'kill' action from XC_draped_box to - XC_Pirate. If you don't like it we can change it back -- (original author unkown). -+ (original author unknown). - - * programs/xman/vendor.h: - Added 'pic' to the man page rendering command pipeline diff --git a/debian/patches/series b/debian/patches/series index 76709c4ad..3ee62f39c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,4 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -991_fix-hr-typos.full+lite.patch -991_fix-hr-typos.full.patch 999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch 016_nx-X11_install-location.debian.patch 102_xserver-xext_set-securitypolicy-path.debian.patch diff --git a/nx-X11/ChangeLog.X.org b/nx-X11/ChangeLog.X.org index bb0bbb0fb..5c49bba13 100644 --- a/nx-X11/ChangeLog.X.org +++ b/nx-X11/ChangeLog.X.org @@ -12733,7 +12733,7 @@ Mon Jan 3 12:45:10 2005 Søren Sandmann * programs/xkill/xkill.c: (get_window_id): Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If you don't like it we can change it back - (original author unkown). + (original author unknown). * programs/xman/vendor.h: Added 'pic' to the man page rendering command pipeline diff --git a/nx-X11/extras/Mesa/src/mesa/main/debug.c b/nx-X11/extras/Mesa/src/mesa/main/debug.c index edc32b1f9..43b119239 100644 --- a/nx-X11/extras/Mesa/src/mesa/main/debug.c +++ b/nx-X11/extras/Mesa/src/mesa/main/debug.c @@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4] = { "GL_QUAD_STRIP", "GL_POLYGON", "outside begin/end", - "inside unkown primitive", + "inside unknown primitive", "unknown state" }; diff --git a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c index ed1cbd908..c998f7c66 100644 --- a/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c +++ b/nx-X11/extras/Mesa/src/mesa/shader/arbprogparse.c @@ -4106,7 +4106,7 @@ _mesa_parse_arb_program (GLcontext * ctx, const GLubyte * str, GLsizei len, if (*inst++ != REVISION) { _mesa_set_program_error (ctx, 0, "Grammar version mismatch"); _mesa_error(ctx, GL_INVALID_OPERATION, - "glProgramStringARB(Grammar verison mismatch)"); + "glProgramStringARB(Grammar version mismatch)"); err = GL_TRUE; } else { diff --git a/nxcomp/CHANGELOG b/nxcomp/CHANGELOG index b7ef0d97a..b0323d4a7 100644 --- a/nxcomp/CHANGELOG +++ b/nxcomp/CHANGELOG @@ -668,7 +668,7 @@ nxcomp-2.0.0-70 nxcomp-2.0.0-69 -- Changed the format of the persistent cache to accomodate the new +- Changed the format of the persistent cache to accommodate the new encoding of the render opcodes. Caches from the 1.4.0 and 1.5.0 should be still loaded and saved correctly when connected to and old version of the library. diff --git a/nxcomp/ClientReadBuffer.cpp b/nxcomp/ClientReadBuffer.cpp index b32033b17..14aca3240 100644 --- a/nxcomp/ClientReadBuffer.cpp +++ b/nxcomp/ClientReadBuffer.cpp @@ -29,7 +29,7 @@ unsigned int ClientReadBuffer::suggestedLength(unsigned int pendingLength) // // Even if the pending data is not // enough to make a complete message, - // resize the buffer to accomodate + // resize the buffer to accommodate // it all. // diff --git a/nxcomp/EncodeBuffer.cpp b/nxcomp/EncodeBuffer.cpp index 466a1d7a0..12a57180e 100644 --- a/nxcomp/EncodeBuffer.cpp +++ b/nxcomp/EncodeBuffer.cpp @@ -505,12 +505,12 @@ void EncodeBuffer::growBuffer(unsigned int numBytes) { #ifdef PANIC *logofs << "EncodeBuffer: PANIC! Error in context [C] " - << "growing buffer to accomodate " << numBytes + << "growing buffer to accommodate " << numBytes << " bytes .\n" << logofs_flush; #endif cerr << "Error" << ": Error in context [C] " - << "growing encode buffer to accomodate " + << "growing encode buffer to accommodate " << numBytes << " bytes.\n"; HandleAbort(); diff --git a/nxcomp/GenericChannel.cpp b/nxcomp/GenericChannel.cpp index 641ad36d4..bf72bf091 100644 --- a/nxcomp/GenericChannel.cpp +++ b/nxcomp/GenericChannel.cpp @@ -210,7 +210,7 @@ int GenericChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char * // All data has been read from the read buffer. // We still need to mark the end of the encode // buffer just before sending the frame. This - // allows us to accomodate multiple reads in + // allows us to accommodate multiple reads in // a single frame. // diff --git a/nxcomp/ProxyReadBuffer.cpp b/nxcomp/ProxyReadBuffer.cpp index b0de14921..99c3cbaa2 100644 --- a/nxcomp/ProxyReadBuffer.cpp +++ b/nxcomp/ProxyReadBuffer.cpp @@ -50,7 +50,7 @@ unsigned int ProxyReadBuffer::suggestedLength(unsigned int pendingLength) // // Even if the readable data is not // enough to make a complete message, - // resize the buffer to accomodate + // resize the buffer to accommodate // it all. // diff --git a/nxcomp/ServerReadBuffer.cpp b/nxcomp/ServerReadBuffer.cpp index 53c1dec57..96c146b77 100644 --- a/nxcomp/ServerReadBuffer.cpp +++ b/nxcomp/ServerReadBuffer.cpp @@ -46,7 +46,7 @@ unsigned int ServerReadBuffer::suggestedLength(unsigned int pendingLength) // // Even if the readable data is not // enough to make a complete message, - // resize the buffer to accomodate + // resize the buffer to accommodate // it all. // diff --git a/nxcomp/Transport.h b/nxcomp/Transport.h index 2f313b29f..a2efa5270 100644 --- a/nxcomp/Transport.h +++ b/nxcomp/Transport.h @@ -226,7 +226,7 @@ class Transport protected: // - // Make room in the buffer to accomodate + // Make room in the buffer to accommodate // at least size bytes. // diff --git a/nxcomp/Types.h b/nxcomp/Types.h index b3fe40e31..b7506124e 100644 --- a/nxcomp/Types.h +++ b/nxcomp/Types.h @@ -179,7 +179,7 @@ typedef set < File *, T_older > T_files; typedef list < int > T_list; // -// Used to accomodate data to be read and +// Used to accommodate data to be read and // written to a socket. // -- cgit v1.2.3 From 1fd8551f1632efbc2655c9293087bba08cf2f0c9 Mon Sep 17 00:00:00 2001 From: Oleksandr Shneyder Date: Fri, 13 Feb 2015 13:57:39 +0100 Subject: Unbrand NX Agent Startup Screen / Brand X2Go Agent Startup Screen (999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch). When launched with NX Agent flavour, the startup screen gets unbranded by this patch (the !M logo does not get shown). When launched with X2Go Agent flavour, the startup screen gets branded with the X2GO logo. --- ...gent_unbrand-nxagent-brand-x2goagent.full.patch | 367 --------------------- debian/patches/series | 1 - nx-X11/programs/Xserver/hw/nxagent/Display.c | 40 +-- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 18 +- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 162 ++++++--- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 1 + nx-X11/programs/Xserver/os/oscolor.c | 14 +- 7 files changed, 158 insertions(+), 445 deletions(-) delete mode 100644 debian/patches/999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch (limited to 'debian') diff --git a/debian/patches/999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch b/debian/patches/999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch deleted file mode 100644 index 62c85cfb2..000000000 --- a/debian/patches/999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch +++ /dev/null @@ -1,367 +0,0 @@ -Description: Unbrand NX Agent Startup Screen / Brand X2Go Agent Startup Screen - When launched with NX Agent flavour, the startup screen gets unbranded by - this patch (the !M logo does not get shown). - . - When launched with X2Go Agent flavour, the startup screen gets branded - with the X2GO logo. -Forwarded: not-needed -Author: Oleksandr Shneyder -Last-Update: 2012-01-11 ---- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c -@@ -35,6 +35,7 @@ - #include "Windows.h" - #include "Atoms.h" - #include "Trap.h" -+#include "Init.h" - - /* - * Set here the required log level. -@@ -53,6 +54,7 @@ - int nxagentLogoWhite; - int nxagentLogoRed; - int nxagentLogoBlack; -+int nxagentLogoGray; - - void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); - -@@ -166,6 +168,15 @@ - XPoint m[12]; - int w, h, c, w2, h2; - -+ /* -+ * Show only X2GO Logo when running as X2Go Agent -+ */ -+ if(! nxagentX2go) -+ { -+ nxagentPixmapLogo = 0L; -+ return; -+ } -+ - #ifdef DEBUG - fprintf(stderr, "nxagenShowtLogo: Got called.\n"); - #endif -@@ -218,75 +229,146 @@ - XSetForeground(nxagentDisplay, gc, nxagentLogoRed); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); - -- rect[0].x = w2-10*c; rect[0].y = h2-8*c; -- rect[1].x = w2-10*c; rect[1].y = h2+8*c; -- rect[2].x = w2+10*c; rect[2].y = h2+8*c; -- rect[3].x = w2+10*c; rect[3].y = h2-8*c; -+ /* -+ * Draw X2GO Logo -+ */ - -+ /* -+ * Begin 'X'. -+ */ -+ -+ XSetForeground(nxagentDisplay, gc, nxagentLogoGray); -+ XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); -+ rect[0].x = w2-7*c; rect[0].y = h2-5*c; -+ rect[1].x = w2-8*c; rect[1].y = h2-5*c; -+ rect[2].x = w2-4*c; rect[2].y = h2+3*c; -+ rect[3].x = w2-3*c; rect[3].y = h2+3*c; - XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -- #ifdef NXAGENT_LOGO_DEBUG -- fprintf(stderr, "filled red rect\n"); -- #endif -+ rect[0].x = w2-4*c; rect[0].y = h2-5*c; -+ rect[1].x = w2-3*c; rect[1].y = h2-5*c; -+ rect[2].x = w2-7*c; rect[2].y = h2+3*c; -+ rect[3].x = w2-8*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -- rect[0].x = w2-9*c; rect[0].y = h2-7*c; -- rect[1].x = w2-9*c; rect[1].y = h2+7*c; -- rect[2].x = w2+9*c; rect[2].y = h2+7*c; -- rect[3].x = w2+9*c; rect[3].y = h2-7*c; -+ /* -+ * End 'X'. -+ */ - -- XSetForeground(nxagentDisplay, gc, nxagentLogoWhite); -- XSetBackground(nxagentDisplay, gc, nxagentLogoRed); -+ /* -+ * Start '2'. -+ */ -+ -+ rect[0].x = w2-2*c; rect[0].y = h2-5*c; -+ rect[1].x = w2-1*c; rect[1].y = h2-5*c; -+ rect[2].x = w2-1*c; rect[2].y = h2-3*c; -+ rect[3].x = w2-2*c; rect[3].y = h2-3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); -+ -+ rect[0].x = w2-2*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+2*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+2*c; rect[2].y = h2-4*c; -+ rect[3].x = w2-2*c; rect[3].y = h2-4*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -+ rect[0].x = w2+1*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+2*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+2*c; rect[2].y = h2-2*c; -+ rect[3].x = w2+1*c; rect[3].y = h2-2*c; - XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -+ rect[0].x = w2+2*c; rect[0].y = h2-2*c; -+ rect[1].x = w2+1*c; rect[1].y = h2-2*c; -+ rect[2].x = w2-2*c; rect[2].y = h2+2*c; -+ rect[3].x = w2-1*c; rect[3].y = h2+2*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); -+ -+ -+ rect[0].x = w2-2*c; rect[0].y = h2+2*c; -+ rect[1].x = w2+2*c; rect[1].y = h2+2*c; -+ rect[2].x = w2+2*c; rect[2].y = h2+3*c; -+ rect[3].x = w2-2*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - /* -- * Begin 'M'. -+ * End '2'. - */ - -- m[0].x = w2-3*c; m[0].y = h2-5*c; -- m[1].x = w2+7*c; m[1].y = h2-5*c; -- m[2].x = w2+7*c; m[2].y = h2+5*c; -- m[3].x = w2+5*c; m[3].y = h2+5*c; -- m[4].x = w2+5*c; m[4].y = h2-3*c; -- m[5].x = w2+3*c; m[5].y = h2-3*c; -- m[6].x = w2+3*c; m[6].y = h2+5*c; -- m[7].x = w2+1*c; m[7].y = h2+5*c; -- m[8].x = w2+1*c; m[8].y = h2-3*c; -- m[9].x = w2-1*c; m[9].y = h2-3*c; -- m[10].x = w2-1*c; m[10].y = h2+5*c; -- m[11].x = w2-3*c; m[11].y = h2+5*c; -+ /* -+ * Start 'G'. -+ */ - -- XSetForeground(nxagentDisplay, gc, nxagentLogoRed); -- XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); -+ rect[0].x = w2+3*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+7*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+7*c; rect[2].y = h2-4*c; -+ rect[3].x = w2+3*c; rect[3].y = h2-4*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -- XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, m, 12, Nonconvex, CoordModeOrigin); -+ rect[0].x = w2+3*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+4*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+4*c; rect[2].y = h2+3*c; -+ rect[3].x = w2+3*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -+ rect[0].x = w2+3*c; rect[0].y = h2+2*c; -+ rect[1].x = w2+7*c; rect[1].y = h2+2*c; -+ rect[2].x = w2+7*c; rect[2].y = h2+3*c; -+ rect[3].x = w2+3*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); -+ -+ rect[0].x = w2+6*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+7*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+7*c; rect[2].y = h2-3*c; -+ rect[3].x = w2+6*c; rect[3].y = h2-3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); -+ -+ rect[0].x = w2+6*c; rect[0].y = h2-0*c; -+ rect[1].x = w2+7*c; rect[1].y = h2-0*c; -+ rect[2].x = w2+7*c; rect[2].y = h2+3*c; -+ rect[3].x = w2+6*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); -+ -+ rect[0].x = w2+5*c; rect[0].y = h2-1*c; -+ rect[1].x = w2+7*c; rect[1].y = h2-1*c; -+ rect[2].x = w2+7*c; rect[2].y = h2+0*c; -+ rect[3].x = w2+5*c; rect[3].y = h2+0*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - /* -- * End 'M'. -+ * End 'G'. - */ - - /* -- * Begin '!'. -+ * Start 'O'. - */ - -- rect[0].x = w2-7*c; rect[0].y = h2-5*c; -- rect[1].x = w2-5*c; rect[1].y = h2-5*c; -- rect[2].x = w2-5*c; rect[2].y = h2+2*c; -- rect[3].x = w2-7*c; rect[3].y = h2+2*c; -+ rect[0].x = w2+8*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+12*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+12*c; rect[2].y = h2-4*c; -+ rect[3].x = w2+8*c; rect[3].y = h2-4*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -+ rect[0].x = w2+8*c; rect[0].y = h2+3*c; -+ rect[1].x = w2+12*c; rect[1].y = h2+3*c; -+ rect[2].x = w2+12*c; rect[2].y = h2+2*c; -+ rect[3].x = w2+8*c; rect[3].y = h2+2*c; - XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -- rect[0].x = w2-7*c; rect[0].y = h2+3*c; -- rect[1].x = w2-5*c; rect[1].y = h2+3*c; -- rect[2].x = w2-5*c; rect[2].y = h2+5*c; -- rect[3].x = w2-7*c; rect[3].y = h2+5*c; -+ rect[0].x = w2+8*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+9*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+9*c; rect[2].y = h2+3*c; -+ rect[3].x = w2+8*c; rect[3].y = h2+3*c; -+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - -+ rect[0].x = w2+11*c; rect[0].y = h2-5*c; -+ rect[1].x = w2+12*c; rect[1].y = h2-5*c; -+ rect[2].x = w2+12*c; rect[2].y = h2+3*c; -+ rect[3].x = w2+11*c; rect[3].y = h2+3*c; - XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - - /* -- * End 'M'. -+ * End 'O'. - */ - -+ - XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo); - - #ifdef NXAGENT_LOGO_DEBUG ---- a/nx-X11/programs/Xserver/hw/nxagent/Display.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c -@@ -1430,22 +1430,10 @@ - g = pV.green_mask; - b = pV.blue_mask; - -- if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) -- { -- nxagentLogoBlack = 0x000000; -- nxagentLogoRed = 0xff0000; -- nxagentLogoWhite = 0xffffff; -- } -- else -- { -- for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); -- for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); -- for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); -- -- nxagentLogoRed = nxagentLogoColor(0xff0000); -- nxagentLogoBlack = nxagentLogoColor(0x000000); -- nxagentLogoWhite = 0xffffff; -- } -+ nxagentLogoBlack = 0x000000; -+ nxagentLogoRed = 0xff0000; -+ nxagentLogoWhite = 0xffffff; -+ nxagentLogoGray = 0x222222; - - #ifdef WATCH - -@@ -2696,22 +2684,10 @@ - g = pV.green_mask; - b = pV.blue_mask; - -- if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) -- { -- nxagentLogoBlack = 0x000000; -- nxagentLogoRed = 0xff0000; -- nxagentLogoWhite = 0xffffff; -- } -- else -- { -- for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); -- for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); -- for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); -- -- nxagentLogoRed = nxagentLogoColor(0xff0000); -- nxagentLogoBlack = nxagentLogoColor(0x000000); -- nxagentLogoWhite = 0xffffff; -- } -+ nxagentLogoBlack = 0x000000; -+ nxagentLogoRed = 0xff0000; -+ nxagentLogoWhite = 0xffffff; -+ nxagentLogoGray = 0x222222; - - useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); - ---- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h -@@ -33,6 +33,7 @@ - extern int nxagentLogoWhite; - extern int nxagentLogoRed; - extern int nxagentLogoBlack; -+extern int nxagentLogoGray; - - extern Window nxagentSplashWindow; - ---- a/nx-X11/programs/Xserver/os/oscolor.c -+++ b/nx-X11/programs/Xserver/os/oscolor.c -@@ -53,7 +53,19 @@ - #include - #include - --static char* nxAltRgbPaths[] = {"/etc/nxagent/rgb", "/usr/share/nx/rgb", "/usr/local/share/nx/rgb", "/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; -+/* FIXME: we need more intelligent code (like provided by the nxagentX2go -+ * var in hw/nxagent/Init.h) to detect our current runtime mode (running -+ * as x2goagent, running as nxagent) -+ */ -+static char* nxAltRgbPaths[] = {"/etc/x2go/rgb", \ -+ "/usr/share/x2go/rgb", \ -+ "/usr/local/share/x2go/rgb", \ -+ "/etc/nxagent/rgb", \ -+ "/usr/share/nx/rgb", \ -+ "/usr/local/share/nx/rgb", \ -+ "/usr/NX/share/rgb", \ -+ "/usr/share/X11/rgb", \ -+ "/etc/X11/rgb"}; - static char _NXRgbPath[1024]; - - #endif ---- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -@@ -62,6 +62,7 @@ - - #include "globals.h" - #include "property.h" -+#include "Init.h" - - #include - -@@ -138,8 +139,11 @@ - #ifndef XKB_ALTERNATE_BASE_DIRECTORY - #define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" - #endif --#ifndef XKB_CONFIG_FILE --#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard" -+#ifndef XKB_CONFIG_FILE_NX -+#define XKB_CONFIG_FILE_NX "/etc/nxagent/nxagent.keyboard" -+#endif -+#ifndef XKB_CONFIG_FILE_X2GO -+#define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard" - #endif - #ifndef XKB_DFLT_RULES_FILE - #define XKB_DFLT_RULES_FILE "xfree86" -@@ -988,7 +992,10 @@ - - XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); - -- nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE); -+ if (nxagentX2go) -+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); -+ else -+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); - - nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char)); - -@@ -997,7 +1004,10 @@ - FatalError("nxagentKeyboardProc: malloc failed."); - } - -- strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); -+ if (nxagentX2go) -+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); -+ else -+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); - - #ifdef TEST - fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n", diff --git a/debian/patches/series b/debian/patches/series index 3ee62f39c..1a9405986 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch -999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch 016_nx-X11_install-location.debian.patch 102_xserver-xext_set-securitypolicy-path.debian.patch diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 201d9dd74..b01d66cb0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1430,22 +1430,10 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. g = pV.green_mask; b = pV.blue_mask; - if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) - { - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - } - else - { - for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); - for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); - for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); - - nxagentLogoRed = nxagentLogoColor(0xff0000); - nxagentLogoBlack = nxagentLogoColor(0x000000); - nxagentLogoWhite = 0xffffff; - } + nxagentLogoBlack = 0x000000; + nxagentLogoRed = 0xff0000; + nxagentLogoWhite = 0xffffff; + nxagentLogoGray = 0x222222; #ifdef WATCH @@ -2696,22 +2684,10 @@ Bool nxagentReconnectDisplay(void *p0) g = pV.green_mask; b = pV.blue_mask; - if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) - { - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - } - else - { - for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); - for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); - for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); - - nxagentLogoRed = nxagentLogoColor(0xff0000); - nxagentLogoBlack = nxagentLogoColor(0x000000); - nxagentLogoWhite = 0xffffff; - } + nxagentLogoBlack = 0x000000; + nxagentLogoRed = 0xff0000; + nxagentLogoWhite = 0xffffff; + nxagentLogoGray = 0x222222; useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 1637f0c4c..a51d19e81 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -62,6 +62,7 @@ is" without express or implied warranty. #include "globals.h" #include "property.h" +#include "Init.h" #include @@ -138,8 +139,11 @@ extern Status XkbGetControls( #ifndef XKB_ALTERNATE_BASE_DIRECTORY #define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb" #endif -#ifndef XKB_CONFIG_FILE -#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard" +#ifndef XKB_CONFIG_FILE_NX +#define XKB_CONFIG_FILE_NX "/etc/nxagent/nxagent.keyboard" +#endif +#ifndef XKB_CONFIG_FILE_X2GO +#define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard" #endif #ifndef XKB_DFLT_RULES_FILE #define XKB_DFLT_RULES_FILE "xfree86" @@ -988,7 +992,10 @@ XkbError: XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); - nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE); + if (nxagentX2go) + nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); + else + nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char)); @@ -997,7 +1004,10 @@ XkbError: FatalError("nxagentKeyboardProc: malloc failed."); } - strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE); + if (nxagentX2go) + nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); + else + nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 235c48c23..abb0872d1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -35,6 +35,7 @@ #include "Windows.h" #include "Atoms.h" #include "Trap.h" +#include "Init.h" /* * Set here the required log level. @@ -53,6 +54,7 @@ int nxagentLogoDepth; int nxagentLogoWhite; int nxagentLogoRed; int nxagentLogoBlack; +int nxagentLogoGray; void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -166,6 +168,15 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XPoint m[12]; int w, h, c, w2, h2; + /* + * Show only X2GO Logo when running as X2Go Agent + */ + if(! nxagentX2go) + { + nxagentPixmapLogo = 0L; + return; + } + #ifdef DEBUG fprintf(stderr, "nxagenShowtLogo: Got called.\n"); #endif @@ -218,75 +229,146 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XSetForeground(nxagentDisplay, gc, nxagentLogoRed); XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); - rect[0].x = w2-10*c; rect[0].y = h2-8*c; - rect[1].x = w2-10*c; rect[1].y = h2+8*c; - rect[2].x = w2+10*c; rect[2].y = h2+8*c; - rect[3].x = w2+10*c; rect[3].y = h2-8*c; + /* + * Draw X2GO Logo + */ + /* + * Begin 'X'. + */ + + XSetForeground(nxagentDisplay, gc, nxagentLogoGray); + XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); + rect[0].x = w2-7*c; rect[0].y = h2-5*c; + rect[1].x = w2-8*c; rect[1].y = h2-5*c; + rect[2].x = w2-4*c; rect[2].y = h2+3*c; + rect[3].x = w2-3*c; rect[3].y = h2+3*c; XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "filled red rect\n"); - #endif + rect[0].x = w2-4*c; rect[0].y = h2-5*c; + rect[1].x = w2-3*c; rect[1].y = h2-5*c; + rect[2].x = w2-7*c; rect[2].y = h2+3*c; + rect[3].x = w2-8*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - rect[0].x = w2-9*c; rect[0].y = h2-7*c; - rect[1].x = w2-9*c; rect[1].y = h2+7*c; - rect[2].x = w2+9*c; rect[2].y = h2+7*c; - rect[3].x = w2+9*c; rect[3].y = h2-7*c; + /* + * End 'X'. + */ - XSetForeground(nxagentDisplay, gc, nxagentLogoWhite); - XSetBackground(nxagentDisplay, gc, nxagentLogoRed); + /* + * Start '2'. + */ + + rect[0].x = w2-2*c; rect[0].y = h2-5*c; + rect[1].x = w2-1*c; rect[1].y = h2-5*c; + rect[2].x = w2-1*c; rect[2].y = h2-3*c; + rect[3].x = w2-2*c; rect[3].y = h2-3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + + rect[0].x = w2-2*c; rect[0].y = h2-5*c; + rect[1].x = w2+2*c; rect[1].y = h2-5*c; + rect[2].x = w2+2*c; rect[2].y = h2-4*c; + rect[3].x = w2-2*c; rect[3].y = h2-4*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + rect[0].x = w2+1*c; rect[0].y = h2-5*c; + rect[1].x = w2+2*c; rect[1].y = h2-5*c; + rect[2].x = w2+2*c; rect[2].y = h2-2*c; + rect[3].x = w2+1*c; rect[3].y = h2-2*c; XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + rect[0].x = w2+2*c; rect[0].y = h2-2*c; + rect[1].x = w2+1*c; rect[1].y = h2-2*c; + rect[2].x = w2-2*c; rect[2].y = h2+2*c; + rect[3].x = w2-1*c; rect[3].y = h2+2*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + + + rect[0].x = w2-2*c; rect[0].y = h2+2*c; + rect[1].x = w2+2*c; rect[1].y = h2+2*c; + rect[2].x = w2+2*c; rect[2].y = h2+3*c; + rect[3].x = w2-2*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); /* - * Begin 'M'. + * End '2'. */ - m[0].x = w2-3*c; m[0].y = h2-5*c; - m[1].x = w2+7*c; m[1].y = h2-5*c; - m[2].x = w2+7*c; m[2].y = h2+5*c; - m[3].x = w2+5*c; m[3].y = h2+5*c; - m[4].x = w2+5*c; m[4].y = h2-3*c; - m[5].x = w2+3*c; m[5].y = h2-3*c; - m[6].x = w2+3*c; m[6].y = h2+5*c; - m[7].x = w2+1*c; m[7].y = h2+5*c; - m[8].x = w2+1*c; m[8].y = h2-3*c; - m[9].x = w2-1*c; m[9].y = h2-3*c; - m[10].x = w2-1*c; m[10].y = h2+5*c; - m[11].x = w2-3*c; m[11].y = h2+5*c; + /* + * Start 'G'. + */ - XSetForeground(nxagentDisplay, gc, nxagentLogoRed); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); + rect[0].x = w2+3*c; rect[0].y = h2-5*c; + rect[1].x = w2+7*c; rect[1].y = h2-5*c; + rect[2].x = w2+7*c; rect[2].y = h2-4*c; + rect[3].x = w2+3*c; rect[3].y = h2-4*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, m, 12, Nonconvex, CoordModeOrigin); + rect[0].x = w2+3*c; rect[0].y = h2-5*c; + rect[1].x = w2+4*c; rect[1].y = h2-5*c; + rect[2].x = w2+4*c; rect[2].y = h2+3*c; + rect[3].x = w2+3*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + rect[0].x = w2+3*c; rect[0].y = h2+2*c; + rect[1].x = w2+7*c; rect[1].y = h2+2*c; + rect[2].x = w2+7*c; rect[2].y = h2+3*c; + rect[3].x = w2+3*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + + rect[0].x = w2+6*c; rect[0].y = h2-5*c; + rect[1].x = w2+7*c; rect[1].y = h2-5*c; + rect[2].x = w2+7*c; rect[2].y = h2-3*c; + rect[3].x = w2+6*c; rect[3].y = h2-3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + + rect[0].x = w2+6*c; rect[0].y = h2-0*c; + rect[1].x = w2+7*c; rect[1].y = h2-0*c; + rect[2].x = w2+7*c; rect[2].y = h2+3*c; + rect[3].x = w2+6*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + + rect[0].x = w2+5*c; rect[0].y = h2-1*c; + rect[1].x = w2+7*c; rect[1].y = h2-1*c; + rect[2].x = w2+7*c; rect[2].y = h2+0*c; + rect[3].x = w2+5*c; rect[3].y = h2+0*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); /* - * End 'M'. + * End 'G'. */ /* - * Begin '!'. + * Start 'O'. */ - rect[0].x = w2-7*c; rect[0].y = h2-5*c; - rect[1].x = w2-5*c; rect[1].y = h2-5*c; - rect[2].x = w2-5*c; rect[2].y = h2+2*c; - rect[3].x = w2-7*c; rect[3].y = h2+2*c; + rect[0].x = w2+8*c; rect[0].y = h2-5*c; + rect[1].x = w2+12*c; rect[1].y = h2-5*c; + rect[2].x = w2+12*c; rect[2].y = h2-4*c; + rect[3].x = w2+8*c; rect[3].y = h2-4*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + rect[0].x = w2+8*c; rect[0].y = h2+3*c; + rect[1].x = w2+12*c; rect[1].y = h2+3*c; + rect[2].x = w2+12*c; rect[2].y = h2+2*c; + rect[3].x = w2+8*c; rect[3].y = h2+2*c; XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); - rect[0].x = w2-7*c; rect[0].y = h2+3*c; - rect[1].x = w2-5*c; rect[1].y = h2+3*c; - rect[2].x = w2-5*c; rect[2].y = h2+5*c; - rect[3].x = w2-7*c; rect[3].y = h2+5*c; + rect[0].x = w2+8*c; rect[0].y = h2-5*c; + rect[1].x = w2+9*c; rect[1].y = h2-5*c; + rect[2].x = w2+9*c; rect[2].y = h2+3*c; + rect[3].x = w2+8*c; rect[3].y = h2+3*c; + XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); + rect[0].x = w2+11*c; rect[0].y = h2-5*c; + rect[1].x = w2+12*c; rect[1].y = h2-5*c; + rect[2].x = w2+12*c; rect[2].y = h2+3*c; + rect[3].x = w2+11*c; rect[3].y = h2+3*c; XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); /* - * End 'M'. + * End 'O'. */ + XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo); #ifdef NXAGENT_LOGO_DEBUG diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index f7ba6c2e2..39becaa3d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -33,6 +33,7 @@ extern int nxagentLogoDepth; extern int nxagentLogoWhite; extern int nxagentLogoRed; extern int nxagentLogoBlack; +extern int nxagentLogoGray; extern Window nxagentSplashWindow; diff --git a/nx-X11/programs/Xserver/os/oscolor.c b/nx-X11/programs/Xserver/os/oscolor.c index d18e7b647..e8692a92c 100644 --- a/nx-X11/programs/Xserver/os/oscolor.c +++ b/nx-X11/programs/Xserver/os/oscolor.c @@ -53,7 +53,19 @@ SOFTWARE. #include #include -static char* nxAltRgbPaths[] = {"/etc/nxagent/rgb", "/usr/share/nx/rgb", "/usr/local/share/nx/rgb", "/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"}; +/* FIXME: we need more intelligent code (like provided by the nxagentX2go + * var in hw/nxagent/Init.h) to detect our current runtime mode (running + * as x2goagent, running as nxagent) + */ +static char* nxAltRgbPaths[] = {"/etc/x2go/rgb", \ + "/usr/share/x2go/rgb", \ + "/usr/local/share/x2go/rgb", \ + "/etc/nxagent/rgb", \ + "/usr/share/nx/rgb", \ + "/usr/local/share/nx/rgb", \ + "/usr/NX/share/rgb", \ + "/usr/share/X11/rgb", \ + "/etc/X11/rgb"}; static char _NXRgbPath[1024]; #endif -- cgit v1.2.3 From db3c6a6d2ce6e5ca7528b918327104df0c846b53 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 14:21:52 +0100 Subject: Revert "Fix build when LDFLAGS (etc) contains spaces." This reverts commit 4436e97903aa6e2a7732fb98dcb46758a73fe130. --- debian/rules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 1a9b12341..396f9b937 100755 --- a/debian/rules +++ b/debian/rules @@ -2,10 +2,10 @@ NULL = -export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS --export=cmdline) -export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS --export=cmdline) -export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS --export=cmdline) -export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS --export=cmdline) +export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) +export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) export LIBDIR = "/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" export INCLUDEDIR = "/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" -- cgit v1.2.3 From e54e896a6e2dcfc2c80a4d77db819b802dfd1fc1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 14:23:10 +0100 Subject: Use proper quoting on build flag vars (they may contain spaces). --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a8c2480f6..6ce69dbc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -85,6 +85,7 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium + Add to B-D: expat. + Install upstream ChangeLogs into bin:packages. + Remove upstream nx-libs ChangeLog during override_dh_clean. + + Use proper quoting on build flag vars (they may contain spaces). * nx-libs.spec: + The gpg-offline bin:package is not available in our SLE repo. We can do diff --git a/debian/rules b/debian/rules index 396f9b937..b38d8a0b6 100755 --- a/debian/rules +++ b/debian/rules @@ -114,7 +114,7 @@ override_dh_auto_build: # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst - LOCAL_LDFLAGS=$(LDFLAGS) SHLIBGLOBALSFLAGS=$(LDFLAGS) SHLIBDIR=$(LIBDIR) PREFIX=/usr dh_auto_build --parallel + LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS="$(LDFLAGS)" SHLIBDIR="$(LIBDIR)" PREFIX=/usr dh_auto_build --parallel override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg -- cgit v1.2.3 From 2d4a61d3c59c1a1bd8c01d28f48e42dba85ba1b7 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 14:28:35 +0100 Subject: Version bump, continuing NX 3.x development.. Targetting NX 3.6.x some time. --- debian/VERSION | 2 +- debian/changelog | 9 ++++++++- nx-libs.spec | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/VERSION b/debian/VERSION index 22c248445..9af1780f9 100644 --- a/debian/VERSION +++ b/debian/VERSION @@ -1 +1 @@ -3.5.0.29 +3.5.99.0 diff --git a/debian/changelog b/debian/changelog index 6ce69dbc5..834868790 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium + + * Version bump, continuing NX 3.x development.. + Targeting NX 3.6.x.y some time. + + -- Mike Gabriel Sat, 14 Feb 2015 14:27:25 +0100 + nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium [ Paul Szabo ] @@ -124,7 +131,7 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. - -- Mike Gabriel Thu, 13 Nov 2014 21:59:00 +0100 + -- Mike Gabriel Sat, 14 Feb 2015 14:25:17 +0100 nx-libs (2:3.5.0.28-0x2go1) unstable; urgency=medium diff --git a/nx-libs.spec b/nx-libs.spec index f6bb99da0..31887239f 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: nx-libs -Version: 3.5.0.29 -Release: 0.0x2go1%{?dist} +Version: 3.5.99.0 +Release: 0.0build1%{?dist} Summary: NX X11 protocol compression libraries Group: System Environment/Libraries -- cgit v1.2.3 From ea8ca04a7cb478c6c379e64e5db655fff9c0e15a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:08:07 +0100 Subject: Move Makefile (and auxiliary file replace.sh) into base folder. Adapt packaging these scripts: debian/roll-tarballs.sh debian/rules nx-libs.spec --- Makefile | 184 +++++++++++++++++++++++++++++++++++++++++++++ debian/Makefile.nx-libs | 184 --------------------------------------------- debian/Makefile.replace.sh | 51 ------------- debian/roll-tarballs.sh | 5 -- debian/rules | 5 +- nx-libs.spec | 2 - replace.sh | 51 +++++++++++++ 7 files changed, 236 insertions(+), 246 deletions(-) create mode 100644 Makefile delete mode 100644 debian/Makefile.nx-libs delete mode 100644 debian/Makefile.replace.sh create mode 100644 replace.sh (limited to 'debian') diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..3aeda739b --- /dev/null +++ b/Makefile @@ -0,0 +1,184 @@ +#!/usr/bin/make -f + +INSTALL_DIR=install -d -m 755 +INSTALL_FILE=install -m 644 +INSTALL_PROGRAM=install -m 755 +INSTALL_SYMLINK=ln -s -f +COPY_SYMLINK=cp -a +RM_FILE=rm -f +RM_DIR=rmdir -p --ignore-fail-on-non-empty + +ETCDIR_NX ?= /etc/nxagent +ETCDIR_X2GO ?= /etc/x2go +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +LIBDIR ?= $(PREFIX)/lib +USRLIBDIR ?= $(LIBDIR) +INCLUDEDIR ?= $(PREFIX)/include +NXLIBDIR ?= $(PREFIX)/lib/nx +X2GOLIBDIR ?= $(PREFIX)/lib/x2go +CONFIGURE ?= ./configure + +SHELL:=/bin/bash + +%: + if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi + if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi + if test -d nx-X11; then \ + if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ + if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ + if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 $@; fi; \ + fi + +all: build + +test: + echo "No testing for NX (redistributed)" + +build-lite: + cd nxcomp && autoconf && (${CONFIGURE}) && ${MAKE} + cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} + +build-full: +# in the full case, we rely on "magic" in the nx-X11 imake-based makefiles... + cd nxcomp && autoconf + cd nxcompext && autoconf + cd nxcompshad && autoconf + cd nx-X11 && ${MAKE} World + cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} + +build: + if ! test -d nx-X11; then \ + ${MAKE} build-lite; \ + else \ + ${MAKE} build-full; \ + fi + +install: + $(MAKE) install-lite + [ ! -d nx-X11 ] || $(MAKE) install-full + +install-lite: + $(INSTALL_DIR) $(DESTDIR)$(BINDIR) + for d in nxcomp nxproxy; do \ + $(MAKE) -C $$d install; done + mkdir -p $(DESTDIR)$(NXLIBDIR)/bin/ + mv $(DESTDIR)$(BINDIR)/nxproxy $(DESTDIR)$(NXLIBDIR)/bin/ + for f in nxproxy; do \ + $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ + $(INSTALL_FILE) nxproxy/man/nxproxy.1 $(DESTDIR)$(PREFIX)/share/man/man1/ + gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 + + +install-full: + for f in nxagent nxauth x2goagent; do \ + $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done + for d in nxcompext nxcompshad; do \ + $(MAKE) -C $$d install; done + + $(INSTALL_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ + cd $(DESTDIR)$(X2GOLIBDIR)/bin/ && ln -sf $(NXLIBDIR)/bin/nxagent x2goagent + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/pixmaps + $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/x2go.xpm $(DESTDIR)$(PREFIX)/share/pixmaps + $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm $(DESTDIR)$(PREFIX)/share/pixmaps + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx + $(INSTALL_FILE) nx-X11/programs/Xserver/Xext/SecurityPolicy $(DESTDIR)$(PREFIX)/share/nx + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go/versions + $(INSTALL_FILE) VERSION.x2goagent $(DESTDIR)$(PREFIX)/share/x2go/versions + + $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin + $(INSTALL_PROGRAM) nx-X11/programs/nxauth/nxauth $(DESTDIR)$(NXLIBDIR)/bin + $(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(NXLIBDIR)/bin + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ + $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ + $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ + $(INSTALL_FILE) nx-X11/programs/nxauth/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/ + mv -f $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.1 + gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 + + # create a clean nx-X11/.build-exports space + rm -Rf nx-X11/.build-exports + mkdir -p nx-X11/.build-exports/include + mkdir -p nx-X11/.build-exports/lib + + # copy headers (for libnx-x11-dev) + cp -aL nx-X11/exports/include/* nx-X11/.build-exports/include + + # copy libs (for libnx-x11), we want the targets of the links + . replace.sh; set -x; find nx-X11/exports/lib/ | grep -F ".so" | while read libpath; do \ + libfile=$$(basename $$libpath); \ + libdir=$$(dirname $$libpath); \ + link=$$(readlink $$libpath); \ + \ + mkdir -p "$$(string_rep "$$libdir" exports .build-exports)"; \ + cp -a "$$(string_rep "$$libpath" "$$libfile" "$$link")" "$$(string_rep "$$libdir" exports .build-exports)"; \ + done; + + $(INSTALL_DIR) $(DESTDIR)$(USRLIBDIR) + $(COPY_SYMLINK) nx-X11/.build-exports/lib/*.so* $(DESTDIR)$(USRLIBDIR)/ + + . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | grep -v "include/X11/bitmaps" | \ + while read dirname; do \ + $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"; \ + $(INSTALL_FILE) $${dirname}/*.h \ + "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"/ || true; \ + done; \ + + # Provide means for Xinerama support in NX/X2Go sessions. This + # This also requires two post-install symlinks: + # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr//libX11.so.6 + # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 + $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama + $(INSTALL_SYMLINK) $(USRLIBDIR)/libNX_Xinerama.so.1 $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 + + $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps + $(INSTALL_FILE) nx-X11/.build-exports/include/X11/bitmaps/* \ + $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps/ + + $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) + $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) + $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/ + $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_X2GO)/ + $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_X2GO)/ + $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_NX)/ + $(INSTALL_FILE) etc/nxagent.keyboard $(DESTDIR)$(ETCDIR_NX)/ + $(INSTALL_FILE) etc/x2goagent.keyboard $(DESTDIR)$(ETCDIR_X2GO)/ + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go + $(INSTALL_SYMLINK) $(ETCDIR_X2GO)/rgb $(DESTDIR)$(PREFIX)/share/x2go/rgb + + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx + $(INSTALL_SYMLINK) $(ETCDIR_NX)/rgb $(DESTDIR)$(PREFIX)/share/nx/rgb + +uninstall: + $(MAKE) uninstall-lite + [ ! -d nx-X11 ] || $(MAKE) uninstall-full + +uninstall-lite: + for f in nxproxy; do \ + $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done + +uninstall-full: + for f in nxagent nxauth x2goagent; do \ + $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done + + $(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent + $(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ + + if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi + if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi + + if test -d nx-X11; then \ + if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ + if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ + if test -f nx-X11/Makefile; then \ + if test -d $(NXLIBDIR); then rm -rf $(NXLIBDIR); fi; \ + if test -d $(INCLUDEDIR)/nx; then rm -rf $(INCLUDEDIR)/nx; fi; \ + fi; \ + fi diff --git a/debian/Makefile.nx-libs b/debian/Makefile.nx-libs deleted file mode 100644 index 3aeda739b..000000000 --- a/debian/Makefile.nx-libs +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/make -f - -INSTALL_DIR=install -d -m 755 -INSTALL_FILE=install -m 644 -INSTALL_PROGRAM=install -m 755 -INSTALL_SYMLINK=ln -s -f -COPY_SYMLINK=cp -a -RM_FILE=rm -f -RM_DIR=rmdir -p --ignore-fail-on-non-empty - -ETCDIR_NX ?= /etc/nxagent -ETCDIR_X2GO ?= /etc/x2go -PREFIX ?= /usr/local -BINDIR ?= $(PREFIX)/bin -LIBDIR ?= $(PREFIX)/lib -USRLIBDIR ?= $(LIBDIR) -INCLUDEDIR ?= $(PREFIX)/include -NXLIBDIR ?= $(PREFIX)/lib/nx -X2GOLIBDIR ?= $(PREFIX)/lib/x2go -CONFIGURE ?= ./configure - -SHELL:=/bin/bash - -%: - if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi - if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi - if test -d nx-X11; then \ - if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ - if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ - if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 $@; fi; \ - fi - -all: build - -test: - echo "No testing for NX (redistributed)" - -build-lite: - cd nxcomp && autoconf && (${CONFIGURE}) && ${MAKE} - cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} - -build-full: -# in the full case, we rely on "magic" in the nx-X11 imake-based makefiles... - cd nxcomp && autoconf - cd nxcompext && autoconf - cd nxcompshad && autoconf - cd nx-X11 && ${MAKE} World - cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} - -build: - if ! test -d nx-X11; then \ - ${MAKE} build-lite; \ - else \ - ${MAKE} build-full; \ - fi - -install: - $(MAKE) install-lite - [ ! -d nx-X11 ] || $(MAKE) install-full - -install-lite: - $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - for d in nxcomp nxproxy; do \ - $(MAKE) -C $$d install; done - mkdir -p $(DESTDIR)$(NXLIBDIR)/bin/ - mv $(DESTDIR)$(BINDIR)/nxproxy $(DESTDIR)$(NXLIBDIR)/bin/ - for f in nxproxy; do \ - $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_FILE) nxproxy/man/nxproxy.1 $(DESTDIR)$(PREFIX)/share/man/man1/ - gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 - - -install-full: - for f in nxagent nxauth x2goagent; do \ - $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done - for d in nxcompext nxcompshad; do \ - $(MAKE) -C $$d install; done - - $(INSTALL_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ - cd $(DESTDIR)$(X2GOLIBDIR)/bin/ && ln -sf $(NXLIBDIR)/bin/nxagent x2goagent - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/pixmaps - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/x2go.xpm $(DESTDIR)$(PREFIX)/share/pixmaps - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm $(DESTDIR)$(PREFIX)/share/pixmaps - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx - $(INSTALL_FILE) nx-X11/programs/Xserver/Xext/SecurityPolicy $(DESTDIR)$(PREFIX)/share/nx - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go/versions - $(INSTALL_FILE) VERSION.x2goagent $(DESTDIR)$(PREFIX)/share/x2go/versions - - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin - $(INSTALL_PROGRAM) nx-X11/programs/nxauth/nxauth $(DESTDIR)$(NXLIBDIR)/bin - $(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(NXLIBDIR)/bin - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_FILE) nx-X11/programs/nxauth/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/ - mv -f $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.1 - gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 - - # create a clean nx-X11/.build-exports space - rm -Rf nx-X11/.build-exports - mkdir -p nx-X11/.build-exports/include - mkdir -p nx-X11/.build-exports/lib - - # copy headers (for libnx-x11-dev) - cp -aL nx-X11/exports/include/* nx-X11/.build-exports/include - - # copy libs (for libnx-x11), we want the targets of the links - . replace.sh; set -x; find nx-X11/exports/lib/ | grep -F ".so" | while read libpath; do \ - libfile=$$(basename $$libpath); \ - libdir=$$(dirname $$libpath); \ - link=$$(readlink $$libpath); \ - \ - mkdir -p "$$(string_rep "$$libdir" exports .build-exports)"; \ - cp -a "$$(string_rep "$$libpath" "$$libfile" "$$link")" "$$(string_rep "$$libdir" exports .build-exports)"; \ - done; - - $(INSTALL_DIR) $(DESTDIR)$(USRLIBDIR) - $(COPY_SYMLINK) nx-X11/.build-exports/lib/*.so* $(DESTDIR)$(USRLIBDIR)/ - - . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | grep -v "include/X11/bitmaps" | \ - while read dirname; do \ - $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"; \ - $(INSTALL_FILE) $${dirname}/*.h \ - "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"/ || true; \ - done; \ - - # Provide means for Xinerama support in NX/X2Go sessions. This - # This also requires two post-install symlinks: - # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr//libX11.so.6 - # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama - $(INSTALL_SYMLINK) $(USRLIBDIR)/libNX_Xinerama.so.1 $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 - - $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps - $(INSTALL_FILE) nx-X11/.build-exports/include/X11/bitmaps/* \ - $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps/ - - $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) - $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) - $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/ - $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_X2GO)/ - $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_X2GO)/ - $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_NX)/ - $(INSTALL_FILE) etc/nxagent.keyboard $(DESTDIR)$(ETCDIR_NX)/ - $(INSTALL_FILE) etc/x2goagent.keyboard $(DESTDIR)$(ETCDIR_X2GO)/ - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go - $(INSTALL_SYMLINK) $(ETCDIR_X2GO)/rgb $(DESTDIR)$(PREFIX)/share/x2go/rgb - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx - $(INSTALL_SYMLINK) $(ETCDIR_NX)/rgb $(DESTDIR)$(PREFIX)/share/nx/rgb - -uninstall: - $(MAKE) uninstall-lite - [ ! -d nx-X11 ] || $(MAKE) uninstall-full - -uninstall-lite: - for f in nxproxy; do \ - $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done - -uninstall-full: - for f in nxagent nxauth x2goagent; do \ - $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done - - $(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent - $(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ - - if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi - if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi - - if test -d nx-X11; then \ - if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ - if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ - if test -f nx-X11/Makefile; then \ - if test -d $(NXLIBDIR); then rm -rf $(NXLIBDIR); fi; \ - if test -d $(INCLUDEDIR)/nx; then rm -rf $(INCLUDEDIR)/nx; fi; \ - fi; \ - fi diff --git a/debian/Makefile.replace.sh b/debian/Makefile.replace.sh deleted file mode 100644 index 83d6b5b3e..000000000 --- a/debian/Makefile.replace.sh +++ /dev/null @@ -1,51 +0,0 @@ -# from http://mywiki.wooledge.org/BashFAQ/021 - -# The ${a/b/c} substitution is not POSIX compatible. Additionally, in -# bash 3.x, quotes do not escape slashes. This causes screwed up -# installation paths. -# -# SLES 11, bash-3.2-147.9.13 -# $ dirname="foo/bar" -# $ echo ${dirname//"foo/bar"/"omg/nei"} -# bar/omg/nei/bar -# -# openSUSE 12.2, bash-4.2-51.6.1 -# $ dirname="foo/bar" -# $ echo ${dirname//"foo/bar"/"omg/nei"} -# omg/nei -# -# openSUSE 12.2, dash-0.5.7-5.1.2.x86_64 -# $ dirname="foo/bar" -# $ echo ${dirname//"foo/bar"/"omg/nei"} -# dash: 2: Bad substitution -# -# Source this file into your bash scripts to make available -# a replacement (the string_rep function) for this substitution -# mess. -# - -string_rep() -{ - # initialize vars - in=$1 - unset out - - # SEARCH must not be empty - test -n "$2" || return - - while true; do - # break loop if SEARCH is no longer in "$in" - case "$in" in - *"$2"*) : ;; - *) break;; - esac - - # append everything in "$in", up to the first instance of SEARCH, and REP, to "$out" - out=$out${in%%"$2"*}$3 - # remove everything up to and including the first instance of SEARCH from "$in" - in=${in#*"$2"} - done - - # append whatever is left in "$in" after the last instance of SEARCH to out, and print - printf '%s%s\n' "$out" "$in" -} diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 3ff7667f7..02a25dff5 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -34,7 +34,6 @@ PROJECT="nx-libs" NULL="" test -d .git || usage -test -f debian/Makefile.nx-libs || usage RELEASE="$1" test -n "${RELEASE}" || usage CHECKOUT="$2" @@ -135,10 +134,6 @@ fi mv -v debian/changelog doc/changelog -# copy the top-level makefile if no quilt patch created it before -test -f Makefile || test -f debian/Makefile.nx-libs && cp -v debian/Makefile.nx-libs Makefile -test -f replace.sh || test -f debian/Makefile.replace.sh && cp -v debian/Makefile.replace.sh replace.sh - # remove folders that we do not want to roll into the tarball rm -Rf ".pc/" rm -Rf "debian/" diff --git a/debian/rules b/debian/rules index b38d8a0b6..ad9ddded6 100755 --- a/debian/rules +++ b/debian/rules @@ -23,9 +23,8 @@ override_dh_clean: rm -f doc/changelog rm -f nx-X11/programs/Xserver/hw/nxagent/changelog rm -f nx-X11/programs/nxauth/changelog - if [ ! -f replace.sh ] && [ ! -h replace.sh ]; then ln -s debian/Makefile.replace.sh replace.sh; fi . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -fR replace.sh Makefile bin etc/rgb VERSION.x2goagent etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard + rm -fR bin etc/rgb VERSION.x2goagent etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard rm -f debian/libnx-xinerama1.postinst rm -fR .preserve/ if [ -f nxcomp/.VERSION.NoMachine ]; then mv nxcomp/.VERSION.NoMachine nxcomp/VERSION; fi @@ -98,8 +97,6 @@ override_dh_auto_build: cp -a nx-X11/programs/Xserver/hw/nxagent/CHANGELOG nx-X11/programs/Xserver/hw/nxagent/changelog cp -a nx-X11/programs/nxauth/CHANGELOG nx-X11/programs/nxauth/changelog cp -a nxproxy/CHANGELOG nxproxy/changelog - ln -s debian/Makefile.nx-libs Makefile - ln -s debian/Makefile.replace.sh replace.sh ln -s debian/wrappers bin mkdir -p etc/ ln -s ../debian/keystrokes.cfg etc/keystrokes.cfg diff --git a/nx-libs.spec b/nx-libs.spec index 31887239f..b5ac8d92f 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -665,8 +665,6 @@ mkdir bin/ cp -v debian/wrappers/* bin/ mkdir etc/ cp -v debian/keystrokes.cfg etc/keystrokes.cfg -cp -v debian/Makefile.nx-libs Makefile -cp -v debian/Makefile.replace.sh replace.sh cp -v debian/rgb etc/rgb cp -v debian/nxagent.keyboard etc/nxagent.keyboard cp -v debian/x2goagent.keyboard etc/x2goagent.keyboard diff --git a/replace.sh b/replace.sh new file mode 100644 index 000000000..83d6b5b3e --- /dev/null +++ b/replace.sh @@ -0,0 +1,51 @@ +# from http://mywiki.wooledge.org/BashFAQ/021 + +# The ${a/b/c} substitution is not POSIX compatible. Additionally, in +# bash 3.x, quotes do not escape slashes. This causes screwed up +# installation paths. +# +# SLES 11, bash-3.2-147.9.13 +# $ dirname="foo/bar" +# $ echo ${dirname//"foo/bar"/"omg/nei"} +# bar/omg/nei/bar +# +# openSUSE 12.2, bash-4.2-51.6.1 +# $ dirname="foo/bar" +# $ echo ${dirname//"foo/bar"/"omg/nei"} +# omg/nei +# +# openSUSE 12.2, dash-0.5.7-5.1.2.x86_64 +# $ dirname="foo/bar" +# $ echo ${dirname//"foo/bar"/"omg/nei"} +# dash: 2: Bad substitution +# +# Source this file into your bash scripts to make available +# a replacement (the string_rep function) for this substitution +# mess. +# + +string_rep() +{ + # initialize vars + in=$1 + unset out + + # SEARCH must not be empty + test -n "$2" || return + + while true; do + # break loop if SEARCH is no longer in "$in" + case "$in" in + *"$2"*) : ;; + *) break;; + esac + + # append everything in "$in", up to the first instance of SEARCH, and REP, to "$out" + out=$out${in%%"$2"*}$3 + # remove everything up to and including the first instance of SEARCH from "$in" + in=${in#*"$2"} + done + + # append whatever is left in "$in" after the last instance of SEARCH to out, and print + printf '%s%s\n' "$out" "$in" +} -- cgit v1.2.3 From ce531230f148a8c586a6e29c340e2db03d7bd3bb Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:14:23 +0100 Subject: VERSION file: master VERSION file is in base folder, symlinked from nx*/VERSION and hw/nxagent/VERSION. This commit removes the debian/VERSION file at makes it now unnecessary to copy/symlink the VERSION file at build time. These build scripts got adapted: debian/roll-tarballs.sh debian/rules nx-libs.spec Furthermore, all NX component now use the main VERSION file as reference. typechange: nxcomp/VERSION typechange: nxcompext/VERSION typechange: nxcompshad/VERSION typechange: nxproxy/VERSION --- VERSION | 1 + VERSION.x2goagent | 1 + debian/VERSION | 1 - debian/roll-tarballs.sh | 2 -- debian/rules | 6 +----- nx-X11/programs/Xserver/hw/nxagent/VERSION | 1 + nx-libs.spec | 2 -- nxcomp/VERSION | 2 +- nxcompext/VERSION | 2 +- nxcompshad/VERSION | 2 +- nxproxy/VERSION | 2 +- 11 files changed, 8 insertions(+), 14 deletions(-) create mode 100644 VERSION create mode 120000 VERSION.x2goagent delete mode 100644 debian/VERSION create mode 120000 nx-X11/programs/Xserver/hw/nxagent/VERSION mode change 100644 => 120000 nxcomp/VERSION mode change 100644 => 120000 nxcompext/VERSION mode change 100644 => 120000 nxcompshad/VERSION mode change 100644 => 120000 nxproxy/VERSION (limited to 'debian') diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..9af1780f9 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.5.99.0 diff --git a/VERSION.x2goagent b/VERSION.x2goagent new file mode 120000 index 000000000..974cf28e0 --- /dev/null +++ b/VERSION.x2goagent @@ -0,0 +1 @@ +VERSION \ No newline at end of file diff --git a/debian/VERSION b/debian/VERSION deleted file mode 100644 index 9af1780f9..000000000 --- a/debian/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.5.99.0 diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 02a25dff5..03ab6778b 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -90,7 +90,6 @@ if [ "x$MODE" = "xfull" ]; then cp -v debian/rgb ./etc/ cp -v debian/nxagent.keyboard ./etc/ cp -v debian/x2goagent.keyboard ./etc/ - cp -v debian/VERSION ./VERSION.x2goagent else rm -Rf "nxcompshad"* rm -Rf "nxcompext"* @@ -101,7 +100,6 @@ else echo ${file##*/} >> doc/applied-patches/series done fi -cp -v debian/VERSION ./nxcomp/VERSION cp -v debian/COPYING.full+lite COPYING cp -v debian/nxagent.keyboard nxagent.keyboard cp -v debian/x2goagent.keyboard x2goagent.keyboard diff --git a/debian/rules b/debian/rules index ad9ddded6..e0b4166f5 100755 --- a/debian/rules +++ b/debian/rules @@ -24,10 +24,9 @@ override_dh_clean: rm -f nx-X11/programs/Xserver/hw/nxagent/changelog rm -f nx-X11/programs/nxauth/changelog . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -fR bin etc/rgb VERSION.x2goagent etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard + rm -fR bin etc/rgb etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard rm -f debian/libnx-xinerama1.postinst rm -fR .preserve/ - if [ -f nxcomp/.VERSION.NoMachine ]; then mv nxcomp/.VERSION.NoMachine nxcomp/VERSION; fi dh_clean override_dh_installchangelog: @@ -91,7 +90,6 @@ override_dh_auto_build: # create copies of upstream changelogs so that names apply to Debian policy... cp -a nx-X11/CHANGELOG nx-X11/changelog cp -a nxcomp/CHANGELOG nxcomp/changelog - if [ -f nxcomp/VERSION ]; then cp nxcomp/VERSION nxcomp/.VERSION.NoMachine; fi cp -a nxcompext/CHANGELOG nxcompext/changelog cp -a nxcompshad/CHANGELOG nxcompshad/changelog cp -a nx-X11/programs/Xserver/hw/nxagent/CHANGELOG nx-X11/programs/Xserver/hw/nxagent/changelog @@ -105,8 +103,6 @@ override_dh_auto_build: ln -s ../debian/x2goagent.keyboard etc/x2goagent.keyboard mkdir -p doc/ ln -s ../debian/changelog doc/changelog - ln -sf debian/VERSION VERSION.x2goagent - ln -sf ../debian/VERSION nxcomp/VERSION # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst diff --git a/nx-X11/programs/Xserver/hw/nxagent/VERSION b/nx-X11/programs/Xserver/hw/nxagent/VERSION new file mode 120000 index 000000000..9ca2cfb9d --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/VERSION @@ -0,0 +1 @@ +../../../../../VERSION \ No newline at end of file diff --git a/nx-libs.spec b/nx-libs.spec index b5ac8d92f..c037a2662 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -668,8 +668,6 @@ cp -v debian/keystrokes.cfg etc/keystrokes.cfg cp -v debian/rgb etc/rgb cp -v debian/nxagent.keyboard etc/nxagent.keyboard cp -v debian/x2goagent.keyboard etc/x2goagent.keyboard -cp -v debian/VERSION VERSION.x2goagent -cp -v debian/VERSION nxcomp/VERSION # remove build cruft that is in Git (also taken from roll-tarball.sh) rm -Rf nx*/configure nx*/autom4te.cache* diff --git a/nxcomp/VERSION b/nxcomp/VERSION deleted file mode 100644 index 1545d9665..000000000 --- a/nxcomp/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.5.0 diff --git a/nxcomp/VERSION b/nxcomp/VERSION new file mode 120000 index 000000000..6ff19de4b --- /dev/null +++ b/nxcomp/VERSION @@ -0,0 +1 @@ +../VERSION \ No newline at end of file diff --git a/nxcompext/VERSION b/nxcompext/VERSION deleted file mode 100644 index 1545d9665..000000000 --- a/nxcompext/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.5.0 diff --git a/nxcompext/VERSION b/nxcompext/VERSION new file mode 120000 index 000000000..6ff19de4b --- /dev/null +++ b/nxcompext/VERSION @@ -0,0 +1 @@ +../VERSION \ No newline at end of file diff --git a/nxcompshad/VERSION b/nxcompshad/VERSION deleted file mode 100644 index 1545d9665..000000000 --- a/nxcompshad/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.5.0 diff --git a/nxcompshad/VERSION b/nxcompshad/VERSION new file mode 120000 index 000000000..6ff19de4b --- /dev/null +++ b/nxcompshad/VERSION @@ -0,0 +1 @@ +../VERSION \ No newline at end of file diff --git a/nxproxy/VERSION b/nxproxy/VERSION deleted file mode 100644 index 1545d9665..000000000 --- a/nxproxy/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.5.0 diff --git a/nxproxy/VERSION b/nxproxy/VERSION new file mode 120000 index 000000000..6ff19de4b --- /dev/null +++ b/nxproxy/VERSION @@ -0,0 +1 @@ +../VERSION \ No newline at end of file -- cgit v1.2.3 From 1a824cfb54fa4a60a50b75923e4b32a2458d9404 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:23:59 +0100 Subject: Prepare for maintaing upstream changes in upstream ChangeLog. This makes it obsolete to add changes to debian/changelog. We document our changes in Git (3.6.x branch and other related branches). On release, we generate an upstream ChangeLog from Git history. Only on the 3.5.0.x, we continue maintaining our changes in debian/changelog (to be compliant with current nx-libs release workflow in X2Go). The following packaging scripts needed adaptations to this change: debian/roll-tarballs.sh debian/rules nx-libs.spec --- ChangeLog | 1 + debian/roll-tarballs.sh | 2 -- debian/rules | 19 ------------------- nx-libs.spec | 6 +++--- 4 files changed, 4 insertions(+), 24 deletions(-) create mode 100644 ChangeLog (limited to 'debian') diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..d1c5c71b9 --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ +Empty file that gets populated with first release of the 3.6.x NX series. \ No newline at end of file diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 03ab6778b..37c897a66 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -130,8 +130,6 @@ else test -f etc/keystrokes.cfg || test -f debian/keystrokes.cfg && cp -v debian/keystrokes.cfg etc/keystrokes.cfg fi -mv -v debian/changelog doc/changelog - # remove folders that we do not want to roll into the tarball rm -Rf ".pc/" rm -Rf "debian/" diff --git a/debian/rules b/debian/rules index e0b4166f5..b17828231 100755 --- a/debian/rules +++ b/debian/rules @@ -19,21 +19,12 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure - rm -f nx*/changelog - rm -f doc/changelog - rm -f nx-X11/programs/Xserver/hw/nxagent/changelog - rm -f nx-X11/programs/nxauth/changelog . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done rm -fR bin etc/rgb etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard rm -f debian/libnx-xinerama1.postinst rm -fR .preserve/ dh_clean -override_dh_installchangelog: - - ### the doc/changelog file is the actual NX (redistributed) ChangeLog - dh_installchangelog doc/changelog - override_dh_install: # handle builds for Debian squeeze (non multi-arch) @@ -87,22 +78,12 @@ override_dh_auto_install: override_dh_auto_build: - # create copies of upstream changelogs so that names apply to Debian policy... - cp -a nx-X11/CHANGELOG nx-X11/changelog - cp -a nxcomp/CHANGELOG nxcomp/changelog - cp -a nxcompext/CHANGELOG nxcompext/changelog - cp -a nxcompshad/CHANGELOG nxcompshad/changelog - cp -a nx-X11/programs/Xserver/hw/nxagent/CHANGELOG nx-X11/programs/Xserver/hw/nxagent/changelog - cp -a nx-X11/programs/nxauth/CHANGELOG nx-X11/programs/nxauth/changelog - cp -a nxproxy/CHANGELOG nxproxy/changelog ln -s debian/wrappers bin mkdir -p etc/ ln -s ../debian/keystrokes.cfg etc/keystrokes.cfg ln -s ../debian/rgb etc/rgb ln -s ../debian/nxagent.keyboard etc/nxagent.keyboard ln -s ../debian/x2goagent.keyboard etc/x2goagent.keyboard - mkdir -p doc/ - ln -s ../debian/changelog doc/changelog # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst diff --git a/nx-libs.spec b/nx-libs.spec index c037a2662..897c1d29d 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -954,7 +954,7 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %files -n libXcompshad3 %defattr(-,root,root) -%doc nxcompshad/{CHANGELOG,COPYING,LICENSE} +%doc nxcompshad/{COPYING,LICENSE} %_libdir/libXcompshad.so.3* %files devel @@ -1116,5 +1116,5 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %changelog -* Thu Jan 29 2015 Mike Gabriel 3.5.0.29 -- See debian/changelog for details. +* Thu Jan 29 2015 Mike Gabriel 3.5.99.0 +- See upstream ChangeLog and debian/changelog for details. -- cgit v1.2.3 From 53329e60938447850479858449a94f3d0467ef03 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:29:25 +0100 Subject: Provide wrapper scripts for launch NX components in $(src)/bin/. The installation process copies NX wrapper scripts into $(srcbase)/bin/ before build time. Those wrapper scripts are now in place natively and need not to be copied prior to building NX. Packaging scripts with adaptation: debian/roll-tarballs.sh debian/rules debian/*.docs nx-libs.spec --- bin/nxagent | 29 +++++++++++++++++++++++++++++ bin/nxauth | 29 +++++++++++++++++++++++++++++ bin/nxproxy | 29 +++++++++++++++++++++++++++++ bin/x2goagent | 29 +++++++++++++++++++++++++++++ debian/libnx-x11-6.docs | 1 - debian/libnx-xau6.docs | 1 - debian/libnx-xcomposite1.docs | 1 - debian/libnx-xdamage1.docs | 1 - debian/libnx-xdmcp6.docs | 1 - debian/libnx-xext6.docs | 1 - debian/libnx-xfixes3.docs | 1 - debian/libnx-xinerama1.docs | 1 - debian/libnx-xpm4.docs | 1 - debian/libnx-xrandr2.docs | 1 - debian/libnx-xrender1.docs | 1 - debian/libnx-xtst6.docs | 1 - debian/libxcomp3.docs | 1 - debian/libxcompext3.docs | 1 - debian/libxcompshad3.docs | 1 - debian/nxagent.docs | 1 - debian/nxauth.docs | 1 - debian/nxproxy.docs | 1 - debian/roll-tarballs.sh | 10 +--------- debian/rules | 3 +-- debian/wrappers/nxagent | 29 ----------------------------- debian/wrappers/nxauth | 29 ----------------------------- debian/wrappers/nxproxy | 29 ----------------------------- debian/wrappers/x2goagent | 29 ----------------------------- nx-libs.spec | 2 -- 29 files changed, 118 insertions(+), 147 deletions(-) create mode 100644 bin/nxagent create mode 100644 bin/nxauth create mode 100644 bin/nxproxy create mode 100644 bin/x2goagent delete mode 100644 debian/libnx-x11-6.docs delete mode 100644 debian/libnx-xau6.docs delete mode 100644 debian/libnx-xcomposite1.docs delete mode 100644 debian/libnx-xdamage1.docs delete mode 100644 debian/libnx-xdmcp6.docs delete mode 100644 debian/libnx-xext6.docs delete mode 100644 debian/libnx-xfixes3.docs delete mode 100644 debian/libnx-xinerama1.docs delete mode 100644 debian/libnx-xpm4.docs delete mode 100644 debian/libnx-xrandr2.docs delete mode 100644 debian/libnx-xrender1.docs delete mode 100644 debian/libnx-xtst6.docs delete mode 100644 debian/libxcomp3.docs delete mode 100644 debian/libxcompext3.docs delete mode 100644 debian/libxcompshad3.docs delete mode 100644 debian/nxauth.docs delete mode 100644 debian/wrappers/nxagent delete mode 100644 debian/wrappers/nxauth delete mode 100644 debian/wrappers/nxproxy delete mode 100644 debian/wrappers/x2goagent (limited to 'debian') diff --git a/bin/nxagent b/bin/nxagent new file mode 100644 index 000000000..6306ed069 --- /dev/null +++ b/bin/nxagent @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2012 Mike Gabriel +# +# 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 3 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, see http://www.gnu.org/licenses/. + +NXAPP=nxagent +NX_LIBS=/usr/lib/nx +NX_LOCAL_LIBS=/usr/local/lib/nx + +# make sure nxagent starts properly with pam_tmpdir.so being in use +NX_TEMP=${NX_TEMP:-/tmp} +export NX_TEMP + +test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS +test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS + +exec $NX_LIBS/bin/$NXAPP "$@" diff --git a/bin/nxauth b/bin/nxauth new file mode 100644 index 000000000..c8dbb83f3 --- /dev/null +++ b/bin/nxauth @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2012 Mike Gabriel +# +# 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 3 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, see http://www.gnu.org/licenses/. + +NXAPP=nxauth +NX_LIBS=/usr/lib/nx +NX_LOCAL_LIBS=/usr/local/lib/nx + +# make sure nxagent starts properly with pam_tmpdir.so being in use +NX_TEMP=${NX_TEMP:-/tmp} +export NX_TEMP + +test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS +test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS + +exec $NX_LIBS/bin/$NXAPP "$@" \ No newline at end of file diff --git a/bin/nxproxy b/bin/nxproxy new file mode 100644 index 000000000..23e7109e3 --- /dev/null +++ b/bin/nxproxy @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2012 Mike Gabriel +# +# 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 3 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, see http://www.gnu.org/licenses/. + +NXAPP=nxproxy +NX_LIBS=/usr/lib/nx +NX_LOCAL_LIBS=/usr/local/lib/nx + +# make sure nxagent starts properly with pam_tmpdir.so being in use +NX_TEMP=${NX_TEMP:-/tmp} +export NX_TEMP + +test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS +test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS + +exec $NX_LIBS/bin/$NXAPP "$@" \ No newline at end of file diff --git a/bin/x2goagent b/bin/x2goagent new file mode 100644 index 000000000..09011efbe --- /dev/null +++ b/bin/x2goagent @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2012 Mike Gabriel +# +# 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 3 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, see http://www.gnu.org/licenses/. + +NXAPP=x2goagent +NX_LIBS=/usr/lib/nx +NX_LOCAL_LIBS=/usr/local/lib/nx + +# make sure nxagent starts properly with pam_tmpdir.so being in use +NX_TEMP=${NX_TEMP:-/tmp} +export NX_TEMP + +test -x $NX_LOCAL_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS +test -x $NX_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LIBS + +exec $NX_LIBS/../x2go/bin/$NXAPP "$@" diff --git a/debian/libnx-x11-6.docs b/debian/libnx-x11-6.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-x11-6.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xau6.docs b/debian/libnx-xau6.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xau6.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xcomposite1.docs b/debian/libnx-xcomposite1.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xcomposite1.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xdamage1.docs b/debian/libnx-xdamage1.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xdamage1.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xdmcp6.docs b/debian/libnx-xdmcp6.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xdmcp6.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xext6.docs b/debian/libnx-xext6.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xext6.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xfixes3.docs b/debian/libnx-xfixes3.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xfixes3.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xinerama1.docs b/debian/libnx-xinerama1.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xinerama1.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xpm4.docs b/debian/libnx-xpm4.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xpm4.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xrandr2.docs b/debian/libnx-xrandr2.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xrandr2.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xrender1.docs b/debian/libnx-xrender1.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xrender1.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libnx-xtst6.docs b/debian/libnx-xtst6.docs deleted file mode 100644 index 5a57a3fdc..000000000 --- a/debian/libnx-xtst6.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/changelog \ No newline at end of file diff --git a/debian/libxcomp3.docs b/debian/libxcomp3.docs deleted file mode 100644 index 97efc9f41..000000000 --- a/debian/libxcomp3.docs +++ /dev/null @@ -1 +0,0 @@ -nxcomp/changelog diff --git a/debian/libxcompext3.docs b/debian/libxcompext3.docs deleted file mode 100644 index 8323a3471..000000000 --- a/debian/libxcompext3.docs +++ /dev/null @@ -1 +0,0 @@ -nxcompext/changelog diff --git a/debian/libxcompshad3.docs b/debian/libxcompshad3.docs deleted file mode 100644 index 33632b9a6..000000000 --- a/debian/libxcompshad3.docs +++ /dev/null @@ -1 +0,0 @@ -nxcompshad/changelog diff --git a/debian/nxagent.docs b/debian/nxagent.docs index 6d791c6da..5d7d87aed 100644 --- a/debian/nxagent.docs +++ b/debian/nxagent.docs @@ -1,2 +1 @@ -nx-X11/programs/Xserver/hw/nxagent/changelog README.keystrokes \ No newline at end of file diff --git a/debian/nxauth.docs b/debian/nxauth.docs deleted file mode 100644 index aaa115f2c..000000000 --- a/debian/nxauth.docs +++ /dev/null @@ -1 +0,0 @@ -nx-X11/programs/nxauth/changelog \ No newline at end of file diff --git a/debian/nxproxy.docs b/debian/nxproxy.docs index 4b3d18d8c..2243d21ac 100644 --- a/debian/nxproxy.docs +++ b/debian/nxproxy.docs @@ -1,4 +1,3 @@ -nxproxy/changelog nxproxy/README nxproxy/README-IPAQ nxproxy/README-VALGRIND diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 37c897a66..384bc57e8 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -116,15 +116,7 @@ for f in $(ls README* 2>/dev/null); do mv -v $f doc/; done -mkdir -p bin/ -if [ "$MODE" = "lite" ]; then - # copy wrapper script nxproxy only into tarball - cp -v debian/wrappers/nxproxy bin/ -else - # copy wrapper scripts into tarball - for w in $(ls debian/wrappers/* 2>/dev/null); do - cp -v $w bin/ - done +if [ "$MODE" = "full" ]; then # provide a default keystrokes.cfg file mkdir -p etc test -f etc/keystrokes.cfg || test -f debian/keystrokes.cfg && cp -v debian/keystrokes.cfg etc/keystrokes.cfg diff --git a/debian/rules b/debian/rules index b17828231..7b60a46a4 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,7 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -fR bin etc/rgb etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard + rm -fR etc/rgb etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard rm -f debian/libnx-xinerama1.postinst rm -fR .preserve/ dh_clean @@ -78,7 +78,6 @@ override_dh_auto_install: override_dh_auto_build: - ln -s debian/wrappers bin mkdir -p etc/ ln -s ../debian/keystrokes.cfg etc/keystrokes.cfg ln -s ../debian/rgb etc/rgb diff --git a/debian/wrappers/nxagent b/debian/wrappers/nxagent deleted file mode 100644 index 6306ed069..000000000 --- a/debian/wrappers/nxagent +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 Mike Gabriel -# -# 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 3 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, see http://www.gnu.org/licenses/. - -NXAPP=nxagent -NX_LIBS=/usr/lib/nx -NX_LOCAL_LIBS=/usr/local/lib/nx - -# make sure nxagent starts properly with pam_tmpdir.so being in use -NX_TEMP=${NX_TEMP:-/tmp} -export NX_TEMP - -test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS -test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS - -exec $NX_LIBS/bin/$NXAPP "$@" diff --git a/debian/wrappers/nxauth b/debian/wrappers/nxauth deleted file mode 100644 index c8dbb83f3..000000000 --- a/debian/wrappers/nxauth +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 Mike Gabriel -# -# 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 3 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, see http://www.gnu.org/licenses/. - -NXAPP=nxauth -NX_LIBS=/usr/lib/nx -NX_LOCAL_LIBS=/usr/local/lib/nx - -# make sure nxagent starts properly with pam_tmpdir.so being in use -NX_TEMP=${NX_TEMP:-/tmp} -export NX_TEMP - -test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS -test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS - -exec $NX_LIBS/bin/$NXAPP "$@" \ No newline at end of file diff --git a/debian/wrappers/nxproxy b/debian/wrappers/nxproxy deleted file mode 100644 index 23e7109e3..000000000 --- a/debian/wrappers/nxproxy +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 Mike Gabriel -# -# 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 3 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, see http://www.gnu.org/licenses/. - -NXAPP=nxproxy -NX_LIBS=/usr/lib/nx -NX_LOCAL_LIBS=/usr/local/lib/nx - -# make sure nxagent starts properly with pam_tmpdir.so being in use -NX_TEMP=${NX_TEMP:-/tmp} -export NX_TEMP - -test -x $NX_LOCAL_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS -test -x $NX_LIBS/bin/$NXAPP && export NX_LIBS=$NX_LIBS - -exec $NX_LIBS/bin/$NXAPP "$@" \ No newline at end of file diff --git a/debian/wrappers/x2goagent b/debian/wrappers/x2goagent deleted file mode 100644 index 09011efbe..000000000 --- a/debian/wrappers/x2goagent +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 Mike Gabriel -# -# 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 3 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, see http://www.gnu.org/licenses/. - -NXAPP=x2goagent -NX_LIBS=/usr/lib/nx -NX_LOCAL_LIBS=/usr/local/lib/nx - -# make sure nxagent starts properly with pam_tmpdir.so being in use -NX_TEMP=${NX_TEMP:-/tmp} -export NX_TEMP - -test -x $NX_LOCAL_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS -test -x $NX_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LIBS - -exec $NX_LIBS/../x2go/bin/$NXAPP "$@" diff --git a/nx-libs.spec b/nx-libs.spec index 897c1d29d..ccbf6f9da 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -661,8 +661,6 @@ information on NX. %setup -q # copy files from the debian/ folder to designated places in the source tree, # taken from roll-tarball.sh: -mkdir bin/ -cp -v debian/wrappers/* bin/ mkdir etc/ cp -v debian/keystrokes.cfg etc/keystrokes.cfg cp -v debian/rgb etc/rgb -- cgit v1.2.3 From 9000c00dcc60b5a8402d4a944503ff68bb283c20 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:52:29 +0100 Subject: Move all config files from $(srcbase)/debian/ into $(srcbase)/etc/ folder. Affected packagings scripts: debian/roll-tarballs.sh debian/rules nx-libs.spec --- debian/keystrokes.cfg | 19 -- debian/nxagent.keyboard | 1 - debian/rgb | 754 ---------------------------------------------- debian/roll-tarballs.sh | 12 - debian/rules | 7 - debian/x2goagent.keyboard | 1 - etc/keystrokes.cfg | 19 ++ etc/nxagent.keyboard | 1 + etc/rgb | 754 ++++++++++++++++++++++++++++++++++++++++++++++ etc/x2goagent.keyboard | 1 + nx-libs.spec | 8 - 11 files changed, 775 insertions(+), 802 deletions(-) delete mode 100644 debian/keystrokes.cfg delete mode 100644 debian/nxagent.keyboard delete mode 100644 debian/rgb delete mode 100644 debian/x2goagent.keyboard create mode 100644 etc/keystrokes.cfg create mode 100644 etc/nxagent.keyboard create mode 100644 etc/rgb create mode 100644 etc/x2goagent.keyboard (limited to 'debian') diff --git a/debian/keystrokes.cfg b/debian/keystrokes.cfg deleted file mode 100644 index a5e521071..000000000 --- a/debian/keystrokes.cfg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/debian/nxagent.keyboard b/debian/nxagent.keyboard deleted file mode 100644 index afe283260..000000000 --- a/debian/nxagent.keyboard +++ /dev/null @@ -1 +0,0 @@ -rules=xfree86 diff --git a/debian/rgb b/debian/rgb deleted file mode 100644 index b9e56c602..000000000 --- a/debian/rgb +++ /dev/null @@ -1,754 +0,0 @@ -! $Xorg: rgb.txt,v 1.3 2000/08/17 19:54:00 cpqbld Exp $ -255 250 250 snow -248 248 255 ghost white -248 248 255 GhostWhite -245 245 245 white smoke -245 245 245 WhiteSmoke -220 220 220 gainsboro -255 250 240 floral white -255 250 240 FloralWhite -253 245 230 old lace -253 245 230 OldLace -250 240 230 linen -250 235 215 antique white -250 235 215 AntiqueWhite -255 239 213 papaya whip -255 239 213 PapayaWhip -255 235 205 blanched almond -255 235 205 BlanchedAlmond -255 228 196 bisque -255 218 185 peach puff -255 218 185 PeachPuff -255 222 173 navajo white -255 222 173 NavajoWhite -255 228 181 moccasin -255 248 220 cornsilk -255 255 240 ivory -255 250 205 lemon chiffon -255 250 205 LemonChiffon -255 245 238 seashell -240 255 240 honeydew -245 255 250 mint cream -245 255 250 MintCream -240 255 255 azure -240 248 255 alice blue -240 248 255 AliceBlue -230 230 250 lavender -255 240 245 lavender blush -255 240 245 LavenderBlush -255 228 225 misty rose -255 228 225 MistyRose -255 255 255 white - 0 0 0 black - 47 79 79 dark slate gray - 47 79 79 DarkSlateGray - 47 79 79 dark slate grey - 47 79 79 DarkSlateGrey -105 105 105 dim gray -105 105 105 DimGray -105 105 105 dim grey -105 105 105 DimGrey -112 128 144 slate gray -112 128 144 SlateGray -112 128 144 slate grey -112 128 144 SlateGrey -119 136 153 light slate gray -119 136 153 LightSlateGray -119 136 153 light slate grey -119 136 153 LightSlateGrey -190 190 190 gray -190 190 190 grey -211 211 211 light grey -211 211 211 LightGrey -211 211 211 light gray -211 211 211 LightGray - 25 25 112 midnight blue - 25 25 112 MidnightBlue - 0 0 128 navy - 0 0 128 navy blue - 0 0 128 NavyBlue -100 149 237 cornflower blue -100 149 237 CornflowerBlue - 72 61 139 dark slate blue - 72 61 139 DarkSlateBlue -106 90 205 slate blue -106 90 205 SlateBlue -123 104 238 medium slate blue -123 104 238 MediumSlateBlue -132 112 255 light slate blue -132 112 255 LightSlateBlue - 0 0 205 medium blue - 0 0 205 MediumBlue - 65 105 225 royal blue - 65 105 225 RoyalBlue - 0 0 255 blue - 30 144 255 dodger blue - 30 144 255 DodgerBlue - 0 191 255 deep sky blue - 0 191 255 DeepSkyBlue -135 206 235 sky blue -135 206 235 SkyBlue -135 206 250 light sky blue -135 206 250 LightSkyBlue - 70 130 180 steel blue - 70 130 180 SteelBlue -176 196 222 light steel blue -176 196 222 LightSteelBlue -173 216 230 light blue -173 216 230 LightBlue -176 224 230 powder blue -176 224 230 PowderBlue -175 238 238 pale turquoise -175 238 238 PaleTurquoise - 0 206 209 dark turquoise - 0 206 209 DarkTurquoise - 72 209 204 medium turquoise - 72 209 204 MediumTurquoise - 64 224 208 turquoise - 0 255 255 cyan -224 255 255 light cyan -224 255 255 LightCyan - 95 158 160 cadet blue - 95 158 160 CadetBlue -102 205 170 medium aquamarine -102 205 170 MediumAquamarine -127 255 212 aquamarine - 0 100 0 dark green - 0 100 0 DarkGreen - 85 107 47 dark olive green - 85 107 47 DarkOliveGreen -143 188 143 dark sea green -143 188 143 DarkSeaGreen - 46 139 87 sea green - 46 139 87 SeaGreen - 60 179 113 medium sea green - 60 179 113 MediumSeaGreen - 32 178 170 light sea green - 32 178 170 LightSeaGreen -152 251 152 pale green -152 251 152 PaleGreen - 0 255 127 spring green - 0 255 127 SpringGreen -124 252 0 lawn green -124 252 0 LawnGreen - 0 255 0 green -127 255 0 chartreuse - 0 250 154 medium spring green - 0 250 154 MediumSpringGreen -173 255 47 green yellow -173 255 47 GreenYellow - 50 205 50 lime green - 50 205 50 LimeGreen -154 205 50 yellow green -154 205 50 YellowGreen - 34 139 34 forest green - 34 139 34 ForestGreen -107 142 35 olive drab -107 142 35 OliveDrab -189 183 107 dark khaki -189 183 107 DarkKhaki -240 230 140 khaki -238 232 170 pale goldenrod -238 232 170 PaleGoldenrod -250 250 210 light goldenrod yellow -250 250 210 LightGoldenrodYellow -255 255 224 light yellow -255 255 224 LightYellow -255 255 0 yellow -255 215 0 gold -238 221 130 light goldenrod -238 221 130 LightGoldenrod -218 165 32 goldenrod -184 134 11 dark goldenrod -184 134 11 DarkGoldenrod -188 143 143 rosy brown -188 143 143 RosyBrown -205 92 92 indian red -205 92 92 IndianRed -139 69 19 saddle brown -139 69 19 SaddleBrown -160 82 45 sienna -205 133 63 peru -222 184 135 burlywood -245 245 220 beige -245 222 179 wheat -244 164 96 sandy brown -244 164 96 SandyBrown -210 180 140 tan -210 105 30 chocolate -178 34 34 firebrick -165 42 42 brown -233 150 122 dark salmon -233 150 122 DarkSalmon -250 128 114 salmon -255 160 122 light salmon -255 160 122 LightSalmon -255 165 0 orange -255 140 0 dark orange -255 140 0 DarkOrange -255 127 80 coral -240 128 128 light coral -240 128 128 LightCoral -255 99 71 tomato -255 69 0 orange red -255 69 0 OrangeRed -255 0 0 red -255 105 180 hot pink -255 105 180 HotPink -255 20 147 deep pink -255 20 147 DeepPink -255 192 203 pink -255 182 193 light pink -255 182 193 LightPink -219 112 147 pale violet red -219 112 147 PaleVioletRed -176 48 96 maroon -199 21 133 medium violet red -199 21 133 MediumVioletRed -208 32 144 violet red -208 32 144 VioletRed -255 0 255 magenta -238 130 238 violet -221 160 221 plum -218 112 214 orchid -186 85 211 medium orchid -186 85 211 MediumOrchid -153 50 204 dark orchid -153 50 204 DarkOrchid -148 0 211 dark violet -148 0 211 DarkViolet -138 43 226 blue violet -138 43 226 BlueViolet -160 32 240 purple -147 112 219 medium purple -147 112 219 MediumPurple -216 191 216 thistle -255 250 250 snow1 -238 233 233 snow2 -205 201 201 snow3 -139 137 137 snow4 -255 245 238 seashell1 -238 229 222 seashell2 -205 197 191 seashell3 -139 134 130 seashell4 -255 239 219 AntiqueWhite1 -238 223 204 AntiqueWhite2 -205 192 176 AntiqueWhite3 -139 131 120 AntiqueWhite4 -255 228 196 bisque1 -238 213 183 bisque2 -205 183 158 bisque3 -139 125 107 bisque4 -255 218 185 PeachPuff1 -238 203 173 PeachPuff2 -205 175 149 PeachPuff3 -139 119 101 PeachPuff4 -255 222 173 NavajoWhite1 -238 207 161 NavajoWhite2 -205 179 139 NavajoWhite3 -139 121 94 NavajoWhite4 -255 250 205 LemonChiffon1 -238 233 191 LemonChiffon2 -205 201 165 LemonChiffon3 -139 137 112 LemonChiffon4 -255 248 220 cornsilk1 -238 232 205 cornsilk2 -205 200 177 cornsilk3 -139 136 120 cornsilk4 -255 255 240 ivory1 -238 238 224 ivory2 -205 205 193 ivory3 -139 139 131 ivory4 -240 255 240 honeydew1 -224 238 224 honeydew2 -193 205 193 honeydew3 -131 139 131 honeydew4 -255 240 245 LavenderBlush1 -238 224 229 LavenderBlush2 -205 193 197 LavenderBlush3 -139 131 134 LavenderBlush4 -255 228 225 MistyRose1 -238 213 210 MistyRose2 -205 183 181 MistyRose3 -139 125 123 MistyRose4 -240 255 255 azure1 -224 238 238 azure2 -193 205 205 azure3 -131 139 139 azure4 -131 111 255 SlateBlue1 -122 103 238 SlateBlue2 -105 89 205 SlateBlue3 - 71 60 139 SlateBlue4 - 72 118 255 RoyalBlue1 - 67 110 238 RoyalBlue2 - 58 95 205 RoyalBlue3 - 39 64 139 RoyalBlue4 - 0 0 255 blue1 - 0 0 238 blue2 - 0 0 205 blue3 - 0 0 139 blue4 - 30 144 255 DodgerBlue1 - 28 134 238 DodgerBlue2 - 24 116 205 DodgerBlue3 - 16 78 139 DodgerBlue4 - 99 184 255 SteelBlue1 - 92 172 238 SteelBlue2 - 79 148 205 SteelBlue3 - 54 100 139 SteelBlue4 - 0 191 255 DeepSkyBlue1 - 0 178 238 DeepSkyBlue2 - 0 154 205 DeepSkyBlue3 - 0 104 139 DeepSkyBlue4 -135 206 255 SkyBlue1 -126 192 238 SkyBlue2 -108 166 205 SkyBlue3 - 74 112 139 SkyBlue4 -176 226 255 LightSkyBlue1 -164 211 238 LightSkyBlue2 -141 182 205 LightSkyBlue3 - 96 123 139 LightSkyBlue4 -198 226 255 SlateGray1 -185 211 238 SlateGray2 -159 182 205 SlateGray3 -108 123 139 SlateGray4 -202 225 255 LightSteelBlue1 -188 210 238 LightSteelBlue2 -162 181 205 LightSteelBlue3 -110 123 139 LightSteelBlue4 -191 239 255 LightBlue1 -178 223 238 LightBlue2 -154 192 205 LightBlue3 -104 131 139 LightBlue4 -224 255 255 LightCyan1 -209 238 238 LightCyan2 -180 205 205 LightCyan3 -122 139 139 LightCyan4 -187 255 255 PaleTurquoise1 -174 238 238 PaleTurquoise2 -150 205 205 PaleTurquoise3 -102 139 139 PaleTurquoise4 -152 245 255 CadetBlue1 -142 229 238 CadetBlue2 -122 197 205 CadetBlue3 - 83 134 139 CadetBlue4 - 0 245 255 turquoise1 - 0 229 238 turquoise2 - 0 197 205 turquoise3 - 0 134 139 turquoise4 - 0 255 255 cyan1 - 0 238 238 cyan2 - 0 205 205 cyan3 - 0 139 139 cyan4 -151 255 255 DarkSlateGray1 -141 238 238 DarkSlateGray2 -121 205 205 DarkSlateGray3 - 82 139 139 DarkSlateGray4 -127 255 212 aquamarine1 -118 238 198 aquamarine2 -102 205 170 aquamarine3 - 69 139 116 aquamarine4 -193 255 193 DarkSeaGreen1 -180 238 180 DarkSeaGreen2 -155 205 155 DarkSeaGreen3 -105 139 105 DarkSeaGreen4 - 84 255 159 SeaGreen1 - 78 238 148 SeaGreen2 - 67 205 128 SeaGreen3 - 46 139 87 SeaGreen4 -154 255 154 PaleGreen1 -144 238 144 PaleGreen2 -124 205 124 PaleGreen3 - 84 139 84 PaleGreen4 - 0 255 127 SpringGreen1 - 0 238 118 SpringGreen2 - 0 205 102 SpringGreen3 - 0 139 69 SpringGreen4 - 0 255 0 green1 - 0 238 0 green2 - 0 205 0 green3 - 0 139 0 green4 -127 255 0 chartreuse1 -118 238 0 chartreuse2 -102 205 0 chartreuse3 - 69 139 0 chartreuse4 -192 255 62 OliveDrab1 -179 238 58 OliveDrab2 -154 205 50 OliveDrab3 -105 139 34 OliveDrab4 -202 255 112 DarkOliveGreen1 -188 238 104 DarkOliveGreen2 -162 205 90 DarkOliveGreen3 -110 139 61 DarkOliveGreen4 -255 246 143 khaki1 -238 230 133 khaki2 -205 198 115 khaki3 -139 134 78 khaki4 -255 236 139 LightGoldenrod1 -238 220 130 LightGoldenrod2 -205 190 112 LightGoldenrod3 -139 129 76 LightGoldenrod4 -255 255 224 LightYellow1 -238 238 209 LightYellow2 -205 205 180 LightYellow3 -139 139 122 LightYellow4 -255 255 0 yellow1 -238 238 0 yellow2 -205 205 0 yellow3 -139 139 0 yellow4 -255 215 0 gold1 -238 201 0 gold2 -205 173 0 gold3 -139 117 0 gold4 -255 193 37 goldenrod1 -238 180 34 goldenrod2 -205 155 29 goldenrod3 -139 105 20 goldenrod4 -255 185 15 DarkGoldenrod1 -238 173 14 DarkGoldenrod2 -205 149 12 DarkGoldenrod3 -139 101 8 DarkGoldenrod4 -255 193 193 RosyBrown1 -238 180 180 RosyBrown2 -205 155 155 RosyBrown3 -139 105 105 RosyBrown4 -255 106 106 IndianRed1 -238 99 99 IndianRed2 -205 85 85 IndianRed3 -139 58 58 IndianRed4 -255 130 71 sienna1 -238 121 66 sienna2 -205 104 57 sienna3 -139 71 38 sienna4 -255 211 155 burlywood1 -238 197 145 burlywood2 -205 170 125 burlywood3 -139 115 85 burlywood4 -255 231 186 wheat1 -238 216 174 wheat2 -205 186 150 wheat3 -139 126 102 wheat4 -255 165 79 tan1 -238 154 73 tan2 -205 133 63 tan3 -139 90 43 tan4 -255 127 36 chocolate1 -238 118 33 chocolate2 -205 102 29 chocolate3 -139 69 19 chocolate4 -255 48 48 firebrick1 -238 44 44 firebrick2 -205 38 38 firebrick3 -139 26 26 firebrick4 -255 64 64 brown1 -238 59 59 brown2 -205 51 51 brown3 -139 35 35 brown4 -255 140 105 salmon1 -238 130 98 salmon2 -205 112 84 salmon3 -139 76 57 salmon4 -255 160 122 LightSalmon1 -238 149 114 LightSalmon2 -205 129 98 LightSalmon3 -139 87 66 LightSalmon4 -255 165 0 orange1 -238 154 0 orange2 -205 133 0 orange3 -139 90 0 orange4 -255 127 0 DarkOrange1 -238 118 0 DarkOrange2 -205 102 0 DarkOrange3 -139 69 0 DarkOrange4 -255 114 86 coral1 -238 106 80 coral2 -205 91 69 coral3 -139 62 47 coral4 -255 99 71 tomato1 -238 92 66 tomato2 -205 79 57 tomato3 -139 54 38 tomato4 -255 69 0 OrangeRed1 -238 64 0 OrangeRed2 -205 55 0 OrangeRed3 -139 37 0 OrangeRed4 -255 0 0 red1 -238 0 0 red2 -205 0 0 red3 -139 0 0 red4 -215 7 81 DebianRed -255 20 147 DeepPink1 -238 18 137 DeepPink2 -205 16 118 DeepPink3 -139 10 80 DeepPink4 -255 110 180 HotPink1 -238 106 167 HotPink2 -205 96 144 HotPink3 -139 58 98 HotPink4 -255 181 197 pink1 -238 169 184 pink2 -205 145 158 pink3 -139 99 108 pink4 -255 174 185 LightPink1 -238 162 173 LightPink2 -205 140 149 LightPink3 -139 95 101 LightPink4 -255 130 171 PaleVioletRed1 -238 121 159 PaleVioletRed2 -205 104 137 PaleVioletRed3 -139 71 93 PaleVioletRed4 -255 52 179 maroon1 -238 48 167 maroon2 -205 41 144 maroon3 -139 28 98 maroon4 -255 62 150 VioletRed1 -238 58 140 VioletRed2 -205 50 120 VioletRed3 -139 34 82 VioletRed4 -255 0 255 magenta1 -238 0 238 magenta2 -205 0 205 magenta3 -139 0 139 magenta4 -255 131 250 orchid1 -238 122 233 orchid2 -205 105 201 orchid3 -139 71 137 orchid4 -255 187 255 plum1 -238 174 238 plum2 -205 150 205 plum3 -139 102 139 plum4 -224 102 255 MediumOrchid1 -209 95 238 MediumOrchid2 -180 82 205 MediumOrchid3 -122 55 139 MediumOrchid4 -191 62 255 DarkOrchid1 -178 58 238 DarkOrchid2 -154 50 205 DarkOrchid3 -104 34 139 DarkOrchid4 -155 48 255 purple1 -145 44 238 purple2 -125 38 205 purple3 - 85 26 139 purple4 -171 130 255 MediumPurple1 -159 121 238 MediumPurple2 -137 104 205 MediumPurple3 - 93 71 139 MediumPurple4 -255 225 255 thistle1 -238 210 238 thistle2 -205 181 205 thistle3 -139 123 139 thistle4 - 0 0 0 gray0 - 0 0 0 grey0 - 3 3 3 gray1 - 3 3 3 grey1 - 5 5 5 gray2 - 5 5 5 grey2 - 8 8 8 gray3 - 8 8 8 grey3 - 10 10 10 gray4 - 10 10 10 grey4 - 13 13 13 gray5 - 13 13 13 grey5 - 15 15 15 gray6 - 15 15 15 grey6 - 18 18 18 gray7 - 18 18 18 grey7 - 20 20 20 gray8 - 20 20 20 grey8 - 23 23 23 gray9 - 23 23 23 grey9 - 26 26 26 gray10 - 26 26 26 grey10 - 28 28 28 gray11 - 28 28 28 grey11 - 31 31 31 gray12 - 31 31 31 grey12 - 33 33 33 gray13 - 33 33 33 grey13 - 36 36 36 gray14 - 36 36 36 grey14 - 38 38 38 gray15 - 38 38 38 grey15 - 41 41 41 gray16 - 41 41 41 grey16 - 43 43 43 gray17 - 43 43 43 grey17 - 46 46 46 gray18 - 46 46 46 grey18 - 48 48 48 gray19 - 48 48 48 grey19 - 51 51 51 gray20 - 51 51 51 grey20 - 54 54 54 gray21 - 54 54 54 grey21 - 56 56 56 gray22 - 56 56 56 grey22 - 59 59 59 gray23 - 59 59 59 grey23 - 61 61 61 gray24 - 61 61 61 grey24 - 64 64 64 gray25 - 64 64 64 grey25 - 66 66 66 gray26 - 66 66 66 grey26 - 69 69 69 gray27 - 69 69 69 grey27 - 71 71 71 gray28 - 71 71 71 grey28 - 74 74 74 gray29 - 74 74 74 grey29 - 77 77 77 gray30 - 77 77 77 grey30 - 79 79 79 gray31 - 79 79 79 grey31 - 82 82 82 gray32 - 82 82 82 grey32 - 84 84 84 gray33 - 84 84 84 grey33 - 87 87 87 gray34 - 87 87 87 grey34 - 89 89 89 gray35 - 89 89 89 grey35 - 92 92 92 gray36 - 92 92 92 grey36 - 94 94 94 gray37 - 94 94 94 grey37 - 97 97 97 gray38 - 97 97 97 grey38 - 99 99 99 gray39 - 99 99 99 grey39 -102 102 102 gray40 -102 102 102 grey40 -105 105 105 gray41 -105 105 105 grey41 -107 107 107 gray42 -107 107 107 grey42 -110 110 110 gray43 -110 110 110 grey43 -112 112 112 gray44 -112 112 112 grey44 -115 115 115 gray45 -115 115 115 grey45 -117 117 117 gray46 -117 117 117 grey46 -120 120 120 gray47 -120 120 120 grey47 -122 122 122 gray48 -122 122 122 grey48 -125 125 125 gray49 -125 125 125 grey49 -127 127 127 gray50 -127 127 127 grey50 -130 130 130 gray51 -130 130 130 grey51 -133 133 133 gray52 -133 133 133 grey52 -135 135 135 gray53 -135 135 135 grey53 -138 138 138 gray54 -138 138 138 grey54 -140 140 140 gray55 -140 140 140 grey55 -143 143 143 gray56 -143 143 143 grey56 -145 145 145 gray57 -145 145 145 grey57 -148 148 148 gray58 -148 148 148 grey58 -150 150 150 gray59 -150 150 150 grey59 -153 153 153 gray60 -153 153 153 grey60 -156 156 156 gray61 -156 156 156 grey61 -158 158 158 gray62 -158 158 158 grey62 -161 161 161 gray63 -161 161 161 grey63 -163 163 163 gray64 -163 163 163 grey64 -166 166 166 gray65 -166 166 166 grey65 -168 168 168 gray66 -168 168 168 grey66 -171 171 171 gray67 -171 171 171 grey67 -173 173 173 gray68 -173 173 173 grey68 -176 176 176 gray69 -176 176 176 grey69 -179 179 179 gray70 -179 179 179 grey70 -181 181 181 gray71 -181 181 181 grey71 -184 184 184 gray72 -184 184 184 grey72 -186 186 186 gray73 -186 186 186 grey73 -189 189 189 gray74 -189 189 189 grey74 -191 191 191 gray75 -191 191 191 grey75 -194 194 194 gray76 -194 194 194 grey76 -196 196 196 gray77 -196 196 196 grey77 -199 199 199 gray78 -199 199 199 grey78 -201 201 201 gray79 -201 201 201 grey79 -204 204 204 gray80 -204 204 204 grey80 -207 207 207 gray81 -207 207 207 grey81 -209 209 209 gray82 -209 209 209 grey82 -212 212 212 gray83 -212 212 212 grey83 -214 214 214 gray84 -214 214 214 grey84 -217 217 217 gray85 -217 217 217 grey85 -219 219 219 gray86 -219 219 219 grey86 -222 222 222 gray87 -222 222 222 grey87 -224 224 224 gray88 -224 224 224 grey88 -227 227 227 gray89 -227 227 227 grey89 -229 229 229 gray90 -229 229 229 grey90 -232 232 232 gray91 -232 232 232 grey91 -235 235 235 gray92 -235 235 235 grey92 -237 237 237 gray93 -237 237 237 grey93 -240 240 240 gray94 -240 240 240 grey94 -242 242 242 gray95 -242 242 242 grey95 -245 245 245 gray96 -245 245 245 grey96 -247 247 247 gray97 -247 247 247 grey97 -250 250 250 gray98 -250 250 250 grey98 -252 252 252 gray99 -252 252 252 grey99 -255 255 255 gray100 -255 255 255 grey100 -169 169 169 dark grey -169 169 169 DarkGrey -169 169 169 dark gray -169 169 169 DarkGray -0 0 139 dark blue -0 0 139 DarkBlue -0 139 139 dark cyan -0 139 139 DarkCyan -139 0 139 dark magenta -139 0 139 DarkMagenta -139 0 0 dark red -139 0 0 DarkRed -144 238 144 light green -144 238 144 LightGreen diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 384bc57e8..fcb83679c 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -86,10 +86,6 @@ if [ "x$MODE" = "xfull" ]; then cp -v debian/patches/$file doc/applied-patches echo ${file##*/} >> doc/applied-patches/series done - mkdir -p ./etc/ - cp -v debian/rgb ./etc/ - cp -v debian/nxagent.keyboard ./etc/ - cp -v debian/x2goagent.keyboard ./etc/ else rm -Rf "nxcompshad"* rm -Rf "nxcompext"* @@ -101,8 +97,6 @@ else done fi cp -v debian/COPYING.full+lite COPYING -cp -v debian/nxagent.keyboard nxagent.keyboard -cp -v debian/x2goagent.keyboard x2goagent.keyboard # apply all patches shipped in debian/patches and create a copy of them that we ship with the tarball if [ -s "doc/applied-patches/series" ]; then @@ -116,12 +110,6 @@ for f in $(ls README* 2>/dev/null); do mv -v $f doc/; done -if [ "$MODE" = "full" ]; then - # provide a default keystrokes.cfg file - mkdir -p etc - test -f etc/keystrokes.cfg || test -f debian/keystrokes.cfg && cp -v debian/keystrokes.cfg etc/keystrokes.cfg -fi - # remove folders that we do not want to roll into the tarball rm -Rf ".pc/" rm -Rf "debian/" diff --git a/debian/rules b/debian/rules index 7b60a46a4..2375b46ac 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,6 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -fR etc/rgb etc/keystrokes.cfg etc/nxagent.keyboard etc/x2goagent.keyboard rm -f debian/libnx-xinerama1.postinst rm -fR .preserve/ dh_clean @@ -78,12 +77,6 @@ override_dh_auto_install: override_dh_auto_build: - mkdir -p etc/ - ln -s ../debian/keystrokes.cfg etc/keystrokes.cfg - ln -s ../debian/rgb etc/rgb - ln -s ../debian/nxagent.keyboard etc/nxagent.keyboard - ln -s ../debian/x2goagent.keyboard etc/x2goagent.keyboard - # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst diff --git a/debian/x2goagent.keyboard b/debian/x2goagent.keyboard deleted file mode 100644 index afe283260..000000000 --- a/debian/x2goagent.keyboard +++ /dev/null @@ -1 +0,0 @@ -rules=xfree86 diff --git a/etc/keystrokes.cfg b/etc/keystrokes.cfg new file mode 100644 index 000000000..a5e521071 --- /dev/null +++ b/etc/keystrokes.cfg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/etc/nxagent.keyboard b/etc/nxagent.keyboard new file mode 100644 index 000000000..afe283260 --- /dev/null +++ b/etc/nxagent.keyboard @@ -0,0 +1 @@ +rules=xfree86 diff --git a/etc/rgb b/etc/rgb new file mode 100644 index 000000000..b9e56c602 --- /dev/null +++ b/etc/rgb @@ -0,0 +1,754 @@ +! $Xorg: rgb.txt,v 1.3 2000/08/17 19:54:00 cpqbld Exp $ +255 250 250 snow +248 248 255 ghost white +248 248 255 GhostWhite +245 245 245 white smoke +245 245 245 WhiteSmoke +220 220 220 gainsboro +255 250 240 floral white +255 250 240 FloralWhite +253 245 230 old lace +253 245 230 OldLace +250 240 230 linen +250 235 215 antique white +250 235 215 AntiqueWhite +255 239 213 papaya whip +255 239 213 PapayaWhip +255 235 205 blanched almond +255 235 205 BlanchedAlmond +255 228 196 bisque +255 218 185 peach puff +255 218 185 PeachPuff +255 222 173 navajo white +255 222 173 NavajoWhite +255 228 181 moccasin +255 248 220 cornsilk +255 255 240 ivory +255 250 205 lemon chiffon +255 250 205 LemonChiffon +255 245 238 seashell +240 255 240 honeydew +245 255 250 mint cream +245 255 250 MintCream +240 255 255 azure +240 248 255 alice blue +240 248 255 AliceBlue +230 230 250 lavender +255 240 245 lavender blush +255 240 245 LavenderBlush +255 228 225 misty rose +255 228 225 MistyRose +255 255 255 white + 0 0 0 black + 47 79 79 dark slate gray + 47 79 79 DarkSlateGray + 47 79 79 dark slate grey + 47 79 79 DarkSlateGrey +105 105 105 dim gray +105 105 105 DimGray +105 105 105 dim grey +105 105 105 DimGrey +112 128 144 slate gray +112 128 144 SlateGray +112 128 144 slate grey +112 128 144 SlateGrey +119 136 153 light slate gray +119 136 153 LightSlateGray +119 136 153 light slate grey +119 136 153 LightSlateGrey +190 190 190 gray +190 190 190 grey +211 211 211 light grey +211 211 211 LightGrey +211 211 211 light gray +211 211 211 LightGray + 25 25 112 midnight blue + 25 25 112 MidnightBlue + 0 0 128 navy + 0 0 128 navy blue + 0 0 128 NavyBlue +100 149 237 cornflower blue +100 149 237 CornflowerBlue + 72 61 139 dark slate blue + 72 61 139 DarkSlateBlue +106 90 205 slate blue +106 90 205 SlateBlue +123 104 238 medium slate blue +123 104 238 MediumSlateBlue +132 112 255 light slate blue +132 112 255 LightSlateBlue + 0 0 205 medium blue + 0 0 205 MediumBlue + 65 105 225 royal blue + 65 105 225 RoyalBlue + 0 0 255 blue + 30 144 255 dodger blue + 30 144 255 DodgerBlue + 0 191 255 deep sky blue + 0 191 255 DeepSkyBlue +135 206 235 sky blue +135 206 235 SkyBlue +135 206 250 light sky blue +135 206 250 LightSkyBlue + 70 130 180 steel blue + 70 130 180 SteelBlue +176 196 222 light steel blue +176 196 222 LightSteelBlue +173 216 230 light blue +173 216 230 LightBlue +176 224 230 powder blue +176 224 230 PowderBlue +175 238 238 pale turquoise +175 238 238 PaleTurquoise + 0 206 209 dark turquoise + 0 206 209 DarkTurquoise + 72 209 204 medium turquoise + 72 209 204 MediumTurquoise + 64 224 208 turquoise + 0 255 255 cyan +224 255 255 light cyan +224 255 255 LightCyan + 95 158 160 cadet blue + 95 158 160 CadetBlue +102 205 170 medium aquamarine +102 205 170 MediumAquamarine +127 255 212 aquamarine + 0 100 0 dark green + 0 100 0 DarkGreen + 85 107 47 dark olive green + 85 107 47 DarkOliveGreen +143 188 143 dark sea green +143 188 143 DarkSeaGreen + 46 139 87 sea green + 46 139 87 SeaGreen + 60 179 113 medium sea green + 60 179 113 MediumSeaGreen + 32 178 170 light sea green + 32 178 170 LightSeaGreen +152 251 152 pale green +152 251 152 PaleGreen + 0 255 127 spring green + 0 255 127 SpringGreen +124 252 0 lawn green +124 252 0 LawnGreen + 0 255 0 green +127 255 0 chartreuse + 0 250 154 medium spring green + 0 250 154 MediumSpringGreen +173 255 47 green yellow +173 255 47 GreenYellow + 50 205 50 lime green + 50 205 50 LimeGreen +154 205 50 yellow green +154 205 50 YellowGreen + 34 139 34 forest green + 34 139 34 ForestGreen +107 142 35 olive drab +107 142 35 OliveDrab +189 183 107 dark khaki +189 183 107 DarkKhaki +240 230 140 khaki +238 232 170 pale goldenrod +238 232 170 PaleGoldenrod +250 250 210 light goldenrod yellow +250 250 210 LightGoldenrodYellow +255 255 224 light yellow +255 255 224 LightYellow +255 255 0 yellow +255 215 0 gold +238 221 130 light goldenrod +238 221 130 LightGoldenrod +218 165 32 goldenrod +184 134 11 dark goldenrod +184 134 11 DarkGoldenrod +188 143 143 rosy brown +188 143 143 RosyBrown +205 92 92 indian red +205 92 92 IndianRed +139 69 19 saddle brown +139 69 19 SaddleBrown +160 82 45 sienna +205 133 63 peru +222 184 135 burlywood +245 245 220 beige +245 222 179 wheat +244 164 96 sandy brown +244 164 96 SandyBrown +210 180 140 tan +210 105 30 chocolate +178 34 34 firebrick +165 42 42 brown +233 150 122 dark salmon +233 150 122 DarkSalmon +250 128 114 salmon +255 160 122 light salmon +255 160 122 LightSalmon +255 165 0 orange +255 140 0 dark orange +255 140 0 DarkOrange +255 127 80 coral +240 128 128 light coral +240 128 128 LightCoral +255 99 71 tomato +255 69 0 orange red +255 69 0 OrangeRed +255 0 0 red +255 105 180 hot pink +255 105 180 HotPink +255 20 147 deep pink +255 20 147 DeepPink +255 192 203 pink +255 182 193 light pink +255 182 193 LightPink +219 112 147 pale violet red +219 112 147 PaleVioletRed +176 48 96 maroon +199 21 133 medium violet red +199 21 133 MediumVioletRed +208 32 144 violet red +208 32 144 VioletRed +255 0 255 magenta +238 130 238 violet +221 160 221 plum +218 112 214 orchid +186 85 211 medium orchid +186 85 211 MediumOrchid +153 50 204 dark orchid +153 50 204 DarkOrchid +148 0 211 dark violet +148 0 211 DarkViolet +138 43 226 blue violet +138 43 226 BlueViolet +160 32 240 purple +147 112 219 medium purple +147 112 219 MediumPurple +216 191 216 thistle +255 250 250 snow1 +238 233 233 snow2 +205 201 201 snow3 +139 137 137 snow4 +255 245 238 seashell1 +238 229 222 seashell2 +205 197 191 seashell3 +139 134 130 seashell4 +255 239 219 AntiqueWhite1 +238 223 204 AntiqueWhite2 +205 192 176 AntiqueWhite3 +139 131 120 AntiqueWhite4 +255 228 196 bisque1 +238 213 183 bisque2 +205 183 158 bisque3 +139 125 107 bisque4 +255 218 185 PeachPuff1 +238 203 173 PeachPuff2 +205 175 149 PeachPuff3 +139 119 101 PeachPuff4 +255 222 173 NavajoWhite1 +238 207 161 NavajoWhite2 +205 179 139 NavajoWhite3 +139 121 94 NavajoWhite4 +255 250 205 LemonChiffon1 +238 233 191 LemonChiffon2 +205 201 165 LemonChiffon3 +139 137 112 LemonChiffon4 +255 248 220 cornsilk1 +238 232 205 cornsilk2 +205 200 177 cornsilk3 +139 136 120 cornsilk4 +255 255 240 ivory1 +238 238 224 ivory2 +205 205 193 ivory3 +139 139 131 ivory4 +240 255 240 honeydew1 +224 238 224 honeydew2 +193 205 193 honeydew3 +131 139 131 honeydew4 +255 240 245 LavenderBlush1 +238 224 229 LavenderBlush2 +205 193 197 LavenderBlush3 +139 131 134 LavenderBlush4 +255 228 225 MistyRose1 +238 213 210 MistyRose2 +205 183 181 MistyRose3 +139 125 123 MistyRose4 +240 255 255 azure1 +224 238 238 azure2 +193 205 205 azure3 +131 139 139 azure4 +131 111 255 SlateBlue1 +122 103 238 SlateBlue2 +105 89 205 SlateBlue3 + 71 60 139 SlateBlue4 + 72 118 255 RoyalBlue1 + 67 110 238 RoyalBlue2 + 58 95 205 RoyalBlue3 + 39 64 139 RoyalBlue4 + 0 0 255 blue1 + 0 0 238 blue2 + 0 0 205 blue3 + 0 0 139 blue4 + 30 144 255 DodgerBlue1 + 28 134 238 DodgerBlue2 + 24 116 205 DodgerBlue3 + 16 78 139 DodgerBlue4 + 99 184 255 SteelBlue1 + 92 172 238 SteelBlue2 + 79 148 205 SteelBlue3 + 54 100 139 SteelBlue4 + 0 191 255 DeepSkyBlue1 + 0 178 238 DeepSkyBlue2 + 0 154 205 DeepSkyBlue3 + 0 104 139 DeepSkyBlue4 +135 206 255 SkyBlue1 +126 192 238 SkyBlue2 +108 166 205 SkyBlue3 + 74 112 139 SkyBlue4 +176 226 255 LightSkyBlue1 +164 211 238 LightSkyBlue2 +141 182 205 LightSkyBlue3 + 96 123 139 LightSkyBlue4 +198 226 255 SlateGray1 +185 211 238 SlateGray2 +159 182 205 SlateGray3 +108 123 139 SlateGray4 +202 225 255 LightSteelBlue1 +188 210 238 LightSteelBlue2 +162 181 205 LightSteelBlue3 +110 123 139 LightSteelBlue4 +191 239 255 LightBlue1 +178 223 238 LightBlue2 +154 192 205 LightBlue3 +104 131 139 LightBlue4 +224 255 255 LightCyan1 +209 238 238 LightCyan2 +180 205 205 LightCyan3 +122 139 139 LightCyan4 +187 255 255 PaleTurquoise1 +174 238 238 PaleTurquoise2 +150 205 205 PaleTurquoise3 +102 139 139 PaleTurquoise4 +152 245 255 CadetBlue1 +142 229 238 CadetBlue2 +122 197 205 CadetBlue3 + 83 134 139 CadetBlue4 + 0 245 255 turquoise1 + 0 229 238 turquoise2 + 0 197 205 turquoise3 + 0 134 139 turquoise4 + 0 255 255 cyan1 + 0 238 238 cyan2 + 0 205 205 cyan3 + 0 139 139 cyan4 +151 255 255 DarkSlateGray1 +141 238 238 DarkSlateGray2 +121 205 205 DarkSlateGray3 + 82 139 139 DarkSlateGray4 +127 255 212 aquamarine1 +118 238 198 aquamarine2 +102 205 170 aquamarine3 + 69 139 116 aquamarine4 +193 255 193 DarkSeaGreen1 +180 238 180 DarkSeaGreen2 +155 205 155 DarkSeaGreen3 +105 139 105 DarkSeaGreen4 + 84 255 159 SeaGreen1 + 78 238 148 SeaGreen2 + 67 205 128 SeaGreen3 + 46 139 87 SeaGreen4 +154 255 154 PaleGreen1 +144 238 144 PaleGreen2 +124 205 124 PaleGreen3 + 84 139 84 PaleGreen4 + 0 255 127 SpringGreen1 + 0 238 118 SpringGreen2 + 0 205 102 SpringGreen3 + 0 139 69 SpringGreen4 + 0 255 0 green1 + 0 238 0 green2 + 0 205 0 green3 + 0 139 0 green4 +127 255 0 chartreuse1 +118 238 0 chartreuse2 +102 205 0 chartreuse3 + 69 139 0 chartreuse4 +192 255 62 OliveDrab1 +179 238 58 OliveDrab2 +154 205 50 OliveDrab3 +105 139 34 OliveDrab4 +202 255 112 DarkOliveGreen1 +188 238 104 DarkOliveGreen2 +162 205 90 DarkOliveGreen3 +110 139 61 DarkOliveGreen4 +255 246 143 khaki1 +238 230 133 khaki2 +205 198 115 khaki3 +139 134 78 khaki4 +255 236 139 LightGoldenrod1 +238 220 130 LightGoldenrod2 +205 190 112 LightGoldenrod3 +139 129 76 LightGoldenrod4 +255 255 224 LightYellow1 +238 238 209 LightYellow2 +205 205 180 LightYellow3 +139 139 122 LightYellow4 +255 255 0 yellow1 +238 238 0 yellow2 +205 205 0 yellow3 +139 139 0 yellow4 +255 215 0 gold1 +238 201 0 gold2 +205 173 0 gold3 +139 117 0 gold4 +255 193 37 goldenrod1 +238 180 34 goldenrod2 +205 155 29 goldenrod3 +139 105 20 goldenrod4 +255 185 15 DarkGoldenrod1 +238 173 14 DarkGoldenrod2 +205 149 12 DarkGoldenrod3 +139 101 8 DarkGoldenrod4 +255 193 193 RosyBrown1 +238 180 180 RosyBrown2 +205 155 155 RosyBrown3 +139 105 105 RosyBrown4 +255 106 106 IndianRed1 +238 99 99 IndianRed2 +205 85 85 IndianRed3 +139 58 58 IndianRed4 +255 130 71 sienna1 +238 121 66 sienna2 +205 104 57 sienna3 +139 71 38 sienna4 +255 211 155 burlywood1 +238 197 145 burlywood2 +205 170 125 burlywood3 +139 115 85 burlywood4 +255 231 186 wheat1 +238 216 174 wheat2 +205 186 150 wheat3 +139 126 102 wheat4 +255 165 79 tan1 +238 154 73 tan2 +205 133 63 tan3 +139 90 43 tan4 +255 127 36 chocolate1 +238 118 33 chocolate2 +205 102 29 chocolate3 +139 69 19 chocolate4 +255 48 48 firebrick1 +238 44 44 firebrick2 +205 38 38 firebrick3 +139 26 26 firebrick4 +255 64 64 brown1 +238 59 59 brown2 +205 51 51 brown3 +139 35 35 brown4 +255 140 105 salmon1 +238 130 98 salmon2 +205 112 84 salmon3 +139 76 57 salmon4 +255 160 122 LightSalmon1 +238 149 114 LightSalmon2 +205 129 98 LightSalmon3 +139 87 66 LightSalmon4 +255 165 0 orange1 +238 154 0 orange2 +205 133 0 orange3 +139 90 0 orange4 +255 127 0 DarkOrange1 +238 118 0 DarkOrange2 +205 102 0 DarkOrange3 +139 69 0 DarkOrange4 +255 114 86 coral1 +238 106 80 coral2 +205 91 69 coral3 +139 62 47 coral4 +255 99 71 tomato1 +238 92 66 tomato2 +205 79 57 tomato3 +139 54 38 tomato4 +255 69 0 OrangeRed1 +238 64 0 OrangeRed2 +205 55 0 OrangeRed3 +139 37 0 OrangeRed4 +255 0 0 red1 +238 0 0 red2 +205 0 0 red3 +139 0 0 red4 +215 7 81 DebianRed +255 20 147 DeepPink1 +238 18 137 DeepPink2 +205 16 118 DeepPink3 +139 10 80 DeepPink4 +255 110 180 HotPink1 +238 106 167 HotPink2 +205 96 144 HotPink3 +139 58 98 HotPink4 +255 181 197 pink1 +238 169 184 pink2 +205 145 158 pink3 +139 99 108 pink4 +255 174 185 LightPink1 +238 162 173 LightPink2 +205 140 149 LightPink3 +139 95 101 LightPink4 +255 130 171 PaleVioletRed1 +238 121 159 PaleVioletRed2 +205 104 137 PaleVioletRed3 +139 71 93 PaleVioletRed4 +255 52 179 maroon1 +238 48 167 maroon2 +205 41 144 maroon3 +139 28 98 maroon4 +255 62 150 VioletRed1 +238 58 140 VioletRed2 +205 50 120 VioletRed3 +139 34 82 VioletRed4 +255 0 255 magenta1 +238 0 238 magenta2 +205 0 205 magenta3 +139 0 139 magenta4 +255 131 250 orchid1 +238 122 233 orchid2 +205 105 201 orchid3 +139 71 137 orchid4 +255 187 255 plum1 +238 174 238 plum2 +205 150 205 plum3 +139 102 139 plum4 +224 102 255 MediumOrchid1 +209 95 238 MediumOrchid2 +180 82 205 MediumOrchid3 +122 55 139 MediumOrchid4 +191 62 255 DarkOrchid1 +178 58 238 DarkOrchid2 +154 50 205 DarkOrchid3 +104 34 139 DarkOrchid4 +155 48 255 purple1 +145 44 238 purple2 +125 38 205 purple3 + 85 26 139 purple4 +171 130 255 MediumPurple1 +159 121 238 MediumPurple2 +137 104 205 MediumPurple3 + 93 71 139 MediumPurple4 +255 225 255 thistle1 +238 210 238 thistle2 +205 181 205 thistle3 +139 123 139 thistle4 + 0 0 0 gray0 + 0 0 0 grey0 + 3 3 3 gray1 + 3 3 3 grey1 + 5 5 5 gray2 + 5 5 5 grey2 + 8 8 8 gray3 + 8 8 8 grey3 + 10 10 10 gray4 + 10 10 10 grey4 + 13 13 13 gray5 + 13 13 13 grey5 + 15 15 15 gray6 + 15 15 15 grey6 + 18 18 18 gray7 + 18 18 18 grey7 + 20 20 20 gray8 + 20 20 20 grey8 + 23 23 23 gray9 + 23 23 23 grey9 + 26 26 26 gray10 + 26 26 26 grey10 + 28 28 28 gray11 + 28 28 28 grey11 + 31 31 31 gray12 + 31 31 31 grey12 + 33 33 33 gray13 + 33 33 33 grey13 + 36 36 36 gray14 + 36 36 36 grey14 + 38 38 38 gray15 + 38 38 38 grey15 + 41 41 41 gray16 + 41 41 41 grey16 + 43 43 43 gray17 + 43 43 43 grey17 + 46 46 46 gray18 + 46 46 46 grey18 + 48 48 48 gray19 + 48 48 48 grey19 + 51 51 51 gray20 + 51 51 51 grey20 + 54 54 54 gray21 + 54 54 54 grey21 + 56 56 56 gray22 + 56 56 56 grey22 + 59 59 59 gray23 + 59 59 59 grey23 + 61 61 61 gray24 + 61 61 61 grey24 + 64 64 64 gray25 + 64 64 64 grey25 + 66 66 66 gray26 + 66 66 66 grey26 + 69 69 69 gray27 + 69 69 69 grey27 + 71 71 71 gray28 + 71 71 71 grey28 + 74 74 74 gray29 + 74 74 74 grey29 + 77 77 77 gray30 + 77 77 77 grey30 + 79 79 79 gray31 + 79 79 79 grey31 + 82 82 82 gray32 + 82 82 82 grey32 + 84 84 84 gray33 + 84 84 84 grey33 + 87 87 87 gray34 + 87 87 87 grey34 + 89 89 89 gray35 + 89 89 89 grey35 + 92 92 92 gray36 + 92 92 92 grey36 + 94 94 94 gray37 + 94 94 94 grey37 + 97 97 97 gray38 + 97 97 97 grey38 + 99 99 99 gray39 + 99 99 99 grey39 +102 102 102 gray40 +102 102 102 grey40 +105 105 105 gray41 +105 105 105 grey41 +107 107 107 gray42 +107 107 107 grey42 +110 110 110 gray43 +110 110 110 grey43 +112 112 112 gray44 +112 112 112 grey44 +115 115 115 gray45 +115 115 115 grey45 +117 117 117 gray46 +117 117 117 grey46 +120 120 120 gray47 +120 120 120 grey47 +122 122 122 gray48 +122 122 122 grey48 +125 125 125 gray49 +125 125 125 grey49 +127 127 127 gray50 +127 127 127 grey50 +130 130 130 gray51 +130 130 130 grey51 +133 133 133 gray52 +133 133 133 grey52 +135 135 135 gray53 +135 135 135 grey53 +138 138 138 gray54 +138 138 138 grey54 +140 140 140 gray55 +140 140 140 grey55 +143 143 143 gray56 +143 143 143 grey56 +145 145 145 gray57 +145 145 145 grey57 +148 148 148 gray58 +148 148 148 grey58 +150 150 150 gray59 +150 150 150 grey59 +153 153 153 gray60 +153 153 153 grey60 +156 156 156 gray61 +156 156 156 grey61 +158 158 158 gray62 +158 158 158 grey62 +161 161 161 gray63 +161 161 161 grey63 +163 163 163 gray64 +163 163 163 grey64 +166 166 166 gray65 +166 166 166 grey65 +168 168 168 gray66 +168 168 168 grey66 +171 171 171 gray67 +171 171 171 grey67 +173 173 173 gray68 +173 173 173 grey68 +176 176 176 gray69 +176 176 176 grey69 +179 179 179 gray70 +179 179 179 grey70 +181 181 181 gray71 +181 181 181 grey71 +184 184 184 gray72 +184 184 184 grey72 +186 186 186 gray73 +186 186 186 grey73 +189 189 189 gray74 +189 189 189 grey74 +191 191 191 gray75 +191 191 191 grey75 +194 194 194 gray76 +194 194 194 grey76 +196 196 196 gray77 +196 196 196 grey77 +199 199 199 gray78 +199 199 199 grey78 +201 201 201 gray79 +201 201 201 grey79 +204 204 204 gray80 +204 204 204 grey80 +207 207 207 gray81 +207 207 207 grey81 +209 209 209 gray82 +209 209 209 grey82 +212 212 212 gray83 +212 212 212 grey83 +214 214 214 gray84 +214 214 214 grey84 +217 217 217 gray85 +217 217 217 grey85 +219 219 219 gray86 +219 219 219 grey86 +222 222 222 gray87 +222 222 222 grey87 +224 224 224 gray88 +224 224 224 grey88 +227 227 227 gray89 +227 227 227 grey89 +229 229 229 gray90 +229 229 229 grey90 +232 232 232 gray91 +232 232 232 grey91 +235 235 235 gray92 +235 235 235 grey92 +237 237 237 gray93 +237 237 237 grey93 +240 240 240 gray94 +240 240 240 grey94 +242 242 242 gray95 +242 242 242 grey95 +245 245 245 gray96 +245 245 245 grey96 +247 247 247 gray97 +247 247 247 grey97 +250 250 250 gray98 +250 250 250 grey98 +252 252 252 gray99 +252 252 252 grey99 +255 255 255 gray100 +255 255 255 grey100 +169 169 169 dark grey +169 169 169 DarkGrey +169 169 169 dark gray +169 169 169 DarkGray +0 0 139 dark blue +0 0 139 DarkBlue +0 139 139 dark cyan +0 139 139 DarkCyan +139 0 139 dark magenta +139 0 139 DarkMagenta +139 0 0 dark red +139 0 0 DarkRed +144 238 144 light green +144 238 144 LightGreen diff --git a/etc/x2goagent.keyboard b/etc/x2goagent.keyboard new file mode 100644 index 000000000..afe283260 --- /dev/null +++ b/etc/x2goagent.keyboard @@ -0,0 +1 @@ +rules=xfree86 diff --git a/nx-libs.spec b/nx-libs.spec index ccbf6f9da..5c1064f33 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -659,14 +659,6 @@ information on NX. %prep %setup -q -# copy files from the debian/ folder to designated places in the source tree, -# taken from roll-tarball.sh: -mkdir etc/ -cp -v debian/keystrokes.cfg etc/keystrokes.cfg -cp -v debian/rgb etc/rgb -cp -v debian/nxagent.keyboard etc/nxagent.keyboard -cp -v debian/x2goagent.keyboard etc/x2goagent.keyboard - # remove build cruft that is in Git (also taken from roll-tarball.sh) rm -Rf nx*/configure nx*/autom4te.cache* # Install into /usr -- cgit v1.2.3 From 902dc519d96be582088e5fe0644cefac7ecc0133 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 15:58:11 +0100 Subject: Move COPYING.full+lite as COPYING to / Adapted packaging scripts: debian/roll-tarballs.sh nx-libs.spec --- COPYING | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/COPYING.full+lite | 55 ------------------------------------------------ debian/roll-tarballs.sh | 1 - nx-libs.spec | 11 ++++++---- 4 files changed, 62 insertions(+), 60 deletions(-) create mode 100644 COPYING delete mode 100644 debian/COPYING.full+lite (limited to 'debian') diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..a2b32ef06 --- /dev/null +++ b/COPYING @@ -0,0 +1,55 @@ +The software components were originally downloaded from http://www.nomachine.com/sources.php + +The software has been improved via various patches by the X2Go project. +The patches reside in the subfolder doc/applied-patches/ of this source tree. + +Copyright (c) 2011-2014 X2Go Project, http://www.x2go.org/. +Copyright (c) 2001-2011 NoMachine, http://www.nomachine.com/. + + 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., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Parts of this software are derived from DXPC project. These copyright +notices apply to original DXPC code: + + Redistribution and use in source and binary forms are permitted provided + that the above copyright notice and this paragraph are duplicated in all + such forms. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + Copyright (c) 1995,1996 Brian Pane + Copyright (c) 1996,1997 Zachary Vonler and Brian Pane + Copyright (c) 1999 Kevin Vigor and Brian Pane + Copyright (c) 2000,2001 Gian Filippo Pinzari and Brian Pane + +The files MD5.[ch] are copyright (C) 1999, 2000, 2002 Aladdin Enterprises. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. diff --git a/debian/COPYING.full+lite b/debian/COPYING.full+lite deleted file mode 100644 index a2b32ef06..000000000 --- a/debian/COPYING.full+lite +++ /dev/null @@ -1,55 +0,0 @@ -The software components were originally downloaded from http://www.nomachine.com/sources.php - -The software has been improved via various patches by the X2Go project. -The patches reside in the subfolder doc/applied-patches/ of this source tree. - -Copyright (c) 2011-2014 X2Go Project, http://www.x2go.org/. -Copyright (c) 2001-2011 NoMachine, http://www.nomachine.com/. - - 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., 51 - Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Parts of this software are derived from DXPC project. These copyright -notices apply to original DXPC code: - - Redistribution and use in source and binary forms are permitted provided - that the above copyright notice and this paragraph are duplicated in all - such forms. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - Copyright (c) 1995,1996 Brian Pane - Copyright (c) 1996,1997 Zachary Vonler and Brian Pane - Copyright (c) 1999 Kevin Vigor and Brian Pane - Copyright (c) 2000,2001 Gian Filippo Pinzari and Brian Pane - -The files MD5.[ch] are copyright (C) 1999, 2000, 2002 Aladdin Enterprises. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index fcb83679c..c7cac5f08 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -96,7 +96,6 @@ else echo ${file##*/} >> doc/applied-patches/series done fi -cp -v debian/COPYING.full+lite COPYING # apply all patches shipped in debian/patches and create a copy of them that we ship with the tarball if [ -s "doc/applied-patches/series" ]; then diff --git a/nx-libs.spec b/nx-libs.spec index 5c1064f33..f4084d9f2 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -768,7 +768,8 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %files %defattr(-,root,root) -%doc nx-X11/{COPYING,LICENSE,README} +%doc COPYING +%doc nx-X11/README %dir %{_libdir}/nx %dir %{_libdir}/nx/X11 %dir %{_datadir}/nx @@ -913,7 +914,8 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %files -n libXcomp3 %defattr(-,root,root) -%doc nxcomp/{COPYING,LICENSE,README} +%doc COPYING +%doc nxcomp/README %_libdir/libXcomp.so.3* %files -n libXcompext-devel @@ -924,7 +926,8 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %files -n libXcompext3 %defattr(-,root,root) -%doc nxcompext/{COPYING,LICENSE,README} +%doc COPYING +%doc nxcompext/README %_libdir/libXcompext.so.3* %files -n libXcompshad-devel @@ -944,7 +947,7 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %files -n libXcompshad3 %defattr(-,root,root) -%doc nxcompshad/{COPYING,LICENSE} +%doc COPYING %_libdir/libXcompshad.so.3* %files devel -- cgit v1.2.3 From e4d97018b4bed33afb3a6c61894272615f97e43d Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Sat, 14 Feb 2015 17:07:21 -0500 Subject: Fix FTBFS due to the nxproxy executable already existing under /usr/lib/nx/bin/nx Conflicts (resolved by Mike Gabriel): debian/changelog --- Makefile | 2 -- debian/changelog | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 67 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/Makefile b/Makefile index 3aeda739b..52326fb22 100644 --- a/Makefile +++ b/Makefile @@ -62,8 +62,6 @@ install-lite: $(INSTALL_DIR) $(DESTDIR)$(BINDIR) for d in nxcomp nxproxy; do \ $(MAKE) -C $$d install; done - mkdir -p $(DESTDIR)$(NXLIBDIR)/bin/ - mv $(DESTDIR)$(BINDIR)/nxproxy $(DESTDIR)$(NXLIBDIR)/bin/ for f in nxproxy; do \ $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done diff --git a/debian/changelog b/debian/changelog index 834868790..0eae634e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -125,8 +125,73 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium (Fixes: #744). [ Michael DePaulo ] - * debian/rules: - + Fix build for LDFLAGS containing spaces. + * Security fixes: + - Rebase loads of X.Org patches (mainly from RHEL-5) against NX. If not + all patches from a CVE patch series appear here, then it means that + the affected file/code is not used in NX at build time. + + - X.Org CVE-2011-2895: + 1001-LZW-decompress-fix-for-CVE-2011-2895-From-xorg-lib-X.patch + - X.Org CVE-2011-4028: + 1002-Fix-CVE-2011-4028-File-disclosure-vulnerability.-ups.patch + - X.Org CVE-2013-4396: + 1003-Avoid-use-after-free-in-dix-dixfonts.c-doImageText-C.patch + - X.Org CVE-2013-6462: + 1004-CVE-2013-6462-unlimited-sscanf-overflows-stack-buffe.patch + - X.Org CVE-2014-0209: + 1005-CVE-2014-0209-integer-overflow-of-realloc-size-in-Fo.patch + 1006-CVE-2014-0209-integer-overflow-of-realloc-size-in-le.patch + - X.Org CVE-2014-0210: + 1007-CVE-2014-0210-unvalidated-length-in-_fs_recv_conn_se.patch + 1009-CVE-2014-0210-unvalidated-lengths-when-reading-repli.patch + 1011-CVE-2014-0210-unvalidated-length-fields-in-fs_read_q.patch + 1014-CVE-2014-0210-unvalidated-length-fields-in-fs_read_e.patch + 1015-CVE-2014-0210-unvalidated-length-fields-in-fs_read_g.patch + 1016-CVE-2014-0210-unvalidated-length-fields-in-fs_read_l.patch + 1017-CVE-2014-0210-unvalidated-length-fields-in-fs_read_l.patch + - X.Org CVE-2014-0211: + 1010-CVE-2014-0211-Integer-overflow-in-fs_get_reply-_fs_s.patch + 1012-CVE-2014-0211-integer-overflow-in-fs_read_extent_inf.patch + 1013-CVE-2014-0211-integer-overflow-in-fs_alloc_glyphs-fr.patch + 1018-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch + - X.Org CVE-2014-8092: + 1019-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch + 1020-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch + 1021-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch + 1022-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch + - X.Org CVE-2014-8097: + 1023-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch + - X.Org CVE-2014-8095: + 1024-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch + - X.Org CVE-2014-8096: + 1025-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch + - X.Org CVE-2014-8099: + 1026-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch + - X.Org CVE-2014-8100: + 1027-render-check-request-size-before-reading-it-CVE-2014.patch + 1028-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch + - X.Org CVE-2014-8102: + 1029-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch + - X.Org CVE-2014-8101: + 1030-randr-unvalidated-lengths-in-RandR-extension-swapped.patch + - X.Org CVE-2014-8093: + 1031-glx-Be-more-paranoid-about-variable-length-requests-.patch + 1032-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch + 1033-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch + 1034-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6-v4.patch + 1036-glx-Integer-overflow-protection-for-non-generated-re.patch + - X.Org CVE-2014-8098: + 1035-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch + 1037-glx-Top-level-length-checking-for-swapped-VendorPriv.patch + 1038-glx-Length-checking-for-non-generated-single-request.patch + 1039-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch + 1040-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch + + - Security fixes with no assigned CVE: + 1008-Don-t-crash-when-we-receive-an-FS_Error-from-the-fon.patch + + - Fix FTBFS due to the nxproxy executable already existing under + /usr/lib/nx/bin/nx/ [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. -- cgit v1.2.3 From f29cc29fd37731c09c04e615da4ee345bbc92733 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Feb 2015 21:55:30 +0100 Subject: Install "%{_libdir}/nx/bin" into nxproxy package. --- debian/changelog | 1 + nx-libs.spec | 2 ++ 2 files changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0eae634e9..bd10412ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -111,6 +111,7 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium time. + Assure that BuildRoot: is set. + On SLE 11.x: libX* packages are prefixed with "xorg-x11-". + + Install "%{_libdir}/nx/bin" into nxproxy package. * debian/roll-tarball.sh: + Install etc/ files into etc/ subfolder (rgb, nxagent.keyboard, diff --git a/nx-libs.spec b/nx-libs.spec index 533f58ffa..68ec27c12 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -1091,6 +1091,8 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_bindir}/nxproxy %{_mandir}/man1/nxproxy.1* %{_datadir}/man/man1/nxproxy.1* +%dir %{_libdir}/nx/bin +%{_libdir}/nx/bin/nxproxy %files -n x2goagent %defattr(-,root,root) -- cgit v1.2.3 From 892c08ddc4f4f7fc84b22081a53e4385a737ab23 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 16 Feb 2015 05:45:17 +0100 Subject: Make install-lite rule in Makefile.nx-libs more predictable and not rely on nxproxy/Makefile.in. --- Makefile | 15 ++++++++++----- debian/changelog | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/Makefile b/Makefile index 52326fb22..2c2cf3548 100644 --- a/Makefile +++ b/Makefile @@ -59,17 +59,22 @@ install: [ ! -d nx-X11 ] || $(MAKE) install-full install-lite: + # install nxcomp library + $(MAKE) -C nxcomp install + + # install nxproxy wrapper script $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - for d in nxcomp nxproxy; do \ - $(MAKE) -C $$d install; done - for f in nxproxy; do \ - $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done + $(INSTALL_PROGRAM) bin/nxproxy $(DESTDIR)$(BINDIR) + + # FIXME: the below install logic should work via nxproxy/Makefile.in + # overriding for now... + $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin + $(INSTALL_PROGRAM) nxproxy/nxproxy $(DESTDIR)$(NXLIBDIR)/bin $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ $(INSTALL_FILE) nxproxy/man/nxproxy.1 $(DESTDIR)$(PREFIX)/share/man/man1/ gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 - install-full: for f in nxagent nxauth x2goagent; do \ $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done diff --git a/debian/changelog b/debian/changelog index bd10412ed..ad42842bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium * Add Description: and Author: fields to various patch headers. * Makefile.nx-libs: Run make install for nxproxy first, then create the wrapper script. + * Make install-lite rule in Makefile.nx-libs more predictable and not + rely on nxproxy/Makefile.in. * NX code reduction efforts (from 93Mb to 41Mb): - Drop more unused code in nx-X11/programs/Xserver/hw/. Do this in -- cgit v1.2.3 From db12538ddeb32db3bfd1882d2bb34ff00809301e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 16 Feb 2015 05:51:02 +0100 Subject: Makefile.nx-libs: Fix uninstall-lite rule. The nxproxy and nxcomp uninstallation has to be in uninstall-lite, not in uninstall-full. --- Makefile | 14 +++++++++----- debian/changelog | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/Makefile b/Makefile index 2c2cf3548..f0c8a978b 100644 --- a/Makefile +++ b/Makefile @@ -164,8 +164,15 @@ uninstall: [ ! -d nx-X11 ] || $(MAKE) uninstall-full uninstall-lite: - for f in nxproxy; do \ - $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done + if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi + + # uninstall nproxy wrapper script + $(RM_FILE) $(DESTDIR)$(BINDIR)/nxproxy + # FIXME: don't use uninstall rule in nxproxy/Makefile.in, let's do + # it on our own for now... + $(RM_FILE) $(DESTDIR)$(NXLIBDIR)/bin/nxproxy + $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/bin/ + $(RM_FILE) $(DESTDIR)$(PREFIX)/share/man/man1/*.1 uninstall-full: for f in nxagent nxauth x2goagent; do \ @@ -174,9 +181,6 @@ uninstall-full: $(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent $(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ - if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi - if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi - if test -d nx-X11; then \ if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ diff --git a/debian/changelog b/debian/changelog index ad42842bf..476fadac1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,8 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium wrapper script. * Make install-lite rule in Makefile.nx-libs more predictable and not rely on nxproxy/Makefile.in. + * Makefile.nx-libs: Fix uninstall-lite rule. The nxproxy and nxcomp + uninstallation has to be in uninstall-lite, not in uninstall-full. * NX code reduction efforts (from 93Mb to 41Mb): - Drop more unused code in nx-X11/programs/Xserver/hw/. Do this in -- cgit v1.2.3 From 1f3222fa07c1695b13340247cde58a95ceaba1c5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 16 Feb 2015 06:19:54 +0100 Subject: debian/changelog: fix too-long lines --- debian/changelog | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 476fadac1..37a666ecc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -60,12 +60,12 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium process. - Update 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't patch files matter to the NX code reduction efforts. - - Update 031_nx-X11_parallel-make.full.patch. Don't patch .original files in - NX code tree. - - Drop patches: 017_nx-X11_update-autotools-helper-files.full.patch, - 018_nx-X11_update-libtool-ltmain-script.full.patch, - 019_nx-X11_expat-build-against-system-libxmltok.full.patch. They patch files - that are not used at build time. + - Update 0031_nx-X11_parallel-make.full.patch. Don't patch .original files + in NX code tree. + - Drop patches: 0017_nx-X11_update-autotools-helper-files.full.patch, + 0018_nx-X11_update-libtool-ltmain-script.full.patch, + 0019_nx-X11_expat-build-against-system-libxmltok.full.patch. They patch + files that are not used at build time. * Debian/Ubuntu packaging: + Fully rework the way nx-libs gets packaged for Debian/Ubuntu. -- cgit v1.2.3 From 26cfe931f864b92c4b6026002f37987c56665977 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 16 Feb 2015 06:24:38 +0100 Subject: fix 3.5.0.29 changelog entry --- debian/changelog | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 37a666ecc..f77a28219 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,26 +8,26 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium [ Paul Szabo ] - * DISABLED:401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch. + * DISABLED:0401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch. Enable support for the X11 big requests extension and the generic events extension. [ Mike Gabriel ] - * Update 320_nxagent_configurable-keystrokes.full.patch. Fix patch header + * Update 0320_nxagent_configurable-keystrokes.full.patch. Fix patch header referring to keystrokes.cfg (plural), not keystroke.cfg. * Allow sysadmins to manipulate nxagent's / x2goagent's rgb file by placing it into /etc/nxagent or /etc/x2go. * Provide support for separate .keyboard files for nxagent/x2goagent. - * Modify 101_nxagent_set-rgb-path.full.patch. Allow configurable rgb files. - * Extend 999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch. Let rgb + * Modify 0101_nxagent_set-rgb-path.full.patch. Allow configurable rgb files. + * Extend 0999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch. Let rgb file shipped with x2goagent supersede rgb file shipped with nxagent. FIXME: a better approach would be to decide at runtime if to use /etc/x2go/rgb or /etc/nxagent/rgb. - * Extend 999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch. Allow + * Extend 0999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch. Allow separate .keyboard files for x2goagent and nxagent. - * Update 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't + * Update 0600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't patch files that get removed during code reduction. - * Add 991_fix-hr-typos.full+lite.patch and 991_fix-hr-typos.full.patch. + * Add 0991_fix-hr-typos.full+lite.patch and 0991_fix-hr-typos.full.patch. Fix several typos in upstream code detected by lintian. * Makefile.nx-libs: Don't allow symlinks to point into buildroot. * Makefile.nx-libs: Install man pages via main Makefile. @@ -54,11 +54,11 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium - Makefile.nx-libs: Don't install Mesa header files into DESTDIR anymore. - Unify source tree reduction (debian/rules vs. roll-tarball.sh) via file/ folder lists in text files named debian/CODE-REDUCTION_*. - - Update 991_fix-hr-typos.full.patch. Don't patch files that get removed by + - Update 0991_fix-hr-typos.full.patch. Don't patch files that get removed by the NX code reduction effort. - - Drop 604_nx-X11_recent-freetype-API.full.patch. Not used in current build + - Drop 0604_nx-X11_recent-freetype-API.full.patch. Not used in current build process. - - Update 600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't + - Update 0600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch. Don't patch files matter to the NX code reduction efforts. - Update 0031_nx-X11_parallel-make.full.patch. Don't patch .original files in NX code tree. @@ -122,10 +122,10 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium x2goagent.keyboard). [ Horst Schirmeier ] - * Update 320_nxagent_configurable-keystrokes.full.patch. Fix a typo that + * Update 0320_nxagent_configurable-keystrokes.full.patch. Fix a typo that prevented the /etc/nxagent/keystrokes.cfg file from being parsed. (Fixes: #741). - * Add 321_nxagent_x2go-specific-keystroke-config.full.patch. If nxagent is + * Add 0321_nxagent_x2go-specific-keystroke-config.full.patch. If nxagent is launched as x2goagent, use X2Go-specific paths for the keystrokes.cfg file. (Fixes: #744). -- cgit v1.2.3 From c29c331cecbb592b6f795ef85c755eb1947216ee Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Wed, 18 Feb 2015 07:51:55 -0500 Subject: Update changelog for the CVE-2015-0255 commit and its 3 prereq commits --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f77a28219..42eef93d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -191,10 +191,18 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium 1038-glx-Length-checking-for-non-generated-single-request.patch 1039-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch 1040-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch + - X.org CVE-2015-0255 + 1104-xkb-Check-strings-length-against-request-size.patch - Security fixes with no assigned CVE: 1008-Don-t-crash-when-we-receive-an-FS_Error-from-the-fon.patch + - Rebase the following patches that are prerequisites for the + CVE-2015-0255 patch: + 1101-Coverity-844-845-846-Fix-memory-leaks.patch + 1102-include-introduce-byte-counting-functions.patch + 1103-xkb-Don-t-swap-XkbSetGeometry-data-in-the-input-buff.patch + - Fix FTBFS due to the nxproxy executable already existing under /usr/lib/nx/bin/nx/ -- cgit v1.2.3 From 1d71c9ebd1df43797089f22fe5f61e2abf93821f Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 27 Feb 2015 00:14:10 +0100 Subject: library clean-up: Don't build libNX_Xpm anymore. Use system's libXpm shared library. --- debian/control | 38 +- debian/libnx-xpm-dev.install.in | 2 - debian/libnx-xpm4.install.in | 1 - debian/libnx-xpm4.symbols | 68 - nx-X11/config/cf/X11.tmpl | 4 +- nx-X11/extras/Xpm/lib/Attrib.c | 310 ---- nx-X11/extras/Xpm/lib/CrBufFrI.c | 452 ----- nx-X11/extras/Xpm/lib/CrBufFrP.c | 78 - nx-X11/extras/Xpm/lib/CrDatFrI.c | 404 ----- nx-X11/extras/Xpm/lib/CrDatFrP.c | 77 - nx-X11/extras/Xpm/lib/CrIFrBuf.c | 118 -- nx-X11/extras/Xpm/lib/CrIFrDat.c | 123 -- nx-X11/extras/Xpm/lib/CrIFrP.c | 58 - nx-X11/extras/Xpm/lib/CrPFrBuf.c | 79 - nx-X11/extras/Xpm/lib/CrPFrDat.c | 82 - nx-X11/extras/Xpm/lib/CrPFrI.c | 62 - nx-X11/extras/Xpm/lib/Image.c | 64 - nx-X11/extras/Xpm/lib/Info.c | 127 -- nx-X11/extras/Xpm/lib/RdFToBuf.c | 124 -- nx-X11/extras/Xpm/lib/RdFToDat.c | 68 - nx-X11/extras/Xpm/lib/RdFToI.c | 267 --- nx-X11/extras/Xpm/lib/RdFToP.c | 78 - nx-X11/extras/Xpm/lib/WrFFrBuf.c | 60 - nx-X11/extras/Xpm/lib/WrFFrDat.c | 62 - nx-X11/extras/Xpm/lib/WrFFrI.c | 364 ---- nx-X11/extras/Xpm/lib/WrFFrP.c | 77 - nx-X11/extras/Xpm/lib/XpmI.h | 329 ---- nx-X11/extras/Xpm/lib/create.c | 2532 --------------------------- nx-X11/extras/Xpm/lib/data.c | 482 ----- nx-X11/extras/Xpm/lib/hashtab.c | 241 --- nx-X11/extras/Xpm/lib/misc.c | 127 -- nx-X11/extras/Xpm/lib/parse.c | 803 --------- nx-X11/extras/Xpm/lib/rgb.c | 285 --- nx-X11/extras/Xpm/lib/scan.c | 1027 ----------- nx-X11/extras/Xpm/lib/xpm.h | 478 ----- nx-X11/lib/Imakefile | 1 - nx-X11/lib/Xpm/Imakefile | 126 -- nx-X11/lib/Xpm/Xpm-def.cpp | 39 - nx-X11/programs/Xserver/Imakefile | 2 +- nx-X11/programs/Xserver/hw/nxagent/Holder.c | 2 +- nx-libs.spec | 27 +- 41 files changed, 26 insertions(+), 9722 deletions(-) delete mode 100644 debian/libnx-xpm-dev.install.in delete mode 100644 debian/libnx-xpm4.install.in delete mode 100644 debian/libnx-xpm4.symbols delete mode 100644 nx-X11/extras/Xpm/lib/Attrib.c delete mode 100644 nx-X11/extras/Xpm/lib/CrBufFrI.c delete mode 100644 nx-X11/extras/Xpm/lib/CrBufFrP.c delete mode 100644 nx-X11/extras/Xpm/lib/CrDatFrI.c delete mode 100644 nx-X11/extras/Xpm/lib/CrDatFrP.c delete mode 100644 nx-X11/extras/Xpm/lib/CrIFrBuf.c delete mode 100644 nx-X11/extras/Xpm/lib/CrIFrDat.c delete mode 100644 nx-X11/extras/Xpm/lib/CrIFrP.c delete mode 100644 nx-X11/extras/Xpm/lib/CrPFrBuf.c delete mode 100644 nx-X11/extras/Xpm/lib/CrPFrDat.c delete mode 100644 nx-X11/extras/Xpm/lib/CrPFrI.c delete mode 100644 nx-X11/extras/Xpm/lib/Image.c delete mode 100644 nx-X11/extras/Xpm/lib/Info.c delete mode 100644 nx-X11/extras/Xpm/lib/RdFToBuf.c delete mode 100644 nx-X11/extras/Xpm/lib/RdFToDat.c delete mode 100644 nx-X11/extras/Xpm/lib/RdFToI.c delete mode 100644 nx-X11/extras/Xpm/lib/RdFToP.c delete mode 100644 nx-X11/extras/Xpm/lib/WrFFrBuf.c delete mode 100644 nx-X11/extras/Xpm/lib/WrFFrDat.c delete mode 100644 nx-X11/extras/Xpm/lib/WrFFrI.c delete mode 100644 nx-X11/extras/Xpm/lib/WrFFrP.c delete mode 100644 nx-X11/extras/Xpm/lib/XpmI.h delete mode 100644 nx-X11/extras/Xpm/lib/create.c delete mode 100644 nx-X11/extras/Xpm/lib/data.c delete mode 100644 nx-X11/extras/Xpm/lib/hashtab.c delete mode 100644 nx-X11/extras/Xpm/lib/misc.c delete mode 100644 nx-X11/extras/Xpm/lib/parse.c delete mode 100644 nx-X11/extras/Xpm/lib/rgb.c delete mode 100644 nx-X11/extras/Xpm/lib/scan.c delete mode 100644 nx-X11/extras/Xpm/lib/xpm.h delete mode 100644 nx-X11/lib/Xpm/Imakefile delete mode 100644 nx-X11/lib/Xpm/Xpm-def.cpp (limited to 'debian') diff --git a/debian/control b/debian/control index b931567c4..65a8f9433 100644 --- a/debian/control +++ b/debian/control @@ -17,12 +17,12 @@ Build-Depends: libfreetype6-dev, libxmltok1-dev, libxml2-dev, + libxpm-dev, autoconf, pkg-config, x11proto-core-dev, expat, Build-Conflicts: - x11proto-kb-dev, x11proto-randr-dev, x11proto-record-dev, x11proto-xinerama-dev, @@ -683,18 +683,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 pixmap library +Description: nx-X11 pixmap library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xpm provides support and common operation for the XPM pixmap - format, which is commonly used in legacy X applications. XPM is an - extension of the monochrome XBM bitmap specified in the X protocol. + This package removes the obsoleted libNX_Xpm.so.4 library. With + recent versions of NX, the system-wide installed libXpm gets used. + . + This package can be safely removed. Package: libnx-xpm-dev Provides: libnx-xpm4-dev @@ -702,20 +700,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xpm4 (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 pixmap library (development headers) +Description: nx-X11 pixmap library (development headers, dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xpm provides support and common operation for the XPM pixmap - format, which is commonly used in legacy X applications. XPM is an - extension of the monochrome XBM bitmap specified in the X protocol. + This package removes the obsoleted headers for the libNX_Xpm.so.4 + library. With recent versions of NX, the system-wide installed libXpm + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: libnx-xpm4-dbg Architecture: any @@ -723,20 +718,19 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xpm4 (= ${binary:Version}), ${misc:Depends}, Section: debug Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 pixmap library (debug package) +Description: nx-X11 pixmap library (debug package, dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xpm provides support and common operation for the XPM pixmap - format, which is commonly used in legacy X applications. XPM is an - extension of the monochrome XBM bitmap specified in the X protocol. + This package removes the obsoleted debug symbols for the libNX_Xpm.so.4 + library. With recent versions of NX, the system-wide installed libXpm + gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xrandr2 Architecture: any diff --git a/debian/libnx-xpm-dev.install.in b/debian/libnx-xpm-dev.install.in deleted file mode 100644 index 36c9bb485..000000000 --- a/debian/libnx-xpm-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xpm.so -usr/include/*/nx/X11/xpm.h diff --git a/debian/libnx-xpm4.install.in b/debian/libnx-xpm4.install.in deleted file mode 100644 index 5bc9da2a0..000000000 --- a/debian/libnx-xpm4.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xpm.so.* diff --git a/debian/libnx-xpm4.symbols b/debian/libnx-xpm4.symbols deleted file mode 100644 index f5aa3297d..000000000 --- a/debian/libnx-xpm4.symbols +++ /dev/null @@ -1,68 +0,0 @@ -libNX_Xpm.so.4 libnx-xpm4 #MINVER# - XpmAttributesSize@Base 3.5.0.29 - XpmCreateBufferFromImage@Base 3.5.0.29 - XpmCreateBufferFromPixmap@Base 3.5.0.29 - XpmCreateBufferFromXpmImage@Base 3.5.0.29 - XpmCreateDataFromImage@Base 3.5.0.29 - XpmCreateDataFromPixmap@Base 3.5.0.29 - XpmCreateDataFromXpmImage@Base 3.5.0.29 - XpmCreateImageFromBuffer@Base 3.5.0.29 - XpmCreateImageFromData@Base 3.5.0.29 - XpmCreateImageFromXpmImage@Base 3.5.0.29 - XpmCreatePixmapFromBuffer@Base 3.5.0.29 - XpmCreatePixmapFromData@Base 3.5.0.29 - XpmCreatePixmapFromXpmImage@Base 3.5.0.29 - XpmCreateXpmImageFromBuffer@Base 3.5.0.29 - XpmCreateXpmImageFromData@Base 3.5.0.29 - XpmCreateXpmImageFromImage@Base 3.5.0.29 - XpmCreateXpmImageFromPixmap@Base 3.5.0.29 - XpmFree@Base 3.5.0.29 - XpmFreeAttributes@Base 3.5.0.29 - XpmFreeExtensions@Base 3.5.0.29 - XpmFreeXpmImage@Base 3.5.0.29 - XpmFreeXpmInfo@Base 3.5.0.29 - XpmGetErrorString@Base 3.5.0.29 - XpmLibraryVersion@Base 3.5.0.29 - XpmReadFileToBuffer@Base 3.5.0.29 - XpmReadFileToData@Base 3.5.0.29 - XpmReadFileToImage@Base 3.5.0.29 - XpmReadFileToPixmap@Base 3.5.0.29 - XpmReadFileToXpmImage@Base 3.5.0.29 - XpmWriteFileFromBuffer@Base 3.5.0.29 - XpmWriteFileFromData@Base 3.5.0.29 - XpmWriteFileFromImage@Base 3.5.0.29 - XpmWriteFileFromPixmap@Base 3.5.0.29 - XpmWriteFileFromXpmImage@Base 3.5.0.29 - xpmColorKeys@Base 3.5.0.29 - xpmCreateImageFromPixmap@Base 3.5.0.29 - xpmCreatePixmapFromImage@Base 3.5.0.29 - xpmDataTypes@Base 3.5.0.29 - xpmFreeColorTable@Base 3.5.0.29 - xpmFreeRgbNames@Base 3.5.0.29 - xpmGetCmt@Base 3.5.0.29 - xpmGetRgbName@Base 3.5.0.29 - xpmGetString@Base 3.5.0.29 - xpmHashIntern@Base 3.5.0.29 - xpmHashSlot@Base 3.5.0.29 - xpmHashTableFree@Base 3.5.0.29 - xpmHashTableInit@Base 3.5.0.29 - xpmInitAttributes@Base 3.5.0.29 - xpmInitXpmImage@Base 3.5.0.29 - xpmInitXpmInfo@Base 3.5.0.29 - xpmNextString@Base 3.5.0.29 - xpmNextUI@Base 3.5.0.29 - xpmNextWord@Base 3.5.0.29 - xpmParseColors@Base 3.5.0.29 - xpmParseData@Base 3.5.0.29 - xpmParseDataAndCreate@Base 3.5.0.29 - xpmParseExtensions@Base 3.5.0.29 - xpmParseHeader@Base 3.5.0.29 - xpmParseValues@Base 3.5.0.29 - xpmPipeThrough@Base 3.5.0.29 - xpmReadRgbNames@Base 3.5.0.29 - xpmSetAttributes@Base 3.5.0.29 - xpmSetInfo@Base 3.5.0.29 - xpmSetInfoMask@Base 3.5.0.29 - xpm_xynormalizeimagebits@Base 3.5.0.29 - xpm_znormalizeimagebits@Base 3.5.0.29 - xpmatoui@Base 3.5.0.29 diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 778e3099a..581fdc111 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -3263,9 +3263,9 @@ ProjectUnsharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),XBuildLibDir) #ifndef SharedXpmRev #define SharedXpmRev 4.11 #endif -SharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) +SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) #else -ProjectUnsharedLibReferences(XPM,NX_Xpm,$(XPMLIBSRC),XBuildLibDir) +ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) #endif #if UseFreetype2 diff --git a/nx-X11/extras/Xpm/lib/Attrib.c b/nx-X11/extras/Xpm/lib/Attrib.c deleted file mode 100644 index c6b34d6d9..000000000 --- a/nx-X11/extras/Xpm/lib/Attrib.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* Attrib.c: * -* * -* XPM library * -* Functions related to the XpmAttributes structure * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -/* 3.2 backward compatibility code */ -LFUNC(CreateOldColorTable, int, (XpmColor *ct, unsigned int ncolors, - XpmColor ***oldct)); - -LFUNC(FreeOldColorTable, void, (XpmColor **colorTable, unsigned int ncolors)); - -/* - * Create a colortable compatible with the old style colortable - */ -static int -CreateOldColorTable(ct, ncolors, oldct) - XpmColor *ct; - unsigned int ncolors; - XpmColor ***oldct; -{ - XpmColor **colorTable, **color; - unsigned int a; - - if (ncolors >= UINT_MAX / sizeof(XpmColor *)) - return XpmNoMemory; - - colorTable = (XpmColor **) XpmMalloc(ncolors * sizeof(XpmColor *)); - if (!colorTable) { - *oldct = NULL; - return (XpmNoMemory); - } - for (a = 0, color = colorTable; a < ncolors; a++, color++, ct++) - *color = ct; - *oldct = colorTable; - return (XpmSuccess); -} - -static void -FreeOldColorTable(colorTable, ncolors) - XpmColor **colorTable; - unsigned int ncolors; -{ - unsigned int a, b; - XpmColor **color; - char **sptr; - - if (colorTable) { - for (a = 0, color = colorTable; a < ncolors; a++, color++) { - for (b = 0, sptr = (char **) *color; b <= NKEYS; b++, sptr++) - if (*sptr) - XpmFree(*sptr); - } - XpmFree(*colorTable); - XpmFree(colorTable); - } -} - -/* end 3.2 bc */ - -/* - * Free the computed color table - */ -void -xpmFreeColorTable(colorTable, ncolors) - XpmColor *colorTable; - int ncolors; -{ - int a, b; - XpmColor *color; - char **sptr; - - if (colorTable) { - for (a = 0, color = colorTable; a < ncolors; a++, color++) { - for (b = 0, sptr = (char **) color; b <= NKEYS; b++, sptr++) - if (*sptr) - XpmFree(*sptr); - } - XpmFree(colorTable); - } -} - -/* - * Free array of extensions - */ -void -XpmFreeExtensions(extensions, nextensions) - XpmExtension *extensions; - int nextensions; -{ - unsigned int i, j, nlines; - XpmExtension *ext; - char **sptr; - - if (extensions && nextensions > 0) { - for (i = 0, ext = extensions; i < nextensions; i++, ext++) { - if (ext->name) - XpmFree(ext->name); - nlines = ext->nlines; - for (j = 0, sptr = ext->lines; j < nlines; j++, sptr++) - if (*sptr) - XpmFree(*sptr); - if (ext->lines) - XpmFree(ext->lines); - } - XpmFree(extensions); - } -} - -/* - * Return the XpmAttributes structure size - */ - -int -XpmAttributesSize() -{ - return sizeof(XpmAttributes); -} - -/* - * Init returned data to free safely later on - */ -void -xpmInitAttributes(attributes) - XpmAttributes *attributes; -{ - if (attributes) { - attributes->pixels = NULL; - attributes->npixels = 0; - attributes->colorTable = NULL; - attributes->ncolors = 0; -/* 3.2 backward compatibility code */ - attributes->hints_cmt = NULL; - attributes->colors_cmt = NULL; - attributes->pixels_cmt = NULL; -/* end 3.2 bc */ - if (attributes->valuemask & XpmReturnExtensions) { - attributes->extensions = NULL; - attributes->nextensions = 0; - } - if (attributes->valuemask & XpmReturnAllocPixels) { - attributes->alloc_pixels = NULL; - attributes->nalloc_pixels = 0; - } - } -} - -/* - * Fill in the XpmAttributes with the XpmImage and the XpmInfo - */ -void -xpmSetAttributes(attributes, image, info) - XpmAttributes *attributes; - XpmImage *image; - XpmInfo *info; -{ - if (attributes->valuemask & XpmReturnColorTable) { - attributes->colorTable = image->colorTable; - attributes->ncolors = image->ncolors; - - /* avoid deletion of copied data */ - image->ncolors = 0; - image->colorTable = NULL; - } -/* 3.2 backward compatibility code */ - else if (attributes->valuemask & XpmReturnInfos) { - int ErrorStatus; - - ErrorStatus = CreateOldColorTable(image->colorTable, image->ncolors, - (XpmColor ***) - &attributes->colorTable); - - /* if error just say we can't return requested data */ - if (ErrorStatus != XpmSuccess) { - attributes->valuemask &= ~XpmReturnInfos; - if (!(attributes->valuemask & XpmReturnPixels)) { - XpmFree(attributes->pixels); - attributes->pixels = NULL; - attributes->npixels = 0; - } - attributes->ncolors = 0; - } else { - attributes->ncolors = image->ncolors; - attributes->hints_cmt = info->hints_cmt; - attributes->colors_cmt = info->colors_cmt; - attributes->pixels_cmt = info->pixels_cmt; - - /* avoid deletion of copied data */ - image->ncolors = 0; - image->colorTable = NULL; - info->hints_cmt = NULL; - info->colors_cmt = NULL; - info->pixels_cmt = NULL; - } - } -/* end 3.2 bc */ - if (attributes->valuemask & XpmReturnExtensions) { - attributes->extensions = info->extensions; - attributes->nextensions = info->nextensions; - - /* avoid deletion of copied data */ - info->extensions = NULL; - info->nextensions = 0; - } - if (info->valuemask & XpmHotspot) { - attributes->valuemask |= XpmHotspot; - attributes->x_hotspot = info->x_hotspot; - attributes->y_hotspot = info->y_hotspot; - } - attributes->valuemask |= XpmCharsPerPixel; - attributes->cpp = image->cpp; - attributes->valuemask |= XpmSize; - attributes->width = image->width; - attributes->height = image->height; -} - -/* - * Free the XpmAttributes structure members - * but the structure itself - */ -void -XpmFreeAttributes(attributes) - XpmAttributes *attributes; -{ - if (attributes->valuemask & XpmReturnPixels && attributes->npixels) { - XpmFree(attributes->pixels); - attributes->pixels = NULL; - attributes->npixels = 0; - } - if (attributes->valuemask & XpmReturnColorTable) { - xpmFreeColorTable(attributes->colorTable, attributes->ncolors); - attributes->colorTable = NULL; - attributes->ncolors = 0; - } -/* 3.2 backward compatibility code */ - else if (attributes->valuemask & XpmInfos) { - if (attributes->colorTable) { - FreeOldColorTable((XpmColor **) attributes->colorTable, - attributes->ncolors); - attributes->colorTable = NULL; - attributes->ncolors = 0; - } - if (attributes->hints_cmt) { - XpmFree(attributes->hints_cmt); - attributes->hints_cmt = NULL; - } - if (attributes->colors_cmt) { - XpmFree(attributes->colors_cmt); - attributes->colors_cmt = NULL; - } - if (attributes->pixels_cmt) { - XpmFree(attributes->pixels_cmt); - attributes->pixels_cmt = NULL; - } - if (attributes->pixels) { - XpmFree(attributes->pixels); - attributes->pixels = NULL; - attributes->npixels = 0; - } - } -/* end 3.2 bc */ - if (attributes->valuemask & XpmReturnExtensions - && attributes->nextensions) { - XpmFreeExtensions(attributes->extensions, attributes->nextensions); - attributes->extensions = NULL; - attributes->nextensions = 0; - } - if (attributes->valuemask & XpmReturnAllocPixels - && attributes->nalloc_pixels) { - XpmFree(attributes->alloc_pixels); - attributes->alloc_pixels = NULL; - attributes->nalloc_pixels = 0; - } - attributes->valuemask = 0; -} diff --git a/nx-X11/extras/Xpm/lib/CrBufFrI.c b/nx-X11/extras/Xpm/lib/CrBufFrI.c deleted file mode 100644 index b87971542..000000000 --- a/nx-X11/extras/Xpm/lib/CrBufFrI.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrBufFrI.c: * -* * -* XPM library * -* Scan an image and possibly its mask and create an XPM buffer * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* October 2004, source code review by Thomas Biege */ - -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -LFUNC(WriteColors, int, (char **dataptr, unsigned int *data_size, - unsigned int *used_size, XpmColor *colors, - unsigned int ncolors, unsigned int cpp)); - -LFUNC(WritePixels, void, (char *dataptr, unsigned int data_size, - unsigned int *used_size, - unsigned int width, unsigned int height, - unsigned int cpp, unsigned int *pixels, - XpmColor *colors)); - -LFUNC(WriteExtensions, void, (char *dataptr, unsigned int data_size, - unsigned int *used_size, - XpmExtension *ext, unsigned int num)); - -LFUNC(ExtensionsSize, unsigned int, (XpmExtension *ext, unsigned int num)); -LFUNC(CommentsSize, int, (XpmInfo *info)); - -int -XpmCreateBufferFromImage(display, buffer_return, image, shapeimage, attributes) - Display *display; - char **buffer_return; - XImage *image; - XImage *shapeimage; - XpmAttributes *attributes; -{ - XpmImage xpmimage; - XpmInfo info; - int ErrorStatus; - - /* initialize return value */ - if (buffer_return) - *buffer_return = NULL; - - /* create an XpmImage from the image */ - ErrorStatus = XpmCreateXpmImageFromImage(display, image, shapeimage, - &xpmimage, attributes); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* create the buffer from the XpmImage */ - if (attributes) { - xpmSetInfo(&info, attributes); - ErrorStatus = - XpmCreateBufferFromXpmImage(buffer_return, &xpmimage, &info); - } else - ErrorStatus = - XpmCreateBufferFromXpmImage(buffer_return, &xpmimage, NULL); - - /* free the XpmImage */ - XpmFreeXpmImage(&xpmimage); - - return (ErrorStatus); -} - - -#undef RETURN -#define RETURN(status) \ -do \ -{ \ - ErrorStatus = status; \ - goto error; \ -}while(0) - -int -XpmCreateBufferFromXpmImage(buffer_return, image, info) - char **buffer_return; - XpmImage *image; - XpmInfo *info; -{ - /* calculation variables */ - int ErrorStatus; - char buf[BUFSIZ]; - unsigned int cmts, extensions, ext_size = 0; - unsigned int l, cmt_size = 0; - char *ptr = NULL, *p; - unsigned int ptr_size, used_size, tmp; - - *buffer_return = NULL; - - cmts = info && (info->valuemask & XpmComments); - extensions = info && (info->valuemask & XpmExtensions) - && info->nextensions; - - /* compute the extensions and comments size */ - if (extensions) - ext_size = ExtensionsSize(info->extensions, info->nextensions); - if (cmts) - cmt_size = CommentsSize(info); - - /* write the header line */ -#ifndef VOID_SPRINTF - used_size = -#endif - sprintf(buf, "/* XPM */\nstatic char * image_name[] = {\n"); -#ifdef VOID_SPRINTF - used_size = strlen(buf); -#endif - ptr_size = used_size + ext_size + cmt_size + 1; /* ptr_size can't be 0 */ - if(ptr_size <= used_size || - ptr_size <= ext_size || - ptr_size <= cmt_size) - { - return XpmNoMemory; - } - ptr = (char *) XpmMalloc(ptr_size); - if (!ptr) - return XpmNoMemory; - strcpy(ptr, buf); - - /* write the values line */ - if (cmts && info->hints_cmt) { -#ifndef VOID_SPRINTF - used_size += -#endif - snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->hints_cmt); -#ifdef VOID_SPRINTF - used_size += strlen(info->hints_cmt) + 5; -#endif - } -#ifndef VOID_SPRINTF - l = -#endif - sprintf(buf, "\"%d %d %d %d", image->width, image->height, - image->ncolors, image->cpp); -#ifdef VOID_SPRINTF - l = strlen(buf); -#endif - - if (info && (info->valuemask & XpmHotspot)) { -#ifndef VOID_SPRINTF - l += -#endif - snprintf(buf + l, sizeof(buf)-l, " %d %d", info->x_hotspot, info->y_hotspot); -#ifdef VOID_SPRINTF - l = strlen(buf); -#endif - } - if (extensions) { -#ifndef VOID_SPRINTF - l += -#endif - sprintf(buf + l, " XPMEXT"); -#ifdef VOID_SPRINTF - l = strlen(buf); -#endif - } -#ifndef VOID_SPRINTF - l += -#endif - sprintf(buf + l, "\",\n"); -#ifdef VOID_SPRINTF - l = strlen(buf); -#endif - ptr_size += l; - if(ptr_size <= l) - RETURN(XpmNoMemory); - p = (char *) XpmRealloc(ptr, ptr_size); - if (!p) - RETURN(XpmNoMemory); - ptr = p; - strcpy(ptr + used_size, buf); - used_size += l; - - /* write colors */ - if (cmts && info->colors_cmt) { -#ifndef VOID_SPRINTF - used_size += -#endif - snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->colors_cmt); -#ifdef VOID_SPRINTF - used_size += strlen(info->colors_cmt) + 5; -#endif - } - ErrorStatus = WriteColors(&ptr, &ptr_size, &used_size, - image->colorTable, image->ncolors, image->cpp); - - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - - /* - * now we know the exact size we need, realloc the data - * 4 = 1 (for '"') + 3 (for '",\n') - * 1 = - 2 (because the last line does not end with ',\n') + 3 (for '};\n') - */ - if(image->width > UINT_MAX / image->cpp || - (tmp = image->width * image->cpp + 4) <= 4 || - image->height > UINT_MAX / tmp || - (tmp = image->height * tmp + 1) <= 1 || - (ptr_size += tmp) <= tmp) - RETURN(XpmNoMemory); - - p = (char *) XpmRealloc(ptr, ptr_size); - if (!p) - RETURN(XpmNoMemory); - ptr = p; - - /* print pixels */ - if (cmts && info->pixels_cmt) { -#ifndef VOID_SPRINTF - used_size += -#endif - snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->pixels_cmt); -#ifdef VOID_SPRINTF - used_size += strlen(info->pixels_cmt) + 5; -#endif - } - WritePixels(ptr + used_size, ptr_size - used_size, &used_size, image->width, image->height, - image->cpp, image->data, image->colorTable); - - /* print extensions */ - if (extensions) - WriteExtensions(ptr + used_size, ptr_size-used_size, &used_size, - info->extensions, info->nextensions); - - /* close the array */ - strcpy(ptr + used_size, "};\n"); - - *buffer_return = ptr; - - return (XpmSuccess); - -/* exit point in case of error, free only locally allocated variables */ -error: - if (ptr) - XpmFree(ptr); - return (ErrorStatus); -} - - -static int -WriteColors(dataptr, data_size, used_size, colors, ncolors, cpp) - char **dataptr; - unsigned int *data_size; - unsigned int *used_size; - XpmColor *colors; - unsigned int ncolors; - unsigned int cpp; -{ - char buf[BUFSIZ] = {0}; - unsigned int a, key, l; - char *s, *s2; - char **defaults; - - *buf = '"'; - for (a = 0; a < ncolors; a++, colors++) { - - defaults = (char **) colors; - s = buf + 1; - if(cpp > (sizeof(buf) - (s-buf))) - return(XpmNoMemory); - strncpy(s, *defaults++, cpp); - s += cpp; - - for (key = 1; key <= NKEYS; key++, defaults++) { - if ((s2 = *defaults)) { -#ifndef VOID_SPRINTF - s += -#endif - /* assume C99 compliance */ - snprintf(s, sizeof(buf) - (s-buf), "\t%s %s", xpmColorKeys[key - 1], s2); -#ifdef VOID_SPRINTF - s += strlen(s); -#endif - /* now let's check if s points out-of-bounds */ - if((s-buf) > sizeof(buf)) - return(XpmNoMemory); - } - } - if(sizeof(buf) - (s-buf) < 4) - return(XpmNoMemory); - strcpy(s, "\",\n"); - l = s + 3 - buf; - if( *data_size >= UINT_MAX-l || - *data_size + l <= *used_size || - (*data_size + l - *used_size) <= sizeof(buf)) - return(XpmNoMemory); - s = (char *) XpmRealloc(*dataptr, *data_size + l); - if (!s) - return (XpmNoMemory); - *data_size += l; - strcpy(s + *used_size, buf); - *used_size += l; - *dataptr = s; - } - return (XpmSuccess); -} - -static void -WritePixels(dataptr, data_size, used_size, width, height, cpp, pixels, colors) - char *dataptr; - unsigned int data_size; - unsigned int *used_size; - unsigned int width; - unsigned int height; - unsigned int cpp; - unsigned int *pixels; - XpmColor *colors; -{ - char *s = dataptr; - unsigned int x, y, h; - - if(height <= 1) - return; - - h = height - 1; - for (y = 0; y < h; y++) { - *s++ = '"'; - for (x = 0; x < width; x++, pixels++) { - if(cpp >= (data_size - (s-dataptr))) - return; - strncpy(s, colors[*pixels].string, cpp); /* how can we trust *pixels? :-\ */ - s += cpp; - } - if((data_size - (s-dataptr)) < 4) - return; - strcpy(s, "\",\n"); - s += 3; - } - /* duplicate some code to avoid a test in the loop */ - *s++ = '"'; - for (x = 0; x < width; x++, pixels++) { - if(cpp >= (data_size - (s-dataptr))) - return; - strncpy(s, colors[*pixels].string, cpp); /* how can we trust *pixels? */ - s += cpp; - } - *s++ = '"'; - *used_size += s - dataptr; -} - -static unsigned int -ExtensionsSize(ext, num) - XpmExtension *ext; - unsigned int num; -{ - unsigned int x, y, a, size; - char **line; - - size = 0; - if(num == 0) - return(0); /* ok? */ - for (x = 0; x < num; x++, ext++) { - /* 11 = 10 (for ',\n"XPMEXT ') + 1 (for '"') */ - size += strlen(ext->name) + 11; - a = ext->nlines; /* how can we trust ext->nlines to be not out-of-bounds? */ - for (y = 0, line = ext->lines; y < a; y++, line++) - /* 4 = 3 (for ',\n"') + 1 (for '"') */ - size += strlen(*line) + 4; - } - /* 13 is for ',\n"XPMENDEXT"' */ - if(size > UINT_MAX - 13) /* unlikely */ - return(0); - return size + 13; -} - -static void -WriteExtensions(dataptr, data_size, used_size, ext, num) - char *dataptr; - unsigned int data_size; - unsigned int *used_size; - XpmExtension *ext; - unsigned int num; -{ - unsigned int x, y, a; - char **line; - char *s = dataptr; - - for (x = 0; x < num; x++, ext++) { -#ifndef VOID_SPRINTF - s += -#endif - snprintf(s, data_size - (s-dataptr), ",\n\"XPMEXT %s\"", ext->name); -#ifdef VOID_SPRINTF - s += strlen(ext->name) + 11; -#endif - a = ext->nlines; - for (y = 0, line = ext->lines; y < a; y++, line++) { -#ifndef VOID_SPRINTF - s += -#endif - snprintf(s, data_size - (s-dataptr), ",\n\"%s\"", *line); -#ifdef VOID_SPRINTF - s += strlen(*line) + 4; -#endif - } - } - strncpy(s, ",\n\"XPMENDEXT\"", data_size - (s-dataptr)-1); - *used_size += s - dataptr + 13; -} - -static int -CommentsSize(info) - XpmInfo *info; -{ - int size = 0; - - /* 5 = 2 (for "/_*") + 3 (for "*_/\n") */ - /* wrap possible but *very* unlikely */ - if (info->hints_cmt) - size += 5 + strlen(info->hints_cmt); - - if (info->colors_cmt) - size += 5 + strlen(info->colors_cmt); - - if (info->pixels_cmt) - size += 5 + strlen(info->pixels_cmt); - - return size; -} diff --git a/nx-X11/extras/Xpm/lib/CrBufFrP.c b/nx-X11/extras/Xpm/lib/CrBufFrP.c deleted file mode 100644 index 44eb56d7d..000000000 --- a/nx-X11/extras/Xpm/lib/CrBufFrP.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrBufFrP.c: * -* * -* XPM library * -* Scan a pixmap and possibly its mask and create an XPM buffer * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmCreateBufferFromPixmap(display, buffer_return, pixmap, shapemask, - attributes) - Display *display; - char **buffer_return; - Pixmap pixmap; - Pixmap shapemask; - XpmAttributes *attributes; -{ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int width = 0; - unsigned int height = 0; - int ErrorStatus; - - /* get geometry */ - if (attributes && attributes->valuemask & XpmSize) { - width = attributes->width; - height = attributes->height; - } - /* get the ximages */ - if (pixmap) - xpmCreateImageFromPixmap(display, pixmap, &ximage, &width, &height); - if (shapemask) - xpmCreateImageFromPixmap(display, shapemask, &shapeimage, - &width, &height); - - /* create the buffer */ - ErrorStatus = XpmCreateBufferFromImage(display, buffer_return, ximage, - shapeimage, attributes); - - /* destroy the ximages */ - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/CrDatFrI.c b/nx-X11/extras/Xpm/lib/CrDatFrI.c deleted file mode 100644 index 90999665b..000000000 --- a/nx-X11/extras/Xpm/lib/CrDatFrI.c +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrDataFI.c: * -* * -* XPM library * -* Scan an image and possibly its mask and create an XPM array * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86$ */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -LFUNC(CreateColors, int, (char **dataptr, unsigned int *data_size, - XpmColor *colors, unsigned int ncolors, - unsigned int cpp)); - -LFUNC(CreatePixels, void, (char **dataptr, unsigned int data_size, - unsigned int width, - unsigned int height, unsigned int cpp, - unsigned int *pixels, XpmColor *colors)); - -LFUNC(CountExtensions, void, (XpmExtension *ext, unsigned int num, - unsigned int *ext_size, - unsigned int *ext_nlines)); - -LFUNC(CreateExtensions, void, (char **dataptr, unsigned int data_size, - unsigned int offset, - XpmExtension *ext, unsigned int num, - unsigned int ext_nlines)); - -int -XpmCreateDataFromImage(display, data_return, image, shapeimage, attributes) - Display *display; - char ***data_return; - XImage *image; - XImage *shapeimage; - XpmAttributes *attributes; -{ - XpmImage xpmimage; - XpmInfo info; - int ErrorStatus; - - /* initialize return value */ - if (data_return) - *data_return = NULL; - - /* create an XpmImage from the image */ - ErrorStatus = XpmCreateXpmImageFromImage(display, image, shapeimage, - &xpmimage, attributes); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* create the data from the XpmImage */ - if (attributes) { - xpmSetInfo(&info, attributes); - ErrorStatus = XpmCreateDataFromXpmImage(data_return, &xpmimage, &info); - } else - ErrorStatus = XpmCreateDataFromXpmImage(data_return, &xpmimage, NULL); - - /* free the XpmImage */ - XpmFreeXpmImage(&xpmimage); - - return (ErrorStatus); -} - -#undef RETURN -#define RETURN(status) \ -do \ -{ \ - ErrorStatus = status; \ - goto exit; \ -} while(0) - -int -XpmCreateDataFromXpmImage(data_return, image, info) - char ***data_return; - XpmImage *image; - XpmInfo *info; -{ - /* calculation variables */ - int ErrorStatus; - char buf[BUFSIZ]; - char **header = NULL, **data, **sptr, **sptr2, *s; - unsigned int header_size, header_nlines; - unsigned int data_size, data_nlines; - unsigned int extensions = 0, ext_size = 0, ext_nlines = 0; - unsigned int offset, l, n; - - *data_return = NULL; - - extensions = info && (info->valuemask & XpmExtensions) - && info->nextensions; - - /* compute the number of extensions lines and size */ - if (extensions) - CountExtensions(info->extensions, info->nextensions, - &ext_size, &ext_nlines); - - /* - * alloc a temporary array of char pointer for the header section which - * is the hints line + the color table lines - */ - header_nlines = 1 + image->ncolors; /* this may wrap and/or become 0 */ - - /* 2nd check superfluous if we do not need header_nlines any further */ - if(header_nlines <= image->ncolors || - header_nlines >= UINT_MAX / sizeof(char *)) - return(XpmNoMemory); - - header_size = sizeof(char *) * header_nlines; - if (header_size >= UINT_MAX / sizeof(char *)) - return (XpmNoMemory); - header = (char **) XpmCalloc(header_size, sizeof(char *)); /* can we trust image->ncolors */ - if (!header) - return (XpmNoMemory); - - /* print the hints line */ - s = buf; -#ifndef VOID_SPRINTF - s += -#endif - sprintf(s, "%d %d %d %d", image->width, image->height, - image->ncolors, image->cpp); -#ifdef VOID_SPRINTF - s += strlen(s); -#endif - - if (info && (info->valuemask & XpmHotspot)) { -#ifndef VOID_SPRINTF - s += -#endif - sprintf(s, " %d %d", info->x_hotspot, info->y_hotspot); -#ifdef VOID_SPRINTF - s += strlen(s); -#endif - } - if (extensions) { - strcpy(s, " XPMEXT"); - s += 7; - } - l = s - buf + 1; - *header = (char *) XpmMalloc(l); - if (!*header) - RETURN(XpmNoMemory); - header_size += l; - strcpy(*header, buf); - - /* print colors */ - ErrorStatus = CreateColors(header + 1, &header_size, - image->colorTable, image->ncolors, image->cpp); - - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - - /* now we know the size needed, alloc the data and copy the header lines */ - offset = image->width * image->cpp + 1; - - if(offset <= image->width || offset <= image->cpp) - RETURN(XpmNoMemory); - - if( (image->height + ext_nlines) >= UINT_MAX / sizeof(char *)) - RETURN(XpmNoMemory); - data_size = (image->height + ext_nlines) * sizeof(char *); - - if (image->height > UINT_MAX / offset || - image->height * offset > UINT_MAX - data_size) - RETURN(XpmNoMemory); - data_size += image->height * offset; - - if( (header_size + ext_size) >= (UINT_MAX - data_size) ) - RETURN(XpmNoMemory); - data_size += header_size + ext_size; - - data = (char **) XpmMalloc(data_size); - if (!data) - RETURN(XpmNoMemory); - - data_nlines = header_nlines + image->height + ext_nlines; - *data = (char *) (data + data_nlines); - - /* can header have less elements then n suggests? */ - n = image->ncolors; - for (l = 0, sptr = data, sptr2 = header; l <= n && sptr && sptr2; l++, sptr++, sptr2++) { - strcpy(*sptr, *sptr2); - *(sptr + 1) = *sptr + strlen(*sptr2) + 1; - } - - /* print pixels */ - data[header_nlines] = (char *) data + header_size - + (image->height + ext_nlines) * sizeof(char *); - - CreatePixels(data + header_nlines, data_size-header_nlines, image->width, image->height, - image->cpp, image->data, image->colorTable); - - /* print extensions */ - if (extensions) - CreateExtensions(data + header_nlines + image->height - 1, - data_size - header_nlines - image->height + 1, offset, - info->extensions, info->nextensions, - ext_nlines); - - *data_return = data; - ErrorStatus = XpmSuccess; - -/* exit point, free only locally allocated variables */ -exit: - if (header) { - for (l = 0; l < header_nlines; l++) - if (header[l]) - XpmFree(header[l]); - XpmFree(header); - } - return(ErrorStatus); -} - -static int -CreateColors(dataptr, data_size, colors, ncolors, cpp) - char **dataptr; - unsigned int *data_size; - XpmColor *colors; - unsigned int ncolors; - unsigned int cpp; -{ - char buf[BUFSIZ]; - unsigned int a, key, l; - char *s, *s2; - char **defaults; - - /* can ncolors be trusted here? */ - for (a = 0; a < ncolors; a++, colors++, dataptr++) { - - defaults = (char **) colors; - if(sizeof(buf) <= cpp) - return(XpmNoMemory); - strncpy(buf, *defaults++, cpp); - s = buf + cpp; - - if(sizeof(buf) <= (s-buf)) - return XpmNoMemory; - - for (key = 1; key <= NKEYS; key++, defaults++) { - if ((s2 = *defaults)) { -#ifndef VOID_SPRINTF - s += -#endif - /* assume C99 compliance */ - snprintf(s, sizeof(buf)-(s-buf), "\t%s %s", xpmColorKeys[key - 1], s2); -#ifdef VOID_SPRINTF - s += strlen(s); -#endif - /* does s point out-of-bounds? */ - if(sizeof(buf) < (s-buf)) - return XpmNoMemory; - } - } - /* what about using strdup()? */ - l = s - buf + 1; - s = (char *) XpmMalloc(l); - if (!s) - return (XpmNoMemory); - *data_size += l; - *dataptr = strcpy(s, buf); - } - return (XpmSuccess); -} - -static void -CreatePixels(dataptr, data_size, width, height, cpp, pixels, colors) - char **dataptr; - unsigned int data_size; - unsigned int width; - unsigned int height; - unsigned int cpp; - unsigned int *pixels; - XpmColor *colors; -{ - char *s; - unsigned int x, y, h, offset; - - if(height <= 1) - return; - - h = height - 1; - - offset = width * cpp + 1; - - if(offset <= width || offset <= cpp) - return; - - /* why trust h? */ - for (y = 0; y < h; y++, dataptr++) { - s = *dataptr; - /* why trust width? */ - for (x = 0; x < width; x++, pixels++) { - if(cpp > (data_size - (s - *dataptr))) - return; - strncpy(s, colors[*pixels].string, cpp); /* why trust pixel? */ - s += cpp; - } - *s = '\0'; - if(offset > data_size) - return; - *(dataptr + 1) = *dataptr + offset; - } - /* duplicate some code to avoid a test in the loop */ - s = *dataptr; - /* why trust width? */ - for (x = 0; x < width; x++, pixels++) { - if(cpp > data_size - (s - *dataptr)) - return; - strncpy(s, colors[*pixels].string, cpp); /* why should we trust *pixel? */ - s += cpp; - } - *s = '\0'; -} - -static void -CountExtensions(ext, num, ext_size, ext_nlines) - XpmExtension *ext; - unsigned int num; - unsigned int *ext_size; - unsigned int *ext_nlines; -{ - unsigned int x, y, a, size, nlines; - char **line; - - size = 0; - nlines = 0; - for (x = 0; x < num; x++, ext++) { - /* 1 for the name */ - nlines += ext->nlines + 1; - /* 8 = 7 (for "XPMEXT ") + 1 (for 0) */ - size += strlen(ext->name) + 8; - a = ext->nlines; - for (y = 0, line = ext->lines; y < a; y++, line++) - size += strlen(*line) + 1; - } - /* 10 and 1 are for the ending "XPMENDEXT" */ - *ext_size = size + 10; - *ext_nlines = nlines + 1; -} - -static void -CreateExtensions(dataptr, data_size, offset, ext, num, ext_nlines) - char **dataptr; - unsigned int data_size; - unsigned int offset; - XpmExtension *ext; - unsigned int num; - unsigned int ext_nlines; -{ - unsigned int x, y, a, b; - char **line; - - *(dataptr + 1) = *dataptr + offset; - dataptr++; - a = 0; - for (x = 0; x < num; x++, ext++) { - snprintf(*dataptr, data_size, "XPMEXT %s", ext->name); - a++; - if (a < ext_nlines) - *(dataptr + 1) = *dataptr + strlen(ext->name) + 8; - dataptr++; - b = ext->nlines; /* can we trust these values? */ - for (y = 0, line = ext->lines; y < b; y++, line++) { - strcpy(*dataptr, *line); - a++; - if (a < ext_nlines) - *(dataptr + 1) = *dataptr + strlen(*line) + 1; - dataptr++; - } - } - strcpy(*dataptr, "XPMENDEXT"); -} diff --git a/nx-X11/extras/Xpm/lib/CrDatFrP.c b/nx-X11/extras/Xpm/lib/CrDatFrP.c deleted file mode 100644 index 20981b70c..000000000 --- a/nx-X11/extras/Xpm/lib/CrDatFrP.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrDataFP.c: * -* * -* XPM library * -* Scan a pixmap and possibly its mask and create an XPM array * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmCreateDataFromPixmap(display, data_return, pixmap, shapemask, attributes) - Display *display; - char ***data_return; - Pixmap pixmap; - Pixmap shapemask; - XpmAttributes *attributes; -{ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int width = 0; - unsigned int height = 0; - int ErrorStatus; - - /* get geometry */ - if (attributes && attributes->valuemask & XpmSize) { - width = attributes->width; - height = attributes->height; - } - /* get the ximages */ - if (pixmap) - xpmCreateImageFromPixmap(display, pixmap, &ximage, &width, &height); - if (shapemask) - xpmCreateImageFromPixmap(display, shapemask, &shapeimage, - &width, &height); - - /* create the data */ - ErrorStatus = XpmCreateDataFromImage(display, data_return, ximage, - shapeimage, attributes); - - /* destroy the ximages */ - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/CrIFrBuf.c b/nx-X11/extras/Xpm/lib/CrIFrBuf.c deleted file mode 100644 index d98e65887..000000000 --- a/nx-X11/extras/Xpm/lib/CrIFrBuf.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrIFrBuf.c: * -* * -* XPM library * -* Parse an Xpm buffer (file in memory) and create the image and possibly its * -* mask * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -LFUNC(OpenBuffer, void, (char *buffer, xpmData *mdata)); - -int -XpmCreateImageFromBuffer(display, buffer, image_return, - shapeimage_return, attributes) - Display *display; - char *buffer; - XImage **image_return; - XImage **shapeimage_return; - XpmAttributes *attributes; -{ - XpmImage image; - XpmInfo info; - int ErrorStatus; - xpmData mdata; - - xpmInitXpmImage(&image); - xpmInitXpmInfo(&info); - - /* open buffer to read */ - OpenBuffer(buffer, &mdata); - - /* create the XImage from the XpmData */ - if (attributes) { - xpmInitAttributes(attributes); - xpmSetInfoMask(&info, attributes); - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, &info, attributes); - } else - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, NULL, attributes); - if (attributes) { - if (ErrorStatus >= 0) /* no fatal error */ - xpmSetAttributes(attributes, &image, &info); - XpmFreeXpmInfo(&info); - } - - /* free the XpmImage */ - XpmFreeXpmImage(&image); - - return (ErrorStatus); -} - -int -XpmCreateXpmImageFromBuffer(buffer, image, info) - char *buffer; - XpmImage *image; - XpmInfo *info; -{ - xpmData mdata; - int ErrorStatus; - - /* init returned values */ - xpmInitXpmImage(image); - xpmInitXpmInfo(info); - - /* open buffer to read */ - OpenBuffer(buffer, &mdata); - - /* create the XpmImage from the XpmData */ - ErrorStatus = xpmParseData(&mdata, image, info); - - return (ErrorStatus); -} - -/* - * open the given buffer to be read or written as an xpmData which is returned - */ -static void -OpenBuffer(buffer, mdata) - char *buffer; - xpmData *mdata; -{ - mdata->type = XPMBUFFER; - mdata->cptr = buffer; - mdata->CommentLength = 0; -} diff --git a/nx-X11/extras/Xpm/lib/CrIFrDat.c b/nx-X11/extras/Xpm/lib/CrIFrDat.c deleted file mode 100644 index ab93a499b..000000000 --- a/nx-X11/extras/Xpm/lib/CrIFrDat.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrIFrData.c: * -* * -* XPM library * -* Parse an Xpm array and create the image and possibly its mask * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -LFUNC(OpenArray, void, (char **data, xpmData *mdata)); - -int -XpmCreateImageFromData(display, data, image_return, - shapeimage_return, attributes) - Display *display; - char **data; - XImage **image_return; - XImage **shapeimage_return; - XpmAttributes *attributes; -{ - XpmImage image; - XpmInfo info; - int ErrorStatus; - xpmData mdata; - - xpmInitXpmImage(&image); - xpmInitXpmInfo(&info); - - /* open data */ - OpenArray(data, &mdata); - - /* create an XpmImage from the file */ - if (attributes) { - xpmInitAttributes(attributes); - xpmSetInfoMask(&info, attributes); - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, &info, attributes); - } else - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, NULL, attributes); - if (attributes) { - if (ErrorStatus >= 0) /* no fatal error */ - xpmSetAttributes(attributes, &image, &info); - XpmFreeXpmInfo(&info); - } - - /* free the XpmImage */ - XpmFreeXpmImage(&image); - - return (ErrorStatus); -} - -int -XpmCreateXpmImageFromData(data, image, info) - char **data; - XpmImage *image; - XpmInfo *info; -{ - xpmData mdata; - int ErrorStatus; - - /* init returned values */ - xpmInitXpmImage(image); - xpmInitXpmInfo(info); - - /* open data */ - OpenArray(data, &mdata); - - /* create the XpmImage from the XpmData */ - ErrorStatus = xpmParseData(&mdata, image, info); - - return (ErrorStatus); -} - -/* - * open the given array to be read or written as an xpmData which is returned - */ -static void -OpenArray(data, mdata) - char **data; - xpmData *mdata; -{ - mdata->type = XPMARRAY; - mdata->stream.data = data; - mdata->cptr = *data; - mdata->line = 0; - mdata->CommentLength = 0; - mdata->Bcmt = mdata->Ecmt = NULL; - mdata->Bos = mdata->Eos = '\0'; - mdata->format = 0; /* this can only be Xpm 2 or 3 */ -} diff --git a/nx-X11/extras/Xpm/lib/CrIFrP.c b/nx-X11/extras/Xpm/lib/CrIFrP.c deleted file mode 100644 index 144acc42c..000000000 --- a/nx-X11/extras/Xpm/lib/CrIFrP.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrIFrP.c: * -* * -* XPM library * -* Create the XImage related to the given Pixmap. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -void -xpmCreateImageFromPixmap(display, pixmap, ximage_return, width, height) - Display *display; - Pixmap pixmap; - XImage **ximage_return; - unsigned int *width; - unsigned int *height; -{ - unsigned int dum; - int dummy; - Window win; - - if (*width == 0 && *height == 0) - XGetGeometry(display, pixmap, &win, &dummy, &dummy, - width, height, &dum, &dum); - - *ximage_return = XGetImage(display, pixmap, 0, 0, *width, *height, - AllPlanes, ZPixmap); -} diff --git a/nx-X11/extras/Xpm/lib/CrPFrBuf.c b/nx-X11/extras/Xpm/lib/CrPFrBuf.c deleted file mode 100644 index f3f903053..000000000 --- a/nx-X11/extras/Xpm/lib/CrPFrBuf.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrPFrBuf.c: * -* * -* XPM library * -* Parse an Xpm buffer and create the pixmap and possibly its mask * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmCreatePixmapFromBuffer(display, d, buffer, pixmap_return, - shapemask_return, attributes) - Display *display; - Drawable d; - char *buffer; - Pixmap *pixmap_return; - Pixmap *shapemask_return; - XpmAttributes *attributes; -{ - XImage *ximage, *shapeimage; - int ErrorStatus; - - /* initialize return values */ - if (pixmap_return) - *pixmap_return = 0; - if (shapemask_return) - *shapemask_return = 0; - - /* create the images */ - ErrorStatus = XpmCreateImageFromBuffer(display, buffer, - (pixmap_return ? &ximage : NULL), - (shapemask_return ? - &shapeimage : NULL), - attributes); - - if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); - - /* create the pixmaps and destroy images */ - if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); - } - if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); - XDestroyImage(shapeimage); - } - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/CrPFrDat.c b/nx-X11/extras/Xpm/lib/CrPFrDat.c deleted file mode 100644 index 483b3afe7..000000000 --- a/nx-X11/extras/Xpm/lib/CrPFrDat.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrPFrData.c: * -* * -* XPM library * -* Parse an Xpm array and create the pixmap and possibly its mask * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmCreatePixmapFromData(display, d, data, pixmap_return, - shapemask_return, attributes) - Display *display; - Drawable d; - char **data; - Pixmap *pixmap_return; - Pixmap *shapemask_return; - XpmAttributes *attributes; -{ - XImage *ximage, *shapeimage; - int ErrorStatus; - - /* initialize return values */ - if (pixmap_return) - *pixmap_return = 0; - if (shapemask_return) - *shapemask_return = 0; - - /* create the images */ - ErrorStatus = XpmCreateImageFromData(display, data, - (pixmap_return ? &ximage : NULL), - (shapemask_return ? - &shapeimage : NULL), - attributes); - - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); - - /* create the pixmaps and destroy images */ - if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); - } - if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); - XDestroyImage(shapeimage); - } - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/CrPFrI.c b/nx-X11/extras/Xpm/lib/CrPFrI.c deleted file mode 100644 index 2f555dd94..000000000 --- a/nx-X11/extras/Xpm/lib/CrPFrI.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* CrPFrI.c: * -* * -* XPM library * -* Create the Pixmap related to the given XImage. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -void -xpmCreatePixmapFromImage(display, d, ximage, pixmap_return) - Display *display; - Drawable d; - XImage *ximage; - Pixmap *pixmap_return; -{ - GC gc; - XGCValues values; - - *pixmap_return = XCreatePixmap(display, d, ximage->width, - ximage->height, ximage->depth); - /* set fg and bg in case we have an XYBitmap */ - values.foreground = 1; - values.background = 0; - gc = XCreateGC(display, *pixmap_return, - GCForeground | GCBackground, &values); - - XPutImage(display, *pixmap_return, gc, ximage, 0, 0, 0, 0, - ximage->width, ximage->height); - - XFreeGC(display, gc); -} diff --git a/nx-X11/extras/Xpm/lib/Image.c b/nx-X11/extras/Xpm/lib/Image.c deleted file mode 100644 index 2179d4e03..000000000 --- a/nx-X11/extras/Xpm/lib/Image.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* Image.c: * -* * -* XPM library * -* Functions to init and free the XpmImage structure. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -/* - * Init returned data to free safely later on - */ -void -xpmInitXpmImage(image) - XpmImage *image; -{ - image->ncolors = 0; - image->colorTable = NULL; - image->data = NULL; -} - -/* - * Free the XpmImage data which have been allocated - */ -void -XpmFreeXpmImage(image) - XpmImage *image; -{ - if (image->colorTable) - xpmFreeColorTable(image->colorTable, image->ncolors); - if (image->data) - XpmFree(image->data); - image->data = NULL; -} diff --git a/nx-X11/extras/Xpm/lib/Info.c b/nx-X11/extras/Xpm/lib/Info.c deleted file mode 100644 index f35abd931..000000000 --- a/nx-X11/extras/Xpm/lib/Info.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* Info.c: * -* * -* XPM library * -* Functions related to the XpmInfo structure. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -/* - * Init returned data to free safely later on - */ -void -xpmInitXpmInfo(info) - XpmInfo *info; -{ - if (info) { - info->hints_cmt = NULL; - info->colors_cmt = NULL; - info->pixels_cmt = NULL; - info->extensions = NULL; - info->nextensions = 0; - } -} - -/* - * Free the XpmInfo data which have been allocated - */ -void -XpmFreeXpmInfo(info) - XpmInfo *info; -{ - if (info) { - if (info->valuemask & XpmComments) { - if (info->hints_cmt) { - XpmFree(info->hints_cmt); - info->hints_cmt = NULL; - } - if (info->colors_cmt) { - XpmFree(info->colors_cmt); - info->colors_cmt = NULL; - } - if (info->pixels_cmt) { - XpmFree(info->pixels_cmt); - info->pixels_cmt = NULL; - } - } - if (info->valuemask & XpmReturnExtensions && info->nextensions) { - XpmFreeExtensions(info->extensions, info->nextensions); - info->extensions = NULL; - info->nextensions = 0; - } - info->valuemask = 0; - } -} - -/* - * Set the XpmInfo valuemask to retrieve required info - */ -void -xpmSetInfoMask(info, attributes) - XpmInfo *info; - XpmAttributes *attributes; -{ - info->valuemask = 0; - if (attributes->valuemask & XpmReturnInfos) - info->valuemask |= XpmReturnComments; - if (attributes->valuemask & XpmReturnExtensions) - info->valuemask |= XpmReturnExtensions; -} - -/* - * Fill in the XpmInfo with the XpmAttributes - */ -void -xpmSetInfo(info, attributes) - XpmInfo *info; - XpmAttributes *attributes; -{ - info->valuemask = 0; - if (attributes->valuemask & XpmInfos) { - info->valuemask |= XpmComments | XpmColorTable; - info->hints_cmt = attributes->hints_cmt; - info->colors_cmt = attributes->colors_cmt; - info->pixels_cmt = attributes->pixels_cmt; - } - if (attributes->valuemask & XpmExtensions) { - info->valuemask |= XpmExtensions; - info->extensions = attributes->extensions; - info->nextensions = attributes->nextensions; - } - if (attributes->valuemask & XpmHotspot) { - info->valuemask |= XpmHotspot; - info->x_hotspot = attributes->x_hotspot; - info->y_hotspot = attributes->y_hotspot; - } -} diff --git a/nx-X11/extras/Xpm/lib/RdFToBuf.c b/nx-X11/extras/Xpm/lib/RdFToBuf.c deleted file mode 100644 index 222bf1868..000000000 --- a/nx-X11/extras/Xpm/lib/RdFToBuf.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* RdFToBuf.c: * -* * -* XPM library * -* Copy a file to a malloc'ed buffer, provided as a convenience. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#include -#if !defined(FOR_MSW) && !defined(WIN32) -#include -#endif -#ifndef VAX11C -#include -#endif -#if defined(FOR_MSW) || defined(WIN32) -#include -#define stat _stat -#define fstat _fstat -#define fdopen _fdopen -#define O_RDONLY _O_RDONLY -#endif - -int -XpmReadFileToBuffer(filename, buffer_return) - char *filename; - char **buffer_return; -{ - int fd, fcheck; - off_t len; - char *ptr; - struct stat stats; - FILE *fp; - - *buffer_return = NULL; - -#ifndef VAX11C - fd = open(filename, O_RDONLY); -#else - fd = open(filename, O_RDONLY, NULL); -#endif - if (fd < 0) - return XpmOpenFailed; - - if (fstat(fd, &stats)) { - close(fd); - return XpmOpenFailed; - } - fp = fdopen(fd, "r"); - if (!fp) { - close(fd); - return XpmOpenFailed; - } - len = stats.st_size; - ptr = (char *) XpmMalloc(len + 1); - if (!ptr) { - fclose(fp); - return XpmNoMemory; - } - fcheck = fread(ptr, 1, len, fp); - fclose(fp); -#ifdef VMS - /* VMS often stores text files in a variable-length record format, - where there are two bytes of size followed by the record. fread - converts this so it looks like a record followed by a newline. - Unfortunately, the size reported by fstat() (and fseek/ftell) - counts the two bytes for the record terminator, while fread() - counts only one. So, fread() sees fewer bytes in the file (size - minus # of records) and thus when asked to read the amount - returned by stat(), it fails. - The best solution, suggested by DEC, seems to consider the length - returned from fstat() as an upper bound and call fread() with - a record length of 1. Then don't check the return value. - We'll check for 0 for gross error that's all. - */ - len = fcheck; - if (fcheck == 0) { -#else - if (fcheck != len) { -#endif - XpmFree(ptr); - return XpmOpenFailed; - } - ptr[len] = '\0'; - *buffer_return = ptr; - return XpmSuccess; -} diff --git a/nx-X11/extras/Xpm/lib/RdFToDat.c b/nx-X11/extras/Xpm/lib/RdFToDat.c deleted file mode 100644 index 11f753b18..000000000 --- a/nx-X11/extras/Xpm/lib/RdFToDat.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* RdFToDat.c: * -* * -* XPM library * -* Parse an XPM file and create an array of strings corresponding to it. * -* * -* Developed by Dan Greening dgreen@cs.ucla.edu / dgreen@sti.com * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmReadFileToData(filename, data_return) - char *filename; - char ***data_return; -{ - XpmImage image; - XpmInfo info; - int ErrorStatus; - - info.valuemask = XpmReturnComments | XpmReturnExtensions; - - /* - * initialize return value - */ - if (data_return) - *data_return = NULL; - - ErrorStatus = XpmReadFileToXpmImage(filename, &image, &info); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - ErrorStatus = - XpmCreateDataFromXpmImage(data_return, &image, &info); - - XpmFreeXpmImage(&image); - XpmFreeXpmInfo(&info); - - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/RdFToI.c b/nx-X11/extras/Xpm/lib/RdFToI.c deleted file mode 100644 index 35fe78e27..000000000 --- a/nx-X11/extras/Xpm/lib/RdFToI.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* RdFToI.c: * -* * -* XPM library * -* Parse an XPM file and create the image and possibly its mask * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86$ */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#ifndef NO_ZPIPE -#include -#include -#include -#include -#endif - -LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata)); -LFUNC(xpmDataClose, void, (xpmData *mdata)); - -#ifndef CXPMPROG -int -XpmReadFileToImage(display, filename, - image_return, shapeimage_return, attributes) - Display *display; - char *filename; - XImage **image_return; - XImage **shapeimage_return; - XpmAttributes *attributes; -{ - XpmImage image; - XpmInfo info; - int ErrorStatus; - xpmData mdata; - - xpmInitXpmImage(&image); - xpmInitXpmInfo(&info); - - /* open file to read */ - if ((ErrorStatus = OpenReadFile(filename, &mdata)) != XpmSuccess) - return (ErrorStatus); - - /* create the XImage from the XpmData */ - if (attributes) { - xpmInitAttributes(attributes); - xpmSetInfoMask(&info, attributes); - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, &info, attributes); - } else - ErrorStatus = xpmParseDataAndCreate(display, &mdata, - image_return, shapeimage_return, - &image, NULL, attributes); - if (attributes) { - if (ErrorStatus >= 0) /* no fatal error */ - xpmSetAttributes(attributes, &image, &info); - XpmFreeXpmInfo(&info); - } - - xpmDataClose(&mdata); - /* free the XpmImage */ - XpmFreeXpmImage(&image); - - return (ErrorStatus); -} - -int -XpmReadFileToXpmImage(filename, image, info) - char *filename; - XpmImage *image; - XpmInfo *info; -{ - xpmData mdata; - int ErrorStatus; - - /* init returned values */ - xpmInitXpmImage(image); - xpmInitXpmInfo(info); - - /* open file to read */ - if ((ErrorStatus = OpenReadFile(filename, &mdata)) != XpmSuccess) - return (ErrorStatus); - - /* create the XpmImage from the XpmData */ - ErrorStatus = xpmParseData(&mdata, image, info); - - xpmDataClose(&mdata); - - return (ErrorStatus); -} -#endif /* CXPMPROG */ - -#ifndef NO_ZPIPE -/* Do not depend on errno after read_through */ -FILE* -xpmPipeThrough(fd, cmd, arg1, mode) - int fd; - const char* cmd; - const char* arg1; - const char* mode; -{ - FILE* fp; - int status, fds[2], in = 0, out = 1; - pid_t pid; - if ( 'w' == *mode ) - out = 0, in = 1; - if ( pipe(fds) < 0 ) - return NULL; - pid = fork(); - if ( pid < 0 ) - goto fail1; - if ( 0 == pid ) - { - close(fds[in]); - if ( dup2(fds[out], out) < 0 ) - goto err; - close(fds[out]); - if ( dup2(fd, in) < 0 ) - goto err; - close(fd); - pid = fork(); - if ( pid < 0 ) - goto err; - if ( 0 == pid ) - { - execlp(cmd, cmd, arg1, (char *)NULL); - perror(cmd); - goto err; - } - _exit(0); - err: - _exit(1); - } - close(fds[out]); - /* calling process: wait for first child */ - while ( waitpid(pid, &status, 0) < 0 && EINTR == errno ) - ; - if ( WIFSIGNALED(status) || - (WIFEXITED(status) && WEXITSTATUS(status) != 0) ) - goto fail2; - fp = fdopen(fds[in], mode); - if ( !fp ) - goto fail2; - close(fd); /* still open in 2nd child */ - return fp; -fail1: - close(fds[out]); -fail2: - close(fds[in]); - return NULL; -} -#endif - -/* - * open the given file to be read as an xpmData which is returned. - */ -static int -OpenReadFile(filename, mdata) - char *filename; - xpmData *mdata; -{ - if (!filename) { - mdata->stream.file = (stdin); - mdata->type = XPMFILE; - } else { - int fd = open(filename, O_RDONLY); -#if defined(NO_ZPIPE) - if ( fd < 0 ) - return XpmOpenFailed; -#else - const char* ext = NULL; - if ( fd >= 0 ) - ext = strrchr(filename, '.'); -#ifdef STAT_ZFILE /* searching for z-files if the given name not found */ - else - { - size_t len = strlen(filename); - char *compressfile = (char *) XpmMalloc(len + 4); - if ( !compressfile ) - return (XpmNoMemory); - strcpy(compressfile, filename); - strcpy(compressfile + len, ext = ".Z"); - fd = open(compressfile, O_RDONLY); - if ( fd < 0 ) - { - strcpy(compressfile + len, ext = ".gz"); - fd = open(compressfile, O_RDONLY); - if ( fd < 0 ) - { - XpmFree(compressfile); - return XpmOpenFailed; - } - } - XpmFree(compressfile); - } -#endif - if ( ext && !strcmp(ext, ".Z") ) - { - mdata->type = XPMPIPE; - mdata->stream.file = xpmPipeThrough(fd, "uncompress", "-c", "r"); - } - else if ( ext && !strcmp(ext, ".gz") ) - { - mdata->type = XPMPIPE; - mdata->stream.file = xpmPipeThrough(fd, "gunzip", "-qc", "r"); - } - else -#endif /* z-files */ - { - mdata->type = XPMFILE; - mdata->stream.file = fdopen(fd, "r"); - } - if (!mdata->stream.file) - { - close(fd); - return (XpmOpenFailed); - } - } - mdata->CommentLength = 0; -#ifdef CXPMPROG - mdata->lineNum = 0; - mdata->charNum = 0; -#endif - return (XpmSuccess); -} - -/* - * close the file related to the xpmData if any - */ -static void -xpmDataClose(mdata) - xpmData *mdata; -{ - if (mdata->stream.file != (stdin)) - fclose(mdata->stream.file); -} diff --git a/nx-X11/extras/Xpm/lib/RdFToP.c b/nx-X11/extras/Xpm/lib/RdFToP.c deleted file mode 100644 index 993824e99..000000000 --- a/nx-X11/extras/Xpm/lib/RdFToP.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* RdFToP.c: * -* * -* XPM library * -* Parse an XPM file and create the pixmap and possibly its mask * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmReadFileToPixmap(display, d, filename, pixmap_return, - shapemask_return, attributes) - Display *display; - Drawable d; - char *filename; - Pixmap *pixmap_return; - Pixmap *shapemask_return; - XpmAttributes *attributes; -{ - XImage *ximage, *shapeimage; - int ErrorStatus; - - /* initialize return values */ - if (pixmap_return) - *pixmap_return = 0; - if (shapemask_return) - *shapemask_return = 0; - - /* create the images */ - ErrorStatus = XpmReadFileToImage(display, filename, - (pixmap_return ? &ximage : NULL), - (shapemask_return ? &shapeimage : NULL), - attributes); - - if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); - - /* create the pixmaps and destroy images */ - if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); - } - if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); - XDestroyImage(shapeimage); - } - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/WrFFrBuf.c b/nx-X11/extras/Xpm/lib/WrFFrBuf.c deleted file mode 100644 index 9e0497a9e..000000000 --- a/nx-X11/extras/Xpm/lib/WrFFrBuf.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* WrFFrBuf.c: * -* * -* XPM library * -* Write a memory buffer to a file, provided as a convenience. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmWriteFileFromBuffer(filename, buffer) - char *filename; - char *buffer; -{ - int fcheck, len; - FILE *fp = fopen(filename, "w"); - - if (!fp) - return XpmOpenFailed; - - len = strlen(buffer); - fcheck = fwrite(buffer, len, 1, fp); - fclose(fp); - if (fcheck != 1) - return XpmOpenFailed; /* maybe use a better return value */ - - return XpmSuccess; -} diff --git a/nx-X11/extras/Xpm/lib/WrFFrDat.c b/nx-X11/extras/Xpm/lib/WrFFrDat.c deleted file mode 100644 index bc0a94468..000000000 --- a/nx-X11/extras/Xpm/lib/WrFFrDat.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* WrFFrData.c: * -* * -* XPM library * -* Parse an Xpm array and write a file that corresponds to it. * -* * -* Developed by Dan Greening dgreen@cs.ucla.edu / dgreen@sti.com * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmWriteFileFromData(filename, data) - char *filename; - char **data; -{ - XpmImage image; - XpmInfo info; - int ErrorStatus; - - info.valuemask = XpmReturnComments | XpmReturnExtensions; - - ErrorStatus = XpmCreateXpmImageFromData(data, &image, &info); - - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - ErrorStatus = XpmWriteFileFromXpmImage(filename, &image, &info); - - XpmFreeXpmImage(&image); - XpmFreeXpmInfo(&info); - - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/WrFFrI.c b/nx-X11/extras/Xpm/lib/WrFFrI.c deleted file mode 100644 index 363f6c47d..000000000 --- a/nx-X11/extras/Xpm/lib/WrFFrI.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* WrFFrI.c: * -* * -* XPM library * -* Write an image and possibly its mask to an XPM file * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86$ */ - -/* - * The code related to AMIGA has been added by - * Lorens Younes (d93-hyo@nada.kth.se) 4/96 - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -#ifndef NO_ZPIPE -#include "sys/wait.h" -#include "sys/types.h" -#include "fcntl.h" -#include "unistd.h" -#include "errno.h" -#endif - -/* MS Windows define a function called WriteFile @#%#&!!! */ -LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, char *name, - XpmInfo *info)); - -LFUNC(WriteColors, void, (FILE *file, XpmColor *colors, unsigned int ncolors)); - -LFUNC(WritePixels, int, (FILE *file, unsigned int width, unsigned int height, - unsigned int cpp, unsigned int *pixels, - XpmColor *colors)); - -LFUNC(WriteExtensions, void, (FILE *file, XpmExtension *ext, - unsigned int num)); - -LFUNC(OpenWriteFile, int, (char *filename, xpmData *mdata)); -LFUNC(xpmDataClose, void, (xpmData *mdata)); - -int -XpmWriteFileFromImage(display, filename, image, shapeimage, attributes) - Display *display; - char *filename; - XImage *image; - XImage *shapeimage; - XpmAttributes *attributes; -{ - XpmImage xpmimage; - XpmInfo info; - int ErrorStatus; - - /* create an XpmImage from the image */ - ErrorStatus = XpmCreateXpmImageFromImage(display, image, shapeimage, - &xpmimage, attributes); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* write the file from the XpmImage */ - if (attributes) { - xpmSetInfo(&info, attributes); - ErrorStatus = XpmWriteFileFromXpmImage(filename, &xpmimage, &info); - } else - ErrorStatus = XpmWriteFileFromXpmImage(filename, &xpmimage, NULL); - - /* free the XpmImage */ - XpmFreeXpmImage(&xpmimage); - - return (ErrorStatus); -} - -int -XpmWriteFileFromXpmImage(filename, image, info) - char *filename; - XpmImage *image; - XpmInfo *info; -{ - xpmData mdata; - char *name, *dot, *s, new_name[BUFSIZ] = {0}; - int ErrorStatus; - - /* open file to write */ - if ((ErrorStatus = OpenWriteFile(filename, &mdata)) != XpmSuccess) - return (ErrorStatus); - - /* figure out a name */ - if (filename) { -#ifdef VMS - name = filename; -#else - if (!(name = rindex(filename, '/')) -#ifdef AMIGA - && !(name = rindex(filename, ':')) -#endif - ) - name = filename; - else - name++; -#endif - /* let's try to make a valid C syntax name */ - if (index(name, '.')) { - strncpy(new_name, name, sizeof(new_name)); - new_name[sizeof(new_name)-1] = '\0'; - /* change '.' to '_' */ - name = s = new_name; - while ((dot = index(s, '.'))) { - *dot = '_'; - s = dot; - } - } - if (index(name, '-')) { - if (name != new_name) { - strcpy(new_name, name); - name = new_name; - } - /* change '-' to '_' */ - s = name; - while ((dot = index(s, '-'))) { - *dot = '_'; - s = dot; - } - } - } else - name = "image_name"; - - /* write the XpmData from the XpmImage */ - if (ErrorStatus == XpmSuccess) - ErrorStatus = xpmWriteFile(mdata.stream.file, image, name, info); - - xpmDataClose(&mdata); - - return (ErrorStatus); -} - -static int -xpmWriteFile(file, image, name, info) - FILE *file; - XpmImage *image; - char *name; - XpmInfo *info; -{ - /* calculation variables */ - unsigned int cmts, extensions; - int ErrorStatus; - - cmts = info && (info->valuemask & XpmComments); - extensions = info && (info->valuemask & XpmExtensions) - && info->nextensions; - - /* print the header line */ - fprintf(file, "/* XPM */\nstatic char * %s[] = {\n", name); - - /* print the hints line */ - if (cmts && info->hints_cmt) - fprintf(file, "/*%s*/\n", info->hints_cmt); - - fprintf(file, "\"%d %d %d %d", image->width, image->height, - image->ncolors, image->cpp); - - if (info && (info->valuemask & XpmHotspot)) - fprintf(file, " %d %d", info->x_hotspot, info->y_hotspot); - - if (extensions) - fprintf(file, " XPMEXT"); - - fprintf(file, "\",\n"); - - /* print colors */ - if (cmts && info->colors_cmt) - fprintf(file, "/*%s*/\n", info->colors_cmt); - - WriteColors(file, image->colorTable, image->ncolors); - - /* print pixels */ - if (cmts && info->pixels_cmt) - fprintf(file, "/*%s*/\n", info->pixels_cmt); - - ErrorStatus = WritePixels(file, image->width, image->height, image->cpp, - image->data, image->colorTable); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* print extensions */ - if (extensions) - WriteExtensions(file, info->extensions, info->nextensions); - - /* close the array */ - fprintf(file, "};\n"); - - return (XpmSuccess); -} - -static void -WriteColors(file, colors, ncolors) - FILE *file; - XpmColor *colors; - unsigned int ncolors; -{ - unsigned int a, key; - char *s; - char **defaults; - - for (a = 0; a < ncolors; a++, colors++) { - - defaults = (char **) colors; - fprintf(file, "\"%s", *defaults++); - - for (key = 1; key <= NKEYS; key++, defaults++) { - if ((s = *defaults)) - fprintf(file, "\t%s %s", xpmColorKeys[key - 1], s); - } - fprintf(file, "\",\n"); - } -} - - -static int -WritePixels(file, width, height, cpp, pixels, colors) - FILE *file; - unsigned int width; - unsigned int height; - unsigned int cpp; - unsigned int *pixels; - XpmColor *colors; -{ - char *s, *p, *buf; - unsigned int x, y, h; - - h = height - 1; - if (cpp != 0 && width >= (UINT_MAX - 3)/cpp) - return XpmNoMemory; - p = buf = (char *) XpmMalloc(width * cpp + 3); - if (!buf) - return (XpmNoMemory); - *buf = '"'; - p++; - for (y = 0; y < h; y++) { - s = p; - for (x = 0; x < width; x++, pixels++) { - strncpy(s, colors[*pixels].string, cpp); - s += cpp; - } - *s++ = '"'; - *s = '\0'; - fprintf(file, "%s,\n", buf); - } - /* duplicate some code to avoid a test in the loop */ - s = p; - for (x = 0; x < width; x++, pixels++) { - strncpy(s, colors[*pixels].string, cpp); - s += cpp; - } - *s++ = '"'; - *s = '\0'; - fprintf(file, "%s", buf); - - XpmFree(buf); - return (XpmSuccess); -} - -static void -WriteExtensions(file, ext, num) - FILE *file; - XpmExtension *ext; - unsigned int num; -{ - unsigned int x, y, n; - char **line; - - for (x = 0; x < num; x++, ext++) { - fprintf(file, ",\n\"XPMEXT %s\"", ext->name); - n = ext->nlines; - for (y = 0, line = ext->lines; y < n; y++, line++) - fprintf(file, ",\n\"%s\"", *line); - } - fprintf(file, ",\n\"XPMENDEXT\""); -} - - -#ifndef NO_ZPIPE -FUNC(xpmPipeThrough, FILE*, (int fd, - const char* cmd, - const char* arg1, - const char* mode)); -#endif - -/* - * open the given file to be written as an xpmData which is returned - */ -static int -OpenWriteFile(filename, mdata) - char *filename; - xpmData *mdata; -{ - if (!filename) { - mdata->stream.file = (stdout); - mdata->type = XPMFILE; - } else { -#ifndef NO_ZPIPE - size_t len; -#endif - int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644); - if ( fd < 0 ) - return(XpmOpenFailed); -#ifndef NO_ZPIPE - len = strlen(filename); - if (len > 2 && !strcmp(".Z", filename + (len - 2))) { - mdata->stream.file = xpmPipeThrough(fd, "compress", NULL, "w"); - mdata->type = XPMPIPE; - } else if (len > 3 && !strcmp(".gz", filename + (len - 3))) { - mdata->stream.file = xpmPipeThrough(fd, "gzip", "-q", "w"); - mdata->type = XPMPIPE; - } else -#endif - { - mdata->stream.file = fdopen(fd, "w"); - mdata->type = XPMFILE; - } - if (!mdata->stream.file) - return (XpmOpenFailed); - } - return (XpmSuccess); -} - -/* - * close the file related to the xpmData if any - */ -static void -xpmDataClose(mdata) - xpmData *mdata; -{ - if (mdata->stream.file != (stdout)) - fclose(mdata->stream.file); -} - diff --git a/nx-X11/extras/Xpm/lib/WrFFrP.c b/nx-X11/extras/Xpm/lib/WrFFrP.c deleted file mode 100644 index 87ceb8890..000000000 --- a/nx-X11/extras/Xpm/lib/WrFFrP.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* WrFFrP.c: * -* * -* XPM library * -* Write a pixmap and possibly its mask to an XPM file * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -int -XpmWriteFileFromPixmap(display, filename, pixmap, shapemask, attributes) - Display *display; - char *filename; - Pixmap pixmap; - Pixmap shapemask; - XpmAttributes *attributes; -{ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int width = 0; - unsigned int height = 0; - int ErrorStatus; - - /* get geometry */ - if (attributes && attributes->valuemask & XpmSize) { - width = attributes->width; - height = attributes->height; - } - /* get the ximages */ - if (pixmap) - xpmCreateImageFromPixmap(display, pixmap, &ximage, &width, &height); - if (shapemask) - xpmCreateImageFromPixmap(display, shapemask, &shapeimage, - &width, &height); - - /* write to the file */ - ErrorStatus = XpmWriteFileFromImage(display, filename, ximage, shapeimage, - attributes); - - /* destroy the ximages */ - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - - return (ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/XpmI.h b/nx-X11/extras/Xpm/lib/XpmI.h deleted file mode 100644 index 70844aca6..000000000 --- a/nx-X11/extras/Xpm/lib/XpmI.h +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ -/* $XFree86: xc/extras/Xpm/lib/XpmI.h,v 1.7 2001/11/01 23:35:25 dawes Exp $ */ - -/*****************************************************************************\ -* XpmI.h: * -* * -* XPM library * -* Internal Include file * -* * -* ** Everything defined here is subject to changes any time. ** * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -#ifndef XPMI_h -#define XPMI_h - -#include "xpm.h" - -/* - * lets try to solve include files - */ - -#include -#include -#include -#include -/* stdio.h doesn't declare popen on a Sequent DYNIX OS */ -#ifdef sequent -extern FILE *popen(); -#endif - -#include -#include -#include - -#ifdef VMS -#include -#include -#endif - -/* The following should help people wanting to use their own memory allocation - * functions. To avoid the overhead of a function call when the standard - * functions are used these are all macros, even the XpmFree function which - * needs to be a real function for the outside world though. - * So if change these be sure to change the XpmFree function in misc.c - * accordingly. - */ -#define XpmFree(ptr) free(ptr) - -#ifndef FOR_MSW -#define XpmMalloc(size) malloc((size)) -#define XpmRealloc(ptr, size) realloc((ptr), (size)) -#define XpmCalloc(nelem, elsize) calloc((nelem), (elsize)) -#else -/* checks for mallocs bigger than 64K */ -#define XpmMalloc(size) boundCheckingMalloc((long)(size))/* in simx.[ch] */ -#define XpmRealloc(ptr, size) boundCheckingRealloc((ptr),(long)(size)) -#define XpmCalloc(nelem, elsize) \ - boundCheckingCalloc((long)(nelem),(long) (elsize)) -#endif - -#if defined(SCO) || defined(__USLC__) -#include /* For SIZE_MAX */ -#endif -#include -#ifndef SIZE_MAX -# ifdef ULONG_MAX -# define SIZE_MAX ULONG_MAX -# else -# define SIZE_MAX UINT_MAX -# endif -#endif - -#define XPMMAXCMTLEN BUFSIZ -typedef struct { - unsigned int type; - union { - FILE *file; - char **data; - } stream; - char *cptr; - unsigned int line; - int CommentLength; - char Comment[XPMMAXCMTLEN]; - char *Bcmt, *Ecmt, Bos, Eos; - int format; /* 1 if XPM1, 0 otherwise */ -#ifdef CXPMPROG - int lineNum; - int charNum; -#endif -} xpmData; - -#define XPMARRAY 0 -#define XPMFILE 1 -#define XPMPIPE 2 -#define XPMBUFFER 3 - -#define EOL '\n' -#define TAB '\t' -#define SPC ' ' - -typedef struct { - char *type; /* key word */ - char *Bcmt; /* string beginning comments */ - char *Ecmt; /* string ending comments */ - char Bos; /* character beginning strings */ - char Eos; /* character ending strings */ - char *Strs; /* strings separator */ - char *Dec; /* data declaration string */ - char *Boa; /* string beginning assignment */ - char *Eoa; /* string ending assignment */ -} xpmDataType; - -extern xpmDataType xpmDataTypes[]; - -/* - * rgb values and ascii names (from rgb text file) rgb values, - * range of 0 -> 65535 color mnemonic of rgb value - */ -typedef struct { - int r, g, b; - char *name; -} xpmRgbName; - -/* Maximum number of rgb mnemonics allowed in rgb text file. */ -#define MAX_RGBNAMES 1024 - -extern char *xpmColorKeys[]; - -#define TRANSPARENT_COLOR "None" /* this must be a string! */ - -/* number of xpmColorKeys */ -#define NKEYS 5 - -/* XPM internal routines */ - -FUNC(xpmParseData, int, (xpmData *data, XpmImage *image, XpmInfo *info)); -FUNC(xpmParseDataAndCreate, int, (Display *display, xpmData *data, - XImage **image_return, - XImage **shapeimage_return, - XpmImage *image, XpmInfo *info, - XpmAttributes *attributes)); - -FUNC(xpmFreeColorTable, void, (XpmColor *colorTable, int ncolors)); - -FUNC(xpmInitAttributes, void, (XpmAttributes *attributes)); - -FUNC(xpmInitXpmImage, void, (XpmImage *image)); - -FUNC(xpmInitXpmInfo, void, (XpmInfo *info)); - -FUNC(xpmSetInfoMask, void, (XpmInfo *info, XpmAttributes *attributes)); -FUNC(xpmSetInfo, void, (XpmInfo *info, XpmAttributes *attributes)); -FUNC(xpmSetAttributes, void, (XpmAttributes *attributes, XpmImage *image, - XpmInfo *info)); - -#if !defined(FOR_MSW) && !defined(AMIGA) -FUNC(xpmCreatePixmapFromImage, void, (Display *display, Drawable d, - XImage *ximage, Pixmap *pixmap_return)); - -FUNC(xpmCreateImageFromPixmap, void, (Display *display, Pixmap pixmap, - XImage **ximage_return, - unsigned int *width, - unsigned int *height)); -#endif - -/* structures and functions related to hastable code */ - -typedef struct _xpmHashAtom { - char *name; - void *data; -} *xpmHashAtom; - -typedef struct { - unsigned int size; - unsigned int limit; - unsigned int used; - xpmHashAtom *atomTable; -} xpmHashTable; - -FUNC(xpmHashTableInit, int, (xpmHashTable *table)); -FUNC(xpmHashTableFree, void, (xpmHashTable *table)); -FUNC(xpmHashSlot, xpmHashAtom *, (xpmHashTable *table, char *s)); -FUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data)); - -#define HashAtomData(i) ((void *)(long)i) -#define HashColorIndex(slot) ((unsigned long)((*slot)->data)) -#define USE_HASHTABLE (cpp > 2 && ncolors > 4) - -/* I/O utility */ - -FUNC(xpmNextString, int, (xpmData *mdata)); -FUNC(xpmNextUI, int, (xpmData *mdata, unsigned int *ui_return)); -FUNC(xpmGetString, int, (xpmData *mdata, char **sptr, unsigned int *l)); - -#define xpmGetC(mdata) \ - ((!mdata->type || mdata->type == XPMBUFFER) ? \ - (*mdata->cptr++) : (getc(mdata->stream.file))) - -FUNC(xpmNextWord, unsigned int, - (xpmData *mdata, char *buf, unsigned int buflen)); -FUNC(xpmGetCmt, int, (xpmData *mdata, char **cmt)); -FUNC(xpmParseHeader, int, (xpmData *mdata)); -FUNC(xpmParseValues, int, (xpmData *data, unsigned int *width, - unsigned int *height, unsigned int *ncolors, - unsigned int *cpp, unsigned int *x_hotspot, - unsigned int *y_hotspot, unsigned int *hotspot, - unsigned int *extensions)); - -FUNC(xpmParseColors, int, (xpmData *data, unsigned int ncolors, - unsigned int cpp, XpmColor **colorTablePtr, - xpmHashTable *hashtable)); - -FUNC(xpmParseExtensions, int, (xpmData *data, XpmExtension **extensions, - unsigned int *nextensions)); - -/* RGB utility */ - -FUNC(xpmReadRgbNames, int, (char *rgb_fname, xpmRgbName *rgbn)); -FUNC(xpmGetRgbName, char *, (xpmRgbName *rgbn, int rgbn_max, - int red, int green, int blue)); -FUNC(xpmFreeRgbNames, void, (xpmRgbName *rgbn, int rgbn_max)); -#ifdef FOR_MSW -FUNC(xpmGetRGBfromName,int, (char *name, int *r, int *g, int *b)); -#endif - -#ifndef AMIGA -FUNC(xpm_xynormalizeimagebits, void, (register unsigned char *bp, - register XImage *img)); -FUNC(xpm_znormalizeimagebits, void, (register unsigned char *bp, - register XImage *img)); - -/* - * Macros - * - * The XYNORMALIZE macro determines whether XY format data requires - * normalization and calls a routine to do so if needed. The logic in - * this module is designed for LSBFirst byte and bit order, so - * normalization is done as required to present the data in this order. - * - * The ZNORMALIZE macro performs byte and nibble order normalization if - * required for Z format data. - * - * The XYINDEX macro computes the index to the starting byte (char) boundary - * for a bitmap_unit containing a pixel with coordinates x and y for image - * data in XY format. - * - * The ZINDEX* macros compute the index to the starting byte (char) boundary - * for a pixel with coordinates x and y for image data in ZPixmap format. - * - */ - -#define XYNORMALIZE(bp, img) \ - if ((img->byte_order == MSBFirst) || (img->bitmap_bit_order == MSBFirst)) \ - xpm_xynormalizeimagebits((unsigned char *)(bp), img) - -#define ZNORMALIZE(bp, img) \ - if (img->byte_order == MSBFirst) \ - xpm_znormalizeimagebits((unsigned char *)(bp), img) - -#define XYINDEX(x, y, img) \ - ((y) * img->bytes_per_line) + \ - (((x) + img->xoffset) / img->bitmap_unit) * (img->bitmap_unit >> 3) - -#define ZINDEX(x, y, img) ((y) * img->bytes_per_line) + \ - (((x) * img->bits_per_pixel) >> 3) - -#define ZINDEX32(x, y, img) ((y) * img->bytes_per_line) + ((x) << 2) - -#define ZINDEX16(x, y, img) ((y) * img->bytes_per_line) + ((x) << 1) - -#define ZINDEX8(x, y, img) ((y) * img->bytes_per_line) + (x) - -#define ZINDEX1(x, y, img) ((y) * img->bytes_per_line) + ((x) >> 3) -#endif /* not AMIGA */ - -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -#ifdef NEED_STRDUP -FUNC(xpmstrdup, char *, (char *s1)); -#else -#undef xpmstrdup -#define xpmstrdup strdup -#endif - -#ifdef NEED_STRCASECMP -FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); -#else -#undef xpmstrcasecmp -#define xpmstrcasecmp strcasecmp -#endif - -FUNC(xpmatoui, unsigned int, - (char *p, unsigned int l, unsigned int *ui_return)); - -#endif diff --git a/nx-X11/extras/Xpm/lib/create.c b/nx-X11/extras/Xpm/lib/create.c deleted file mode 100644 index 8b1397853..000000000 --- a/nx-X11/extras/Xpm/lib/create.c +++ /dev/null @@ -1,2532 +0,0 @@ -/* $XdotOrg: xc/extras/Xpm/lib/create.c,v 1.6 2005/05/19 15:02:48 sandmann Exp $ */ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* create.c: * -* * -* XPM library * -* Create an X image and possibly its related shape mask * -* from the given XpmImage. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86: xc/extras/Xpm/lib/create.c,v 1.4 2003/05/27 22:26:20 tsi Exp $ */ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* - * The code related to AMIGA has been added by - * Lorens Younes (d93-hyo@nada.kth.se) 4/96 - */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#include - -LFUNC(xpmVisualType, int, (Visual *visual)); - -LFUNC(AllocColor, int, (Display *display, Colormap colormap, - char *colorname, XColor *xcolor, void *closure)); -LFUNC(FreeColors, int, (Display *display, Colormap colormap, - Pixel *pixels, int n, void *closure)); - -#ifndef FOR_MSW -LFUNC(SetCloseColor, int, (Display *display, Colormap colormap, - Visual *visual, XColor *col, - Pixel *image_pixel, Pixel *mask_pixel, - Pixel *alloc_pixels, unsigned int *nalloc_pixels, - XpmAttributes *attributes, XColor *cols, int ncols, - XpmAllocColorFunc allocColor, void *closure)); -#else -/* let the window system take care of close colors */ -#endif - -LFUNC(SetColor, int, (Display *display, Colormap colormap, Visual *visual, - char *colorname, unsigned int color_index, - Pixel *image_pixel, Pixel *mask_pixel, - unsigned int *mask_pixel_index, - Pixel *alloc_pixels, unsigned int *nalloc_pixels, - Pixel *used_pixels, unsigned int *nused_pixels, - XpmAttributes *attributes, XColor *cols, int ncols, - XpmAllocColorFunc allocColor, void *closure)); - -LFUNC(CreateXImage, int, (Display *display, Visual *visual, - unsigned int depth, int format, unsigned int width, - unsigned int height, XImage **image_return)); - -LFUNC(CreateColors, int, (Display *display, XpmAttributes *attributes, - XpmColor *colors, unsigned int ncolors, - Pixel *image_pixels, Pixel *mask_pixels, - unsigned int *mask_pixel_index, - Pixel *alloc_pixels, unsigned int *nalloc_pixels, - Pixel *used_pixels, unsigned int *nused_pixels)); - -#ifndef FOR_MSW -LFUNC(ParseAndPutPixels, int, (xpmData *data, unsigned int width, - unsigned int height, unsigned int ncolors, - unsigned int cpp, XpmColor *colorTable, - xpmHashTable *hashtable, - XImage *image, Pixel *image_pixels, - XImage *mask, Pixel *mask_pixels)); -#else /* FOR_MSW */ -LFUNC(ParseAndPutPixels, int, (Display *dc, xpmData *data, unsigned int width, - unsigned int height, unsigned int ncolors, - unsigned int cpp, XpmColor *colorTable, - xpmHashTable *hashtable, - XImage *image, Pixel *image_pixels, - XImage *mask, Pixel *mask_pixels)); -#endif - -#ifndef FOR_MSW -# ifndef AMIGA -/* XImage pixel routines */ -LFUNC(PutImagePixels, void, (XImage *image, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); - -LFUNC(PutImagePixels32, void, (XImage *image, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); - -LFUNC(PutImagePixels16, void, (XImage *image, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); - -LFUNC(PutImagePixels8, void, (XImage *image, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); - -LFUNC(PutImagePixels1, void, (XImage *image, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); - -LFUNC(PutPixel1, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel, int, (XImage *ximage, int x, int y, unsigned long pixel)); -#if !defined(WORD64) && !defined(LONG64) -LFUNC(PutPixel32, int, (XImage *ximage, int x, int y, unsigned long pixel)); -#endif -LFUNC(PutPixel32MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel32LSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel16MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel16LSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel8, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel1MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); -LFUNC(PutPixel1LSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); - -# else /* AMIGA */ -LFUNC(APutImagePixels, void, (XImage *ximage, unsigned int width, - unsigned int height, unsigned int *pixelindex, - Pixel *pixels)); -# endif/* AMIGA */ -#else /* FOR_MSW */ -/* FOR_MSW pixel routine */ -LFUNC(MSWPutImagePixels, void, (Display *dc, XImage *image, - unsigned int width, unsigned int height, - unsigned int *pixelindex, Pixel *pixels)); -#endif /* FOR_MSW */ - -#ifdef NEED_STRCASECMP -FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); - -/* - * in case strcasecmp is not provided by the system here is one - * which does the trick - */ -int -xpmstrcasecmp(s1, s2) - register char *s1, *s2; -{ - register int c1, c2; - - while (*s1 && *s2) { - c1 = tolower(*s1); - c2 = tolower(*s2); - if (c1 != c2) - return (c1 - c2); - s1++; - s2++; - } - return (int) (*s1 - *s2); -} - -#endif - -/* - * return the default color key related to the given visual - */ -static int -xpmVisualType(visual) - Visual *visual; -{ -#ifndef FOR_MSW -# ifndef AMIGA - switch (visual->class) { - case StaticGray: - case GrayScale: - switch (visual->map_entries) { - case 2: - return (XPM_MONO); - case 4: - return (XPM_GRAY4); - default: - return (XPM_GRAY); - } - default: - return (XPM_COLOR); - } -# else - /* set the key explicitly in the XpmAttributes to override this */ - return (XPM_COLOR); -# endif -#else - /* there should be a similar switch for MSW */ - return (XPM_COLOR); -#endif -} - - -typedef struct { - int cols_index; - long closeness; -} CloseColor; - -static int -closeness_cmp(Const void *a, Const void *b) -{ - CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b; - - /* cast to int as qsort requires */ - return (int) (x->closeness - y->closeness); -} - - -/* default AllocColor function: - * call XParseColor if colorname is given, return negative value if failure - * call XAllocColor and return 0 if failure, positive otherwise - */ -static int -AllocColor(display, colormap, colorname, xcolor, closure) - Display *display; - Colormap colormap; - char *colorname; - XColor *xcolor; - void *closure; /* not used */ -{ - int status; - if (colorname) - if (!XParseColor(display, colormap, colorname, xcolor)) - return -1; - status = XAllocColor(display, colormap, xcolor); - return status != 0 ? 1 : 0; -} - - -#ifndef FOR_MSW -/* - * set a close color in case the exact one can't be set - * return 0 if success, 1 otherwise. - */ - -static int -SetCloseColor(display, colormap, visual, col, image_pixel, mask_pixel, - alloc_pixels, nalloc_pixels, attributes, cols, ncols, - allocColor, closure) - Display *display; - Colormap colormap; - Visual *visual; - XColor *col; - Pixel *image_pixel, *mask_pixel; - Pixel *alloc_pixels; - unsigned int *nalloc_pixels; - XpmAttributes *attributes; - XColor *cols; - int ncols; - XpmAllocColorFunc allocColor; - void *closure; -{ - - /* - * Allocation failed, so try close colors. To get here the visual must - * be GreyScale, PseudoColor or DirectColor (or perhaps StaticColor? - * What about sharing systems like QDSS?). Beware: we have to treat - * DirectColor differently. - */ - - - long int red_closeness, green_closeness, blue_closeness; - int n; - Bool alloc_color; - - if (attributes && (attributes->valuemask & XpmCloseness)) - red_closeness = green_closeness = blue_closeness = - attributes->closeness; - else { - red_closeness = attributes->red_closeness; - green_closeness = attributes->green_closeness; - blue_closeness = attributes->blue_closeness; - } - if (attributes && (attributes->valuemask & XpmAllocCloseColors)) - alloc_color = attributes->alloc_close_colors; - else - alloc_color = True; - - /* - * We sort the colormap by closeness and try to allocate the color - * closest to the target. If the allocation of this close color fails, - * which almost never happens, then one of two scenarios is possible. - * Either the colormap must have changed (since the last close color - * allocation or possibly while we were sorting the colormap), or the - * color is allocated as Read/Write by some other client. (Note: X - * _should_ allow clients to check if a particular color is Read/Write, - * but it doesn't! :-( ). We cannot determine which of these scenarios - * occurred, so we try the next closest color, and so on, until no more - * colors are within closeness of the target. If we knew that the - * colormap had changed, we could skip this sequence. - * - * If _none_ of the colors within closeness of the target can be allocated, - * then we can finally be pretty sure that the colormap has actually - * changed. In this case we try to allocate the original color (again), - * then try the closecolor stuff (again)... - * - * In theory it would be possible for an infinite loop to occur if another - * process kept changing the colormap every time we sorted it, so we set - * a maximum on the number of iterations. After this many tries, we use - * XGrabServer() to ensure that the colormap remains unchanged. - * - * This approach gives particularly bad worst case performance - as many as - * colormap reads and sorts may be needed, and as - * many as * attempted allocations - * may fail. On an 8-bit system, this means as many as 3 colormap reads, - * 3 sorts and 768 failed allocations per execution of this code! - * Luckily, my experiments show that in general use in a typical 8-bit - * color environment only about 1 in every 10000 allocations fails to - * succeed in the fastest possible time. So virtually every time what - * actually happens is a single sort followed by a successful allocate. - * The very first allocation also costs a colormap read, but no further - * reads are usually necessary. - */ - -#define ITERATIONS 2 /* more than one is almost never - * necessary */ - - for (n = 0; n <= ITERATIONS; ++n) { - CloseColor *closenesses = - (CloseColor *) XpmCalloc(ncols, sizeof(CloseColor)); - int i, c; - - for (i = 0; i < ncols; ++i) { /* build & sort closenesses table */ -#define COLOR_FACTOR 3 -#define BRIGHTNESS_FACTOR 1 - - closenesses[i].cols_index = i; - closenesses[i].closeness = - COLOR_FACTOR * (abs((long) col->red - (long) cols[i].red) - + abs((long) col->green - (long) cols[i].green) - + abs((long) col->blue - (long) cols[i].blue)) - + BRIGHTNESS_FACTOR * abs(((long) col->red + - (long) col->green + - (long) col->blue) - - ((long) cols[i].red + - (long) cols[i].green + - (long) cols[i].blue)); - } - qsort(closenesses, ncols, sizeof(CloseColor), closeness_cmp); - - i = 0; - c = closenesses[i].cols_index; - while ((long) cols[c].red >= (long) col->red - red_closeness && - (long) cols[c].red <= (long) col->red + red_closeness && - (long) cols[c].green >= (long) col->green - green_closeness && - (long) cols[c].green <= (long) col->green + green_closeness && - (long) cols[c].blue >= (long) col->blue - blue_closeness && - (long) cols[c].blue <= (long) col->blue + blue_closeness) { - if (alloc_color) { - if ((*allocColor)(display, colormap, NULL, &cols[c], closure)){ - if (n == ITERATIONS) - XUngrabServer(display); - XpmFree(closenesses); - *image_pixel = cols[c].pixel; - *mask_pixel = 1; - alloc_pixels[(*nalloc_pixels)++] = cols[c].pixel; - return (0); - } else { - ++i; - if (i == ncols) - break; - c = closenesses[i].cols_index; - } - } else { - if (n == ITERATIONS) - XUngrabServer(display); - XpmFree(closenesses); - *image_pixel = cols[c].pixel; - *mask_pixel = 1; - return (0); - } - } - - /* Couldn't allocate _any_ of the close colors! */ - - if (n == ITERATIONS) - XUngrabServer(display); - XpmFree(closenesses); - - if (i == 0 || i == ncols) /* no color close enough or cannot */ - return (1); /* alloc any color (full of r/w's) */ - - if ((*allocColor)(display, colormap, NULL, col, closure)) { - *image_pixel = col->pixel; - *mask_pixel = 1; - alloc_pixels[(*nalloc_pixels)++] = col->pixel; - return (0); - } else { /* colormap has probably changed, so - * re-read... */ - if (n == ITERATIONS - 1) - XGrabServer(display); - -#if 0 - if (visual->class == DirectColor) { - /* TODO */ - } else -#endif - XQueryColors(display, colormap, cols, ncols); - } - } - return (1); -} - -#define USE_CLOSECOLOR attributes && \ -(((attributes->valuemask & XpmCloseness) && attributes->closeness != 0) \ - || ((attributes->valuemask & XpmRGBCloseness) && \ - (attributes->red_closeness != 0 \ - || attributes->green_closeness != 0 \ - || attributes->blue_closeness != 0))) - -#else - /* FOR_MSW part */ - /* nothing to do here, the window system does it */ -#endif - -/* - * set the color pixel related to the given colorname, - * return 0 if success, 1 otherwise. - */ - -static int -SetColor(display, colormap, visual, colorname, color_index, - image_pixel, mask_pixel, mask_pixel_index, - alloc_pixels, nalloc_pixels, used_pixels, nused_pixels, - attributes, cols, ncols, allocColor, closure) - Display *display; - Colormap colormap; - Visual *visual; - char *colorname; - unsigned int color_index; - Pixel *image_pixel, *mask_pixel; - unsigned int *mask_pixel_index; - Pixel *alloc_pixels; - unsigned int *nalloc_pixels; - Pixel *used_pixels; - unsigned int *nused_pixels; - XpmAttributes *attributes; - XColor *cols; - int ncols; - XpmAllocColorFunc allocColor; - void *closure; -{ - XColor xcolor; - int status; - - if (xpmstrcasecmp(colorname, TRANSPARENT_COLOR)) { - status = (*allocColor)(display, colormap, colorname, &xcolor, closure); - if (status < 0) /* parse color failed */ - return (1); - - if (status == 0) { -#ifndef FOR_MSW - if (USE_CLOSECOLOR) - return (SetCloseColor(display, colormap, visual, &xcolor, - image_pixel, mask_pixel, - alloc_pixels, nalloc_pixels, - attributes, cols, ncols, - allocColor, closure)); - else -#endif /* ndef FOR_MSW */ - return (1); - } else - alloc_pixels[(*nalloc_pixels)++] = xcolor.pixel; - *image_pixel = xcolor.pixel; -#ifndef FOR_MSW - *mask_pixel = 1; -#else - *mask_pixel = RGB(0,0,0); -#endif - used_pixels[(*nused_pixels)++] = xcolor.pixel; - } else { - *image_pixel = 0; -#ifndef FOR_MSW - *mask_pixel = 0; -#else - *mask_pixel = RGB(255,255,255); -#endif - /* store the color table index */ - *mask_pixel_index = color_index; - } - return (0); -} - - -static int -CreateColors(display, attributes, colors, ncolors, image_pixels, mask_pixels, - mask_pixel_index, alloc_pixels, nalloc_pixels, - used_pixels, nused_pixels) - Display *display; - XpmAttributes *attributes; - XpmColor *colors; - unsigned int ncolors; - Pixel *image_pixels; - Pixel *mask_pixels; - unsigned int *mask_pixel_index; - Pixel *alloc_pixels; - unsigned int *nalloc_pixels; - Pixel *used_pixels; - unsigned int *nused_pixels; -{ - /* variables stored in the XpmAttributes structure */ - Visual *visual; - Colormap colormap; - XpmColorSymbol *colorsymbols = NULL; - unsigned int numsymbols; - XpmAllocColorFunc allocColor; - void *closure; - - char *colorname; - unsigned int color, key; - Bool pixel_defined; - XpmColorSymbol *symbol = NULL; - char **defaults; - int ErrorStatus = XpmSuccess; - char *s; - int default_index; - - XColor *cols = NULL; - unsigned int ncols = 0; - - /* - * retrieve information from the XpmAttributes - */ - if (attributes && attributes->valuemask & XpmColorSymbols) { - colorsymbols = attributes->colorsymbols; - numsymbols = attributes->numsymbols; - } else - numsymbols = 0; - - if (attributes && attributes->valuemask & XpmVisual) - visual = attributes->visual; - else - visual = XDefaultVisual(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmColormap)) - colormap = attributes->colormap; - else - colormap = XDefaultColormap(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmColorKey)) - key = attributes->color_key; - else - key = xpmVisualType(visual); - - if (attributes && (attributes->valuemask & XpmAllocColor)) - allocColor = attributes->alloc_color; - else - allocColor = AllocColor; - if (attributes && (attributes->valuemask & XpmColorClosure)) - closure = attributes->color_closure; - else - closure = NULL; - -#ifndef FOR_MSW - if (USE_CLOSECOLOR) { - /* originally from SetCloseColor */ -#if 0 - if (visual->class == DirectColor) { - - /* - * TODO: Implement close colors for DirectColor visuals. This is - * difficult situation. Chances are that we will never get here, - * because any machine that supports DirectColor will probably - * also support TrueColor (and probably PseudoColor). Also, - * DirectColor colormaps can be very large, so looking for close - * colors may be too slow. - */ - } else { -#endif - unsigned int i; - -#ifndef AMIGA - ncols = visual->map_entries; -#else - ncols = colormap->Count; -#endif - cols = (XColor *) XpmCalloc(ncols, sizeof(XColor)); - for (i = 0; i < ncols; ++i) - cols[i].pixel = i; - XQueryColors(display, colormap, cols, ncols); -#if 0 - } -#endif - } -#endif /* ndef FOR_MSW */ - - switch (key) { - case XPM_MONO: - default_index = 2; - break; - case XPM_GRAY4: - default_index = 3; - break; - case XPM_GRAY: - default_index = 4; - break; - case XPM_COLOR: - default: - default_index = 5; - break; - } - - for (color = 0; color < ncolors; color++, colors++, - image_pixels++, mask_pixels++) { - colorname = NULL; - pixel_defined = False; - defaults = (char **) colors; - - /* - * look for a defined symbol - */ - if (numsymbols) { - - unsigned int n; - - s = defaults[1]; - for (n = 0, symbol = colorsymbols; n < numsymbols; n++, symbol++) { - if (symbol->name && s && !strcmp(symbol->name, s)) - /* override name */ - break; - if (!symbol->name && symbol->value) { /* override value */ - int def_index = default_index; - - while (defaults[def_index] == NULL) /* find defined - * colorname */ - --def_index; - if (def_index < 2) {/* nothing towards mono, so try - * towards color */ - def_index = default_index + 1; - while (def_index <= 5 && defaults[def_index] == NULL) - ++def_index; - } - if (def_index >= 2 && defaults[def_index] != NULL && - !xpmstrcasecmp(symbol->value, defaults[def_index])) - break; - } - } - if (n != numsymbols) { - if (symbol->name && symbol->value) - colorname = symbol->value; - else - pixel_defined = True; - } - } - if (!pixel_defined) { /* pixel not given as symbol value */ - - unsigned int k; - - if (colorname) { /* colorname given as symbol value */ - if (!SetColor(display, colormap, visual, colorname, color, - image_pixels, mask_pixels, mask_pixel_index, - alloc_pixels, nalloc_pixels, used_pixels, - nused_pixels, attributes, cols, ncols, - allocColor, closure)) - pixel_defined = True; - else - ErrorStatus = XpmColorError; - } - k = key; - while (!pixel_defined && k > 1) { - if (defaults[k]) { - if (!SetColor(display, colormap, visual, defaults[k], - color, image_pixels, mask_pixels, - mask_pixel_index, alloc_pixels, - nalloc_pixels, used_pixels, nused_pixels, - attributes, cols, ncols, - allocColor, closure)) { - pixel_defined = True; - break; - } else - ErrorStatus = XpmColorError; - } - k--; - } - k = key + 1; - while (!pixel_defined && k < NKEYS + 1) { - if (defaults[k]) { - if (!SetColor(display, colormap, visual, defaults[k], - color, image_pixels, mask_pixels, - mask_pixel_index, alloc_pixels, - nalloc_pixels, used_pixels, nused_pixels, - attributes, cols, ncols, - allocColor, closure)) { - pixel_defined = True; - break; - } else - ErrorStatus = XpmColorError; - } - k++; - } - if (!pixel_defined) { - if (cols) - XpmFree(cols); - return (XpmColorFailed); - } - } else { - /* simply use the given pixel */ - *image_pixels = symbol->pixel; - /* the following makes the mask to be built even if none - is given a particular pixel */ - if (symbol->value - && !xpmstrcasecmp(symbol->value, TRANSPARENT_COLOR)) { - *mask_pixels = 0; - *mask_pixel_index = color; - } else - *mask_pixels = 1; - used_pixels[(*nused_pixels)++] = *image_pixels; - } - } - if (cols) - XpmFree(cols); - return (ErrorStatus); -} - - -/* default FreeColors function, simply call XFreeColors */ -static int -FreeColors(display, colormap, pixels, n, closure) - Display *display; - Colormap colormap; - Pixel *pixels; - int n; - void *closure; /* not used */ -{ - return XFreeColors(display, colormap, pixels, n, 0); -} - - -/* function call in case of error */ - -#undef RETURN -#define RETURN(status) \ -do \ -{ \ - ErrorStatus = status; \ - goto error; \ -} while(0) - -int -XpmCreateImageFromXpmImage(display, image, - image_return, shapeimage_return, attributes) - Display *display; - XpmImage *image; - XImage **image_return; - XImage **shapeimage_return; - XpmAttributes *attributes; -{ - /* variables stored in the XpmAttributes structure */ - Visual *visual; - Colormap colormap; - unsigned int depth; - int bitmap_format; - XpmFreeColorsFunc freeColors; - - /* variables to return */ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int mask_pixel_index = XpmUndefPixel; - int ErrorStatus; - - /* calculation variables */ - Pixel *image_pixels = NULL; - Pixel *mask_pixels = NULL; - Pixel *alloc_pixels = NULL; - Pixel *used_pixels = NULL; - unsigned int nalloc_pixels = 0; - unsigned int nused_pixels = 0; - - /* initialize return values */ - if (image_return) - *image_return = NULL; - if (shapeimage_return) - *shapeimage_return = NULL; - - /* retrieve information from the XpmAttributes */ - if (attributes && (attributes->valuemask & XpmVisual)) - visual = attributes->visual; - else - visual = XDefaultVisual(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmColormap)) - colormap = attributes->colormap; - else - colormap = XDefaultColormap(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmDepth)) - depth = attributes->depth; - else - depth = XDefaultDepth(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmBitmapFormat)) - bitmap_format = attributes->bitmap_format; - else - bitmap_format = ZPixmap; - - if (attributes && (attributes->valuemask & XpmFreeColors)) - freeColors = attributes->free_colors; - else - freeColors = FreeColors; - - ErrorStatus = XpmSuccess; - - if (image->ncolors >= UINT_MAX / sizeof(Pixel)) - return (XpmNoMemory); - - /* malloc pixels index tables */ - image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * image->ncolors); - if (!image_pixels) - return (XpmNoMemory); - - mask_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * image->ncolors); - if (!mask_pixels) - RETURN(XpmNoMemory); - - /* maximum of allocated pixels will be the number of colors */ - alloc_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * image->ncolors); - if (!alloc_pixels) - RETURN(XpmNoMemory); - - /* maximum of allocated pixels will be the number of colors */ - used_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * image->ncolors); - if (!used_pixels) - RETURN(XpmNoMemory); - - /* get pixel colors, store them in index tables */ - ErrorStatus = CreateColors(display, attributes, image->colorTable, - image->ncolors, image_pixels, mask_pixels, - &mask_pixel_index, alloc_pixels, &nalloc_pixels, - used_pixels, &nused_pixels); - - if (ErrorStatus != XpmSuccess - && (ErrorStatus < 0 || (attributes - && (attributes->valuemask & XpmExactColors) - && attributes->exactColors))) - RETURN(ErrorStatus); - - /* create the ximage */ - if (image_return) { - ErrorStatus = CreateXImage(display, visual, depth, - (depth == 1 ? bitmap_format : ZPixmap), - image->width, image->height, &ximage); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - -#ifndef FOR_MSW -# ifndef AMIGA - - /* - * set the ximage data using optimized functions for ZPixmap - */ - - if (ximage->bits_per_pixel == 8) - PutImagePixels8(ximage, image->width, image->height, - image->data, image_pixels); - else if (((ximage->bits_per_pixel | ximage->depth) == 1) && - (ximage->byte_order == ximage->bitmap_bit_order)) - PutImagePixels1(ximage, image->width, image->height, - image->data, image_pixels); - else if (ximage->bits_per_pixel == 16) - PutImagePixels16(ximage, image->width, image->height, - image->data, image_pixels); - else if (ximage->bits_per_pixel == 32) - PutImagePixels32(ximage, image->width, image->height, - image->data, image_pixels); - else - PutImagePixels(ximage, image->width, image->height, - image->data, image_pixels); -# else /* AMIGA */ - APutImagePixels(ximage, image->width, image->height, - image->data, image_pixels); -# endif -#else /* FOR_MSW */ - MSWPutImagePixels(display, ximage, image->width, image->height, - image->data, image_pixels); -#endif - } - /* create the shape mask image */ - if (mask_pixel_index != XpmUndefPixel && shapeimage_return) { - ErrorStatus = CreateXImage(display, visual, 1, bitmap_format, - image->width, image->height, &shapeimage); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - -#ifndef FOR_MSW -# ifndef AMIGA - PutImagePixels1(shapeimage, image->width, image->height, - image->data, mask_pixels); -# else /* AMIGA */ - APutImagePixels(shapeimage, image->width, image->height, - image->data, mask_pixels); -# endif -#else /* FOR_MSW */ - MSWPutImagePixels(display, shapeimage, image->width, image->height, - image->data, mask_pixels); -#endif - - } - XpmFree(image_pixels); - XpmFree(mask_pixels); - - /* if requested return used pixels in the XpmAttributes structure */ - if (attributes && (attributes->valuemask & XpmReturnPixels || -/* 3.2 backward compatibility code */ - attributes->valuemask & XpmReturnInfos)) { -/* end 3.2 bc */ - attributes->pixels = used_pixels; - attributes->npixels = nused_pixels; - attributes->mask_pixel = mask_pixel_index; - } else - XpmFree(used_pixels); - - /* if requested return alloc'ed pixels in the XpmAttributes structure */ - if (attributes && (attributes->valuemask & XpmReturnAllocPixels)) { - attributes->alloc_pixels = alloc_pixels; - attributes->nalloc_pixels = nalloc_pixels; - } else - XpmFree(alloc_pixels); - - /* return created images */ - if (image_return) - *image_return = ximage; - if (shapeimage_return) - *shapeimage_return = shapeimage; - - return (ErrorStatus); - -/* exit point in case of error, free only locally allocated variables */ -error: - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - if (image_pixels) - XpmFree(image_pixels); - if (mask_pixels) - XpmFree(mask_pixels); - if (nalloc_pixels) - (*freeColors)(display, colormap, alloc_pixels, nalloc_pixels, NULL); - if (alloc_pixels) - XpmFree(alloc_pixels); - if (used_pixels) - XpmFree(used_pixels); - - return (ErrorStatus); -} - - -/* - * Create an XImage with its data - */ -static int -CreateXImage(display, visual, depth, format, width, height, image_return) - Display *display; - Visual *visual; - unsigned int depth; - int format; - unsigned int width; - unsigned int height; - XImage **image_return; -{ - int bitmap_pad; - - /* first get bitmap_pad */ - if (depth > 16) - bitmap_pad = 32; - else if (depth > 8) - bitmap_pad = 16; - else - bitmap_pad = 8; - - /* then create the XImage with data = NULL and bytes_per_line = 0 */ - *image_return = XCreateImage(display, visual, depth, format, 0, 0, - width, height, bitmap_pad, 0); - if (!*image_return) - return (XpmNoMemory); - -#if !defined(FOR_MSW) && !defined(AMIGA) - if (height != 0 && (*image_return)->bytes_per_line >= INT_MAX / height) { - XDestroyImage(*image_return); - return XpmNoMemory; - } - /* now that bytes_per_line must have been set properly alloc data */ - if((*image_return)->bytes_per_line == 0 || height == 0) - return XpmNoMemory; - (*image_return)->data = - (char *) XpmMalloc((*image_return)->bytes_per_line * height); - - if (!(*image_return)->data) { - XDestroyImage(*image_return); - *image_return = NULL; - return (XpmNoMemory); - } -#else - /* under FOR_MSW and AMIGA XCreateImage has done it all */ -#endif - return (XpmSuccess); -} - -#ifndef FOR_MSW -# ifndef AMIGA -/* - * The functions below are written from X11R5 MIT's code (XImUtil.c) - * - * The idea is to have faster functions than the standard XPutPixel function - * to build the image data. Indeed we can speed up things by suppressing tests - * performed for each pixel. We do the same tests but at the image level. - * We also assume that we use only ZPixmap images with null offsets. - */ - -LFUNC(_putbits, void, (register char *src, int dstoffset, - register int numbits, register char *dst)); - -LFUNC(_XReverse_Bytes, int, (register unsigned char *bpt, register unsigned int nb)); - -static unsigned char Const _reverse_byte[0x100] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, - 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, - 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, - 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, - 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, - 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, - 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, - 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, - 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, - 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, - 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff -}; - -static int -_XReverse_Bytes(bpt, nb) - register unsigned char *bpt; - register unsigned int nb; -{ - do { - *bpt = _reverse_byte[*bpt]; - bpt++; - } while (--nb > 0); /* is nb user-controled? */ - return 0; -} - - -void -xpm_xynormalizeimagebits(bp, img) - register unsigned char *bp; - register XImage *img; -{ - register unsigned char c; - - if (img->byte_order != img->bitmap_bit_order) { - switch (img->bitmap_unit) { - - case 16: - c = *bp; - *bp = *(bp + 1); - *(bp + 1) = c; - break; - - case 32: - c = *(bp + 3); - *(bp + 3) = *bp; - *bp = c; - c = *(bp + 2); - *(bp + 2) = *(bp + 1); - *(bp + 1) = c; - break; - } - } - if (img->bitmap_bit_order == MSBFirst) - _XReverse_Bytes(bp, img->bitmap_unit >> 3); -} - -void -xpm_znormalizeimagebits(bp, img) - register unsigned char *bp; - register XImage *img; -{ - register unsigned char c; - - switch (img->bits_per_pixel) { - - case 2: - _XReverse_Bytes(bp, 1); - break; - - case 4: - *bp = ((*bp >> 4) & 0xF) | ((*bp << 4) & ~0xF); - break; - - case 16: - c = *bp; - *bp = *(bp + 1); - *(bp + 1) = c; - break; - - case 24: - c = *(bp + 2); - *(bp + 2) = *bp; - *bp = c; - break; - - case 32: - c = *(bp + 3); - *(bp + 3) = *bp; - *bp = c; - c = *(bp + 2); - *(bp + 2) = *(bp + 1); - *(bp + 1) = c; - break; - } -} - -static unsigned char Const _lomask[0x09] = { -0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff}; -static unsigned char Const _himask[0x09] = { -0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00}; - -static void -_putbits(src, dstoffset, numbits, dst) - register char *src; /* address of source bit string */ - int dstoffset; /* bit offset into destination; - * range is 0-31 */ - register int numbits; /* number of bits to copy to - * destination */ - register char *dst; /* address of destination bit string */ -{ - register unsigned char chlo, chhi; - int hibits; - - dst = dst + (dstoffset >> 3); - dstoffset = dstoffset & 7; - hibits = 8 - dstoffset; - chlo = *dst & _lomask[dstoffset]; - for (;;) { - chhi = (*src << dstoffset) & _himask[dstoffset]; - if (numbits <= hibits) { - chhi = chhi & _lomask[dstoffset + numbits]; - *dst = (*dst & _himask[dstoffset + numbits]) | chlo | chhi; - break; - } - *dst = chhi | chlo; - dst++; - numbits = numbits - hibits; - chlo = (unsigned char) (*src & _himask[hibits]) >> hibits; - src++; - if (numbits <= dstoffset) { - chlo = chlo & _lomask[numbits]; - *dst = (*dst & _himask[numbits]) | chlo; - break; - } - numbits = numbits - dstoffset; - } -} - -/* - * Default method to write pixels into a Z image data structure. - * The algorithm used is: - * - * copy the destination bitmap_unit or Zpixel to temp - * normalize temp if needed - * copy the pixel bits into the temp - * renormalize temp if needed - * copy the temp back into the destination image data - */ - -static void -PutImagePixels(image, width, height, pixelindex, pixels) - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - register char *src; - register char *dst; - register unsigned int *iptr; - register unsigned int x, y; - register char *data; - Pixel pixel, px; - int nbytes, depth, ibu, ibpp, i; - - data = image->data; - iptr = pixelindex; - depth = image->depth; - if (depth == 1) { - ibu = image->bitmap_unit; - for (y = 0; y < height; y++) /* how can we trust height */ - for (x = 0; x < width; x++, iptr++) { /* how can we trust width */ - pixel = pixels[*iptr]; - for (i = 0, px = pixel; i < sizeof(unsigned long); - i++, px >>= 8) - ((unsigned char *) &pixel)[i] = px; - src = &data[XYINDEX(x, y, image)]; - dst = (char *) &px; - px = 0; - nbytes = ibu >> 3; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - XYNORMALIZE(&px, image); - _putbits((char *) &pixel, (x % ibu), 1, (char *) &px); - XYNORMALIZE(&px, image); - src = (char *) &px; - dst = &data[XYINDEX(x, y, image)]; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - } - } else { - ibpp = image->bits_per_pixel; - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - pixel = pixels[*iptr]; - if (depth == 4) - pixel &= 0xf; - for (i = 0, px = pixel; i < sizeof(unsigned long); i++, - px >>= 8) - ((unsigned char *) &pixel)[i] = px; - src = &data[ZINDEX(x, y, image)]; - dst = (char *) &px; - px = 0; - nbytes = (ibpp + 7) >> 3; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - ZNORMALIZE(&px, image); - _putbits((char *) &pixel, (x * ibpp) & 7, ibpp, (char *) &px); - ZNORMALIZE(&px, image); - src = (char *) &px; - dst = &data[ZINDEX(x, y, image)]; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - } - } -} - -/* - * write pixels into a 32-bits Z image data structure - */ - -#if !defined(WORD64) && !defined(LONG64) -/* this item is static but deterministic so let it slide; doesn't - * hurt re-entrancy of this library. Note if it is actually const then would - * be OK under rules of ANSI-C but probably not C++ which may not - * want to allocate space for it. - */ -static unsigned long byteorderpixel = MSBFirst << 24; - -#endif - -/* - WITHOUT_SPEEDUPS is a flag to be turned on if you wish to use the original - 3.2e code - by default you get the speeded-up version. -*/ - -static void -PutImagePixels32(image, width, height, pixelindex, pixels) - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - unsigned char *data; - unsigned int *iptr; - unsigned int y; - Pixel pixel; - -#ifdef WITHOUT_SPEEDUPS - - unsigned int x; - unsigned char *addr; - - data = (unsigned char *) image->data; - iptr = pixelindex; -#if !defined(WORD64) && !defined(LONG64) - if (*((char *) &byteorderpixel) == image->byte_order) { - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - *((unsigned long *) addr) = pixels[*iptr]; - } - } else -#endif - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - pixel = pixels[*iptr]; - addr[0] = pixel >> 24; - addr[1] = pixel >> 16; - addr[2] = pixel >> 8; - addr[3] = pixel; - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - pixel = pixels[*iptr]; - addr[0] = pixel; - addr[1] = pixel >> 8; - addr[2] = pixel >> 16; - addr[3] = pixel >> 24; - } - -#else /* WITHOUT_SPEEDUPS */ - - unsigned int bpl = image->bytes_per_line; - unsigned char *data_ptr, *max_data; - - data = (unsigned char *) image->data; - iptr = pixelindex; -#if !defined(WORD64) && !defined(LONG64) - if (*((char *) &byteorderpixel) == image->byte_order) { - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + (width << 2); - - while (data_ptr < max_data) { - *((unsigned long *) data_ptr) = pixels[*(iptr++)]; - data_ptr += (1 << 2); - } - data += bpl; - } - } else -#endif - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + (width << 2); - - while (data_ptr < max_data) { - pixel = pixels[*(iptr++)]; - - *data_ptr++ = pixel >> 24; - *data_ptr++ = pixel >> 16; - *data_ptr++ = pixel >> 8; - *data_ptr++ = pixel; - - } - data += bpl; - } - else - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + (width << 2); - - while (data_ptr < max_data) { - pixel = pixels[*(iptr++)]; - - *data_ptr++ = pixel; - *data_ptr++ = pixel >> 8; - *data_ptr++ = pixel >> 16; - *data_ptr++ = pixel >> 24; - } - data += bpl; - } - -#endif /* WITHOUT_SPEEDUPS */ -} - -/* - * write pixels into a 16-bits Z image data structure - */ - -static void -PutImagePixels16(image, width, height, pixelindex, pixels) - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - unsigned char *data; - unsigned int *iptr; - unsigned int y; - -#ifdef WITHOUT_SPEEDUPS - - unsigned int x; - unsigned char *addr; - - data = (unsigned char *) image->data; - iptr = pixelindex; - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX16(x, y, image)]; - addr[0] = pixels[*iptr] >> 8; - addr[1] = pixels[*iptr]; - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX16(x, y, image)]; - addr[0] = pixels[*iptr]; - addr[1] = pixels[*iptr] >> 8; - } - -#else /* WITHOUT_SPEEDUPS */ - - Pixel pixel; - - unsigned int bpl = image->bytes_per_line; - unsigned char *data_ptr, *max_data; - - data = (unsigned char *) image->data; - iptr = pixelindex; - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + (width << 1); - - while (data_ptr < max_data) { - pixel = pixels[*(iptr++)]; - - data_ptr[0] = pixel >> 8; - data_ptr[1] = pixel; - - data_ptr += (1 << 1); - } - data += bpl; - } - else - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + (width << 1); - - while (data_ptr < max_data) { - pixel = pixels[*(iptr++)]; - - data_ptr[0] = pixel; - data_ptr[1] = pixel >> 8; - - data_ptr += (1 << 1); - } - data += bpl; - } - -#endif /* WITHOUT_SPEEDUPS */ -} - -/* - * write pixels into a 8-bits Z image data structure - */ - -static void -PutImagePixels8(image, width, height, pixelindex, pixels) - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - char *data; - unsigned int *iptr; - unsigned int y; - -#ifdef WITHOUT_SPEEDUPS - - unsigned int x; - - data = image->data; - iptr = pixelindex; - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) - data[ZINDEX8(x, y, image)] = pixels[*iptr]; - -#else /* WITHOUT_SPEEDUPS */ - - unsigned int bpl = image->bytes_per_line; - char *data_ptr, *max_data; - - data = image->data; - iptr = pixelindex; - - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + width; - - while (data_ptr < max_data) - *(data_ptr++) = pixels[*(iptr++)]; - - data += bpl; - } - -#endif /* WITHOUT_SPEEDUPS */ -} - -/* - * write pixels into a 1-bit depth image data structure and **offset null** - */ - -static void -PutImagePixels1(image, width, height, pixelindex, pixels) - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - if (image->byte_order != image->bitmap_bit_order) - PutImagePixels(image, width, height, pixelindex, pixels); - else { - unsigned int *iptr; - unsigned int y; - char *data; - -#ifdef WITHOUT_SPEEDUPS - - unsigned int x; - - data = image->data; - iptr = pixelindex; - if (image->bitmap_bit_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - if (pixels[*iptr] & 1) - data[ZINDEX1(x, y, image)] |= 0x80 >> (x & 7); - else - data[ZINDEX1(x, y, image)] &= ~(0x80 >> (x & 7)); - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - if (pixels[*iptr] & 1) - data[ZINDEX1(x, y, image)] |= 1 << (x & 7); - else - data[ZINDEX1(x, y, image)] &= ~(1 << (x & 7)); - } - -#else /* WITHOUT_SPEEDUPS */ - - char value; - char *data_ptr, *max_data; - int bpl = image->bytes_per_line; - int diff, count; - - data = image->data; - iptr = pixelindex; - - diff = width & 7; - width >>= 3; - - if (image->bitmap_bit_order == MSBFirst) - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + width; - while (data_ptr < max_data) { - value = 0; - - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - value = (value << 1) | (pixels[*(iptr++)] & 1); - - *(data_ptr++) = value; - } - if (diff) { - value = 0; - for (count = 0; count < diff; count++) { - if (pixels[*(iptr++)] & 1) - value |= (0x80 >> count); - } - *(data_ptr) = value; - } - data += bpl; - } - else - for (y = 0; y < height; y++) { - data_ptr = data; - max_data = data_ptr + width; - while (data_ptr < max_data) { - value = 0; - iptr += 8; - - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - value = (value << 1) | (pixels[*(--iptr)] & 1); - - iptr += 8; - *(data_ptr++) = value; - } - if (diff) { - value = 0; - for (count = 0; count < diff; count++) { - if (pixels[*(iptr++)] & 1) - value |= (1 << count); - } - *(data_ptr) = value; - } - data += bpl; - } - -#endif /* WITHOUT_SPEEDUPS */ - } -} - -int -XpmCreatePixmapFromXpmImage(display, d, image, - pixmap_return, shapemask_return, attributes) - Display *display; - Drawable d; - XpmImage *image; - Pixmap *pixmap_return; - Pixmap *shapemask_return; - XpmAttributes *attributes; -{ - XImage *ximage, *shapeimage; - int ErrorStatus; - - /* initialize return values */ - if (pixmap_return) - *pixmap_return = 0; - if (shapemask_return) - *shapemask_return = 0; - - /* create the ximages */ - ErrorStatus = XpmCreateImageFromXpmImage(display, image, - (pixmap_return ? &ximage : NULL), - (shapemask_return ? - &shapeimage : NULL), - attributes); - if (ErrorStatus < 0) - return (ErrorStatus); - - /* create the pixmaps and destroy images */ - if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); - } - if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); - XDestroyImage(shapeimage); - } - return (ErrorStatus); -} - -# else /* AMIGA */ - -static void -APutImagePixels ( - XImage *image, - unsigned int width, - unsigned int height, - unsigned int *pixelindex, - Pixel *pixels) -{ - unsigned int *data = pixelindex; - unsigned int x, y; - unsigned char *array; - XImage *tmp_img; - BOOL success = FALSE; - - array = XpmMalloc ((((width+15)>>4)<<4)*sizeof (*array)); - if (array != NULL) - { - tmp_img = AllocXImage ((((width+15)>>4)<<4), 1, - image->rp->BitMap->Depth); - if (tmp_img != NULL) - { - for (y = 0; y < height; ++y) - { - for (x = 0; x < width; ++x) - array[x] = pixels[*(data++)]; - WritePixelLine8 (image->rp, 0, y, width, array, tmp_img->rp); - } - FreeXImage (tmp_img); - success = TRUE; - } - XpmFree (array); - } - - if (!success) - { - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - XPutPixel (image, x, y, pixels[*(data++)]); - } -} - -# endif/* AMIGA */ -#else /* FOR_MSW part follows */ -static void -MSWPutImagePixels(dc, image, width, height, pixelindex, pixels) - Display *dc; - XImage *image; - unsigned int width; - unsigned int height; - unsigned int *pixelindex; - Pixel *pixels; -{ - unsigned int *data = pixelindex; - unsigned int x, y; - HBITMAP obm; - - obm = SelectObject(*dc, image->bitmap); - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - SetPixel(*dc, x, y, pixels[*(data++)]); /* data is [x+y*width] */ - } - } - SelectObject(*dc, obm); -} - -#endif /* FOR_MSW */ - - - -#if !defined(FOR_MSW) && !defined(AMIGA) - -static int -PutPixel1(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - register char *src; - register char *dst; - register int i; - Pixel px; - int nbytes; - - if(x < 0 || y < 0) - return 0; - - for (i=0, px=pixel; i>=8) - ((unsigned char *)&pixel)[i] = px; - src = &ximage->data[XYINDEX(x, y, ximage)]; - dst = (char *)&px; - px = 0; - nbytes = ximage->bitmap_unit >> 3; - for (i = nbytes; --i >= 0; ) *dst++ = *src++; - XYNORMALIZE(&px, ximage); - i = ((x + ximage->xoffset) % ximage->bitmap_unit); - _putbits ((char *)&pixel, i, 1, (char *)&px); - XYNORMALIZE(&px, ximage); - src = (char *) &px; - dst = &ximage->data[XYINDEX(x, y, ximage)]; - for (i = nbytes; --i >= 0; ) - *dst++ = *src++; - - return 1; -} - -static int -PutPixel(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - register char *src; - register char *dst; - register int i; - Pixel px; - unsigned int nbytes, ibpp; - - if(x < 0 || y < 0) - return 0; - - ibpp = ximage->bits_per_pixel; - if (ximage->depth == 4) - pixel &= 0xf; - for (i = 0, px = pixel; i < sizeof(unsigned long); i++, px >>= 8) - ((unsigned char *) &pixel)[i] = px; - src = &ximage->data[ZINDEX(x, y, ximage)]; - dst = (char *) &px; - px = 0; - nbytes = (ibpp + 7) >> 3; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - ZNORMALIZE(&px, ximage); - _putbits((char *) &pixel, (x * ibpp) & 7, ibpp, (char *) &px); - ZNORMALIZE(&px, ximage); - src = (char *) &px; - dst = &ximage->data[ZINDEX(x, y, ximage)]; - for (i = nbytes; --i >= 0;) - *dst++ = *src++; - - return 1; -} - -#if !defined(WORD64) && !defined(LONG64) -static int -PutPixel32(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - unsigned char *addr; - - if(x < 0 || y < 0) - return 0; - - addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)]; - *((unsigned long *)addr) = pixel; - return 1; -} -#endif - -static int -PutPixel32MSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - unsigned char *addr; - - if(x < 0 || y < 0) - return 0; - - addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)]; - addr[0] = pixel >> 24; - addr[1] = pixel >> 16; - addr[2] = pixel >> 8; - addr[3] = pixel; - return 1; -} - -static int -PutPixel32LSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - unsigned char *addr; - - if(x < 0 || y < 0) - return 0; - - addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)]; - addr[3] = pixel >> 24; - addr[2] = pixel >> 16; - addr[1] = pixel >> 8; - addr[0] = pixel; - return 1; -} - -static int -PutPixel16MSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - unsigned char *addr; - - if(x < 0 || y < 0) - return 0; - - addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)]; - addr[0] = pixel >> 8; - addr[1] = pixel; - return 1; -} - -static int -PutPixel16LSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - unsigned char *addr; - - if(x < 0 || y < 0) - return 0; - - addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)]; - addr[1] = pixel >> 8; - addr[0] = pixel; - return 1; -} - -static int -PutPixel8(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - if(x < 0 || y < 0) - return 0; - - ximage->data[ZINDEX8(x, y, ximage)] = pixel; - return 1; -} - -static int -PutPixel1MSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - if(x < 0 || y < 0) - return 0; - - if (pixel & 1) - ximage->data[ZINDEX1(x, y, ximage)] |= 0x80 >> (x & 7); - else - ximage->data[ZINDEX1(x, y, ximage)] &= ~(0x80 >> (x & 7)); - return 1; -} - -static int -PutPixel1LSB(ximage, x, y, pixel) - register XImage *ximage; - int x; - int y; - unsigned long pixel; -{ - if(x < 0 || y < 0) - return 0; - - if (pixel & 1) - ximage->data[ZINDEX1(x, y, ximage)] |= 1 << (x & 7); - else - ximage->data[ZINDEX1(x, y, ximage)] &= ~(1 << (x & 7)); - return 1; -} - -#endif /* not FOR_MSW && not AMIGA */ - -/* - * This function parses an Xpm file or data and directly create an XImage - */ -int -xpmParseDataAndCreate(display, data, image_return, shapeimage_return, - image, info, attributes) - Display *display; - xpmData *data; - XImage **image_return; - XImage **shapeimage_return; - XpmImage *image; - XpmInfo *info; - XpmAttributes *attributes; -{ - /* variables stored in the XpmAttributes structure */ - Visual *visual; - Colormap colormap; - unsigned int depth; - int bitmap_format; - XpmFreeColorsFunc freeColors; - - /* variables to return */ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int mask_pixel_index = XpmUndefPixel; - - /* calculation variables */ - Pixel *image_pixels = NULL; - Pixel *mask_pixels = NULL; - Pixel *alloc_pixels = NULL; - Pixel *used_pixels = NULL; - unsigned int nalloc_pixels = 0; - unsigned int nused_pixels = 0; - unsigned int width, height, ncolors, cpp; - unsigned int x_hotspot, y_hotspot, hotspot = 0, extensions = 0; - XpmColor *colorTable = NULL; - char *hints_cmt = NULL; - char *colors_cmt = NULL; - char *pixels_cmt = NULL; - - unsigned int cmts; - int ErrorStatus; - xpmHashTable hashtable; - - - /* initialize return values */ - if (image_return) - *image_return = NULL; - if (shapeimage_return) - *shapeimage_return = NULL; - - - /* retrieve information from the XpmAttributes */ - if (attributes && (attributes->valuemask & XpmVisual)) - visual = attributes->visual; - else - visual = XDefaultVisual(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmColormap)) - colormap = attributes->colormap; - else - colormap = XDefaultColormap(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmDepth)) - depth = attributes->depth; - else - depth = XDefaultDepth(display, XDefaultScreen(display)); - - if (attributes && (attributes->valuemask & XpmBitmapFormat)) - bitmap_format = attributes->bitmap_format; - else - bitmap_format = ZPixmap; - - if (attributes && (attributes->valuemask & XpmFreeColors)) - freeColors = attributes->free_colors; - else - freeColors = FreeColors; - - cmts = info && (info->valuemask & XpmReturnComments); - - /* - * parse the header - */ - ErrorStatus = xpmParseHeader(data); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* - * read values - */ - ErrorStatus = xpmParseValues(data, &width, &height, &ncolors, &cpp, - &x_hotspot, &y_hotspot, &hotspot, - &extensions); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* - * store the hints comment line - */ - if (cmts) - xpmGetCmt(data, &hints_cmt); - - /* - * init the hastable - */ - if (USE_HASHTABLE) { - ErrorStatus = xpmHashTableInit(&hashtable); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - } - - /* - * read colors - */ - ErrorStatus = xpmParseColors(data, ncolors, cpp, &colorTable, &hashtable); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - - /* - * store the colors comment line - */ - if (cmts) - xpmGetCmt(data, &colors_cmt); - - /* malloc pixels index tables */ - if (ncolors >= UINT_MAX / sizeof(Pixel)) - RETURN(XpmNoMemory); - - image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors); - if (!image_pixels) - RETURN(XpmNoMemory); - - mask_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors); - if (!mask_pixels) - RETURN(XpmNoMemory); - - /* maximum of allocated pixels will be the number of colors */ - alloc_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors); - if (!alloc_pixels) - RETURN(XpmNoMemory); - - /* maximum of allocated pixels will be the number of colors */ - used_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors); - if (!used_pixels) - RETURN(XpmNoMemory); - - /* get pixel colors, store them in index tables */ - ErrorStatus = CreateColors(display, attributes, colorTable, ncolors, - image_pixels, mask_pixels, &mask_pixel_index, - alloc_pixels, &nalloc_pixels, used_pixels, - &nused_pixels); - - if (ErrorStatus != XpmSuccess - && (ErrorStatus < 0 || (attributes - && (attributes->valuemask & XpmExactColors) - && attributes->exactColors))) - RETURN(ErrorStatus); - - /* now create the ximage */ - if (image_return) { - ErrorStatus = CreateXImage(display, visual, depth, - (depth == 1 ? bitmap_format : ZPixmap), - width, height, &ximage); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - -#if !defined(FOR_MSW) && !defined(AMIGA) - - /* - * set the XImage pointer function, to be used with XPutPixel, - * to an internal optimized function - */ - - if (ximage->bits_per_pixel == 8) - ximage->f.put_pixel = PutPixel8; - else if (((ximage->bits_per_pixel | ximage->depth) == 1) && - (ximage->byte_order == ximage->bitmap_bit_order)) - if (ximage->bitmap_bit_order == MSBFirst) - ximage->f.put_pixel = PutPixel1MSB; - else - ximage->f.put_pixel = PutPixel1LSB; - else if (ximage->bits_per_pixel == 16) - if (ximage->bitmap_bit_order == MSBFirst) - ximage->f.put_pixel = PutPixel16MSB; - else - ximage->f.put_pixel = PutPixel16LSB; - else if (ximage->bits_per_pixel == 32) -#if !defined(WORD64) && !defined(LONG64) - if (*((char *)&byteorderpixel) == ximage->byte_order) - ximage->f.put_pixel = PutPixel32; - else -#endif - if (ximage->bitmap_bit_order == MSBFirst) - ximage->f.put_pixel = PutPixel32MSB; - else - ximage->f.put_pixel = PutPixel32LSB; - else if ((ximage->bits_per_pixel | ximage->depth) == 1) - ximage->f.put_pixel = PutPixel1; - else - ximage->f.put_pixel = PutPixel; -#endif /* not FOR_MSW && not AMIGA */ - } - - /* create the shape mask image */ - if (mask_pixel_index != XpmUndefPixel && shapeimage_return) { - ErrorStatus = CreateXImage(display, visual, 1, bitmap_format, - width, height, &shapeimage); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - -#if !defined(FOR_MSW) && !defined(AMIGA) - if (shapeimage->bitmap_bit_order == MSBFirst) - shapeimage->f.put_pixel = PutPixel1MSB; - else - shapeimage->f.put_pixel = PutPixel1LSB; -#endif - } - - /* - * read pixels and put them in the XImage - */ - ErrorStatus = ParseAndPutPixels( -#ifdef FOR_MSW - display, -#endif - data, width, height, ncolors, cpp, - colorTable, &hashtable, - ximage, image_pixels, - shapeimage, mask_pixels); - XpmFree(image_pixels); - image_pixels = NULL; - XpmFree(mask_pixels); - mask_pixels = NULL; - - /* - * free the hastable - */ - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - else if (USE_HASHTABLE) - xpmHashTableFree(&hashtable); - - /* - * store the pixels comment line - */ - if (cmts) - xpmGetCmt(data, &pixels_cmt); - - /* - * parse extensions - */ - if (info && (info->valuemask & XpmReturnExtensions)) { - if (extensions) { - ErrorStatus = xpmParseExtensions(data, &info->extensions, - &info->nextensions); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - } else { - info->extensions = NULL; - info->nextensions = 0; - } - } - /* - * store found informations in the XpmImage structure - */ - image->width = width; - image->height = height; - image->cpp = cpp; - image->ncolors = ncolors; - image->colorTable = colorTable; - image->data = NULL; - - if (info) { - if (cmts) { - info->hints_cmt = hints_cmt; - info->colors_cmt = colors_cmt; - info->pixels_cmt = pixels_cmt; - } - if (hotspot) { - info->x_hotspot = x_hotspot; - info->y_hotspot = y_hotspot; - info->valuemask |= XpmHotspot; - } - } - /* if requested return used pixels in the XpmAttributes structure */ - if (attributes && (attributes->valuemask & XpmReturnPixels || -/* 3.2 backward compatibility code */ - attributes->valuemask & XpmReturnInfos)) { -/* end 3.2 bc */ - attributes->pixels = used_pixels; - attributes->npixels = nused_pixels; - attributes->mask_pixel = mask_pixel_index; - } else - XpmFree(used_pixels); - - /* if requested return alloc'ed pixels in the XpmAttributes structure */ - if (attributes && (attributes->valuemask & XpmReturnAllocPixels)) { - attributes->alloc_pixels = alloc_pixels; - attributes->nalloc_pixels = nalloc_pixels; - } else - XpmFree(alloc_pixels); - - /* return created images */ - if (image_return) - *image_return = ximage; - if (shapeimage_return) - *shapeimage_return = shapeimage; - - return (XpmSuccess); - -/* exit point in case of error, free only locally allocated variables */ -error: - if (USE_HASHTABLE) - xpmHashTableFree(&hashtable); - if (colorTable) - xpmFreeColorTable(colorTable, ncolors); - if (hints_cmt) - XpmFree(hints_cmt); - if (colors_cmt) - XpmFree(colors_cmt); - if (pixels_cmt) - XpmFree(pixels_cmt); - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - if (image_pixels) - XpmFree(image_pixels); - if (mask_pixels) - XpmFree(mask_pixels); - if (nalloc_pixels) - (*freeColors)(display, colormap, alloc_pixels, nalloc_pixels, NULL); - if (alloc_pixels) - XpmFree(alloc_pixels); - if (used_pixels) - XpmFree(used_pixels); - - return (ErrorStatus); -} - -static int -ParseAndPutPixels( -#ifdef FOR_MSW - dc, -#endif - data, width, height, ncolors, cpp, colorTable, hashtable, - image, image_pixels, shapeimage, shape_pixels) -#ifdef FOR_MSW - Display *dc; -#endif - xpmData *data; - unsigned int width; - unsigned int height; - unsigned int ncolors; - unsigned int cpp; - XpmColor *colorTable; - xpmHashTable *hashtable; - XImage *image; - Pixel *image_pixels; - XImage *shapeimage; - Pixel *shape_pixels; -{ - unsigned int a, x, y; - - switch (cpp) { - - case (1): /* Optimize for single character - * colors */ - { - unsigned short colidx[256]; -#ifdef FOR_MSW - HDC shapedc; - HBITMAP obm, sobm; - - if ( shapeimage ) { - shapedc = CreateCompatibleDC(*dc); - sobm = SelectObject(shapedc, shapeimage->bitmap); - } else { - shapedc = NULL; - } - obm = SelectObject(*dc, image->bitmap); -#endif - if (ncolors > 256) - return (XpmFileInvalid); - - bzero((char *)colidx, 256 * sizeof(short)); - for (a = 0; a < ncolors; a++) - colidx[(unsigned char)colorTable[a].string[0]] = a + 1; - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++) { - int c = xpmGetC(data); - - if (c > 0 && c < 256 && colidx[c] != 0) { -#ifndef FOR_MSW - XPutPixel(image, x, y, image_pixels[colidx[c] - 1]); - if (shapeimage) - XPutPixel(shapeimage, x, y, - shape_pixels[colidx[c] - 1]); -#else - SetPixel(*dc, x, y, image_pixels[colidx[c] - 1]); - if (shapedc) { - SetPixel(shapedc, x, y, shape_pixels[colidx[c] - 1]); - } -#endif - } else - return (XpmFileInvalid); - } - } -#ifdef FOR_MSW - if ( shapedc ) { - SelectObject(shapedc, sobm); - DeleteDC(shapedc); - } - SelectObject(*dc, obm); -#endif - } - break; - - case (2): /* Optimize for double character - * colors */ - { - -/* free all allocated pointers at all exits */ -#define FREE_CIDX {int f; for (f = 0; f < 256; f++) \ -if (cidx[f]) XpmFree(cidx[f]);} - - /* array of pointers malloced by need */ - unsigned short *cidx[256]; - unsigned int char1; - - bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */ - for (a = 0; a < ncolors; a++) { - char1 = (unsigned char) colorTable[a].string[0]; - if (cidx[char1] == NULL) { /* get new memory */ - cidx[char1] = (unsigned short *) - XpmCalloc(256, sizeof(unsigned short)); - if (cidx[char1] == NULL) { /* new block failed */ - FREE_CIDX; - return (XpmNoMemory); - } - } - cidx[char1][(unsigned char)colorTable[a].string[1]] = a + 1; - } - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++) { - int cc1 = xpmGetC(data); - if (cc1 > 0 && cc1 < 256) { - int cc2 = xpmGetC(data); - if (cc2 > 0 && cc2 < 256 && - cidx[cc1] && cidx[cc1][cc2] != 0) { -#ifndef FOR_MSW - XPutPixel(image, x, y, - image_pixels[cidx[cc1][cc2] - 1]); - if (shapeimage) - XPutPixel(shapeimage, x, y, - shape_pixels[cidx[cc1][cc2] - 1]); -#else - SelectObject(*dc, image->bitmap); - SetPixel(*dc, x, y, image_pixels[cidx[cc1][cc2] - 1]); - if (shapeimage) { - SelectObject(*dc, shapeimage->bitmap); - SetPixel(*dc, x, y, - shape_pixels[cidx[cc1][cc2] - 1]); - } -#endif - } else { - FREE_CIDX; - return (XpmFileInvalid); - } - } else { - FREE_CIDX; - return (XpmFileInvalid); - } - } - } - FREE_CIDX; - } - break; - - default: /* Non-optimized case of long color - * names */ - { - char *s; - char buf[BUFSIZ]; - - if (cpp >= sizeof(buf)) - return (XpmFileInvalid); - - buf[cpp] = '\0'; - if (USE_HASHTABLE) { - xpmHashAtom *slot; - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++) { - for (a = 0, s = buf; a < cpp; a++, s++) - *s = xpmGetC(data); - slot = xpmHashSlot(hashtable, buf); - if (!*slot) /* no color matches */ - return (XpmFileInvalid); -#ifndef FOR_MSW - XPutPixel(image, x, y, - image_pixels[HashColorIndex(slot)]); - if (shapeimage) - XPutPixel(shapeimage, x, y, - shape_pixels[HashColorIndex(slot)]); -#else - SelectObject(*dc, image->bitmap); - SetPixel(*dc, x, y, - image_pixels[HashColorIndex(slot)]); - if (shapeimage) { - SelectObject(*dc, shapeimage->bitmap); - SetPixel(*dc, x, y, - shape_pixels[HashColorIndex(slot)]); - } -#endif - } - } - } else { - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++) { - for (a = 0, s = buf; a < cpp; a++, s++) - *s = xpmGetC(data); - for (a = 0; a < ncolors; a++) - if (!strcmp(colorTable[a].string, buf)) - break; - if (a == ncolors) /* no color matches */ - return (XpmFileInvalid); -#ifndef FOR_MSW - XPutPixel(image, x, y, image_pixels[a]); - if (shapeimage) - XPutPixel(shapeimage, x, y, shape_pixels[a]); -#else - SelectObject(*dc, image->bitmap); - SetPixel(*dc, x, y, image_pixels[a]); - if (shapeimage) { - SelectObject(*dc, shapeimage->bitmap); - SetPixel(*dc, x, y, shape_pixels[a]); - } -#endif - } - } - } - } - break; - } - return (XpmSuccess); -} diff --git a/nx-X11/extras/Xpm/lib/data.c b/nx-X11/extras/Xpm/lib/data.c deleted file mode 100644 index d0b86ee92..000000000 --- a/nx-X11/extras/Xpm/lib/data.c +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* data.c: * -* * -* XPM library * -* IO utilities * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86: xc/extras/Xpm/lib/data.c,v 1.3 2001/10/28 03:32:10 tsi Exp $ */ - -/* October 2004, source code review by Thomas Biege */ - -#ifndef CXPMPROG -#if 0 -/* Official version number */ -static char *RCS_Version = "$XpmVersion: 3.4k $"; - -/* Internal version number */ -static char *RCS_Id = "Id: xpm.shar,v 3.71 1998/03/19 19:47:14 lehors Exp $"; -#endif -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#endif -#include - -#ifndef CXPMPROG -#define Getc(data, file) getc(file) -#define Ungetc(data, c, file) ungetc(c, file) -#endif - -static int -ParseComment(xpmData *data) -{ - if (data->type == XPMBUFFER) { - register char c; - register unsigned int n = 0; - unsigned int notend; - char *s, *s2; - - s = data->Comment; - *s = data->Bcmt[0]; - - /* skip the string beginning comment */ - s2 = data->Bcmt; - do { - c = *data->cptr++; - *++s = c; - n++; - s2++; - } while (c == *s2 && *s2 != '\0' && c); - - if (*s2 != '\0') { - /* this wasn't the beginning of a comment */ - data->cptr -= n; - return 0; - } - /* store comment */ - data->Comment[0] = *s; - s = data->Comment; - notend = 1; - n = 0; - while (notend) { - s2 = data->Ecmt; - while (*s != *s2 && c) { - c = *data->cptr++; - if (n == XPMMAXCMTLEN - 1) { /* forget it */ - s = data->Comment; - n = 0; - } - *++s = c; - n++; - } - data->CommentLength = n; - do { - c = *data->cptr++; - if (n == XPMMAXCMTLEN - 1) { /* forget it */ - s = data->Comment; - n = 0; - } - *++s = c; - n++; - s2++; - } while (c == *s2 && *s2 != '\0' && c); - if (*s2 == '\0') { - /* this is the end of the comment */ - notend = 0; - data->cptr--; - } - } - return 0; - } else { - FILE *file = data->stream.file; - register int c; - register unsigned int n = 0, a; - unsigned int notend; - char *s, *s2; - - s = data->Comment; - *s = data->Bcmt[0]; - - /* skip the string beginning comment */ - s2 = data->Bcmt; - do { - c = Getc(data, file); - *++s = c; - n++; - s2++; - } while (c == *s2 && *s2 != '\0' && c != EOF); - - if (*s2 != '\0') { - /* this wasn't the beginning of a comment */ - /* put characters back in the order that we got them */ - for (a = n; a > 0; a--, s--) - Ungetc(data, *s, file); - return 0; - } - /* store comment */ - data->Comment[0] = *s; - s = data->Comment; - notend = 1; - n = 0; - while (notend) { - s2 = data->Ecmt; - while (*s != *s2 && c != EOF) { - c = Getc(data, file); - if (n == XPMMAXCMTLEN - 1) { /* forget it */ - s = data->Comment; - n = 0; - } - *++s = c; - n++; - } - data->CommentLength = n; - do { - c = Getc(data, file); - if (n == XPMMAXCMTLEN - 1) { /* forget it */ - s = data->Comment; - n = 0; - } - *++s = c; - n++; - s2++; - } while (c == *s2 && *s2 != '\0' && c != EOF); - if (*s2 == '\0') { - /* this is the end of the comment */ - notend = 0; - Ungetc(data, *s, file); - } - } - return 0; - } -} - -/* - * skip to the end of the current string and the beginning of the next one - */ -int -xpmNextString(data) - xpmData *data; -{ - if (!data->type) - data->cptr = (data->stream.data)[++data->line]; - else if (data->type == XPMBUFFER) { - register char c; - - /* get to the end of the current string */ - if (data->Eos) - while ((c = *data->cptr++) && c != data->Eos); - - /* - * then get to the beginning of the next string looking for possible - * comment - */ - if (data->Bos) { - while ((c = *data->cptr++) && c != data->Bos) - if (data->Bcmt && c == data->Bcmt[0]) - ParseComment(data); - } else if (data->Bcmt) { /* XPM2 natural */ - while ((c = *data->cptr++) == data->Bcmt[0]) - ParseComment(data); - data->cptr--; - } - } else { - register int c; - FILE *file = data->stream.file; - - /* get to the end of the current string */ - if (data->Eos) - while ((c = Getc(data, file)) != data->Eos && c != EOF); - - /* - * then get to the beginning of the next string looking for possible - * comment - */ - if (data->Bos) { - while ((c = Getc(data, file)) != data->Bos && c != EOF) - if (data->Bcmt && c == data->Bcmt[0]) - ParseComment(data); - - } else if (data->Bcmt) { /* XPM2 natural */ - while ((c = Getc(data, file)) == data->Bcmt[0]) - ParseComment(data); - Ungetc(data, c, file); - } - } - return 0; -} - - -/* - * skip whitespace and return the following word - */ -unsigned int -xpmNextWord(data, buf, buflen) - xpmData *data; - char *buf; - unsigned int buflen; -{ - register unsigned int n = 0; - int c; - - if (!data->type || data->type == XPMBUFFER) { - while (isspace(c = *data->cptr) && c != data->Eos) - data->cptr++; - do { - c = *data->cptr++; - *buf++ = c; - n++; - } while (!isspace(c) && c != data->Eos && n < buflen); - n--; - data->cptr--; - } else { - FILE *file = data->stream.file; - - while ((c = Getc(data, file)) != EOF && isspace(c) && c != data->Eos); - while (!isspace(c) && c != data->Eos && c != EOF && n < buflen) { - *buf++ = c; - n++; - c = Getc(data, file); - } - Ungetc(data, c, file); - } - return (n); /* this returns bytes read + 1 */ -} - -/* - * skip whitespace and compute the following unsigned int, - * returns 1 if one is found and 0 if not - */ -int -xpmNextUI(data, ui_return) - xpmData *data; - unsigned int *ui_return; -{ - char buf[BUFSIZ]; - int l; - - l = xpmNextWord(data, buf, BUFSIZ); - return xpmatoui(buf, l, ui_return); -} - -/* - * return end of string - WARNING: malloc! - */ -int -xpmGetString(data, sptr, l) - xpmData *data; - char **sptr; - unsigned int *l; -{ - unsigned int i, n = 0; - int c; - char *p = NULL, *q, buf[BUFSIZ]; - - if (!data->type || data->type == XPMBUFFER) { - if (data->cptr) { - char *start = data->cptr; - while ((c = *data->cptr) && c != data->Eos) - data->cptr++; - n = data->cptr - start + 1; - p = (char *) XpmMalloc(n); - if (!p) - return (XpmNoMemory); - strncpy(p, start, n); - if (data->type) /* XPMBUFFER */ - p[n - 1] = '\0'; - } - } else { - FILE *file = data->stream.file; - - if ((c = Getc(data, file)) == EOF) - return (XpmFileInvalid); - - i = 0; - q = buf; - p = (char *) XpmMalloc(1); - while (c != data->Eos && c != EOF) { - if (i == BUFSIZ) { - /* get to the end of the buffer */ - /* malloc needed memory */ - q = (char *) XpmRealloc(p, n + i); - if (!q) { - XpmFree(p); - return (XpmNoMemory); - } - p = q; - q += n; - /* and copy what we already have */ - strncpy(q, buf, i); - n += i; - i = 0; - q = buf; - } - *q++ = c; - i++; - c = Getc(data, file); - } - if (c == EOF) { - XpmFree(p); - return (XpmFileInvalid); - } - if (n + i != 0) { - /* malloc needed memory */ - q = (char *) XpmRealloc(p, n + i + 1); - if (!q) { - XpmFree(p); - return (XpmNoMemory); - } - p = q; - q += n; - /* and copy the buffer */ - strncpy(q, buf, i); - n += i; - p[n++] = '\0'; - } else { - *p = '\0'; - n = 1; - } - Ungetc(data, c, file); - } - *sptr = p; - *l = n; - return (XpmSuccess); -} - -/* - * get the current comment line - */ -int -xpmGetCmt(data, cmt) - xpmData *data; - char **cmt; -{ - if (!data->type) - *cmt = NULL; - else if (data->CommentLength != 0 && data->CommentLength < UINT_MAX - 1) { - if( (*cmt = (char *) XpmMalloc(data->CommentLength + 1)) == NULL) - return XpmNoMemory; - strncpy(*cmt, data->Comment, data->CommentLength); - (*cmt)[data->CommentLength] = '\0'; - data->CommentLength = 0; - } else - *cmt = NULL; - return 0; -} - -xpmDataType xpmDataTypes[] = -{ - {"", "!", "\n", '\0', '\n', "", "", "", ""}, /* Natural type */ - {"C", "/*", "*/", '"', '"', ",\n", "static char *", "[] = {\n", "};\n"}, - {"Lisp", ";", "\n", '"', '"', "\n", "(setq ", " '(\n", "))\n"}, - {NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL} -}; - -/* - * parse xpm header - */ -int -xpmParseHeader(data) - xpmData *data; -{ - char buf[BUFSIZ+1] = {0}; - int l, n = 0; - - if (data->type) { - data->Bos = '\0'; - data->Eos = '\n'; - data->Bcmt = data->Ecmt = NULL; - l = xpmNextWord(data, buf, BUFSIZ); - if (l == 7 && !strncmp("#define", buf, 7)) { - /* this maybe an XPM 1 file */ - char *ptr; - - l = xpmNextWord(data, buf, BUFSIZ); - if (!l) - return (XpmFileInvalid); - buf[l] = '\0'; - ptr = rindex(buf, '_'); - if (!ptr || strncmp("_format", ptr, l - (ptr - buf))) - return XpmFileInvalid; - /* this is definitely an XPM 1 file */ - data->format = 1; - n = 1; /* handle XPM1 as mainly XPM2 C */ - } else { - - /* - * skip the first word, get the second one, and see if this is - * XPM 2 or 3 - */ - l = xpmNextWord(data, buf, BUFSIZ); - if ((l == 3 && !strncmp("XPM", buf, 3)) || - (l == 4 && !strncmp("XPM2", buf, 4))) { - if (l == 3) - n = 1; /* handle XPM as XPM2 C */ - else { - /* get the type key word */ - l = xpmNextWord(data, buf, BUFSIZ); - - /* - * get infos about this type - */ - while (xpmDataTypes[n].type - && strncmp(xpmDataTypes[n].type, buf, l)) - n++; - } - data->format = 0; - } else - /* nope this is not an XPM file */ - return XpmFileInvalid; - } - if (xpmDataTypes[n].type) { - if (n == 0) { /* natural type */ - data->Bcmt = xpmDataTypes[n].Bcmt; - data->Ecmt = xpmDataTypes[n].Ecmt; - xpmNextString(data); /* skip the end of the headerline */ - data->Bos = xpmDataTypes[n].Bos; - data->Eos = xpmDataTypes[n].Eos; - } else { - data->Bcmt = xpmDataTypes[n].Bcmt; - data->Ecmt = xpmDataTypes[n].Ecmt; - if (!data->format) { /* XPM 2 or 3 */ - data->Bos = xpmDataTypes[n].Bos; - data->Eos = '\0'; - /* get to the beginning of the first string */ - xpmNextString(data); - data->Eos = xpmDataTypes[n].Eos; - } else /* XPM 1 skip end of line */ - xpmNextString(data); - } - } else - /* we don't know about that type of XPM file... */ - return XpmFileInvalid; - } - return XpmSuccess; -} diff --git a/nx-X11/extras/Xpm/lib/hashtab.c b/nx-X11/extras/Xpm/lib/hashtab.c deleted file mode 100644 index d2383a4b1..000000000 --- a/nx-X11/extras/Xpm/lib/hashtab.c +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* hashtab.c: * -* * -* XPM library * -* * -* Developed by Arnaud Le Hors * -* this originaly comes from Colas Nahaboo as a part of Wool * -* * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -LFUNC(AtomMake, xpmHashAtom, (char *name, void *data)); -LFUNC(HashTableGrows, int, (xpmHashTable * table)); - -static xpmHashAtom -AtomMake(name, data) /* makes an atom */ - char *name; /* WARNING: is just pointed to */ - void *data; -{ - xpmHashAtom object = (xpmHashAtom) XpmMalloc(sizeof(struct _xpmHashAtom)); - - if (object) { - object->name = name; - object->data = data; - } - return object; -} - -/************************\ -* * -* hash table routines * -* * -\************************/ - -/* - * Hash function definition: - * HASH_FUNCTION: hash function, hash = hashcode, hp = pointer on char, - * hash2 = temporary for hashcode. - * INITIAL_TABLE_SIZE in slots - * HASH_TABLE_GROWS how hash table grows. - */ - -/* Mock lisp function */ -#define HASH_FUNCTION hash = (hash << 5) - hash + *hp++; -/* #define INITIAL_HASH_SIZE 2017 */ -#define INITIAL_HASH_SIZE 256 /* should be enough for colors */ -#define HASH_TABLE_GROWS size = size * 2; - -/* aho-sethi-ullman's HPJ (sizes should be primes)*/ -#ifdef notdef -#define HASH_FUNCTION hash <<= 4; hash += *hp++; \ - if(hash2 = hash & 0xf0000000) hash ^= (hash2 >> 24) ^ hash2; -#define INITIAL_HASH_SIZE 4095 /* should be 2^n - 1 */ -#define HASH_TABLE_GROWS size = size << 1 + 1; -#endif - -/* GNU emacs function */ -/* -#define HASH_FUNCTION hash = (hash << 3) + (hash >> 28) + *hp++; -#define INITIAL_HASH_SIZE 2017 -#define HASH_TABLE_GROWS size = size * 2; -*/ - -/* end of hash functions */ - -/* - * The hash table is used to store atoms via their NAME: - * - * NAME --hash--> ATOM |--name--> "foo" - * |--data--> any value which has to be stored - * - */ - -/* - * xpmHashSlot gives the slot (pointer to xpmHashAtom) of a name - * (slot points to NULL if it is not defined) - * - */ - -xpmHashAtom * -xpmHashSlot(table, s) - xpmHashTable *table; - char *s; -{ - xpmHashAtom *atomTable = table->atomTable; - unsigned int hash; - xpmHashAtom *p; - char *hp = s; - char *ns; - - hash = 0; - while (*hp) { /* computes hash function */ - HASH_FUNCTION - } - p = atomTable + hash % table->size; - while (*p) { - ns = (*p)->name; - if (ns[0] == s[0] && strcmp(ns, s) == 0) - break; - p--; - if (p < atomTable) - p = atomTable + table->size - 1; - } - return p; -} - -static int -HashTableGrows(table) - xpmHashTable *table; -{ - xpmHashAtom *atomTable = table->atomTable; - unsigned int size = table->size; - xpmHashAtom *t, *p; - int i; - unsigned int oldSize = size; - - t = atomTable; - HASH_TABLE_GROWS - table->size = size; - table->limit = size / 3; - if (size >= UINT_MAX / sizeof(*atomTable)) - return (XpmNoMemory); - atomTable = (xpmHashAtom *) XpmMalloc(size * sizeof(*atomTable)); - if (!atomTable) - return (XpmNoMemory); - table->atomTable = atomTable; - for (p = atomTable + size; p > atomTable;) - *--p = NULL; - for (i = 0, p = t; i < oldSize; i++, p++) - if (*p) { - xpmHashAtom *ps = xpmHashSlot(table, (*p)->name); - - *ps = *p; - } - XpmFree(t); - return (XpmSuccess); -} - -/* - * xpmHashIntern(table, name, data) - * an xpmHashAtom is created if name doesn't exist, with the given data. - */ - -int -xpmHashIntern(table, tag, data) - xpmHashTable *table; - char *tag; - void *data; -{ - xpmHashAtom *slot; - - if (!*(slot = xpmHashSlot(table, tag))) { - /* undefined, make a new atom with the given data */ - if (!(*slot = AtomMake(tag, data))) - return (XpmNoMemory); - if (table->used >= table->limit) { - int ErrorStatus; - - if ((ErrorStatus = HashTableGrows(table)) != XpmSuccess) - return (ErrorStatus); - table->used++; - return (XpmSuccess); - } - table->used++; - } - return (XpmSuccess); -} - -/* - * must be called before allocating any atom - */ - -int -xpmHashTableInit(table) - xpmHashTable *table; -{ - xpmHashAtom *p; - xpmHashAtom *atomTable; - - table->size = INITIAL_HASH_SIZE; - table->limit = table->size / 3; - table->used = 0; - if (table->size >= UINT_MAX / sizeof(*atomTable)) - return (XpmNoMemory); - atomTable = (xpmHashAtom *) XpmMalloc(table->size * sizeof(*atomTable)); - if (!atomTable) - return (XpmNoMemory); - for (p = atomTable + table->size; p > atomTable;) - *--p = NULL; - table->atomTable = atomTable; - return (XpmSuccess); -} - -/* - * frees a hashtable and all the stored atoms - */ - -void -xpmHashTableFree(table) - xpmHashTable *table; -{ - xpmHashAtom *p; - xpmHashAtom *atomTable = table->atomTable; - - if (!atomTable) - return; - for (p = atomTable + table->size; p > atomTable;) - if (*--p) - XpmFree(*p); - XpmFree(atomTable); - table->atomTable = NULL; -} diff --git a/nx-X11/extras/Xpm/lib/misc.c b/nx-X11/extras/Xpm/lib/misc.c deleted file mode 100644 index d842e0e4b..000000000 --- a/nx-X11/extras/Xpm/lib/misc.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* misc.c: * -* * -* XPM library * -* Miscellaneous utilities * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -#ifdef NEED_STRDUP -/* - * in case strdup is not provided by the system here is one - * which does the trick - */ -char * -xpmstrdup(s1) - char *s1; -{ - char *s2; - size_t l = strlen(s1) + 1; - - if (s2 = (char *) XpmMalloc(l)) - strcpy(s2, s1); - return s2; -} - -#endif - -unsigned int -xpmatoui(p, l, ui_return) - register char *p; - unsigned int l; - unsigned int *ui_return; -{ - register unsigned int n, i; - - n = 0; - for (i = 0; i < l; i++) - if (*p >= '0' && *p <= '9') - n = n * 10 + *p++ - '0'; - else - break; - - if (i != 0 && i == l) { - *ui_return = n; - return 1; - } else - return 0; -} - -/* - * Function returning a character string related to an error code. - */ -char * -XpmGetErrorString(errcode) - int errcode; -{ - switch (errcode) { - case XpmColorError: - return ("XpmColorError"); - case XpmSuccess: - return ("XpmSuccess"); - case XpmOpenFailed: - return ("XpmOpenFailed"); - case XpmFileInvalid: - return ("XpmFileInvalid"); - case XpmNoMemory: - return ("XpmNoMemory"); - case XpmColorFailed: - return ("XpmColorFailed"); - default: - return ("Invalid XpmError"); - } -} - -/* - * The following function provides a way to figure out if the linked library is - * newer or older than the one with which a program has been first compiled. - */ -int -XpmLibraryVersion() -{ - return XpmIncludeVersion; -} - - -/* The following should help people wanting to use their own functions */ -#ifdef XpmFree -#undef XpmFree -#endif - -void -XpmFree(ptr) - void *ptr; -{ - free(ptr); -} diff --git a/nx-X11/extras/Xpm/lib/parse.c b/nx-X11/extras/Xpm/lib/parse.c deleted file mode 100644 index 9c94a07b3..000000000 --- a/nx-X11/extras/Xpm/lib/parse.c +++ /dev/null @@ -1,803 +0,0 @@ -/* $XdotOrg: xc/extras/Xpm/lib/parse.c,v 1.6 2005/07/16 21:11:25 alanc Exp $ */ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ -/* $XFree86: xc/extras/Xpm/lib/parse.c,v 1.2 2000/09/26 15:56:43 tsi Exp $ */ - -/*****************************************************************************\ -* parse.c: * -* * -* XPM library * -* Parse an XPM file or array and store the found informations * -* in the given XpmImage structure. * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86$ */ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#include -#include - -#if defined(HAS_STRLCAT) || defined(HAVE_STRLCAT) -# define STRLCAT(dst, src, dstsize) do { \ - if (strlcat(dst, src, dstsize) >= (dstsize)) \ - return (XpmFileInvalid); } while(0) -# define STRLCPY(dst, src, dstsize) do { \ - if (strlcpy(dst, src, dstsize) >= (dstsize)) \ - return (XpmFileInvalid); } while(0) -#else -# define STRLCAT(dst, src, dstsize) do { \ - if ((strlen(dst) + strlen(src)) < (dstsize)) \ - strcat(dst, src); \ - else return (XpmFileInvalid); } while(0) -# define STRLCPY(dst, src, dstsize) do { \ - if (strlen(src) < (dstsize)) \ - strcpy(dst, src); \ - else return (XpmFileInvalid); } while(0) -#endif - -LFUNC(ParsePixels, int, (xpmData *data, unsigned int width, - unsigned int height, unsigned int ncolors, - unsigned int cpp, XpmColor *colorTable, - xpmHashTable *hashtable, unsigned int **pixels)); - -char *xpmColorKeys[] = { - "s", /* key #1: symbol */ - "m", /* key #2: mono visual */ - "g4", /* key #3: 4 grays visual */ - "g", /* key #4: gray visual */ - "c", /* key #5: color visual */ -}; - -int -xpmParseValues(data, width, height, ncolors, cpp, - x_hotspot, y_hotspot, hotspot, extensions) - xpmData *data; - unsigned int *width, *height, *ncolors, *cpp; - unsigned int *x_hotspot, *y_hotspot, *hotspot; - unsigned int *extensions; -{ - unsigned int l; - char buf[BUFSIZ + 1]; - - if (!data->format) { /* XPM 2 or 3 */ - - /* - * read values: width, height, ncolors, chars_per_pixel - */ - if (!(xpmNextUI(data, width) && xpmNextUI(data, height) - && xpmNextUI(data, ncolors) && xpmNextUI(data, cpp))) - return (XpmFileInvalid); - - /* - * read optional information (hotspot and/or XPMEXT) if any - */ - l = xpmNextWord(data, buf, BUFSIZ); - if (l) { - *extensions = (l == 6 && !strncmp("XPMEXT", buf, 6)); - if (*extensions) - *hotspot = (xpmNextUI(data, x_hotspot) - && xpmNextUI(data, y_hotspot)); - else { - *hotspot = (xpmatoui(buf, l, x_hotspot) - && xpmNextUI(data, y_hotspot)); - l = xpmNextWord(data, buf, BUFSIZ); - *extensions = (l == 6 && !strncmp("XPMEXT", buf, 6)); - } - } - } else { - - /* - * XPM 1 file read values: width, height, ncolors, chars_per_pixel - */ - int i; - char *ptr; - Bool got_one, saw_width = False, saw_height = False; - Bool saw_ncolors = False, saw_chars_per_pixel = False; - - for (i = 0; i < 4; i++) { - l = xpmNextWord(data, buf, BUFSIZ); - if (l != 7 || strncmp("#define", buf, 7)) - return (XpmFileInvalid); - l = xpmNextWord(data, buf, BUFSIZ); - if (!l) - return (XpmFileInvalid); - buf[l] = '\0'; - ptr = buf; - got_one = False; - while (!got_one) { - ptr = index(ptr, '_'); - if (!ptr) - return (XpmFileInvalid); - switch (l - (ptr - buf)) { - case 6: - if (saw_width || strncmp("_width", ptr, 6) - || !xpmNextUI(data, width)) - return (XpmFileInvalid); - else - saw_width = True; - got_one = True; - break; - case 7: - if (saw_height || strncmp("_height", ptr, 7) - || !xpmNextUI(data, height)) - return (XpmFileInvalid); - else - saw_height = True; - got_one = True; - break; - case 8: - if (saw_ncolors || strncmp("_ncolors", ptr, 8) - || !xpmNextUI(data, ncolors)) - return (XpmFileInvalid); - else - saw_ncolors = True; - got_one = True; - break; - case 16: - if (saw_chars_per_pixel - || strncmp("_chars_per_pixel", ptr, 16) - || !xpmNextUI(data, cpp)) - return (XpmFileInvalid); - else - saw_chars_per_pixel = True; - got_one = True; - break; - default: - ptr++; - } - } - /* skip the end of line */ - xpmNextString(data); - } - if (!saw_width || !saw_height || !saw_ncolors || !saw_chars_per_pixel) - return (XpmFileInvalid); - - *hotspot = 0; - *extensions = 0; - } - return (XpmSuccess); -} - -int -xpmParseColors(data, ncolors, cpp, colorTablePtr, hashtable) - xpmData *data; - unsigned int ncolors; - unsigned int cpp; - XpmColor **colorTablePtr; - xpmHashTable *hashtable; -{ - unsigned int key = 0, l, a, b, len; - unsigned int curkey; /* current color key */ - unsigned int lastwaskey; /* key read */ - char buf[BUFSIZ+1]; - char curbuf[BUFSIZ]; /* current buffer */ - char **sptr, *s; - XpmColor *color; - XpmColor *colorTable; - char **defaults; - int ErrorStatus; - - if (ncolors >= UINT_MAX / sizeof(XpmColor)) - return (XpmNoMemory); - colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor)); - if (!colorTable) - return (XpmNoMemory); - - if (!data->format) { /* XPM 2 or 3 */ - for (a = 0, color = colorTable; a < ncolors; a++, color++) { - xpmNextString(data); /* skip the line */ - - /* - * read pixel value - */ - if (cpp >= UINT_MAX - 1) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - color->string = (char *) XpmMalloc(cpp + 1); - if (!color->string) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - for (b = 0, s = color->string; b < cpp; b++, s++) - *s = xpmGetC(data); - *s = '\0'; - - /* - * store the string in the hashtable with its color index number - */ - if (USE_HASHTABLE) { - ErrorStatus = - xpmHashIntern(hashtable, color->string, HashAtomData(a)); - if (ErrorStatus != XpmSuccess) { - xpmFreeColorTable(colorTable, ncolors); - return (ErrorStatus); - } - } - - /* - * read color keys and values - */ - defaults = (char **) color; - curkey = 0; - lastwaskey = 0; - *curbuf = '\0'; /* init curbuf */ - while ((l = xpmNextWord(data, buf, BUFSIZ))) { - if (!lastwaskey) { - for (key = 0, sptr = xpmColorKeys; key < NKEYS; key++, - sptr++) - if ((strlen(*sptr) == l) && (!strncmp(*sptr, buf, l))) - break; - } - if (!lastwaskey && key < NKEYS) { /* open new key */ - if (curkey) { /* flush string */ - len = strlen(curbuf) + 1; - s = (char *) XpmMalloc(len); - if (!s) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - defaults[curkey] = s; - memcpy(s, curbuf, len); - } - curkey = key + 1; /* set new key */ - *curbuf = '\0'; /* reset curbuf */ - lastwaskey = 1; - } else { - if (!curkey) { /* key without value */ - xpmFreeColorTable(colorTable, ncolors); - return (XpmFileInvalid); - } - if (!lastwaskey) - STRLCAT(curbuf, " ", sizeof(curbuf));/* append space */ - buf[l] = '\0'; - STRLCAT(curbuf, buf, sizeof(curbuf)); /* append buf */ - lastwaskey = 0; - } - } - if (!curkey) { /* key without value */ - xpmFreeColorTable(colorTable, ncolors); - return (XpmFileInvalid); - } - len = strlen(curbuf) + 1; /* integer overflow just theoretically possible */ - s = defaults[curkey] = (char *) XpmMalloc(len); - if (!s) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - memcpy(s, curbuf, len); - } - } else { /* XPM 1 */ - /* get to the beginning of the first string */ - data->Bos = '"'; - data->Eos = '\0'; - xpmNextString(data); - data->Eos = '"'; - for (a = 0, color = colorTable; a < ncolors; a++, color++) { - - /* - * read pixel value - */ - if (cpp >= UINT_MAX - 1) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - color->string = (char *) XpmMalloc(cpp + 1); - if (!color->string) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - for (b = 0, s = color->string; b < cpp; b++, s++) - *s = xpmGetC(data); - *s = '\0'; - - /* - * store the string in the hashtable with its color index number - */ - if (USE_HASHTABLE) { - ErrorStatus = - xpmHashIntern(hashtable, color->string, HashAtomData(a)); - if (ErrorStatus != XpmSuccess) { - xpmFreeColorTable(colorTable, ncolors); - return (ErrorStatus); - } - } - - /* - * read color values - */ - xpmNextString(data); /* get to the next string */ - *curbuf = '\0'; /* init curbuf */ - while ((l = xpmNextWord(data, buf, BUFSIZ))) { - if (*curbuf != '\0') - STRLCAT(curbuf, " ", sizeof(curbuf));/* append space */ - buf[l] = '\0'; - STRLCAT(curbuf, buf, sizeof(curbuf)); /* append buf */ - } - len = strlen(curbuf) + 1; - s = (char *) XpmMalloc(len); - if (!s) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } - memcpy(s, curbuf, len); - color->c_color = s; - *curbuf = '\0'; /* reset curbuf */ - if (a < ncolors - 1) /* can we trust ncolors -> leave data's bounds */ - xpmNextString(data); /* get to the next string */ - } - } - *colorTablePtr = colorTable; - return (XpmSuccess); -} - -static int -ParsePixels(data, width, height, ncolors, cpp, colorTable, hashtable, pixels) - xpmData *data; - unsigned int width; - unsigned int height; - unsigned int ncolors; - unsigned int cpp; - XpmColor *colorTable; - xpmHashTable *hashtable; - unsigned int **pixels; -{ - unsigned int *iptr, *iptr2 = NULL; /* found by Egbert Eich */ - unsigned int a, x, y; - - if ((height > 0 && width >= UINT_MAX / height) || - width * height >= UINT_MAX / sizeof(unsigned int)) - return XpmNoMemory; -#ifndef FOR_MSW - iptr2 = (unsigned int *) XpmMalloc(sizeof(unsigned int) * width * height); -#else - - /* - * special treatment to trick DOS malloc(size_t) where size_t is 16 bit!! - * XpmMalloc is defined to longMalloc(long) and checks the 16 bit boundary - */ - iptr2 = (unsigned int *) - XpmMalloc((long) sizeof(unsigned int) * (long) width * (long) height); -#endif - if (!iptr2) - return (XpmNoMemory); - - iptr = iptr2; - - switch (cpp) { - - case (1): /* Optimize for single character - * colors */ - { - unsigned short colidx[256]; - - if (ncolors > 256) { - XpmFree(iptr2); /* found by Egbert Eich */ - return (XpmFileInvalid); - } - - bzero((char *)colidx, 256 * sizeof(short)); - for (a = 0; a < ncolors; a++) - colidx[(unsigned char)colorTable[a].string[0]] = a + 1; - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++, iptr++) { - int c = xpmGetC(data); - - if (c > 0 && c < 256 && colidx[c] != 0) - *iptr = colidx[c] - 1; - else { - XpmFree(iptr2); - return (XpmFileInvalid); - } - } - } - } - break; - - case (2): /* Optimize for double character - * colors */ - { - -/* free all allocated pointers at all exits */ -#define FREE_CIDX \ -do \ -{ \ - int f; for (f = 0; f < 256; f++) \ - if (cidx[f]) XpmFree(cidx[f]); \ -} while(0) - - /* array of pointers malloced by need */ - unsigned short *cidx[256]; - unsigned int char1; - - bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */ - for (a = 0; a < ncolors; a++) { - char1 = (unsigned char) colorTable[a].string[0]; - if (cidx[char1] == NULL) { /* get new memory */ - cidx[char1] = (unsigned short *) - XpmCalloc(256, sizeof(unsigned short)); - if (cidx[char1] == NULL) { /* new block failed */ - FREE_CIDX; - XpmFree(iptr2); - return (XpmNoMemory); - } - } - cidx[char1][(unsigned char)colorTable[a].string[1]] = a + 1; - } - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++, iptr++) { - int cc1 = xpmGetC(data); - if (cc1 > 0 && cc1 < 256) { - int cc2 = xpmGetC(data); - if (cc2 > 0 && cc2 < 256 && - cidx[cc1] && cidx[cc1][cc2] != 0) - *iptr = cidx[cc1][cc2] - 1; - else { - FREE_CIDX; - XpmFree(iptr2); - return (XpmFileInvalid); - } - } else { - FREE_CIDX; - XpmFree(iptr2); - return (XpmFileInvalid); - } - } - } - FREE_CIDX; - } - break; - - default: /* Non-optimized case of long color - * names */ - { - char *s; - char buf[BUFSIZ]; - - if (cpp >= sizeof(buf)) { - XpmFree(iptr2); /* found by Egbert Eich */ - return (XpmFileInvalid); - } - - buf[cpp] = '\0'; - if (USE_HASHTABLE) { - xpmHashAtom *slot; - - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++, iptr++) { - for (a = 0, s = buf; a < cpp; a++, s++) - *s = xpmGetC(data); /* int assigned to char, not a problem here */ - slot = xpmHashSlot(hashtable, buf); - if (!*slot) { /* no color matches */ - XpmFree(iptr2); - return (XpmFileInvalid); - } - *iptr = HashColorIndex(slot); - } - } - } else { - for (y = 0; y < height; y++) { - xpmNextString(data); - for (x = 0; x < width; x++, iptr++) { - for (a = 0, s = buf; a < cpp; a++, s++) - *s = xpmGetC(data); /* int assigned to char, not a problem here */ - for (a = 0; a < ncolors; a++) - if (!strcmp(colorTable[a].string, buf)) - break; - if (a == ncolors) { /* no color matches */ - XpmFree(iptr2); - return (XpmFileInvalid); - } - *iptr = a; - } - } - } - } - break; - } - *pixels = iptr2; - return (XpmSuccess); -} - -int -xpmParseExtensions(data, extensions, nextensions) - xpmData *data; - XpmExtension **extensions; - unsigned int *nextensions; -{ - XpmExtension *exts = NULL, *ext; - unsigned int num = 0; - unsigned int nlines, a, l, notstart, notend = 0; - int status; - char *string, *s, *s2, **sp; - - xpmNextString(data); - exts = (XpmExtension *) XpmMalloc(sizeof(XpmExtension)); - /* get the whole string */ - status = xpmGetString(data, &string, &l); - if (status != XpmSuccess) { - XpmFree(exts); - return (status); - } - /* look for the key word XPMEXT, skip lines before this */ - while ((notstart = strncmp("XPMEXT", string, 6)) - && (notend = strncmp("XPMENDEXT", string, 9))) { - XpmFree(string); - xpmNextString(data); - status = xpmGetString(data, &string, &l); - if (status != XpmSuccess) { - XpmFree(exts); - return (status); - } - } - if (!notstart) - notend = strncmp("XPMENDEXT", string, 9); - while (!notstart && notend) { - /* there starts an extension */ - ext = (XpmExtension *) - XpmRealloc(exts, (num + 1) * sizeof(XpmExtension)); /* can the loop be forced to iterate often enough to make "(num + 1) * sizeof(XpmExtension)" wrapping? */ - if (!ext) { - XpmFree(string); - XpmFreeExtensions(exts, num); - return (XpmNoMemory); - } - exts = ext; - ext += num; - /* skip whitespace and store its name */ - s2 = s = string + 6; - while (isspace(*s2)) - s2++; - a = s2 - s; - ext->name = (char *) XpmMalloc(l - a - 6); - if (!ext->name) { - XpmFree(string); - ext->lines = NULL; - ext->nlines = 0; - XpmFreeExtensions(exts, num + 1); - return (XpmNoMemory); - } - strncpy(ext->name, s + a, l - a - 6); - XpmFree(string); - /* now store the related lines */ - xpmNextString(data); - status = xpmGetString(data, &string, &l); - if (status != XpmSuccess) { - ext->lines = NULL; - ext->nlines = 0; - XpmFreeExtensions(exts, num + 1); - return (status); - } - ext->lines = (char **) XpmMalloc(sizeof(char *)); - nlines = 0; - while ((notstart = strncmp("XPMEXT", string, 6)) - && (notend = strncmp("XPMENDEXT", string, 9))) { - sp = (char **) - XpmRealloc(ext->lines, (nlines + 1) * sizeof(char *)); /* can we iterate enough for a wrapping? */ - if (!sp) { - XpmFree(string); - ext->nlines = nlines; - XpmFreeExtensions(exts, num + 1); - return (XpmNoMemory); - } - ext->lines = sp; - ext->lines[nlines] = string; - nlines++; - xpmNextString(data); - status = xpmGetString(data, &string, &l); - if (status != XpmSuccess) { - ext->nlines = nlines; - XpmFreeExtensions(exts, num + 1); - return (status); - } - } - if (!nlines) { - XpmFree(ext->lines); - ext->lines = NULL; - } - ext->nlines = nlines; - num++; - } - if (!num) { - XpmFree(string); - XpmFree(exts); - exts = NULL; - } else if (!notend) - XpmFree(string); - *nextensions = num; - *extensions = exts; - return (XpmSuccess); -} - - -/* function call in case of error */ -#undef RETURN -#define RETURN(status) \ -do { \ - goto error; \ -} while(0) - -/* - * This function parses an Xpm file or data and store the found informations - * in an an XpmImage structure which is returned. - */ -int -xpmParseData(data, image, info) - xpmData *data; - XpmImage *image; - XpmInfo *info; -{ - /* variables to return */ - unsigned int width, height, ncolors, cpp; - unsigned int x_hotspot, y_hotspot, hotspot = 0, extensions = 0; - XpmColor *colorTable = NULL; - unsigned int *pixelindex = NULL; - char *hints_cmt = NULL; - char *colors_cmt = NULL; - char *pixels_cmt = NULL; - - unsigned int cmts; - int ErrorStatus; - xpmHashTable hashtable; - - cmts = info && (info->valuemask & XpmReturnComments); - - /* - * parse the header - */ - ErrorStatus = xpmParseHeader(data); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* - * read values - */ - ErrorStatus = xpmParseValues(data, &width, &height, &ncolors, &cpp, - &x_hotspot, &y_hotspot, &hotspot, - &extensions); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - /* - * store the hints comment line - */ - if (cmts) - xpmGetCmt(data, &hints_cmt); - - /* - * init the hastable - */ - if (USE_HASHTABLE) { - ErrorStatus = xpmHashTableInit(&hashtable); - if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - } - - /* - * read colors - */ - ErrorStatus = xpmParseColors(data, ncolors, cpp, &colorTable, &hashtable); - if (ErrorStatus != XpmSuccess) { - if (USE_HASHTABLE) - xpmHashTableFree(&hashtable); - RETURN(ErrorStatus); - } - - /* - * store the colors comment line - */ - if (cmts) - xpmGetCmt(data, &colors_cmt); - - /* - * read pixels and index them on color number - */ - ErrorStatus = ParsePixels(data, width, height, ncolors, cpp, colorTable, - &hashtable, &pixelindex); - - /* - * free the hastable - */ - if (USE_HASHTABLE) - xpmHashTableFree(&hashtable); - - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - - /* - * store the pixels comment line - */ - if (cmts) - xpmGetCmt(data, &pixels_cmt); - - /* - * parse extensions - */ - if (info && (info->valuemask & XpmReturnExtensions)) { - if (extensions) { - ErrorStatus = xpmParseExtensions(data, &info->extensions, - &info->nextensions); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - } else { - info->extensions = NULL; - info->nextensions = 0; - } - } - - /* - * store found informations in the XpmImage structure - */ - image->width = width; - image->height = height; - image->cpp = cpp; - image->ncolors = ncolors; - image->colorTable = colorTable; - image->data = pixelindex; - - if (info) { - if (cmts) { - info->hints_cmt = hints_cmt; - info->colors_cmt = colors_cmt; - info->pixels_cmt = pixels_cmt; - } - if (hotspot) { - info->x_hotspot = x_hotspot; - info->y_hotspot = y_hotspot; - info->valuemask |= XpmHotspot; - } - } - return (XpmSuccess); - -/* exit point in case of error, free only locally allocated variables */ -error: - if (colorTable) - xpmFreeColorTable(colorTable, ncolors); - if (pixelindex) - XpmFree(pixelindex); - if (hints_cmt) - XpmFree(hints_cmt); - if (colors_cmt) - XpmFree(colors_cmt); - if (pixels_cmt) - XpmFree(pixels_cmt); - - return(ErrorStatus); -} diff --git a/nx-X11/extras/Xpm/lib/rgb.c b/nx-X11/extras/Xpm/lib/rgb.c deleted file mode 100644 index 0a5af8b8f..000000000 --- a/nx-X11/extras/Xpm/lib/rgb.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* rgb.c: * -* * -* XPM library * -* Rgb file utilities * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* - * Part of this code has been taken from the ppmtoxpm.c file written by Mark - * W. Snitily but has been modified for my special need - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#include - -#ifndef FOR_MSW /* normal part first, MSW part at - * the end, (huge ifdef!) */ -/* - * Read a rgb text file. It stores the rgb values (0->65535) - * and the rgb mnemonics (malloc'ed) into the "rgbn" array. Returns the - * number of entries stored. - */ -int -xpmReadRgbNames(rgb_fname, rgbn) - char *rgb_fname; - xpmRgbName rgbn[]; - -{ - FILE *rgbf; - int n, items, red, green, blue; - char line[512], name[512], *rgbname, *s1, *s2; - xpmRgbName *rgb; - - /* Open the rgb text file. Abort if error. */ - if ((rgbf = fopen(rgb_fname, "r")) == NULL) - return 0; - - /* Loop reading each line in the file. */ - n = 0; - rgb = rgbn; - /* Quit if rgb text file has too many entries. */ - while (fgets(line, sizeof(line), rgbf) && n < MAX_RGBNAMES) { - - /* Skip silently if line is bad. */ - items = sscanf(line, "%d %d %d %[^\n]\n", &red, &green, &blue, name); - if (items != 4) - continue; - - /* - * Make sure rgb values are within 0->255 range. Skip silently if - * bad. - */ - if (red < 0 || red > 0xFF || - green < 0 || green > 0xFF || - blue < 0 || blue > 0xFF) - continue; - - /* Allocate memory for ascii name. If error give up here. */ - if (!(rgbname = (char *) XpmMalloc(strlen(name) + 1))) - break; - - /* Copy string to ascii name and lowercase it. */ - for (s1 = name, s2 = rgbname; *s1; s1++) - *s2++ = tolower(*s1); - *s2 = '\0'; - - /* Save the rgb values and ascii name in the array. */ - rgb->r = red * 257; /* 65535/255 = 257 */ - rgb->g = green * 257; - rgb->b = blue * 257; - rgb->name = rgbname; - rgb++; - n++; - } - - fclose(rgbf); - - /* Return the number of read rgb names. */ - return n < 0 ? 0 : n; -} - -/* - * Return the color name corresponding to the given rgb values - */ -char * -xpmGetRgbName(rgbn, rgbn_max, red, green, blue) - xpmRgbName rgbn[]; /* rgb mnemonics from rgb text file */ - int rgbn_max; /* number of rgb mnemonics in table */ - int red, green, blue; /* rgb values */ - -{ - int i; - xpmRgbName *rgb; - - /* - * Just perform a dumb linear search over the rgb values of the color - * mnemonics. One could speed things up by sorting the rgb values and - * using a binary search, or building a hash table, etc... - */ - for (i = 0, rgb = rgbn; i < rgbn_max; i++, rgb++) - if (red == rgb->r && green == rgb->g && blue == rgb->b) - return rgb->name; - - /* if not found return NULL */ - return NULL; -} - -/* - * Free the strings which have been malloc'ed in xpmReadRgbNames - */ -void -xpmFreeRgbNames(rgbn, rgbn_max) - xpmRgbName rgbn[]; - int rgbn_max; - -{ - int i; - xpmRgbName *rgb; - - for (i = 0, rgb = rgbn; i < rgbn_max; i++, rgb++) - XpmFree(rgb->name); -} - -#else /* here comes the MSW part, the - * second part of the huge ifdef */ - -#include "rgbtab.h" /* hard coded rgb.txt table */ - -int -xpmReadRgbNames(rgb_fname, rgbn) - char *rgb_fname; - xpmRgbName rgbn[]; -{ - /* - * check for consistency??? - * table has to be sorted for calls on strcasecmp - */ - return (numTheRGBRecords); -} - -/* - * MSW rgb values are made from 3 BYTEs, this is different from X XColor.red, - * which has something like #0303 for one color - */ -char * -xpmGetRgbName(rgbn, rgbn_max, red, green, blue) - xpmRgbName rgbn[]; /* rgb mnemonics from rgb text file - * not used */ - int rgbn_max; /* not used */ - int red, green, blue; /* rgb values */ - -{ - int i; - unsigned long rgbVal; - - i = 0; - while (i < numTheRGBRecords) { - rgbVal = theRGBRecords[i].rgb; - if (GetRValue(rgbVal) == red && - GetGValue(rgbVal) == green && - GetBValue(rgbVal) == blue) - return (theRGBRecords[i].name); - i++; - } - return (NULL); -} - -/* used in XParseColor in simx.c */ -int -xpmGetRGBfromName(inname, r, g, b) - char *inname; - int *r, *g, *b; -{ - int left, right, middle; - int cmp; - unsigned long rgbVal; - char *name; - char *grey, *p; - - name = xpmstrdup(inname); - - /* - * the table in rgbtab.c has no names with spaces, and no grey, but a - * lot of gray - */ - /* so first extract ' ' */ - while (p = strchr(name, ' ')) { - while (*(p)) { /* till eof of string */ - *p = *(p + 1); /* copy to the left */ - p++; - } - } - /* fold to lower case */ - p = name; - while (*p) { - *p = tolower(*p); - p++; - } - - /* - * substitute Grey with Gray, else rgbtab.h would have more than 100 - * 'duplicate' entries - */ - if (grey = strstr(name, "grey")) - grey[2] = 'a'; - - /* binary search */ - left = 0; - right = numTheRGBRecords - 1; - do { - middle = (left + right) / 2; - cmp = xpmstrcasecmp(name, theRGBRecords[middle].name); - if (cmp == 0) { - rgbVal = theRGBRecords[middle].rgb; - *r = GetRValue(rgbVal); - *g = GetGValue(rgbVal); - *b = GetBValue(rgbVal); - free(name); - return (1); - } else if (cmp < 0) { - right = middle - 1; - } else { /* > 0 */ - left = middle + 1; - } - } while (left <= right); - - /* - * I don't like to run in a ColorInvalid error and to see no pixmap at - * all, so simply return a red pixel. Should be wrapped in an #ifdef - * HeDu - */ - - *r = 255; - *g = 0; - *b = 0; /* red error pixel */ - - free(name); - return (1); -} - -void -xpmFreeRgbNames(rgbn, rgbn_max) - xpmRgbName rgbn[]; - int rgbn_max; - -{ - /* nothing to do */ -} - -#endif /* MSW part */ diff --git a/nx-X11/extras/Xpm/lib/scan.c b/nx-X11/extras/Xpm/lib/scan.c deleted file mode 100644 index e8e4c276a..000000000 --- a/nx-X11/extras/Xpm/lib/scan.c +++ /dev/null @@ -1,1027 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* scan.c: * -* * -* XPM library * -* Scanning utility for XPM file format * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ -/* $XFree86: xc/extras/Xpm/lib/scan.c,v 1.2 2001/10/28 03:32:11 tsi Exp $ */ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* - * The code related to AMIGA has been added by - * Lorens Younes (d93-hyo@nada.kth.se) 4/96 - */ - -/* October 2004, source code review by Thomas Biege */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" - -#define MAXPRINTABLE 92 /* number of printable ascii chars - * minus \ and " for string compat - * and ? to avoid ANSI trigraphs. */ - -static char *printable = -" .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZ\ -ASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; - -/* - * printable begin with a space, so in most case, due to my algorithm, when - * the number of different colors is less than MAXPRINTABLE, it will give a - * char follow by "nothing" (a space) in the readable xpm file - */ - - -typedef struct { - Pixel *pixels; - unsigned int *pixelindex; - unsigned int size; - unsigned int ncolors; - unsigned int mask_pixel; /* whether there is or not */ -} PixelsMap; - -LFUNC(storePixel, int, (Pixel pixel, PixelsMap *pmap, - unsigned int *index_return)); - -LFUNC(storeMaskPixel, int, (Pixel pixel, PixelsMap *pmap, - unsigned int *index_return)); - -typedef int (*storeFuncPtr)(Pixel pixel, PixelsMap *pmap, - unsigned int *index_return); - -#ifndef FOR_MSW -# ifndef AMIGA -LFUNC(GetImagePixels, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap)); - -LFUNC(GetImagePixels32, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap)); - -LFUNC(GetImagePixels16, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap)); - -LFUNC(GetImagePixels8, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap)); - -LFUNC(GetImagePixels1, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap, - storeFuncPtr storeFunc)); -# else /* AMIGA */ -LFUNC(AGetImagePixels, int, (XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap, - storeFuncPtr storeFunc)); -# endif/* AMIGA */ -#else /* ndef FOR_MSW */ -LFUNC(MSWGetImagePixels, int, (Display *d, XImage *image, unsigned int width, - unsigned int height, PixelsMap *pmap, - storeFuncPtr storeFunc)); -#endif -LFUNC(ScanTransparentColor, int, (XpmColor *color, unsigned int cpp, - XpmAttributes *attributes)); - -LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors, - unsigned int ncolors, - Pixel *pixels, unsigned int mask, - unsigned int cpp, XpmAttributes *attributes)); - -/* - * This function stores the given pixel in the given arrays which are grown - * if not large enough. - */ -static int -storePixel(pixel, pmap, index_return) - Pixel pixel; - PixelsMap *pmap; - unsigned int *index_return; -{ - unsigned int i; - Pixel *p; - unsigned int ncolors; - - if (*index_return) { /* this is a transparent pixel! */ - *index_return = 0; - return 0; - } - ncolors = pmap->ncolors; - p = pmap->pixels + pmap->mask_pixel; - for (i = pmap->mask_pixel; i < ncolors; i++, p++) - if (*p == pixel) - break; - if (i == ncolors) { - if (ncolors >= pmap->size) { - pmap->size *= 2; - p = (Pixel *) XpmRealloc(pmap->pixels, sizeof(Pixel) * pmap->size); - if (!p) - return (1); - pmap->pixels = p; - - } - (pmap->pixels)[ncolors] = pixel; - pmap->ncolors++; - } - *index_return = i; - return 0; -} - -static int -storeMaskPixel(pixel, pmap, index_return) - Pixel pixel; - PixelsMap *pmap; - unsigned int *index_return; -{ - if (!pixel) { - if (!pmap->ncolors) { - pmap->ncolors = 1; - (pmap->pixels)[0] = 0; - pmap->mask_pixel = 1; - } - *index_return = 1; - } else - *index_return = 0; - return 0; -} - -/* function call in case of error */ -#undef RETURN -#define RETURN(status) \ -do { \ - ErrorStatus = status; \ - goto error; \ -} while(0) - -/* - * This function scans the given image and stores the found informations in - * the given XpmImage structure. - */ -int -XpmCreateXpmImageFromImage(display, image, shapeimage, - xpmimage, attributes) - Display *display; - XImage *image; - XImage *shapeimage; - XpmImage *xpmimage; - XpmAttributes *attributes; -{ - /* variables stored in the XpmAttributes structure */ - unsigned int cpp; - - /* variables to return */ - PixelsMap pmap; - XpmColor *colorTable = NULL; - int ErrorStatus = 0; - - /* calculation variables */ - unsigned int width = 0; - unsigned int height = 0; - unsigned int cppm; /* minimum chars per pixel */ - unsigned int c; - - /* initialize pmap */ - pmap.pixels = NULL; - pmap.pixelindex = NULL; - pmap.size = 256; /* should be enough most of the time */ - pmap.ncolors = 0; - pmap.mask_pixel = 0; - - /* - * get geometry - */ - if (image) { - width = image->width; - height = image->height; - } else if (shapeimage) { - width = shapeimage->width; - height = shapeimage->height; - } - - /* - * retrieve information from the XpmAttributes - */ - if (attributes && (attributes->valuemask & XpmCharsPerPixel -/* 3.2 backward compatibility code */ - || attributes->valuemask & XpmInfos)) -/* end 3.2 bc */ - cpp = attributes->cpp; - else - cpp = 0; - - if ((height > 0 && width >= UINT_MAX / height) || - width * height >= UINT_MAX / sizeof(unsigned int)) - RETURN(XpmNoMemory); - pmap.pixelindex = - (unsigned int *) XpmCalloc(width * height, sizeof(unsigned int)); - if (!pmap.pixelindex) - RETURN(XpmNoMemory); - - if (pmap.size >= UINT_MAX / sizeof(Pixel)) - RETURN(XpmNoMemory); - - pmap.pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * pmap.size); - if (!pmap.pixels) - RETURN(XpmNoMemory); - - /* - * scan shape mask if any - */ - if (shapeimage) { -#ifndef FOR_MSW -# ifndef AMIGA - ErrorStatus = GetImagePixels1(shapeimage, width, height, &pmap, - storeMaskPixel); -# else - ErrorStatus = AGetImagePixels(shapeimage, width, height, &pmap, - storeMaskPixel); -# endif -#else - ErrorStatus = MSWGetImagePixels(display, shapeimage, width, height, - &pmap, storeMaskPixel); -#endif - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - } - - /* - * scan the image data - * - * In case depth is 1 or bits_per_pixel is 4, 6, 8, 24 or 32 use optimized - * functions, otherwise use slower but sure general one. - * - */ - - if (image) { -#ifndef FOR_MSW -# ifndef AMIGA - if (((image->bits_per_pixel | image->depth) == 1) && - (image->byte_order == image->bitmap_bit_order)) - ErrorStatus = GetImagePixels1(image, width, height, &pmap, - storePixel); - else if (image->format == ZPixmap) { - if (image->bits_per_pixel == 8) - ErrorStatus = GetImagePixels8(image, width, height, &pmap); - else if (image->bits_per_pixel == 16) - ErrorStatus = GetImagePixels16(image, width, height, &pmap); - else if (image->bits_per_pixel == 32) - ErrorStatus = GetImagePixels32(image, width, height, &pmap); - } else - ErrorStatus = GetImagePixels(image, width, height, &pmap); -# else - ErrorStatus = AGetImagePixels(image, width, height, &pmap, - storePixel); -# endif -#else - ErrorStatus = MSWGetImagePixels(display, image, width, height, &pmap, - storePixel); -#endif - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - } - - /* - * get rgb values and a string of char, and possibly a name for each - * color - */ - if (pmap.ncolors >= UINT_MAX / sizeof(XpmColor)) - RETURN(XpmNoMemory); - colorTable = (XpmColor *) XpmCalloc(pmap.ncolors, sizeof(XpmColor)); - if (!colorTable) - RETURN(XpmNoMemory); - - /* compute the minimal cpp */ - for (cppm = 1, c = MAXPRINTABLE; pmap.ncolors > c; cppm++) - c *= MAXPRINTABLE; - if (cpp < cppm) - cpp = cppm; - - if (pmap.mask_pixel) { - ErrorStatus = ScanTransparentColor(colorTable, cpp, attributes); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - } - - ErrorStatus = ScanOtherColors(display, colorTable, pmap.ncolors, - pmap.pixels, pmap.mask_pixel, cpp, - attributes); - if (ErrorStatus != XpmSuccess) - RETURN(ErrorStatus); - - /* - * store found informations in the XpmImage structure - */ - xpmimage->width = width; - xpmimage->height = height; - xpmimage->cpp = cpp; - xpmimage->ncolors = pmap.ncolors; - xpmimage->colorTable = colorTable; - xpmimage->data = pmap.pixelindex; - - XpmFree(pmap.pixels); - return (XpmSuccess); - -/* exit point in case of error, free only locally allocated variables */ -error: - if (pmap.pixelindex) - XpmFree(pmap.pixelindex); - if (pmap.pixels) - XpmFree(pmap.pixels); - if (colorTable) - xpmFreeColorTable(colorTable, pmap.ncolors); - - return (ErrorStatus); -} - -static int -ScanTransparentColor(color, cpp, attributes) - XpmColor *color; - unsigned int cpp; - XpmAttributes *attributes; -{ - char *s; - unsigned int a, b, c; - - /* first get a character string */ - a = 0; - if (cpp >= UINT_MAX - 1) - return (XpmNoMemory); - if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) - return (XpmNoMemory); - *s++ = printable[c = a % MAXPRINTABLE]; - for (b = 1; b < cpp; b++, s++) - *s = printable[c = ((a - c) / MAXPRINTABLE) % MAXPRINTABLE]; - *s = '\0'; - - /* then retreive related info from the attributes if any */ - if (attributes && (attributes->valuemask & XpmColorTable -/* 3.2 backward compatibility code */ - || attributes->valuemask & XpmInfos) -/* end 3.2 bc */ - && attributes->mask_pixel != XpmUndefPixel) { - - unsigned int key; - char **defaults = (char **) color; - char **mask_defaults; - -/* 3.2 backward compatibility code */ - if (attributes->valuemask & XpmColorTable) -/* end 3.2 bc */ - mask_defaults = (char **) ( - attributes->colorTable + attributes->mask_pixel); -/* 3.2 backward compatibility code */ - else - mask_defaults = (char **) - ((XpmColor **) attributes->colorTable)[attributes->mask_pixel]; -/* end 3.2 bc */ - for (key = 1; key <= NKEYS; key++) { - if ((s = mask_defaults[key])) { - defaults[key] = (char *) xpmstrdup(s); - if (!defaults[key]) - return (XpmNoMemory); - } - } - } else { - color->c_color = (char *) xpmstrdup(TRANSPARENT_COLOR); - if (!color->c_color) - return (XpmNoMemory); - } - return (XpmSuccess); -} - -static int -ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes) - Display *display; - XpmColor *colors; - unsigned int ncolors; - Pixel *pixels; - unsigned int mask; - unsigned int cpp; - XpmAttributes *attributes; -{ - /* variables stored in the XpmAttributes structure */ - Colormap colormap; - char *rgb_fname; - -#ifndef FOR_MSW - xpmRgbName rgbn[MAX_RGBNAMES]; -#else - xpmRgbName *rgbn = NULL; -#endif - int rgbn_max = 0; - unsigned int i, j, c, i2; - XpmColor *color; - XColor *xcolors = NULL, *xcolor; - char *colorname, *s; - XpmColor *colorTable = NULL, **oldColorTable = NULL; - unsigned int ancolors = 0; - Pixel *apixels = NULL; - unsigned int mask_pixel = 0; - Bool found; - - /* retrieve information from the XpmAttributes */ - if (attributes && (attributes->valuemask & XpmColormap)) - colormap = attributes->colormap; - else - colormap = XDefaultColormap(display, XDefaultScreen(display)); - if (attributes && (attributes->valuemask & XpmRgbFilename)) - rgb_fname = attributes->rgb_fname; - else - rgb_fname = NULL; - - /* start from the right element */ - if (mask) { - colors++; - ncolors--; - pixels++; - } - - /* first get character strings and rgb values */ - if (ncolors >= UINT_MAX / sizeof(XColor) || cpp >= UINT_MAX - 1) - return (XpmNoMemory); - xcolors = (XColor *) XpmMalloc(sizeof(XColor) * ncolors); - if (!xcolors) - return (XpmNoMemory); - - for (i = 0, i2 = mask, color = colors, xcolor = xcolors; - i < ncolors; i++, i2++, color++, xcolor++, pixels++) { - - if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) { - XpmFree(xcolors); - return (XpmNoMemory); - } - *s++ = printable[c = i2 % MAXPRINTABLE]; - for (j = 1; j < cpp; j++, s++) - *s = printable[c = ((i2 - c) / MAXPRINTABLE) % MAXPRINTABLE]; - *s = '\0'; - - xcolor->pixel = *pixels; - } - XQueryColors(display, colormap, xcolors, ncolors); - -#ifndef FOR_MSW - /* read the rgb file if any was specified */ - if (rgb_fname) - rgbn_max = xpmReadRgbNames(attributes->rgb_fname, rgbn); -#else - /* FOR_MSW: rgb names and values are hardcoded in rgbtab.h */ - rgbn_max = xpmReadRgbNames(NULL, NULL); -#endif - - if (attributes && attributes->valuemask & XpmColorTable) { - colorTable = attributes->colorTable; - ancolors = attributes->ncolors; - apixels = attributes->pixels; - mask_pixel = attributes->mask_pixel; - } -/* 3.2 backward compatibility code */ - else if (attributes && attributes->valuemask & XpmInfos) { - oldColorTable = (XpmColor **) attributes->colorTable; - ancolors = attributes->ncolors; - apixels = attributes->pixels; - mask_pixel = attributes->mask_pixel; - } -/* end 3.2 bc */ - - for (i = 0, color = colors, xcolor = xcolors; i < ncolors; - i++, color++, xcolor++) { - - /* look for related info from the attributes if any */ - found = False; - if (ancolors) { - unsigned int offset = 0; - - for (j = 0; j < ancolors; j++) { - if (j == mask_pixel) { - offset = 1; - continue; - } - if (apixels[j - offset] == xcolor->pixel) - break; - } - if (j != ancolors) { - unsigned int key; - char **defaults = (char **) color; - char **adefaults; - -/* 3.2 backward compatibility code */ - if (oldColorTable) - adefaults = (char **) oldColorTable[j]; - else -/* end 3.2 bc */ - adefaults = (char **) (colorTable + j); - - found = True; - for (key = 1; key <= NKEYS; key++) { - if ((s = adefaults[key])) - defaults[key] = (char *) xpmstrdup(s); - } - } - } - if (!found) { - /* if nothing found look for a color name */ - colorname = NULL; - if (rgbn_max) - colorname = xpmGetRgbName(rgbn, rgbn_max, xcolor->red, - xcolor->green, xcolor->blue); - if (colorname) - color->c_color = (char *) xpmstrdup(colorname); - else { - /* at last store the rgb value */ - char buf[BUFSIZ]; -#ifndef FOR_MSW - sprintf(buf, "#%04X%04X%04X", - xcolor->red, xcolor->green, xcolor->blue); -#else - sprintf(buf, "#%02x%02x%02x", - xcolor->red, xcolor->green, xcolor->blue); -#endif - color->c_color = (char *) xpmstrdup(buf); - } - if (!color->c_color) { - XpmFree(xcolors); - xpmFreeRgbNames(rgbn, rgbn_max); - return (XpmNoMemory); - } - } - } - - XpmFree(xcolors); - xpmFreeRgbNames(rgbn, rgbn_max); - return (XpmSuccess); -} - -#ifndef FOR_MSW -# ifndef AMIGA -/* - * The functions below are written from X11R5 MIT's code (XImUtil.c) - * - * The idea is to have faster functions than the standard XGetPixel function - * to scan the image data. Indeed we can speed up things by suppressing tests - * performed for each pixel. We do exactly the same tests but at the image - * level. - */ - -static unsigned long Const low_bits_table[] = { - 0x00000000, 0x00000001, 0x00000003, 0x00000007, - 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, - 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, - 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, - 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, - 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, - 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, - 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, - 0xffffffff -}; - -/* - * Default method to scan pixels of an image data structure. - * The algorithm used is: - * - * copy the source bitmap_unit or Zpixel into temp - * normalize temp if needed - * extract the pixel bits into return value - * - */ - -static int -GetImagePixels(image, width, height, pmap) - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; -{ - char *src; - char *dst; - unsigned int *iptr; - char *data; - unsigned int x, y; - int bits, depth, ibu, ibpp, offset, i; - unsigned long lbt; - Pixel pixel, px; - - data = image->data; - iptr = pmap->pixelindex; - depth = image->depth; - lbt = low_bits_table[depth]; - ibpp = image->bits_per_pixel; - offset = image->xoffset; - - if (image->bitmap_unit < 0) - return (XpmNoMemory); - - if ((image->bits_per_pixel | image->depth) == 1) { - ibu = image->bitmap_unit; - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - src = &data[XYINDEX(x, y, image)]; - dst = (char *) &pixel; - pixel = 0; - for (i = ibu >> 3; --i >= 0;) - *dst++ = *src++; - XYNORMALIZE(&pixel, image); - bits = (x + offset) % ibu; - pixel = ((((char *) &pixel)[bits >> 3]) >> (bits & 7)) & 1; - if (ibpp != depth) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - } else if (image->format == XYPixmap) { - int nbytes, bpl, j; - long plane = 0; - ibu = image->bitmap_unit; - nbytes = ibu >> 3; - bpl = image->bytes_per_line; - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - pixel = 0; - plane = 0; - for (i = depth; --i >= 0;) { - src = &data[XYINDEX(x, y, image) + plane]; - dst = (char *) &px; - px = 0; - for (j = nbytes; --j >= 0;) - *dst++ = *src++; - XYNORMALIZE(&px, image); - bits = (x + offset) % ibu; - pixel = (pixel << 1) | - (((((char *) &px)[bits >> 3]) >> (bits & 7)) & 1); - plane = plane + (bpl * height); - } - if (ibpp != depth) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - } else if (image->format == ZPixmap) { - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - src = &data[ZINDEX(x, y, image)]; - dst = (char *) &px; - px = 0; - for (i = (ibpp + 7) >> 3; --i >= 0;) - *dst++ = *src++; - ZNORMALIZE(&px, image); - pixel = 0; - for (i = sizeof(unsigned long); --i >= 0;) - pixel = (pixel << 8) | ((unsigned char *) &px)[i]; - if (ibpp == 4) { - if (x & 1) - pixel >>= 4; - else - pixel &= 0xf; - } - if (ibpp != depth) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - } else - return (XpmColorError); /* actually a bad image */ - return (XpmSuccess); -} - -/* - * scan pixels of a 32-bits Z image data structure - */ - -#if !defined(WORD64) && !defined(LONG64) -static unsigned long byteorderpixel = MSBFirst << 24; -#endif - -static int -GetImagePixels32(image, width, height, pmap) - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; -{ - unsigned char *addr; - unsigned char *data; - unsigned int *iptr; - unsigned int x, y; - unsigned long lbt; - Pixel pixel; - int depth; - - data = (unsigned char *) image->data; - iptr = pmap->pixelindex; - depth = image->depth; - lbt = low_bits_table[depth]; -#if !defined(WORD64) && !defined(LONG64) - if (*((char *) &byteorderpixel) == image->byte_order) { - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - pixel = *((unsigned long *) addr); - if (depth != 32) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - } else -#endif - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - pixel = ((unsigned long) addr[0] << 24 | - (unsigned long) addr[1] << 16 | - (unsigned long) addr[2] << 8 | - addr[3]); - if (depth != 32) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX32(x, y, image)]; - pixel = (addr[0] | - (unsigned long) addr[1] << 8 | - (unsigned long) addr[2] << 16 | - (unsigned long) addr[3] << 24); - if (depth != 32) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - return (XpmSuccess); -} - -/* - * scan pixels of a 16-bits Z image data structure - */ - -static int -GetImagePixels16(image, width, height, pmap) - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; -{ - unsigned char *addr; - unsigned char *data; - unsigned int *iptr; - unsigned int x, y; - unsigned long lbt; - Pixel pixel; - int depth; - - data = (unsigned char *) image->data; - iptr = pmap->pixelindex; - depth = image->depth; - lbt = low_bits_table[depth]; - if (image->byte_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX16(x, y, image)]; - pixel = addr[0] << 8 | addr[1]; - if (depth != 16) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - addr = &data[ZINDEX16(x, y, image)]; - pixel = addr[0] | addr[1] << 8; - if (depth != 16) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - return (XpmSuccess); -} - -/* - * scan pixels of a 8-bits Z image data structure - */ - -static int -GetImagePixels8(image, width, height, pmap) - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; -{ - unsigned int *iptr; - unsigned char *data; - unsigned int x, y; - unsigned long lbt; - Pixel pixel; - int depth; - - data = (unsigned char *) image->data; - iptr = pmap->pixelindex; - depth = image->depth; - lbt = low_bits_table[depth]; - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - pixel = data[ZINDEX8(x, y, image)]; - if (depth != 8) - pixel &= lbt; - if (storePixel(pixel, pmap, iptr)) - return (XpmNoMemory); - } - return (XpmSuccess); -} - -/* - * scan pixels of a 1-bit depth Z image data structure - */ - -static int -GetImagePixels1(image, width, height, pmap, storeFunc) - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; - storeFuncPtr storeFunc; -{ - unsigned int *iptr; - unsigned int x, y; - char *data; - Pixel pixel; - int xoff, yoff, offset, bpl; - - data = image->data; - iptr = pmap->pixelindex; - offset = image->xoffset; - bpl = image->bytes_per_line; - - if (image->bitmap_bit_order == MSBFirst) - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - xoff = x + offset; - yoff = y * bpl + (xoff >> 3); - xoff &= 7; - pixel = (data[yoff] & (0x80 >> xoff)) ? 1 : 0; - if ((*storeFunc) (pixel, pmap, iptr)) - return (XpmNoMemory); - } - else - for (y = 0; y < height; y++) - for (x = 0; x < width; x++, iptr++) { - xoff = x + offset; - yoff = y * bpl + (xoff >> 3); - xoff &= 7; - pixel = (data[yoff] & (1 << xoff)) ? 1 : 0; - if ((*storeFunc) (pixel, pmap, iptr)) - return (XpmNoMemory); - } - return (XpmSuccess); -} - -# else /* AMIGA */ - -#define CLEAN_UP(status) \ -do {\ - if (pixels) XpmFree (pixels);\ - if (tmp_img) FreeXImage (tmp_img);\ - return (status);\ -} while(0) - -static int -AGetImagePixels ( - XImage *image, - unsigned int width, - unsigned int height, - PixelsMap *pmap, - int (*storeFunc) ()) -{ - unsigned int *iptr; - unsigned int x, y; - unsigned char *pixels; - XImage *tmp_img; - - pixels = XpmMalloc ((((width+15)>>4)<<4)*sizeof (*pixels)); - if (pixels == NULL) - return XpmNoMemory; - - tmp_img = AllocXImage ((((width+15)>>4)<<4), 1, image->rp->BitMap->Depth); - if (tmp_img == NULL) - CLEAN_UP (XpmNoMemory); - - iptr = pmap->pixelindex; - for (y = 0; y < height; ++y) - { - ReadPixelLine8 (image->rp, 0, y, width, pixels, tmp_img->rp); - for (x = 0; x < width; ++x, ++iptr) - { - if ((*storeFunc) (pixels[x], pmap, iptr)) - CLEAN_UP (XpmNoMemory); - } - } - - CLEAN_UP (XpmSuccess); -} - -#undef CLEAN_UP - -# endif/* AMIGA */ -#else /* ndef FOR_MSW */ -static int -MSWGetImagePixels(display, image, width, height, pmap, storeFunc) - Display *display; - XImage *image; - unsigned int width; - unsigned int height; - PixelsMap *pmap; - int (*storeFunc) (); -{ - unsigned int *iptr; - unsigned int x, y; - Pixel pixel; - - iptr = pmap->pixelindex; - - SelectObject(*display, image->bitmap); - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++, iptr++) { - pixel = GetPixel(*display, x, y); - if ((*storeFunc) (pixel, pmap, iptr)) - return (XpmNoMemory); - } - } - return (XpmSuccess); -} - -#endif - -#ifndef FOR_MSW -# ifndef AMIGA -int -XpmCreateXpmImageFromPixmap(display, pixmap, shapemask, - xpmimage, attributes) - Display *display; - Pixmap pixmap; - Pixmap shapemask; - XpmImage *xpmimage; - XpmAttributes *attributes; -{ - XImage *ximage = NULL; - XImage *shapeimage = NULL; - unsigned int width = 0; - unsigned int height = 0; - int ErrorStatus; - - /* get geometry */ - if (attributes && attributes->valuemask & XpmSize) { - width = attributes->width; - height = attributes->height; - } - /* get the ximages */ - if (pixmap) - xpmCreateImageFromPixmap(display, pixmap, &ximage, &width, &height); - if (shapemask) - xpmCreateImageFromPixmap(display, shapemask, &shapeimage, - &width, &height); - - /* create the related XpmImage */ - ErrorStatus = XpmCreateXpmImageFromImage(display, ximage, shapeimage, - xpmimage, attributes); - - /* destroy the ximages */ - if (ximage) - XDestroyImage(ximage); - if (shapeimage) - XDestroyImage(shapeimage); - - return (ErrorStatus); -} - -# endif/* not AMIGA */ -#endif /* ndef FOR_MSW */ diff --git a/nx-X11/extras/Xpm/lib/xpm.h b/nx-X11/extras/Xpm/lib/xpm.h deleted file mode 100644 index ed4613315..000000000 --- a/nx-X11/extras/Xpm/lib/xpm.h +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ -/* $XFree86: xc/extras/Xpm/lib/xpm.h,v 1.2 2001/08/22 23:36:44 dawes Exp $ */ - -/*****************************************************************************\ -* xpm.h: * -* * -* XPM library * -* Include file * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -/* - * The code related to FOR_MSW has been added by - * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 - */ - -/* - * The code related to AMIGA has been added by - * Lorens Younes (d93-hyo@nada.kth.se) 4/96 - */ - -#ifndef XPM_h -#define XPM_h - -/* - * first some identification numbers: - * the version and revision numbers are determined with the following rule: - * SO Major number = LIB minor version number. - * SO Minor number = LIB sub-minor version number. - * e.g: Xpm version 3.2f - * we forget the 3 which is the format number, 2 gives 2, and f gives 6. - * thus we have XpmVersion = 2 and XpmRevision = 6 - * which gives SOXPMLIBREV = 2.6 - * - * Then the XpmIncludeVersion number is built from these numbers. - */ -#define XpmFormat 3 -#define XpmVersion 4 -#define XpmRevision 11 -#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision) - -#ifndef XPM_NUMBERS - -#ifdef FOR_MSW -# define SYSV /* uses memcpy string.h etc. */ -# include -# include "simx.h" /* defines some X stuff using MSW types */ -#define NEED_STRCASECMP /* at least for MSVC++ */ -#else /* FOR_MSW */ -# ifdef AMIGA -# include "amigax.h" -# else /* not AMIGA */ -# include -# include -# endif /* not AMIGA */ -#endif /* FOR_MSW */ - -/* let's define Pixel if it is not done yet */ -#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED) -typedef unsigned long Pixel; /* Index into colormap */ -# define PIXEL_ALREADY_TYPEDEFED -#endif - -/* Return ErrorStatus codes: - * null if full success - * positive if partial success - * negative if failure - */ - -#define XpmColorError 1 -#define XpmSuccess 0 -#define XpmOpenFailed -1 -#define XpmFileInvalid -2 -#define XpmNoMemory -3 -#define XpmColorFailed -4 - -typedef struct { - char *name; /* Symbolic color name */ - char *value; /* Color value */ - Pixel pixel; /* Color pixel */ -} XpmColorSymbol; - -typedef struct { - char *name; /* name of the extension */ - unsigned int nlines; /* number of lines in this extension */ - char **lines; /* pointer to the extension array of strings */ -} XpmExtension; - -typedef struct { - char *string; /* characters string */ - char *symbolic; /* symbolic name */ - char *m_color; /* monochrom default */ - char *g4_color; /* 4 level grayscale default */ - char *g_color; /* other level grayscale default */ - char *c_color; /* color default */ -} XpmColor; - -typedef struct { - unsigned int width; /* image width */ - unsigned int height; /* image height */ - unsigned int cpp; /* number of characters per pixel */ - unsigned int ncolors; /* number of colors */ - XpmColor *colorTable; /* list of related colors */ - unsigned int *data; /* image data */ -} XpmImage; - -typedef struct { - unsigned long valuemask; /* Specifies which attributes are defined */ - char *hints_cmt; /* Comment of the hints section */ - char *colors_cmt; /* Comment of the colors section */ - char *pixels_cmt; /* Comment of the pixels section */ - unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ - unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ - unsigned int nextensions; /* number of extensions */ - XpmExtension *extensions; /* pointer to array of extensions */ -} XpmInfo; - -typedef int (*XpmAllocColorFunc)( - Display* /* display */, - Colormap /* colormap */, - char* /* colorname */, - XColor* /* xcolor */, - void* /* closure */ -); - -typedef int (*XpmFreeColorsFunc)( - Display* /* display */, - Colormap /* colormap */, - Pixel* /* pixels */, - int /* npixels */, - void* /* closure */ -); - -typedef struct { - unsigned long valuemask; /* Specifies which attributes are - defined */ - - Visual *visual; /* Specifies the visual to use */ - Colormap colormap; /* Specifies the colormap to use */ - unsigned int depth; /* Specifies the depth */ - unsigned int width; /* Returns the width of the created - pixmap */ - unsigned int height; /* Returns the height of the created - pixmap */ - unsigned int x_hotspot; /* Returns the x hotspot's - coordinate */ - unsigned int y_hotspot; /* Returns the y hotspot's - coordinate */ - unsigned int cpp; /* Specifies the number of char per - pixel */ - Pixel *pixels; /* List of used color pixels */ - unsigned int npixels; /* Number of used pixels */ - XpmColorSymbol *colorsymbols; /* List of color symbols to override */ - unsigned int numsymbols; /* Number of symbols */ - char *rgb_fname; /* RGB text file name */ - unsigned int nextensions; /* Number of extensions */ - XpmExtension *extensions; /* List of extensions */ - - unsigned int ncolors; /* Number of colors */ - XpmColor *colorTable; /* List of colors */ -/* 3.2 backward compatibility code */ - char *hints_cmt; /* Comment of the hints section */ - char *colors_cmt; /* Comment of the colors section */ - char *pixels_cmt; /* Comment of the pixels section */ -/* end 3.2 bc */ - unsigned int mask_pixel; /* Color table index of transparent - color */ - - /* Color Allocation Directives */ - Bool exactColors; /* Only use exact colors for visual */ - unsigned int closeness; /* Allowable RGB deviation */ - unsigned int red_closeness; /* Allowable red deviation */ - unsigned int green_closeness; /* Allowable green deviation */ - unsigned int blue_closeness; /* Allowable blue deviation */ - int color_key; /* Use colors from this color set */ - - Pixel *alloc_pixels; /* Returns the list of alloc'ed color - pixels */ - int nalloc_pixels; /* Returns the number of alloc'ed - color pixels */ - - Bool alloc_close_colors; /* Specify whether close colors should - be allocated using XAllocColor - or not */ - int bitmap_format; /* Specify the format of 1bit depth - images: ZPixmap or XYBitmap */ - - /* Color functions */ - XpmAllocColorFunc alloc_color; /* Application color allocator */ - XpmFreeColorsFunc free_colors; /* Application color de-allocator */ - void *color_closure; /* Application private data to pass to - alloc_color and free_colors */ - -} XpmAttributes; - -/* XpmAttributes value masks bits */ -#define XpmVisual (1L<<0) -#define XpmColormap (1L<<1) -#define XpmDepth (1L<<2) -#define XpmSize (1L<<3) /* width & height */ -#define XpmHotspot (1L<<4) /* x_hotspot & y_hotspot */ -#define XpmCharsPerPixel (1L<<5) -#define XpmColorSymbols (1L<<6) -#define XpmRgbFilename (1L<<7) -/* 3.2 backward compatibility code */ -#define XpmInfos (1L<<8) -#define XpmReturnInfos XpmInfos -/* end 3.2 bc */ -#define XpmReturnPixels (1L<<9) -#define XpmExtensions (1L<<10) -#define XpmReturnExtensions XpmExtensions - -#define XpmExactColors (1L<<11) -#define XpmCloseness (1L<<12) -#define XpmRGBCloseness (1L<<13) -#define XpmColorKey (1L<<14) - -#define XpmColorTable (1L<<15) -#define XpmReturnColorTable XpmColorTable - -#define XpmReturnAllocPixels (1L<<16) -#define XpmAllocCloseColors (1L<<17) -#define XpmBitmapFormat (1L<<18) - -#define XpmAllocColor (1L<<19) -#define XpmFreeColors (1L<<20) -#define XpmColorClosure (1L<<21) - - -/* XpmInfo value masks bits */ -#define XpmComments XpmInfos -#define XpmReturnComments XpmComments - -/* XpmAttributes mask_pixel value when there is no mask */ -#ifndef FOR_MSW -#define XpmUndefPixel 0x80000000 -#else -/* int is only 16 bit for MSW */ -#define XpmUndefPixel 0x8000 -#endif - -/* - * color keys for visual type, they must fit along with the number key of - * each related element in xpmColorKeys[] defined in XpmI.h - */ -#define XPM_MONO 2 -#define XPM_GREY4 3 -#define XPM_GRAY4 3 -#define XPM_GREY 4 -#define XPM_GRAY 4 -#define XPM_COLOR 5 - - -/* macros for forward declarations of functions with prototypes */ -#define FUNC(f, t, p) extern t f p -#define LFUNC(f, t, p) static t f p - - -/* - * functions declarations - */ - -_XFUNCPROTOBEGIN - -/* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */ -/* Same for Amiga! */ - -#if !defined(FOR_MSW) && !defined(AMIGA) - FUNC(XpmCreatePixmapFromData, int, (Display *display, - Drawable d, - char **data, - Pixmap *pixmap_return, - Pixmap *shapemask_return, - XpmAttributes *attributes)); - - FUNC(XpmCreateDataFromPixmap, int, (Display *display, - char ***data_return, - Pixmap pixmap, - Pixmap shapemask, - XpmAttributes *attributes)); - - FUNC(XpmReadFileToPixmap, int, (Display *display, - Drawable d, - char *filename, - Pixmap *pixmap_return, - Pixmap *shapemask_return, - XpmAttributes *attributes)); - - FUNC(XpmWriteFileFromPixmap, int, (Display *display, - char *filename, - Pixmap pixmap, - Pixmap shapemask, - XpmAttributes *attributes)); -#endif - - FUNC(XpmCreateImageFromData, int, (Display *display, - char **data, - XImage **image_return, - XImage **shapemask_return, - XpmAttributes *attributes)); - - FUNC(XpmCreateDataFromImage, int, (Display *display, - char ***data_return, - XImage *image, - XImage *shapeimage, - XpmAttributes *attributes)); - - FUNC(XpmReadFileToImage, int, (Display *display, - char *filename, - XImage **image_return, - XImage **shapeimage_return, - XpmAttributes *attributes)); - - FUNC(XpmWriteFileFromImage, int, (Display *display, - char *filename, - XImage *image, - XImage *shapeimage, - XpmAttributes *attributes)); - - FUNC(XpmCreateImageFromBuffer, int, (Display *display, - char *buffer, - XImage **image_return, - XImage **shapemask_return, - XpmAttributes *attributes)); -#if !defined(FOR_MSW) && !defined(AMIGA) - FUNC(XpmCreatePixmapFromBuffer, int, (Display *display, - Drawable d, - char *buffer, - Pixmap *pixmap_return, - Pixmap *shapemask_return, - XpmAttributes *attributes)); - - FUNC(XpmCreateBufferFromImage, int, (Display *display, - char **buffer_return, - XImage *image, - XImage *shapeimage, - XpmAttributes *attributes)); - - FUNC(XpmCreateBufferFromPixmap, int, (Display *display, - char **buffer_return, - Pixmap pixmap, - Pixmap shapemask, - XpmAttributes *attributes)); -#endif - FUNC(XpmReadFileToBuffer, int, (char *filename, char **buffer_return)); - FUNC(XpmWriteFileFromBuffer, int, (char *filename, char *buffer)); - - FUNC(XpmReadFileToData, int, (char *filename, char ***data_return)); - FUNC(XpmWriteFileFromData, int, (char *filename, char **data)); - - FUNC(XpmAttributesSize, int, (void)); - FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes)); - FUNC(XpmFreeExtensions, void, (XpmExtension *extensions, - int nextensions)); - - FUNC(XpmFreeXpmImage, void, (XpmImage *image)); - FUNC(XpmFreeXpmInfo, void, (XpmInfo *info)); - FUNC(XpmGetErrorString, char *, (int errcode)); - FUNC(XpmLibraryVersion, int, (void)); - - /* XpmImage functions */ - FUNC(XpmReadFileToXpmImage, int, (char *filename, - XpmImage *image, - XpmInfo *info)); - - FUNC(XpmWriteFileFromXpmImage, int, (char *filename, - XpmImage *image, - XpmInfo *info)); -#if !defined(FOR_MSW) && !defined(AMIGA) - FUNC(XpmCreatePixmapFromXpmImage, int, (Display *display, - Drawable d, - XpmImage *image, - Pixmap *pixmap_return, - Pixmap *shapemask_return, - XpmAttributes *attributes)); -#endif - FUNC(XpmCreateImageFromXpmImage, int, (Display *display, - XpmImage *image, - XImage **image_return, - XImage **shapeimage_return, - XpmAttributes *attributes)); - - FUNC(XpmCreateXpmImageFromImage, int, (Display *display, - XImage *image, - XImage *shapeimage, - XpmImage *xpmimage, - XpmAttributes *attributes)); -#if !defined(FOR_MSW) && !defined(AMIGA) - FUNC(XpmCreateXpmImageFromPixmap, int, (Display *display, - Pixmap pixmap, - Pixmap shapemask, - XpmImage *xpmimage, - XpmAttributes *attributes)); -#endif - FUNC(XpmCreateDataFromXpmImage, int, (char ***data_return, - XpmImage *image, - XpmInfo *info)); - - FUNC(XpmCreateXpmImageFromData, int, (char **data, - XpmImage *image, - XpmInfo *info)); - - FUNC(XpmCreateXpmImageFromBuffer, int, (char *buffer, - XpmImage *image, - XpmInfo *info)); - - FUNC(XpmCreateBufferFromXpmImage, int, (char **buffer_return, - XpmImage *image, - XpmInfo *info)); - - FUNC(XpmGetParseError, int, (char *filename, - int *linenum_return, - int *charnum_return)); - - FUNC(XpmFree, void, (void *ptr)); - -_XFUNCPROTOEND - -/* backward compatibility */ - -/* for version 3.0c */ -#define XpmPixmapColorError XpmColorError -#define XpmPixmapSuccess XpmSuccess -#define XpmPixmapOpenFailed XpmOpenFailed -#define XpmPixmapFileInvalid XpmFileInvalid -#define XpmPixmapNoMemory XpmNoMemory -#define XpmPixmapColorFailed XpmColorFailed - -#define XpmReadPixmapFile(dpy, d, file, pix, mask, att) \ - XpmReadFileToPixmap(dpy, d, file, pix, mask, att) -#define XpmWritePixmapFile(dpy, file, pix, mask, att) \ - XpmWriteFileFromPixmap(dpy, file, pix, mask, att) - -/* for version 3.0b */ -#define PixmapColorError XpmColorError -#define PixmapSuccess XpmSuccess -#define PixmapOpenFailed XpmOpenFailed -#define PixmapFileInvalid XpmFileInvalid -#define PixmapNoMemory XpmNoMemory -#define PixmapColorFailed XpmColorFailed - -#define ColorSymbol XpmColorSymbol - -#define XReadPixmapFile(dpy, d, file, pix, mask, att) \ - XpmReadFileToPixmap(dpy, d, file, pix, mask, att) -#define XWritePixmapFile(dpy, file, pix, mask, att) \ - XpmWriteFileFromPixmap(dpy, file, pix, mask, att) -#define XCreatePixmapFromData(dpy, d, data, pix, mask, att) \ - XpmCreatePixmapFromData(dpy, d, data, pix, mask, att) -#define XCreateDataFromPixmap(dpy, data, pix, mask, att) \ - XpmCreateDataFromPixmap(dpy, data, pix, mask, att) - -#endif /* XPM_NUMBERS */ -#endif diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index cf4109bd0..1266724c7 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -213,7 +213,6 @@ XEXTLIBDIR = Xext #if BuildLibraries OLDXLIBDIR = oldX -XPMLIBDIR = Xpm XTSTLIBDIR = Xtst #endif diff --git a/nx-X11/lib/Xpm/Imakefile b/nx-X11/lib/Xpm/Imakefile deleted file mode 100644 index 35e961083..000000000 --- a/nx-X11/lib/Xpm/Imakefile +++ /dev/null @@ -1,126 +0,0 @@ -XCOMM $XFree86: xc/lib/Xpm/Imakefile,v 1.1 1999/01/11 14:40:02 dawes Exp $ - -/* This is a simplified version of the standard Xpm Imakefile */ - -#ifdef SunArchitecture -#define DoNormalLib YES -#else -#define DoNormalLib NormalLibXpm -#endif -#define DoSharedLib SharedLibXpm -#define DoExtraLib SharedLibXpm -#define DoDebugLib DebugLibXpm -#define DoProfileLib ProfileLibXpm -#define HasSharedData NO -#define LibName NX_Xpm -#define SoRev SOXPMREV -#define IncSubdir X11 - -#ifdef SharedXpmReqs -REQUIREDLIBS = SharedXpmReqs -#endif - -/* - * if your system doesn't provide strcasecmp add -DNEED_STRCASECMP - * if your system doesn't provide strdup add -DNEED_STRDUP - * if your system doesn't provide pipe add -DNO_ZPIPE - * if on your system sprintf doesn't return the number of bytes transmitted - * add -DVOID_SPRINTF - * if you want xpm to try name.xpm.Z and name.xpm.gz when asked to read - * name.xpm , add -DSTAT_ZFILE - */ - -#if defined(LinuxArchitecture) -ZFILEDEF = -DSTAT_ZFILE -#endif -#if defined(UltrixArchitecture) || \ - (defined(MipsArchitecture) && !defined(SGIArchitecture)) -STRDUPDEF = -DNEED_STRDUP -#endif - -#if !HasStrcasecmp -STRCASECMPDEF = -DNEED_STRCASECMP -#endif - -#if defined(SunArchitecture) && !defined(SVR4Architecture) -SPRINTFDEF = -DVOID_SPRINTF -#endif - -#if HasStrlcat -STRLCATDEF = -DHAS_STRLCAT -#endif - -#if HasSnprintf -SNPRINTFDEF = -DHAS_SNPRINTF -#else -SNPRINTFDEF = -Dsnprintf=_XpmSnprintf -SNPRINTFSRCS = snprintf.c -SNPRINTFOBJS = snprintf.o -#endif - -#if defined(Win32Architecture) -ZPIPEDEF = -DNO_ZPIPE -#endif - -DEFINES = $(STRDUPDEF) $(STRCASECMPDEF) $(SPRINTFDEF) $(STRLCATDEF) \ - $(SNPRINTFDEF) $(ZPIPEDEF) $(ZFILEDEF) - -HEADERS = xpm.h - - SRCS = data.c create.c misc.c rgb.c scan.c parse.c hashtab.c \ - CrBufFrI.c CrDatFrP.c CrPFrBuf.c RdFToI.c WrFFrI.c \ - CrBufFrP.c CrIFrBuf.c CrPFrDat.c RdFToP.c WrFFrP.c \ - CrDatFrI.c CrIFrDat.c RdFToDat.c WrFFrDat.c \ - Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c \ - $(SNPRINTFSRCS) - - OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \ - CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o \ - CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o \ - CrDatFrI.o CrIFrDat.o RdFToDat.o WrFFrDat.o \ - Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o \ - $(SNPRINTFOBJS) - - XPMDIR = $(TOP)/extras/Xpm - XPMLIBDIR = $(TOP)/extras/Xpm/lib - - INCLUDES = -I$(XPMLIBDIR) - LINTLIBS = $(LINTXTOLL) $(LINTXLIB) - -#include - -LinkSourceFile(data.c,$(XPMLIBDIR)) -LinkSourceFile(create.c,$(XPMLIBDIR)) -LinkSourceFile(misc.c,$(XPMLIBDIR)) -LinkSourceFile(rgb.c,$(XPMLIBDIR)) -LinkSourceFile(scan.c,$(XPMLIBDIR)) -LinkSourceFile(parse.c,$(XPMLIBDIR)) -LinkSourceFile(hashtab.c,$(XPMLIBDIR)) -LinkSourceFile(CrBufFrI.c,$(XPMLIBDIR)) -LinkSourceFile(CrDatFrP.c,$(XPMLIBDIR)) -LinkSourceFile(CrPFrBuf.c,$(XPMLIBDIR)) -LinkSourceFile(RdFToI.c,$(XPMLIBDIR)) -LinkSourceFile(WrFFrI.c,$(XPMLIBDIR)) -LinkSourceFile(CrBufFrP.c,$(XPMLIBDIR)) -LinkSourceFile(CrIFrBuf.c,$(XPMLIBDIR)) -LinkSourceFile(CrPFrDat.c,$(XPMLIBDIR)) -LinkSourceFile(RdFToP.c,$(XPMLIBDIR)) -LinkSourceFile(WrFFrP.c,$(XPMLIBDIR)) -LinkSourceFile(CrDatFrI.c,$(XPMLIBDIR)) -LinkSourceFile(CrIFrDat.c,$(XPMLIBDIR)) -LinkSourceFile(RdFToDat.c,$(XPMLIBDIR)) -LinkSourceFile(WrFFrDat.c,$(XPMLIBDIR)) -LinkSourceFile(Attrib.c,$(XPMLIBDIR)) -LinkSourceFile(CrIFrP.c,$(XPMLIBDIR)) -LinkSourceFile(CrPFrI.c,$(XPMLIBDIR)) -LinkSourceFile(Image.c,$(XPMLIBDIR)) -LinkSourceFile(Info.c,$(XPMLIBDIR)) -LinkSourceFile(RdFToBuf.c,$(XPMLIBDIR)) -LinkSourceFile(WrFFrBuf.c,$(XPMLIBDIR)) -LinkSourceFile(xpm.h,$(XPMLIBDIR)) - -#if !HasSnprintf -LinkSourceFile(snprintf.c,$(LIBSRC)/misc) -#endif - -DependTarget() diff --git a/nx-X11/lib/Xpm/Xpm-def.cpp b/nx-X11/lib/Xpm/Xpm-def.cpp deleted file mode 100644 index 84cf843ed..000000000 --- a/nx-X11/lib/Xpm/Xpm-def.cpp +++ /dev/null @@ -1,39 +0,0 @@ -LIBRARY Xpm -VERSION LIBRARY_VERSION -EXPORTS - XpmAttributesSize - XpmCreateBufferFromImage - XpmCreateBufferFromPixmap - XpmCreateBufferFromXpmImage - XpmCreateDataFromImage - XpmCreateDataFromPixmap - XpmCreateDataFromXpmImage - XpmCreateImageFromBuffer - XpmCreateImageFromData - XpmCreateImageFromXpmImage - XpmCreatePixmapFromBuffer - XpmCreatePixmapFromData - XpmCreatePixmapFromXpmImage - XpmCreateXpmImageFromBuffer - XpmCreateXpmImageFromData - XpmCreateXpmImageFromImage - XpmCreateXpmImageFromPixmap - XpmFree - XpmFreeAttributes - XpmFreeExtensions - XpmFreeXpmImage - XpmFreeXpmInfo - XpmGetErrorString - XpmLibraryVersion - XpmReadFileToBuffer - XpmReadFileToData - XpmReadFileToImage - XpmReadFileToPixmap - XpmReadFileToXpmImage - XpmWriteFileFromBuffer - XpmWriteFileFromData - XpmWriteFileFromImage - XpmWriteFileFromPixmap - XpmWriteFileFromXpmImage - -/* $XFree86$ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 24e8850d9..d18364b23 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -994,7 +994,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ dix/main.o #endif -XPMLIB = -lNX_Xpm +XPMLIB = -lXpm NXAGENT = hw/nxagent/LibraryTargetName(nxagent) NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI) NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.c b/nx-X11/programs/Xserver/hw/nxagent/Holder.c index bfd907cde..4aca1ecdb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Holder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.c @@ -33,7 +33,7 @@ #include "../../include/gc.h" #include "../../include/window.h" -#include "xpm.h" +#include #include "Agent.h" #include "Pixmaps.h" diff --git a/nx-libs.spec b/nx-libs.spec index 68ec27c12..9d6508c2f 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -34,6 +34,7 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xpm) %else BuildRequires: libexpat-devel BuildRequires: fontconfig-devel @@ -43,6 +44,7 @@ BuildRequires: libxml2-devel BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libfontenc-devel +BuildRequires: xorg-x11-libXpm-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -359,7 +361,7 @@ physical displays as one large virtual display. %package -n libNX_Xpm-devel Group: Development/Libraries -Summary: Development files for the NX Pixmap image file format library +Summary: Development files for the NX Pixmap image file format library (dummy package) Requires: libNX_Xpm4%{?_isa} = %{version}-%{release} %description -n libNX_Xpm-devel @@ -367,16 +369,12 @@ NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -libXpm facilitates working with XPM (X PixMap), a format for -storing/retrieving X pixmaps to/from files. - -This package contains all necessary include files and libraries -needed to develop applications that require these. +This package obsoletes libNX_Xpm-devel in NX and can be safely removed. %package -n libNX_Xpm4 Group: System Environment/Libraries -Summary: NX Pixmap image file format library +Summary: NX Pixmap image file format library (dummy package) Requires: %{name}%{?_isa} >= 3.5.0.29 Obsoletes: libNX_Xpm @@ -385,8 +383,7 @@ NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -libNX_Xpm facilitates working with XPM (X PixMap), a format for -storing/retrieving X pixmaps to/from files. +This package obsoletes libNX_Xpm4 in NX and can be safely removed. %package -n libNX_Xrandr2 @@ -556,7 +553,6 @@ Requires: libNX_Xau-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xdmcp-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xfixes-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xpm-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xrender-devel%{?_isa} = %{version}-%{release} Requires: nx-proto-devel%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -742,7 +738,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig -%post -n libNX_Xpm4 -p /sbin/ldconfig %post -n libNX_Xrandr2 -p /sbin/ldconfig %post -n libNX_Xrender1 -p /sbin/ldconfig %post -n libNX_Xtst6 -p /sbin/ldconfig @@ -758,7 +753,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig -%postun -n libNX_Xpm4 -p /sbin/ldconfig %postun -n libNX_Xrandr2 -p /sbin/ldconfig %postun -n libNX_Xrender1 -p /sbin/ldconfig %postun -n libNX_Xtst6 -p /sbin/ldconfig @@ -874,15 +868,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %defattr(-,root,root) %{_libdir}/libNX_Xinerama.so.1* -%files -n libNX_Xpm-devel -%defattr(-,root,root) -%{_libdir}/libNX_Xpm.so -%{_includedir}/nx/X11/xpm.h - -%files -n libNX_Xpm4 -%defattr(-,root,root) -%{_libdir}/libNX_Xpm.so.4* - %files -n libNX_Xrandr2 %defattr(-,root,root) %{_libdir}/libNX_Xrandr.so.2* -- cgit v1.2.3 From 98e56c125294824a1ac17861d9b5e5a5a35bec5c Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 15 Mar 2015 01:10:31 +0100 Subject: debian/changelog: merge with 3.5.0.x release branch. --- debian/changelog | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 42eef93d4..f021a4d32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,15 +3,36 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium * Version bump, continuing NX 3.x development.. Targeting NX 3.6.x.y some time. - -- Mike Gabriel Sat, 14 Feb 2015 14:27:25 +0100 - -nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium - [ Paul Szabo ] * DISABLED:0401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch. Enable support for the X11 big requests extension and the generic events extension. + -- Mike Gabriel Sat, 14 Feb 2015 14:27:25 +0100 + +nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low + + [ X2Go Release Manager ] + * Continue development + + -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 + +nx-libs (2:3.5.0.30-0x2go1) unstable; urgency=low + + [ Mike Gabriel ] + * Version bump release of nx-libs to assure a working + upgrade path on Ubuntu (where the build daemons strip-off + the "-0x2goX" revision suffix from the package version. + + [ X2Go Release Manager ] + * debian/roll-tarball.sh: + + Only clean up nx-X11 source tree if it is there (i.e., skip that + for the nx-libs-lite tarball generation). + + -- Mike Gabriel Sat, 14 Mar 2015 14:37:58 +0100 + +nx-libs (2:3.5.0.29-0x2go2) unstable; urgency=medium + [ Mike Gabriel ] * Update 0320_nxagent_configurable-keystrokes.full.patch. Fix patch header referring to keystrokes.cfg (plural), not keystroke.cfg. @@ -38,6 +59,8 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium rely on nxproxy/Makefile.in. * Makefile.nx-libs: Fix uninstall-lite rule. The nxproxy and nxcomp uninstallation has to be in uninstall-lite, not in uninstall-full. + * Update 1042-Do-proper-input-validation-to-fix-for-CVE-2011-2895.patch. + Fix broken comment paragraph, whitespace fix. * NX code reduction efforts (from 93Mb to 41Mb): - Drop more unused code in nx-X11/programs/Xserver/hw/. Do this in @@ -67,6 +90,11 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium 0019_nx-X11_expat-build-against-system-libxmltok.full.patch. They patch files that are not used at build time. + * Patch system: + - Prepend a "0" to every patch file name in debian/patches/. The patch + order is now given by a 4 digit ID. Adapt only this changelog stanza to + this modification. + * Debian/Ubuntu packaging: + Fully rework the way nx-libs gets packaged for Debian/Ubuntu. + Split up libnx-x11 into individual packages. @@ -208,6 +236,17 @@ nx-libs (2:3.5.0.29-0x2go2) UNRELEASED; urgency=medium [ Mihai Moldovan ] * Change string "X2go" to "X2Go" where appropriate. + * CVE security review: + - Update 1007-CVE-2014-0210-unvalidated-length-in-_fs_recv_conn_se.patch. + Use xfree() instead of free() in nx-libs. + - Update 1011-CVE-2014-0210-unvalidated-length-fields-in-fs_read_q.patch. + Apply correctly on nx-libs 3.6.x. + - Update 1020-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch. + Human-readable version of "1 MB". + - Add 1041-nx-X11-lib-font-fc-fserve.c-initialize-remaining-buf.patch. + Initialize remaining bufleft variables (nx-X11/lib/font/fc/fserve.c). + - Add 1042-Do-proper-input-validation-to-fix-for-CVE-2011-2895.patch. + Do proper input validation to fix for CVE-2011-2895. -- Mike Gabriel Sat, 14 Feb 2015 14:25:17 +0100 -- cgit v1.2.3 From c460e090bce0b01effcb2409a28bc20cf7a0f013 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 15 Mar 2015 01:13:56 +0100 Subject: debian/changelog: fix wrong signature. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f021a4d32..3b4175f92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -248,7 +248,7 @@ nx-libs (2:3.5.0.29-0x2go2) unstable; urgency=medium - Add 1042-Do-proper-input-validation-to-fix-for-CVE-2011-2895.patch. Do proper input validation to fix for CVE-2011-2895. - -- Mike Gabriel Sat, 14 Feb 2015 14:25:17 +0100 + -- X2Go Release Manager Fri, 13 Mar 2015 15:50:00 +0100 nx-libs (2:3.5.0.28-0x2go1) unstable; urgency=medium -- cgit v1.2.3 From 5464a6dba5742a9f22ba18c9b307d4ee42394378 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sun, 15 Mar 2015 17:22:38 +0100 Subject: nx{comp{,ext,shad},proxy}: use path discovery for finding makedepend. Remove old cruft. --- debian/changelog | 4 ++-- nxcomp/configure.in | 15 +-------------- nxcompext/configure.in | 15 +-------------- nxcompshad/configure.in | 15 +-------------- nxproxy/configure.in | 15 +-------------- 5 files changed, 6 insertions(+), 58 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3b4175f92..664717898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,8 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low - [ X2Go Release Manager ] - * Continue development + [ Clemens Lang ] + * Use path discovery for finding makedepend. Remove old cruft. -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 diff --git a/nxcomp/configure.in b/nxcomp/configure.in index 6fa9757a7..2378a9398 100644 --- a/nxcomp/configure.in +++ b/nxcomp/configure.in @@ -362,20 +362,7 @@ fi dnl Find makedepend somewhere. AC_SUBST(MAKEDEPEND) - -if test -x "../nx-X11/config/makedepend/makedepend" ; then - MAKEDEPEND=../nx-X11/config/makedepend/makedepend -else - if test -x "/usr/X11R6/bin/makedepend" ; then - MAKEDEPEND=/usr/X11R6/bin/makedepend - else - if test -x "/usr/openwin/bin/makedepend" ; then - MAKEDEPEND=/usr/openwin/bin/makedepend - else - MAKEDEPEND=/usr/bin/makedepend - fi - fi -fi +MAKEDEPEND="$(which makedepend)" dnl Determine what to build based on the platform. dnl Override the LIBS settings on Cygwin32 so that diff --git a/nxcompext/configure.in b/nxcompext/configure.in index 08c48a751..6159e84c1 100644 --- a/nxcompext/configure.in +++ b/nxcompext/configure.in @@ -219,20 +219,7 @@ CFLAGS="$CFLAGS -DVERSION=\\\"${VERSION}\\\"" dnl Find makedepend somewhere. AC_SUBST(MAKEDEPEND) - -if test -x "../nx-X11/config/makedepend/makedepend" ; then - MAKEDEPEND=../nx-X11/config/makedepend/makedepend -else - if test -x "/usr/X11R6/bin/makedepend" ; then - MAKEDEPEND=/usr/X11R6/bin/makedepend - else - if test -x "/usr/openwin/bin/makedepend" ; then - MAKEDEPEND=/usr/openwin/bin/makedepend - else - MAKEDEPEND=/usr/bin/makedepend - fi - fi -fi +MAKEDEPEND="$(which makedepend)" dnl Determine what to build based on the platform. dnl Override the LIBS settings on Cygwin32 so that diff --git a/nxcompshad/configure.in b/nxcompshad/configure.in index 13149b3a0..a76c6b9a1 100644 --- a/nxcompshad/configure.in +++ b/nxcompshad/configure.in @@ -269,19 +269,6 @@ fi dnl Find makedepend somewhere. AC_SUBST(MAKEDEPEND) - -if test -x "../nx-X11/config/makedepend/makedepend" ; then - MAKEDEPEND=../nx-X11/config/makedepend/makedepend -else - if test -x "/usr/X11R6/bin/makedepend" ; then - MAKEDEPEND=/usr/X11R6/bin/makedepend - else - if test -x "/usr/openwin/bin/makedepend" ; then - MAKEDEPEND=/usr/openwin/bin/makedepend - else - MAKEDEPEND=makedepend - fi - fi -fi +MAKEDEPEND="$(which makedepend)" AC_OUTPUT(Makefile) diff --git a/nxproxy/configure.in b/nxproxy/configure.in index b86828d02..914e70738 100644 --- a/nxproxy/configure.in +++ b/nxproxy/configure.in @@ -167,19 +167,6 @@ fi dnl Find makedepend somewhere. AC_SUBST(MAKEDEPEND) - -if test -x "../nx-X11/config/makedepend/makedepend" ; then - MAKEDEPEND=../nx-X11/config/makedepend/makedepend -else - if test -x "/usr/X11R6/bin/makedepend" ; then - MAKEDEPEND=/usr/X11R6/bin/makedepend - else - if test -x "/usr/openwin/bin/makedepend" ; then - MAKEDEPEND=/usr/openwin/bin/makedepend - else - MAKEDEPEND=makedepend - fi - fi -fi +MAKEDEPEND="$(which makedepend)" AC_OUTPUT(Makefile) -- cgit v1.2.3 From ad7e12ed39cc4091ff878ea2b3e748e0147dd57f Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sun, 15 Mar 2015 17:26:24 +0100 Subject: nxcomp{,shad}: fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. --- debian/changelog | 1 + nxcomp/configure.in | 4 ++-- nxcompshad/configure.in | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 664717898..771139d9a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low [ Clemens Lang ] * Use path discovery for finding makedepend. Remove old cruft. + * Fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 diff --git a/nxcomp/configure.in b/nxcomp/configure.in index 2378a9398..07c88df77 100644 --- a/nxcomp/configure.in +++ b/nxcomp/configure.in @@ -183,11 +183,11 @@ if test "$FreeBSD" = yes; then fi dnl Under Darwin we don't have support for -soname option and -dnl we need the -bundle flag. Under Solaris, instead, we need +dnl we need the -dynamiclib flag. Under Solaris, instead, we need dnl the options -G -h. if test "$DARWIN" = yes; then - LDFLAGS="$LDFLAGS -bundle" + LDFLAGS="$LDFLAGS -dynamiclib" elif test "$SUN" = yes; then LDFLAGS="$LDFLAGS -G -h \$(LIBLOAD)" else diff --git a/nxcompshad/configure.in b/nxcompshad/configure.in index a76c6b9a1..4e91361ff 100644 --- a/nxcompshad/configure.in +++ b/nxcompshad/configure.in @@ -175,11 +175,11 @@ if test "$FreeBSD" = yes; then fi dnl Under Darwin we don't have support for -soname option and -dnl we need the -bundle flag. Under Solaris, instead, we need +dnl we need the -dynamiclib flag. Under Solaris, instead, we need dnl the options -G -h. if test "$DARWIN" = yes; then - LDFLAGS="$LDFLAGS -bundle" + LDFLAGS="$LDFLAGS -dynamiclib" elif test "$SUN" = yes; then LDFLAGS="$LDFLAGS -G -h \$(LIBLOAD)" else -- cgit v1.2.3 From 638e31c2f33723123d35ce65db88071a1be5cdb0 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sun, 15 Mar 2015 17:29:50 +0100 Subject: nxcomp{,ext,shad}: use the correct library naming scheme on OS X. It differs from other UNIX-based systems. --- debian/changelog | 2 ++ nxcomp/Makefile.in | 22 +++++++++++++++------- nxcompext/Makefile.in | 18 +++++++++++++----- nxcompshad/Makefile.in | 22 +++++++++++++++------- 4 files changed, 45 insertions(+), 19 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 771139d9a..197b257a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low [ Clemens Lang ] * Use path discovery for finding makedepend. Remove old cruft. * Fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. + * Use the correct library naming scheme on OS X. It differs from other + UNIX-based systems. -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index 93bb0b38c..2234474ec 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -91,9 +91,17 @@ DEPENDINCLUDES = -I/usr/include/c++ -I/usr/include/g++ -I/usr/include/g++-3 LIBRARY = Xcomp LIBNAME = lib$(LIBRARY) +ifeq ($(shell uname),Darwin) +LIBFULL = lib$(LIBRARY).$(VERSION).dylib +LIBLOAD = lib$(LIBRARY).$(LIBVERSION).dylib +LIBSHARED = lib$(LIBRARY).dylib +LIBFLAGS = -install_name $(libdir)/$(LIBLOAD) -compatibility_version $(LIBVERSION) -current_version $(VERSION) +else LIBFULL = lib$(LIBRARY).so.$(VERSION) LIBLOAD = lib$(LIBRARY).so.$(LIBVERSION) LIBSHARED = lib$(LIBRARY).so +LIBFLAGS = +endif LIBARCHIVE = lib$(LIBRARY).a LIBCYGSHARED = cyg$(LIBRARY).dll @@ -232,7 +240,7 @@ COBJ = $(CSRC:.c=.o) CXXOBJ = $(CXXSRC:.cpp=.o) $(LIBFULL): $(CXXOBJ) $(COBJ) - $(CXX) -o $@ $(LDFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) + $(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(LIBLOAD): $(LIBFULL) rm -f $(LIBLOAD) @@ -278,9 +286,9 @@ install.lib: all ./mkinstalldirs $(DESTDIR)${libdir} ./mkinstalldirs $(DESTDIR)${includedir}/nx $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcomp.so.3 $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcomp.so $(DESTDIR)${libdir} - $(INSTALL_DATA) libXcomp.a $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} + $(INSTALL_DATA) $(LIBARCHIVE) $(DESTDIR)${libdir} $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx $(INSTALL_DATA) MD5.h $(DESTDIR)${includedir}/nx echo "Running ldconfig tool, this may take a while..." && ldconfig || true @@ -293,9 +301,9 @@ uninstall.bin: uninstall.lib: $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) - $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so.3 - $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.so - $(RM_FILE) $(DESTDIR)${libdir}/libXcomp.a + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBLOAD) + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBSHARED) + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBARCHIVE) $(RM_FILE) $(DESTDIR)${includedir}/nx/NXalert.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NX.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NXmitshm.h diff --git a/nxcompext/Makefile.in b/nxcompext/Makefile.in index 7987c7563..8777ceeed 100644 --- a/nxcompext/Makefile.in +++ b/nxcompext/Makefile.in @@ -82,9 +82,17 @@ DEPENDINCLUDES = -I/usr/include/c++ -I/usr/include/g++ -I/usr/include/g++-3 LIBRARY = Xcompext LIBNAME = lib$(LIBRARY) +ifeq ($(shell uname),Darwin) +LIBFULL = lib$(LIBRARY).$(VERSION).dylib +LIBLOAD = lib$(LIBRARY).$(LIBVERSION).dylib +LIBSHARED = lib$(LIBRARY).dylib +LIBFLAGS = -install_name $(libdir)/$(LIBLOAD) -compatibility_version $(LIBVERSION) -current_version $(VERSION) +else LIBFULL = lib$(LIBRARY).so.$(VERSION) LIBLOAD = lib$(LIBRARY).so.$(LIBVERSION) LIBSHARED = lib$(LIBRARY).so +LIBFLAGS = +endif LIBARCHIVE = lib$(LIBRARY).a LIBCYGSHARED = cyg$(LIBRARY).dll @@ -113,7 +121,7 @@ COBJ = $(CSRC:.c=.o) CXXOBJ = $(CXXSRC:.cpp=.o) $(LIBFULL): $(CXXOBJ) $(COBJ) - $(CXX) -o $@ $(LDFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) + $(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(LIBLOAD): $(LIBFULL) rm -f $(LIBLOAD) @@ -159,8 +167,8 @@ install.lib: all ./mkinstalldirs $(DESTDIR)${libdir} ./mkinstalldirs $(DESTDIR)${includedir}/nx $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcompext.so.3 $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcompext.so $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx echo "Running ldconfig tool, this may take a while..." && ldconfig || true @@ -172,8 +180,8 @@ uninstall.bin: uninstall.lib: $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) - $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so.3 - $(RM_FILE) $(DESTDIR)${libdir}/libXcompext.so + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBLOAD) + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBSHARED) $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlib.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NXlibint.h echo "Running ldconfig tool, this may take a while..." && ldconfig || true diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index f7e89a6f2..2f6e50bf9 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -103,9 +103,17 @@ DEPENDINCLUDES = -I/usr/include/g++ -I/usr/include/g++-3 LIBRARY = Xcompshad LIBNAME = lib$(LIBRARY) +ifeq ($(shell uname),Darwin) +LIBFULL = lib$(LIBRARY).$(VERSION).dylib +LIBLOAD = lib$(LIBRARY).$(LIBVERSION).dylib +LIBSHARED = lib$(LIBRARY).dylib +LIBFLAGS = -install_name $(libdir)/$(LIBLOAD) -compatibility_version $(LIBVERSION) -current_version $(VERSION) +else LIBFULL = lib$(LIBRARY).so.$(VERSION) LIBLOAD = lib$(LIBRARY).so.$(LIBVERSION) LIBSHARED = lib$(LIBRARY).so +LIBFLAGS = +endif LIBARCHIVE = lib$(LIBRARY).a MSRC = Main.c @@ -146,7 +154,7 @@ all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) endif $(LIBFULL): $(CXXOBJ) $(COBJ) - $(CXX) -o $@ $(LDFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(EXTRALIBS) + $(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(EXTRALIBS) $(LIBLOAD): $(LIBFULL) rm -f $(LIBLOAD) @@ -193,9 +201,9 @@ install.lib: all $(INSTALL_DIR) $(DESTDIR)${libdir} $(INSTALL_DIR) $(DESTDIR)${includedir}/nx $(INSTALL_DATA) $(LIBFULL) $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcompshad.so.3 $(DESTDIR)${libdir} - $(INSTALL_LINK) libXcompshad.so $(DESTDIR)${libdir} - $(INSTALL_DATA) *.a $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} + $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} + $(INSTALL_DATA) $(LIBARCHIVE) $(DESTDIR)${libdir} $(INSTALL_DATA) *.h $(DESTDIR)${includedir}/nx echo "Running ldconfig tool, this may take a while..." && ldconfig || true @@ -207,9 +215,9 @@ uninstall.bin: uninstall.lib: $(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL) - $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so.3 - $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.so - $(RM_FILE) $(DESTDIR)${libdir}/libXcompshad.a + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBLOAD) + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBSHARED) + $(RM_FILE) $(DESTDIR)${libdir}/$(LIBARCHIVE) for header in *.h; do $(RM_FILE) $(DESTDIR)${includedir}/nx/$$header; done $(RM_DIR) $(DESTDIR)${libdir}/nx/ $(RM_DIR) $(DESTDIR)${includedir}/nx/ -- cgit v1.2.3 From 8a260b94f83fd3865ee84e49655ff75ee97eca2b Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 17 Mar 2015 18:26:26 +0100 Subject: nx-libs.spec: Versioned libXcomp* should obsolete unversioned libXcomp*, not libNX_Xcomp*. Cherry-picked from branch 3.5.0.x. Conflicts: debian/changelog --- debian/changelog | 7 +++++++ nx-libs.spec | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 197b257a1..2fbaeca28 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,13 @@ nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low * Use the correct library naming scheme on OS X. It differs from other UNIX-based systems. + [ Mihai Moldovan ] + * nx{comp{,ext,shad},proxy}: try really hard to find makedepend. Do not fail + if it is not available. + * nx-libs.spec: + - Versioned libXcomp* should obsolete unversioned libXcomp*, not + libNX_Xcomp*. + -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 nx-libs (2:3.5.0.30-0x2go1) unstable; urgency=low diff --git a/nx-libs.spec b/nx-libs.spec index 9d6508c2f..da81fc18f 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -474,7 +474,7 @@ The NX differential compression library's development files. Group: System Environment/Libraries Summary: NX differential compression library Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xcomp +Obsoletes: libXcomp %description -n libXcomp3 NX is a software suite from NoMachine which implements very efficient @@ -503,7 +503,7 @@ The NX compression extensions library's development files. Group: System Environment/Libraries Summary: NX protocol compression extensions library Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xcompext +Obsoletes: libXcompext %description -n libXcompext3 NX is a software suite from NoMachine which implements very efficient @@ -535,7 +535,7 @@ The NX session shadowing library's development files. Group: System Environment/Libraries Summary: NX session shadowing Library Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xcompshad +Obsoletes: libXcompshad %description -n libXcompshad3 NX is a software suite from NoMachine which implements very efficient -- cgit v1.2.3 From fcb2cb5e00c19c7ed0fab137db97faee69c4e147 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 17 Mar 2015 18:28:15 +0100 Subject: nx-libs.spec: add overlooked Obsolete: statement to libNX_Xfixes3. Cherry-picked from branch 3.5.0.x. --- debian/changelog | 1 + nx-libs.spec | 1 + 2 files changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2fbaeca28..2d6344395 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low * nx-libs.spec: - Versioned libXcomp* should obsolete unversioned libXcomp*, not libNX_Xcomp*. + - Add overlooked Obsolete: statement to libNX_Xfixes3. -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 diff --git a/nx-libs.spec b/nx-libs.spec index da81fc18f..7c594cc20 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -333,6 +333,7 @@ needed to develop applications that require these. Group: System Environment/Libraries Summary: NX miscellaneous "fixes" extension library Requires: %{name}%{?_isa} >= 3.5.0.29 +Obsoletes: libNX_Xfixes %description -n libNX_Xfixes3 NX is a software suite which implements very efficient compression of -- cgit v1.2.3 From 68be7d1c8ff0b36357e4af739f2c0e80283716af Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Thu, 26 Mar 2015 00:41:45 +0100 Subject: debian/changelog: sync with 3.5.0.x branch. --- debian/changelog | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2d6344395..40c087893 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,23 +10,67 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium -- Mike Gabriel Sat, 14 Feb 2015 14:27:25 +0100 -nx-libs (2:3.5.0.31-0x2go1) UNRELEASED; urgency=low +nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low + + [ Mihai Moldovan ] + * Only use the first three numbers in the full version for current_version + on OS X. ld(1) on 10.6 fails otherwise. + Affected: + - 0420_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full.patch + - 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full.patch + + -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 + +nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low [ Clemens Lang ] - * Use path discovery for finding makedepend. Remove old cruft. + * Use path discovery for finding makedepend. Remove old cruft. Adds: + - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch + - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch + - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch + - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch * Fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. + Adds: + - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch * Use the correct library naming scheme on OS X. It differs from other UNIX-based systems. + Adds: + - 0410_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch [ Mihai Moldovan ] * nx{comp{,ext,shad},proxy}: try really hard to find makedepend. Do not fail if it is not available. + * Rename: + - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch => + 0410_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch + - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch => + 0610_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch + - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch => + 0611_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch + - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch => + 0612_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch + - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch => + 0613_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch => + 0614_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + => + 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + => + 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch * nx-libs.spec: - Versioned libXcomp* should obsolete unversioned libXcomp*, not libNX_Xcomp*. - Add overlooked Obsolete: statement to libNX_Xfixes3. + * Mid-release fixup: + - Rename *nxcomp{ext,shad}*.full+lite* to *nxcomp{ext,shad}*.full. - -- X2Go Release Manager Sun, 15 Mar 2015 00:48:06 +0100 + -- X2Go Release Manager Tue, 17 Mar 2015 18:48:06 +0100 nx-libs (2:3.5.0.30-0x2go1) unstable; urgency=low -- cgit v1.2.3 From ab4e5bf66af57831316312d869f0832d21438212 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 29 Mar 2015 08:02:43 +0200 Subject: debian/changelog: sync with 3.5.0.x branch. --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 40c087893..26a540fc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,13 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low - 0420_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full.patch - 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full.patch + * nx-X11: handle source pictures (those without a Drawable surface) + gracefully. + Adds: + - 0017_nx-X11_fix-SetPictureFilter.full.patch + * nx-X11: fix typo in previous patch. + Affects: + - 0017_nx-X11_fix-SetPictureFilter.full.patch -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 -- cgit v1.2.3 From 8ed8a43d2cad421561d0082949d2bfa9f29c7675 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 29 Mar 2015 08:03:13 +0200 Subject: nx-X11: add more NULL guards to TEST and DEBUG sections of Render.c. Cherry-picked from branch 3.5.0.x. --- debian/changelog | 3 + nx-X11/programs/Xserver/hw/nxagent/Render.c | 155 ++++++++++++++++------------ 2 files changed, 93 insertions(+), 65 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 26a540fc1..4bbe4028f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,9 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low * nx-X11: fix typo in previous patch. Affects: - 0017_nx-X11_fix-SetPictureFilter.full.patch + * nx-X11: add more NULL guards to TEST and DEBUG sections of Render.c. + Affects: + - 0990_fix-DEBUG-and-TEST-builds.full.patch -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index c5fd06352..c7f82633c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -946,7 +946,7 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask) #ifdef TEST - if (pPicture -> pDrawable -> type == DRAWABLE_PIXMAP) + if (pPicture && pPicture->pDrawable && pPicture -> pDrawable -> type == DRAWABLE_PIXMAP) { fprintf(stderr, "nxagentChangePicture: %sPixmap [%p] Picture [%p][%p].\n", nxagentIsShmPixmap((PixmapPtr)pPicture -> pDrawable) ? "Shared " : "", @@ -1008,7 +1008,7 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD #ifdef DEBUG - if (pSrc -> pDrawable != NULL) + if (pSrc && pSrc -> pDrawable != NULL) { fprintf(stderr, "nxagentComposite: Source Picture [%lu][%p] with drawable [%s%s][%p].\n", nxagentPicturePriv(pSrc) -> picture, (void *) pSrc, @@ -1018,14 +1018,16 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD (void *) pSrc -> pDrawable); } - fprintf(stderr, "nxagentComposite: Destination Picture [%lu][%p] with drawable [%s%s][%p].\n", - nxagentPicturePriv(pDst) -> picture, (void *) pDst, - (pDst -> pDrawable -> type == DRAWABLE_PIXMAP && - nxagentIsShmPixmap((PixmapPtr) pDst -> pDrawable)) ? "Shared " : "", - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window", - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentComposite: Destination Picture [%lu][%p] with drawable [%s%s][%p].\n", + nxagentPicturePriv(pDst) -> picture, (void *) pDst, + (pDst -> pDrawable -> type == DRAWABLE_PIXMAP && + nxagentIsShmPixmap((PixmapPtr) pDst -> pDrawable)) ? "Shared " : "", + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window", + (void *) pDst -> pDrawable); + } - if (pMask) + if (pMask && pMask->pDrawable) { fprintf(stderr, "nxagentComposite: Mask Picture [%lu][%p] with drawable [%s%s][%p].\n", nxagentPicturePriv(pMask) -> picture, (void *) pMask, @@ -1042,12 +1044,13 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height); #ifdef TEST - fprintf(stderr, "nxagentComposite: WARNING! Prevented operation on region [%d,%d,%d,%d] " - "for drawable at [%p] with type [%s].\n", pDstRegion -> extents.x1, - pDstRegion -> extents.y1, pDstRegion -> extents.x2, pDstRegion -> extents.y2, - (void *) pDst -> pDrawable, - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"); - + if ((pDstRegion) && (pDst && pDst->pDrawable)) { + fprintf(stderr, "nxagentComposite: WARNING! Prevented operation on region [%d,%d,%d,%d] " + "for drawable at [%p] with type [%s].\n", pDstRegion -> extents.x1, + pDstRegion -> extents.y1, pDstRegion -> extents.x2, pDstRegion -> extents.y2, + (void *) pDst -> pDrawable, + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"); + } #endif nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion); @@ -1176,10 +1179,12 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, } #ifdef TEST - fprintf(stderr, "nxagentGlyphs: Called with source [%s][%p] destination [%s][%p] and size id [%d].\n", - (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pSrc, - (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pDst, - sizeID); + if ((pSrc && pSrc->pDrawable) && (pDst && pDst->pDrawable)) { + fprintf(stderr, "nxagentGlyphs: Called with source [%s][%p] destination [%s][%p] and size id [%d].\n", + (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pSrc, + (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pDst, + sizeID); + } #endif pForm = NULL; @@ -1264,9 +1269,11 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) { #ifdef TEST - fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n", - pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", - (void *) pSrc -> pDrawable); + if (pSrc && pSrc->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n", + pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", + (void *) pSrc -> pDrawable); + } #endif /* @@ -1280,12 +1287,14 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, if (pSrc -> repeat == 1 || nxagentGlyphsExtents == NullBox) { #ifdef DEBUG - fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", - (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - (void *) pSrc -> pDrawable, pSrc -> pDrawable -> x, pSrc -> pDrawable -> y, - pSrc -> pDrawable -> x + pSrc -> pDrawable -> width, - pSrc -> pDrawable -> y + pSrc -> pDrawable -> height); + if (pSrc && pSrc->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p] " + "with geometry [%d,%d,%d,%d].\n", + (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + (void *) pSrc -> pDrawable, pSrc -> pDrawable -> x, pSrc -> pDrawable -> y, + pSrc -> pDrawable -> x + pSrc -> pDrawable -> width, + pSrc -> pDrawable -> y + pSrc -> pDrawable -> height); + } #endif nxagentSynchronizeBox(pSrc -> pDrawable, NullBox, NEVER_BREAK); @@ -1293,12 +1302,14 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, else { #ifdef DEBUG - fprintf(stderr, "nxagentGlyphs: Synchronizing region [%d,%d,%d,%d] of source [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", glyphBox.x1, glyphBox.y1, glyphBox.x2, glyphBox.y2, - (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - (void *) pSrc -> pDrawable, pSrc -> pDrawable -> x, pSrc -> pDrawable -> y, - pSrc -> pDrawable -> x + pSrc -> pDrawable -> width, - pSrc -> pDrawable -> y + pSrc -> pDrawable -> height); + if (pSrc && pSrc->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing region [%d,%d,%d,%d] of source [%s] at [%p] " + "with geometry [%d,%d,%d,%d].\n", glyphBox.x1, glyphBox.y1, glyphBox.x2, glyphBox.y2, + (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + (void *) pSrc -> pDrawable, pSrc -> pDrawable -> x, pSrc -> pDrawable -> y, + pSrc -> pDrawable -> x + pSrc -> pDrawable -> width, + pSrc -> pDrawable -> y + pSrc -> pDrawable -> height); + } #endif nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK); @@ -1314,20 +1325,24 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized) { #ifdef TEST - fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p].\n", - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p].\n", + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", + (void *) pDst -> pDrawable); + } #endif if (nxagentGlyphsExtents == NullBox) { #ifdef DEBUG - fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", - (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - (void *) pDst -> pDrawable, pDst -> pDrawable -> x, pDst -> pDrawable -> y, - pDst -> pDrawable -> x + pDst -> pDrawable -> width, - pDst -> pDrawable -> y + pDst -> pDrawable -> height); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p] " + "with geometry [%d,%d,%d,%d].\n", + (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + (void *) pDst -> pDrawable, pDst -> pDrawable -> x, pDst -> pDrawable -> y, + pDst -> pDrawable -> x + pDst -> pDrawable -> width, + pDst -> pDrawable -> y + pDst -> pDrawable -> height); + } #endif nxagentSynchronizeBox(pDst -> pDrawable, NullBox, NEVER_BREAK); @@ -1335,12 +1350,14 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, else { #ifdef DEBUG - fprintf(stderr, "nxagentGlyphs: Synchronizing region [%d,%d,%d,%d] of destination [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", glyphBox.x1, glyphBox.y1, glyphBox.x2, glyphBox.y2, - (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - (void *) pDst -> pDrawable, pDst -> pDrawable -> x, pDst -> pDrawable -> y, - pDst -> pDrawable -> x + pDst -> pDrawable -> width, - pDst -> pDrawable -> y + pDst -> pDrawable -> height); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Synchronizing region [%d,%d,%d,%d] of destination [%s] at [%p] " + "with geometry [%d,%d,%d,%d].\n", glyphBox.x1, glyphBox.y1, glyphBox.x2, glyphBox.y2, + (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + (void *) pDst -> pDrawable, pDst -> pDrawable -> x, pDst -> pDrawable -> y, + pDst -> pDrawable -> x + pDst -> pDrawable -> width, + pDst -> pDrawable -> y + pDst -> pDrawable -> height); + } #endif nxagentSynchronizeBox(pDst -> pDrawable, &glyphBox, NEVER_BREAK); @@ -1355,9 +1372,11 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, nxagentSetDrawableContainGlyphs(pDst -> pDrawable, 1); #ifdef TEST - fprintf(stderr, "nxagentGlyphs: Glyph flag set on drawable [%s][%p].\n", - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentGlyphs: Glyph flag set on drawable [%s][%p].\n", + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", + (void *) pDst -> pDrawable); + } #endif #ifdef SPLIT_GLYPH_LISTS @@ -1569,9 +1588,11 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, } #ifdef TEST - fprintf(stderr, "nxagentCompositeRects: Called for picture at [%p] with [%s] at [%p].\n", - (void *) pDst, (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentCompositeRects: Called for picture at [%p] with [%s] at [%p].\n", + (void *) pDst, (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), + (void *) pDst -> pDrawable); + } #endif /* @@ -1703,11 +1724,13 @@ FIXME: Is this useful or just a waste of bandwidth? nxagentTrapezoidExtents) == rgnIN) { #ifdef TEST - fprintf(stderr, "nxagentTrapezoids: WARNING! Prevented operation on region [%d,%d,%d,%d] already dirty " - "for drawable [%s][%p].\n", nxagentTrapezoidExtents -> x1, nxagentTrapezoidExtents -> y1, - nxagentTrapezoidExtents -> x2, nxagentTrapezoidExtents -> y2, - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentTrapezoids: WARNING! Prevented operation on region [%d,%d,%d,%d] already dirty " + "for drawable [%s][%p].\n", nxagentTrapezoidExtents -> x1, nxagentTrapezoidExtents -> y1, + nxagentTrapezoidExtents -> x2, nxagentTrapezoidExtents -> y2, + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", + (void *) pDst -> pDrawable); + } #endif if (pDst -> pDrawable -> type == DRAWABLE_PIXMAP) @@ -1733,11 +1756,13 @@ FIXME: Is this useful or just a waste of bandwidth? nxagentTrapezoidExtents -> y2 - nxagentTrapezoidExtents -> y1); #ifdef TEST - fprintf(stderr, "nxagentTrapezoids: WARNING! Prevented operation on region [%d,%d,%d,%d] " - "for drawable [%s][%p].\n", pDstRegion -> extents.x1, pDstRegion -> extents.y1, - pDstRegion -> extents.x2, pDstRegion -> extents.y2, - pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", - (void *) pDst -> pDrawable); + if (pDst && pDst->pDrawable) { + fprintf(stderr, "nxagentTrapezoids: WARNING! Prevented operation on region [%d,%d,%d,%d] " + "for drawable [%s][%p].\n", pDstRegion -> extents.x1, pDstRegion -> extents.y1, + pDstRegion -> extents.x2, pDstRegion -> extents.y2, + pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window", + (void *) pDst -> pDrawable); + } #endif nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion); -- cgit v1.2.3 From ebe00df38f264ef71dac3c73d416a74685c8cbd2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 4 Mar 2015 08:35:50 +0100 Subject: imake cleanup: Drop all references to XdmxServer and BuildXdmx*. --- debian/rules | 2 - nx-X11/config/cf/README | 1 - nx-X11/config/cf/X11.tmpl | 65 +- nx-X11/config/cf/host.def | 7 - nx-X11/config/cf/xf86site.def | 6 - nx-X11/config/cf/xorgsite.def | 6 - nx-X11/include/extensions/Imakefile | 5 +- nx-X11/include/extensions/dmxext.h | 190 ------ nx-X11/include/extensions/dmxproto.h | 446 ------------- nx-X11/lib/X11/Imakefile | 2 +- nx-X11/programs/Xserver/Imakefile | 54 +- nx-X11/programs/Xserver/Xext/Imakefile | 5 - nx-X11/programs/Xserver/Xext/dmx.c | 1133 -------------------------------- nx-X11/programs/Xserver/hw/Imakefile | 18 - nx-libs.spec | 2 - 15 files changed, 8 insertions(+), 1934 deletions(-) delete mode 100644 nx-X11/include/extensions/dmxext.h delete mode 100644 nx-X11/include/extensions/dmxproto.h delete mode 100644 nx-X11/programs/Xserver/Xext/dmx.c delete mode 100644 nx-X11/programs/Xserver/hw/Imakefile (limited to 'debian') diff --git a/debian/rules b/debian/rules index 2375b46ac..d3532b36b 100755 --- a/debian/rules +++ b/debian/rules @@ -59,8 +59,6 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1str.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86mscstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/dmxext.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/dmxproto.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/bigreqstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xcmiscstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XIproto.h diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 8317ef4f0..051d58748 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -465,7 +465,6 @@ The following variables are used by some part of the tree: HtmlDir path used by Web server for HTML and RX docs CgiBinDir path used by Web server for CGI programs ProxyManager ICE network ID to contact a running proxymngr - XdmxServer build Distributed Multihead X server Make Variables diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 38e627181..09dbc8f70 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -138,18 +138,8 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildDocs #define BuildDocs !BuildServersOnly #endif -#ifndef BuildDmx -#define BuildDmx NO -#endif -#ifndef XdmxServer -#define XdmxServer BuildDmx -#endif -#ifndef BuildLibrariesForDmx -#define BuildLibrariesForDmx XdmxServer -#endif #ifndef BuildLibraries -#define BuildLibraries (!BuildServersOnly || BuildClients || \ - BuildLibrariesForDmx) +#define BuildLibraries (!BuildServersOnly || BuildClients) #endif #ifndef BuildLibrariesForXServers #define BuildLibrariesForXServers BuildServer @@ -362,8 +352,7 @@ XORGRELSTRING = XorgManVersionString #define BuildXInputExt NO #endif #ifndef BuildXInputLib -#define BuildXInputLib (BuildXInputExt && \ - (!BuildServersOnly || BuildLibrariesForDmx)) +#define BuildXInputLib (BuildXInputExt && !BuildServersOnly) #endif #ifndef BuildEVI #define BuildEVI YES @@ -385,8 +374,7 @@ XORGRELSTRING = XorgManVersionString #define BuildFontLib (BuildLibraries || BuildServer) #else #define BuildFontLib (BuildLibraries || \ - (BuildServer && !DoLoadableServer) || \ - XprtServer || XdmxServer) + (BuildServer && !DoLoadableServer) || XprtServer) #endif #endif #ifndef BuildFontCache @@ -419,7 +407,6 @@ XORGRELSTRING = XorgManVersionString #endif #ifndef BuildXKBlib #define BuildXKBlib (BuildXKB && (!BuildServersOnly || \ - XdmxServer || \ BuildXkbcomp )) #endif #ifndef BuildXKBuilib @@ -459,13 +446,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXineramaLibrary #define BuildXineramaLibrary (BuildXinerama) #endif -#ifndef BuildDmxDevelTools -#define BuildDmxDevelTools NO -#endif -#ifndef BuildDmxLibrary -#define BuildDmxLibrary (BuildDmx && \ - (!BuildServersOnly || BuildDmxDevelTools)) -#endif #ifndef BuildXCSecurity #define BuildXCSecurity YES #endif @@ -550,8 +530,7 @@ XORGRELSTRING = XorgManVersionString #define BuildXResExt NO #endif #ifndef BuildXResLibrary -#define BuildXResLibrary (BuildXResExt && \ - (!BuildServersOnly || BuildDmxDevelTools)) +#define BuildXResLibrary (BuildXResExt && !BuildServersOnly) #endif #ifndef BuildXvExt #define BuildXvExt NO @@ -616,7 +595,7 @@ XORGRELSTRING = XorgManVersionString #define BuildRender YES #endif #ifndef BuildRenderLibrary -#define BuildRenderLibrary (XdmxServer || !BuildServersOnly) +#define BuildRenderLibrary !BuildServersOnly #endif #ifndef BuildXftLibrary #define BuildXftLibrary BuildRenderLibrary @@ -2516,30 +2495,6 @@ SharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedX ProjectUnsharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) #endif -#if BuildDmxLibrary -#ifndef SharedLibDmx -#define SharedLibDmx NO -#endif -#ifndef NormalLibDmx -#define NormalLibDmx YES -#endif -#ifndef DebugLibDmx -#define DebugLibDmx NO -#endif -#ifndef ProfileLibDmx -#define ProfileLibDmx NO -#endif -#else /* BuildDmxLibrary */ -#undef SharedLibDmx -#define SharedLibDmx NO -#undef NormalLibDmx -#define NormalLibDmx NO -#undef DebugLibDmx -#define DebugLibDmx NO -#undef ProfileLibDmx -#define ProfileLibDmx NO -#endif /* BuildDmxLibrary */ - XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush #if SharedLibXxf86rush #ifndef SharedXxf86rushRev @@ -2590,16 +2545,6 @@ ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir SharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev) #else ProjectUnsharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),XBuildLibDir) -#endif - - DMXLIBSRC = $(LIBSRC)/dmx -#if SharedLibDmx -#ifndef SharedDmxRev -#define SharedDmxRev 1.0 -#endif -SharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) -#else -ProjectUnsharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),XBuildLibDir) #endif DPSLIBSRC = $(LIBSRC)/dps diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 28f0e3ada..4a5f4b21a 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -75,13 +75,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ */ #define XorgServer NO -/* - * To enable building Xdmx, uncomment this. - * -#define XdmxServer YES - */ -#define XdmxServer NO - /* * To disable building Xprt, uncomment this. * diff --git a/nx-X11/config/cf/xf86site.def b/nx-X11/config/cf/xf86site.def index 4cdf0d893..ca429c9b9 100644 --- a/nx-X11/config/cf/xf86site.def +++ b/nx-X11/config/cf/xf86site.def @@ -44,12 +44,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XF86Server NO */ -/* - * To enable building Xdmx, uncomment this. - * -#define XdmxServer YES - */ - /* * To disable building Xprt, uncomment this. * diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def index ad9bfd8c9..ee0c5db98 100644 --- a/nx-X11/config/cf/xorgsite.def +++ b/nx-X11/config/cf/xorgsite.def @@ -44,12 +44,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XorgServer NO */ -/* - * To enable building Xdmx, uncomment this. - * -#define XdmxServer YES - */ - /* * To disable building Xprt, uncomment this. * diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 65c78adcf..269b8bbf7 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -64,9 +64,6 @@ XRESHEADERS = XRes.h XResproto.h #if BuildXevie || BuildXevieLibrary XEVIEHEADERS = Xevie.h Xeviestr.h #endif -#if BuildDmx || BuildDmxLibrary -XDMXHEADERS = dmxext.h dmxproto.h -#endif EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \ @@ -74,7 +71,7 @@ EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(FONTCACHEHEADERS) $(RENDERHEADERS) $(RANDRHEADERS) \ $(XFIXESHEADERS) $(DAMAGEHEADERS) $(COMPOSITEHEADERS) \ $(XEVIEHEADERS) \ - $(XTRAPHEADERS) $(XRESHEADERS) $(XDMXHEADERS) + $(XTRAPHEADERS) $(XRESHEADERS) diff --git a/nx-X11/include/extensions/dmxext.h b/nx-X11/include/extensions/dmxext.h deleted file mode 100644 index c554232e4..000000000 --- a/nx-X11/include/extensions/dmxext.h +++ /dev/null @@ -1,190 +0,0 @@ -/* $XFree86$ */ -/* - * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on 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 (including the - * next paragraph) 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 - * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS - * 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. - */ - -/* - * Authors: - * Rickard E. (Rik) Faith - * - */ - -/** \file - * This file describes the interface to the client-side libdmx.a - * library. All DMX-aware client-side applications should include this - * file. */ - -#ifndef _DMXEXT_H_ -#define _DMXEXT_H_ - -/* These values must be larger than LastExtensionError. - The values in dmxext.h and dmxproto.h *MUST* match. */ -#define DmxBadXinerama 1001 -#define DmxBadValue 1002 -#define DmxBadReply 1003 - -#define DMXScreenWindowWidth (1L<<0) -#define DMXScreenWindowHeight (1L<<1) -#define DMXScreenWindowXoffset (1L<<2) -#define DMXScreenWindowYoffset (1L<<3) -#define DMXRootWindowWidth (1L<<4) -#define DMXRootWindowHeight (1L<<5) -#define DMXRootWindowXoffset (1L<<6) -#define DMXRootWindowYoffset (1L<<7) -#define DMXRootWindowXorigin (1L<<8) -#define DMXRootWindowYorigin (1L<<9) - -#define DMXDesktopWidth (1L<<0) -#define DMXDesktopHeight (1L<<1) -#define DMXDesktopShiftX (1L<<2) -#define DMXDesktopShiftY (1L<<3) - -#define DMXInputType (1L<<0) -#define DMXInputPhysicalScreen (1L<<1) -#define DMXInputSendsCore (1L<<2) - -#ifndef _DMX_SERVER_ - -/** Client-library screen information structure, returned by - * #DMXGetScreenAttributes. */ -typedef struct { - char *displayName; - int logicalScreen; - - unsigned int screenWindowWidth; /* displayName's coordinate system */ - unsigned int screenWindowHeight; /* displayName's coordinate system */ - int screenWindowXoffset; /* displayName's coordinate system */ - int screenWindowYoffset; /* displayName's coordinate system */ - - unsigned int rootWindowWidth; /* screenWindow's coordinate system */ - unsigned int rootWindowHeight; /* screenWindow's coordinate system */ - int rootWindowXoffset; /* screenWindow's coordinate system */ - int rootWindowYoffset; /* screenWindow's coordinate system */ - - int rootWindowXorigin; /* global coordinate system */ - int rootWindowYorigin; /* global coordinate system */ -} DMXScreenAttributes; - -/** Client-library window information structure, returned by - * #DMXGetWindowAttributes. */ -typedef struct { - int screen; - Window window; - XRectangle pos, vis; -} DMXWindowAttributes; - -/** Client-library desktop information structure, returned by - * #DMXGetDesktopAttributes. */ -typedef struct { - unsigned int width; /* global coordinate system */ - unsigned int height; /* global coordinate system */ - int shiftX; /* global coordinate system */ - int shiftY; /* global coordinate system */ -} DMXDesktopAttributes; - -/** Enumeration for the #inputType field in the #DMXInputAttributes - * structure. */ -typedef enum { - DMXLocalInputType, - DMXConsoleInputType, - DMXBackendInputType -} DMXInputEnum; - -/** Client-library input information structure, returned by - * #DMXGetInputAttributes. */ -typedef struct { - DMXInputEnum inputType; - int physicalScreen; - int physicalId; - Bool isCore; - Bool sendsCore; - const char *name; - Bool detached; -} DMXInputAttributes; - -_XFUNCPROTOBEGIN - -extern Bool DMXQueryExtension(Display *dpy, - int *event_basep, int *error_basep); -extern Bool DMXQueryVersion(Display *dpy, int *major_version, - int *minor_version, int *patch_version); -extern Bool DMXSync(Display *dpy); -extern Bool DMXForceWindowCreation(Display *dpy, Window window); - - -extern Bool DMXGetScreenCount(Display *dpy, int *screen_count); -extern Bool DMXGetScreenAttributes(Display *dpy, - int screen, - DMXScreenAttributes *attr); -extern int DMXChangeScreensAttributes(Display *dpy, - int screen_count, - int *screens, - int mask_count, - unsigned int *masks, - DMXScreenAttributes *attr, /* vector */ - int *error_screen); - -extern Bool DMXAddScreen(Display *dpy, - const char *displayName, - unsigned int mask, - DMXScreenAttributes *attr, - int *screen); -extern Bool DMXRemoveScreen(Display *dpy, int screen); - -/* Call DMXGetScreenWindowCount and allocate info to that size. Pass - * the size in available_count. This call can generate a large amount - * of wire traffic and should not be used called with available_count=0 - * just to determine the screen_count value -- use DMXGetScreenCount - * instead. NOTE: Also see DMX protocol specification (DMXSpec.txt) for - * usage of DMXSync to flush pending commands. */ -extern Bool DMXGetWindowAttributes(Display *dpy, Window window, - int *screen_count, int available_count, - DMXWindowAttributes *attr); - -extern Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr); -extern int DMXChangeDesktopAttributes(Display *dpy, - unsigned int mask, - DMXDesktopAttributes *attr); - -extern Bool DMXGetInputCount(Display *dpy, int *input_count); -extern Bool DMXGetInputAttributes(Display *dpy, int id, - DMXInputAttributes *attr); - -extern Bool DMXAddInput(Display *dpy, - unsigned int mask, - DMXInputAttributes *attr, - int *id); -extern Bool DMXRemoveInput(Display *dpy, int id); - -/* These are helper functions that call DMXAddInput. */ -extern Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore, - int *newId); -extern Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore, - int *newId); - -_XFUNCPROTOEND -#endif -#endif diff --git a/nx-X11/include/extensions/dmxproto.h b/nx-X11/include/extensions/dmxproto.h deleted file mode 100644 index b6b11f4d2..000000000 --- a/nx-X11/include/extensions/dmxproto.h +++ /dev/null @@ -1,446 +0,0 @@ -/* $XFree86$ */ -/* - * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on 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 (including the - * next paragraph) 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 - * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS - * 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. - */ - -/* - * Authors: - * Rickard E. (Rik) Faith - * - */ - -/** \file - * This file describes the structures necessary to implement the wire - * protocol for the DMX protocol extension. It should be included only - * in files that implement the client-side (or server-side) part of the - * protocol (i.e., client-side applications should \b not include this - * file). */ - -#ifndef _DMXSTR_H_ -#define _DMXSTR_H_ - -#define DMX_EXTENSION_NAME "DMX" -#define DMX_EXTENSION_MAJOR 2 -#define DMX_EXTENSION_MINOR 2 -#define DMX_EXTENSION_PATCH 20040604 - -/* These values must be larger than LastExtensionError. - The values in dmxext.h and dmxproto.h *MUST* match. */ -#define DMX_BAD_XINERAMA 1001 -#define DMX_BAD_VALUE 1002 - -#define X_DMXQueryVersion 0 -#define X_DMXGetScreenCount 1 -#define X_DMXGetScreenInformationDEPRECATED 2 -#define X_DMXGetWindowAttributes 3 -#define X_DMXGetInputCount 4 -#define X_DMXGetInputAttributes 5 -#define X_DMXForceWindowCreationDEPRECATED 6 -#define X_DMXReconfigureScreenDEPRECATED 7 -#define X_DMXSync 8 -#define X_DMXForceWindowCreation 9 -#define X_DMXGetScreenAttributes 10 -#define X_DMXChangeScreensAttributes 11 -#define X_DMXAddScreen 12 -#define X_DMXRemoveScreen 13 -#define X_DMXGetDesktopAttributes 14 -#define X_DMXChangeDesktopAttributes 15 -#define X_DMXAddInput 16 -#define X_DMXRemoveInput 17 - -/** Wire-level description of DMXQueryVersion protocol request. */ -typedef struct { - CARD8 reqType; /* dmxcode */ - CARD8 dmxReqType; /* X_DMXQueryVersion */ - CARD16 length B16; -} xDMXQueryVersionReq; -#define sz_xDMXQueryVersionReq 4 - -/** Wire-level description of DMXQueryVersion protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 ununsed; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 patchVersion B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; -} xDMXQueryVersionReply; -#define sz_xDMXQueryVersionReply 32 - -/** Wire-level description of DMXSync protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXSync */ - CARD16 length B16; -} xDMXSyncReq; -#define sz_xDMXSyncReq 4 - -/** Wire-level description of DMXSync protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXSyncReply; -#define sz_xDMXSyncReply 32 - -/** Wire-level description of DMXForceWindowCreation protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXForceWindowCreation */ - CARD16 length B16; - CARD32 window B32; -} xDMXForceWindowCreationReq; -#define sz_xDMXForceWindowCreationReq 8 - -/** Wire-level description of DMXForceWindowCreation protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXForceWindowCreationReply; -#define sz_xDMXForceWindowCreationReply 32 - -/** Wire-level description of DMXGetScreenCount protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetScreenCount */ - CARD16 length B16; -} xDMXGetScreenCountReq; -#define sz_xDMXGetScreenCountReq 4 - -/** Wire-level description of DMXGetScreenCount protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 screenCount B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXGetScreenCountReply; -#define sz_xDMXGetScreenCountReply 32 - -/** Wire-level description of DMXGetScreenAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetScreenAttributes */ - CARD16 length B16; - CARD32 physicalScreen B32; -} xDMXGetScreenAttributesReq; -#define sz_xDMXGetScreenAttributesReq 8 - -/** Wire-level description of DMXGetScreenAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 displayNameLength B32; - CARD32 logicalScreen B32; - - CARD16 screenWindowWidth B16; - CARD16 screenWindowHeight B16; - INT16 screenWindowXoffset B16; - INT16 screenWindowYoffset B16; - - CARD16 rootWindowWidth B16; - CARD16 rootWindowHeight B16; - INT16 rootWindowXoffset B16; - INT16 rootWindowYoffset B16; - INT16 rootWindowXorigin B16; - INT16 rootWindowYorigin B16; -} xDMXGetScreenAttributesReply; -#define sz_xDMXGetScreenAttributesReply 36 - -/** Wire-level description of DMXChangeScreensAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */ - CARD16 length B16; - CARD32 screenCount B32; - CARD32 maskCount B32; -} xDMXChangeScreensAttributesReq; -#define sz_xDMXChangeScreensAttributesReq 12 - -/** Wire-level description of DMXChangeScreensAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 errorScreen B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xDMXChangeScreensAttributesReply; -#define sz_xDMXChangeScreensAttributesReply 32 - -/** Wire-level description of DMXAddScreen protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXAddScreen */ - CARD16 length B16; - CARD32 displayNameLength B32; - CARD32 physicalScreen B32; - CARD32 valueMask B32; -} xDMXAddScreenReq; -#define sz_xDMXAddScreenReq 16 - -/** Wire-level description of DMXAddScreen protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 physicalScreen B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xDMXAddScreenReply; -#define sz_xDMXAddScreenReply 32 - -/** Wire-level description of DMXRemoveScreen protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXRemoveScreen */ - CARD16 length B16; - CARD32 physicalScreen B32; -} xDMXRemoveScreenReq; -#define sz_xDMXRemoveScreenReq 8 - -/** Wire-level description of DMXRemoveScreen protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXRemoveScreenReply; -#define sz_xDMXRemoveScreenReply 32 - -/** Wire-level description of DMXGetWindowAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetWindowAttributes */ - CARD16 length B16; - CARD32 window B32; -} xDMXGetWindowAttributesReq; -#define sz_xDMXGetWindowAttributesReq 8 - -/** Wire-level description of DMXGetWindowAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 screenCount B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXGetWindowAttributesReply; -#define sz_xDMXGetWindowAttributesReply 32 - -/** Wire-level description of DMXGetDesktopAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */ - CARD16 length B16; -} xDMXGetDesktopAttributesReq; -#define sz_xDMXGetDesktopAttributesReq 4 - -/** Wire-level description of DMXGetDesktopAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - INT16 width; - INT16 height; - INT16 shiftX; - INT16 shiftY; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xDMXGetDesktopAttributesReply; -#define sz_xDMXGetDesktopAttributesReply 32 - -/** Wire-level description of DMXChangeDesktopAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */ - CARD16 length B16; - CARD32 valueMask B32; -} xDMXChangeDesktopAttributesReq; -#define sz_xDMXChangeDesktopAttributesReq 8 - -/** Wire-level description of DMXChangeDesktopAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXChangeDesktopAttributesReply; -#define sz_xDMXChangeDesktopAttributesReply 32 - -/** Wire-level description of DMXGetInputCount protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetInputCount */ - CARD16 length B16; -} xDMXGetInputCountReq; -#define sz_xDMXGetInputCountReq 4 - -/** Wire-level description of DMXGetInputCount protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 inputCount B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXGetInputCountReply; -#define sz_xDMXGetInputCountReply 32 - -/** Wire-level description of DMXGetInputAttributes protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXGetInputAttributes */ - CARD16 length B16; - CARD32 deviceId B32; -} xDMXGetInputAttributesReq; -#define sz_xDMXGetInputAttributesReq 8 - -/** Wire-level description of DMXGetInputAttributes protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 inputType B32; - CARD32 physicalScreen B32; - CARD32 physicalId B32; - CARD32 nameLength B32; - BOOL isCore; - BOOL sendsCore; - BOOL detached; - CARD8 pad0; - CARD32 pad1 B32; -} xDMXGetInputAttributesReply; -#define sz_xDMXGetInputAttributesReply 32 - -/** Wire-level description of DMXAddInput protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXAddInput */ - CARD16 length B16; - CARD32 displayNameLength B32; - CARD32 valueMask; -} xDMXAddInputReq; -#define sz_xDMXAddInputReq 12 - -/** Wire-level description of DMXAddInput protocol reply. */ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 physicalId B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xDMXAddInputReply; -#define sz_xDMXAddInputReply 32 - -/** Wire-level description of DMXRemoveInput protocol request. */ -typedef struct { - CARD8 reqType; /* DMXCode */ - CARD8 dmxReqType; /* X_DMXRemoveInput */ - CARD16 length B16; - CARD32 physicalId B32; -} xDMXRemoveInputReq; -#define sz_xDMXRemoveInputReq 8 - -/** Wire-level description of DMXRemoveInput protocol reply. */ -typedef struct { - BYTE type; - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDMXRemoveInputReply; -#define sz_xDMXRemoveInputReply 32 - -#endif diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index ca6ce96e7..4e781f59c 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -27,7 +27,7 @@ XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.52 2003/05/27 16:53:15 tsi Exp $ HEADERS = Xlib.h Xresource.h Xutil.h cursorfont.h Xlibint.h \ Xcms.h Xlocale.h XKBlib.h XlibConf.h Xregion.h ImUtil.h -#if BuildServersOnly && !BuildGLXLibrary && !BuildClients && !XdmxServer && !NXAgentServer +#if BuildServersOnly && !BuildGLXLibrary && !BuildClients && !NXAgentServer all:: BuildIncludes($(HEADERS),IncSubdir,..) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index b39b0b985..979a9468c 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -542,9 +542,6 @@ XF86SERVER = XFree86 #if defined(XorgServer) && XorgServer XF86SERVER = Xorg #endif -#if XdmxServer -XDMX = Xdmx -#endif #if defined(NXAgentServer) && NXAgentServer NXAGENT = nxagent #endif @@ -554,7 +551,6 @@ NXWIN = NXWin #if (defined(XF86Server) && XF86Server) || \ (defined(XorgServer) && XorgServer) || \ (defined(NXAgentServer) && NXAgentServer) || \ - (defined(XdmxServer) && XdmxServer) || \ (!MakeDllModules && defined(NXWinServer) && NXWinServer) MakeMutex($(XF86SERVER) $(NXAGENT) $(NXWIN)) #endif @@ -1050,54 +1046,6 @@ Xnon: $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DEPDIRS) #endif /* XnonServer */ -#if defined(XdmxServer) && XdmxServer -XCOMM -XCOMM distribued multihead Server -XCOMM -#ifndef Win32Architecture -XDMXDDXDIR = hw/dmx -#else -XDMXDDXDIR = hw -#endif -FBDIR = fb -FBSUBDIR = fb -MIDAMAGEDIR = miext/damage -SHADOWDIR = miext/shadow -XDMXDIRS = $(STDDIRS) $(XDMXDDXDIR) $(SHADOWDIR) $(DEPDIRS) $(FBDIR) $(MIDAMAGEDIR) -#if BuildGlxExt -#if BuildXinerama -GLXPROXY_EXTRAOBJS = hw/dmx/panoramiX.o -#endif -GLXPROXYLIB = hw/dmx/glxProxy/LibraryTargetName(glxProxy) -#endif -#if !defined(LynxOSArchitecture) && \ - !defined(Win32Architecture) && \ - !defined(QNX4Architecture) -XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS) -#else -XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS) dix/main.o -#endif -XDMX = hw/dmx/LibraryTargetName(dmx) \ - hw/dmx/input/LibraryTargetName(dmxinput) \ - hw/dmx/config/LibraryTargetName(dmxconfig) \ - $(GLXPROXYLIB) -XDMXLIBS = PreFbLibs $(XDMX) MiExtLibs FbPostFbLibs $(XDMX) -#if BuildRender -XDMXRENDERLIB = $(XRENDERLIB) -#endif -XDMXSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XILIB) $(XLIB) $(SYSLIBS) $(XMULIB) $(XDMXRENDERLIB) -#if HasParallelMake -MakeMutex($(XDMXDIRS) $(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS)) -#endif -#if ForceServerRemake -$(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS):: $(XDMXDIRS) - @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi -#endif -ServerTarget(Xdmx,$(XDMXDIRS),$(XDMXOBJS), \ - $(LIBCWRAPPER) $(XDMXLIBS) $(LOADABLEEXTS),$(XDMXSYSLIBS)) -#endif /* XdmxServer */ - - #if defined(NXWinServer) && NXWinServer XCOMM XCOMM X Server for MS Windows @@ -1372,7 +1320,7 @@ MIEXTDIRS = $(SHADOWDIR) $(LAYERDIR) $(ROOTLESSDIR) $(MIDAMAGEDIR) IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR) DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \ $(HPDDXDIR) $(XFREE86DDXDIR) $(DARWINDDXDIR) \ - $(XDMXDDXDIR) $(NXAGENTDDXDIR) $(NXWINDDXDIR) + $(NXAGENTDDXDIR) $(NXWINDDXDIR) SUBDIRS = $(STDDIRS) $(MFBSUBDIR) $(CFBSUBDIRS) \ $(IPLANDIRS) $(ILBMDIR) $(AFBSUBDIR) \ $(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index b75f8913b..6846c2892 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -113,11 +113,6 @@ XF86BIGFOBJS = xf86bigfont.o PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o PNRXINCLUDES = -I$(FONTINCSRC) -I../mi -I../render #endif -#if XdmxServer - DMXSRCS = dmx.c - DMXOBJS = dmx.o - DMXINCLUDES = -I../hw/dmx -#endif #if BuildDPMS DPMSSRCS = dpms.c DPMSOBJS = dpms.o diff --git a/nx-X11/programs/Xserver/Xext/dmx.c b/nx-X11/programs/Xserver/Xext/dmx.c deleted file mode 100644 index 75623e696..000000000 --- a/nx-X11/programs/Xserver/Xext/dmx.c +++ /dev/null @@ -1,1133 +0,0 @@ -/* $XFree86$ */ -/* - * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on 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 (including the - * next paragraph) 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 - * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS - * 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. - */ - -/* - * Authors: - * Rickard E. (Rik) Faith - * - */ - -/** \file - * This file implements the server-side part of the DMX protocol. A - * vector of fucntions is provided at extension initialization time, so - * most all of the useful functions in this file are declared static and - * do not appear in the doxygen documentation. - * - * Much of the low-level work is done by functions in #dmxextension.c - * - * Please see the Client-to-Server DMX Extension to the X Protocol - * document for details about the protocol. */ - -#ifdef HAVE_DMX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "os.h" -#include "dixstruct.h" -#define EXTENSION_PROC_ARGS void * -#include "extnsionst.h" -#include "opaque.h" - -#include "dmxextension.h" -#include - -#define _DMX_SERVER_ -#include - -#ifdef PANORAMIX -#include "panoramiX.h" -extern unsigned long XRT_WINDOW; -extern int PanoramiXNumScreens; -#endif - -extern void DMXExtensionInit(void); - -static unsigned char DMXCode; - -static DISPATCH_PROC(ProcDMXDispatch); -static DISPATCH_PROC(ProcDMXQueryVersion); -static DISPATCH_PROC(ProcDMXSync); -static DISPATCH_PROC(ProcDMXForceWindowCreation); -static DISPATCH_PROC(ProcDMXGetScreenCount); -static DISPATCH_PROC(ProcDMXGetScreenAttributes); -static DISPATCH_PROC(ProcDMXChangeScreensAttributes); -static DISPATCH_PROC(ProcDMXAddScreen); -static DISPATCH_PROC(ProcDMXRemoveScreen); -static DISPATCH_PROC(ProcDMXGetWindowAttributes); -static DISPATCH_PROC(ProcDMXGetDesktopAttributes); -static DISPATCH_PROC(ProcDMXChangeDesktopAttributes); -static DISPATCH_PROC(ProcDMXGetInputCount); -static DISPATCH_PROC(ProcDMXGetInputAttributes); -static DISPATCH_PROC(ProcDMXAddInput); -static DISPATCH_PROC(ProcDMXRemoveInput); - -static DISPATCH_PROC(SProcDMXDispatch); -static DISPATCH_PROC(SProcDMXQueryVersion); -static DISPATCH_PROC(SProcDMXSync); -static DISPATCH_PROC(SProcDMXForceWindowCreation); -static DISPATCH_PROC(SProcDMXGetScreenCount); -static DISPATCH_PROC(SProcDMXGetScreenAttributes); -static DISPATCH_PROC(SProcDMXChangeScreensAttributes); -static DISPATCH_PROC(SProcDMXAddScreen); -static DISPATCH_PROC(SProcDMXRemoveScreen); -static DISPATCH_PROC(SProcDMXGetWindowAttributes); -static DISPATCH_PROC(SProcDMXGetDesktopAttributes); -static DISPATCH_PROC(SProcDMXChangeDesktopAttributes); -static DISPATCH_PROC(SProcDMXGetInputCount); -static DISPATCH_PROC(SProcDMXGetInputAttributes); -static DISPATCH_PROC(SProcDMXAddInput); -static DISPATCH_PROC(SProcDMXRemoveInput); - -static int _DMXXineramaActive(void) -{ -#ifdef PANORAMIX - return !noPanoramiXExtension; -#endif - return 0; -} - -static void DMXResetProc(ExtensionEntry *extEntry) -{ -} - -/** Initialize the extension. */ -void DMXExtensionInit(void) -{ - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension(DMX_EXTENSION_NAME, 0, 0, - ProcDMXDispatch, SProcDMXDispatch, - DMXResetProc, StandardMinorOpcode))) - DMXCode = extEntry->base; -} - -static void dmxSetScreenAttribute(int bit, DMXScreenAttributesPtr attr, - CARD32 value) -{ - switch (1 << bit) { - case DMXScreenWindowWidth: attr->screenWindowWidth = value; break; - case DMXScreenWindowHeight: attr->screenWindowHeight = value; break; - case DMXScreenWindowXoffset: attr->screenWindowXoffset = value; break; - case DMXScreenWindowYoffset: attr->screenWindowYoffset = value; break; - case DMXRootWindowWidth: attr->rootWindowWidth = value; break; - case DMXRootWindowHeight: attr->rootWindowHeight = value; break; - case DMXRootWindowXoffset: attr->rootWindowXoffset = value; break; - case DMXRootWindowYoffset: attr->rootWindowYoffset = value; break; - case DMXRootWindowXorigin: attr->rootWindowXorigin = value; break; - case DMXRootWindowYorigin: attr->rootWindowYorigin = value; break; - } -} - -static int dmxFetchScreenAttributes(unsigned int mask, - DMXScreenAttributesPtr attr, - CARD32 *value_list) -{ - int i; - CARD32 *value = value_list; - int count = 0; - - for (i = 0; i < 32; i++) { - if (mask & (1 << i)) { - dmxSetScreenAttribute(i, attr, *value); - ++value; - ++count; - } - } - return count; -} - -static void dmxSetDesktopAttribute(int bit, DMXDesktopAttributesPtr attr, - CARD32 value) -{ - switch (1 << bit) { - case DMXDesktopWidth: attr->width = value; break; - case DMXDesktopHeight: attr->height = value; break; - case DMXDesktopShiftX: attr->shiftX = value; break; - case DMXDesktopShiftY: attr->shiftY = value; break; - } -} - -static int dmxFetchDesktopAttributes(unsigned int mask, - DMXDesktopAttributesPtr attr, - CARD32 *value_list) -{ - int i; - CARD32 *value = value_list; - int count = 0; - - for (i = 0; i < 32; i++) { - if (mask & (1 << i)) { - dmxSetDesktopAttribute(i, attr, *value); - ++value; - ++count; - } - } - return count; -} - -static void dmxSetInputAttribute(int bit, DMXInputAttributesPtr attr, - CARD32 value) -{ - switch (1 << bit) { - case DMXInputType: attr->inputType = value; break; - case DMXInputPhysicalScreen: attr->physicalScreen = value; break; - case DMXInputSendsCore: attr->sendsCore = !!value; break; - } -} - -static int dmxFetchInputAttributes(unsigned int mask, - DMXInputAttributesPtr attr, - CARD32 *value_list) -{ - int i; - CARD32 *value = value_list; - int count = 0; - - for (i = 0; i < 32; i++) { - if (mask & (1 << i)) { - dmxSetInputAttribute(i, attr, *value); - ++value; - ++count; - } - } - return count; -} - -static int ProcDMXQueryVersion(ClientPtr client) -{ - xDMXQueryVersionReply rep; - int n; - - REQUEST_SIZE_MATCH(xDMXQueryVersionReq); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.majorVersion = DMX_EXTENSION_MAJOR; - rep.minorVersion = DMX_EXTENSION_MINOR; - rep.patchVersion = DMX_EXTENSION_PATCH; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.majorVersion, n); - swapl(&rep.minorVersion, n); - swapl(&rep.patchVersion, n); - } - WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXSync(ClientPtr client) -{ - xDMXSyncReply rep; - int n; - - REQUEST_SIZE_MATCH(xDMXSyncReq); - - dmxFlushPendingSyncs(); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = 0; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXForceWindowCreation(ClientPtr client) -{ - xDMXForceWindowCreationReply rep; - REQUEST(xDMXForceWindowCreationReq); - WindowPtr pWin; - int n; - - REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq); - -#ifdef PANORAMIX - if (!noPanoramiXExtension) { - PanoramiXRes *win; - int i; - - if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW, - SecurityReadAccess))) - return -1; /* BadWindow */ - - FOR_NSCREENS(i) { - if (!(pWin = SecurityLookupWindow(win->info[i].id, client, - SecurityReadAccess))) - return -1; /* BadWindow */ - - dmxForceWindowCreation(pWin); - } - goto doreply; - } -#endif - - if (!(pWin = SecurityLookupWindow(stuff->window, client, - SecurityReadAccess))) - return -1; /* BadWindow */ - - dmxForceWindowCreation(pWin); - doreply: - dmxFlushPendingSyncs(); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = 0; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, sizeof(xDMXForceWindowCreationReply), (char *)&rep); - return Success; -} - -static int ProcDMXGetScreenCount(ClientPtr client) -{ - xDMXGetScreenCountReply rep; - int n; - - REQUEST_SIZE_MATCH(xDMXGetScreenCountReq); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.screenCount = dmxGetNumScreens(); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.screenCount, n); - } - WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXGetScreenAttributes(ClientPtr client) -{ - REQUEST(xDMXGetScreenAttributesReq); - xDMXGetScreenAttributesReply rep; - int n; - int length; - int paddedLength; - DMXScreenAttributesRec attr; - - REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq); - - if (stuff->physicalScreen < 0 - || stuff->physicalScreen >= dmxGetNumScreens()) return BadValue; - - if (!dmxGetScreenAttributes(stuff->physicalScreen, &attr)) - return BadValue; - - rep.logicalScreen = attr.logicalScreen; - rep.screenWindowWidth = attr.screenWindowWidth; - rep.screenWindowHeight = attr.screenWindowHeight; - rep.screenWindowXoffset = attr.screenWindowXoffset; - rep.screenWindowYoffset = attr.screenWindowYoffset; - rep.rootWindowWidth = attr.rootWindowWidth; - rep.rootWindowHeight = attr.rootWindowHeight; - rep.rootWindowXoffset = attr.rootWindowXoffset; - rep.rootWindowYoffset = attr.rootWindowYoffset; - rep.rootWindowXorigin = attr.rootWindowXorigin; - rep.rootWindowYorigin = attr.rootWindowYorigin; - - length = attr.displayName ? strlen(attr.displayName) : 0; - paddedLength = (length + 3) & ~3; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = paddedLength >> 2; - rep.displayNameLength = length; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.displayNameLength, n); - swapl(&rep.logicalScreen, n); - swaps(&rep.screenWindowWidth, n); - swaps(&rep.screenWindowHeight, n); - swaps(&rep.screenWindowXoffset, n); - swaps(&rep.screenWindowYoffset, n); - swaps(&rep.rootWindowWidth, n); - swaps(&rep.rootWindowHeight, n); - swaps(&rep.rootWindowXoffset, n); - swaps(&rep.rootWindowYoffset, n); - swaps(&rep.rootWindowXorigin, n); - swaps(&rep.rootWindowYorigin, n); - } - WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep); - if (length) WriteToClient(client, length, (char *)attr.displayName); - return client->noClientException; -} - -static int ProcDMXChangeScreensAttributes(ClientPtr client) -{ - REQUEST(xDMXChangeScreensAttributesReq); - xDMXChangeScreensAttributesReply rep; - int n; - int status = DMX_BAD_XINERAMA; - unsigned int mask = 0; - unsigned int i; - CARD32 *screen_list; - CARD32 *mask_list; - CARD32 *value_list; - DMXScreenAttributesPtr attribs; - int errorScreen = 0; - unsigned int len; - int ones = 0; - - - REQUEST_AT_LEAST_SIZE(xDMXChangeScreensAttributesReq); - len = client->req_len - (sizeof(xDMXChangeScreensAttributesReq) >> 2); - if (len < stuff->screenCount + stuff->maskCount) - return BadLength; - - screen_list = (CARD32 *)(stuff + 1); - mask_list = &screen_list[stuff->screenCount]; - value_list = &mask_list[stuff->maskCount]; - - for (i = 0; i < stuff->maskCount; i++) ones += Ones(mask_list[i]); - if (len != stuff->screenCount + stuff->maskCount + ones) - return BadLength; - - if (!_DMXXineramaActive()) goto noxinerama; - - if (!(attribs = ALLOCATE_LOCAL(stuff->screenCount * sizeof(*attribs)))) - return BadAlloc; - - for (i = 0; i < stuff->screenCount; i++) { - int count; - - if (i < stuff->maskCount) mask = mask_list[i]; - dmxGetScreenAttributes(screen_list[i], &attribs[i]); - count = dmxFetchScreenAttributes(mask, &attribs[i], value_list); - value_list += count; - } - -#if PANORAMIX - status = dmxConfigureScreenWindows(stuff->screenCount, - screen_list, - attribs, - &errorScreen); -#endif - - DEALLOCATE_LOCAL(attribs); - - if (status == BadValue) return status; - - noxinerama: - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - rep.errorScreen = errorScreen; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - swapl(&rep.errorScreen, n); - } - WriteToClient(client, - sizeof(xDMXChangeScreensAttributesReply), - (char *)&rep); - return client->noClientException; -} - -static int ProcDMXAddScreen(ClientPtr client) -{ - REQUEST(xDMXAddScreenReq); - xDMXAddScreenReply rep; - int n; - int status = 0; - CARD32 *value_list; - DMXScreenAttributesRec attr; - int count; - char *name; - int len; - int paddedLength; - - REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq); - paddedLength = (stuff->displayNameLength + 3) & ~3; - len = client->req_len - (sizeof(xDMXAddScreenReq) >> 2); - if (len != Ones(stuff->valueMask) + paddedLength/4) - return BadLength; - - memset(&attr, 0, sizeof(attr)); - dmxGetScreenAttributes(stuff->physicalScreen, &attr); - value_list = (CARD32 *)(stuff + 1); - count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list); - - if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4))) - return BadAlloc; - memcpy(name, &value_list[count], stuff->displayNameLength); - name[stuff->displayNameLength] = '\0'; - attr.displayName = name; - - status = dmxAttachScreen(stuff->physicalScreen, &attr); - - DEALLOCATE_LOCAL(name); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - rep.physicalScreen = stuff->physicalScreen; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - swapl(&rep.physicalScreen, n); - } - WriteToClient(client, - sizeof(xDMXAddScreenReply), - (char *)&rep); - return client->noClientException; -} - -static int ProcDMXRemoveScreen(ClientPtr client) -{ - REQUEST(xDMXRemoveScreenReq); - xDMXRemoveScreenReply rep; - int n; - int status = 0; - - REQUEST_SIZE_MATCH(xDMXRemoveScreenReq); - - status = dmxDetachScreen(stuff->physicalScreen); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, - sizeof(xDMXRemoveScreenReply), - (char *)&rep); - return client->noClientException; -} - - -#ifdef PANORAMIX -static int dmxPopulatePanoramiX(ClientPtr client, Window window, - CARD32 *screens, CARD32 *windows, - xRectangle *pos, xRectangle *vis) -{ - WindowPtr pWin; - PanoramiXRes *win; - int i; - int count = 0; - DMXWindowAttributesRec attr; - - if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW, - SecurityReadAccess))) - return -1; /* BadWindow */ - - FOR_NSCREENS(i) { - if (!(pWin = SecurityLookupWindow(win->info[i].id, client, - SecurityReadAccess))) - return -1; /* BadWindow */ - if (dmxGetWindowAttributes(pWin, &attr)) { - screens[count] = attr.screen; - windows[count] = attr.window; - pos[count] = attr.pos; - vis[count] = attr.vis; - ++count; /* Only count existing windows */ - } - } - return count; -} -#endif - -static int dmxPopulate(ClientPtr client, Window window, CARD32 *screens, - CARD32 *windows, xRectangle *pos, xRectangle *vis) -{ - WindowPtr pWin; - DMXWindowAttributesRec attr; - -#ifdef PANORAMIX - if (!noPanoramiXExtension) - return dmxPopulatePanoramiX(client, window, screens, windows, - pos, vis); -#endif - - if (!(pWin = SecurityLookupWindow(window, client, SecurityReadAccess))) - return -1; /* BadWindow */ - - dmxGetWindowAttributes(pWin, &attr); - *screens = attr.screen; - *windows = attr.window; - *pos = attr.pos; - *vis = attr.vis; - return 1; -} - -static int dmxMaxNumScreens(void) -{ -#ifdef PANORAMIX - if (!noPanoramiXExtension) return PanoramiXNumScreens; -#endif - return 1; -} - -static int ProcDMXGetWindowAttributes(ClientPtr client) -{ - REQUEST(xDMXGetWindowAttributesReq); - xDMXGetWindowAttributesReply rep; - int i, n; - CARD32 *screens; - CARD32 *windows; - xRectangle *pos, *vis; - int count = dmxMaxNumScreens(); - - REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq); - - if (!(screens = ALLOCATE_LOCAL(count * sizeof(*screens)))) - return BadAlloc; - if (!(windows = ALLOCATE_LOCAL(count * sizeof(*windows)))) { - DEALLOCATE_LOCAL(screens); - return BadAlloc; - } - if (!(pos = ALLOCATE_LOCAL(count * sizeof(*pos)))) { - DEALLOCATE_LOCAL(windows); - DEALLOCATE_LOCAL(screens); - return BadAlloc; - } - if (!(vis = ALLOCATE_LOCAL(count * sizeof(*vis)))) { - DEALLOCATE_LOCAL(pos); - DEALLOCATE_LOCAL(windows); - DEALLOCATE_LOCAL(screens); - return BadAlloc; - } - - if ((count = dmxPopulate(client, stuff->window, screens, windows, - pos, vis)) < 0) { - DEALLOCATE_LOCAL(vis); - DEALLOCATE_LOCAL(pos); - DEALLOCATE_LOCAL(windows); - DEALLOCATE_LOCAL(screens); - return BadWindow; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = count * 6; - rep.screenCount = count; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.screenCount, n); - for (i = 0; i < count; i++) { - swapl(&screens[i], n); - swapl(&windows[i], n); - - swaps(&pos[i].x, n); - swaps(&pos[i].y, n); - swaps(&pos[i].width, n); - swaps(&pos[i].height, n); - - swaps(&vis[i].x, n); - swaps(&vis[i].y, n); - swaps(&vis[i].width, n); - swaps(&vis[i].height, n); - } - } - - dmxFlushPendingSyncs(); - - WriteToClient(client, sizeof(xDMXGetWindowAttributesReply), (char *)&rep); - if (count) { - WriteToClient(client, count * sizeof(*screens), (char *)screens); - WriteToClient(client, count * sizeof(*windows), (char *)windows); - WriteToClient(client, count * sizeof(*pos), (char *)pos); - WriteToClient(client, count * sizeof(*vis), (char *)vis); - } - - DEALLOCATE_LOCAL(vis); - DEALLOCATE_LOCAL(pos); - DEALLOCATE_LOCAL(windows); - DEALLOCATE_LOCAL(screens); - - return client->noClientException; -} - -static int ProcDMXGetDesktopAttributes(ClientPtr client) -{ - xDMXGetDesktopAttributesReply rep; - int n; - DMXDesktopAttributesRec attr; - - REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq); - - dmxGetDesktopAttributes(&attr); - - rep.width = attr.width; - rep.height = attr.height; - rep.shiftX = attr.shiftX; - rep.shiftY = attr.shiftY; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.width, n); - swapl(&rep.height, n); - swapl(&rep.shiftX, n); - swapl(&rep.shiftY, n); - } - WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXChangeDesktopAttributes(ClientPtr client) -{ - REQUEST(xDMXChangeDesktopAttributesReq); - xDMXChangeDesktopAttributesReply rep; - int n; - int status = DMX_BAD_XINERAMA; - CARD32 *value_list; - DMXDesktopAttributesRec attr; - int len; - - REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq); - len = client->req_len - (sizeof(xDMXChangeDesktopAttributesReq) >> 2); - if (len != Ones(stuff->valueMask)) - return BadLength; - - if (!_DMXXineramaActive()) goto noxinerama; - - value_list = (CARD32 *)(stuff + 1); - - dmxGetDesktopAttributes(&attr); - dmxFetchDesktopAttributes(stuff->valueMask, &attr, value_list); - -#if PANORAMIX - status = dmxConfigureDesktop(&attr); -#endif - if (status == BadValue) return status; - - noxinerama: - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, - sizeof(xDMXChangeDesktopAttributesReply), - (char *)&rep); - return client->noClientException; -} - -static int ProcDMXGetInputCount(ClientPtr client) -{ - xDMXGetInputCountReply rep; - int n; - - REQUEST_SIZE_MATCH(xDMXGetInputCountReq); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.inputCount = dmxGetInputCount(); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.inputCount, n); - } - WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXGetInputAttributes(ClientPtr client) -{ - REQUEST(xDMXGetInputAttributesReq); - xDMXGetInputAttributesReply rep; - int n; - int length; - int paddedLength; - DMXInputAttributesRec attr; - - REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq); - - if (dmxGetInputAttributes(stuff->deviceId, &attr)) return BadValue; - rep.inputType = attr.inputType; - rep.physicalScreen = attr.physicalScreen; - rep.physicalId = attr.physicalId; - rep.isCore = attr.isCore; - rep.sendsCore = attr.sendsCore; - rep.detached = attr.detached; - - length = attr.name ? strlen(attr.name) : 0; - paddedLength = (length + 3) & ~3; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = paddedLength >> 2; - rep.nameLength = length; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.inputType, n); - swapl(&rep.physicalScreen, n); - swapl(&rep.physicalId, n); - swapl(&rep.nameLength, n); - } - WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep); - if (length) WriteToClient(client, length, (char *)attr.name); - return client->noClientException; -} - -static int ProcDMXAddInput(ClientPtr client) -{ - REQUEST(xDMXAddInputReq); - xDMXAddInputReply rep; - int n; - int status = 0; - CARD32 *value_list; - DMXInputAttributesRec attr; - int count; - char *name; - int len; - int paddedLength; - int id = -1; - - REQUEST_AT_LEAST_SIZE(xDMXAddInputReq); - paddedLength = (stuff->displayNameLength + 3) & ~3; - len = client->req_len - (sizeof(xDMXAddInputReq) >> 2); - if (len != Ones(stuff->valueMask) + paddedLength/4) - return BadLength; - - memset(&attr, 0, sizeof(attr)); - value_list = (CARD32 *)(stuff + 1); - count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list); - - if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4))) - return BadAlloc; - memcpy(name, &value_list[count], stuff->displayNameLength); - name[stuff->displayNameLength] = '\0'; - attr.name = name; - - status = dmxAddInput(&attr, &id); - - DEALLOCATE_LOCAL(name); - - if (status) return status; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - rep.physicalId = id; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - swapl(&rep.physicalId, n); - } - WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXRemoveInput(ClientPtr client) -{ - REQUEST(xDMXRemoveInputReq); - xDMXRemoveInputReply rep; - int n; - int status = 0; - - REQUEST_SIZE_MATCH(xDMXRemoveInputReq); - - status = dmxRemoveInput(stuff->physicalId); - - if (status) return status; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep); - return client->noClientException; -} - -static int ProcDMXDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) { - case X_DMXQueryVersion: return ProcDMXQueryVersion(client); - case X_DMXSync: return ProcDMXSync(client); - case X_DMXForceWindowCreation: return ProcDMXForceWindowCreation(client); - case X_DMXGetScreenCount: return ProcDMXGetScreenCount(client); - case X_DMXGetScreenAttributes: return ProcDMXGetScreenAttributes(client); - case X_DMXChangeScreensAttributes: - return ProcDMXChangeScreensAttributes(client); - case X_DMXAddScreen: return ProcDMXAddScreen(client); - case X_DMXRemoveScreen: return ProcDMXRemoveScreen(client); - case X_DMXGetWindowAttributes: return ProcDMXGetWindowAttributes(client); - case X_DMXGetDesktopAttributes: return ProcDMXGetDesktopAttributes(client); - case X_DMXChangeDesktopAttributes: - return ProcDMXChangeDesktopAttributes(client); - case X_DMXGetInputCount: return ProcDMXGetInputCount(client); - case X_DMXGetInputAttributes: return ProcDMXGetInputAttributes(client); - case X_DMXAddInput: return ProcDMXAddInput(client); - case X_DMXRemoveInput: return ProcDMXRemoveInput(client); - - case X_DMXGetScreenInformationDEPRECATED: - case X_DMXForceWindowCreationDEPRECATED: - case X_DMXReconfigureScreenDEPRECATED: - return BadImplementation; - - default: return BadRequest; - } -} - -static int SProcDMXQueryVersion(ClientPtr client) -{ - int n; - REQUEST(xDMXQueryVersionReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXQueryVersionReq); - return ProcDMXQueryVersion(client); -} - -static int SProcDMXSync(ClientPtr client) -{ - int n; - REQUEST(xDMXSyncReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXSyncReq); - return ProcDMXSync(client); -} - -static int SProcDMXForceWindowCreation(ClientPtr client) -{ - int n; - REQUEST(xDMXForceWindowCreationReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq); - swaps(&stuff->window, n); - return ProcDMXForceWindowCreation(client); -} - -static int SProcDMXGetScreenCount(ClientPtr client) -{ - int n; - REQUEST(xDMXGetScreenCountReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetScreenCountReq); - return ProcDMXGetScreenCount(client); -} - -static int SProcDMXGetScreenAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXGetScreenAttributesReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq); - swapl(&stuff->physicalScreen, n); - return ProcDMXGetScreenAttributes(client); -} - -static int SProcDMXChangeScreensAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXChangeScreensAttributesReq); - - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq); - swapl(&stuff->screenCount, n); - swapl(&stuff->maskCount, n); - SwapRestL(stuff); - return ProcDMXGetScreenAttributes(client); -} - -static int SProcDMXAddScreen(ClientPtr client) -{ - int n; - int paddedLength; - REQUEST(xDMXAddScreenReq); - - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq); - swapl(&stuff->displayNameLength, n); - swapl(&stuff->valueMask, n); - paddedLength = (stuff->displayNameLength + 3) & ~3; - SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4); - return ProcDMXAddScreen(client); -} - -static int SProcDMXRemoveScreen(ClientPtr client) -{ - int n; - REQUEST(xDMXRemoveScreenReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXRemoveScreenReq); - swapl(&stuff->physicalScreen, n); - return ProcDMXRemoveScreen(client); -} - -static int SProcDMXGetWindowAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXGetWindowAttributesReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq); - swapl(&stuff->window, n); - return ProcDMXGetWindowAttributes(client); -} - -static int SProcDMXGetDesktopAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXGetDesktopAttributesReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq); - return ProcDMXGetDesktopAttributes(client); -} - -static int SProcDMXChangeDesktopAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXChangeDesktopAttributesReq); - - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq); - swapl(&stuff->valueMask, n); - SwapRestL(stuff); - return ProcDMXChangeDesktopAttributes(client); -} - -static int SProcDMXGetInputCount(ClientPtr client) -{ - int n; - REQUEST(xDMXGetInputCountReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetInputCountReq); - return ProcDMXGetInputCount(client); -} - -static int SProcDMXGetInputAttributes(ClientPtr client) -{ - int n; - REQUEST(xDMXGetInputAttributesReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq); - swapl(&stuff->deviceId, n); - return ProcDMXGetInputAttributes(client); -} - -static int SProcDMXAddInput(ClientPtr client) -{ - int n; - int paddedLength; - REQUEST(xDMXAddInputReq); - - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xDMXAddInputReq); - swapl(&stuff->displayNameLength, n); - swapl(&stuff->valueMask, n); - paddedLength = (stuff->displayNameLength + 3) & ~3; - SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4); - return ProcDMXAddInput(client); -} - -static int SProcDMXRemoveInput(ClientPtr client) -{ - int n; - REQUEST(xDMXRemoveInputReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xDMXRemoveInputReq); - swapl(&stuff->physicalId, n); - return ProcDMXRemoveInput(client); -} - -static int SProcDMXDispatch (ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) { - case X_DMXQueryVersion: return SProcDMXQueryVersion(client); - case X_DMXSync: return SProcDMXSync(client); - case X_DMXForceWindowCreation: return SProcDMXForceWindowCreation(client); - case X_DMXGetScreenCount: return SProcDMXGetScreenCount(client); - case X_DMXGetScreenAttributes: return SProcDMXGetScreenAttributes(client); - case X_DMXChangeScreensAttributes: - return SProcDMXChangeScreensAttributes(client); - case X_DMXAddScreen: return SProcDMXAddScreen(client); - case X_DMXRemoveScreen: return SProcDMXRemoveScreen(client); - case X_DMXGetWindowAttributes: return SProcDMXGetWindowAttributes(client); - case X_DMXGetDesktopAttributes: - return SProcDMXGetDesktopAttributes(client); - case X_DMXChangeDesktopAttributes: - return SProcDMXChangeDesktopAttributes(client); - case X_DMXGetInputCount: return SProcDMXGetInputCount(client); - case X_DMXGetInputAttributes: return SProcDMXGetInputAttributes(client); - case X_DMXAddInput: return SProcDMXAddInput(client); - case X_DMXRemoveInput: return SProcDMXRemoveInput(client); - - case X_DMXGetScreenInformationDEPRECATED: - case X_DMXForceWindowCreationDEPRECATED: - case X_DMXReconfigureScreenDEPRECATED: - return BadImplementation; - - default: return BadRequest; - } -} diff --git a/nx-X11/programs/Xserver/hw/Imakefile b/nx-X11/programs/Xserver/hw/Imakefile deleted file mode 100644 index e01dca4d9..000000000 --- a/nx-X11/programs/Xserver/hw/Imakefile +++ /dev/null @@ -1,18 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ -XCOMM This is only used on NT where we do not know how to jump over this dir - -#ifdef Win32Architecture - -#define IHaveSubdirs -#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" - -#if XdmxServer -XDMXDIR = dmx -#endif - -SUBDIRS= $(XDMXDIR) - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) - -#endif diff --git a/nx-libs.spec b/nx-libs.spec index 7c594cc20..ad9a09b5f 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -952,7 +952,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_includedir}/nx/X11/extensions/Xevie.h %{_includedir}/nx/X11/extensions/Xinerama.h %{_includedir}/nx/X11/extensions/Xrandr.h -%{_includedir}/nx/X11/extensions/dmxext.h %{_includedir}/nx/X11/extensions/lbxbuf.h %{_includedir}/nx/X11/extensions/lbxbufstr.h %{_includedir}/nx/X11/extensions/lbxdeltastr.h @@ -1017,7 +1016,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_includedir}/nx/X11/extensions/compositeproto.h %{_includedir}/nx/X11/extensions/damageproto.h %{_includedir}/nx/X11/extensions/damagewire.h -%{_includedir}/nx/X11/extensions/dmxproto.h %{_includedir}/nx/X11/extensions/panoramiXproto.h %{_includedir}/nx/X11/extensions/randr.h %{_includedir}/nx/X11/extensions/randrproto.h -- cgit v1.2.3 From f5f280417cb0af489406c8c3234e4ad69b008c74 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 4 Mar 2015 13:29:02 +0100 Subject: imake cleanup: Drop all references to XprtServer and BuildXprint*. --- debian/rules | 1 - nx-X11/config/cf/README | 8 - nx-X11/config/cf/X11.tmpl | 35 +- nx-X11/config/cf/host.def | 17 - nx-X11/config/cf/xf86site.def | 6 - nx-X11/config/cf/xfree86.cf | 4 - nx-X11/config/cf/xorgsite.def | 6 - nx-X11/include/extensions/Imakefile | 1 - nx-X11/include/extensions/Print.h | 552 ------ nx-X11/include/extensions/Printstr.h | 783 -------- nx-X11/lib/Imakefile | 6 +- nx-X11/programs/Imakefile | 7 - nx-X11/programs/Xserver/Imakefile | 76 - nx-X11/programs/Xserver/Xext/Imakefile | 11 +- nx-X11/programs/Xserver/Xext/xprint.c | 2760 -------------------------- nx-X11/programs/Xserver/dix/Imakefile | 6 +- nx-X11/programs/Xserver/dix/main.c | 9 - nx-X11/programs/Xserver/dix/xpstubs.c | 27 - nx-X11/programs/Xserver/hw/nxagent/Imakefile | 3 + nx-X11/programs/Xserver/mi/miinitext.c | 45 - nx-X11/programs/Xserver/os/Imakefile | 2 +- nx-X11/programs/Xserver/os/utils.c | 13 - nx-libs.spec | 2 - 23 files changed, 12 insertions(+), 4368 deletions(-) delete mode 100644 nx-X11/include/extensions/Print.h delete mode 100644 nx-X11/include/extensions/Printstr.h delete mode 100644 nx-X11/programs/Xserver/Xext/xprint.c (limited to 'debian') diff --git a/debian/rules b/debian/rules index d3532b36b..445f015cf 100755 --- a/debian/rules +++ b/debian/rules @@ -48,7 +48,6 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XK*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/*Xv*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xtrap*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/Print*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XRes*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/record*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmode.h diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 051d58748..e1b65a378 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -325,14 +325,6 @@ X11.tmpl provides defaults for the following variables: XdmDir directory in which to install xdm files XdmServersType type of xdm Xservers file to install XinitDir directory in which to install xinit files - XPrintDir parent of X Print server config directory - XprtServer build the X Print server - XpRasterDDX include the raster print ddx driver - XpColorPclDDX include the color PCL print ddx driver - XpMonoPclDDX include the monochrome PCL print ddx driver - XpPostScriptDDX include the PostScript print ddx driver - XpPdfDDX include the PDF print ddx driver - XpSvgDDX include the SVG print ddx driver XmanLocalSearchPath non-standard path for man pages XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit ' XtWarningPrefix leading text in XtWarning()msg, same as above diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 09dbc8f70..71a5d26e7 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -373,8 +373,7 @@ XORGRELSTRING = XorgManVersionString #if (!defined(XF86Server) || !XF86Server) && (!defined (XorgServer) || !XorgServer) #define BuildFontLib (BuildLibraries || BuildServer) #else -#define BuildFontLib (BuildLibraries || \ - (BuildServer && !DoLoadableServer) || XprtServer) +#define BuildFontLib (BuildLibraries || (BuildServer && !DoLoadableServer)) #endif #endif #ifndef BuildFontCache @@ -486,19 +485,6 @@ XORGRELSTRING = XorgManVersionString #define XpSvgDDX YES #endif -#ifndef BuildXprint -#define BuildXprint YES -#endif -#ifndef XprtServer -#define XprtServer (BuildServer && BuildXprint) -#endif -#ifndef BuildXprintLib -#define BuildXprintLib (!BuildServersOnly && BuildXprint) -#endif -#ifndef BuildXprintClients -#define BuildXprintClients BuildXprintLib -#endif - #ifndef BuildScreenSaverExt #define BuildScreenSaverExt NO #endif @@ -978,17 +964,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #ifndef PrintOnlyServer #define PrintOnlyServer YES #endif -#ifndef XprintDefines -#if BuildXprint -#if PrintOnlyServer -#define XprintDefines -DXPRINT -DPIXPRIV -#else -#define XprintDefines -DXPRINT -DLOADABLEPRINTDDX -DPIXPRIV -#endif -#else -#define XprintDefines /**/ -#endif -#endif #ifndef XkbDefines #if BuildXKB #define XkbDefines -DXKB @@ -1221,7 +1196,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN ShapeDefines XInputDefines XkbDefines LbxDefines AppgroupDefines \ XCSecurityDefines CupDefines PervasiveDBEDefines \ XF86BigfontExtensionDefines DPMSDefines \ - XprintDefines XineramaDefines \ + XineramaDefines \ SitePervasiveExtensionDefines RenderDefines RandRDefines \ XfixesDefines XDamageDefines CompositeDefines XevieDefines \ RootlessDefines @@ -1522,9 +1497,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #ifndef ServerConfigDir #define ServerConfigDir $(LIBDIR)/xserver #endif -#ifndef XPrintDir -#define XPrintDir ServerConfigDir -#endif #ifndef EtcX11Directory #define EtcX11Directory /etc/X11 #endif @@ -1657,7 +1629,6 @@ XCOMM X Window System make variables; these need to be coordinated with rules XLOCALEDIR = XLocaleDir /* locale files */ LBXPROXYDIR = LbxproxyDir /* lbxproxy files */ PROXYMANAGERDIR = ProxyManagerDir /* proxy manager config files */ - XPRINTDIR = XPrintDir /* print config file root */ XAPPLOADDIR = XAppLoadDir /* application default resource dir */ FONTCFLAGS = FontCompilerFlags @@ -2908,7 +2879,7 @@ UnsharedLibReferences(XA,NX_Xa,$(XALIBSRC)) #endif #ifndef BuildXaw -#define BuildXaw (BuildXprintLib && !BuildServersOnly) +#define BuildXaw !BuildServersOnly #endif /* AWIDGETSRC is needed by libXaw6 and libXaw7 */ diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 4a5f4b21a..cae87f153 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -75,21 +75,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ */ #define XorgServer NO -/* - * To disable building Xprt, uncomment this. - * -#define XprtServer NO - */ -#define XprtServer NO - -/* - * Xprint is needed by Xprt. You can disable it if - * you are not going to build Xprt. - * -#define BuildXprint NO - */ -#define BuildXprint NO - /* * Building libraries with NX enhancements is disabled * by default. You should enable this in your host.def. @@ -949,8 +934,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildServersOnly YES #define DefaultFontPath /usr/NX/share/fonts/misc/,/usr/NX/share/fonts/TTF/ #define DefaultRGBDatabase /usr/NX/share/rgb -#define XprtServer NO -#define BuildXprint NO #define BuildFontServer NO #define BuildFreeType NO #define BuildXTrueType NO diff --git a/nx-X11/config/cf/xf86site.def b/nx-X11/config/cf/xf86site.def index ca429c9b9..db89ffe4c 100644 --- a/nx-X11/config/cf/xf86site.def +++ b/nx-X11/config/cf/xf86site.def @@ -44,12 +44,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XF86Server NO */ -/* - * To disable building Xprt, uncomment this. - * -#define XprtServer NO - */ - /* * Set the default server (ie the one that gets the sym-link to "X") * diff --git a/nx-X11/config/cf/xfree86.cf b/nx-X11/config/cf/xfree86.cf index ea82a9d22..5832096ec 100644 --- a/nx-X11/config/cf/xfree86.cf +++ b/nx-X11/config/cf/xfree86.cf @@ -1876,10 +1876,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # define UseServerLock YES #endif -#ifndef XprtServer -# define XprtServer YES -#endif - #ifndef ServerExtraDefines # define ServerExtraDefines XFree86ServerDefines #endif diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def index ee0c5db98..6083ce5b3 100644 --- a/nx-X11/config/cf/xorgsite.def +++ b/nx-X11/config/cf/xorgsite.def @@ -44,12 +44,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XorgServer NO */ -/* - * To disable building Xprt, uncomment this. - * -#define XprtServer NO - */ - /* * Set the default server (ie the one that gets the sym-link to "X") * diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 269b8bbf7..63b9365dc 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -92,7 +92,6 @@ HEADERS = Xext.h \ security.h securstr.h \ shape.h shapestr.h \ sync.h syncstr.h \ - Print.h Printstr.h \ Xcup.h Xcupstr.h \ dpms.h dpmsstr.h \ XEVI.h XEVIstr.h diff --git a/nx-X11/include/extensions/Print.h b/nx-X11/include/extensions/Print.h deleted file mode 100644 index 2d45082c5..000000000 --- a/nx-X11/include/extensions/Print.h +++ /dev/null @@ -1,552 +0,0 @@ -/* $Xorg: Print.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/****************************************************************************** - ****************************************************************************** - ** - ** File: Print.h - ** - ** Description: Definitions needed by the server, library, and - ** clients. Subportion restricted to library and - ** clients. - ** - ** Server, Library, Client portion has: - ** o All sz_* defines - ** o Revision and Name defines - ** o Common defines and constants (e.g. Keywords, Masks) - ** o Extension version structure - ** - ** Library and client subportion has: - ** o Convience Marcos - ** o Client side data structures - ** o Client side event structures (non wire) - ** o Library function prototypes - ** o some private stuff denoted with _whatever - ** - ** Printstr.h for server and library, but NOT clients. - ** - ****************************************************************************** - ** - ** (c) Copyright 1996 Hewlett-Packard Company - ** (c) Copyright 1996 International Business Machines Corp. - ** (c) Copyright 1996 Sun Microsystems, Inc. - ** (c) Copyright 1996 Novell, Inc. - ** (c) Copyright 1996 Digital Equipment Corp. - ** (c) Copyright 1996 Fujitsu Limited - ** (c) Copyright 1996 Hitachi, Ltd. - ** - ** 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 - ** COPYRIGHT HOLDERS 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 names of the copyright holders shall - ** not be used in advertising or otherwise to promote the sale, use or other - ** dealings in this Software without prior written authorization from said - ** copyright holders. - ** - ****************************************************************************** - *****************************************************************************/ -/* $XFree86: xc/include/extensions/Print.h,v 1.4 2000/01/25 18:37:31 dawes Exp $ */ - -#ifndef _XpPrint_H_ -#define _XpPrint_H_ - -#ifndef _XP_PRINT_SERVER_ -#include -#include -#include -#endif /* _XP_PRINT_SERVER_ */ - -#include - -_XFUNCPROTOBEGIN - -/****************************************************************************** - * - * Definitions used by the server, library and client. - */ - -/******************************************************************** - * - * Naming and versioning information. - */ -#define XP_PRINTNAME "XpExtension" - -/* - * Add a define below for each major extension release. - */ -#define XP_DONT_CHECK 0 -#define XP_INITIAL_RELEASE 1 - -/* - * For each single entry above, create one major/minor pair. - */ -#define XP_PROTO_MAJOR 1 -#define XP_PROTO_MINOR 0 - -/* - * Identify current version. - */ -#define XP_MAJOR_VERSION XP_PROTO_MAJOR -#define XP_MINOR_VERSION XP_PROTO_MINOR - -/* - * Misc version defines. - */ -#define XP_ABSENT 0 /* Prior to XP Print support */ -#define XP_PRESENT 1 /* With XP Print support */ - -/******************************************************************** - * - * Xp Print Error codes. - */ -#define XP_ERRORS 3 /* number of error types */ - -#define XPBadContext 0 /* Print Context invalid or missing */ -#define XPBadSequence 1 /* Illegal sequence of XP operations */ -#define XPBadResourceID 2 /* X-resource not valid */ - -/******************************************************************** - * - * Xp Print Event masks and codes. - * - */ -#define XP_EVENTS 2 /* number of event types */ - -#define XPNoEventMask 0 /* not an event - just a null mask */ -#define XPPrintMask (1L<<0) -#define XPAttributeMask (1L<<1) - -#define XPPrintNotify 0 /* contains "detail" - see below */ -#define XPAttributeNotify 1 /* contains "detail" - see below */ - -#define XPStartJobNotify 0 /* value for "detail" in XPPrintNotify*/ -#define XPEndJobNotify 1 -#define XPStartDocNotify 2 -#define XPEndDocNotify 3 -#define XPStartPageNotify 4 -#define XPEndPageNotify 5 - -/******************************************************************** - * - * Xp Print Attribute Object codes (subset of ISO DPA 10175). The - * Xp Server can get and set any of the values, while the Xp Library - * may only be able to set a subset of the attribute objects. - * - * note: the codes are also used as "detail" for XPAttributeNotify - * - * note: XPPageAttr is not defined in ISO DPA 10175. It is unique - * to Xp, and its attributes are a proper subset of XPDocAttr. - */ -typedef unsigned char XPAttributes; /* type of Xp*Attr codes */ - -#define XP_ATTRIBUTES 5 /* those attrs currently supported */ - -#define XPJobAttr 1 /* get/set */ -#define XPDocAttr 2 /* get/set */ -#define XPPageAttr 3 /* get/set - subset of XPDocAttr */ -#define XPPrinterAttr 4 /* get only (library) */ -#define XPServerAttr 5 /* get only (library), no - context needed */ - -/* - * note: ISO DPA 10175 defines a number of "attribute objects", of - * which POSIX 1387.4 and the SI Xp will only support a - * subset. - */ -#define XPMediumAttr 6 /* DPA-Object Medium */ -#define XPFontAttr 7 /* DPA-Object Font */ -#define XPResAttr 8 /* DPA-Object Resource */ -#define XPTransAttr 9 /* DPA-Object Transfer method */ -#define XPDelAttr 10 /* DPA-Object Delivery method */ -#define XPAuxSPkg 11 /* DPA-Object Auxiliary sheet package */ -#define XPAuxS 12 /* DPA-Object Auxiliary sheet */ -#define XPFinishAttr 13 /* DPA-Object Finishing */ -#define XPOutputAttr 14 /* DPA-Object Output method */ -#define XPImpAttr 15 /* DPA-Object Imposition */ -#define XPSchedAttr 16 /* DPA-Object Scheduler */ -#define XPIntJobAttr 17 /* DPA-Object Initial value job */ -#define XPIntDocAttr 18 /* DPA-Object Initial value document */ -#define XPResConAttr 19 /* DPA-Object Resource context */ - - -/* - * Replacement rules for XpSetAttributes - */ -typedef unsigned char XPAttrReplacement; -#define XPAttrReplace 1 -#define XPAttrMerge 2 - - -/* - * Return codes for XpGetDocumentData - */ -typedef unsigned char XPGetDocStatus; -#define XPGetDocFinished 0 /* normal termination */ -#define XPGetDocSecondConsumer 1 /* setup error */ -#define XPGetDocError 2 /* runtime error, see generated error */ - - -/* - * Save data types for XpStartJob. - */ -typedef unsigned char XPSaveData; -#define XPSpool 1 /* Job data sent to spooler */ -#define XPGetData 2 /* Job data via XpGetDocumentData */ - - -/* - * Document types for XpStartDoc. - */ -typedef unsigned char XPDocumentType; -#define XPDocNormal 1 /* Doc data handled by Xserver */ -#define XPDocRaw 2 /* Doc data passed through Xserver */ - - -/******************************************************************** - * - * Xp Print Property Names - */ - - -#ifndef _XP_PRINT_SERVER_ - -/****************************************************************************** - * - * Definitions used by the library and clients only. - */ - -/******************************************************************* - * - * General API defines and such. - */ - -/* - * Print Context for XpInitContext and related calls. - */ -typedef XID XPContext; - -/* - * Struct for XpGetPrinterList. - */ -typedef struct { - char *name; /* name */ - char *desc; /* localized description */ -} XPPrinterRec, *XPPrinterList; - -/* - * Typedefs for XpGetDocumentData - */ -typedef void (*XPSaveProc)( Display *display, - XPContext context, - unsigned char *data, - unsigned int data_len, - XPointer client_data); - -typedef void (*XPFinishProc)( Display *display, - XPContext context, - XPGetDocStatus status, - XPointer client_data); - -/* - * Typedefs for XpSetLocaleHinter and XpGetLocaleHinter - */ -typedef char * (*XPHinterProc)(void); - -#if 0 -/******************************************************************* - * - * Extension version structures. - * - **** this structure is now defined localy in the one file that uses it - **** in order to avoid clashes with its definition in XI.h - */ -typedef struct { - int present; - short major_version; - short minor_version; -} XExtensionVersion; -#endif - -/******************************************************************** - * - * Event structs for clients. - * - * note: these events are relative to a print context, and - * not to a window as in core X. - */ -typedef struct { - int type; /* base + XPPrintNotify */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if from a SendEvent request */ - Display *display; /* Display the event was read from */ - XPContext context; /* print context where operation was requested */ - Bool cancel; /* was detailed event canceled */ - int detail; /* XPStartJobNotify, XPEndJobNotify, - XPStartDocNotify, XPEndDocNotify, - XPStartPageNotify, XPEndPageNotify */ -} XPPrintEvent; - -typedef struct { - int type; /* base + XPAttributeNotify */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if from a SendEvent request */ - Display *display; /* Display the event was read from */ - XPContext context; /* print context where operation was requested */ - int detail; /* XPJobAttr, XPDocAttr, XPPageAttr, - XPPrinterAttr, XPSpoolerAttr, - XPMediumAttr, XPServerAttr */ -} XPAttributeEvent; - -typedef struct { - int type; /* base + XPDataReadyNotify */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if from a SendEvent request */ - Display *display; /* Display the event was read from */ - XPContext context; /* print context where operation was requested */ - unsigned long available; /* bytes available for retrieval */ -} XPDataReadyEvent; - - -/********************************************************** - * - * Function prototypes for library side. - */ - -extern XPContext XpCreateContext ( - Display *display, - char *printer_name -); - -extern void XpSetContext ( - Display *display, - XPContext print_context -); - -extern XPContext XpGetContext ( - Display *display -); - -extern void XpDestroyContext ( - Display *display, - XPContext print_context -); - -extern Screen *XpGetScreenOfContext ( - Display *display, - XPContext print_context -); - -extern Status XpGetPageDimensions ( - Display *display, - XPContext print_context, - unsigned short *width, /* return value */ - unsigned short *height, /* return value */ - XRectangle *reproducible_area /* return value */ -); - -extern void XpStartJob ( - Display *display, - XPSaveData save_data -); - -extern void XpEndJob ( - Display *display -); - -extern void XpCancelJob ( - Display *display, - Bool discard -); - -extern void XpStartDoc ( - Display *display, - XPDocumentType type -); - -extern void XpEndDoc ( - Display *display -); - -extern void XpCancelDoc ( - Display *display, - Bool discard -); - -extern void XpPutDocumentData ( - Display *display, - Drawable drawable, - unsigned char *data, - int data_len, - char *doc_fmt, - char *options -); - -extern Status XpGetDocumentData ( - Display *display, - XPContext context, - XPSaveProc save_proc, - XPFinishProc finish_proc, - XPointer client_data -); - -extern void XpStartPage ( - Display *display, - Window window -); - -extern void XpEndPage ( - Display *display -); - -extern void XpCancelPage ( - Display *display, - Bool discard -); - -extern void XpSelectInput ( - Display *display, - XPContext print_context, - unsigned long event_mask -); - -extern unsigned long XpInputSelected ( - Display *display, - XPContext print_context, - unsigned long *all_events_mask -); - -extern Bool XpSetImageResolution ( - Display *display, - XPContext print_context, - int image_res, - int *prev_res -); - -extern int XpGetImageResolution ( - Display *display, - XPContext print_context -); - -extern char *XpGetAttributes ( - Display *display, - XPContext print_context, - XPAttributes type -); - -extern void XpSetAttributes ( - Display *display, - XPContext print_context, - XPAttributes type, - char *pool, - XPAttrReplacement replacement_rule -); - -extern char *XpGetOneAttribute ( - Display *display, - XPContext print_context, - XPAttributes type, - char *attribute_name -); - -extern XPPrinterList XpGetPrinterList ( - Display *display, - char *printer_name, - int *list_count /* return value */ -); - -extern void XpFreePrinterList ( - XPPrinterList printer_list -); - -extern void XpRehashPrinterList ( - Display *display -); - -extern Status XpQueryVersion ( - Display *display, - short *major_version, /* return value */ - short *minor_version /* return value */ -); - -extern Bool XpQueryExtension ( - Display *display, - int *event_base_return, /* return value */ - int *error_base_return /* return value */ -); - -extern Screen **XpQueryScreens ( - Display *display, - int *list_count /* return value */ -); - -extern Status XpGetPdmStartParams ( - Display *print_display, - Window print_window, - XPContext print_context, - Display *video_display, - Window video_window, - Display **selection_display, /* return value */ - Atom *selection, /* return value */ - Atom *type, /* return value */ - int *format, /* return value */ - unsigned char **data, /* return value */ - int *nelements /* return value */ -); - -extern Status XpGetAuthParams ( - Display *print_display, - Display *video_display, - Display **selection_display, /* return value */ - Atom *selection, /* return value */ - Atom *target /* return value */ -); - -extern Status XpSendAuth ( - Display *display, - Window window -); - -extern Status XpSendOneTicket ( - Display *display, - Window window, - Xauth *ticket, - Bool more -); - -extern void XpSetLocaleHinter ( - XPHinterProc hinter_proc, - char *hinter_desc -); - -extern char *XpGetLocaleHinter ( - XPHinterProc *hinter_proc -); - -extern char *XpGetLocaleNetString(void); - -extern char *XpNotifyPdm ( - Display *print_display, - Window print_window, - XPContext print_context, - Display *video_display, - Window video_window, - Bool auth_flag -); - -#endif /* _XP_PRINT_SERVER_ */ - -_XFUNCPROTOEND - -#endif /* _XpPrint_H_ */ diff --git a/nx-X11/include/extensions/Printstr.h b/nx-X11/include/extensions/Printstr.h deleted file mode 100644 index 45ac7a596..000000000 --- a/nx-X11/include/extensions/Printstr.h +++ /dev/null @@ -1,783 +0,0 @@ -/* $Xorg: Printstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/****************************************************************************** - ****************************************************************************** - ** - ** File: Printstr.h - ** - ** Description: Definitions needed by the server and library, but - ** not clients. - ** - ** Print.h for server, library and clients. - ** - ****************************************************************************** - ** - ** (c) Copyright 1996 Hewlett-Packard Company - ** (c) Copyright 1996 International Business Machines Corp. - ** (c) Copyright 1996 Sun Microsystems, Inc. - ** (c) Copyright 1996 Novell, Inc. - ** (c) Copyright 1996 Digital Equipment Corp. - ** (c) Copyright 1996 Fujitsu Limited - ** (c) Copyright 1996 Hitachi, Ltd. - ** - ** 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 - ** COPYRIGHT HOLDERS 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 names of the copyright holders shall - ** not be used in advertising or otherwise to promote the sale, use or other - ** dealings in this Software without prior written authorization from said - ** copyright holders. - ** - ****************************************************************************** - *****************************************************************************/ -/* $XFree86: xc/include/extensions/Printstr.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ */ - - -#ifndef _XpPrintstr_H_ -#define _XpPrintstr_H_ - -/* - * NEED_EVENTS and NEED_REPLIES are hacks to limit the linker symbol-table - * size. When function prototypes are needed from Print.h, this sets up - * a cascading dependency on Printstr.h and eventually Xproto.h to provide - * the event and reply struct definitions. - */ -#ifndef NEED_EVENTS -#define NEED_EVENTS -#endif /* NEED_EVENTS */ - -#define NEED_REPLIES - -#include -#ifndef _XP_PRINT_SERVER_ -#include -#endif /* _XP_PRINT_SERVER_ */ - -/* - * Pull in other definitions. Print.h will hide some things if we're - * doing server side work. - */ -#include - -#include - -_XFUNCPROTOBEGIN - -/****************************************************************************** - * - * Protocol requests constants and alignment values - * - * Note: Xlib macro's expect X_ABC where ABC is the name of the - * protocol request. - */ -#define X_PrintQueryVersion 0 -#define X_PrintGetPrinterList 1 -#define X_PrintCreateContext 2 -#define X_PrintSetContext 3 -#define X_PrintGetContext 4 -#define X_PrintDestroyContext 5 -#define X_PrintGetContextScreen 6 -#define X_PrintStartJob 7 -#define X_PrintEndJob 8 -#define X_PrintStartDoc 9 -#define X_PrintEndDoc 10 -#define X_PrintPutDocumentData 11 -#define X_PrintGetDocumentData 12 -#define X_PrintStartPage 13 -#define X_PrintEndPage 14 -#define X_PrintSelectInput 15 -#define X_PrintInputSelected 16 -#define X_PrintGetAttributes 17 -#define X_PrintSetAttributes 18 -#define X_PrintGetOneAttribute 19 -#define X_PrintRehashPrinterList 20 -#define X_PrintGetPageDimensions 21 -#define X_PrintQueryScreens 22 -#define X_PrintSetImageResolution 23 -#define X_PrintGetImageResolution 24 - -/******************************************************************** - * - * Protocol data types - */ -#define PCONTEXT CARD32 -#define WINDOW CARD32 -#define DRAWABLE CARD32 -#define BITMASK CARD32 - -/****************************************************************************** - * - * Event wire struct definitions - * - * Note: Xlib macro's expect xABC struct names and sz_xABC size - * constants where ABC is the name of the protocol request. - */ - - -/********************************************************************* - * - * Events. - * - * See Print.h for the protocol "type" values. - */ -typedef struct _xPrintPrintEvent { - BYTE type; /* XPPrintNotify + extEntry->eventBase */ - BYTE detail; /* XPStartJobNotify, XPEndJobNotify, - XPStartDocNotify, XPEndDocNotify, - XPStartPageNotify, XPEndPageNotify */ - CARD16 sequenceNumber B16; - PCONTEXT printContext B32; /* print context */ - BOOL cancel; /* canceled flag */ - CARD8 pad1; /* rest is unused */ - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xPrintPrintEvent; -#define sz_xPrintPrintEvent 32; - -typedef struct _xPrintAttributeEvent { - BYTE type; /* XPAttributeNotify + extEntry->eventBase */ - BYTE detail; /* XPJobAttr, XPDocAttr, XPPageAttr, - XPPrinterAttr, XPSpoolerAttr, - XPMediumAttr, XPServerAttr */ - CARD16 sequenceNumber B16; - PCONTEXT printContext B32; /* print context */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xPrintAttributeEvent; -#define sz_xPrintAttributeEvent 32; - - -/********************************************************************* - * - * Requests - */ -typedef struct _PrintQueryVersion { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintQueryVersion */ - CARD16 length B16; -} xPrintQueryVersionReq; -#define sz_xPrintQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of Xp protocol */ - CARD16 minorVersion B16; /* minor version of Xp protocol */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xPrintQueryVersionReply; -#define sz_xPrintQueryVersionReply 32 - - -typedef struct _PrintGetPrinterList { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetPrinterList */ - CARD16 length B16; - CARD32 printerNameLen B32; /* length of printer name */ - CARD32 localeLen B32; /* length of locale string */ - - /* variable portion ***************************************** - STRING8 printerName; * printer name * - BYTE pad(printerNameLen) * unused * - STRING8 locale; * locale * - BYTE pad(localeLen) * unused * - ************************************************************/ -} xPrintGetPrinterListReq; -#define sz_xPrintGetPrinterListReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 listCount B32; /* of PRINTER recs below */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - - /* variable portion ***************************************** - CARD32 nameLen B32; * length of name in bytes * - STRING8 name; * name * - BYTE pad(nameLen) * unused * - - CARD32 descLen B32; * length of desc in bytes * - STRING8 desc; * localized description * - BYTE pad(descLen) * unused * - ************************************************************/ -} xPrintGetPrinterListReply; -#define sz_xPrintGetPrinterListReply 32 - - -typedef struct _PrintRehashPrinterList { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintRehashPrinterList */ - CARD16 length B16; -} xPrintRehashPrinterListReq; -#define sz_xPrintRehashPrinterListReq 4 - - -typedef struct _PrintCreateContext { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintInitSetContext */ - CARD16 length B16; - CARD32 contextID B32; /* ID for context */ - CARD32 printerNameLen B32; /* length of printerName in bytes */ - CARD32 localeLen B32; /* length of locale in bytes */ - - /* variable portion ***************************************** - STRING8 printerName * printer name * - BYTE pad(printerNameLen) * unused * - STRING8 locale * locale * - BYTE pad(locale) * unused * - ************************************************************/ -} xPrintCreateContextReq; -#define sz_xPrintCreateContextReq 16 - - -typedef struct _PrintSetContext { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintSetContext */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintSetContextReq; -#define sz_xPrintSetContextReq 8 - - -typedef struct _PrintGetContext { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetContext */ - CARD16 length B16; -} xPrintGetContextReq; -#define sz_xPrintGetContextReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - PCONTEXT printContext B32; /* print context */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xPrintGetContextReply; -#define sz_xPrintGetContextReply 32 - - -typedef struct _PrintDestroyContext { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintDestroyContext */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintDestroyContextReq; -#define sz_xPrintDestroyContextReq 8 - - -typedef struct _PrintGetContextScreen { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetContextScreen */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintGetContextScreenReq; -#define sz_xPrintGetContextScreenReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - WINDOW rootWindow; /* screenPtr represented as rootWin */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xPrintGetContextScreenReply; -#define sz_xPrintGetContextScreenReply 32 - - -typedef struct _PrintStartJob { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintStartJob */ - CARD16 length B16; - CARD8 saveData; /* save data boolean */ - CARD8 pad1; - CARD16 pad2 B16; -} xPrintStartJobReq; -#define sz_xPrintStartJobReq 8 - -typedef struct _PrintEndJob { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintEndJob */ - CARD16 length B16; - BOOL cancel; /* cancel boolean */ - CARD8 pad1; - CARD16 pad2 B16; -} xPrintEndJobReq; -#define sz_xPrintEndJobReq 8 - - -typedef struct _PrintStartDoc { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintStartDoc */ - CARD16 length B16; - CARD8 type; /* type for document */ - CARD8 pad1; - CARD16 pad2 B16; -} xPrintStartDocReq; -#define sz_xPrintStartDocReq 8 - -typedef struct _PrintEndDoc { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintEndDoc */ - CARD16 length B16; - BOOL cancel; /* cancel boolean */ - CARD8 pad1; - CARD16 pad2 B16; -} xPrintEndDocReq; -#define sz_xPrintEndDocReq 8 - - -typedef struct _PrintPutDocumentData { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintPutDocumentData */ - CARD16 length B16; - DRAWABLE drawable B32; /* target drawable */ - CARD32 len_data B32; /* big len in bytes */ - CARD16 len_fmt; /* len in bytes */ - CARD16 len_options; /* len in bytes */ - - /* variable portion ***************************************** - LISTofBYTE data; * data * - BYTE pad(len_data) * unused * - STRING8 doc_fmt; * ISO compliant desc of data type * - BYTE pad(len_fmt) * unused * - STRING8 options; * additional device-dependent desc * - BYTE pad(len_options) * unused * - ************************************************************/ -} xPrintPutDocumentDataReq; -#define sz_xPrintPutDocumentDataReq 16 - - -typedef struct _PrintGetDocumentData { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetDocumentData */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - CARD32 maxBufferSize B32; /* maximum buffer size requested */ -} xPrintGetDocumentDataReq; -#define sz_xPrintGetDocumentDataReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 statusCode B32; /* status code for reply */ - CARD32 finishedFlag B32; /* is this the last reply */ - CARD32 dataLen B32; /* data length */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - - /* variable portion ***************************************** - LISTofBYTE data; * data * - BYTE pad(count) * unused * - ************************************************************/ -} xPrintGetDocumentDataReply; -#define sz_xPrintGetDocumentDataReply 32 - - -typedef struct _PrintStartPage { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintStartPage */ - CARD16 length B16; - WINDOW window B32; /* window */ -} xPrintStartPageReq; -#define sz_xPrintStartPageReq 8 - -typedef struct _PrintEndPage { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintEndPage */ - CARD16 length B16; - BOOL cancel; /* cancel boolean */ - CARD8 pad1; - CARD16 pad2 B16; -} xPrintEndPageReq; -#define sz_xPrintEndPageReq 8 - - -typedef struct _PrintSelectInput { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintSelectInput */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - BITMASK eventMask B32; -} xPrintSelectInputReq; -#define sz_xPrintSelectInputReq 12 - - -typedef struct _PrintInputSelected { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintInputSelected */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintInputSelectedReq; -#define sz_xPrintInputSelectedReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - BITMASK eventMask B32; /* your event mask */ - BITMASK allEventsMask B32; /* all event mask */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xPrintInputSelectedReply; -#define sz_xPrintInputSelectedReply 32 - -typedef struct _PrintGetAttributes { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetAttributes */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - CARD8 type; /* type */ - CARD8 pad1; /* unused */ - CARD16 pad2 B16; /* unused */ -} xPrintGetAttributesReq; -#define sz_xPrintGetAttributesReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 stringLen B32; /* length of xrm db string */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - - /* variable portion ***************************************** - STRING8 string; * xrm db as a string * - BYTE pad(stringLen) * unused * - ************************************************************/ -} xPrintGetAttributesReply; -#define sz_xPrintGetAttributesReply 32 - - -typedef struct _PrintSetAttributes { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintSetAttributes */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - CARD32 stringLen B32; /* length of xrm db string */ - CARD8 type; /* type */ - CARD8 rule; /* replacement rule */ - CARD16 pad1 B16; /* unused */ - - /* variable portion ***************************************** - STRING8 string; * xrm db as a string * - BYTE pad(stringLen) * unused * - ************************************************************/ -} xPrintSetAttributesReq; -#define sz_xPrintSetAttributesReq 16 - - -typedef struct _PrintGetOneAttribute { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetOneAttribute */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - CARD32 nameLen; /* length of name string */ - CARD8 type; /* type */ - CARD8 pad1; /* unused */ - CARD16 pad2 B16; /* unused */ - - /* variable portion ***************************************** - STRING8 name; * name as a string * - BYTE pad(name) * unused * - ************************************************************/ -} xPrintGetOneAttributeReq; -#define sz_xPrintGetOneAttributeReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 valueLen B32; /* length of value string */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - - /* variable portion ***************************************** - STRING8 value; * value as a string * - BYTE pad(value) * unused * - ************************************************************/ -} xPrintGetOneAttributeReply; -#define sz_xPrintGetOneAttributeReply 32 - - -typedef struct _PrintGetPageDimensions { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetPageDimensions */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintGetPageDimensionsReq; -#define sz_xPrintGetPageDimensionsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 width; /* total pixel width */ - CARD16 height; /* total pixel height */ - CARD16 rx; /* reproducable x pixel offset */ - CARD16 ry; /* reproducable y pixel offset */ - CARD16 rwidth; /* reproducable x pixel width */ - CARD16 rheight; /* reproducable y pixel width */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xPrintGetPageDimensionsReply; -#define sz_xPrintGetPageDimensionsReply 32 - - -typedef struct _PrintQueryScreens { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintQueryScreens */ - CARD16 length B16; -} xPrintQueryScreensReq; -#define sz_xPrintQueryScreensReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 listCount; /* number of screens following */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - - /* variable portion ***************************************** - WINDOW rootWindow; * root window of screen * - ************************************************************/ -} xPrintQueryScreensReply; -#define sz_xPrintQueryScreensReply 32 - -typedef struct _PrintSetImageResolution { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintSetImageResolution */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ - CARD16 imageRes B16; /* image resolution */ - CARD16 pad1 B16; -} xPrintSetImageResolutionReq; -#define sz_xPrintSetImageResolutionReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL status; /* accepted or not */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 prevRes B16; /* previous resolution */ - CARD16 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xPrintSetImageResolutionReply; -#define sz_xPrintSetImageResolutionReply 32 - -typedef struct _PrintGetImageResolution { - CARD8 reqType; /* always PrintReqCode */ - CARD8 printReqType; /* always X_PrintGetImageResolution */ - CARD16 length B16; - PCONTEXT printContext B32; /* print context */ -} xPrintGetImageResolutionReq; -#define sz_xPrintGetImageResolutionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 imageRes B16; /* image resolution */ - CARD16 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xPrintGetImageResolutionReply; -#define sz_xPrintGetImageResolutionReply 32 - -#ifndef _XP_PRINT_SERVER_ -/*********************************************************************** - * - * Library-only definitions. - */ -extern XPHinterProc _xp_hinter_proc; -extern char *_xp_hinter_desc; -extern int _xp_hinter_init; - -#else /* _XP_PRINT_SERVER_ */ - -/*********************************************************************** - * - * Server-only definitions shared between the extension and DDX layers. - * - */ - -/* - * Internal return code used to indicate that the requesting - * client has been suspended. - */ -#define Suspended 84 - -struct _XpContext; - -extern void XpRegisterPrinterScreen( - ScreenPtr pScreen, - int (*CreateContext)(struct _XpContext *)); - -typedef struct _xpprintFuncs { - int (*StartJob)( - struct _XpContext * /* pContext */, - Bool /* sendClientData */, - ClientPtr /* client */); - int (*EndJob)(struct _XpContext *, int); - int (*StartDoc)( - struct _XpContext * /* pContext */, - XPDocumentType /* type */); - int (*EndDoc)(struct _XpContext *, int); - int (*StartPage)( - struct _XpContext * /* pContext */, - WindowPtr /* pWin */); - int (*EndPage)( - struct _XpContext * /* pContext */, - WindowPtr /* pWin */); - int (*PutDocumentData)( - struct _XpContext * /* pContext */, - DrawablePtr /* pDraw */, - char * /* pData */, - int /* len_data */, - char * /* pDoc_fmt */, - int /* len_fmt */, - char * /* pOptions */, - int /* len_options */, - ClientPtr /* client */); - int (*GetDocumentData)( - struct _XpContext * /* pContext */, - ClientPtr /* client */, - int /* maxBufferSize */); - int (*DestroyContext)( - struct _XpContext *); /* pContext */ - char *(*GetAttributes)( - struct _XpContext *, - XPAttributes /* pool */); - char *(*GetOneAttribute)( - struct _XpContext * /* pContext */, - XPAttributes /* pool */, - char * /* attrs */); - int (*SetAttributes)( - struct _XpContext * /* pContext */, - XPAttributes /* pool */, - char * /* attrs */); - int (*AugmentAttributes)( - struct _XpContext * /* pContext */, - XPAttributes /* pool */, - char * /* attrs */); - int (*GetMediumDimensions)( - struct _XpContext * /* pPrintContext */, - CARD16 * /* pWidth */, - CARD16 * /* pHeight */); - int (*GetReproducibleArea)( - struct _XpContext * /* pPrintContext */, - xRectangle * /* pRect */); - int (*SetImageResolution)( - struct _XpContext * /* pPrintContext */, - int /* imageRes */, - Bool * /* pStatus */); -} XpDriverFuncs, *XpDriverFuncsPtr; - -/* - * Each print context is represented by one of the following structs - * associated with a resource ID of type RTcontext . A pointer to - * the context is placed in the Xp extension's devPrivates - * element in each client * which establishes a context via - * either initContext or setContext. - * The context pointer is also placed in the struct indicated by the - * RTpage resource associated with each StartPage'd window. - */ -typedef struct _XpContext { - XID contextID; - char *printerName; - int screenNum; /* screen containing the printer */ - struct _XpClient *clientHead; /* list of clients */ - CARD32 state; - VisualID pageWin; - DevUnion *devPrivates; - XpDriverFuncs funcs; - ClientPtr clientSlept; - int imageRes; -} XpContextRec, *XpContextPtr; - -#include /* FontResolutionPtr */ - -extern Bool XpAllocateContextPrivate(int, unsigned); -extern FontResolutionPtr XpGetClientResolutions(ClientPtr, int *); -extern XpContextPtr XpContextOfClient(ClientPtr); -extern XpContextPtr XpGetPrintContext(ClientPtr); -extern int XpAllocateContextPrivateIndex(void); -extern int XpRehashPrinterList(void); -extern void XpSetFontResFunc(ClientPtr); -extern void XpUnsetFontResFunc(ClientPtr); -extern void XpRegisterInitFunc(ScreenPtr, char *, int (*)(struct _XpContext *)); - -#endif /* _XP_PRINT_SERVER_ */ - -_XFUNCPROTOEND - -#endif /* _XpPrintstr_H_ */ diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 1266724c7..721d3fff4 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -181,10 +181,6 @@ REGEXDIR = regex XALIBDIR = Xa #endif -#if BuildXprintLib -XPRINTLIBDIRS = Xp XprintUtil XprintAppUtil -#endif - #if BuildFontCacheLib FONTCACHELIBDIR = Xfontcache #endif @@ -221,7 +217,7 @@ LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \ $(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \ $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ $(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \ - $(XPRINTLIBDIRS) $(XAW6LIBDIR) $(XAW7LIBDIR) $(XAWLIBDIR) \ + $(XAW6LIBDIR) $(XAW7LIBDIR) $(XAWLIBDIR) \ $(XINPUTLIBDIR) $(XTSTLIBDIR) $(FSLIBDIR) $(XKBLIBDIR) \ $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(EXPATBUILDDIR) \ $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ diff --git a/nx-X11/programs/Imakefile b/nx-X11/programs/Imakefile index 9480baf6e..acecc3be0 100644 --- a/nx-X11/programs/Imakefile +++ b/nx-X11/programs/Imakefile @@ -56,9 +56,6 @@ SCREENSAVESRCDIR = beforelight #endif #if BuildLBX LBXPROXYSRCDIR = lbxproxy -#endif -#if BuildXprintClients - XPSRCDIRS = xplsprinters xprehashprinterlist xphelloworld xpr #endif PROXYMGRSRCDIR = proxymngr RSTARTSRCDIR = rstart @@ -109,10 +106,6 @@ XTRAPCLIENTDIRS = xtrap #if BuildDPSClients DPSCLIENTDIRS = dpsinfo dpsexec texteroids #endif -#if BuildDBElib && BuildXprintClients - DBECLIENTDIRS = xdbedizzy -#endif - XPMCLIENTDIRS = cxpm sxpm #if BuildGLXLibrary diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 979a9468c..c25103373 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -158,49 +158,6 @@ INSTPGMFLAGS = LIBCWRAPPER = os/libcwrapper.o #endif -#if BuildXprint - -XPCONFIGDIR = XpConfig - -#ifndef XpRasterDDX -#define XpRasterDDX YES -#endif -#ifndef XpColorPclDDX -#define XpColorPclDDX YES -#endif -#ifndef XpMonoPclDDX -#define XpMonoPclDDX NO -#endif -#ifndef XpPostScriptDDX -#define XpPostScriptDDX YES -#endif - -#if XpRasterDDX -XPRASTLIB = Xprint/raster/LibraryTargetName(raster) -#endif -#if XpColorPclDDX -XPPCLLIB = Xprint/pcl/LibraryTargetName(pcl) -#endif -#if XpMonoPclDDX -XPMPCLLIB = Xprint/pcl-mono/LibraryTargetName(pcl) -#endif -#if XpPostScriptDDX -XPPSLIB = Xprint/ps/LibraryTargetName(ps) -#endif - -XPDDXLIBS = Xprint/LibraryTargetName(printer) \ - $(XPRASTLIB) $(XPPCLLIB) $(XPMPCLLIB) $(XPPSLIB) -XPDDXFBLIBS = $(MFB) $(CFB32) -#if !PrintOnlyServer - XPFBLIBS = $(XPDDXFBLIBS) - XPDDX = $(XPDDXLIBS) -#endif - XPDDXDIR = Xprint -#endif -#if !BuildXprint || PrintOnlyServer -XPFBLIBS = dix/LibraryTargetName(xpstubs) -#endif - #if BuildRender RENDERDIR = render RENDERLIB = $(RENDERDIR)/librender.a @@ -834,39 +791,6 @@ ServerDriverSDKTarget(Xorg) #endif #endif /* XorgServer */ -#if defined(XprtServer) && XprtServer -XCOMM -XCOMM Print Server -XCOMM -MFBSUBDIR = mfb -CFB8SUBDIR = cfb -CFB32SUBDIR = cfb32 -MIDAMAGEDIR = miext/damage -XPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(DEPDIRS) \ - $(MIDAMAGEDIR) -XPOBJS = Xprint/ddxInit.o Xprint/dpmsstubs.o Xprint/miinitext.o -#if PrintOnlyServer -XPLIBS = PreFbLibs $(XPDDXLIBS) $(XPDDXFBLIBS) PostFbLibs -#else -XPLIBS = PreFbLibs PostFbLibs -#endif -#if (defined(SunArchitecture) || defined(SparcArchitecture)) && \ - defined(SVR4Architecture) -XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) $(XONLYLIB) -lw -#else -XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) $(XONLYLIB) -#endif -#if HasParallelMake -MakeMutex($(XPSUBDIRS) $(XPOBJS) $(XPLIBS) $(XPSYSLIBS)) -#endif -#if ForceServerRemake -$(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS) - @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi -#endif -ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS), \ - $(LIBCWRAPPER) $(XPLIBS) $(LOADABLEEXTS),$(XPSYSLIBS)) -#endif /* XprtServer */ - #if defined(NXAgentServer) && NXAgentServer XCOMM XCOMM Nested server with NXlib-based ddx and compressed transport. diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index 6846c2892..6c2c060f8 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -131,16 +131,11 @@ XF86BIGFOBJS = xf86bigfont.o XEVIEOBJS = xevie.o #endif -#if BuildXprint - XPRINTSRCS = xprint.c - XPRINTOBJS = xprint.o -#endif - SRCS = shape.c $(SHMSRCS) $(MULTIBUFSRC) \ mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ - $(APPGROUPSRCS) $(XPRINTSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ + $(APPGROUPSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ $(XEVIESRCS) \ $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS) @@ -148,11 +143,11 @@ XF86BIGFOBJS = xf86bigfont.o mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ - $(APPGROUPOBJS) $(XPRINTOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ + $(APPGROUPOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ $(XEVIEOBJS) \ $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS) - SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) $(XPRINTOBJS) \ + SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) \ shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ $(XEVIEOBJS) \ $(XF86BIGFOBJS) diff --git a/nx-X11/programs/Xserver/Xext/xprint.c b/nx-X11/programs/Xserver/Xext/xprint.c deleted file mode 100644 index 60512d372..000000000 --- a/nx-X11/programs/Xserver/Xext/xprint.c +++ /dev/null @@ -1,2760 +0,0 @@ -/* $Xorg: xprint.c,v 1.5 2001/03/05 20:42:26 pookie Exp $ */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -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 -COPYRIGHT HOLDERS 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 names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: xprint.c -** * -** * Copyright: Copyright 1993, 1995 Hewlett-Packard Company -** * -** * Copyright 1989 by The Massachusetts Institute of Technology -** * -** * 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 MIT not be used in -** * advertising or publicity pertaining to distribution of the -** * software without specific prior written permission. -** * M.I.T. makes no representation about the suitability of -** * this software for any purpose. It is provided "as is" -** * without any express or implied warranty. -** * -** * MIT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -** * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- -** * NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MIT BE LI- -** * ABLE 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. -** * -** ********************************************************* -** -********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.14tsi Exp $ */ - -#define _XP_PRINT_SERVER_ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#define NEED_EVENTS -#include -#undef NEED_EVENTS -#include "misc.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include -#include -#include -#include "../Xprint/DiPrint.h" -#include "../Xprint/attributes.h" -#include "modinit.h" - -static void XpResetProc(ExtensionEntry *); - -static int ProcXpDispatch(ClientPtr); -static int ProcXpSwappedDispatch(ClientPtr); - -static int ProcXpQueryVersion(ClientPtr); -static int ProcXpGetPrinterList(ClientPtr); -static int ProcXpCreateContext(ClientPtr); -static int ProcXpSetContext(ClientPtr); -static int ProcXpGetContext(ClientPtr); -static int ProcXpDestroyContext(ClientPtr); -static int ProcXpGetContextScreen(ClientPtr); -static int ProcXpStartJob(ClientPtr); -static int ProcXpEndJob(ClientPtr); -static int ProcXpStartDoc(ClientPtr); -static int ProcXpEndDoc(ClientPtr); -static int ProcXpStartPage(ClientPtr); -static int ProcXpEndPage(ClientPtr); -static int ProcXpSelectInput(ClientPtr); -static int ProcXpInputSelected(ClientPtr); -static int ProcXpPutDocumentData(ClientPtr); -static int ProcXpGetDocumentData(ClientPtr); -static int ProcXpGetAttributes(ClientPtr); -static int ProcXpGetOneAttribute(ClientPtr); -static int ProcXpSetAttributes(ClientPtr); -static int ProcXpRehashPrinterList(ClientPtr); -static int ProcXpQueryScreens(ClientPtr); -static int ProcXpGetPageDimensions(ClientPtr); -static int ProcXpSetImageResolution(ClientPtr); -static int ProcXpGetImageResolution(ClientPtr); - -static void SwapXpNotifyEvent(xPrintPrintEvent *, xPrintPrintEvent *); -static void SwapXpAttributeEvent(xPrintAttributeEvent *, xPrintAttributeEvent *); - -static int SProcXpGetPrinterList(ClientPtr); -static int SProcXpCreateContext(ClientPtr); -static int SProcXpSetContext(ClientPtr); -static int SProcXpGetContext(ClientPtr); -static int SProcXpDestroyContext(ClientPtr); -static int SProcXpGetContextScreen(ClientPtr); -static int SProcXpStartJob(ClientPtr); -static int SProcXpEndJob(ClientPtr); -static int SProcXpStartDoc(ClientPtr); -static int SProcXpEndDoc(ClientPtr); -static int SProcXpStartPage(ClientPtr); -static int SProcXpEndPage(ClientPtr); -static int SProcXpSelectInput(ClientPtr); -static int SProcXpInputSelected(ClientPtr); -static int SProcXpPutDocumentData(ClientPtr); -static int SProcXpGetDocumentData(ClientPtr); -static int SProcXpGetAttributes(ClientPtr); -static int SProcXpGetOneAttribute(ClientPtr); -static int SProcXpSetAttributes(ClientPtr); -static int SProcXpRehashPrinterList(ClientPtr); -static int SProcXpGetPageDimensions(ClientPtr); -static int SProcXpSetImageResolution(ClientPtr); -static int SProcXpGetImageResolution(ClientPtr); - -static void SendXpNotify(XpContextPtr, int, int); -static void SendAttributeNotify(XpContextPtr, int); -static int XpFreeClient(pointer, XID); -static int XpFreeContext(pointer, XID); -static int XpFreePage(pointer, XID); -static Bool XpCloseScreen(int, ScreenPtr); -static CARD32 GetAllEventMasks(XpContextPtr); -static struct _XpClient *CreateXpClient(ClientPtr); -static void InitContextPrivates(XpContextPtr); -static void ResetContextPrivates(void); -static struct _XpClient *FindClient(XpContextPtr, ClientPtr); -static struct _XpClient *AcquireClient(XpContextPtr, ClientPtr); - -typedef struct _driver { - struct _driver *next; - char *name; - int (* CreateContext)(XpContextPtr); -} XpDriverRec, *XpDriverPtr; - -typedef struct _xpScreen { - Bool (* CloseScreen)(int, ScreenPtr); - struct _driver *drivers; -} XpScreenRec, *XpScreenPtr; - -/* - * Each context has a list of XpClients indicating which clients have - * associated this context with their connection. - * Each such client has a RTclient resource allocated for it, - * and this per-client - * resource is used to delete the XpClientRec if/when the client closes - * its connection. - * The list of XpClients is also walked if/when the context is destroyed - * so that the ContextPtr can be removed from the client's devPrivates. - */ -typedef struct _XpClient { - struct _XpClient *pNext; - ClientPtr client; - XpContextPtr context; - CARD32 eventMask; - XID contextClientID; /* unneeded sanity check? */ -} XpClientRec, *XpClientPtr; - -static void FreeXpClient(XpClientPtr, Bool); - -/* - * Each StartPage request specifies a window which forms the top level - * window of the page. One of the following structs is created as a - * RTpage resource with the same ID as the window itself. This enables - * us to clean up when/if the window is destroyed, and to prevent the - * same window from being simultaneously referenced in multiple contexts. - * The page resource is created at the first StartPage on a given window, - * and is only destroyed when/if the window is destroyed. When the - * EndPage is recieved (or an EndDoc or EndJob) the context field is - * set to NULL, but the resource remains alive. - */ -typedef struct _XpPage { - XpContextPtr context; -} XpPageRec, *XpPagePtr; - -typedef struct _XpStPageRec { - XpContextPtr pContext; - Bool slept; - XpPagePtr pPage; - WindowPtr pWin; -} XpStPageRec, *XpStPagePtr; - -typedef struct _XpStDocRec { - XpContextPtr pContext; - Bool slept; - CARD8 type; -} XpStDocRec, *XpStDocPtr; - -#define QUADPAD(x) ((((x)+3)>>2)<<2) - -/* - * Possible bit-mask values in the "state" field of a XpContextRec. - */ -#define JOB_STARTED (1 << 0) -#define DOC_RAW_STARTED (1 << 1) -#define DOC_COOKED_STARTED (1 << 2) -#define PAGE_STARTED (1 << 3) -#define GET_DOC_DATA_STARTED (1 << 4) -#define JOB_GET_DATA (1 << 5) - -static XpScreenPtr XpScreens[MAXSCREENS]; -static unsigned char XpReqCode; -static int XpEventBase; -static int XpErrorBase; -static unsigned long XpGeneration = 0; -static int XpClientPrivateIndex; - -/* Variables for the context private machinery. - * These must be initialized at compile time because - * main() calls InitOutput before InitExtensions, and the - * output drivers are likely to call AllocateContextPrivate. - * These variables are reset at CloseScreen time. CloseScreen - * is used because it occurs after FreeAllResources, and before - * the next InitOutput cycle. - */ -static int contextPrivateCount = 0; -static int contextPrivateLen = 0; -static unsigned *contextPrivateSizes = (unsigned *)NULL; -static unsigned totalContextSize = sizeof(XpContextRec); - -/* - * There are three types of resources involved. One is the resource associated - * with the context itself, with an ID specified by a printing client. The - * next is a resource created by us on the client's behalf (and unknown to - * the client) when a client inits or sets a context which allows us to - * track each client's interest in events - * on a particular context, and also allows us to clean up this interest - * record when/if the client's connection is closed. Finally, there is - * a resource created for each window that's specified in a StartPage. This - * resource carries the same ID as the window itself, and enables us to - * easily prevent the same window being referenced in multiple contexts - * simultaneously, and enables us to clean up if the window is destroyed - * before the EndPage. - */ -static RESTYPE RTclient, RTcontext, RTpage; - -/* - * allEvents is the OR of all the legal event mask bits. - */ -static CARD32 allEvents = XPPrintMask | XPAttributeMask; - - -/******************************************************************************* - * - * ExtensionInit, Driver Init functions, QueryVersion, and Dispatch procs - * - ******************************************************************************/ - -/* - * XpExtensionInit - * - * Called from InitExtensions in main() usually through miinitextension - * - */ - -void -XpExtensionInit(INITARGS) -{ - ExtensionEntry *extEntry; - int i; - - RTclient = CreateNewResourceType(XpFreeClient); - RTcontext = CreateNewResourceType(XpFreeContext); - RTpage = CreateNewResourceType(XpFreePage); - if (RTclient && RTcontext && RTpage && - (extEntry = AddExtension(XP_PRINTNAME, XP_EVENTS, XP_ERRORS, - ProcXpDispatch, ProcXpSwappedDispatch, - XpResetProc, StandardMinorOpcode))) - { - XpReqCode = (unsigned char)extEntry->base; - XpEventBase = extEntry->eventBase; - XpErrorBase = extEntry->errorBase; - EventSwapVector[XpEventBase] = (EventSwapPtr) SwapXpNotifyEvent; - EventSwapVector[XpEventBase+1] = (EventSwapPtr) SwapXpAttributeEvent; - } - - if(XpGeneration != serverGeneration) - { - XpClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * We allocate 0 length & simply stuff a pointer to the - * ContextRec in the DevUnion. - */ - if(AllocateClientPrivate(XpClientPrivateIndex, 0) != TRUE) - { - /* we can't alloc a client private, should we bail??? XXX */ - } - XpGeneration = serverGeneration; - } - - for(i = 0; i < MAXSCREENS; i++) - { - /* - * If a screen has registered with our extension, then we - * wrap the screen's CloseScreen function to allow us to - * reset our ContextPrivate stuff. Note that this - * requires a printing DDX to call XpRegisterInitFunc - * _before_ this extension is initialized - i.e. at screen init - * time, _not_ at root window creation time. - */ - if(XpScreens[i] != (XpScreenPtr)NULL) - { - XpScreens[i]->CloseScreen = screenInfo.screens[i]->CloseScreen; - screenInfo.screens[i]->CloseScreen = XpCloseScreen; - } - } - DeclareExtensionSecurity(XP_PRINTNAME, TRUE); -} - -static void -XpResetProc(ExtensionEntry *extEntry) -{ - /* - * We can't free up the XpScreens recs here, because extensions are - * closed before screens, and our CloseScreen function uses the XpScreens - * recs. - - int i; - - for(i = 0; i < MAXSCREENS; i++) - { - if(XpScreens[i] != (XpScreenPtr)NULL) - Xfree(XpScreens[i]); - XpScreens[i] = (XpScreenPtr)NULL; - } - */ -} - -static Bool -XpCloseScreen(int index, ScreenPtr pScreen) -{ - Bool (* CloseScreen)(int, ScreenPtr); - - CloseScreen = XpScreens[index]->CloseScreen; - if(XpScreens[index] != (XpScreenPtr)NULL) - { - XpDriverPtr pDriv, nextDriv; - - pDriv = XpScreens[index]->drivers; - while(pDriv != (XpDriverPtr)NULL) - { - nextDriv = pDriv->next; - Xfree(pDriv); - pDriv = nextDriv; - } - Xfree(XpScreens[index]); - } - XpScreens[index] = (XpScreenPtr)NULL; - - /* - * It's wasteful to call ResetContextPrivates() at every CloseScreen, - * but it's the best we know how to do for now. We do this because we - * have to wait until after all resources have been freed (so we know - * how to free the ContextRecs), and before the next InitOutput cycle. - * See dix/main.c for the order of initialization and reset. - */ - ResetContextPrivates(); - return (*CloseScreen)(index, pScreen); -} - -#if 0 /* NOT USED */ -static void -FreeScreenEntry(XpScreenPtr pScreenEntry) -{ - XpDriverPtr pDriver; - - pDriver = pScreenEntry->drivers; - while(pDriver != (XpDriverPtr)NULL) - { - XpDriverPtr tmp; - - tmp = pDriver->next; - xfree(pDriver); - pDriver = tmp; - } - xfree(pScreenEntry); -} -#endif - -/* - * XpRegisterInitFunc tells the print extension which screens - * are printers as opposed to displays, and what drivers are - * supported on each screen. This eliminates the need of - * allocating print-related private structures on windows on _all_ screens. - * It also hands the extension a pointer to the routine to be called - * whenever a context gets created for a particular driver on this screen. - */ -void -XpRegisterInitFunc(ScreenPtr pScreen, char *driverName, int (*initContext)(struct _XpContext *)) -{ - XpDriverPtr pDriver; - - if(XpScreens[pScreen->myNum] == 0) - { - if((XpScreens[pScreen->myNum] = - (XpScreenPtr) Xalloc(sizeof(XpScreenRec))) == 0) - return; - XpScreens[pScreen->myNum]->CloseScreen = 0; - XpScreens[pScreen->myNum]->drivers = 0; - } - - if((pDriver = (XpDriverPtr)Xalloc(sizeof(XpDriverRec))) == 0) - return; - pDriver->next = XpScreens[pScreen->myNum]->drivers; - pDriver->name = driverName; - pDriver->CreateContext = initContext; - XpScreens[pScreen->myNum]->drivers = pDriver; -} - -static int -ProcXpDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch(stuff->data) - { - case X_PrintQueryVersion: - return ProcXpQueryVersion(client); - case X_PrintGetPrinterList: - return ProcXpGetPrinterList(client); - case X_PrintCreateContext: - return ProcXpCreateContext(client); - case X_PrintSetContext: - return ProcXpSetContext(client); - case X_PrintGetContext: - return ProcXpGetContext(client); - case X_PrintDestroyContext: - return ProcXpDestroyContext(client); - case X_PrintGetContextScreen: - return ProcXpGetContextScreen(client); - case X_PrintStartJob: - return ProcXpStartJob(client); - case X_PrintEndJob: - return ProcXpEndJob(client); - case X_PrintStartDoc: - return ProcXpStartDoc(client); - case X_PrintEndDoc: - return ProcXpEndDoc(client); - case X_PrintStartPage: - return ProcXpStartPage(client); - case X_PrintEndPage: - return ProcXpEndPage(client); - case X_PrintSelectInput: - return ProcXpSelectInput(client); - case X_PrintInputSelected: - return ProcXpInputSelected(client); - case X_PrintPutDocumentData: - return ProcXpPutDocumentData(client); - case X_PrintGetDocumentData: - return ProcXpGetDocumentData(client); - case X_PrintSetAttributes: - return ProcXpSetAttributes(client); - case X_PrintGetAttributes: - return ProcXpGetAttributes(client); - case X_PrintGetOneAttribute: - return ProcXpGetOneAttribute(client); - case X_PrintRehashPrinterList: - return ProcXpRehashPrinterList(client); - case X_PrintQueryScreens: - return ProcXpQueryScreens(client); - case X_PrintGetPageDimensions: - return ProcXpGetPageDimensions(client); - case X_PrintSetImageResolution: - return ProcXpSetImageResolution(client); - case X_PrintGetImageResolution: - return ProcXpGetImageResolution(client); - default: - return BadRequest; - } -} - -static int -ProcXpSwappedDispatch(ClientPtr client) -{ - int temp; - REQUEST(xReq); - - switch(stuff->data) - { - case X_PrintQueryVersion: - swaps(&stuff->length, temp); - return ProcXpQueryVersion(client); - case X_PrintGetPrinterList: - return SProcXpGetPrinterList(client); - case X_PrintCreateContext: - return SProcXpCreateContext(client); - case X_PrintSetContext: - return SProcXpSetContext(client); - case X_PrintGetContext: - return SProcXpGetContext(client); - case X_PrintDestroyContext: - return SProcXpDestroyContext(client); - case X_PrintGetContextScreen: - return SProcXpGetContextScreen(client); - case X_PrintStartJob: - return SProcXpStartJob(client); - case X_PrintEndJob: - return SProcXpEndJob(client); - case X_PrintStartDoc: - return SProcXpStartDoc(client); - case X_PrintEndDoc: - return SProcXpEndDoc(client); - case X_PrintStartPage: - return SProcXpStartPage(client); - case X_PrintEndPage: - return SProcXpEndPage(client); - case X_PrintSelectInput: - return SProcXpSelectInput(client); - case X_PrintInputSelected: - return SProcXpInputSelected(client); - case X_PrintPutDocumentData: - return SProcXpPutDocumentData(client); - case X_PrintGetDocumentData: - return SProcXpGetDocumentData(client); - case X_PrintSetAttributes: - return SProcXpSetAttributes(client); - case X_PrintGetAttributes: - return SProcXpGetAttributes(client); - case X_PrintGetOneAttribute: - return SProcXpGetOneAttribute(client); - case X_PrintRehashPrinterList: - return SProcXpRehashPrinterList(client); - case X_PrintQueryScreens: - swaps(&stuff->length, temp); - return ProcXpQueryScreens(client); - case X_PrintGetPageDimensions: - return SProcXpGetPageDimensions(client); - case X_PrintSetImageResolution: - return SProcXpSetImageResolution(client); - case X_PrintGetImageResolution: - return SProcXpGetImageResolution(client); - default: - return BadRequest; - } -} - -static int -ProcXpQueryVersion(ClientPtr client) -{ - /* REQUEST(xPrintQueryVersionReq); */ - xPrintQueryVersionReply rep; - register int n; - long l; - - REQUEST_SIZE_MATCH(xPrintQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XP_MAJOR_VERSION; - rep.minorVersion = XP_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sz_xPrintQueryVersionReply, (char *)&rep); - return client->noClientException; -} - -/******************************************************************************* - * - * GetPrinterList : Return a list of all printers associated with this - * server. Calls XpDiGetPrinterList, which is defined in - * the device-independent code in Xserver/Xprint. - * - ******************************************************************************/ - -static int -ProcXpGetPrinterList(ClientPtr client) -{ - REQUEST(xPrintGetPrinterListReq); - int totalSize; - int numEntries; - XpDiListEntry **pList; - xPrintGetPrinterListReply *rep; - int n, i, totalBytes; - long l; - char *curByte; - - REQUEST_AT_LEAST_SIZE(xPrintGetPrinterListReq); - - totalSize = ((sz_xPrintGetPrinterListReq) >> 2) + - ((stuff->printerNameLen + 3) >> 2) + - ((stuff->localeLen + 3) >> 2); - if(totalSize != client->req_len) - return BadLength; - - pList = XpDiGetPrinterList(stuff->printerNameLen, (char *)(stuff + 1), - stuff->localeLen, (char *)((stuff + 1) + - QUADPAD(stuff->printerNameLen))); - - for(numEntries = 0, totalBytes = sz_xPrintGetPrinterListReply; - pList[numEntries] != (XpDiListEntry *)NULL; - numEntries++) - { - totalBytes += 2 * sizeof(CARD32); - totalBytes += QUADPAD(strlen(pList[numEntries]->name)); - totalBytes += QUADPAD(strlen(pList[numEntries]->description)); - } - - if((rep = (xPrintGetPrinterListReply *)xalloc(totalBytes)) == - (xPrintGetPrinterListReply *)NULL) - return BadAlloc; - - rep->type = X_Reply; - rep->length = (totalBytes - sz_xPrintGetPrinterListReply) >> 2; - rep->sequenceNumber = client->sequence; - rep->listCount = numEntries; - if (client->swapped) { - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, l); - swapl(&rep->listCount, l); - } - - for(i = 0, curByte = (char *)(rep + 1); i < numEntries; i++) - { - CARD32 *pCrd; - int len; - - pCrd = (CARD32 *)curByte; - len = strlen(pList[i]->name); - *pCrd = len; - if (client->swapped) - swapl((long *)curByte, l); - curByte += sizeof(CARD32); - strncpy(curByte, pList[i]->name, len); - curByte += QUADPAD(len); - - pCrd = (CARD32 *)curByte; - len = strlen(pList[i]->description); - *pCrd = len; - if (client->swapped) - swapl((long *)curByte, l); - curByte += sizeof(CARD32); - strncpy(curByte, pList[i]->description, len); - curByte += QUADPAD(len); - } - - XpDiFreePrinterList(pList); - - WriteToClient(client, totalBytes, (char *)rep); - xfree(rep); - return client->noClientException; -} - -/******************************************************************************* - * - * QueryScreens: Returns the list of screens which are associated with - * print drivers. - * - ******************************************************************************/ - -static int -ProcXpQueryScreens(ClientPtr client) -{ - /* REQUEST(xPrintQueryScreensReq); */ - int i, numPrintScreens, totalSize; - WINDOW *pWinId; - xPrintQueryScreensReply *rep; - long l; - - REQUEST_SIZE_MATCH(xPrintQueryScreensReq); - - rep = (xPrintQueryScreensReply *)xalloc(sz_xPrintQueryScreensReply); - pWinId = (WINDOW *)(rep + 1); - - for(i = 0, numPrintScreens = 0, totalSize = sz_xPrintQueryScreensReply; - i < MAXSCREENS; i++) - { - /* - * If a screen has registered with our extension, then it's - * a printer screen. - */ - if(XpScreens[i] != (XpScreenPtr)NULL) - { - numPrintScreens++; - totalSize += sizeof(WINDOW); - rep = (xPrintQueryScreensReply *)xrealloc(rep, totalSize); - /* fix of bug: pWinId should be set again after reallocate rep */ - pWinId = (WINDOW *)(rep + 1); - *pWinId = WindowTable[i]->drawable.id; - if (client->swapped) - swapl((long *)pWinId, l); - } - } - - rep->type = X_Reply; - rep->sequenceNumber = client->sequence; - rep->length = (totalSize - sz_xPrintQueryScreensReply) >> 2; - rep->listCount = numPrintScreens; - if (client->swapped) - { - int n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, l); - swapl(&rep->listCount, l); - } - - WriteToClient(client, totalSize, (char *)rep); - xfree(rep); - return client->noClientException; -} - -static int -ProcXpGetPageDimensions(ClientPtr client) -{ - REQUEST(xPrintGetPageDimensionsReq); - CARD16 width, height; - xRectangle rect; - xPrintGetPageDimensionsReply rep; - XpContextPtr pContext; - int result; - - REQUEST_SIZE_MATCH(xPrintGetPageDimensionsReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if((pContext->funcs.GetMediumDimensions == 0) || - (pContext->funcs.GetReproducibleArea == 0)) - return BadImplementation; - - result = pContext->funcs.GetMediumDimensions(pContext, &width, &height); - if(result != Success) - return result; - - result = pContext->funcs.GetReproducibleArea(pContext, &rect); - if(result != Success) - return result; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.width = width; - rep.height = height; - rep.rx = rect.x; - rep.ry = rect.y; - rep.rwidth = rect.width; - rep.rheight = rect.height; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.width, n); - swaps(&rep.height, n); - swaps(&rep.rx, n); - swaps(&rep.ry, n); - swaps(&rep.rwidth, n); - swaps(&rep.rheight, n); - } - - WriteToClient(client, sz_xPrintGetPageDimensionsReply, (char *)&rep); - return client->noClientException; -} - -static int -ProcXpSetImageResolution(ClientPtr client) -{ - REQUEST(xPrintSetImageResolutionReq); - xPrintSetImageResolutionReply rep; - XpContextPtr pContext; - Bool status; - int result; - - REQUEST_SIZE_MATCH(xPrintSetImageResolutionReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - rep.prevRes = pContext->imageRes; - if(pContext->funcs.SetImageResolution != 0) { - result = pContext->funcs.SetImageResolution(pContext, - (int)stuff->imageRes, - &status); - if(result != Success) - status = FALSE; - } else - status = FALSE; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.prevRes, n); - } - - WriteToClient(client, sz_xPrintSetImageResolutionReply, (char *)&rep); - return client->noClientException; -} - -static int -ProcXpGetImageResolution(ClientPtr client) -{ - REQUEST(xPrintGetImageResolutionReq); - xPrintGetImageResolutionReply rep; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintGetImageResolutionReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.imageRes = pContext->imageRes; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.imageRes, n); - } - - WriteToClient(client, sz_xPrintGetImageResolutionReply, (char *)&rep); - return client->noClientException; -} - -/******************************************************************************* - * - * RehashPrinterList : Cause the server's list of printers to be rebuilt. - * This allows new printers to be added, or old ones - * deleted without needing to restart the server. - * - ******************************************************************************/ - -static int -ProcXpRehashPrinterList(ClientPtr client) -{ - /* REQUEST(xPrintRehashPrinterListReq); */ - - REQUEST_SIZE_MATCH(xPrintRehashPrinterListReq); - - return XpRehashPrinterList(); -} - -/****************************************************************************** - * - * Context functions: Init, Set, Destroy, FreeContext - * AllocateContextPrivateIndex, AllocateContextPrivate - * and supporting functions. - * - * Init creates a context, creates a XpClientRec for the calling - * client, and stores the contextPtr in the client's devPrivates. - * - * Set creates a XpClientRec for the calling client, and stores the - * contextPtr in the client's devPrivates unless the context is None. - * If the context is None, then the client's connection association - * with any context is removed. - * - * Destroy frees any and all XpClientRecs associated with the context, - * frees the context itself, and removes the contextPtr from any - * relevant client devPrivates. - * - * FreeContext is called by FreeResource to free up a context. - * - ******************************************************************************/ - -/* - * CreateContext creates and initializes the memory for the context itself. - * The driver's CreateContext function - * is then called. - */ -static int -ProcXpCreateContext(ClientPtr client) -{ - REQUEST(xPrintCreateContextReq); - XpScreenPtr pPrintScreen; - WindowPtr pRoot; - char *driverName; - XpContextPtr pContext; - int result = Success; - XpDriverPtr pDriver; - - REQUEST_AT_LEAST_SIZE(xPrintCreateContextReq); - - LEGAL_NEW_RESOURCE(stuff->contextID, client); - - /* - * Check to see if the printer name is valid. - */ - if((pRoot = XpDiValidatePrinter((char *)(stuff + 1), stuff->printerNameLen)) == - (WindowPtr)NULL) - return BadMatch; - - pPrintScreen = XpScreens[pRoot->drawable.pScreen->myNum]; - - /* - * Allocate and add the context resource. - */ - if((pContext = (XpContextPtr) xalloc(totalContextSize)) == - (XpContextPtr) NULL) - return BadAlloc; - - InitContextPrivates(pContext); - - if(AddResource(stuff->contextID, RTcontext, (pointer) pContext) - != TRUE) - { - xfree(pContext); - return BadAlloc; - } - - pContext->contextID = stuff->contextID; - pContext->clientHead = (XpClientPtr)NULL; - pContext->screenNum = pRoot->drawable.pScreen->myNum; - pContext->state = 0; - pContext->clientSlept = (ClientPtr)NULL; - pContext->imageRes = 0; - - pContext->funcs.DestroyContext = 0; - pContext->funcs.StartJob = 0; - pContext->funcs.EndJob = 0; - pContext->funcs.StartDoc = 0; - pContext->funcs.EndDoc = 0; - pContext->funcs.StartPage = 0; - pContext->funcs.EndPage = 0; - pContext->funcs.PutDocumentData = 0; - pContext->funcs.GetDocumentData = 0; - pContext->funcs.GetAttributes = 0; - pContext->funcs.GetOneAttribute = 0; - pContext->funcs.SetAttributes = 0; - pContext->funcs.AugmentAttributes = 0; - pContext->funcs.GetMediumDimensions = 0; - pContext->funcs.GetReproducibleArea = 0; - pContext->funcs.SetImageResolution = 0; - - if((pContext->printerName = (char *)xalloc(stuff->printerNameLen + 1)) == - (char *)NULL) - { - /* Freeing the context also causes the XpClients to be freed. */ - FreeResource(stuff->contextID, RT_NONE); - return BadAlloc; - } - strncpy(pContext->printerName, (char *)(stuff + 1), stuff->printerNameLen); - pContext->printerName[stuff->printerNameLen] = (char)'\0'; - - driverName = XpDiGetDriverName(pRoot->drawable.pScreen->myNum, - pContext->printerName); - - for(pDriver = pPrintScreen->drivers; - pDriver != (XpDriverPtr)NULL; - pDriver = pDriver->next) - { - if(!strcmp(driverName, pDriver->name)) - { - if(pDriver->CreateContext != 0) - pDriver->CreateContext(pContext); - else - return BadImplementation; - break; - } - } - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -/* - * SetContext creates the calling client's contextClient resource, - * and stashes the contextID in the client's devPrivate. - */ -static int -ProcXpSetContext(ClientPtr client) -{ - REQUEST(xPrintSetContextReq); - - XpContextPtr pContext; - XpClientPtr pPrintClient; - int result = Success; - - REQUEST_AT_LEAST_SIZE(xPrintSetContextReq); - - if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) != - (pointer)NULL) - { - /* - * Erase this client's knowledge of its old context, if any. - */ - if((pPrintClient = FindClient(pContext, client)) != (XpClientPtr)NULL) - { - XpUnsetFontResFunc(client); - - if(pPrintClient->eventMask == 0) - FreeXpClient(pPrintClient, TRUE); - } - - client->devPrivates[XpClientPrivateIndex].ptr = (pointer)NULL; - } - if(stuff->printContext == None) - return Success; - - /* - * Check to see that the supplied XID is really a valid print context - * in this server. - */ - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL) - return BadAlloc; - - client->devPrivates[XpClientPrivateIndex].ptr = pContext; - - XpSetFontResFunc(client); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -XpContextPtr -XpGetPrintContext(ClientPtr client) -{ - return (client->devPrivates[XpClientPrivateIndex].ptr); -} - -static int -ProcXpGetContext(ClientPtr client) -{ - /* REQUEST(xPrintGetContextReq); */ - xPrintGetContextReply rep; - - XpContextPtr pContext; - register int n; - register long l; - - REQUEST_SIZE_MATCH(xPrintGetContextReq); - - if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) == - (pointer)NULL) - rep.printContext = None; - else - rep.printContext = pContext->contextID; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.printContext, l); - } - WriteToClient(client, sz_xPrintGetContextReply, (char *)&rep); - return client->noClientException; -} - - -/* - * DestroyContext frees the context associated with the calling client. - * It operates by freeing the context resource ID, thus causing XpFreeContext - * to be called. - */ -static int -ProcXpDestroyContext(ClientPtr client) -{ - REQUEST(xPrintDestroyContextReq); - - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintDestroyContextReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityDestroyAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - XpUnsetFontResFunc(client); - - FreeResource(pContext->contextID, RT_NONE); - - return Success; -} - -static int -ProcXpGetContextScreen(ClientPtr client) -{ - REQUEST(xPrintGetContextScreenReq); - xPrintGetContextScreenReply rep; - XpContextPtr pContext; - int n; - long l; - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadContext; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.rootWindow = WindowTable[pContext->screenNum]->drawable.id; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.rootWindow, l); - } - - WriteToClient(client, sz_xPrintGetContextScreenReply, (char *)&rep); - return client->noClientException; -} - -/* - * XpFreeContext is the routine called by dix:FreeResource when a context - * resource ID is freed. - * It checks to see if there's a partial job pending on the context, and - * if so it calls the appropriate End procs with the cancel flag set. - * It calls the driver's DestroyContext routine to allow the driver to clean - * up any context-related memory or state. - * It calls FreeXpClient to free all the - * associated XpClientRecs and to set all the client->devPrivates to NULL. - * It frees the printer name string, and frees the context - * itself. - */ -static int -XpFreeContext(pointer data, XID id) -{ - XpContextPtr pContext = (XpContextPtr)data; - - /* Clean up any pending job on this context */ - if(pContext->state != 0) - { - if(pContext->state & PAGE_STARTED) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - pContext->funcs.EndPage(pContext, pWin); - SendXpNotify(pContext, XPEndPageNotify, TRUE); - pContext->state &= ~PAGE_STARTED; - if(pPage) - pPage->context = (XpContextPtr)NULL; - } - if((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) - { - pContext->funcs.EndDoc(pContext, TRUE); - SendXpNotify(pContext, XPEndDocNotify, TRUE); - pContext->state &= ~DOC_RAW_STARTED; - pContext->state &= ~DOC_COOKED_STARTED; - } - if(pContext->funcs.EndJob != 0) - { - pContext->funcs.EndJob(pContext, TRUE); - SendXpNotify(pContext, XPEndJobNotify, TRUE); - pContext->state &= ~JOB_STARTED; - pContext->state &= ~GET_DOC_DATA_STARTED; - } - } - - /* - * Tell the driver we're destroying the context - * This allows the driver to free and ContextPrivate data - */ - if(pContext->funcs.DestroyContext != 0) - pContext->funcs.DestroyContext(pContext); - - /* Free up all the XpClientRecs */ - while(pContext->clientHead != (XpClientPtr)NULL) - { - FreeXpClient(pContext->clientHead, TRUE); - } - - xfree(pContext->printerName); - xfree(pContext); - return Success; /* ??? */ -} - -/* - * XpFreeClient is the routine called by dix:FreeResource when a RTclient - * is freed. It simply calls the FreeXpClient routine to do the work. - */ -static int -XpFreeClient(pointer data, XID id) -{ - FreeXpClient((XpClientPtr)data, TRUE); - return Success; -} - -/* - * FreeXpClient - * frees the ClientRec passed in, and sets the client->devPrivates to NULL - * if the client->devPrivates points to the same context as the XpClient. - * Called from XpFreeContext(from FreeResource), and - * XpFreeClient. The boolean freeResource specifies whether or not to call - * FreeResource for the XpClientRec's XID. We should free it except if we're - * called from XpFreeClient (which is itself called from FreeResource for the - * XpClientRec's XID). - */ -static void -FreeXpClient(XpClientPtr pXpClient, Bool freeResource) -{ - XpClientPtr pCurrent, pPrev; - XpContextPtr pContext = pXpClient->context; - - /* - * If we're freeing the clientRec associated with the context tied - * to the client's devPrivates, then we need to clear the devPrivates. - */ - if(pXpClient->client->devPrivates[XpClientPrivateIndex].ptr == - pXpClient->context) - { - pXpClient->client->devPrivates[XpClientPrivateIndex].ptr = - (pointer)NULL; - } - - for(pPrev = (XpClientPtr)NULL, pCurrent = pContext->clientHead; - pCurrent != (XpClientPtr)NULL; - pCurrent = pCurrent->pNext) - { - if(pCurrent == pXpClient) - { - if(freeResource == TRUE) - FreeResource (pCurrent->contextClientID, RTclient); - - if (pPrev != (XpClientPtr)NULL) - pPrev->pNext = pCurrent->pNext; - else - pContext->clientHead = pCurrent->pNext; - - xfree (pCurrent); - break; - } - pPrev = pCurrent; - } -} - -/* - * CreateXpClient takes a ClientPtr and returns a pointer to a - * XpClientRec which it allocates. It also initializes the Rec, - * including adding a resource on behalf of the client to enable the - * freeing of the Rec when the client's connection is closed. - */ -static XpClientPtr -CreateXpClient(ClientPtr client) -{ - XpClientPtr pNewPrintClient; - XID clientResource; - - if((pNewPrintClient = (XpClientPtr)xalloc(sizeof(XpClientRec))) == - (XpClientPtr)NULL) - return (XpClientPtr)NULL; - - clientResource = FakeClientID(client->index); - if(!AddResource(clientResource, RTclient, (pointer)pNewPrintClient)) - { - xfree (pNewPrintClient); - return (XpClientPtr)NULL; - } - - pNewPrintClient->pNext = (XpClientPtr)NULL; - pNewPrintClient->client = client; - pNewPrintClient->context = (XpContextPtr)NULL; - pNewPrintClient->eventMask = 0; - pNewPrintClient->contextClientID = clientResource; - - return pNewPrintClient; -} - -/* - * XpFreePage is the routine called by dix:FreeResource to free the page - * resource built with the same ID as a page window. It checks to see - * if we're in the middle of a page, and if so calls the driver's EndPage - * function with 'cancel' set TRUE. It frees the memory associated with - * the page resource. - */ -static int -XpFreePage(pointer data, XID id) -{ - XpPagePtr page = (XpPagePtr)data; - int result = Success; - WindowPtr pWin = (WindowPtr )LookupIDByType(id, RT_WINDOW); - - /* Check to see if the window's being deleted in the middle of a page */ - if(page->context != (XpContextPtr)NULL && - page->context->state & PAGE_STARTED) - { - if(page->context->funcs.EndPage != 0) - result = page->context->funcs.EndPage(page->context, pWin); - SendXpNotify(page->context, XPEndPageNotify, (int)TRUE); - page->context->pageWin = 0; /* None, NULL??? XXX */ - } - - xfree(page); - return result; -} - -/* - * ContextPrivate machinery. - * Context privates are intended for use by the drivers, allowing the - * drivers to maintain context-specific data. The driver should free - * the associated data at DestroyContext time. - */ - -static void -InitContextPrivates(XpContextPtr context) -{ - register char *ptr; - DevUnion *ppriv; - register unsigned *sizes; - register unsigned size; - register int i; - - if (totalContextSize == sizeof(XpContextRec)) - ppriv = (DevUnion *)NULL; - else - ppriv = (DevUnion *)(context + 1); - - context->devPrivates = ppriv; - sizes = contextPrivateSizes; - ptr = (char *)(ppriv + contextPrivateLen); - for (i = contextPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } -} - -static void -ResetContextPrivates(void) -{ - contextPrivateCount = 0; - contextPrivateLen = 0; - xfree(contextPrivateSizes); - contextPrivateSizes = (unsigned *)NULL; - totalContextSize = sizeof(XpContextRec); - -} - -int -XpAllocateContextPrivateIndex(void) -{ - return contextPrivateCount++; -} - -Bool -XpAllocateContextPrivate(int index, unsigned amount) -{ - unsigned oldamount; - - if (index >= contextPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(contextPrivateSizes, - (index + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (contextPrivateLen <= index) - { - nsizes[contextPrivateLen++] = 0; - totalContextSize += sizeof(DevUnion); - } - contextPrivateSizes = nsizes; - } - oldamount = contextPrivateSizes[index]; - if (amount > oldamount) - { - contextPrivateSizes[index] = amount; - totalContextSize += (amount - oldamount); - } - return TRUE; -} - -static XpClientPtr -AcquireClient(XpContextPtr pContext, ClientPtr client) -{ - XpClientPtr pXpClient; - - if((pXpClient = FindClient(pContext, client)) != (XpClientPtr)NULL) - return pXpClient; - - if((pXpClient = CreateXpClient(client)) == (XpClientPtr)NULL) - return (XpClientPtr)NULL; - - pXpClient->context = pContext; - pXpClient->pNext = pContext->clientHead; - pContext->clientHead = pXpClient; - - return pXpClient; -} - -static XpClientPtr -FindClient(XpContextPtr pContext, ClientPtr client) -{ - XpClientPtr pXpClient; - - for(pXpClient = pContext->clientHead; pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - if(pXpClient->client == client) return pXpClient; - } - return (XpClientPtr)NULL; -} - - -/****************************************************************************** - * - * Start/End Functions: StartJob, EndJob, StartDoc, EndDoc, StartPage, EndPage - * - ******************************************************************************/ - -static int -ProcXpStartJob(ClientPtr client) -{ - REQUEST(xPrintStartJobReq); - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintStartJobReq); - - /* Check to see that a context has been established by this client. */ - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadContext; - - if(pContext->state != 0) - return XpErrorBase+XPBadSequence; - - if(stuff->saveData != XPSpool && stuff->saveData != XPGetData) - { - client->errorValue = stuff->saveData; - return BadValue; - } - - if(pContext->funcs.StartJob != 0) - result = pContext->funcs.StartJob(pContext, - (stuff->saveData == XPGetData)? TRUE:FALSE, - client); - else - return BadImplementation; - - pContext->state = JOB_STARTED; - if(stuff->saveData == XPGetData) - pContext->state |= JOB_GET_DATA; - - SendXpNotify(pContext, XPStartJobNotify, FALSE); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndJob(ClientPtr client) -{ - REQUEST(xPrintEndJobReq); - int result = Success; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintEndJobReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED)) - return XpErrorBase+XPBadSequence; - - /* Check for missing EndDoc */ - if((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) - { - if(pContext->state & PAGE_STARTED) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - if(stuff->cancel != TRUE) - return XpErrorBase+XPBadSequence; - - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndPageNotify, TRUE); - - pContext->state &= ~PAGE_STARTED; - - if(pPage) - pPage->context = (XpContextPtr)NULL; - - if(result != Success) return result; - } - - if(pContext->funcs.EndDoc != 0) - result = pContext->funcs.EndDoc(pContext, stuff->cancel); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndDocNotify, stuff->cancel); - } - - if(pContext->funcs.EndJob != 0) - result = pContext->funcs.EndJob(pContext, stuff->cancel); - else - return BadImplementation; - - pContext->state = 0; - - SendXpNotify(pContext, XPEndJobNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static Bool -DoStartDoc(ClientPtr client, XpStDocPtr c) -{ - XpContextPtr pContext = c->pContext; - - if(c->pContext->state & JOB_GET_DATA && - !(c->pContext->state & GET_DOC_DATA_STARTED)) - { - if(!c->slept) - { - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)DoStartDoc, (pointer) c); - c->pContext->clientSlept = client; - } - return TRUE; - } - - if(pContext->funcs.StartDoc != 0) - (void) pContext->funcs.StartDoc(pContext, c->type); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - if(c->type == XPDocNormal) - pContext->state |= DOC_COOKED_STARTED; - else - pContext->state |= DOC_RAW_STARTED; - - SendXpNotify(pContext, XPStartDocNotify, (int)FALSE); - - xfree(c); - return TRUE; -} - -static int -ProcXpStartDoc(ClientPtr client) -{ - REQUEST(xPrintStartDocReq); - int result = Success; - XpContextPtr pContext; - XpStDocPtr c; - - REQUEST_SIZE_MATCH(xPrintStartDocReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED) || - pContext->state & DOC_RAW_STARTED || - pContext->state & DOC_COOKED_STARTED) - return XpErrorBase+XPBadSequence; - - if(stuff->type != XPDocNormal && stuff->type != XPDocRaw) - { - client->errorValue = stuff->type; - return BadValue; - } - - c = (XpStDocPtr)xalloc(sizeof(XpStDocRec)); - c->pContext = pContext; - c->type = stuff->type; - c->slept = FALSE; - (void)DoStartDoc(client, c); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndDoc(ClientPtr client) -{ - REQUEST(xPrintEndDocReq); - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintEndDocReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & DOC_RAW_STARTED) && - !(pContext->state & DOC_COOKED_STARTED)) - return XpErrorBase+XPBadSequence; - - if(pContext->state & PAGE_STARTED) - { - if(stuff->cancel == TRUE) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndPageNotify, TRUE); - - if(pPage) - pPage->context = (XpContextPtr)NULL; - } - else - return XpErrorBase+XPBadSequence; - if(result != Success) - return result; - } - - if(pContext->funcs.EndDoc != 0) - result = pContext->funcs.EndDoc(pContext, stuff->cancel); - else - return BadImplementation; - - pContext->state &= ~DOC_RAW_STARTED; - pContext->state &= ~DOC_COOKED_STARTED; - - SendXpNotify(pContext, XPEndDocNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static Bool -DoStartPage( - ClientPtr client, - XpStPagePtr c) -{ - WindowPtr pWin = c->pWin; - int result = Success; - XpContextPtr pContext = c->pContext; - XpPagePtr pPage; - - if(c->pContext->state & JOB_GET_DATA && - !(c->pContext->state & GET_DOC_DATA_STARTED)) - { - if(!c->slept) - { - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)DoStartPage, (pointer) c); - c->pContext->clientSlept = client; - } - return TRUE; - } - - if(!(pContext->state & DOC_COOKED_STARTED)) - { - /* Implied StartDoc if it was omitted */ - if(pContext->funcs.StartDoc != 0) - result = pContext->funcs.StartDoc(pContext, XPDocNormal); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - if(result != Success) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, result); - return TRUE; - } - - pContext->state |= DOC_COOKED_STARTED; - SendXpNotify(pContext, XPStartDocNotify, (int)FALSE); - } - - /* ensure the window's not already being used as a page */ - if((pPage = (XpPagePtr)LookupIDByType(c->pWin->drawable.id, RTpage)) != - (XpPagePtr)NULL) - { - if(pPage->context != (XpContextPtr)NULL) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadWindow); - return TRUE; - } - } - else - { - if((pPage = (XpPagePtr)xalloc(sizeof(XpPageRec))) == (XpPagePtr)NULL) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadAlloc); - return TRUE; - } - if(AddResource(c->pWin->drawable.id, RTpage, pPage) == FALSE) - { - xfree(pPage); - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadAlloc); - return TRUE; - } - } - - pPage->context = pContext; - pContext->pageWin = c->pWin->drawable.id; - - if(pContext->funcs.StartPage != 0) - result = pContext->funcs.StartPage(pContext, pWin); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - pContext->state |= PAGE_STARTED; - - (void)MapWindow(pWin, client); - - SendXpNotify(pContext, XPStartPageNotify, (int)FALSE); - - return TRUE; -} - -static int -ProcXpStartPage(ClientPtr client) -{ - REQUEST(xPrintStartPageReq); - WindowPtr pWin; - int result = Success; - XpContextPtr pContext; - XpStPagePtr c; - - REQUEST_SIZE_MATCH(xPrintStartPageReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED)) - return XpErrorBase+XPBadSequence; - - /* can't have pages in a raw documented */ - if(pContext->state & DOC_RAW_STARTED) - return XpErrorBase+XPBadSequence; - - if(pContext->state & PAGE_STARTED) - return XpErrorBase+XPBadSequence; - - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum) - return BadWindow; - - if((c = (XpStPagePtr)xalloc(sizeof(XpStPageRec))) == (XpStPagePtr)NULL) - return BadAlloc; - c->pContext = pContext; - c->slept = FALSE; - c->pWin = pWin; - - (void)DoStartPage(client, c); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndPage(ClientPtr client) -{ - REQUEST(xPrintEndPageReq); - int result = Success; - XpContextPtr pContext; - XpPagePtr page; - WindowPtr pWin; - - REQUEST_SIZE_MATCH(xPrintEndPageReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & PAGE_STARTED)) - return XpErrorBase+XPBadSequence; - - pWin = (WindowPtr )LookupIDByType(pContext->pageWin, RT_WINDOW); - - /* Call the ddx's EndPage proc. */ - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - if((page = (XpPagePtr)LookupIDByType(pContext->pageWin, RTpage)) != - (XpPagePtr)NULL) - page->context = (XpContextPtr)NULL; - - pContext->state &= ~PAGE_STARTED; - pContext->pageWin = 0; /* None, NULL??? XXX */ - - (void)UnmapWindow(pWin, FALSE); - - SendXpNotify(pContext, XPEndPageNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -/******************************************************************************* - * - * Document Data Functions: PutDocumentData, GetDocumentData - * - ******************************************************************************/ - -static int -ProcXpPutDocumentData(ClientPtr client) -{ - REQUEST(xPrintPutDocumentDataReq); - XpContextPtr pContext; - DrawablePtr pDraw; - int result = Success; - unsigned totalSize; - char *pData, *pDoc_fmt, *pOptions; - - REQUEST_AT_LEAST_SIZE(xPrintPutDocumentDataReq); - - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & DOC_RAW_STARTED) && - !(pContext->state & DOC_COOKED_STARTED)) - return XpErrorBase+XPBadSequence; - - if (stuff->drawable) { - if (pContext->state & DOC_RAW_STARTED) - return BadDrawable; - pDraw = (DrawablePtr)LookupDrawable(stuff->drawable, client); - if (!pDraw || pDraw->pScreen->myNum != pContext->screenNum) - return BadDrawable; - } else { - if (pContext->state & DOC_COOKED_STARTED) - return BadDrawable; - pDraw = NULL; - } - - pData = (char *)(&stuff[1]); - - totalSize = (stuff->len_data + 3) >> 2; - pDoc_fmt = pData + (totalSize << 2); - - totalSize += (stuff->len_fmt + 3) >> 2; - pOptions = pData + (totalSize << 2); - - totalSize += (stuff->len_options + 3) >> 2; - if((totalSize + (sz_xPrintPutDocumentDataReq >> 2)) != client->req_len) - return BadLength; - - if(pContext->funcs.PutDocumentData != 0) - { - result = (*pContext->funcs.PutDocumentData)(pContext, pDraw, - pData, stuff->len_data, - pDoc_fmt, stuff->len_fmt, - pOptions, stuff->len_options, - client); - } - else - return BadImplementation; - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpGetDocumentData(ClientPtr client) -{ - REQUEST(xPrintGetDocumentDataReq); - xPrintGetDocumentDataReply rep; - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintGetDocumentDataReq); - - if((pContext = (XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetDocumentData == 0) - return BadImplementation; - - if(!(pContext->state & JOB_GET_DATA) || - pContext->state & GET_DOC_DATA_STARTED) - return XpErrorBase+XPBadSequence; - - if(stuff->maxBufferSize <= 0) - { - client->errorValue = stuff->maxBufferSize; - return BadValue; /* gotta have a positive buffer size */ - } - - result = (*pContext->funcs.GetDocumentData)(pContext, client, - stuff->maxBufferSize); - if(result != Success) - { - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.dataLen = 0; - rep.statusCode = 1; - rep.finishedFlag = TRUE; - if (client->swapped) { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.statusCode, l); /* XXX Why are these longs??? */ - swapl(&rep.finishedFlag, l); /* XXX Why are these longs??? */ - } - (void)WriteToClient(client,sz_xPrintGetDocumentDataReply,(char *)&rep); - } - else - pContext->state |= GET_DOC_DATA_STARTED; - - if(pContext->clientSlept != (ClientPtr)NULL) - { - ClientSignal(pContext->clientSlept); - ClientWakeup(pContext->clientSlept); - pContext->clientSlept = (ClientPtr)NULL; - } - - return result; -} - -/******************************************************************************* - * - * Attribute requests: GetAttributes, SetAttributes, GetOneAttribute - * - ******************************************************************************/ - -static int -ProcXpGetAttributes(ClientPtr client) -{ - REQUEST(xPrintGetAttributesReq); - XpContextPtr pContext; - char *attrs; - xPrintGetAttributesReply *pRep; - int totalSize, n; - unsigned long l; - - REQUEST_SIZE_MATCH(xPrintGetAttributesReq); - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - if(stuff->type != XPServerAttr) - { - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetAttributes == 0) - return BadImplementation; - if((attrs = (*pContext->funcs.GetAttributes)(pContext, stuff->type)) == - (char *)NULL) - return BadAlloc; - } - else - { - if((attrs = XpGetAttributes((XpContextPtr)NULL, XPServerAttr)) == - (char *)NULL) - return BadAlloc; - } - - totalSize = sz_xPrintGetAttributesReply + QUADPAD(strlen(attrs)); - if((pRep = (xPrintGetAttributesReply *)malloc(totalSize)) == - (xPrintGetAttributesReply *)NULL) - return BadAlloc; - - pRep->type = X_Reply; - pRep->length = (totalSize - sz_xPrintGetAttributesReply) >> 2; - pRep->sequenceNumber = client->sequence; - pRep->stringLen = strlen(attrs); - - if (client->swapped) { - swaps(&pRep->sequenceNumber, n); - swapl(&pRep->length, l); - swapl(&pRep->stringLen, l); - } - - strncpy((char*)(pRep + 1), attrs, strlen(attrs)); - xfree(attrs); - - WriteToClient(client, totalSize, (char *)pRep); - - xfree(pRep); - - return client->noClientException; -} - -static int -ProcXpSetAttributes(ClientPtr client) -{ - REQUEST(xPrintSetAttributesReq); - int result = Success; - XpContextPtr pContext; - char *attr; - - REQUEST_AT_LEAST_SIZE(xPrintSetAttributesReq); - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - /* - * Disallow changing of read-only attribute pools - */ - if(stuff->type == XPPrinterAttr || stuff->type == XPServerAttr) - return BadMatch; - - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - SecurityWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.SetAttributes == 0) - return BadImplementation; - - /* - * Check for attributes being set after their relevant phase - * has already begun (e.g. Job attributes set after StartJob). - */ - if((pContext->state & JOB_STARTED) && stuff->type == XPJobAttr) - return XpErrorBase+XPBadSequence; - if(((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) && stuff->type == XPDocAttr) - return XpErrorBase+XPBadSequence; - if((pContext->state & PAGE_STARTED) && stuff->type == XPPageAttr) - return XpErrorBase+XPBadSequence; - - if((attr = (char *)malloc(stuff->stringLen + 1)) == (char *)NULL) - return BadAlloc; - - strncpy(attr, (char *)(stuff + 1), stuff->stringLen); - attr[stuff->stringLen] = (char)'\0'; - - if(stuff->rule == XPAttrReplace) - (*pContext->funcs.SetAttributes)(pContext, stuff->type, attr); - else if(stuff->rule == XPAttrMerge) - (*pContext->funcs.AugmentAttributes)(pContext, stuff->type, attr); - else - { - client->errorValue = stuff->rule; - result = BadValue; - } - - xfree(attr); - - SendAttributeNotify(pContext, stuff->type); - - return result; -} - -static int -ProcXpGetOneAttribute(ClientPtr client) -{ - REQUEST(xPrintGetOneAttributeReq); - XpContextPtr pContext; - char *value, *attrName; - xPrintGetOneAttributeReply *pRep; - int totalSize; - int n; - unsigned long l; - - REQUEST_AT_LEAST_SIZE(xPrintGetOneAttributeReq); - - totalSize = ((sz_xPrintGetOneAttributeReq) >> 2) + - ((stuff->nameLen + 3) >> 2); - if(totalSize != client->req_len) - return BadLength; - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - if((attrName = (char *)malloc(stuff->nameLen + 1)) == (char *)NULL) - return BadAlloc; - strncpy(attrName, (char *)(stuff+1), stuff->nameLen); - attrName[stuff->nameLen] = (char)'\0'; - - if(stuff->type != XPServerAttr) - { - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetOneAttribute == 0) - return BadImplementation; - if((value = (*pContext->funcs.GetOneAttribute)(pContext, stuff->type, - attrName)) == (char *)NULL) - return BadAlloc; - } - else - { - if((value = XpGetOneAttribute((XpContextPtr)NULL, XPServerAttr, - attrName)) == (char *)NULL) - return BadAlloc; - } - - free(attrName); - - totalSize = sz_xPrintGetOneAttributeReply + QUADPAD(strlen(value)); - if((pRep = (xPrintGetOneAttributeReply *)malloc(totalSize)) == - (xPrintGetOneAttributeReply *)NULL) - return BadAlloc; - - pRep->type = X_Reply; - pRep->length = (totalSize - sz_xPrintGetOneAttributeReply) >> 2; - pRep->sequenceNumber = client->sequence; - pRep->valueLen = strlen(value); - - if (client->swapped) { - swaps(&pRep->sequenceNumber, n); - swapl(&pRep->length, l); - swapl(&pRep->valueLen, l); - } - - strncpy((char*)(pRep + 1), value, strlen(value)); - - WriteToClient(client, totalSize, (char *)pRep); - - xfree(pRep); - - return client->noClientException; -} - -/******************************************************************************* - * - * Print Event requests: SelectInput InputSelected, SendXpNotify - * - ******************************************************************************/ - - -static int -ProcXpSelectInput(ClientPtr client) -{ - REQUEST(xPrintSelectInputReq); - int result = Success; - XpContextPtr pContext; - XpClientPtr pPrintClient; - - REQUEST_SIZE_MATCH(xPrintSelectInputReq); - - /* - * Check to see that the supplied XID is really a valid print context - * in this server. - */ - if((pContext=(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(stuff->eventMask & ~allEvents) - { - client->errorValue = stuff->eventMask; - return BadValue; /* bogus event mask bits */ - } - - if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL) - return BadAlloc; - - pPrintClient->eventMask = stuff->eventMask; - - return result; -} - -static int -ProcXpInputSelected(ClientPtr client) -{ - REQUEST(xPrintInputSelectedReq); - xPrintInputSelectedReply rep; - register int n; - long l; - XpClientPtr pXpClient; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintInputSelectedReq); - - if((pContext=(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - SecurityReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - pXpClient = FindClient(pContext, client); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.eventMask = (pXpClient != (XpClientPtr)NULL)? pXpClient->eventMask : 0; - rep.allEventsMask = GetAllEventMasks(pContext); - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.eventMask, l); - swapl(&rep.allEventsMask, l); - } - - WriteToClient(client, sz_xPrintInputSelectedReply, (char *)&rep); - return client->noClientException; -} - -static void -SendAttributeNotify(XpContextPtr pContext, int which) -{ - XpClientPtr pXpClient; - xPrintAttributeEvent ae; - ClientPtr client; - - pXpClient = pContext->clientHead; - if(pXpClient == (XpClientPtr)NULL) - return; /* Nobody's interested in the events (or this context). */ - - for (pXpClient = pContext->clientHead; - pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - client = pXpClient->client; - if (client == serverClient || client->clientGone || - !(pXpClient->eventMask & XPAttributeMask)) - continue; - ae.type = XPAttributeNotify + XpEventBase; - ae.detail = which; - ae.printContext = pContext->contextID; - ae.sequenceNumber = client->sequence; - WriteEventsToClient (client, 1, (xEvent *) &ae); - } -} - -static void -SendXpNotify(XpContextPtr pContext, int which, int val) -{ - XpClientPtr pXpClient; - xPrintPrintEvent pe; - ClientPtr client; - - pXpClient = pContext->clientHead; - if(pXpClient == (XpClientPtr)NULL) - return; /* Nobody's interested in the events (or this context). */ - - for (pXpClient = pContext->clientHead; - pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - client = pXpClient->client; - if (client == serverClient || client->clientGone || - !(pXpClient->eventMask & XPPrintMask)) - continue; - pe.type = XPPrintNotify + XpEventBase; - pe.detail = which; - pe.printContext = pContext->contextID; - pe.cancel = (Bool)val; - pe.sequenceNumber = client->sequence; - WriteEventsToClient (client, 1, (xEvent *) &pe); - } -} - -static CARD32 -GetAllEventMasks(XpContextPtr pContext) -{ - XpClientPtr pPrintClient; - CARD32 totalMask = (CARD32)0; - - for (pPrintClient = pContext->clientHead; - pPrintClient != (XpClientPtr)NULL; - pPrintClient = pPrintClient->pNext) - { - totalMask |= pPrintClient->eventMask; - } - return totalMask; -} - -/* - * XpContextOfClient - returns the XpContextPtr to the context - * associated with the specified client, or NULL if the client - * does not currently have a context set. - */ -XpContextPtr -XpContextOfClient(ClientPtr client) -{ - return (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr; -} - - -/******************************************************************************* - * - * Swap-request functions - * - ******************************************************************************/ - -static int -SProcXpCreateContext(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintCreateContextReq); - - swaps(&stuff->length, i); - swapl(&stuff->contextID, n); - swapl(&stuff->printerNameLen, n); - swapl(&stuff->localeLen, n); - return ProcXpCreateContext(client); -} - -static int -SProcXpGetPrinterList(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintGetPrinterListReq); - - swaps(&stuff->length, i); - swapl(&stuff->printerNameLen, n); - swapl(&stuff->localeLen, n); - return ProcXpGetPrinterList(client); -} - -static int -SProcXpRehashPrinterList(ClientPtr client) -{ - int i; - - REQUEST(xPrintRehashPrinterListReq); - swaps(&stuff->length, i); - return ProcXpRehashPrinterList(client); -} - -static int -SProcXpSetContext(ClientPtr client) -{ - int i; - - REQUEST(xPrintSetContextReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, i); - return ProcXpSetContext(client); -} - -static int -SProcXpGetContext(ClientPtr client) -{ - int i; - - REQUEST(xPrintGetContextReq); - swaps(&stuff->length, i); - return ProcXpGetContext(client); -} - -static int -SProcXpDestroyContext(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintDestroyContextReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpDestroyContext(client); -} - -static int -SProcXpGetContextScreen(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintGetContextScreenReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetContextScreen(client); -} - -static int -SProcXpInputSelected(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintInputSelectedReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpInputSelected(client); -} - -static int -SProcXpStartJob(ClientPtr client) -{ - int i; - - REQUEST(xPrintStartJobReq); - swaps(&stuff->length, i); - return ProcXpStartJob(client); -} - -static int -SProcXpEndJob(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndJobReq); - swaps(&stuff->length, i); - return ProcXpEndJob(client); -} - -static int -SProcXpStartDoc(ClientPtr client) -{ - int i; - - REQUEST(xPrintStartDocReq); - swaps(&stuff->length, i); - return ProcXpStartDoc(client); -} - -static int -SProcXpEndDoc(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndDocReq); - swaps(&stuff->length, i); - return ProcXpEndDoc(client); -} - -static int -SProcXpStartPage(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintStartPageReq); - swaps(&stuff->length, i); - swapl(&stuff->window, n); - return ProcXpStartPage(client); -} - -static int -SProcXpEndPage(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndPageReq); - swaps(&stuff->length, i); - return ProcXpEndPage(client); -} - -static int -SProcXpPutDocumentData(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintPutDocumentDataReq); - swaps(&stuff->length, i); - swapl(&stuff->drawable, n); - swapl(&stuff->len_data, n); - swaps(&stuff->len_fmt, i); - swaps(&stuff->len_options, i); - return ProcXpPutDocumentData(client); -} - -static int -SProcXpGetDocumentData(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetDocumentDataReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->maxBufferSize, n); - return ProcXpGetDocumentData(client); -} - -static int -SProcXpGetAttributes(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetAttributesReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetAttributes(client); -} - -static int -SProcXpSetAttributes(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSetAttributesReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->stringLen, n); - return ProcXpSetAttributes(client); -} - -static int -SProcXpGetOneAttribute(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetOneAttributeReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->nameLen, n); - return ProcXpGetOneAttribute(client); -} - -static int -SProcXpSelectInput(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSelectInputReq); - swaps(&stuff->length, i); - swapl(&stuff->eventMask, n); - swapl(&stuff->printContext, n); - return ProcXpSelectInput(client); -} - -static int -SProcXpGetPageDimensions(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetPageDimensionsReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetPageDimensions(client); -} - -static int -SProcXpSetImageResolution(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSetImageResolutionReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swaps(&stuff->imageRes, i); - return ProcXpSetImageResolution(client); -} - -static int -SProcXpGetImageResolution(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetImageResolutionReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetImageResolution(client); -} - -static void -SwapXpNotifyEvent(xPrintPrintEvent *src, xPrintPrintEvent *dst) -{ - /* - * Swap the sequence number and context fields. - */ - cpswaps(src->sequenceNumber, dst->sequenceNumber); - cpswapl(src->printContext, dst->printContext); - - /* - * Copy the byte-long fields. - */ - dst->type = src->type; - dst->detail = src->detail; - dst->cancel = src->cancel; -} - -static void -SwapXpAttributeEvent(xPrintAttributeEvent *src, xPrintAttributeEvent *dst) -{ - /* - * Swap the sequence number and context fields. - */ - cpswaps(src->sequenceNumber, dst->sequenceNumber); - cpswapl(src->printContext, dst->printContext); - - /* - * Copy the byte-long fields. - */ - dst->type = src->type; - dst->detail = src->detail; -} diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile index 529e5623e..a0d420851 100644 --- a/nx-X11/programs/Xserver/dix/Imakefile +++ b/nx-X11/programs/Xserver/dix/Imakefile @@ -7,10 +7,8 @@ XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.17 2003/04/15 18:30:43 ala #include -#if !BuildXprint || PrintOnlyServer XPSRC = xpstubs.c XPOBJ = xpstubs.o -#endif #if !HasFfs FFS_SRC = ffs.c @@ -27,7 +25,7 @@ OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) \ - -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx -I../Xprint + -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx LINTLIBS = ../os/llib-los.ln /* @@ -94,8 +92,6 @@ SpecialCObjectRule(pixmap,$(ICONFIGFILES),$(_NOOP_)) SpecialCObjectRule(privates,$(ICONFIGFILES),$(_NOOP_)) SpecialCObjectRule(window,$(ICONFIGFILES),$(QUARTZ_DEFINES)) -#if !BuildXprint || PrintOnlyServer NormalLibraryTarget(xpstubs,$(XPOBJ)) -#endif DependTarget() diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c index 6a8f79a96..270de6ced 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -104,9 +104,6 @@ Equipment Corporation. #include "site.h" #include "dixfont.h" #include "extnsionst.h" -#ifdef XPRINT -#include "DiPrint.h" -#endif #ifdef PANORAMIX #include "panoramiXsrv.h" #else @@ -255,9 +252,6 @@ main(int argc, char *argv[], char *envp[]) display = "0"; InitGlobals(); -#ifdef XPRINT - PrinterInitGlobals(); -#endif /* Quartz support on Mac OS X requires that the Cocoa event loop be in * the main thread. This allows the X server main to be called again @@ -370,9 +364,6 @@ main(int argc, char *argv[], char *envp[]) InitCallbackManager(); InitVisualWrap(); InitOutput(&screenInfo, argc, argv); -#ifdef XPRINT - PrinterInitOutput(&screenInfo, argc, argv); -#endif if (screenInfo.numScreens < 1) FatalError("no screens found"); diff --git a/nx-X11/programs/Xserver/dix/xpstubs.c b/nx-X11/programs/Xserver/dix/xpstubs.c index 5135cc398..89481c601 100644 --- a/nx-X11/programs/Xserver/dix/xpstubs.c +++ b/nx-X11/programs/Xserver/dix/xpstubs.c @@ -33,9 +33,6 @@ from The Open Group. #include "misc.h" #include -#ifdef XPRINT -#include "DiPrint.h" -#endif Bool XpClientIsBitmapClient( @@ -51,27 +48,3 @@ XpClientIsPrintClient( { return FALSE; } -#ifdef XPRINT -int -PrinterOptions( - int argc, - char **argv, - int i) -{ - return i; -} -void -PrinterInitOutput( - ScreenInfo *pScreenInfo, - int argc, - char **argv) -{ -} -void PrinterUseMsg(void) -{ -} -void PrinterInitGlobals(void) -{ -} -#endif /* XPRINT */ - diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 6c075fa9f..874e82565 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -66,6 +66,7 @@ SRCS = NXwindow.c \ Composite.c \ Pixels.c \ stubs.c \ + xpstubs.c \ miinitext.c \ $(SRCS1) @@ -128,6 +129,7 @@ OBJS = NXwindow.o \ Composite.o \ Pixels.o \ stubs.o \ + xpstubs.o \ miinitext.o \ $(OBJS1) @@ -220,6 +222,7 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) $(NX_DEFINES) \ all:: $(OBJS) LinkSourceFile(stubs.c,$(SERVERSRC)/Xi) +LinkSourceFile(xpstubs.c,$(SERVERSRC)/dix) SpecialCObjectRule(Init,$(ICONFIGFILES),$(_NOOP_)) LinkSourceFile(miinitext.c,$(SERVERSRC)/mi) SpecialCObjectRule(miinitext,$(ICONFIGFILES), $(_NOOP_)) diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index f3be9da5d..b70a6a67e 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -73,34 +73,6 @@ SOFTWARE. #undef GLXEXT #endif -/* Make sure Xprt only announces extensions it supports */ -#ifdef PRINT_ONLY_SERVER -#undef MITSHM /* this is incompatible to the vector-based Xprint DDX */ -#undef XKB -#undef PANORAMIX -#undef RES -#undef XINPUT -#undef XV -#undef SCREENSAVER -#undef XIDLE -#undef XRECORD -#undef XF86VIDMODE -#undef XF86MISC -#undef XFreeXDGA -#undef XF86DRI -#undef DPMSExtension -#undef DPSEXT -#undef FONTCACHE -#undef DAMAGE -#undef XFIXES -#undef XEVIE -#else -#ifndef LOADABLEPRINTDDX -#undef XPRINT -#endif /* LOADABLEPRINTDDX */ -#endif /* PRINT_ONLY_SERVER */ - - extern Bool noTestExtensions; #ifdef BIGREQS @@ -232,9 +204,6 @@ typedef void (*InitExtension)(INITARGS); #define _XLBX_SERVER_ #include #endif -#ifdef XPRINT -#include "Print.h" -#endif #ifdef XAPPGROUP #define _XAG_SERVER_ #include @@ -321,9 +290,6 @@ extern void XagExtensionInit(INITARGS); #ifdef XCSECURITY extern void SecurityExtensionInit(INITARGS); #endif -#ifdef XPRINT -extern void XpExtensionInit(INITARGS); -#endif #ifdef XF86BIGFONT extern void XFree86BigfontExtensionInit(INITARGS); #endif @@ -606,9 +572,6 @@ InitExtensions(argc, argv) #ifdef XCSECURITY if (!noSecurityExtension) SecurityExtensionInit(); #endif -#ifdef XPRINT - XpExtensionInit(); /* server-specific extension, cannot be disabled */ -#endif #ifdef TOGCUP if (!noXcupExtension) XcupExtensionInit(); #endif @@ -642,11 +605,6 @@ InitExtensions(argc, argv) if (!noGlxExtension) DarwinGlxExtensionInit(); #endif #endif -#ifdef DPSEXT -#ifndef XPRINT - if (!noDPSExtension) DPSExtensionInit(); -#endif -#endif #ifdef XFIXES /* must be before Render to layer DisplayCursor correctly */ if (!noXFixesExtension) XFixesExtensionInit(); @@ -717,9 +675,6 @@ static ExtensionModule staticExtensions[] = { #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif -#ifdef XPRINT - { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, -#endif #ifdef PANORAMIX { PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL }, #endif diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile index 22be06074..55f8e41fb 100644 --- a/nx-X11/programs/Xserver/os/Imakefile +++ b/nx-X11/programs/Xserver/os/Imakefile @@ -166,7 +166,7 @@ BOOTSTRAPCFLAGS = $(RANDOM_DEFINES) $(BUGMSG) $(XTRANS_FAILDEFINES) $(NX_DEFINES) INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(FONTINCSRC) -I$(SERVERSRC)/render \ - -I$(TOP)/lib/Xau -I../lbx -I../Xprint Krb5Includes $(NX_INCLUDES) + -I$(TOP)/lib/Xau -I../lbx Krb5Includes $(NX_INCLUDES) DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \ $(TRANS_INCLUDES) $(CONNECTION_FLAGS) $(GETPEER_DEFINES) \ DependDefines diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 79e49d5b1..5f189c949 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -147,10 +147,6 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "picture.h" #endif -#ifdef XPRINT -#include "DiPrint.h" -#endif - Bool noTestExtensions; #ifdef BIGREQS Bool noBigReqExtension = FALSE; @@ -690,9 +686,6 @@ void UseMsg(void) ErrorF("-s # screen-saver timeout (minutes)\n"); #ifdef XCSECURITY ErrorF("-sp file security policy file\n"); -#endif -#ifdef XPRINT - PrinterUseMsg(); #endif ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); @@ -1102,12 +1095,6 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif -#ifdef XPRINT - else if ((skip = PrinterOptions(argc, argv, i)) != i) - { - i = skip - 1; - } -#endif #ifdef XCSECURITY else if ((skip = XSecurityOptions(argc, argv, i)) != i) { diff --git a/nx-libs.spec b/nx-libs.spec index ad9a09b5f..2e6c5da4c 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -1005,8 +1005,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_includedir}/nx/X11/ap_keysym.h %{_includedir}/nx/X11/keysym.h %{_includedir}/nx/X11/keysymdef.h -%{_includedir}/nx/X11/extensions/Print.h -%{_includedir}/nx/X11/extensions/Printstr.h %{_includedir}/nx/X11/extensions/XI.h %{_includedir}/nx/X11/extensions/XIproto.h %{_includedir}/nx/X11/extensions/XResproto.h -- cgit v1.2.3 From 2f4d7dbb4d2fae7f6f376f7d2f032a9a0e4cea45 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 11 Apr 2015 17:38:02 +0200 Subject: fix for libXpm4-cleanup --- debian/rules | 1 - 1 file changed, 1 deletion(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 445f015cf..e58b79121 100755 --- a/debian/rules +++ b/debian/rules @@ -88,7 +88,6 @@ override_dh_strip: dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg - dh_strip -plibnx-xpm4 --dbg-package=libnx-xpm4-dbg dh_strip -plibnx-xrandr2 --dbg-package=libnx-xrandr2-dbg dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg dh_strip -plibnx-xtst6 --dbg-package=libnx-xtst6-dbg -- cgit v1.2.3 From 70b77a0fc329e2e205a596a738c7307d354e7b1c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 14 Apr 2015 09:24:55 +0200 Subject: library clean-up: Don't build and link libXfont.a anymore. Use system's libXfont shared library and link dynamically. --- debian/control | 4 +- debian/rules | 1 - nx-X11/Imakefile | 3 - nx-X11/config/cf/Imake.rules | 21 - nx-X11/config/cf/Imake.tmpl | 8 - nx-X11/config/cf/README | 8 - nx-X11/config/cf/X11.tmpl | 1036 +------ nx-X11/config/cf/host.def | 150 - nx-X11/config/cf/linux.cf | 8 - nx-X11/config/cf/xf86site.def | 111 - nx-X11/config/cf/xfree86.cf | 52 - nx-X11/config/cf/xorg.cf | 52 - nx-X11/config/cf/xorgsite.def | 137 - nx-X11/include/Imakefile | 2 +- nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/fonts/FS.h | 132 - nx-X11/include/fonts/FSproto.h | 816 ------ nx-X11/include/fonts/Imakefile | 22 - nx-X11/include/fonts/font.h | 169 -- nx-X11/include/fonts/fontproto.h | 93 - nx-X11/include/fonts/fontstruct.h | 295 -- nx-X11/include/fonts/fsmasks.h | 98 - nx-X11/lib/Imakefile | 36 +- nx-X11/lib/Xrender/Imakefile | 7 - nx-X11/lib/font/Imakefile | 178 -- nx-X11/lib/font/Speedo/Imakefile | 46 - nx-X11/lib/font/Speedo/adobe-iso.h | 200 -- nx-X11/lib/font/Speedo/bics-iso.h | 224 -- nx-X11/lib/font/Speedo/bics-unicode.c | 138 - nx-X11/lib/font/Speedo/bics-unicode.h | 3 - nx-X11/lib/font/Speedo/do_char.c | 1016 ------- nx-X11/lib/font/Speedo/do_trns.c | 512 ---- nx-X11/lib/font/Speedo/htest.c | 361 --- nx-X11/lib/font/Speedo/iface.c | 650 ----- nx-X11/lib/font/Speedo/keys.h | 56 - nx-X11/lib/font/Speedo/module/Imakefile | 47 - nx-X11/lib/font/Speedo/module/speedomod.c | 72 - nx-X11/lib/font/Speedo/nsample.c | 745 ----- nx-X11/lib/font/Speedo/out_bl2d.c | 772 ----- nx-X11/lib/font/Speedo/out_blk.c | 706 ----- nx-X11/lib/font/Speedo/out_outl.c | 290 -- nx-X11/lib/font/Speedo/out_scrn.c | 1090 ------- nx-X11/lib/font/Speedo/out_util.c | 341 --- nx-X11/lib/font/Speedo/reset.c | 131 - nx-X11/lib/font/Speedo/set_spcs.c | 773 ----- nx-X11/lib/font/Speedo/set_trns.c | 1324 --------- nx-X11/lib/font/Speedo/spdo_prv.h | 421 --- nx-X11/lib/font/Speedo/speedo.h | 890 ------ nx-X11/lib/font/Speedo/spencode.c | 67 - nx-X11/lib/font/Speedo/sperr.c | 127 - nx-X11/lib/font/Speedo/spfile.c | 460 --- nx-X11/lib/font/Speedo/spfont.c | 453 --- nx-X11/lib/font/Speedo/spfuncs.c | 167 -- nx-X11/lib/font/Speedo/spglyph.c | 399 --- nx-X11/lib/font/Speedo/spinfo.c | 462 --- nx-X11/lib/font/Speedo/spint.h | 180 -- nx-X11/lib/font/Speedo/sptobdf.c | 678 ----- nx-X11/lib/font/Speedo/useropt.h | 41 - nx-X11/lib/font/Type1/AFM.h | 62 - nx-X11/lib/font/Type1/Imakefile | 91 - nx-X11/lib/font/Type1/afm.c | 200 -- nx-X11/lib/font/Type1/arith.c | 486 ---- nx-X11/lib/font/Type1/arith.h | 77 - nx-X11/lib/font/Type1/blues.h | 95 - nx-X11/lib/font/Type1/cidchar.c | 621 ---- nx-X11/lib/font/Type1/cluts.h | 35 - nx-X11/lib/font/Type1/curves.c | 228 -- nx-X11/lib/font/Type1/curves.h | 44 - nx-X11/lib/font/Type1/digit.h | 64 - nx-X11/lib/font/Type1/fontfcn.c | 709 ----- nx-X11/lib/font/Type1/fontfcn.h | 250 -- nx-X11/lib/font/Type1/fonts.h | 49 - nx-X11/lib/font/Type1/hdigit.h | 94 - nx-X11/lib/font/Type1/hints.c | 890 ------ nx-X11/lib/font/Type1/hints.h | 48 - nx-X11/lib/font/Type1/lines.c | 189 -- nx-X11/lib/font/Type1/lines.h | 39 - nx-X11/lib/font/Type1/minimain.c | 48 - nx-X11/lib/font/Type1/module/Imakefile | 99 - nx-X11/lib/font/Type1/module/type1mod.c | 91 - nx-X11/lib/font/Type1/objects.c | 1101 ------- nx-X11/lib/font/Type1/objects.h | 354 --- nx-X11/lib/font/Type1/paths.c | 1406 --------- nx-X11/lib/font/Type1/paths.h | 239 -- nx-X11/lib/font/Type1/pictures.h | 50 - nx-X11/lib/font/Type1/range.h | 48 - nx-X11/lib/font/Type1/regions.c | 1651 ----------- nx-X11/lib/font/Type1/regions.h | 250 -- nx-X11/lib/font/Type1/scanfont.c | 2370 --------------- nx-X11/lib/font/Type1/spaces.c | 998 ------- nx-X11/lib/font/Type1/spaces.h | 172 -- nx-X11/lib/font/Type1/strokes.h | 38 - nx-X11/lib/font/Type1/t1funcs.c | 1668 ----------- nx-X11/lib/font/Type1/t1hdigit.h | 40 - nx-X11/lib/font/Type1/t1imager.h | 84 - nx-X11/lib/font/Type1/t1info.c | 1096 ------- nx-X11/lib/font/Type1/t1intf.h | 143 - nx-X11/lib/font/Type1/t1io.c | 388 --- nx-X11/lib/font/Type1/t1malloc.c | 759 ----- nx-X11/lib/font/Type1/t1snap.c | 85 - nx-X11/lib/font/Type1/t1stdio.h | 101 - nx-X11/lib/font/Type1/t1stub.c | 56 - nx-X11/lib/font/Type1/t1test.c | 246 -- nx-X11/lib/font/Type1/t1unicode.c | 251 -- nx-X11/lib/font/Type1/t1unicode.h | 25 - nx-X11/lib/font/Type1/token.c | 1208 -------- nx-X11/lib/font/Type1/token.h | 79 - nx-X11/lib/font/Type1/tokst.h | 510 ---- nx-X11/lib/font/Type1/trig.h | 41 - nx-X11/lib/font/Type1/type1.c | 1892 ------------ nx-X11/lib/font/Type1/util.c | 222 -- nx-X11/lib/font/Type1/util.h | 217 -- nx-X11/lib/font/bitmap/Imakefile | 71 - nx-X11/lib/font/bitmap/bdfint.h | 90 - nx-X11/lib/font/bitmap/bdfread.c | 967 ------- nx-X11/lib/font/bitmap/bdfutils.c | 340 --- nx-X11/lib/font/bitmap/bitmap.c | 160 -- nx-X11/lib/font/bitmap/bitmapfunc.c | 240 -- nx-X11/lib/font/bitmap/bitmaputil.c | 232 -- nx-X11/lib/font/bitmap/bitscale.c | 1978 ------------- nx-X11/lib/font/bitmap/fontink.c | 219 -- nx-X11/lib/font/bitmap/module/Imakefile | 45 - nx-X11/lib/font/bitmap/module/bitmapmod.c | 76 - nx-X11/lib/font/bitmap/pcf.h | 100 - nx-X11/lib/font/bitmap/pcfread.c | 997 ------- nx-X11/lib/font/bitmap/pcfwrite.c | 468 --- nx-X11/lib/font/bitmap/snfread.c | 514 ---- nx-X11/lib/font/bitmap/snfstr.h | 185 -- nx-X11/lib/font/builtins/Imakefile | 17 - nx-X11/lib/font/builtins/buildfont | 14 - nx-X11/lib/font/builtins/builtin.h | 60 - nx-X11/lib/font/builtins/dir.c | 64 - nx-X11/lib/font/builtins/file.c | 139 - nx-X11/lib/font/builtins/fonts.c | 2438 ---------------- nx-X11/lib/font/builtins/fpe.c | 98 - nx-X11/lib/font/builtins/render.c | 114 - nx-X11/lib/font/fc/Imakefile | 31 - nx-X11/lib/font/fc/fsconvert.c | 774 ----- nx-X11/lib/font/fc/fserve.c | 3480 ----------------------- nx-X11/lib/font/fc/fserve.h | 96 - nx-X11/lib/font/fc/fservestr.h | 211 -- nx-X11/lib/font/fc/fsio.c | 516 ---- nx-X11/lib/font/fc/fsio.h | 187 -- nx-X11/lib/font/fc/fsio.h.NX.reference | 191 -- nx-X11/lib/font/fc/fsio.h.XF86.reference | 187 -- nx-X11/lib/font/fc/fslibos.h | 216 -- nx-X11/lib/font/fontcache/Imakefile | 29 - nx-X11/lib/font/fontcache/fcqueue.h | 133 - nx-X11/lib/font/fontcache/fontcache.c | 1022 ------- nx-X11/lib/font/fontcache/fontcache.h | 121 - nx-X11/lib/font/fontfile/Imakefile | 81 - nx-X11/lib/font/fontfile/bitsource.c | 174 -- nx-X11/lib/font/fontfile/bufio.c | 212 -- nx-X11/lib/font/fontfile/decompress.c | 415 --- nx-X11/lib/font/fontfile/defaults.c | 77 - nx-X11/lib/font/fontfile/dirfile.c | 495 ---- nx-X11/lib/font/fontfile/encparse.c | 966 ------- nx-X11/lib/font/fontfile/ffcheck.c | 171 -- nx-X11/lib/font/fontfile/fileio.c | 90 - nx-X11/lib/font/fontfile/filewr.c | 65 - nx-X11/lib/font/fontfile/fontdir.c | 832 ------ nx-X11/lib/font/fontfile/fontenc.c | 952 ------- nx-X11/lib/font/fontfile/fontencI.h | 46 - nx-X11/lib/font/fontfile/fontencc.c | 77 - nx-X11/lib/font/fontfile/fontfile.c | 1147 -------- nx-X11/lib/font/fontfile/fontscale.c | 447 --- nx-X11/lib/font/fontfile/gunzip.c | 227 -- nx-X11/lib/font/fontfile/module/Imakefile | 21 - nx-X11/lib/font/fontfile/printerfont.c | 178 -- nx-X11/lib/font/fontfile/register.c | 107 - nx-X11/lib/font/fontfile/renderers.c | 117 - nx-X11/lib/font/include/Imakefile | 11 - nx-X11/lib/font/include/bitmap.h | 116 - nx-X11/lib/font/include/bufio.h | 92 - nx-X11/lib/font/include/fntfil.h | 178 -- nx-X11/lib/font/include/fntfilio.h | 56 - nx-X11/lib/font/include/fntfilst.h | 198 -- nx-X11/lib/font/include/fontencc.h | 36 - nx-X11/lib/font/include/fontmisc.h | 133 - nx-X11/lib/font/include/fontmod.h | 16 - nx-X11/lib/font/include/fontshow.h | 37 - nx-X11/lib/font/include/fontutil.h | 26 - nx-X11/lib/font/include/fontxlfd.h | 100 - nx-X11/lib/font/stubs/Imakefile | 25 - nx-X11/lib/font/stubs/cauthgen.c | 14 - nx-X11/lib/font/stubs/csignal.c | 14 - nx-X11/lib/font/stubs/delfntcid.c | 13 - nx-X11/lib/font/stubs/errorf.c | 13 - nx-X11/lib/font/stubs/fatalerror.c | 13 - nx-X11/lib/font/stubs/findoldfnt.c | 14 - nx-X11/lib/font/stubs/getcres.c | 14 - nx-X11/lib/font/stubs/getdefptsize.c | 14 - nx-X11/lib/font/stubs/getnewfntcid.c | 14 - nx-X11/lib/font/stubs/gettime.c | 14 - nx-X11/lib/font/stubs/initfshdl.c | 15 - nx-X11/lib/font/stubs/regfpefunc.c | 28 - nx-X11/lib/font/stubs/rmfshdl.c | 15 - nx-X11/lib/font/stubs/servclient.c | 3 - nx-X11/lib/font/stubs/setfntauth.c | 14 - nx-X11/lib/font/stubs/stfntcfnt.c | 14 - nx-X11/lib/font/stubs/stubs.h | 27 - nx-X11/lib/font/stubs/xpstubs.c | 24 - nx-X11/lib/font/util/Imakefile | 43 - nx-X11/lib/font/util/atom.c | 233 -- nx-X11/lib/font/util/fontaccel.c | 107 - nx-X11/lib/font/util/fontnames.c | 123 - nx-X11/lib/font/util/fontutil.c | 443 --- nx-X11/lib/font/util/fontxlfd.c | 637 ----- nx-X11/lib/font/util/format.c | 126 - nx-X11/lib/font/util/miscutil.c | 99 - nx-X11/lib/font/util/patcache.c | 221 -- nx-X11/lib/font/util/private.c | 107 - nx-X11/lib/font/util/utilbitmap.c | 188 -- nx-X11/programs/Xserver/GL/glx/Imakefile | 2 +- nx-X11/programs/Xserver/Imakefile | 26 +- nx-X11/programs/Xserver/Xext/Imakefile | 4 +- nx-X11/programs/Xserver/Xext/extmod/Imakefile | 2 +- nx-X11/programs/Xserver/composite/Imakefile | 2 +- nx-X11/programs/Xserver/dix/Imakefile | 2 +- nx-X11/programs/Xserver/dix/dixfonts.c | 17 +- nx-X11/programs/Xserver/fb/Imakefile | 2 +- nx-X11/programs/Xserver/hw/nxagent/Font.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Font.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/GC.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 13 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 18 +- nx-X11/programs/Xserver/mi/Imakefile | 4 +- nx-X11/programs/Xserver/miext/damage/Imakefile | 2 +- nx-X11/programs/Xserver/os/Imakefile | 2 +- nx-X11/programs/Xserver/randr/Imakefile | 4 +- nx-X11/programs/Xserver/render/Imakefile | 4 +- nx-libs.spec | 33 +- 233 files changed, 50 insertions(+), 67022 deletions(-) delete mode 100644 nx-X11/include/fonts/FS.h delete mode 100644 nx-X11/include/fonts/FSproto.h delete mode 100644 nx-X11/include/fonts/Imakefile delete mode 100644 nx-X11/include/fonts/font.h delete mode 100644 nx-X11/include/fonts/fontproto.h delete mode 100644 nx-X11/include/fonts/fontstruct.h delete mode 100644 nx-X11/include/fonts/fsmasks.h delete mode 100644 nx-X11/lib/font/Imakefile delete mode 100644 nx-X11/lib/font/Speedo/Imakefile delete mode 100644 nx-X11/lib/font/Speedo/adobe-iso.h delete mode 100644 nx-X11/lib/font/Speedo/bics-iso.h delete mode 100644 nx-X11/lib/font/Speedo/bics-unicode.c delete mode 100644 nx-X11/lib/font/Speedo/bics-unicode.h delete mode 100644 nx-X11/lib/font/Speedo/do_char.c delete mode 100644 nx-X11/lib/font/Speedo/do_trns.c delete mode 100644 nx-X11/lib/font/Speedo/htest.c delete mode 100644 nx-X11/lib/font/Speedo/iface.c delete mode 100644 nx-X11/lib/font/Speedo/keys.h delete mode 100644 nx-X11/lib/font/Speedo/module/Imakefile delete mode 100644 nx-X11/lib/font/Speedo/module/speedomod.c delete mode 100644 nx-X11/lib/font/Speedo/nsample.c delete mode 100644 nx-X11/lib/font/Speedo/out_bl2d.c delete mode 100644 nx-X11/lib/font/Speedo/out_blk.c delete mode 100644 nx-X11/lib/font/Speedo/out_outl.c delete mode 100644 nx-X11/lib/font/Speedo/out_scrn.c delete mode 100644 nx-X11/lib/font/Speedo/out_util.c delete mode 100644 nx-X11/lib/font/Speedo/reset.c delete mode 100644 nx-X11/lib/font/Speedo/set_spcs.c delete mode 100644 nx-X11/lib/font/Speedo/set_trns.c delete mode 100644 nx-X11/lib/font/Speedo/spdo_prv.h delete mode 100644 nx-X11/lib/font/Speedo/speedo.h delete mode 100644 nx-X11/lib/font/Speedo/spencode.c delete mode 100644 nx-X11/lib/font/Speedo/sperr.c delete mode 100644 nx-X11/lib/font/Speedo/spfile.c delete mode 100644 nx-X11/lib/font/Speedo/spfont.c delete mode 100644 nx-X11/lib/font/Speedo/spfuncs.c delete mode 100644 nx-X11/lib/font/Speedo/spglyph.c delete mode 100644 nx-X11/lib/font/Speedo/spinfo.c delete mode 100644 nx-X11/lib/font/Speedo/spint.h delete mode 100644 nx-X11/lib/font/Speedo/sptobdf.c delete mode 100644 nx-X11/lib/font/Speedo/useropt.h delete mode 100644 nx-X11/lib/font/Type1/AFM.h delete mode 100644 nx-X11/lib/font/Type1/Imakefile delete mode 100644 nx-X11/lib/font/Type1/afm.c delete mode 100644 nx-X11/lib/font/Type1/arith.c delete mode 100644 nx-X11/lib/font/Type1/arith.h delete mode 100644 nx-X11/lib/font/Type1/blues.h delete mode 100644 nx-X11/lib/font/Type1/cidchar.c delete mode 100644 nx-X11/lib/font/Type1/cluts.h delete mode 100644 nx-X11/lib/font/Type1/curves.c delete mode 100644 nx-X11/lib/font/Type1/curves.h delete mode 100644 nx-X11/lib/font/Type1/digit.h delete mode 100644 nx-X11/lib/font/Type1/fontfcn.c delete mode 100644 nx-X11/lib/font/Type1/fontfcn.h delete mode 100644 nx-X11/lib/font/Type1/fonts.h delete mode 100644 nx-X11/lib/font/Type1/hdigit.h delete mode 100644 nx-X11/lib/font/Type1/hints.c delete mode 100644 nx-X11/lib/font/Type1/hints.h delete mode 100644 nx-X11/lib/font/Type1/lines.c delete mode 100644 nx-X11/lib/font/Type1/lines.h delete mode 100644 nx-X11/lib/font/Type1/minimain.c delete mode 100644 nx-X11/lib/font/Type1/module/Imakefile delete mode 100644 nx-X11/lib/font/Type1/module/type1mod.c delete mode 100644 nx-X11/lib/font/Type1/objects.c delete mode 100644 nx-X11/lib/font/Type1/objects.h delete mode 100644 nx-X11/lib/font/Type1/paths.c delete mode 100644 nx-X11/lib/font/Type1/paths.h delete mode 100644 nx-X11/lib/font/Type1/pictures.h delete mode 100644 nx-X11/lib/font/Type1/range.h delete mode 100644 nx-X11/lib/font/Type1/regions.c delete mode 100644 nx-X11/lib/font/Type1/regions.h delete mode 100644 nx-X11/lib/font/Type1/scanfont.c delete mode 100644 nx-X11/lib/font/Type1/spaces.c delete mode 100644 nx-X11/lib/font/Type1/spaces.h delete mode 100644 nx-X11/lib/font/Type1/strokes.h delete mode 100644 nx-X11/lib/font/Type1/t1funcs.c delete mode 100644 nx-X11/lib/font/Type1/t1hdigit.h delete mode 100644 nx-X11/lib/font/Type1/t1imager.h delete mode 100644 nx-X11/lib/font/Type1/t1info.c delete mode 100644 nx-X11/lib/font/Type1/t1intf.h delete mode 100644 nx-X11/lib/font/Type1/t1io.c delete mode 100644 nx-X11/lib/font/Type1/t1malloc.c delete mode 100644 nx-X11/lib/font/Type1/t1snap.c delete mode 100644 nx-X11/lib/font/Type1/t1stdio.h delete mode 100644 nx-X11/lib/font/Type1/t1stub.c delete mode 100644 nx-X11/lib/font/Type1/t1test.c delete mode 100644 nx-X11/lib/font/Type1/t1unicode.c delete mode 100644 nx-X11/lib/font/Type1/t1unicode.h delete mode 100644 nx-X11/lib/font/Type1/token.c delete mode 100644 nx-X11/lib/font/Type1/token.h delete mode 100644 nx-X11/lib/font/Type1/tokst.h delete mode 100644 nx-X11/lib/font/Type1/trig.h delete mode 100644 nx-X11/lib/font/Type1/type1.c delete mode 100644 nx-X11/lib/font/Type1/util.c delete mode 100644 nx-X11/lib/font/Type1/util.h delete mode 100644 nx-X11/lib/font/bitmap/Imakefile delete mode 100644 nx-X11/lib/font/bitmap/bdfint.h delete mode 100644 nx-X11/lib/font/bitmap/bdfread.c delete mode 100644 nx-X11/lib/font/bitmap/bdfutils.c delete mode 100644 nx-X11/lib/font/bitmap/bitmap.c delete mode 100644 nx-X11/lib/font/bitmap/bitmapfunc.c delete mode 100644 nx-X11/lib/font/bitmap/bitmaputil.c delete mode 100644 nx-X11/lib/font/bitmap/bitscale.c delete mode 100644 nx-X11/lib/font/bitmap/fontink.c delete mode 100644 nx-X11/lib/font/bitmap/module/Imakefile delete mode 100644 nx-X11/lib/font/bitmap/module/bitmapmod.c delete mode 100644 nx-X11/lib/font/bitmap/pcf.h delete mode 100644 nx-X11/lib/font/bitmap/pcfread.c delete mode 100644 nx-X11/lib/font/bitmap/pcfwrite.c delete mode 100644 nx-X11/lib/font/bitmap/snfread.c delete mode 100644 nx-X11/lib/font/bitmap/snfstr.h delete mode 100644 nx-X11/lib/font/builtins/Imakefile delete mode 100644 nx-X11/lib/font/builtins/buildfont delete mode 100644 nx-X11/lib/font/builtins/builtin.h delete mode 100644 nx-X11/lib/font/builtins/dir.c delete mode 100644 nx-X11/lib/font/builtins/file.c delete mode 100644 nx-X11/lib/font/builtins/fonts.c delete mode 100644 nx-X11/lib/font/builtins/fpe.c delete mode 100644 nx-X11/lib/font/builtins/render.c delete mode 100644 nx-X11/lib/font/fc/Imakefile delete mode 100644 nx-X11/lib/font/fc/fsconvert.c delete mode 100644 nx-X11/lib/font/fc/fserve.c delete mode 100644 nx-X11/lib/font/fc/fserve.h delete mode 100644 nx-X11/lib/font/fc/fservestr.h delete mode 100644 nx-X11/lib/font/fc/fsio.c delete mode 100644 nx-X11/lib/font/fc/fsio.h delete mode 100644 nx-X11/lib/font/fc/fsio.h.NX.reference delete mode 100644 nx-X11/lib/font/fc/fsio.h.XF86.reference delete mode 100644 nx-X11/lib/font/fc/fslibos.h delete mode 100644 nx-X11/lib/font/fontcache/Imakefile delete mode 100644 nx-X11/lib/font/fontcache/fcqueue.h delete mode 100644 nx-X11/lib/font/fontcache/fontcache.c delete mode 100644 nx-X11/lib/font/fontcache/fontcache.h delete mode 100644 nx-X11/lib/font/fontfile/Imakefile delete mode 100644 nx-X11/lib/font/fontfile/bitsource.c delete mode 100644 nx-X11/lib/font/fontfile/bufio.c delete mode 100644 nx-X11/lib/font/fontfile/decompress.c delete mode 100644 nx-X11/lib/font/fontfile/defaults.c delete mode 100644 nx-X11/lib/font/fontfile/dirfile.c delete mode 100644 nx-X11/lib/font/fontfile/encparse.c delete mode 100644 nx-X11/lib/font/fontfile/ffcheck.c delete mode 100644 nx-X11/lib/font/fontfile/fileio.c delete mode 100644 nx-X11/lib/font/fontfile/filewr.c delete mode 100644 nx-X11/lib/font/fontfile/fontdir.c delete mode 100644 nx-X11/lib/font/fontfile/fontenc.c delete mode 100644 nx-X11/lib/font/fontfile/fontencI.h delete mode 100644 nx-X11/lib/font/fontfile/fontencc.c delete mode 100644 nx-X11/lib/font/fontfile/fontfile.c delete mode 100644 nx-X11/lib/font/fontfile/fontscale.c delete mode 100644 nx-X11/lib/font/fontfile/gunzip.c delete mode 100644 nx-X11/lib/font/fontfile/module/Imakefile delete mode 100644 nx-X11/lib/font/fontfile/printerfont.c delete mode 100644 nx-X11/lib/font/fontfile/register.c delete mode 100644 nx-X11/lib/font/fontfile/renderers.c delete mode 100644 nx-X11/lib/font/include/Imakefile delete mode 100644 nx-X11/lib/font/include/bitmap.h delete mode 100644 nx-X11/lib/font/include/bufio.h delete mode 100644 nx-X11/lib/font/include/fntfil.h delete mode 100644 nx-X11/lib/font/include/fntfilio.h delete mode 100644 nx-X11/lib/font/include/fntfilst.h delete mode 100644 nx-X11/lib/font/include/fontencc.h delete mode 100644 nx-X11/lib/font/include/fontmisc.h delete mode 100644 nx-X11/lib/font/include/fontmod.h delete mode 100644 nx-X11/lib/font/include/fontshow.h delete mode 100644 nx-X11/lib/font/include/fontutil.h delete mode 100644 nx-X11/lib/font/include/fontxlfd.h delete mode 100644 nx-X11/lib/font/stubs/Imakefile delete mode 100644 nx-X11/lib/font/stubs/cauthgen.c delete mode 100644 nx-X11/lib/font/stubs/csignal.c delete mode 100644 nx-X11/lib/font/stubs/delfntcid.c delete mode 100644 nx-X11/lib/font/stubs/errorf.c delete mode 100644 nx-X11/lib/font/stubs/fatalerror.c delete mode 100644 nx-X11/lib/font/stubs/findoldfnt.c delete mode 100644 nx-X11/lib/font/stubs/getcres.c delete mode 100644 nx-X11/lib/font/stubs/getdefptsize.c delete mode 100644 nx-X11/lib/font/stubs/getnewfntcid.c delete mode 100644 nx-X11/lib/font/stubs/gettime.c delete mode 100644 nx-X11/lib/font/stubs/initfshdl.c delete mode 100644 nx-X11/lib/font/stubs/regfpefunc.c delete mode 100644 nx-X11/lib/font/stubs/rmfshdl.c delete mode 100644 nx-X11/lib/font/stubs/servclient.c delete mode 100644 nx-X11/lib/font/stubs/setfntauth.c delete mode 100644 nx-X11/lib/font/stubs/stfntcfnt.c delete mode 100644 nx-X11/lib/font/stubs/stubs.h delete mode 100644 nx-X11/lib/font/stubs/xpstubs.c delete mode 100644 nx-X11/lib/font/util/Imakefile delete mode 100644 nx-X11/lib/font/util/atom.c delete mode 100644 nx-X11/lib/font/util/fontaccel.c delete mode 100644 nx-X11/lib/font/util/fontnames.c delete mode 100644 nx-X11/lib/font/util/fontutil.c delete mode 100644 nx-X11/lib/font/util/fontxlfd.c delete mode 100644 nx-X11/lib/font/util/format.c delete mode 100644 nx-X11/lib/font/util/miscutil.c delete mode 100644 nx-X11/lib/font/util/patcache.c delete mode 100644 nx-X11/lib/font/util/private.c delete mode 100644 nx-X11/lib/font/util/utilbitmap.c (limited to 'debian') diff --git a/debian/control b/debian/control index 65a8f9433..9572f7ce7 100644 --- a/debian/control +++ b/debian/control @@ -12,12 +12,10 @@ Build-Depends: libjpeg-dev, zlib1g-dev, quilt (>= 0.46-7~), - libfontconfig1-dev, - libfontenc-dev, - libfreetype6-dev, libxmltok1-dev, libxml2-dev, libxpm-dev, + libxfont-dev, autoconf, pkg-config, x11proto-core-dev, diff --git a/debian/rules b/debian/rules index e58b79121..6d076a1c4 100755 --- a/debian/rules +++ b/debian/rules @@ -64,7 +64,6 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfont.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XI.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/fonts/ rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/Xtrans/ dh_install --fail-missing diff --git a/nx-X11/Imakefile b/nx-X11/Imakefile index 3cb1e1bc3..46ca9e70c 100644 --- a/nx-X11/Imakefile +++ b/nx-X11/Imakefile @@ -15,9 +15,6 @@ RELEASE = XOrgReleaseString #endif #if !BuildServersOnly -#if BuildFonts - FONTSDIR = fonts -#endif #ifndef Win32Architecture #if BuildDocs DOCSDIR = doc diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules index 3923e4a10..e023b6d26 100644 --- a/nx-X11/config/cf/Imake.rules +++ b/nx-X11/config/cf/Imake.rules @@ -2117,16 +2117,6 @@ ProjectUnsharedLibReferences(varname,libname,libsource,$(BUILDLIBDIR)) Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,buildlibdir/,LibraryTargetName(libname)) @@\ Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ LintLibReferences(varname,libname,libsource) -#endif - - /* - * ProjectUnsharedFontLibReferences - unshared font libraries - */ -#ifndef ProjectUnsharedFontLibReferences -#define ProjectUnsharedFontLibReferences() @@\ -DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(NX_Xfont)) @@\ -FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ -LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) #endif /* @@ -2136,17 +2126,6 @@ LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) #define SharedLibDependencies(libname,libsource,revname) /**/ #endif -/* - * SharedFontLibReferences - shared font libraries - */ -#ifndef SharedFontLibReferences -#define SharedFontLibReferences() @@\ -SOFONTREV = SharedFontRev @@\ -DEPFONTLIB = SharedLibDependencies(NX_Xfont,$(FONTLIBSRC),SOFONTREV) @@\ -FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\ -LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC)) -#endif - /* * SharedDSLibDependencies - shared library dependencies with data separation */ diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index 595617267..4a9e98598 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -602,14 +602,6 @@ XCOMM deprecated; please strongly consider using vendor-supplied packages. #ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */ #define GzipLibrary -lz #endif -/* If the system has the Freetype2 library - if NO, the copy in extras is built */ -#ifndef HasFreetype2 -#define HasFreetype2 YES -#endif -/* If the system has the Fontconfig library - if NO, the copy in extras is built */ -#ifndef HasFontconfig -#define HasFontconfig NO -#endif /* If the system has the PNG library - if NO, xcursorgen is not built */ #ifndef HasLibpng #define HasLibpng NO diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index a31490377..80113a9e3 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -178,7 +178,6 @@ X11.tmpl provides defaults for the following variables: BuildDBE build DOUBLE-BUFFER extension BuildDmx build Distributed Multihead X server and extension BuildDPMS build Display Power Management Signaling extension - BuildFonts build pcf fonts BuildIncRoot relative path to location of headers in build BuildIncTop path from build includes directory to top BuildEVI build EVI server extension @@ -214,7 +213,6 @@ X11.tmpl provides defaults for the following variables: DebugLibXag build libXag_d.a DebugOldX build liboldX_d.a DefaultCursorTheme name of default cursor theme - DefaultFSConfigFile default font server config file DefaultFontPath default server font path DefaultRGBDatabase default server rgb color database DefaultSystemPath default system xdm PATH environment variable @@ -226,13 +224,7 @@ X11.tmpl provides defaults for the following variables: DriverManSuffix man suffix for driver pages ExtensionDefines -D's for universal extensions ExtensionOSDefines -D's for additional extensions - FontCompilerFlags flags for bdftosnf - FontDefines -D's to turn on font options - FontDir directory in which to install fonts - FontFilters -D's to specify font conversion filters - FontOSDefines -D's for which fonts to support ForceNormalLib force building of .a in addition to shared lib - GzipFontCompression boolean for using gzip instead of compress HasXdmAuth boolean for using XDM-AUTHORIZATION-1; needs Wraphelp.c, see Release Notes InstallAppDefFiles install new app defaults files over old? diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index b6ff72e1f..30b04510b 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -23,20 +23,6 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $ * * InstallAppDefaults (class) * InstallAppDefaultsLong (file,class) - * MakeFontsDir (deplist) - * MakeFcCache (deplist) - * MakeFonts () - * InstallFontObjs (objs,dest) - * InstallFonts (dest) - * InstallFontAliases (dest) - * InstallFcCache (dest) - * FontSrc (basename) - * FontBaseObj (basename) - * InstallFontScale (dest) - * UncompressedFontTarget (basename) - * CompressedFontTarget (basename) - * FontTarget (basename) - * FontObj (basename) * MakeXkbDir (basedir,subdir) */ @@ -144,144 +130,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildLibrariesForXServers #define BuildLibrariesForXServers BuildServer #endif -#ifndef XserverStaticFontLib -#define XserverStaticFontLib YES -#endif -#ifndef BuildSpeedo -#define BuildSpeedo NO -#endif -#ifndef BuildType1 -#define BuildType1 NO -#endif -#ifndef BuildCID -#define BuildCID YES -#endif -#ifndef BuildFreeType -#define BuildFreeType NO -#endif -#ifndef BuildBuiltinFonts -#define BuildBuiltinFonts NO -#endif -#ifndef BuildFonts -#define BuildFonts BuildServer -#endif -#ifndef Build75DpiFonts -#define Build75DpiFonts YES -#endif -#ifndef Build100DpiFonts -#define Build100DpiFonts YES -#endif -#ifndef BuildSpeedoFonts -#define BuildSpeedoFonts NO -#endif -#ifndef BuildType1Fonts -#define BuildType1Fonts YES -#endif -#ifndef BuildCIDFonts -#define BuildCIDFonts YES -#endif -#ifndef BuildTrueTypeFonts -#define BuildTrueTypeFonts YES -#endif -#ifndef BuildBethMarduthoFonts -#define BuildBethMarduthoFonts NO -#endif -#ifndef BuildEthiopicFonts -#define BuildEthiopicFonts NO -#endif -#ifndef BuildCyrillicFonts -#define BuildCyrillicFonts YES -#endif -/* Some bdf font generation details. The scripts for this require perl. */ -#ifndef TruncateUCSFonts -#define TruncateUCSFonts HasPerl5 -#endif -#ifndef MaxUCSChar -#define MaxUCSChar 0x3200 -#endif -#ifndef DerivedUCSFonts -#define DerivedUCSFonts YES -#endif -/* These primarily control generation of derived 8-bit fonts. */ -#ifndef BuildUCSFonts -#define BuildUCSFonts YES -#endif -/* Setting BuildISO8859_1Fonts to NO may result in problems. */ -#ifndef BuildISO8859_1Fonts -#define BuildISO8859_1Fonts YES -#endif -#ifndef BuildISO8859_2Fonts -#define BuildISO8859_2Fonts YES -#endif -#ifndef BuildISO8859_3Fonts -#define BuildISO8859_3Fonts YES -#endif -#ifndef BuildISO8859_4Fonts -#define BuildISO8859_4Fonts YES -#endif -#ifndef BuildISO8859_5Fonts -#define BuildISO8859_5Fonts BuildCyrillicFonts -#endif -#ifndef BuildArabicFonts -#define BuildArabicFonts YES -#endif -#ifndef BuildISO8859_6Fonts -#define BuildISO8859_6Fonts BuildArabicFonts -#endif -#ifndef BuildGreekFonts -#define BuildGreekFonts YES -#endif -#ifndef BuildISO8859_7Fonts -#define BuildISO8859_7Fonts BuildGreekFonts -#endif -#ifndef BuildHebrewFonts -#define BuildHebrewFonts YES -#endif -#ifndef BuildISO8859_8Fonts -#define BuildISO8859_8Fonts BuildHebrewFonts -#endif -#ifndef BuildISO8859_9Fonts -#define BuildISO8859_9Fonts YES -#endif -#ifndef BuildISO8859_10Fonts -#define BuildISO8859_10Fonts YES -#endif -#ifndef BuildThaiFonts -#define BuildThaiFonts YES -#endif -#ifndef BuildISO8859_11Fonts -#define BuildISO8859_11Fonts BuildThaiFonts -#endif -#ifndef BuildISO8859_13Fonts -#define BuildISO8859_13Fonts YES -#endif -#ifndef BuildISO8859_14Fonts -#define BuildISO8859_14Fonts YES -#endif -#ifndef BuildISO8859_15Fonts -#define BuildISO8859_15Fonts YES -#endif -#ifndef BuildISO8859_16Fonts -#define BuildISO8859_16Fonts YES -#endif -#ifndef BuildKOI8_RFonts -#define BuildKOI8_RFonts BuildCyrillicFonts -#endif -#ifndef BuildJapaneseFonts -#define BuildJapaneseFonts YES -#endif -#ifndef BuildJISX0201Fonts -#define BuildJISX0201Fonts BuildJapaneseFonts -#endif -#ifndef BuildKoreanFonts -#define BuildKoreanFonts YES -#endif -#ifndef BuildChineseFonts -#define BuildChineseFonts YES -#endif -#ifndef MakeLocalFontDir -#define MakeLocalFontDir YES -#endif #ifndef HasXAudio #define HasXAudio NO #endif @@ -366,35 +214,9 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildDPMS #define BuildDPMS YES #endif -#ifndef BuildFontLib -#if (!defined(XF86Server) || !XF86Server) && (!defined (XorgServer) || !XorgServer) -#define BuildFontLib (BuildLibraries || BuildServer) -#else -#define BuildFontLib (BuildLibraries || (BuildServer && !DoLoadableServer)) -#endif -#endif #ifndef BuildFontCache #define BuildFontCache NO #endif -#ifndef BuildFontCacheLib -#define BuildFontCacheLib (BuildFontCache && !BuildServersOnly) -#endif -#ifndef BuildFontEncLib -#define BuildFontEncLib BuildLibraries -#endif -/* - * This enables binary compatibility with the older (XFree86 <= 4.1) fontenc - * entry points in the Xfont library (and X server). If this is turned off, - * then SharedFontRev should have it's major revision bumped, and the - * XFree86 font module ABI (in xfree86/common/xf86Module.h) should have it's - * major revision bumped. - * - * Note: this does not enable those older functions in the separate libfontenc - * library (which didn't exist previously). - */ -#ifndef FontencCompatibility -#define FontencCompatibility YES -#endif #ifndef BuildLBX #define BuildLBX YES #endif @@ -580,40 +402,16 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildRenderLibrary #define BuildRenderLibrary !BuildServersOnly #endif -#ifndef BuildXftLibrary -#define BuildXftLibrary BuildRenderLibrary -#endif -#ifndef BuildXft1Library -#define BuildXft1Library BuildRenderLibrary -#endif -#ifndef UseFontconfig -#define UseFontconfig BuildXftLibrary -#endif -#ifndef BuildFontconfigLibrary -#define BuildFontconfigLibrary (UseFontconfig && !HasFontconfig) -#endif -#ifndef UseFreetype2 -#define UseFreetype2 (BuildXftLibrary || BuildXft1Library || \ - UseFontconfig || BuildFreeType) -#endif -#ifndef InstallFontconfigLibrary -# define InstallFontconfigLibrary YES -#endif + #ifndef HasExpat #define HasExpat YES #endif #ifndef UseExpat -#define UseExpat (UseFontconfig || BuildXF86DRI) +#define UseExpat BuildXF86DRI #endif #ifndef BuildExpatLibrary #define BuildExpatLibrary (UseExpat && !HasExpat) #endif -#ifndef BuildFreetype2Library -#define BuildFreetype2Library (UseFreetype2 && !HasFreetype2) -#endif -#ifndef Freetype2BuildDefines -#define Freetype2BuildDefines /**/ -#endif #ifndef BuildRandR #define BuildRandR YES @@ -739,9 +537,6 @@ XORGRELSTRING = XorgManVersionString #ifndef UseConfDirForXkb #define UseConfDirForXkb YES #endif -#ifndef CompressAllFonts -#define CompressAllFonts NO -#endif #ifndef ThreadedX #if HasPosixThreads || HasCThreads #define ThreadedX YES /* multi-threaded libraries */ @@ -795,9 +590,6 @@ XORGRELSTRING = XorgManVersionString #ifndef ServerErrorDefines #define ServerErrorDefines /**/ #endif -#ifndef FontCompilerFlags -#define FontCompilerFlags -t -#endif /* * NOTE: IPv6Flags could be tacked on to either ConnectionFlags or * ExtraConnectionDefs. Here, we choose the later in order to @@ -849,12 +641,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #ifndef ProjectThreadsDefines #define ProjectThreadsDefines -DXTHREADS #endif -#ifndef FontOSDefines -#define FontOSDefines /**/ -#endif -#ifndef FontDefines -#define FontDefines -DFONT_SNF -DFONT_BDF -DFONT_PCF -DCOMPRESSED_FONTS FontOSDefines -#endif #ifndef XawI18nDefines #if SystemV4 #define XawI18nDefines -DHAS_WCTYPE_H @@ -1627,44 +1413,26 @@ XCOMM X Window System make variables; these need to be coordinated with rules LBXPROXYDIR = LbxproxyDir /* lbxproxy files */ PROXYMANAGERDIR = ProxyManagerDir /* proxy manager config files */ XAPPLOADDIR = XAppLoadDir /* application default resource dir */ - FONTCFLAGS = FontCompilerFlags INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */ #if UseInstalledX11 RGB = $(XBINDIR)/rgb - FONTC = $(XBINDIR)/bdftopcf - MKFONTSCALE = $(XBINDIR)/mkfontscale - MKFONTDIR = $(XBINDIR)/mkfontdir MKHTMLINDEX = $(XBINDIR)/mkhtmlindex - UCS2ANY = $(XBINDIR)/ProgramTargetName(ucs2any) - BDFTRUNCATE = $(XBINDIR)/bdftruncate - UCSMAPPREFIX = $(FONTDIR)/util/map- XCURSORGEN = $(XBINDIR)/xcursorgen #else RGB = $(CLIENTENVSETUP) $(XBUILDBINDIR)/rgb # if !CrossCompiling - FONTC = $(CLIENTENVSETUP) $(PRELOADFONTSETUP) $(XBUILDBINDIR)/bdftopcf - MKFONTSCALE = $(CLIENTENVSETUP) $(PRELOADFREETYPESETUP) $(XBUILDBINDIR)/mkfontscale - MKFONTDIR = $(MKFONTSCALE) -b -s -l XCURSORGEN = $(CLIENTENVSETUP) $(PRELOADSETUP) $(XBUILDBINDIR)/xcursorgen - UCS2ANY = $(XBUILDBINDIR)/ProgramTargetName(ucs2any) # elif UseInstalledOnCrossCompile - MKFONTDIR = $(XBINDIR)/mkfontdir - MKFONTSCALE = $(XBINDIR)/mkfontscale - FONTC = $(XBINDIR)/bdftopcf XCURSORGEN = $(XBINDIR)/xcursorgen - UCS2ANY = $(XBINDIR)/ucs2any # endif # if HasPerl MKHTMLINDEX = RunPerlScript($(CONFIGSRC)/util/mkhtmlindex.pl,) # else MKHTMLINDEX = $(SHELL) $(CONFIGSRC)/util/mkhtmlindex.sh # endif - BDFTRUNCATE = $(FONTSRC)/util/bdftruncate.pl - UCSMAPPREFIX = $(FONTSRC)/util/map- #endif - HTMLINDEXCMD = HtmlIndexCmd DOCUTILSRC = $(XTOP)/doc/util @@ -1674,8 +1442,6 @@ XCOMM X Window System make variables; these need to be coordinated with rules XIDXMACROS = $(DOCUTILSRC)/indexmacros.t PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib - FONTSRC = $(XTOP)/fonts - ENCODINGSSRC = $(FONTSRC)/encodings INCLUDESRC = BuildIncDir XINCLUDESRC = $(INCLUDESRC)/X11 SERVERSRC = $(XTOP)/programs/Xserver @@ -1683,11 +1449,7 @@ XCOMM X Window System make variables; these need to be coordinated with rules UNSUPPORTEDSRC = UnsupportedDir DOCSRC = $(XTOP)/doc RGBSRC = $(XTOP)/programs/rgb - BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf - MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir - FONTINCSRC = $(XTOP)/include/fonts EXTINCSRC = $(XTOP)/include/extensions - FTSOURCEDIR = FreeTypeSrcDir DRMSRCDIR = DRMSrcDir MESASRCDIR = MesaSrcDir OGLSAMPLESRCDIR = OglSampleSrcDir @@ -1740,15 +1502,6 @@ VENDORSUPPORTDEFS = VendorSupportDefines #ifdef PreloadSetup PRELOADSETUP = PreloadSetup #endif -#ifdef PreloadFontSetup - PRELOADFONTSETUP = PreloadFontSetup -#endif -#ifdef PreloadFreetypeSetup - PRELOADFREETYPESETUP = PreloadFreetypeSetup -#endif -#ifdef PreloadXFTSetup - PRELOADXFTSETUP = PreloadXFTSetup -#endif #ifndef ShLibIncludeFile /* need this to make ANSI-style preprocessors happy */ @@ -2663,29 +2416,6 @@ SharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,Sha ProjectUnsharedLibReferences(WINDOWSWM,NX_WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir) #endif -# ifndef SharedLibXfontcache -# define SharedLibXfontcache HasSharedLibraries -# endif -# ifndef NormalLibXfontcache -# define NormalLibXfontcache (!SharedLibXfontcache || ForceNormalLib) -# endif -# ifndef DebugLibXfontcache -# define DebugLibXfontcache NO -# endif -# ifndef ProfileLibXfontcache -# define ProfileLibXfontcache NO -# endif - - XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache -#if SharedLibXfontcache -#ifndef SharedXfontcacheRev -#define SharedXfontcacheRev 1.2 -#endif -SharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev) -#else -ProjectUnsharedLibReferences(XFONTCACHE,NX_Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir) -#endif - #ifndef SharedLibXau #define SharedLibXau YES #endif @@ -3107,58 +2837,6 @@ SharedLibReferences(FS,NX_FS,$(FSLIBSRC),SOFSREV,SharedFSRev) ProjectUnsharedLibReferences(FS,NX_FS,$(FSLIBSRC),XBuildLibDir) #endif -#ifndef SharedLibFont -#define SharedLibFont HasSharedLibraries -#endif -#ifndef NormalLibFont -#define NormalLibFont (!SharedLibFont | ForceNormalLib | XserverStaticFontLib) -#endif -#ifndef DebugLibFont -#define DebugLibFont NO /* debugged Font library */ -#endif -#ifndef ProfileLibFont -#define ProfileLibFont NO /* profiled Font library */ -#endif - FONTLIBSRC = $(LIBSRC)/font -#if SharedLibFont -#ifndef SharedFontRev -#define SharedFontRev 1.5 -#endif -SharedFontLibReferences() -XCOMM SharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev) -#else -ProjectUnsharedFontLibReferences() -XCOMM ProjectUnsharedLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC),XBuildLibDir) -#endif - - FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs -ProjectUnsharedLibReferences(FONTSTUB,NX_fntstubs,$(FONTSUBLIBSRC),XBuildLibDir) - DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) - FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) - - -#ifndef SharedLibFontEnc -#define SharedLibFontEnc HasSharedLibraries -#endif -#ifndef NormalLibFontEnc -#define NormalLibFontEnc (!SharedLibFontEnc | ForceNormalLib) -#endif -#ifndef DebugLibFontEnc -#define DebugLibFontEnc NO /* debugged fontenc library */ -#endif -#ifndef ProfileLibFontEnc -#define ProfileLibFontEnc NO /* profiled fontenc library */ -#endif - FONTENCLIBSRC = $(LIBSRC)/fontenc -#if SharedLibFontEnc -#ifndef SharedFontEncRev -#define SharedFontEncRev 1.0 -#endif -SharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev) -#else -ProjectUnsharedLibReferences(XFONTENC,NX_fontenc,$(FONTENCLIBSRC),XBuildLibDir) -#endif - #ifndef SharedLibXpm #define SharedLibXpm HasSharedLibraries #endif @@ -3181,121 +2859,6 @@ SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) #endif -#if UseFreetype2 - -#if BuildFreetype2Library - -#ifndef SharedLibFreetype2 -#define SharedLibFreetype2 HasSharedLibraries -#endif -#ifndef NormalLibFreetype2 -#define NormalLibFreetype2 (!SharedLibFreetype2 | ForceNormalLib) -#endif -#ifndef DebugLibFreetype2 -#define DebugLibFreetype2 NO -#endif -#ifndef ProfileLibFreetype2 -#define ProfileLibFreetype2 NO -#endif - FREETYPE2LIBSRC = $(LIBSRC)/freetype2 - -/* - * FreeType 2.1.9 - * - * Get the library version information from version_info in - * in xc/extras/freetype2/builds/unix/configure.ac. - * - * current:revision:age = 9:7:3 - * - * The LibtoolMinorVersions revision is "(current - age).age". - * The !LibtoolMinorVersions revision is "current.0". - * Freetype2Version should be set to "current.revision.age" - */ -#ifndef Freetype2Version -#define Freetype2Version 9.7.3 -#endif - -#if SharedLibFreetype2 -#ifndef SharedLibtoolFreetype2Rev -#define SharedLibtoolFreetype2Rev 9:7:3 -#endif -#ifndef SharedFreetype2Rev -#if LibtoolMinorVersions -#define SharedFreetype2Rev 6.3.8 -#else -#define SharedFreetype2Rev 9.0 -#endif -#endif -SharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev) -#else -ProjectUnsharedLibReferences(FREETYPE2,NX_freetype,$(FREETYPE2LIBSRC),XBuildLibDir) -#endif - -#ifdef UseInstalled -FREETYPE2INCDIR=$(INCDIR) -#else -FREETYPE2INCDIR=$(BUILDINCDIR) -#endif - -#else /* BuildFreetype2Library */ - -#if HasFreetype2 - -#ifndef Freetype2Dir -#define Freetype2Dir /usr -#ifndef Freetype2DirStandard -# define Freetype2DirStandard YES -#endif -#endif -#ifndef Freetype2DirStandard -#define Freetype2DirStandard NO -#endif - -#ifndef Freetype2LibDir -#define Freetype2LibDir Freetype2Dir/LibDirName -# if Freetype2DirStandard -# define Freetype2LibDirStandard YES -# endif -#endif -#ifndef Freetype2LibDirStandard -# define Freetype2LibDirStandard NO -#endif - -#ifndef Freetype2IncDir -#define Freetype2IncDir Freetype2Dir/include -# if Freetype2DirStandard -# define Freetype2IncDirStandard YES -# endif -#endif - -FREETYPE2DIR = Freetype2Dir -FREETYPE2LIBDIR = Freetype2LibDir -FREETYPE2INCDIR = Freetype2IncDir -#if Freetype2LibDirStandard -FREETYPE2LIB = -lfreetype -#else -FREETYPE2LIB = -L$(FREETYPE2LIBDIR) LinkerRuntimeLibraryPathFlag($(FREETYPE2LIBDIR)) -lfreetype -#endif - -#endif /* HasFreetype2 */ - -#endif /* else BuildFreetype2Library */ - -#ifndef Freetype2IncDirStandard -# define Freetype2IncDirStandard NO -#endif - -#if BuildFreetype2Library || HasFreetype2 -#if Freetype2IncDirStandard -FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config -#else -FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config -#endif -FREETYPE2DEFINES = -DFREETYPE2 -#endif - -#endif /* UseFreetype2 */ - #if HasMotif #ifndef MotifDir @@ -3448,188 +3011,6 @@ EXPATDEFINES = -DEXPAT #endif /* UseExpat */ -#ifndef SharedLibXft1 -#define SharedLibXft1 HasSharedLibraries -#endif -#ifndef NormalLibXft1 -#define NormalLibXft1 NO -#endif -#ifndef DebugLibXft1 -#define DebugLibXft1 NO -#endif -#ifndef ProfileLibXft1 -#define ProfileLibXft1 NO -#endif - XFT1LIBSRC = $(LIBSRC)/Xft1 -#if SharedLibXft1 -#ifndef SharedXft1Rev -#define SharedXft1Rev 1.1 -#endif -SharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev) -#else -ProjectUnsharedLibReferences(XFT1,NX_Xft,$(XFT1LIBSRC),XBuildLibDir) -#endif - -#ifndef Xft1ClientDepLibs -#if UseFreetype2 -#define Xft1ClientDepLibs $(DEPXFT1LIB) $(DEPFREETYPE2LIB) $(DEPXRENDERLIB) -#else -#define Xft1ClientDepLibs $(DEPXFT1LIB) $(DEPXRENDERLIB) -#endif -#endif -#ifndef Xft1ClientLibs -#if UseFreetype2 -#define Xft1ClientLibs $(XFT1LIB) $(FREETYPE2LIB) $(XRENDERLIB) -#else -#define Xft1ClientLibs $(XFT1LIB) $(XRENDERLIB) -#endif -#endif - -#ifndef SharedLibXft -#define SharedLibXft HasSharedLibraries -#endif -#ifndef NormalLibXft -#define NormalLibXft (!SharedLibXft | ForceNormalLib) -#endif -#ifndef DebugLibXft -#define DebugLibXft NO -#endif -#ifndef ProfileLibXft -#define ProfileLibXft NO -#endif - XFTLIBSRC = $(LIBSRC)/Xft -#if SharedLibXft -#ifndef SharedXftRev -#define SharedXftRev 2.1.2 -#endif -SharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) -#else -ProjectUnsharedLibReferences(XFT,NX_Xft,$(XFTLIBSRC),XBuildLibDir) -#endif - -#ifndef XftClientDepLibs -#define XftClientDepLibs $(DEPXFTLIB) FontconfigClientDepLibs $(DEPXRENDERLIB) -#endif -#ifndef XftClientLibs -#define XftClientLibs $(XFTLIB) FontconfigClientLibs $(XRENDERLIB) -#endif - -#if UseFontconfig - -#if BuildFontconfigLibrary - -#ifndef SharedLibFontconfig -#define SharedLibFontconfig HasSharedLibraries -#endif -#ifndef NormalLibFontconfig -#define NormalLibFontconfig (!SharedLibFontconfig | ForceNormalLib) -#endif -#ifndef DebugLibFontconfig -#define DebugLibFontconfig NO -#endif -#ifndef ProfileLibFontconfig -#define ProfileLibFontconfig NO -#endif - FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig -#if SharedLibFontconfig -#ifndef SharedFontconfigRev -#define SharedFontconfigRev 1.0.4 -#endif -SharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) -#else -ProjectUnsharedLibReferences(FONTCONFIG,NX_fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir) -#endif - -#ifdef UseInstalled -FONTCONFIGINCDIR=$(INCDIR) -#else -FONTCONFIGINCDIR=$(BUILDINCDIR) -#endif - -FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR) - -#if UseInstalledX11 -FCCACHE = $(BINDIR)/fc-cache -#else -FCCACHE = set -x; $(CLIENTENVSETUP) $(PRELOADXFTSETUP) FONTCONFIG_PATH=$(FONTCONFIGLIBSRC) $(XBUILDBINDIR)/fc-cache -#endif - -#else /* BuildFontconfigLibrary */ - -#if HasFontconfig - -#ifndef FontconfigDir -# define FontconfigDir /usr -# ifndef FontconfigDirStandard -# define FontconfigDirStandard YES -# endif -#endif - -#ifndef FontconfigDirStandard -# define FontconfigDirStandard NO -#endif - -#ifndef FontconfigLibDir -# define FontconfigLibDir FontconfigDir/LibDirName -# if FontconfigDirStandard -# define FontconfigLibDirStandard YES -# endif -#endif -#ifndef FontconfigLibDirStandard -# define FontconfigLibDirStandard NO -#endif - -#ifndef FontconfigBinDir -# define FontconfigBinDir FontconfigDir/bin -#endif - -#ifndef FontconfigIncDir -# define FontconfigIncDir FontconfigDir/include -# if FontconfigDirStandard -# define FontconfigIncDirStandard YES -# endif -#endif - -#ifndef FontconfigIncDirStandard -# define FontconfigIncDirStandard NO -#endif - -FONTCONFIGDIR = FontconfigDir -FONTCONFIGLIBDIR = FontconfigLibDir -FONTCONFIGINCDIR = FontconfigIncDir -FONTCONFIGBINDIR = FontconfigBinDir -#if FontconfigLibDirStandard -FONTCONFIGLIB = -lfontconfig -#else -FONTCONFIGLIB = -L$(FONTCONFIGLIBDIR) LinkerRuntimeLibraryPathFlag($(FONTCONFIGLIBDIR)) -lfontconfig -#endif - -#if FontconfigIncDirStandard -FONTCONFIGINCLUDES = -#else -FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR) -#endif - -FCCACHE = $(FONTCONFIGBINDIR)/fc-cache - -#endif /* HasFontconfig */ - -#endif /* else BuildFontconfigLibrary */ - -#if BuildFontconfigLibrary || HasFontconfig -FONTCONFIGDEFINES = -DFONTCONFIG -#endif - -#ifndef FontconfigClientDepLibs -#define FontconfigClientDepLibs $(DEPFONTCONFIGLIB) $(DEPFREETYPE2LIB) ExpatClientDepLibs -#endif -#ifndef FontconfigClientLibs -#define FontconfigClientLibs $(FONTCONFIGLIB) $(FREETYPE2LIB) ExpatClientLibs -#endif - -#endif /* UseFontconfig */ - -XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) #ifdef HasLibpng @@ -3951,383 +3332,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class #endif /* UseConfDirForAppDefaults */ #endif /* InstallAppDefaultsLong */ -/* - * MakeFcCache - generate rules to build fontconfig cache database - */ - -#if defined UseFreetype2 && !CrossCompiling - -# ifndef MakeFcCache -# define MakeFcCache(deplist) @@\ -all:: fonts.cache @@\ - @@\ -fonts.cache: deplist @@\ - RunProgram(FCCACHE, $(FCCACHEOPTS) .) @@\ - @@\ -clean:: @@\ - RemoveFiles(fonts.cache*) -# endif /* MakeFcCache */ - -# ifndef InstallFcCache -# define InstallFcCache(dest) @@\ -install:: @@\ - RunProgram(FCCACHE, $(FCCACHEOPTS) $(DESTDIR)dest) -# endif /* InstallFcCache */ - -#else - -#ifndef MakeFcCache -#define MakeFcCache(deplist) -#endif - -#ifndef InstallFcCache -#define InstallFcCache(dest) -#endif - -#endif - -/* - * MakeFontsScale - generate rules to build fonts.scale database. - */ -#ifndef MakeFontsScale -# if !CrossCompiling || UseInstalledOnCrossCompile -# define MakeFontsScale(deplist) @@\ -all:: fonts.scale @@\ - @@\ -fonts.scale: deplist @@\ - RemoveFile(fonts.scale) @@\ - RunProgram(MKFONTSCALE, .) @@\ - @@\ -clean:: @@\ - RemoveFile(fonts.scale) -# else -# define MakeFontsScale(deplist) @@\ -clean:: @@\ - RemoveFile(fonts.scale) -# endif -#endif /* MakeFontsScale */ - -/* - * MakeFontsDir - generate rules to build fonts.dir database. - */ -#ifndef MakeFontsDir -# if !CrossCompiling || UseInstalledOnCrossCompile -# define MakeFontsDir(deplist) @@\ -all:: fonts.dir @@\ - @@\ -fonts.dir: deplist @@\ - RemoveFile(fonts.dir) @@\ - RunProgram(MKFONTDIR, $(MKFONTDIROPTS) .) @@\ - @@\ -clean:: @@\ - RemoveFile(fonts.dir) -# else -# define MakeFontsDir(deplist) @@\ -clean:: @@\ - RemoveFile(fonts.dir) -# endif -#endif /* MakeFontsDir */ - - -/* - * MakeFonts - generate rules to build font database. - */ -#ifndef MakeFonts -# if !CrossCompiling || UseInstalledOnCrossCompile -# define MakeFonts() @@\ -all:: $(OBJS) @@\ - @@\ -MakeFontsDir($(OBJS)) @@\ - @@\ -clean:: @@\ - RemoveFiles(*.pcf *.pcf.Z *.pcf.gz) -# else -# define MakeFonts() @@\ -MakeFontsDir($(OBJS)) @@\ - @@\ -clean:: @@\ - RemoveFiles(*.pcf *.pcf.Z *.pcf.gz) -# endif -#endif /* MakeFonts */ - -#ifndef InstallFontsDir -# if !CrossCompiling || UseInstalledOnCrossCompile -# define InstallFontsDir(dest) @@\ -install:: @@\ - MakeDir($(DESTDIR)dest) @@\ - @if [ X$(STATIC_FONTS_SCALE) = X ]; then (set -x; \ @@\ - RemoveFile($(DESTDIR)dest/fonts.scale); \ @@\ - RunProgram(MKFONTSCALE, $(DESTDIR)dest)); \ @@\ - else (set -x; \ @@\ - InstallInline(fonts.scale,$(INSTDATFLAGS),dest)); \ @@\ - fi @@\ - RemoveFile($(DESTDIR)dest/fonts.dir) @@\ - RunProgram(MKFONTDIR, $(MKFONTDIROPTS) $(DESTDIR)dest) -# else -# define InstallFontsDir(dest) -# endif -#endif - -/* - * InstallFontObjs - generate rules to install font files - */ -#ifndef InstallFontObjs -# if !CrossCompiling || UseInstalledOnCrossCompile -# define InstallFontObjs(objs,dest) @@\ -InstallMultipleFlags(objs,dest,$(INSTDATFLAGS)) @@\ - @@\ -InstallFontsDir(dest) -# else -# define InstallFontObjs(objs,dest) -# endif -#endif /* InstallFontObjs */ - - -/* - * InstallFonts - generate rules to install font files - */ -#ifndef InstallFonts -#define InstallFonts(dest) @@\ -InstallFontObjs($(OBJS),dest) -#endif /* InstallFonts */ - - -/* - * InstallFontAliases - generate rules to install font aliases databases. - */ -#ifndef InstallFontAliases -#define InstallFontAliases(dest) @@\ -InstallTarget(install,fonts.alias,$(INSTDATFLAGS),dest) -#endif /* InstallFontAliases */ - -#ifndef InstallNamedFontAliases -#define InstallNamedFontAliases(src,dest) @@\ -InstallNamedTarget(install,src,$(INSTDATFLAGS),dest,fonts.alias) -#endif /* InstallNamedFontAliases */ - -#ifndef FontSrc -#define FontSrc(basename) basename.bdf -#endif - -#ifndef FontBaseObj -#define FontBaseObj(basename)basename.pcf -#endif - -/* - * InstallFontScale - generate rules to install font scale database. - */ -#ifndef InstallFontScale -#define InstallFontScale(dest) @@\ -InstallTarget(install,fonts.scale,$(INSTDATFLAGS),dest) -#endif /* InstallFontScale */ - -/* - * UncompressedFontTargetLong - */ -#if ! CrossCompiling || UseInstalledOnCrossCompile -# ifndef UncompressedFontTargetLong -# define UncompressedFontTargetLong(sname,tname) @@\ -FontBaseObj(tname): FontSrc(sname) @@\ - RunProgram(FONTC,$(FONTCFLAGS) $? -o $@) -# endif /* UncompressedFontTargetLong */ -#else -# ifndef UncompressedFontTargetLong -# define UncompressedFontTargetLong(sname,tname) -# endif -#endif - -/* - * CompressedFontTarget - */ -#ifndef GzipFontCompression -#define GzipFontCompression NO -#endif - -#if ! CrossCompiling || UseInstalledOnCrossCompile -# ifndef CompressedFontTargetLong -# if GzipFontCompression -# define CompressedFontTargetLong(sname,tname) @@\ -FontBaseObj(tname).gz: FontSrc(sname) @@\ - RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@ -# else -# define CompressedFontTargetLong(sname,tname) @@\ -FontBaseObj(tname).Z: FontSrc(sname) @@\ - RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@ -# endif -# endif /* CompressedFontTargetLong */ -#else -# define CompressedFontTargetLong(sname,tname) -#endif - -/* - * UncompressedFontTarget - */ -#ifndef UncompressedFontTarget -#define UncompressedFontTarget(basename) UncompressedFontTargetLong(basename,basename) -#endif /* UncompressedFontTarget */ - -#ifndef CompressedFontTarget -#define CompressedFontTarget(basename) CompressedFontTargetLong(basename,basename) -#endif /* CompressedFontTarget */ - -#if !defined(FontTarget) && !defined(FontObj) -#if CompressAllFonts -#define FontTargetLong(sname,tname) CompressedFontTargetLong(sname,tname) -#define FontTarget(basename) CompressedFontTarget(basename) -#if GzipFontCompression -#define FontObj(basename) FontBaseObj(basename).gz -#else -#define FontObj(basename) FontBaseObj(basename).Z -#endif -#else -#define FontTargetLong(sname,tname) UncompressedFontTargetLong(sname,tname) -#define FontTarget(basename) UncompressedFontTarget(basename) -#define FontObj(basename) FontBaseObj(basename) -#endif /* CompressAllFonts */ -#endif - - -#ifndef EncObj -#define EncObj(basename) basename.enc -#endif -#ifndef EncObjComp -#if GzipFontCompression -#define EncObjComp(basename) basename.enc.gz -#else -#define EncObjComp(basename) basename.enc.Z -#endif -#endif - -#ifndef EncodingTarget -#define EncodingTarget(basename) /**/ -#endif - -#ifndef CompEncodingTarget -#if GzipFontCompression -#define CompEncodingTarget(basename) @@\ -EncObjComp(basename): EncObj(basename) @@\ - cat $? | $(GZIPCMD) > $@ -#else -#define CompEncodingTarget(basename) @@\ -EncObjComp(basename): EncObj(basename) @@\ - cat $? | $(COMPRESS) > $@ -#endif -#endif - -#ifndef MakeEncDir -# if !CrossCompiling || UseInstalledOnCrossCompile -# define MakeEncDir(deplist,inst,dirlist ) @@\ -AllTarget(encodings.dir) @@\ - @@\ -encodings.dir: deplist @@\ - RemoveFiles(encodings.dir fonts.dir) @@\ - @(E=; for i in dirlist; do \ @@\ - E="$$E -e $$i"; done; \ @@\ - set -x; \ @@\ - RunProgram(MKFONTDIR, -n -r -p inst/ $$E .)) @@\ - @@\ -clean:: @@\ - RemoveFiles(fonts.dir encodings.dir) -# else -# define MakeEncDir(deplist,inst,dirlist ) @@\ -clean:: @@\ - RemoveFiles(fonts.dir encodings.dir) -# endif -#endif - -#ifndef MakeEncodings -#define MakeEncodings(deplist,inst,dirlist) @@\ - @@\ -MakeEncDir(deplist $(OBJS),inst,dirlist) @@\ - @@\ -clean:: @@\ - RemoveFiles(*.enc.Z *.enc.gz) -#endif /* MakeEncodings */ - -#ifndef InstallEncObjs -# if !CrossCompiling || UseInstalledOnCrossCompile -# define InstallEncObjs(objs,dest) @@\ -InstallMultipleFlags(objs,dest,$(INSTDATFLAGS)) @@\ - @@\ -InstallTarget(install,encodings.dir,$(INSTDATFLAGS),dest) -# else -# define InstallEncObjs(objs,dest) -# endif -#endif /* InstallEncObjs */ - -#ifndef InstallEncodings -#define InstallEncodings(dest) @@\ -InstallEncObjs($(OBJS),dest) -#endif /* InstallEncodings */ - -#ifndef InstallEncodingsDir -# if !CrossCompiling || UseInstalledOnCrossCompile -# define InstallEncodingsDir(edir,fdir) @@\ -InstallNamedTarget(install,edir/encodings.dir,$(INSTDATFLAGS),fdir,encodings.dir) -# else -# define InstallEncodingsDir(edir,fdir) -# endif -#endif - - -#ifndef MakeBdfFontFromUCSMaster -#define MakeBdfFontFromUCSMaster(font,enc) @@\ -font-enc.bdf: font.bdf $(UCS2ANY) @@\ - RemoveFile($@) @@\ - $(UCS2ANY) font.bdf $(UCSMAPPREFIX)enc enc @@\ - @@\ -clean:: @@\ - RemoveFile(font-enc.bdf) -#endif - -#ifndef MakeTruncatedUCSBdfFont -#if HasPerl5 -#define MakeTruncatedUCSBdfFont(font,trunc,name) @@\ -name.bdf: font.bdf $(BDFTRUNCATE) @@\ - RemoveFile($@) @@\ - RunPerlScript($(BDFTRUNCATE),trunc < font.bdf > name.bdf) @@\ - @@\ -clean:: @@\ - RemoveFile(name.bdf) -#endif -#endif - -/* - * InstallXpPMFLink - install link for a Xprint PMF "font" from one - * print model to another - */ -#ifndef InstallXpPMFLink -#define InstallXpPMFLink(fontfilename,srcmodelfontdir,destmodelfontdir) @@\ - InstallLink(install,srcmodelfontdir/fontfilename,fontfilename,destmodelfontdir) -#endif /* InstallXpPMFLink */ -/* - * InstallXpMultiplePMFLinks - install multiple links for PMF fonts - * from one print model to another - */ -#ifndef InstallXpMultiplePMFLinks -#define InstallXpMultiplePMFLinks(list,srcmodelfontdir,destmodelfontdir) @@\ -install:: @@\ - MakeDir($(DESTDIR)destmodelfontdir) @@\ - for i in list ; do \ @@\ - $(RM) $(DESTDIR)destmodelfontdir/$$i ; \ @@\ - $(LN) -s -f srcmodelfontdir/$$i $(DESTDIR)destmodelfontdir/$$i ; \ @@\ - done -#endif /* InstallXpPMFLink */ - -/* - * InstallXpPMFFontsDir - make and install a fonts.dir index for model-config fonts - */ -#ifndef InstallXpPMFFontsDir -#if BuildServersOnly -#define InstallXpPMFFontsDir(destmodelfontdir) /**/ -#else -#define InstallXpPMFFontsDir(destmodelfontdir) @@\ -install:: @@\ - ($(MKFONTSCALE) -b -s -l $(DESTDIR)destmodelfontdir) -#endif -#endif /* InstallXpPMFFontsDir */ - - /* * MakeXkbDir */ @@ -4647,42 +3651,6 @@ clean:: @@\ InstallDoc(name,deps) #endif -/* - * Rule for maintainers to use to updated generated copies of fonts in the - * source tree. Use with care. - */ - -#ifndef UpdateDerivedFont -#define UpdateDerivedFont(src,dst) @@\ -update.fonts:: src @@\ - -@if [ -f dst ]; then \ @@\ - if [ "$(FORCEUPDATE)" = yes ]; then \ @@\ - if [ "$(FOLLOWLINK)" = no ]; then \ @@\ - (set -x; $(RM) dst); \ @@\ - fi; \ @@\ - set -x; cp src dst; \ @@\ - else \ @@\ - grep -v "XFree86:" src > __tmp1__; \ @@\ - grep -v "XFree86:" dst > __tmp2__; \ @@\ - if diff __tmp1__ __tmp2__ > /dev/null 2>&1; then :; \ @@\ - else \ @@\ - if [ "$(FOLLOWLINK)" = no ]; then \ @@\ - (set -x; $(RM) dst); \ @@\ - fi; \ @@\ - set -x; cp src dst; \ @@\ - fi; \ @@\ - fi; \ @@\ - fi @@\ - @$(RM) __tmp1__ __tmp2__ -#endif - -#if !HasFreetype2 - FT2PRELOADPATTERN = libfreetype.so.? -#endif -#if !HasFontconfig - FCPRELOADPATTERN = libfontconfig.so.? -#endif - XFTPRELOADPATTERN = libXft.so.? XRENDERPRELOADPATTERN = libXrender.so.? XFONTPRELOADPATTERN = libXfont*.so.? diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 58b3df923..76318b4f8 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -91,9 +91,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #ifdef NXAgentServer #define BuildRenderLibrary YES -#define SharedLibFreetype2 YES -#define NormalLibFreetype2 YES -#define FontLibSharedFreeType YES #endif /* @@ -240,101 +237,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildMatroxHal YES */ -/* - * Speedo fonts have been disabled by default in this release. - * To re-enable support for Speedo fonts, uncomment this. - * -#define BuildSpeedo YES - */ - -/* - * To disable support for CID fonts, uncomment this. - * -#define BuildCID NO - */ - -/* - * To disable support for TrueType fonts, uncomment these. - * -#define BuildFreeType NO - */ -#define BuildFreeType NO - -/* - * To set non-default build options for the underlying FreeType libraries, - * add them here and uncomment. - * -#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES - */ - -/* - * To build the FreeType libraries with the TrueType byte code interpreter - * enabled, uncomment this. Note that there are patent issues related to the - * TrueType byte code interpreter, and we only recommend you enabling this - * if you are sure that there are no legal impediments to you doing so. See - * for further information. - * -#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER - */ - -/* - * Do you want to Build Fonts (Usually you only want to build and install - * fonts once, if this is a first time install you will want to build the - * fonts) - * -#define BuildFonts NO - */ -#define BuildFonts NO - -/* - * To not build/install the 75dpi fonts, uncomment the following - * -#define Build75DpiFonts NO - */ - -/* - * To not build/install the 100dpi fonts, uncomment the following - * -#define Build100DpiFonts NO - */ - -/* - * To build/install the Speedo fonts, uncomment the following - * (see setting above about Speedo support as well) - * -#define BuildSpeedoFonts YES - */ - -/* - * To not build/install the Type1 fonts, uncomment the following - * -#define BuildType1Fonts NO - */ - -/* - * To not build/install the CID fonts, uncomment the following - * -#define BuildCIDFonts NO - */ - -/* - * To not build/install the True Type fonts, uncomment the following - * -#define BuildTrueTypeFonts NO - */ - -/* - * To not build/install the Cyrillic fonts, uncomment the following - * -#define BuildCyrillicFonts NO - */ - -/* - * To not install the local font directory, uncomment the following - * -#define MakeLocalFontDir NO - */ - /* * Include True Type Fonts to default font path. It is safe to do * this by default as NX intaller carries only misc and TTF in the @@ -368,7 +270,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ * #define InstallXinitConfig YES #define InstallXdmConfig YES -#define InstallFSConfig YES */ /* @@ -591,21 +492,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT */ -/* - * To link the X server with a dynamic version of the Xfont library, - * uncomment this. - * -#define XserverStaticFontLib NO - */ -#define XserverStaticFontLib YES - -/* - * To enable binary compatibility with previous versions of the font - * encoding support, uncomment this. - * -#define FontencCompatibility YES - */ - /* * To disable building XInput support, uncomment this * @@ -834,38 +720,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define X86EMU_LIBPATH /usr/local/lib */ -/* - * Most platforms default to using an already installed FreeType 2 library. - * To use the one included in this release instead, uncomment the following. - * -#define HasFreetype2 NO - */ -#define HasFreetype2 YES - -/* - * To use a FreeType library already installed outside the default search - * paths, uncomment the following and set the path as needed. - * -#define HasFreetype2 YES -#define Freetype2Dir /usr/local - */ - - -/* - * Most platforms default to using an already installed Fontconfig library. - * To use the one included in this release instead, uncomment the following. - * -#define HasFontconfig NO - */ -#define HasFontconfig YES - -/* - * To use a Fontconfig library already installed outside the default search - * paths, uncomment the following and set the path as needed. -#define HasFontconfig YES -#define FontconfigDir /usr/local - */ - /* * Most platforms default to using an already installed Expat library. @@ -912,9 +766,5 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildXaw7 NO #define BuildRman NO -#define BuildFontEncLib NO #define BuildXcursorLibrary NO -#define BuildXftLibrary NO -#define BuildXft1Library NO -#define SharedLibFont NO #define BuildLoadableXlibI18n NO diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index 32b7a8658..fa18feb4e 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -116,7 +116,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class # define SharedLibXdmGreet NO # define LinkGLToUsrInclude NO # define LinkGLToUsrLib NO -# define SharedLibFont NO # define SharedLibGlu YES # define NormalLibGlu YES # define FSUseSyslog YES @@ -156,9 +155,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class # define BuildRman NO # define BuildHtmlManPages NO -/* we build-depend on libfreetype6-dev (FreeType 2.x) */ -# define BuildFreetype2Library NO -# define HasFreetype2 YES /* m68k has no 2.4 kernel yet */ # ifndef Mc68020Architecture # define HasLinuxInput YES @@ -539,10 +535,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class # define HasExpat YES #endif -#ifndef HasFreetype2 -# define HasFreetype2 YES -#endif - #define AvoidNullMakeCommand YES #ifndef DebuggableLibraries #define DebuggableLibraries NO diff --git a/nx-X11/config/cf/xf86site.def b/nx-X11/config/cf/xf86site.def index 39d8980b6..3f48cd124 100644 --- a/nx-X11/config/cf/xf86site.def +++ b/nx-X11/config/cf/xf86site.def @@ -138,103 +138,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildMatroxHal YES */ -/* - * To disable support for Speedo fonts, uncomment this. - * -#define BuildSpeedo NO - */ - -/* - * To disable support for Type1 fonts, uncomment this. - * -#define BuildType1 NO - */ - -/* - * To disable support for CID fonts, uncomment this. - * -#define BuildCID NO - */ - -/* - * To disable support for TrueType fonts, uncomment these. - * -#define BuildFreeType NO - */ - -/* - * To set non-default build options for the underlying FreeType libraries, - * add them here and uncomment. - * -#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES - */ - -/* - * To build the FreeType libraries with the TrueType byte code interpreter - * enabled, uncomment this. Note that there are patent issues related to the - * TrueType byte code interpreter, and we only recommend you enabling this - * if you are sure that there are no legal impediments to you doing so. See - * for further information. - * -#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER - */ - -/* - * Do you want to Build Fonts (Usually you only want to build and install - * fonts once, if this is a first time install you will want to build the - * fonts) - * -#define BuildFonts NO - */ - -/* - * To not build/install the 75dpi fonts, uncomment the following - * -#define Build75DpiFonts NO - */ - -/* - * To not build/install the 100dpi fonts, uncomment the following - * -#define Build100DpiFonts NO - */ - -/* - * To not build/install the Speedo fonts, uncomment the following - * -#define BuildSpeedoFonts NO - */ - -/* - * To not build/install the Type1 fonts, uncomment the following - * -#define BuildType1Fonts NO - */ - -/* - * To not build/install the CID fonts, uncomment the following - * -#define BuildCIDFonts NO - */ - -/* - * To not build/install the True Type fonts, uncomment the following - * -#define BuildTrueTypeFonts NO - */ - -/* - * To not build/install the Cyrillic fonts, uncomment the following - * -#define BuildCyrillicFonts NO - */ - -/* - * To not install the local font directory, uncomment the following - * -#define MakeLocalFontDir NO - */ - /* * To build only the servers with a cut-down source tree, uncomment * this. @@ -455,20 +358,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT */ -/* - * To link the X server with a dynamic version of the Xfont library, - * uncomment this. - * -#define XserverStaticFontLib NO - */ - -/* - * To enable binary compatibility with previous versions of the font - * encoding support, uncomment this. - * -#define FontencCompatibility YES - */ - /* * To disable building XInput support, uncomment this * diff --git a/nx-X11/config/cf/xfree86.cf b/nx-X11/config/cf/xfree86.cf index 0348c0302..41790c019 100644 --- a/nx-X11/config/cf/xfree86.cf +++ b/nx-X11/config/cf/xfree86.cf @@ -1683,50 +1683,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # define HasMTRRSupport NO #endif -/* - * Include fonts support - */ -#ifndef BuildSpeedo -# define BuildSpeedo NO -#endif - -#ifndef BuildType1 -# define BuildType1 NO -#endif - -#ifndef BuildCID -# define BuildCID YES -#endif - -#ifndef BuildFreeType -# define BuildFreeType YES -#endif - -/* - * By default, build all of the fonts. - */ -#ifndef Build75DpiFonts -# define Build75DpiFonts YES -#endif -#ifndef Build100DpiFonts -# define Build100DpiFonts YES -#endif -#ifndef BuildSpeedoFonts -# define BuildSpeedoFonts NO -#endif -#ifndef BuildType1Fonts -# define BuildType1Fonts YES -#endif -#ifndef BuildCIDFonts -# define BuildCIDFonts YES -#endif -#ifndef BuildTrueTypeFonts -# define BuildTrueTypeFonts YES -#endif -#ifndef BuildCyrillicFonts -# define BuildCyrillicFonts YES -#endif - /* * Build scanpci? */ @@ -1748,14 +1704,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # endif #endif -#ifndef CompressAllFonts -# define CompressAllFonts YES -#endif - -#ifndef GzipFontCompression -# define GzipFontCompression YES -#endif - /* Disable stripping installed programs for this release. */ #ifndef StripInstalledPrograms # define StripInstalledPrograms NO diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf index 3f922359e..9fb2f6589 100644 --- a/nx-X11/config/cf/xorg.cf +++ b/nx-X11/config/cf/xorg.cf @@ -1247,50 +1247,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # define HasMTRRSupport NO #endif -/* - * Include fonts support - */ -#ifndef BuildSpeedo -# define BuildSpeedo NO -#endif - -#ifndef BuildType1 -# define BuildType1 NO -#endif - -#ifndef BuildCID -# define BuildCID YES -#endif - -#ifndef BuildFreeType -# define BuildFreeType YES -#endif - -/* - * By default, build all of the fonts. - */ -#ifndef Build75DpiFonts -# define Build75DpiFonts YES -#endif -#ifndef Build100DpiFonts -# define Build100DpiFonts YES -#endif -#ifndef BuildSpeedoFonts -# define BuildSpeedoFonts NO -#endif -#ifndef BuildType1Fonts -# define BuildType1Fonts YES -#endif -#ifndef BuildCIDFonts -# define BuildCIDFonts YES -#endif -#ifndef BuildTrueTypeFonts -# define BuildTrueTypeFonts YES -#endif -#ifndef BuildCyrillicFonts -# define BuildCyrillicFonts YES -#endif - /* * Build scanpci? */ @@ -1312,14 +1268,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # endif #endif -#ifndef CompressAllFonts -# define CompressAllFonts YES -#endif - -#ifndef GzipFontCompression -# define GzipFontCompression YES -#endif - /* Disable stripping installed programs for this release. */ #ifndef StripInstalledPrograms # define StripInstalledPrograms NO diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def index eeaffa496..eca20fab4 100644 --- a/nx-X11/config/cf/xorgsite.def +++ b/nx-X11/config/cf/xorgsite.def @@ -152,99 +152,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildMatroxHal YES */ -/* - * Speedo fonts have been disabled by default in this release. - * To re-enable support for Speedo fonts, uncomment this. - * -#define BuildSpeedo YES - */ - -/* - * To disable support for CID fonts, uncomment this. - * -#define BuildCID NO - */ - -/* - * To disable support for TrueType fonts, uncomment these. - * -#define BuildFreeType NO - */ - -/* - * To set non-default build options for the underlying FreeType libraries, - * add them here and uncomment. - * -#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES - */ - -/* - * To build the FreeType libraries with the TrueType byte code interpreter - * enabled, uncomment this. Note that there are patent issues related to the - * TrueType byte code interpreter, and we only recommend you enabling this - * if you are sure that there are no legal impediments to you doing so. See - * for further information. - * -#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER - */ - -/* - * Do you want to Build Fonts (Usually you only want to build and install - * fonts once, if this is a first time install you will want to build the - * fonts) - * -#define BuildFonts NO - */ - -/* - * To not build/install the 75dpi fonts, uncomment the following - * -#define Build75DpiFonts NO - */ - -/* - * To not build/install the 100dpi fonts, uncomment the following - * -#define Build100DpiFonts NO - */ - -/* - * To build/install the Speedo fonts, uncomment the following - * (see setting above about Speedo support as well) - * -#define BuildSpeedoFonts YES - */ - -/* - * To not build/install the Type1 fonts, uncomment the following - * -#define BuildType1Fonts NO - */ - -/* - * To not build/install the CID fonts, uncomment the following - * -#define BuildCIDFonts NO - */ - -/* - * To not build/install the True Type fonts, uncomment the following - * -#define BuildTrueTypeFonts NO - */ - -/* - * To not build/install the Cyrillic fonts, uncomment the following - * -#define BuildCyrillicFonts NO - */ - -/* - * To not install the local font directory, uncomment the following - * -#define MakeLocalFontDir NO - */ - /* * To build only the servers with a cut-down source tree, uncomment * this. @@ -463,20 +370,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT */ -/* - * To link the X server with a dynamic version of the Xfont library, - * uncomment this. - * -#define XserverStaticFontLib NO - */ - -/* - * To enable binary compatibility with previous versions of the font - * encoding support, uncomment this. - * -#define FontencCompatibility YES - */ - /* * To disable building XInput support, uncomment this * @@ -669,36 +562,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define X86EMU_LIBPATH /usr/local/lib */ -/* - * Most platforms default to using an already installed FreeType 2 library. - * To use the one included in this release instead, uncomment the following. - * -#define HasFreetype2 NO - */ - -/* - * To use a FreeType library already installed outside the default search - * paths, uncomment the following and set the path as needed. - * -#define HasFreetype2 YES -#define Freetype2Dir /usr/local - */ - - -/* - * Most platforms default to using an already installed Fontconfig library. - * To use the one included in this release instead, uncomment the following. - * -#define HasFontconfig NO - */ - -/* - * To use a Fontconfig library already installed outside the default search - * paths, uncomment the following and set the path as needed. -#define HasFontconfig YES -#define FontconfigDir /usr/local - */ - /* * Most platforms default to using an already installed Expat library. diff --git a/nx-X11/include/Imakefile b/nx-X11/include/Imakefile index 8bdfd4ab7..39d330d04 100644 --- a/nx-X11/include/Imakefile +++ b/nx-X11/include/Imakefile @@ -15,7 +15,7 @@ GLXDIR = GL DPSDIR = DPS #endif -SUBDIRS = bitmaps extensions fonts $(GLXDIR) $(DPSDIR) +SUBDIRS = bitmaps extensions $(GLXDIR) $(DPSDIR) #ifdef Win32Architecture EXTRA_HEADERS = Xw32defs.h Xwinsock.h Xwindows.h diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 63b9365dc..24c034103 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -39,7 +39,7 @@ FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h #if BuildXinerama || BuildXineramaLibrary XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h #endif -#if BuildRender || BuildXftLibrary +#if BuildRender RENDERHEADERS = render.h renderproto.h #endif #if BuildXfixes || BuildXfixesLibrary diff --git a/nx-X11/include/fonts/FS.h b/nx-X11/include/fonts/FS.h deleted file mode 100644 index e90752233..000000000 --- a/nx-X11/include/fonts/FS.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $Xorg: FS.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Network Computing Devices and Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR 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. - */ - -/* - -Portions Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/include/fonts/FS.h,v 1.9 2003/07/09 15:27:28 tsi Exp $ */ - -#ifndef _FS_H_ -#define _FS_H_ - -#include -#include - -#define FS_PROTOCOL 2 -#define FS_PROTOCOL_MINOR 0 - -#ifndef X_PROTOCOL -/* protocol familes */ -#define FamilyInternet 0 -#define FamilyDECnet 1 -#define FamilyChaos 2 -#define FamilyInternet6 6 - - -typedef unsigned int FSDrawDirection; -#endif - -#ifndef None -#define None 0L -#endif - -#define LeftToRightDrawDirection 0 -#define RightToLeftDrawDirection 1 - -/* font info flags */ -#define FontInfoAllCharsExist (1L << 0) -#define FontInfoInkInside (1L << 1) -#define FontInfoHorizontalOverlap (1L << 2) - -/* auth status flags */ -#define AuthSuccess 0 -#define AuthContinue 1 -#define AuthBusy 2 -#define AuthDenied 3 - -/* property types */ -#define PropTypeString 0 -#define PropTypeUnsigned 1 -#define PropTypeSigned 2 - -#ifndef LSBFirst -/* byte order */ -#define LSBFirst 0 -#define MSBFirst 1 -#endif - -/* event masks */ -#define CatalogueChangeNotifyMask (1L << 0) -#define FontChangeNotifyMask (1L << 1) - -/* errors */ -#define FSSuccess -1 -#define FSBadRequest 0 -#define FSBadFormat 1 -#define FSBadFont 2 -#define FSBadRange 3 -#define FSBadEventMask 4 -#define FSBadAccessContext 5 -#define FSBadIDChoice 6 -#define FSBadName 7 -#define FSBadResolution 8 -#define FSBadAlloc 9 -#define FSBadLength 10 -#define FSBadImplementation 11 - -#define FirstExtensionError 128 -#define LastExtensionError 255 - -/* events */ -#define KeepAlive 0 -#define CatalogueChangeNotify 1 -#define FontChangeNotify 2 -#define FSLASTEvent 3 - -#endif /* _FS_H_ */ diff --git a/nx-X11/include/fonts/FSproto.h b/nx-X11/include/fonts/FSproto.h deleted file mode 100644 index 03b28089f..000000000 --- a/nx-X11/include/fonts/FSproto.h +++ /dev/null @@ -1,816 +0,0 @@ -/* $Xorg: FSproto.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ -/* - -Copyright 1990, 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices, or Digital - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, - * OR 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. - */ -/* $XFree86: xc/include/fonts/FSproto.h,v 1.2 2001/08/01 00:44:37 tsi Exp $ */ - -#ifndef _FS_PROTO_H_ -#define _FS_PROTO_H_ - -#include - -#define sz_fsPropOffset 20 -#define sz_fsPropInfo 8 -#define sz_fsResolution 6 - -#define sz_fsChar2b 2 -#define sz_fsChar2b_version1 2 -#define sz_fsOffset32 8 -#define sz_fsRange 4 - -#define sz_fsXCharInfo 12 -#define sz_fsXFontInfoHeader 40 - -#define sz_fsConnClientPrefix 8 -#define sz_fsConnSetup 12 -#define sz_fsConnSetupExtra 8 -#define sz_fsConnSetupAccept 12 - -/* request sizes */ -#define sz_fsReq 4 -#define sz_fsListExtensionsReq 4 -#define sz_fsResourceReq 8 - -#define sz_fsNoopReq 4 -#define sz_fsListExtensionReq 4 -#define sz_fsQueryExtensionReq 4 -#define sz_fsListCataloguesReq 12 -#define sz_fsSetCataloguesReq 4 -#define sz_fsGetCataloguesReq 4 -#define sz_fsSetEventMaskReq 8 -#define sz_fsGetEventMaskReq 4 -#define sz_fsCreateACReq 8 -#define sz_fsFreeACReq 8 -#define sz_fsSetAuthorizationReq 8 -#define sz_fsSetResolutionReq 4 -#define sz_fsGetResolutionReq 4 -#define sz_fsListFontsReq 12 -#define sz_fsListFontsWithXInfoReq 12 -#define sz_fsOpenBitmapFontReq 16 -#define sz_fsQueryXInfoReq 8 -#define sz_fsQueryXExtents8Req 12 -#define sz_fsQueryXExtents16Req 12 -#define sz_fsQueryXBitmaps8Req 16 -#define sz_fsQueryXBitmaps16Req 16 -#define sz_fsCloseReq 8 - -/* reply sizes */ -#define sz_fsReply 8 -#define sz_fsGenericReply 8 - -#define sz_fsListExtensionsReply 8 -#define sz_fsQueryExtensionReply 20 -#define sz_fsListCataloguesReply 16 -#define sz_fsGetCataloguesReply 8 -#define sz_fsGetEventMaskReply 12 -#define sz_fsCreateACReply 12 -#define sz_fsGetResolutionReply 8 -#define sz_fsListFontsReply 16 -#define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader) -#define sz_fsOpenBitmapFontReply 16 -#define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader) -#define sz_fsQueryXExtents8Reply 12 -#define sz_fsQueryXExtents16Reply 12 -#define sz_fsQueryXBitmaps8Reply 20 -#define sz_fsQueryXBitmaps16Reply 20 - -#define sz_fsError 16 -#define sz_fsEvent 12 -#define sz_fsKeepAliveEvent 12 - -#define fsTrue 1 -#define fsFalse 0 - -/* temp decls */ -#define Mask CARD32 -#define Font CARD32 -#define AccContext CARD32 - -typedef CARD32 fsTimestamp; - -#ifdef NOTDEF /* in fsmasks.h */ -typedef CARD32 fsBitmapFormat; -typedef CARD32 fsBitmapFormatMask; -#endif - -#define sz_fsBitmapFormat 4 - -typedef struct { - INT16 left B16, - right B16; - INT16 width B16; - INT16 ascent B16, - descent B16; - CARD16 attributes B16; -} fsXCharInfo; - -typedef struct { - CARD8 high; - CARD8 low; -} fsChar2b; - -typedef struct { - CARD8 low; - CARD8 high; -} fsChar2b_version1; - -typedef struct { - CARD8 min_char_high; - CARD8 min_char_low; - CARD8 max_char_high; - CARD8 max_char_low; -} fsRange; - -typedef struct { - CARD32 position B32; - CARD32 length B32; -} fsOffset32; - -typedef struct { - fsOffset32 name; - fsOffset32 value; - CARD8 type; - BYTE pad0; - CARD16 pad1 B16; -} fsPropOffset; - -typedef struct { - CARD32 num_offsets B32; - CARD32 data_len B32; - /* offsets */ - /* data */ -} fsPropInfo; - -typedef struct { - CARD16 x_resolution B16; - CARD16 y_resolution B16; - CARD16 point_size B16; -} fsResolution; - - -typedef struct { - CARD32 flags B32; - CARD8 char_range_min_char_high; - CARD8 char_range_min_char_low; - CARD8 char_range_max_char_high; - CARD8 char_range_max_char_low; - - CARD8 draw_direction; - CARD8 pad; - CARD8 default_char_high; - CARD8 default_char_low; - INT16 min_bounds_left B16; - INT16 min_bounds_right B16; - - INT16 min_bounds_width B16; - INT16 min_bounds_ascent B16; - INT16 min_bounds_descent B16; - CARD16 min_bounds_attributes B16; - - INT16 max_bounds_left B16; - INT16 max_bounds_right B16; - INT16 max_bounds_width B16; - INT16 max_bounds_ascent B16; - - INT16 max_bounds_descent B16; - CARD16 max_bounds_attributes B16; - INT16 font_ascent B16; - INT16 font_descent B16; - /* propinfo */ -} fsXFontInfoHeader; - - -/* requests */ - -typedef struct { - BYTE byteOrder; - CARD8 num_auths; - CARD16 major_version B16; - CARD16 minor_version B16; - CARD16 auth_len B16; - /* auth data */ -} fsConnClientPrefix; - -typedef struct { - CARD16 status B16; - CARD16 major_version B16; - CARD16 minor_version B16; - CARD8 num_alternates; - CARD8 auth_index; - CARD16 alternate_len B16; - CARD16 auth_len B16; - /* alternates */ - /* auth data */ -} fsConnSetup; - -typedef struct { - CARD32 length B32; - CARD16 status B16; - CARD16 pad B16; - /* more auth data */ -} fsConnSetupExtra; - -typedef struct { - CARD32 length B32; - CARD16 max_request_len B16; - CARD16 vendor_len B16; - CARD32 release_number B32; - /* vendor string */ -} fsConnSetupAccept; - -typedef struct { - CARD8 reqType; - CARD8 data; - CARD16 length B16; -} fsReq; - -/* - * The fsFakeReq structure is never used in the protocol; it is prepended - * to incoming packets when setting up a connection so we can index - * through InitialVector. To avoid alignment problems, it is padded - * to the size of a word on the largest machine this code runs on. - * Hence no sz_fsFakeReq constant is necessary. - */ -typedef struct { - CARD8 reqType; - CARD8 data; - CARD16 length B16; - CARD32 pad B32; /* to fill out to multiple of 64 bits */ -} fsFakeReq; - -typedef struct { - CARD8 reqType; - BYTE pad; - CARD16 length B16; - Font id B32; -} fsResourceReq; - -typedef fsReq fsNoopReq; -typedef fsReq fsListExtensionsReq; - -typedef struct { - CARD8 reqType; - BYTE nbytes; - CARD16 length B16; - /* name */ -} fsQueryExtensionReq; - -typedef struct { - CARD8 reqType; - CARD8 data; - CARD16 length B16; - CARD32 maxNames B32; - CARD16 nbytes B16; - CARD16 pad2 B16; - /* pattern */ -} fsListCataloguesReq; - -typedef struct { - CARD8 reqType; - BYTE num_catalogues; - CARD16 length B16; - /* catalogues */ -} fsSetCataloguesReq; - -typedef fsReq fsGetCataloguesReq; - -typedef struct { - CARD8 reqType; - CARD8 ext_opcode; - CARD16 length B16; - Mask event_mask; -} fsSetEventMaskReq; - -typedef struct { - CARD8 reqType; - CARD8 ext_opcode; - CARD16 length B16; -} fsGetEventMaskReq; - -typedef struct { - CARD8 reqType; - BYTE num_auths; - CARD16 length B16; - AccContext acid B32; - /* auth protocols */ -} fsCreateACReq; - -typedef fsResourceReq fsFreeACReq; -typedef fsResourceReq fsSetAuthorizationReq; - -typedef struct { - CARD8 reqType; - BYTE num_resolutions; - CARD16 length B16; - /* resolutions */ -} fsSetResolutionReq; - -typedef fsReq fsGetResolutionReq; - -typedef struct { - CARD8 reqType; - BYTE pad; - CARD16 length B16; - CARD32 maxNames B32; - CARD16 nbytes B16; - CARD16 pad2 B16; - /* pattern */ -} fsListFontsReq; - -typedef fsListFontsReq fsListFontsWithXInfoReq; - -typedef struct { - CARD8 reqType; - BYTE pad; - CARD16 length B16; - Font fid B32; - fsBitmapFormatMask format_mask B32; - fsBitmapFormat format_hint B32; - /* pattern */ -} fsOpenBitmapFontReq; - -typedef fsResourceReq fsQueryXInfoReq; - -typedef struct { - CARD8 reqType; - BOOL range; - CARD16 length B16; - Font fid B32; - CARD32 num_ranges B32; - /* list of chars */ -} fsQueryXExtents8Req; - -typedef fsQueryXExtents8Req fsQueryXExtents16Req; - -typedef struct { - CARD8 reqType; - BOOL range; - CARD16 length B16; - Font fid B32; - fsBitmapFormat format B32; - CARD32 num_ranges B32; - /* list of chars */ -} fsQueryXBitmaps8Req; - -typedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req; - -typedef fsResourceReq fsCloseReq; - - -/* replies */ -typedef struct { - BYTE type; - BYTE data1; - CARD16 sequenceNumber B16; - CARD32 length B32; -} fsGenericReply; - -typedef struct { - BYTE type; - CARD8 nExtensions; - CARD16 sequenceNumber B16; - CARD32 length B32; - /* extension names */ -} fsListExtensionsReply; - -typedef struct { - BYTE type; - CARD8 present; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 major_version B16; - CARD16 minor_version B16; - CARD8 major_opcode; - CARD8 first_event; - CARD8 num_events; - CARD8 first_error; - CARD8 num_errors; - CARD8 pad1; - CARD16 pad2 B16; -} fsQueryExtensionReply; - -typedef struct { - BYTE type; - BYTE pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 num_replies B32; - CARD32 num_catalogues B32; - /* catalog names */ -} fsListCataloguesReply; - -typedef struct { - BYTE type; - CARD8 num_catalogues; - CARD16 sequenceNumber B16; - CARD32 length B32; - /* catalogue names */ -} fsGetCataloguesReply; - -typedef struct { - BYTE type; - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 event_mask B32; -} fsGetEventMaskReply; - -typedef struct { - BYTE type; - CARD8 auth_index; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 status B16; - CARD16 pad B16; - /* auth data */ -} fsCreateACReply; - -typedef struct { - CARD32 length B32; - CARD16 status B16; - CARD16 pad B16; - /* auth data */ -} fsCreateACExtraReply; - -typedef struct { - BYTE type; - CARD8 num_resolutions; - CARD16 sequenceNumber B16; - CARD32 length B32; - /* resolutions */ -} fsGetResolutionReply; - -typedef struct { - BYTE type; - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 following B32; - CARD32 nFonts B32; - /* font names */ -} fsListFontsReply; - -/* - * this one is messy. the reply itself is variable length (unknown - * number of replies) and the contents of each is variable (unknown - * number of properties) - * - */ - -typedef struct { - BYTE type; - CARD8 nameLength; /* 0 is end-of-reply */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 nReplies B32; - CARD32 font_header_flags B32; - CARD8 font_hdr_char_range_min_char_high; - CARD8 font_hdr_char_range_min_char_low; - CARD8 font_hdr_char_range_max_char_high; - CARD8 font_hdr_char_range_max_char_low; - CARD8 font_header_draw_direction; - CARD8 font_header_pad; - CARD8 font_header_default_char_high; - CARD8 font_header_default_char_low; - INT16 font_header_min_bounds_left B16; - INT16 font_header_min_bounds_right B16; - INT16 font_header_min_bounds_width B16; - INT16 font_header_min_bounds_ascent B16; - INT16 font_header_min_bounds_descent B16; - CARD16 font_header_min_bounds_attributes B16; - INT16 font_header_max_bounds_left B16; - INT16 font_header_max_bounds_right B16; - INT16 font_header_max_bounds_width B16; - INT16 font_header_max_bounds_ascent B16; - INT16 font_header_max_bounds_descent B16; - CARD16 font_header_max_bounds_attributes B16; - INT16 font_header_font_ascent B16; - INT16 font_header_font_descent B16; - /* propinfo */ - /* name */ -} fsListFontsWithXInfoReply; - -typedef struct { - BYTE type; - CARD8 otherid_valid; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 otherid B32; - BYTE cachable; - BYTE pad1; - CARD16 pad2 B16; -} fsOpenBitmapFontReply; - -typedef struct { - BYTE type; - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 font_header_flags B32; - CARD8 font_hdr_char_range_min_char_high; - CARD8 font_hdr_char_range_min_char_low; - CARD8 font_hdr_char_range_max_char_high; - CARD8 font_hdr_char_range_max_char_low; - CARD8 font_header_draw_direction; - CARD8 font_header_pad; - CARD8 font_header_default_char_high; - CARD8 font_header_default_char_low; - INT16 font_header_min_bounds_left B16; - INT16 font_header_min_bounds_right B16; - INT16 font_header_min_bounds_width B16; - INT16 font_header_min_bounds_ascent B16; - INT16 font_header_min_bounds_descent B16; - CARD16 font_header_min_bounds_attributes B16; - INT16 font_header_max_bounds_left B16; - INT16 font_header_max_bounds_right B16; - INT16 font_header_max_bounds_width B16; - INT16 font_header_max_bounds_ascent B16; - INT16 font_header_max_bounds_descent B16; - CARD16 font_header_max_bounds_attributes B16; - INT16 font_header_font_ascent B16; - INT16 font_header_font_descent B16; - /* propinfo */ -} fsQueryXInfoReply; - -typedef struct { - BYTE type; - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 num_extents B32; - /* extents */ -} fsQueryXExtents8Reply; - -typedef fsQueryXExtents8Reply fsQueryXExtents16Reply; - -typedef struct { - BYTE type; - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 replies_hint B32; - CARD32 num_chars B32; - CARD32 nbytes B32; - /* offsets */ - /* glyphs */ -} fsQueryXBitmaps8Reply; - -typedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply; - -typedef union { - fsGenericReply generic; - fsListExtensionsReply extensions; - fsGetResolutionReply getres; -} fsReply; - -/* errors */ -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; -} fsError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; -} fsRequestError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - fsBitmapFormat format B32; -} fsFormatError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - Font fontid; -} fsFontError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - fsRange range; -} fsRangeError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - Mask event_mask; -} fsEventMaskError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - AccContext acid; -} fsAccessContextError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - Font fontid; -} fsIDChoiceError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; -} fsNameError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - fsResolution resolution; -} fsResolutionError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; -} fsAllocError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; - CARD32 bad_length B32; -} fsLengthError; - -typedef struct { - BYTE type; - BYTE request; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - CARD8 major_opcode; - CARD8 minor_opcode; - CARD16 pad B16; -} fsImplementationError; - -/* events */ -typedef struct { - BYTE type; - BYTE event_code; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; -} fsKeepAliveEvent; - -typedef struct { - BYTE type; - BYTE event_code; - CARD16 sequenceNumber B16; - CARD32 length B32; - fsTimestamp timestamp; - BOOL added; - BOOL deleted; - CARD16 pad B16; -} fsCatalogueChangeNotifyEvent; - -typedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent; - -typedef fsCatalogueChangeNotifyEvent fsEvent; - -/* reply codes */ -#define FS_Reply 0 /* normal reply */ -#define FS_Error 1 /* error */ -#define FS_Event 2 - -/* request codes */ -#define FS_Noop 0 -#define FS_ListExtensions 1 -#define FS_QueryExtension 2 -#define FS_ListCatalogues 3 -#define FS_SetCatalogues 4 -#define FS_GetCatalogues 5 -#define FS_SetEventMask 6 -#define FS_GetEventMask 7 -#define FS_CreateAC 8 -#define FS_FreeAC 9 -#define FS_SetAuthorization 10 -#define FS_SetResolution 11 -#define FS_GetResolution 12 -#define FS_ListFonts 13 -#define FS_ListFontsWithXInfo 14 -#define FS_OpenBitmapFont 15 -#define FS_QueryXInfo 16 -#define FS_QueryXExtents8 17 -#define FS_QueryXExtents16 18 -#define FS_QueryXBitmaps8 19 -#define FS_QueryXBitmaps16 20 -#define FS_CloseFont 21 - -/* restore decls */ -#undef Mask -#undef Font -#undef AccContext - -#endif /* _FS_PROTO_H_ */ diff --git a/nx-X11/include/fonts/Imakefile b/nx-X11/include/fonts/Imakefile deleted file mode 100644 index 0eae8a3bc..000000000 --- a/nx-X11/include/fonts/Imakefile +++ /dev/null @@ -1,22 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $ - - - - -XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.7 2001/01/17 17:53:26 dawes Exp $ - - HEADERS = FS.h FSproto.h font.h fontstruct.h fsmasks.h - -all:: - -BuildIncludes($(HEADERS),X11/fonts,../..) - -#if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS)) -#endif - - -InstallDriverSDKNonExecFile(font.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(fontproto.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(fontstruct.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(fsmasks.h,$(DRIVERSDKINCLUDEDIR)) diff --git a/nx-X11/include/fonts/font.h b/nx-X11/include/fonts/font.h deleted file mode 100644 index e6a00cddb..000000000 --- a/nx-X11/include/fonts/font.h +++ /dev/null @@ -1,169 +0,0 @@ -/* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/*********************************************************** -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. - -******************************************************************/ -/* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */ -/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */ - -#ifndef FONT_H -#define FONT_H - -#ifndef BitmapFormatByteOrderMask -#include "fsmasks.h" -#endif - -/* data structures */ -#ifndef _XTYPEDEF_FONTPTR -typedef struct _Font *FontPtr; -#define _XTYPEDEF_FONTPTR -#endif - -typedef struct _FontInfo *FontInfoPtr; -typedef struct _FontProp *FontPropPtr; -typedef struct _ExtentInfo *ExtentInfoPtr; -typedef struct _FontPathElement *FontPathElementPtr; - -#ifndef _XTYPEDEF_CHARINFOPTR -typedef struct _CharInfo *CharInfoPtr; -#define _XTYPEDEF_CHARINFOPTR -#endif - -typedef struct _FontNames *FontNamesPtr; -typedef struct _FontResolution *FontResolutionPtr; - -#define NullCharInfo ((CharInfoPtr) 0) -#define NullFont ((FontPtr) 0) -#define NullFontInfo ((FontInfoPtr) 0) - - /* draw direction */ -#define LeftToRight 0 -#define RightToLeft 1 -#define BottomToTop 2 -#define TopToBottom 3 -typedef int DrawDirection; - -#define NO_SUCH_CHAR -1 - - -#define FontAliasType 0x1000 - -#define AllocError 80 -#define StillWorking 81 -#define FontNameAlias 82 -#define BadFontName 83 -#define Suspended 84 -#define Successful 85 -#define BadFontPath 86 -#define BadCharRange 87 -#define BadFontFormat 88 -#define FPEResetFailed 89 /* for when an FPE reset won't work */ - -/* OpenFont flags */ -#define FontLoadInfo 0x0001 -#define FontLoadProps 0x0002 -#define FontLoadMetrics 0x0004 -#define FontLoadBitmaps 0x0008 -#define FontLoadAll 0x000f -#define FontOpenSync 0x0010 -#define FontReopen 0x0020 - -/* Query flags */ -#define LoadAll 0x1 -#define FinishRamge 0x2 -#define EightBitFont 0x4 -#define SixteenBitFont 0x8 - -/* Glyph Caching Modes */ -#define CACHING_OFF 0 -#define CACHE_16_BIT_GLYPHS 1 -#define CACHE_ALL_GLYPHS 2 -#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS -extern int glyphCachingMode; - -struct _Client; - -extern int StartListFontsWithInfo( - struct _Client * /*client*/, - int /*length*/, - unsigned char * /*pattern*/, - int /*max_names*/ -); - -extern FontNamesPtr MakeFontNamesRecord( - unsigned /* size */ -); - -extern void FreeFontNames( - FontNamesPtr /* pFN*/ -); - -extern int AddFontNamesName( - FontNamesPtr /* names */, - char * /* name */, - int /* length */ -); - -#if 0 /* unused */ -extern int FontToFSError(); -extern FontResolutionPtr GetClientResolution(); -#endif - -typedef struct _FontPatternCache *FontPatternCachePtr; - -extern FontPatternCachePtr MakeFontPatternCache ( - void -); - -extern void FreeFontPatternCache ( - FontPatternCachePtr /* cache */ -); - -extern void EmptyFontPatternCache ( - FontPatternCachePtr /* cache */ -); - -extern void CacheFontPattern ( - FontPatternCachePtr /* cache */, - char * /* pattern */, - int /* patlen */, - FontPtr /* pFont */ -); -extern FontResolutionPtr GetClientResolutions( - int * /* num */ -); - -extern FontPtr FindCachedFontPattern ( - FontPatternCachePtr /* cache */, - char * /* pattern */, - int /* patlen */ -); - -extern void RemoveCachedFontPattern ( - FontPatternCachePtr /* cache */, - FontPtr /* pFont */ -); - -typedef enum { - Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit -} FontEncoding; - -#endif /* FONT_H */ diff --git a/nx-X11/include/fonts/fontproto.h b/nx-X11/include/fonts/fontproto.h deleted file mode 100644 index 83c9a00c0..000000000 --- a/nx-X11/include/fonts/fontproto.h +++ /dev/null @@ -1,93 +0,0 @@ -/* $XFree86: xc/include/fonts/fontproto.h,v 1.2 1999/09/04 09:14:08 dawes Exp $ */ - -/*********************************************************** - -Copyright (c) 1999 The XFree86 Project Inc. - -All Rights Reserved. - -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 -OPEN GROUP 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 XFree86 Project -Inc. 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 XFree86 Project Inc.. - -*/ -#ifndef _FONTPROTO_H -#define _FONTPROTO_H - -/* Externally provided functions required by libXfont */ - -extern int RegisterFPEFunctions ( NameCheckFunc name_func, - InitFpeFunc init_func, - FreeFpeFunc free_func, - ResetFpeFunc reset_func, - OpenFontFunc open_func, - CloseFontFunc close_func, - ListFontsFunc list_func, - StartLfwiFunc start_lfwi_func, - NextLfwiFunc next_lfwi_func, - WakeupFpeFunc wakeup_func, - ClientDiedFunc client_died, - LoadGlyphsFunc load_glyphs, - StartLaFunc start_list_alias_func, - NextLaFunc next_list_alias_func, - SetPathFunc set_path_func); - -extern int GetDefaultPointSize ( void ); - -extern int init_fs_handlers ( FontPathElementPtr fpe, - BlockHandlerProcPtr block_handler); -extern void remove_fs_handlers ( FontPathElementPtr fpe, - BlockHandlerProcPtr block_handler, - Bool all ); - -extern int client_auth_generation ( ClientPtr client ); - -#ifndef ___CLIENTSIGNAL_DEFINED___ -#define ___CLIENTSIGNAL_DEFINED___ -extern Bool ClientSignal ( ClientPtr client ); -#endif /* ___CLIENTSIGNAL_DEFINED___ */ - -extern void DeleteFontClientID ( Font id ); -extern Font GetNewFontClientID ( void ); -extern int StoreFontClientFont ( FontPtr pfont, Font id ); -extern void FontFileRegisterFpeFunctions ( void ); -extern void FontFileCheckRegisterFpeFunctions ( void ); - -extern Bool XpClientIsBitmapClient ( ClientPtr client ); -extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe ); -extern void PrinterFontRegisterFpeFunctions ( void ); - -extern void fs_register_fpe_functions ( void ); -extern void check_fs_register_fpe_functions ( void ); - -/* util/private.c */ -extern FontPtr CreateFontRec (void); -extern void DestroyFontRec (FontPtr font); -extern Bool _FontSetNewPrivate (FontPtr /* pFont */, - int /* n */, - pointer /* ptr */); -extern int AllocateFontPrivateIndex (void); -extern void ResetFontPrivateIndex (void); - -/* Type1/t1funcs.c */ -extern void Type1RegisterFontFileFunctions(void); -extern void CIDRegisterFontFileFunctions(void); - -/* Speedo/spfuncs.c */ -extern void SpeedoRegisterFontFileFunctions(void); - -/* FreeType/ftfuncs.c */ -extern void FreeTypeRegisterFontFileFunctions(void); - -#endif diff --git a/nx-X11/include/fonts/fontstruct.h b/nx-X11/include/fonts/fontstruct.h deleted file mode 100644 index 451ed6a12..000000000 --- a/nx-X11/include/fonts/fontstruct.h +++ /dev/null @@ -1,295 +0,0 @@ -/* $Xorg: fontstruct.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/*********************************************************** -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. - -******************************************************************/ -/* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */ - -#ifndef FONTSTR_H -#define FONTSTR_H - -#include -#include "font.h" -#include -#include - -/* - * This version of the server font data strucutre is only for describing - * the in memory data structure. The file structure is not necessarily a - * copy of this. That is up to the compiler and the OS layer font loading - * machinery. - */ - -#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */ - -typedef struct _FontProp { - long name; - long value; /* assumes ATOM is not larger than INT32 */ -} FontPropRec; - -typedef struct _FontResolution { - unsigned short x_resolution; - unsigned short y_resolution; - unsigned short point_size; -} FontResolutionRec; - -typedef struct _ExtentInfo { - DrawDirection drawDirection; - int fontAscent; - int fontDescent; - int overallAscent; - int overallDescent; - int overallWidth; - int overallLeft; - int overallRight; -} ExtentInfoRec; - -typedef struct _CharInfo { - xCharInfo metrics; /* info preformatted for Queries */ - char *bits; /* pointer to glyph image */ -} CharInfoRec; - -/* - * Font is created at font load time. It is specific to a single encoding. - * e.g. not all of the glyphs in a font may be part of a single encoding. - */ - -typedef struct _FontInfo { - unsigned short firstCol; - unsigned short lastCol; - unsigned short firstRow; - unsigned short lastRow; - unsigned short defaultCh; - unsigned int noOverlap:1; - unsigned int terminalFont:1; - unsigned int constantMetrics:1; - unsigned int constantWidth:1; - unsigned int inkInside:1; - unsigned int inkMetrics:1; - unsigned int allExist:1; - unsigned int drawDirection:2; - unsigned int cachable:1; - unsigned int anamorphic:1; - short maxOverlap; - short pad; - xCharInfo maxbounds; - xCharInfo minbounds; - xCharInfo ink_maxbounds; - xCharInfo ink_minbounds; - short fontAscent; - short fontDescent; - int nprops; - FontPropPtr props; - char *isStringProp; -} FontInfoRec; - -typedef struct _Font { - int refcnt; - FontInfoRec info; - char bit; - char byte; - char glyph; - char scan; - fsBitmapFormat format; - int (*get_glyphs) (FontPtr /* font */, - unsigned long /* count */, - unsigned char * /* chars */, - FontEncoding /* encoding */, - unsigned long * /* count */, - CharInfoPtr * /* glyphs */); - int (*get_metrics) (FontPtr /* font */, - unsigned long /* count */, - unsigned char * /* chars */, - FontEncoding /* encoding */, - unsigned long * /* count */, - xCharInfo ** /* glyphs */); - void (*unload_font) (FontPtr /* font */); - void (*unload_glyphs) (FontPtr /* font */); - FontPathElementPtr fpe; - pointer svrPrivate; - pointer fontPrivate; - pointer fpePrivate; - int maxPrivate; - pointer *devPrivates; -} FontRec; - -#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \ - (pFont)->devPrivates[n]) - -#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \ - _FontSetNewPrivate (pFont, n, ptr) : \ - ((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE)) - -typedef struct _FontNames { - int nnames; - int size; - int *length; - char **names; -} FontNamesRec; - -/* External view of font paths */ -typedef struct _FontPathElement { - int name_length; - char *name; - int type; - int refcount; - pointer private; -} FontPathElementRec; - -typedef Bool (*NameCheckFunc) (char *name); -typedef int (*InitFpeFunc) (FontPathElementPtr fpe); -typedef int (*FreeFpeFunc) (FontPathElementPtr fpe); -typedef int (*ResetFpeFunc) (FontPathElementPtr fpe); -typedef int (*OpenFontFunc) ( pointer client, - FontPathElementPtr fpe, - Mask flags, - char* name, - int namelen, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - XID id, - FontPtr* pFont, - char** aliasName, - FontPtr non_cachable_font); -typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont); -typedef int (*ListFontsFunc) (pointer client, - FontPathElementPtr fpe, - char* pat, - int len, - int max, - FontNamesPtr names); - -typedef int (*StartLfwiFunc) (pointer client, - FontPathElementPtr fpe, - char* pat, - int len, - int max, - pointer* privatep); - -typedef int (*NextLfwiFunc) (pointer client, - FontPathElementPtr fpe, - char** name, - int* namelen, - FontInfoPtr* info, - int* numFonts, - pointer private); - -typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe, - unsigned long* LastSelectMask); - -typedef void (*ClientDiedFunc) (pointer client, - FontPathElementPtr fpe); - -typedef int (*LoadGlyphsFunc) (pointer client, - FontPtr pfont, - Bool range_flag, - unsigned int nchars, - int item_size, - unsigned char* data); - -typedef int (*StartLaFunc) (pointer client, - FontPathElementPtr fpe, - char* pat, - int len, - int max, - pointer* privatep); - -typedef int (*NextLaFunc) (pointer client, - FontPathElementPtr fpe, - char** namep, - int* namelenp, - char** resolvedp, - int* resolvedlenp, - pointer private); - -typedef void (*SetPathFunc)(void); - -typedef struct _FPEFunctions { - NameCheckFunc name_check; - InitFpeFunc init_fpe; - ResetFpeFunc reset_fpe; - FreeFpeFunc free_fpe; - OpenFontFunc open_font; - CloseFontFunc close_font; - ListFontsFunc list_fonts; - StartLaFunc start_list_fonts_and_aliases; - NextLaFunc list_next_font_or_alias; - StartLfwiFunc start_list_fonts_with_info; - NextLfwiFunc list_next_font_with_info; - WakeupFpeFunc wakeup_fpe; - ClientDiedFunc client_died; - /* for load_glyphs, range_flag = 0 -> - nchars = # of characters in data - item_size = bytes/char - data = list of characters - range_flag = 1 -> - nchars = # of fsChar2b's in data - item_size is ignored - data = list of fsChar2b's */ - LoadGlyphsFunc load_glyphs; - SetPathFunc set_path_hook; -} FPEFunctionsRec, FPEFunctions; - -/* - * Various macros for computing values based on contents of - * the above structures - */ - -#define GLYPHWIDTHPIXELS(pci) \ - ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing) - -#define GLYPHHEIGHTPIXELS(pci) \ - ((pci)->metrics.ascent + (pci)->metrics.descent) - -#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3) - -#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7) - -#define BYTES_PER_ROW(bits, nbytes) \ - ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ - :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ - :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ - :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ - : 0) - -#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \ - BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad)) -/* - * Macros for computing different bounding boxes for fonts; from - * the font protocol - */ - -#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \ - (pi)->fontAscent : (pi)->ink_maxbounds.ascent) -#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \ - (pi)->fontDescent : (pi)->ink_maxbounds.descent) -#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi)) -#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \ - (pi)->ink_minbounds.leftSideBearing : 0) -#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \ - (pi)->ink_maxbounds.characterWidth ? \ - (pi)->ink_maxbounds.rightSideBearing : \ - (pi)->ink_maxbounds.characterWidth) -#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi)) - -#include "fontproto.h" - -#endif /* FONTSTR_H */ diff --git a/nx-X11/include/fonts/fsmasks.h b/nx-X11/include/fonts/fsmasks.h deleted file mode 100644 index 434ee97b5..000000000 --- a/nx-X11/include/fonts/fsmasks.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $Xorg: fsmasks.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Network Computing Devices and Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR 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. - */ - -/* - -Portions Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ - - -/* - * masks & values used by the font lib and the font server - */ - -#ifndef _FSMASKS_H_ -#define _FSMASKS_H_ - -#include - -/* font format macros */ -#define BitmapFormatByteOrderMask (1L << 0) -#define BitmapFormatBitOrderMask (1L << 1) -#define BitmapFormatImageRectMask (3L << 2) -#define BitmapFormatScanlinePadMask (3L << 8) -#define BitmapFormatScanlineUnitMask (3L << 12) - -#define BitmapFormatByteOrderLSB (0) -#define BitmapFormatByteOrderMSB (1L << 0) -#define BitmapFormatBitOrderLSB (0) -#define BitmapFormatBitOrderMSB (1L << 1) - -#define BitmapFormatImageRectMin (0L << 2) -#define BitmapFormatImageRectMaxWidth (1L << 2) -#define BitmapFormatImageRectMax (2L << 2) - -#define BitmapFormatScanlinePad8 (0L << 8) -#define BitmapFormatScanlinePad16 (1L << 8) -#define BitmapFormatScanlinePad32 (2L << 8) -#define BitmapFormatScanlinePad64 (3L << 8) - -#define BitmapFormatScanlineUnit8 (0L << 12) -#define BitmapFormatScanlineUnit16 (1L << 12) -#define BitmapFormatScanlineUnit32 (2L << 12) -#define BitmapFormatScanlineUnit64 (3L << 12) - -#define BitmapFormatMaskByte (1L << 0) -#define BitmapFormatMaskBit (1L << 1) -#define BitmapFormatMaskImageRectangle (1L << 2) -#define BitmapFormatMaskScanLinePad (1L << 3) -#define BitmapFormatMaskScanLineUnit (1L << 4) - -typedef CARD32 fsBitmapFormat; -typedef CARD32 fsBitmapFormatMask; - -#endif /* _FSMASKS_H_ */ diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 599ea643f..2c7f17472 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -106,22 +106,6 @@ RENDERLIBDIR = Xrender EXPATBUILDDIR = expat #endif -#if BuildFreetype2Library -FREETYPE2BUILDDIR = freetype2 -#endif - -#if BuildFontconfigLibrary -FONTCONFIGBUILDDIR = fontconfig -#endif - -#if BuildXftLibrary -XFTLIBDIR = Xft -#endif - -#if BuildXft1Library -XFT1LIBDIR = Xft1 -#endif - #if BuildRandRLibrary RANDRLIBDIR = Xrandr #endif @@ -165,7 +149,7 @@ XF86EXTLIBS = $(XF86MISCLIBDIR) $(XF86VMLIBDIR) \ LBXUTILDIR = lbxutil #endif -#if (BuildLBX || GzipFontCompression) && !HasZlib +#if BuildLBX && !HasZlib ZLIBDIR = zlib #endif @@ -177,16 +161,6 @@ REGEXDIR = regex XALIBDIR = Xa #endif -#if BuildFontCacheLib -FONTCACHELIBDIR = Xfontcache -#endif - -FONTSUBDIR = font - -#if BuildFontEncLib -FONTENCSUBDIR = fontenc -#endif - #if BuildXauLib XAULIBDIR = Xau #endif @@ -218,15 +192,13 @@ LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \ $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(EXPATBUILDDIR) \ $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ $(DPSLIBDIR) $(PSRESLIBDIR) $(DPSTKLIBDIR) $(XINERAMADIR) \ - $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ - $(FONTCONFIGBUILDDIR) $(XFT1LIBDIR) \ - $(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \ + $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) \ + $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \ $(XRESLIBDIR) $(APPLELIBDIR) $(DMXLIBDIR) $(WINDOWSLIBDIR) \ $(XEVIELIBDIR) $(XFIXESLIBDIR) $(DAMAGELIBDIR) \ $(XCURSORLIBDIR) $(COMPOSITELIBDIR) -SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \ - $(FONTCACHELIBDIR) +SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/lib/Xrender/Imakefile b/nx-X11/lib/Xrender/Imakefile index 86ac94f3e..72d149a20 100644 --- a/nx-X11/lib/Xrender/Imakefile +++ b/nx-X11/lib/Xrender/Imakefile @@ -26,13 +26,6 @@ XCOMM NONSTANDARD_HEADERS below. #define SharedXrenderRev 1.1 SOXRENDERREV = SharedXrenderRev -#if SharedLibXrender -#define SharedXft1Rev 1.2 -SharedLibReferences(XFT1,Xft,$(XFT1SRC),SOXFT1REV,SharedXft1Rev) -#else -ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1SRC),BuildLibDir) -#endif - #undef LinkBuildLibrary #define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ RemoveFile($(BUILDLIBDIR)/lib) @@\ diff --git a/nx-X11/lib/font/Imakefile b/nx-X11/lib/font/Imakefile deleted file mode 100644 index f47fe963c..000000000 --- a/nx-X11/lib/font/Imakefile +++ /dev/null @@ -1,178 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/Imakefile,v 3.37 2003/10/24 16:21:12 tsi Exp $ - -#include - -#define IHaveSubdirs - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoExtraLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont - -#if !BuildFontLib -#define LibCreate NO -#else -#define LibCreate YES -#endif - -#if BuildLibraries -#define LibInstall YES -#else -#define LibInstall NO -#endif - -#if BuildLibraries -STUBDIRS = stubs -#endif - -LIBNAME = NX_Xfont -SOREV = $(SOFONTREV) - -#ifndef SeparateSharedCompile -#define SeparateSharedCompile YES -#endif -#if NormalLibFont && SharedLibFont && SeparateSharedCompile -STATIC_OBJSDIR = unshared/ -#endif - -#ifdef SharedXfontReqs -REQUIREDLIBS = SharedXfontReqs -#endif - -#if BuildSpeedo - SPEEDODIRS = Speedo - SPEEDOSHAREDOBJS = Speedo/?*.o - SPEEDOSTATICOBJS = Speedo/$(STATIC_OBJSDIR)?*.o - SPEEDODEBUGOBJS = Speedo/debugger/?*.o - SPEEDOPROFILEOBJS = Speedo/profiled/?*.o - SPEEDODONES = Speedo/DONE -#endif -#if BuildType1 || BuildCID - TYPE1DIRS = Type1 - TYPE1SHAREDOBJS = Type1/?*.o - TYPE1STATICOBJS = Type1/$(STATIC_OBJSDIR)?*.o - TYPE1DEBUGOBJS = Type1/debugger/?*.o - TYPE1PROFILEOBJS = Type1/profiled/?*.o - TYPE1DONES = Type1/DONE -#endif -#if BuildFreeType || BuildFreetype2Library - FREETYPEDIRS = FreeType - FREETYPESHAREDOBJS = FreeType/?*.o - FREETYPESTATICOBJS = FreeType/$(STATIC_OBJSDIR)?*.o - FREETYPEDEBUGOBJS = FreeType/debugger/?*.o -FREETYPEPROFILEOBJS = FreeType/profiled/?*.o - FREETYPEDONES = FreeType/DONE -#endif -#if BuildBuiltinFonts - BUILTINDIRS = builtins - BUILTINSHAREDOBJS = builtins/?*.o - BUILTINSTATICOBJS = builtins/$(STATIC_OBJSDIR)?*.o - BUILTINDEBUGOBJS = builtins/debugger/?*.o - BUILTINPROFILEOBJS = builtins/profiled/?*.o - BUILTINDONES = builtins/DONE -#endif -#if BuildFontCache - FONTCACHEDIRS = fontcache -FONTCACHESHAREDOBJS = fontcache/?*.o -FONTCACHESTATICOBJS = fontcache/$(STATIC_OBJSDIR)?*.o - FONTCACHEDEBUGOBJS = fontcache/debugger/?*.o -FONTCACHEPROFILEOBJS = fontcache/profiled/?*.o - FONTCACHEDONES = fontcache/DONE -#endif - - SUBDIRS = bitmap fontfile fc $(FONTCACHEDIRS) \ - $(SPEEDODIRS) $(TYPE1DIRS) \ - $(FREETYPEDIRS) $(BUILTINDIRS) \ - util $(STUBDIRS) include - SHARED_OBJS = bitmap/?*.o fontfile/?*.o fc/?*.o $(FONTCACHESHAREDOBJS) \ - $(SPEEDOSHAREDOBJS) $(TYPE1SHAREDOBJS) \ - $(FREETYPESHAREDOBJS) \ - $(BUILTINSHAREDOBJS) util/?*.o - STATIC_OBJS = bitmap/$(STATIC_OBJSDIR)?*.o fontfile/$(STATIC_OBJSDIR)?*.o \ - fc/$(STATIC_OBJSDIR)?*.o $(FONTCACHESTATICOBJS) \ - $(SPEEDOSTATICOBJS) $(TYPE1STATICOBJS) \ - $(FREETYPESTATICOBJS) \ - $(BUILTINSTATICOBJS) util/$(STATIC_OBJSDIR)?*.o - DEBUG_OBJS = bitmap/debugger/?*.o fontfile/debugger/?*.o fc/debugger/?*.o \ - $(FONTCACHEDEBUGOBJS) \ - $(SPEEDODEBUGOBJS) $(TYPE1DEBUGOBJS) \ - $(FREETYPEDEBUGOBJS) \ - $(BUILTINDEBUGOBJS) util/debugger/?*.o - PROFILE_OBJS = bitmap/profiled/?*.o fontfile/profiled/?*.o fc/profiled/?*.o \ - $(FONTCACHEPROFILEOBJS) \ - $(SPEEDOPROFILEOBJS) $(TYPE1PROFILEOBJS) \ - $(FREETYPEPROFILEOBJS) \ - $(BUILTINPROFILEOBJS) util/profiled/?*.o - DONES = bitmap/DONE fontfile/DONE fc/DONE $(FONTCACHEDONES) \ - $(SPEEDODONES) $(TYPE1DONES) \ - $(FREETYPEDONES) \ - $(BUILTINDONES) util/DONE - -#if BuildServer && DoLoadableServer - BASEDIRS = fontfile fc util $(FONTCACHEDIRS) - BASELIBOBJS = fontfile/$(STATIC_OBJSDIR)?*.o fc/$(STATIC_OBJSDIR)?*.o \ - util/$(STATIC_OBJSDIR)?*.o $(FONTCACHESTATICOBJS) - BASEOBJS = fontfile/module/ffcheck.o fontfile/module/register.o \ - util/private.o - BASEDONES = fontfile/DONE fontfile/module/DONE fc/DONE util/DONE \ - $(FONTCACHEDONES) -#endif - -#if HasParallelMake -MakeMutex($(SUBDIRS) $(DONES)) -#endif - -#if HasGnuMake || HasBsdMake -$(DONES): $(SUBDIRS) -#endif - -#include - -#undef _LinkBuildLibrary -#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) - -#if LibCreate -#if NormalLibFont -NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS)) -#if LibInstall -InstallLibrary($(LIBNAME),$(USRLIBDIR)) -#endif /* LibInstall */ -#endif /* NormalLibFont */ - -#if SharedLibFont -SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.) -#if LibInstall -InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) -#endif /* LibInstall */ -#endif /* SharedLibFont */ - -#if DebugLibFont -DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) -#if LibInstall -InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) -#endif /* LibInstall */ -#endif /* DebugLibFont */ - -#if ProfileLibFont -ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) -#if LibInstall -InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) -#endif /* LibInstall */ -#endif /* ProfileLibFont */ -#endif /* LibCreate */ - -#if BuildServer && DoLoadableServer -NormalDepLibraryTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASELIBOBJS)) -NormalDepRelocatableTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASEOBJS)) -#endif - - -ForceSubdirs($(SUBDIRS)) - -DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/lib/font/Speedo/Imakefile b/nx-X11/lib/font/Speedo/Imakefile deleted file mode 100644 index e2d9dcdeb..000000000 --- a/nx-X11/lib/font/Speedo/Imakefile +++ /dev/null @@ -1,46 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.10 2001/01/19 08:13:29 dawes Exp $ - -#if BuildServer && DoLoadableServer -#define IHaveSubdirs -#define NoLibSubdirs -#define PassCDebugFlags -SUBDIRS = module -#endif - - INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include - HEADERS = - SPEEDOSRCS = do_char.c do_trns.c out_bl2d.c out_blk.c \ - out_scrn.c out_util.c reset.c set_spcs.c set_trns.c - SPEEDOOBJS = do_char.o do_trns.o out_bl2d.o out_blk.o \ - out_scrn.o out_util.o reset.o set_spcs.o set_trns.o - - SRCS = spfuncs.c spfile.c spinfo.c sperr.c spfont.c spglyph.c \ - spencode.c bics-unicode.c \ - $(SPEEDOSRCS) - OBJS = spfuncs.o spfile.o spinfo.o sperr.o spfont.o spglyph.o \ - spencode.o bics-unicode.o \ - $(SPEEDOOBJS) - -#if BuildFontLib -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) -#endif - -#if BuildServer && DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() diff --git a/nx-X11/lib/font/Speedo/adobe-iso.h b/nx-X11/lib/font/Speedo/adobe-iso.h deleted file mode 100644 index e1eeef1c5..000000000 --- a/nx-X11/lib/font/Speedo/adobe-iso.h +++ /dev/null @@ -1,200 +0,0 @@ -/* $Xorg: adobe-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ - -/* - * Latin 1 format from masterset format 11 (ps) - * 0 implies no valid mapping - */ - -int adobe_map[] = { - 32, 32, - 33, 33, - 34, 34, - 35, 35, - 36, 36, - 37, 37, - 38, 38, - 39, 169, - 40, 40, - 41, 41, - 42, 42, - 43, 43, - 44, 44, - 45, 45, - 46, 46, - 47, 47, - 48, 48, - 49, 49, - 50, 50, - 51, 51, - 52, 52, - 53, 53, - 54, 54, - 55, 55, - 56, 56, - 57, 57, - 58, 58, - 59, 59, - 60, 60, - 61, 61, - 62, 62, - 63, 63, - 64, 64, - 65, 65, - 66, 66, - 67, 67, - 68, 68, - 69, 69, - 70, 70, - 71, 71, - 72, 72, - 73, 73, - 74, 74, - 75, 75, - 76, 76, - 77, 77, - 78, 78, - 79, 79, - 80, 80, - 81, 81, - 82, 82, - 83, 83, - 84, 84, - 85, 85, - 86, 86, - 87, 87, - 88, 88, - 89, 89, - 90, 90, - 91, 91, - 92, 92, - 93, 93, - 94, 195, - 95, 95, - 96, 193, - 97, 97, - 98, 98, - 99, 99, - 100, 100, - 101, 101, - 102, 102, - 103, 103, - 104, 104, - 105, 105, - 106, 106, - 107, 107, - 108, 108, - 109, 109, - 110, 110, - 111, 111, - 112, 112, - 113, 113, - 114, 114, - 115, 115, - 116, 116, - 117, 117, - 118, 118, - 119, 119, - 120, 120, - 121, 121, - 122, 122, - 123, 123, - 124, 124, - 125, 125, - 126, 196, /* lc tilde */ - 127, 0, /* */ - 161, 161, /* invert exclamation */ - 162, 162, /* cent */ - 163, 163, /* pound sterling */ - 164, 168, /* intl currency */ - 165, 165, /* yen */ - 166, 320, /* split vert bar */ - 167, 167, /* section mark */ - 168, 200, /* dierisis */ - 169, 0, /* superior copyright */ - 170, 0, /* feminine ordinal */ - 171, 171, /* dbl left guillemot */ - 172, 314, /* math not */ - 173, 0, /* hyphen ? */ - 174, 0, /* superior registered */ - 175, 0, /* overscore */ - 176, 321, /* degree */ - 177, 329, /* math +- */ - 178, 333, /* superior 2 */ - 179, 332, /* superior 3 */ - 180, 194, /* lc acute */ - 181, 324, /* greek lc mu */ - 182, 182, /* Paragraph */ - 183, 180, /* center dot */ - 184, 203, /* cedilla lc */ - 185, 328, /* superior 1 */ - 186, 0, /* masculine ordinal(using superior o) */ - 187, 187, /* right dbl guillemot */ - 188, 327, /* 1/4 */ - 189, 326, /* 1/2 */ - 190, 331, /* 3/4 */ - 191, 191, /* invert question */ - 192, 259, /* A grave */ - 193, 256, /* A acute */ - 194, 257, /* A circumflex */ - 195, 261, /* A tilde */ - 196, 258, /* A dierisis */ - 197, 260, /* A angstrom */ - 198, 225, /* AE ligature */ - 199, 262, /* C cedilla */ - 200, 266, /* E grave */ - 201, 263, /* E acute */ - 202, 264, /* E circumflex */ - 203, 265, /* E dierisis */ - 204, 270, /* I grave */ - 205, 267, /* I acute */ - 206, 268, /* I circumflex */ - 207, 269, /* I dierisis */ - 208, 317, /* D bar */ - 209, 271, /* N tilde */ - 210, 275, /* O grave */ - 211, 272, /* O acute */ - 212, 273, /* O circumflex */ - 213, 276, /* O tilde */ - 214, 274, /* O dierisis */ - 215, 325, /* math multiply */ - 216, 233, /* O bar */ - 217, 281, /* U grave */ - 218, 278, /* U acute */ - 219, 279, /* U circumflex */ - 220, 280, /* U dierisis */ - 221, 319, /* Y acute */ - 222, 318, /* icelandic thorn lc */ - 223, 251, /* German dbl s */ - 224, 287, /* a grave */ - 225, 284, /* a acute */ - 226, 285, /* a circumflex */ - 227, 289, /* a tilde */ - 228, 286, /* a dierisis */ - 229, 288, /* a angstrom */ - 230, 241, /* ae ligature */ - 231, 290, /* c cedilla */ - 232, 294, /* e grave */ - 233, 291, /* e acute */ - 234, 292, /* e circumflex */ - 235, 293, /* e dierisis */ - 236, 298, /* i grave */ - 237, 295, /* i acute */ - 238, 296, /* i circumflex */ - 239, 297, /* i dierisis */ - 240, 323, /* icelandic eth lc */ - 241, 299, /* n tilde */ - 242, 303, /* o grave */ - 243, 300, /* o acute */ - 244, 301, /* o circumflex */ - 245, 304, /* o tilde */ - 246, 302, /* o dierisis */ - 247, 322, /* math divide */ - 248, 249, /* o bar */ - 249, 309, /* u grave */ - 250, 306, /* u acute */ - 251, 307, /* u circumflex */ - 252, 308, /* u dierisis */ - 253, 334, /* y acute */ - 254, 330, /* icelandic thorn uc */ - 255, 310, /* y dierisis */ -}; diff --git a/nx-X11/lib/font/Speedo/bics-iso.h b/nx-X11/lib/font/Speedo/bics-iso.h deleted file mode 100644 index 4964fa34e..000000000 --- a/nx-X11/lib/font/Speedo/bics-iso.h +++ /dev/null @@ -1,224 +0,0 @@ -/* $Xorg: bics-iso.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - -Copyright 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.6 2001/01/17 19:43:17 dawes Exp $ */ - -int sp_bics_map[] = { - 32, 0, - 33, 1, - 34, 2, - 35, 3, - 36, 4, - 37, 5, - 38, 6, - 39, 264, - 40, 8, - 41, 9, - 42, 10, - 43, 11, - 44, 12, - 45, 13, - 46, 14, - 47, 15, - 48, 16, - 49, 17, - 50, 18, - 51, 19, - 52, 20, - 53, 21, - 54, 22, - 55, 23, - 56, 24, - 57, 25, - 58, 26, - 59, 27, - 60, 28, - 61, 29, - 62, 30, - 63, 31, - 64, 32, - 65, 33, - 66, 34, - 67, 35, - 68, 36, - 69, 37, - 70, 38, - 71, 39, - 72, 40, - 73, 41, - 74, 42, - 75, 43, - 76, 44, - 77, 45, - 78, 46, - 79, 47, - 80, 48, - 81, 49, - 82, 50, - 83, 51, - 84, 52, - 85, 53, - 86, 54, - 87, 55, - 88, 56, - 89, 57, - 90, 58, - 91, 59, - 92, 60, - 93, 61, - 94, 133, - 95, 63, - 96, 131, - 97, 65, - 98, 66, - 99, 67, - 100, 68, - 101, 69, - 102, 70, - 103, 71, - 104, 72, - 105, 73, - 106, 74, - 107, 75, - 108, 76, - 109, 77, - 110, 78, - 111, 79, - 112, 80, - 113, 81, - 114, 82, - 115, 83, - 116, 84, - 117, 85, - 118, 86, - 119, 87, - 120, 88, - 121, 89, - 122, 90, - 123, 91, - 124, 92, - 125, 93, - 126, 137, - 127, 358, - 161, 128, - 162, 98, - 163, 97, - 164, 278, - 165, 274, - 166, 277, - 167, 110, - 168, 135, - 169, 503, - 170, 538, - 171, 125, - 172, 309, - 173, 191, - 174, 504, - 175, 230, - 176, 339, - 177, 286, - 178, 160, - 179, 161, - 180, 129, - 181, 325, - 182, 279, - 183, 102, - 184, 141, - 185, 159, - 186, 544, - 187, 126, - 188, 151, - 189, 153, - 190, 155, - 191, 127, - 192, 259, - 193, 261, - 194, 257, - 195, 253, - 196, 255, - 197, 113, - 198, 114, - 199, 148, - 200, 249, - 201, 251, - 202, 247, - 203, 245, - 204, 239, - 205, 241, - 206, 237, - 207, 235, - 208, 169, - 209, 196, - 210, 202, - 211, 200, - 212, 204, - 213, 208, - 214, 206, - 215, 284, - 216, 115, - 217, 212, - 218, 210, - 219, 214, - 220, 216, - 221, 224, - 222, 271, - 223, 121, - 224, 260, - 225, 262, - 226, 258, - 227, 254, - 228, 256, - 229, 117, - 230, 118, - 231, 149, - 232, 250, - 233, 252, - 234, 248, - 235, 246, - 236, 240, - 237, 242, - 238, 238, - 239, 236, - 240, 273, - 241, 195, - 242, 201, - 243, 199, - 244, 203, - 245, 207, - 246, 205, - 247, 285, - 248, 119, - 249, 211, - 250, 209, - 251, 213, - 252, 215, - 253, 223, - 254, 272, - 255, 221, -}; - diff --git a/nx-X11/lib/font/Speedo/bics-unicode.c b/nx-X11/lib/font/Speedo/bics-unicode.c deleted file mode 100644 index 735508268..000000000 --- a/nx-X11/lib/font/Speedo/bics-unicode.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XFree86$ */ - -/* These data are very dodgy. */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "bics-unicode.h" - -static short table_160[]= -{0, 128, 98, 97, 278, 274, 277, 110, 135, 503, 538, 125, 309, 191, 504, - 230, 339, 286, 160, 161, 129, 325, 279, 102, 141, 159, 544, 126, 151, - 153, 155, 127, 259, 261, 257, 253, 255, 113, 114, 148, 249, 251, 247, - 245, 239, 241, 237, 235, 169, 196, 202, 200, 204, 208, 206, 284, 115, - 212, 210, 214, 216, 224, 271, 121, 260, 262, 258, 254, 256, 117, 118, - 149, 250, 252, 248, 246, 240, 242, 238, 236, 273, 195, 201, 199, 203, - 207, 205, 285, 119, 211, 209, 213, 215, 223, 272, 221, 477, 476, 374, - 373, 171, 177, 376, 375, -1, -1, -1, -1, 378, 377, 379, -1, 169, 173, - 383, 382, -1, -1, -1, -1, 172, 178, 243, 244, -1, -1, -1, -1, -1, -1, - 385, -1, -1, -1, -1, -1, 233, 234, 387, 386, -1, -1, 391, 390, 389, - 122, 276, 275, -1, -1, 393, 392, -1, 395, 394, 399, 398, -1, -1, -1, - -1, 170, 174, 194, 193, 402, 401, 198, 197, 263, -1, -1, -1, -1, -1, - -1, 404, 403, 116, 120, -1, -1, 408, 407, 406, 405, 410, 409, -1, -1, - 486, 485, 412, 411, 419, 418, 364, 363, -1, -1, 218, 217, 421, 420, -1, - -1, 220, 219, 423, 422, -1, 268, 425, 424, -1, -1, 222, 368, 367, 372, - 371, 370, 369}; - -static short table_728[]={144, 181, 146, 731, 137, 183}; - -static short table_915[]= -{313, 314, -1, -1, -1, 315, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, -1, 317, -1, -1, 318, -1, -1, -1, -1, -1, -1, -1, 319, 320, - -1, 321, 322, -1, 323, 324, -1, -1, -1, 325, -1, -1, -1, 326, -1, -1, - 327, 328, -1, 329}; - -static short table_8211[]= -{111, 112, -1, -1, -1, -1, -1, 106, -1, 103, 105, 107, 104, 108, 109, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 100, -1, -1, - -1, -1, -1, -1, -1, -1, 123, 124, -1, 265}; - -static short table_8319[]= -{543, 475, 466, 467, 468, 469, 470, 471, 472, 473, 474, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 491, -1, -1, -1, 266}; - -static short table_8592[]={293, 295, 294, 292, 297, 296}; - -static short table_8712[]= -{298, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 492, -1, -1, -1, -1, -1, - -1, 302, -1, -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 299, - -1, -1, -1, -1, 428}; - - -static short table_8800[]={288, -1, -1, -1, 291, 290}; - -static short table_9600[]= -{304, -1, -1, -1, 305, -1, -1, -1, 308, -1, -1, -1, 306, -1, -1, -1, - 307, 357, 358, 359, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 348, -1, -1, -1, 345, -1, -1, -1, -1, -1, 347, -1, -1, -1, 346, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, -1, -1, -1, 342, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 344}; - -static short table_9784[]={360, -1, 361, 362, -1, -1, -1, -1, 350, -1, 349}; - -static short table_9824[]= -{354, -1, -1, 352, -1, 351, 353, -1, -1, -1, 330, 331}; - -static short table_64256[]={282, 95, 96, 281}; - -int -unicode_to_bics(unsigned code) -{ - if(code<32) return -1; - else if(code<127) return code-32; - else if(code<160) return -1; - else if(code<383) return table_160[code-160]; - else if(code==402) return 99; - else if(code==486) return 480; - else if(code==487) return 379; - else if(code==501) return 384; - else if(code==711) return 139; - else if(code<728) return -1; - else if(code<734) return table_728[code-728]; - else if(code<915) return -1; - else if(code<967) return table_915[code-915]; - else if(code<8211) return -1; - else if(code<8253) return table_8211[code-8211]; - else if(code<8319) return -1; - else if(code<8360) return table_8319[code-8319]; - else if(code<8592) return -1; - else if(code<8598) return table_8592[code-8592]; - else if(code==8616) return 340; - else if(code<8712) return -1; - else if(code<8751) return table_8712[code-8712]; - else if(code<8800) return -1; - else if(code<8806) return table_8800[code-8800]; - else if(code==8976) return 310; - else if(code==8992) return 300; - else if(code==8993) return 301; - else if(code==9400) return 332; - else if(code==9415) return 333; - else if(code==9473) return 355; - else if(code==9475) return 356; - else if(code<9600) return -1; - else if(code<9690) return table_9600[code-9600]; - else if(code==9711) return 343; - else if(code<9784) return -1; - else if(code<9795) return table_9784[code-9784]; - else if(code<9824) return -1; - else if(code<9836) return table_9824[code-9824]; - else if(code<64256) return -1; - else if(code<64261) return table_64256[code-64256]; - else return -1; -} - diff --git a/nx-X11/lib/font/Speedo/bics-unicode.h b/nx-X11/lib/font/Speedo/bics-unicode.h deleted file mode 100644 index 90fa1885b..000000000 --- a/nx-X11/lib/font/Speedo/bics-unicode.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $XFree86$ */ - -int unicode_to_bics(unsigned); diff --git a/nx-X11/lib/font/Speedo/do_char.c b/nx-X11/lib/font/Speedo/do_char.c deleted file mode 100644 index 410d6339a..000000000 --- a/nx-X11/lib/font/Speedo/do_char.c +++ /dev/null @@ -1,1016 +0,0 @@ -/* $Xorg: do_char.c,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - -/***************************** D O - C H A R . C ***************************** - * * - * This is the top level module for processing one simple or composite * - * character. - * * - ****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static boolean sp_make_simp_char(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); -static boolean sp_make_comp_char(PROTO_DECL2 ufix8 FONTFAR *pointer); -static ufix8 FONTFAR *sp_get_char_org(PROTO_DECL2 ufix16 char_index,boolean top_level); -static fix15 sp_get_posn_arg(PROTO_DECL2 ufix8 FONTFAR *STACKFAR *ppointer,ufix8 format); -static fix15 sp_get_scale_arg(PROTO_DECL2 ufix8 FONTFAR *STACKFAR *ppointer,ufix8 format); - - -FUNCTION ufix16 get_char_id( -GDECL -ufix16 char_index) /* Index to character in char directory */ -/* - * Returns character id for specified character index in currently - * selected font. - * Reports Error 10 and returns 0 if no font selected. - * Reports Error 12 and returns 0 if character data not available. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return (ufix16)0; /* Return zero character id */ - } - -pointer = sp_get_char_org(char_index, TRUE); /* Get pointer to character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return (ufix16)0; /* Return zero character id */ - } - -return 0xffff & NEXT_WORD(pointer); /* Return character id */ -} - - -#if INCL_METRICS -FUNCTION fix31 get_char_width( -GDECL -ufix16 char_index) /* Index to character in char directory */ -/* - * Returns character set width for specified character index in currently - * selected font in units of 1/65536 em. - * Reports Error 10 and returns 0 if no font selected. - * Reports Error 12 and returns 0 if character data not available. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix31 set_width; /* Set width of character */ - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return (fix31)0; /* Return zero character width */ - } - -pointer = sp_get_char_org(char_index, TRUE); /* Get pointer to character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return (fix31)0; /* Return zero character width */ - } - -pointer += 2; /* Skip over character id */ -set_width = (fix31)NEXT_WORD(pointer); /* Read set width and Convert units */ -set_width = ((set_width << 16) + (sp_globals.metric_resolution >> 1)) / sp_globals.metric_resolution; -return set_width; /* Return in 1/65536 em units */ -} -#endif - -#if INCL_METRICS -FUNCTION fix15 get_track_kern( -GDECL -fix15 track, /* Track required (0 - 3) */ -fix15 point_size) /* Point size (units of whole points) */ -/* - * Returns inter-character spacing adjustment in units of 1/256 - * points for the specified kerning track and point size. - * If the specified point size is larger than the maximum point - * size for the specified track, the adjustment for the maximum - * point size is used. - * If the specified point size is smaller than the minimum point - * size for the specified track, the adjustment for the minimum - * point size is used. - * If the specified point size is between the minimum point size - * and the maximum point size for the specified track, the - * adjustment is interpolated linearly between the minimum and - * maximum adjustments. - * Reports Error 10 and returns 0 if no font selected. - * Reports Error 13 and returns 0 if track kerning data not in font. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix15 no_tracks; /* Number of kerning tracks in font */ -ufix8 format; /* Track kerning format byte */ -fix15 i; /* Track counter */ -fix15 min_pt_size = 0; /* Minimum point size for track */ -fix15 max_pt_size = 0; /* Maximum point size for track */ -fix15 min_adj = 0; /* Adjustment for min point size */ -fix15 max_adj = 0; /* Adjustment for max point size */ -fix31 delta_pt_size; /* Max point size - min point size */ -fix31 delta_adj; /* Min adjustment - max adjustment */ -fix15 adj = 0; /* Interpolated adjustment */ - -if (track == 0) /* Track zero selected? */ - { - return adj; /* Return zero track kerning adjustment */ - } - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return adj; /* Return zero track kerning adjustment */ - } - -no_tracks = sp_globals.kern.no_tracks; /* Number of kerning tracks */ -if (track > no_tracks) /* Required track not available? */ - { - report_error(13); /* Report track kerning data not avail */ - return adj; /* Return zero track kerning adjustment */ - } - -pointer = sp_globals.kern.tkorg; /* Point to start of track kern data */ -for (i = 0; i < track; i++) /* Read until track required is read */ - { - format = NEXT_BYTE(pointer); /* Read track kerning format byte */ - min_pt_size = (format & BIT0)? - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - min_adj = (format & BIT1)? - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - max_pt_size = (format & BIT2)? - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - max_adj = (format & BIT3)? - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - } - -if (point_size <= min_pt_size) /* Smaller than minimum point size? */ - { - return min_adj; /* Return minimum adjustment (1/256 points) */ - } - -if (point_size >= max_pt_size) /* Larger than maximum point size? */ - { - return max_adj; /* Return maximum adjustment (1/256 points) */ - } - -delta_pt_size = (fix31)(max_pt_size - min_pt_size); -delta_adj = (fix31)(min_adj - max_adj); -adj = (fix15)(min_adj - - (((fix31)(point_size - min_pt_size) * delta_adj + - (delta_pt_size >> 1)) / delta_pt_size)); -return adj; /* Return interpolated adjustment (1/256 points) */ -} -#endif - -#if INCL_METRICS -FUNCTION fix31 get_pair_kern( -GDECL -ufix16 char_index1, /* Index to first character in char directory */ -ufix16 char_index2) /* Index to second character in char directory */ -/* - * Returns inter-character spacing adjustment in units of 1/65536 em - * for the specified pair of characters. - * Reports Error 10 and returns 0 if no font selected. - * Reports Error 14 and returns 0 if pair kerning data not in font. - */ -{ -ufix8 FONTFAR *origin; /* Pointer to first kerning pair record */ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -ufix16 tmpufix16; /* Temporary workspace */ -fix15 no_pairs; /* Number of kerning pairs in font */ -ufix8 format; /* Track kerning format byte */ -boolean long_id; /* TRUE if 2-byte character ids */ -fix15 rec_size; /* Number of bytes in kern pair record */ -fix15 n; /* Number of remaining kern pairs */ -fix15 nn; /* Number of kern pairs in first partition */ -fix15 base; /* Index to first record in rem kern pairs */ -fix15 i; /* Index to kern pair being tested */ -fix31 adj = 0; /* Returned value of adjustment */ -fix15 adj_base = 0; /* Adjustment base for relative adjustments */ - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return adj; /* Return zero pair kerning adjustment */ - } - -no_pairs = sp_globals.kern.no_pairs; /* Number of kerning pairs */ -if (no_pairs == 0) /* Pair kerning data not available? */ - { - report_error(14); /* Report pair kerning data not avail */ - return adj; /* Return zero pair kerning adjustment */ - } - -pointer = sp_globals.kern.pkorg; /* Point to start of pair kern data */ -format = NEXT_BYTE(pointer); /* Read pair kerning format byte */ -if (!(format & BIT0)) /* One-byte adjustment values? */ - adj_base = NEXT_WORD(pointer); /* Read base adjustment */ -origin = pointer; /* First byte of kerning pair data */ -rec_size = format + 3; /* Compute kerning pair record size */ -long_id = format & BIT1; /* Set flag for 2-byte char index */ - -n = no_pairs; /* Consider all kerning pairs */ -base = 0; /* Set base at first kern pair record */ -while (n != 0) /* While 1 or more kern pairs remain ... */ - { - nn = n >> 1; /* Size of first partition */ - i = base + nn; /* Index to record to be tested */ - pointer = origin + (i * rec_size); - tmpufix16 = NEXT_CHNDX(pointer, long_id); - if (char_index1 < tmpufix16) - { - n = nn; /* Number remaining in first partition */ - continue; - } - if (char_index1 > tmpufix16) - { - n -= nn + 1; /* Number remaining in second partition */ - base = i + 1; /* Base index for second partition */ - continue; - } - tmpufix16 = NEXT_CHNDX(pointer, long_id); - if (char_index2 < tmpufix16) - { - n = nn; /* Number remaining in first partition */ - continue; - } - if (char_index2 > tmpufix16) - { - n -= nn + 1; /* Number remaining in second partition */ - base = i + 1; /* Base index for second partition */ - continue; - } - adj = (format & BIT0)? - (fix31)NEXT_WORD(pointer): - (fix31)(adj_base + (fix15)NEXT_BYTE(pointer)); - adj = ((adj << 16) + (sp_globals.orus_per_em >> 1)) / sp_globals.orus_per_em; /* Convert units */ - n = 0; /* No more to consider */ - } -return adj; /* Return pair kerning adjustment */ -} -#endif - - -#if INCL_METRICS -#ifdef old -FUNCTION boolean get_char_bbox( -GDECL -ufix16 char_index, -bbox_t *bbox) -{ -/* - * returns true if character exists, false if it doesn't - * provides transformed character bounding box in 1/65536 pixels - * in the provided bbox_t structure. Bounding box may be - * conservative in the event that the transformation is not - * normal or the character is compound. - */ - -ufix8 FONTFAR *pointer; -fix15 tmp; -point_t Pmin, Pmax; - -#if REENTRANT_ALLOC -plaid_t plaid; -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -tmp = NEXT_WORD(pointer); /* Read set width */ - -tmp = NEXT_BYTE(pointer); -if (tmp & BIT1) /* Optional data in header? */ - { - tmp = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmp; /* Skip optional data */ - } - -pointer = plaid_tcb(pointer, tmp); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax,(boolean)FALSE); /* Read bounding box */ -bbox->xmin = (fix31)Pmin.x << sp_globals.poshift; -bbox->xmax = (fix31)Pmax.x << sp_globals.poshift; -bbox->ymin = (fix31)Pmin.y << sp_globals.poshift; -bbox->ymax = (fix31)Pmax.y << sp_globals.poshift; -return TRUE; -} - -#else /* new code, 4/25/91 */ - -FUNCTION boolean get_char_bbox( -GDECL -ufix16 char_index, -bbox_t *bbox) -{ -/* - * returns true if character exists, false if it doesn't - * provides transformed character bounding box in 1/65536 pixels - * in the provided bbox_t structure. Bounding box may be - * conservative in the event that the transformation is not - * normal or the character is compound. - */ - -ufix8 FONTFAR *pointer; -fix15 tmp; -fix15 format; -ufix16 pix_adj; -point_t Pmin, Pmax; - -#if REENTRANT_ALLOC -plaid_t plaid; -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -tmp = NEXT_WORD(pointer); /* Read set width */ - -format = NEXT_BYTE(pointer); -if (format & BIT1) /* Optional data in header? */ - { - tmp = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmp; /* Skip optional data */ - } - -if (format & BIT0) - { - pix_adj = sp_globals.onepix << 1; /* Allow 2 pixel expansion ... */ - } -else - { - pix_adj = 0; - } - -pointer = plaid_tcb(pointer, format); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax,(boolean)FALSE); /* Read bounding box */ - -Pmin.x -= pix_adj; /* ... of components of ... */ -Pmin.y -= pix_adj; /* ... compound ... */ -Pmax.x += pix_adj; /* ... character ... */ -Pmax.y += pix_adj; /* ... bounding box. */ - - -bbox->xmin = (fix31)Pmin.x << sp_globals.poshift; -bbox->xmax = (fix31)Pmax.x << sp_globals.poshift; -bbox->ymin = (fix31)Pmin.y << sp_globals.poshift; -bbox->ymax = (fix31)Pmax.y << sp_globals.poshift; -return TRUE; -} -#endif /* new code */ - -#endif - - -#if INCL_ISW -FUNCTION boolean make_char_isw( -GDECL -ufix16 char_index, -ufix32 imported_setwidth) -{ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 xmax; /* Maximum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ -ufix16 return_value; - -sp_globals.import_setwidth_act = TRUE; -/* convert imported width to orus */ -sp_globals.imported_width = (sp_globals.metric_resolution * - imported_setwidth) >> 16; -return_value = do_make_char(char_index); - -if (sp_globals.isw_modified_constants) - { - /* reset fixed point constants */ - xmin = read_word_u(sp_globals.font_org + FH_FXMIN); - ymin = read_word_u(sp_globals.font_org + FH_FYMIN); - ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - sp_globals.constr.data_valid = FALSE; - xmax = read_word_u(sp_globals.font_org + FH_FXMAX); - if (!setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } - } -return (return_value); -} - -FUNCTION boolean make_char( -GDECL -ufix16 char_index) /* Index to character in char directory */ -{ -sp_globals.import_setwidth_act = FALSE; -return (do_make_char(char_index)); -} - -FUNCTION static boolean do_make_char(GDECL ufix16 char_index) -#else -FUNCTION boolean make_char(GDECL ufix16 char_index) -#endif -/* - * Outputs specified character using the currently selected font and - * scaling and output specifications. - * Reports Error 10 and returns FALSE if no font specifications - * previously set. - * Reports Error 12 and returns FALSE if character data not available. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix15 x_orus; -fix15 tmpfix15; -ufix8 format; - -#if INCL_ISW -sp_globals.isw_modified_constants = FALSE; -#endif - -#if REENTRANT_ALLOC - -plaid_t plaid; - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -intercepts_t intercepts; -sp_globals.intercepts = &intercepts; -#endif - -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -#if INCL_MULTIDEV -#if INCL_OUTLINE -if (sp_globals.output_mode == MODE_OUTLINE && !sp_globals.outline_device_set) - { - report_error(2); - return FALSE; - } -else -#endif - if (!sp_globals.bitmap_device_set) - { - report_error(2); - return FALSE; - } -#endif - - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -SHOW(pointer); -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -x_orus = NEXT_WORD(pointer); /* Read set width */ -#if INCL_SQUEEZING || INCL_ISW -sp_globals.setwidth_orus = x_orus; -#endif - -#if INCL_ISW -if (sp_globals.import_setwidth_act) - x_orus = sp_globals.imported_width; -#endif -sp_globals.Psw.x = (fix15)((fix31) - (((fix31)x_orus * (sp_globals.specs.xxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -sp_globals.Psw.y = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.yxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -format = NEXT_BYTE(pointer); -if (format & BIT1) /* Optional data in header? */ - { - tmpfix15 = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmpfix15; /* Skip optional data */ - } -if (format & BIT0) - { - return sp_make_comp_char(pointer); /* Output compound character */ - } -else - { - return sp_make_simp_char(pointer, format); /* Output simple character */ - } -} - -FUNCTION static boolean sp_make_simp_char( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Character format byte */ -/* - * Called by sp_make_char() to output a simple (non-compound) character. - * Returns TRUE on completion. - */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ -#if INCL_SQUEEZING || INCL_ISW -ufix8 FONTFAR *save_pointer; -#endif -#if INCL_ISW -fix31 char_width; -fix31 isw_scale; -#endif - -#if INCL_SQUEEZING -sp_globals.squeezing_compound = FALSE; -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) || - (sp_globals.pspecs->flags & SQUEEZE_RIGHT) || - (sp_globals.pspecs->flags & SQUEEZE_TOP) || - (sp_globals.pspecs->flags & SQUEEZE_BOTTOM) ) - { - /* get the bounding box data before processing the character */ - save_pointer = pointer; - preview_bounding_box (pointer, format); - pointer = save_pointer; - } -#endif -#if (INCL_ISW) -if (sp_globals.import_setwidth_act) - { - save_pointer = pointer; - preview_bounding_box (pointer, format); - pointer = save_pointer; - /* make sure I'm not going to get fixed point overflow */ - isw_scale = compute_isw_scale(); - if (sp_globals.bbox_xmin_orus < 0) - char_width = SQUEEZE_MULT((sp_globals.bbox_xmax_orus - sp_globals.bbox_xmin_orus), isw_scale); - else - char_width = SQUEEZE_MULT(sp_globals.bbox_xmax_orus, isw_scale); - if (char_width >= sp_globals.isw_xmax) - if (!reset_xmax(char_width)) - return FALSE; - } -#endif -pointer = plaid_tcb(pointer, format); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax, FALSE); /* Read bounding box */ -if (fn_begin_char(sp_globals.Psw, Pmin, Pmax)) /* Signal start of character output */ - { - do - { - proc_outl_data(pointer); /* Process outline data */ - } - while (!fn_end_char()); /* Repeat if not done */ - } -return TRUE; -} - -FUNCTION static boolean sp_make_comp_char( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of position argument */ -/* - * Called by sp_make_char() to output a compound character. - * Returns FALSE if data for any sub-character is not available. - * Returns TRUE if output completed with no error. - */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ -point_t Pssw; /* Transformed escapement vector */ -ufix8 FONTFAR *pointer_sav; /* Saved pointer to compound character data */ -ufix8 FONTFAR *sub_pointer; /* Pointer to sub-character data */ -ufix8 format; /* Format of DOCH instruction */ -ufix16 sub_char_index; /* Index to sub-character in character directory */ -fix15 x_posn; /* X position of sub-character (outline res units) */ -fix15 y_posn; /* Y position of sub-character (outline res units) */ -fix15 x_scale; /* X scale factor of sub-character (scale units) */ -fix15 y_scale; /* Y scale factor of sub-character (scale units) */ -fix15 tmpfix15; /* Temporary workspace */ -fix15 x_orus; /* Set width in outline resolution units */ -fix15 pix_adj; /* Pixel adjustment to compound char bounding box */ -#if INCL_SQUEEZING -fix31 x_factor, x_offset, top_scale, bottom_scale; -boolean squeezed_x, squeezed_y; -#endif -#if INCL_SQUEEZING || INCL_ISW -fix15 x_offset_pix; -#endif -#if INCL_ISW -fix31 char_width; -fix31 isw_scale; -#endif - - -#if INCL_SQUEEZING -sp_globals.squeezing_compound = TRUE; -#endif -pointer = read_bbox(pointer, &Pmin, &Pmax, TRUE); /* Read bounding box data */ -pix_adj = sp_globals.onepix << 1; /* Allow 2 pixel expansion ... */ -Pmin.x -= pix_adj; /* ... of components of ... */ -Pmin.y -= pix_adj; /* ... compound ... */ -Pmax.x += pix_adj; /* ... character ... */ -Pmax.y += pix_adj; /* ... bounding box. */ - -#if INCL_SQUEEZING -/* scale the bounding box if necessary before calling begin_char */ -squeezed_x = calculate_x_scale(&x_factor, &x_offset, 0); -squeezed_y = calculate_y_scale(&top_scale, &bottom_scale,0,0); - -if (squeezed_x) - { /* scale the x coordinates of the bbox */ - x_offset_pix = (fix15)(((x_offset >> 16) * sp_globals.tcb0.xppo) - >> sp_globals.mpshift); - if ((x_offset_pix >0) && (x_offset_pix < sp_globals.onepix)) - x_offset_pix = sp_globals.onepix; - Pmin.x = SQUEEZE_MULT (x_factor, Pmin.x) + x_offset_pix - pix_adj; - Pmax.x = SQUEEZE_MULT (x_factor, Pmax.x) + x_offset_pix + pix_adj; - } -if (squeezed_y) - { /* scale the y coordinates of the bbox */ - if ((Pmin.y) < 0) - Pmin.y = SQUEEZE_MULT (bottom_scale, Pmin.y) - pix_adj; - else - Pmin.y = SQUEEZE_MULT (top_scale, Pmin.y) - pix_adj; - if ((Pmax.y) < 0) - Pmax.y = SQUEEZE_MULT (bottom_scale, Pmax.y) + pix_adj; - else - Pmax.y = SQUEEZE_MULT (top_scale, Pmax.y) + pix_adj; - } -#endif -#if (INCL_ISW) -if (sp_globals.import_setwidth_act) - { - /* make sure I'm not going to get fixed point overflow */ - isw_scale = ((fix31)sp_globals.imported_width << 16)/ - (fix31)sp_globals.setwidth_orus; - char_width = SQUEEZE_MULT((sp_globals.bbox_xmax_orus - - sp_globals.bbox_xmin_orus), -isw_scale); - if (char_width >= sp_globals.isw_xmax) - if (!reset_xmax(char_width)) - return FALSE; - } -#endif - -if (fn_begin_char(sp_globals.Psw, Pmin, Pmax)) /* Signal start of character data */ - { - pointer_sav = pointer; - do - { - pointer = pointer_sav; /* Point to next DOCH or END instruction */ - while ((format = NEXT_BYTE(pointer))) /* DOCH instruction? */ - { - init_tcb(); /* Initialize transformation control block */ - x_posn = sp_get_posn_arg(&pointer, format); - y_posn = sp_get_posn_arg(&pointer, (ufix8)(format >> 2)); - x_scale = sp_get_scale_arg(&pointer, (ufix8)(format & BIT4)); - y_scale = sp_get_scale_arg(&pointer, (ufix8)(format & BIT5)); - scale_tcb(&sp_globals.tcb, x_posn, y_posn, x_scale, y_scale); /* Scale for sub-char */ - sub_char_index = (format & BIT6)? /* Read sub-char index */ - 0xffff & NEXT_WORD(pointer): - 0xffff & NEXT_BYTE(pointer); - sub_pointer = sp_get_char_org(sub_char_index, FALSE); /* Point to start of sub-char */ - if (sub_pointer == NULL) /* Character data not available? */ - { - return FALSE; /* Abort character output */ - } - sub_pointer += 2; /* Skip over character id */ - x_orus = NEXT_WORD(sub_pointer); /* Read set_width of sub-character */ - - Pssw.x = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.xxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - Pssw.y = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.yxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - - format = NEXT_BYTE(sub_pointer); /* Read sub-character format */ - if (format & BIT1) /* Optional data in header? */ - { - tmpfix15 = (ufix8)NEXT_BYTE(sub_pointer); /* Read size of optional data */ - sub_pointer += tmpfix15; /* Skip optional data */ - } - sub_pointer = plaid_tcb(sub_pointer, format); /* Process sub-character plaid data */ - sub_pointer = read_bbox(sub_pointer, &Pmin, &Pmax, FALSE); /* Read bounding box */ - fn_begin_sub_char(Pssw, Pmin, Pmax); /* Signal start of sub-character data */ - proc_outl_data(sub_pointer); /* Process sub-character data */ - fn_end_sub_char(); /* Signal end of sub-character data */ - } - } - while (!fn_end_char()); /* Signal end of character; repeat if required */ - } -return TRUE; -} - -#if INCL_LCD /* Dynamic load character data supported? */ -FUNCTION static ufix8 FONTFAR *sp_get_char_org( -GDECL -ufix16 char_index, /* Index of character to be accessed */ -boolean top_level) /* Not a compound character element */ -/* - * Called by sp_get_char_id(), sp_get_char_width(), sp_make_char() and - * sp_make_comp_char() to get a pointer to the start of the character data - * for the specified character index. - * Version for configuration supporting dynamic character data loading. - * Calls load_char_data() to load character data if not already loaded - * as part of the original font buffer. - * Returns NULL if character data not available - */ -{ -buff_t *pchar_data; /* Buffer descriptor requested */ -ufix8 FONTFAR *pointer; /* Pointer into character directory */ -ufix8 format; /* Character directory format byte */ -fix31 char_offset; /* Offset of char data from start of font file */ -fix31 next_char_offset; /* Offset of char data from start of font file */ -fix15 no_bytes; /* Number of bytes required for char data */ - -if (top_level) /* Not element of compound char? */ - { - if (char_index < sp_globals.first_char_idx) /* Before start of character set? */ - return NULL; - char_index -= sp_globals.first_char_idx; - if (char_index >= sp_globals.no_chars_avail) /* Beyond end of character set? */ - return NULL; - sp_globals.cb_offset = 0; /* Reset char buffer offset */ - } - -pointer = sp_globals.pchar_dir; -format = NEXT_BYTE(pointer); /* Read character directory format byte */ -pointer += char_index << 1; /* Point to indexed character entry */ -if (format) /* 3-byte entries in char directory? */ - { - pointer += char_index; /* Adjust for 3-byte entries */ - char_offset = read_long(pointer); /* Read file offset to char data */ - next_char_offset = read_long(pointer + 3); /* Read offset to next char */ - } -else - { - char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read file offset to char data */ - next_char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read offset to next char */ - } - -no_bytes = next_char_offset - char_offset; -if (no_bytes == 0) /* Character not in directory? */ - return NULL; - -if (next_char_offset <= sp_globals.font_buff_size)/* Character data already in font buffer? */ - return sp_globals.pfont->org + char_offset; /* Return pointer into font buffer */ - -pchar_data = load_char_data(char_offset, no_bytes, sp_globals.cb_offset); /* Request char data load */ -if (pchar_data->no_bytes < no_bytes) /* Correct number of bytes loaded? */ - return NULL; - -if (top_level) /* Not element of compound char? */ - { - sp_globals.cb_offset = no_bytes; - } - -return pchar_data->org; /* Return pointer into character data buffer */ -} -#endif - -#if INCL_LCD -#else /* Dynamic load character data not supported? */ -FUNCTION static ufix8 FONTFAR *sp_get_char_org( -GDECL -ufix16 char_index, /* Index of character to be accessed */ -boolean top_level) /* Not a compound character element */ -/* - * Called by sp_get_char_id(), sp_get_char_width(), sp_make_char() and - * sp_make_comp_char() to get a pointer to the start of the character data - * for the specified character index. - * Version for configuration not supporting dynamic character data loading. - * Returns NULL if character data not available - */ -{ -ufix8 FONTFAR *pointer; /* Pointer into character directory */ -ufix8 format; /* Character directory format byte */ -fix31 char_offset; /* Offset of char data from start of font file */ -fix31 next_char_offset; /* Offset of char data from start of font file */ -fix15 no_bytes; /* Number of bytes required for char data */ - -if (top_level) /* Not element of compound char? */ - { - if (char_index < sp_globals.first_char_idx) /* Before start of character set? */ - return NULL; - char_index -= sp_globals.first_char_idx; - if (char_index >= sp_globals.no_chars_avail) /* Beyond end of character set? */ - return NULL; - } - -pointer = sp_globals.pchar_dir; -format = NEXT_BYTE(pointer); /* Read character directory format byte */ -pointer += char_index << 1; /* Point to indexed character entry */ -if (format) /* 3-byte entries in char directory? */ - { - pointer += char_index; /* Adjust for 3-byte entries */ - char_offset = read_long(pointer); /* Read file offset to char data */ - next_char_offset = read_long(pointer + 3); /* Read offset to next char */ - } -else - { - char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read file offset to char data */ - next_char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read offset to next char */ - } - -no_bytes = next_char_offset - char_offset; -if (no_bytes == 0) /* Character not in directory? */ - return NULL; - -return sp_globals.pfont->org + char_offset; /* Return pointer into font buffer */ -} -#endif - - -FUNCTION static fix15 sp_get_posn_arg( -GDECL -ufix8 FONTFAR * STACKFAR *ppointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Format of DOCH arguments */ -/* - * Called by sp_make_comp_char() to read a position argument from the - * specified point in the font/char buffer. - * Updates pointer to byte following position argument. - * Returns value of position argument in outline resolution units - */ -{ -switch (format & 0x03) - { -case 1: - return NEXT_WORD(*ppointer); - -case 2: - return (fix15)((fix7)NEXT_BYTE(*ppointer)); - -default: - return (fix15)0; - } -} - -FUNCTION static fix15 sp_get_scale_arg( -GDECL -ufix8 FONTFAR *STACKFAR *ppointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Format of DOCH arguments */ -/* - * Called by sp_make_comp_char() to read a scale argument from the - * specified point in the font/char buffer. - * Updates pointer to byte following scale argument. - * Returns value of scale argument in scale units (normally 1/4096) - */ -{ -if (format) - return NEXT_WORD(*ppointer); -else - return (fix15)ONE_SCALE; -} -#if INCL_ISW || INCL_SQUEEZING -FUNCTION static void preview_bounding_box( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Character format byte */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ - - sp_globals.no_X_orus = (format & BIT2)? - (fix15)NEXT_BYTE(pointer): - 0; - sp_globals.no_Y_orus = (format & BIT3)? - (fix15)NEXT_BYTE(pointer): - 0; - pointer = read_oru_table(pointer); - - /* Skip over control zone table */ - pointer = skip_control_zone(pointer,format); - - /* Skip over interpolation table */ - pointer = skip_interpolation_table(pointer,format); - /* get_args has a pathological need for this value to be set */ - sp_globals.Y_edge_org = sp_globals.no_X_orus; - pointer = read_bbox(pointer, &Pmin, &Pmax, TRUE); /* Read bounding bo -x */ - -} -#endif -#if INCL_ISW -FUNCTION static boolean reset_xmax( -GDECL -fix31 xmax) - -{ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ - - -sp_globals.isw_modified_constants = TRUE; -xmin = read_word_u(sp_globals.font_org + FH_FXMIN); -ymin = read_word_u(sp_globals.font_org + FH_FYMIN); -ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - -if (!setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } -sp_globals.constr.data_valid = FALSE; -/* recompute setwidth */ -sp_globals.Psw.x = (fix15)((fix31)( - ((fix31)sp_globals.imported_width * (sp_globals.specs.xxmult>>16) + - ( ((fix31)sp_globals.imported_width * - (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); -sp_globals.Psw.y = (fix15)( - (fix31)( - ((fix31)sp_globals.imported_width * (sp_globals.specs.yxmult>>16) + - ( ((fix31)sp_globals.imported_width * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -return TRUE; -} -#endif diff --git a/nx-X11/lib/font/Speedo/do_trns.c b/nx-X11/lib/font/Speedo/do_trns.c deleted file mode 100644 index 2e0f1dbed..000000000 --- a/nx-X11/lib/font/Speedo/do_trns.c +++ /dev/null @@ -1,512 +0,0 @@ -/* $Xorg: do_trns.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - -/**************************** D O _ T R N S . C ****************************** - * * - * This module is responsible for executing all intelligent transformation * - * for bounding box and outline data * - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_split_curve(PROTO_DECL2 point_t P1,point_t P2,point_t P3,fix15 depth); -static ufix8 FONTFAR *sp_get_args(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format,point_t STACKFAR *pP); - - -FUNCTION ufix8 FONTFAR *read_bbox( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -point_t STACKFAR *pPmin, /* Lower left corner of bounding box */ -point_t STACKFAR *pPmax, /* Upper right corner of bounding box */ -boolean set_flag) /* flag to indicate whether global oru bbox should be saved */ -/* - * Called by make_simp_char() and make_comp_char() to read the - * bounding box data from the font. - * Sets Pmin and Pmax to the bottom left and top right corners - * of the bounding box after transformation into device space. - * The units of Pmin and Pmax are sub-pixels. - * Updates *ppointer to point to the byte following the - * bounding box data. - */ -{ -ufix8 format1; -ufix8 format = 0; -fix15 i; -point_t P; - -sp_globals.x_int = 0; -sp_globals.y_int = sp_globals.Y_int_org; -sp_globals.x_orus = sp_globals.y_orus = 0; -format1 = NEXT_BYTE(pointer); -pointer = sp_get_args(pointer, format1, pPmin); -#if INCL_SQUEEZING || INCL_ISW -if (set_flag) - { - sp_globals.bbox_xmin_orus = sp_globals.x_orus; - sp_globals.bbox_ymin_orus = sp_globals.y_orus; - } -#endif -*pPmax = *pPmin; -for (i = 1; i < 4; i++) - { - switch(i) - { - case 1: - if (format1 & BIT6) /* Xmax requires X int zone 1? */ - sp_globals.x_int++; - format = (format1 >> 4) | 0x0c; - break; - - case 2: - if (format1 & BIT7) /* Ymax requires Y int zone 1? */ - sp_globals.y_int++; - format = NEXT_BYTE(pointer); - break; - - case 3: - sp_globals.x_int = 0; - format >>= 4; - break; - - default: - break; - } - - pointer = sp_get_args(pointer, format, &P); -#if INCL_SQUEEZING || INCL_ISW - if (set_flag && (i==2)) - { - sp_globals.bbox_xmax_orus = sp_globals.x_orus; - sp_globals.bbox_ymax_orus = sp_globals.y_orus; - } -#endif - if ((i == 2) || (!sp_globals.normal)) - { - if (P.x < pPmin->x) - pPmin->x = P.x; - if (P.y < pPmin->y) - pPmin->y = P.y; - if (P.x > pPmax->x) - pPmax->x = P.x; - if (P.y > pPmax->y) - pPmax->y = P.y; - } - } - -#if DEBUG -printf("BBOX %6.1f(Xint 0), %6.1f(Yint 0), %6.1f(Xint %d), %6.1f(Yint %d)\n", - (real)pPmin->x / (real)sp_globals.onepix, - (real)pPmin->y / (real)sp_globals.onepix, - (real)pPmax->x / (real)sp_globals.onepix, - (format1 >> 6) & 0x01, - (real)pPmax->y / (real)sp_globals.onepix, - (format1 >> 7) & 0x01); - -#endif -return pointer; -} - -FUNCTION void proc_outl_data( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to next byte in char data */ -/* - * Called by make_simp_char() and make_comp_char() to read the - * outline data from the font. - * The outline data is parsed, transformed into device coordinates - * and passed to an output module for further processing. - * Note that pointer is not updated to facilitate repeated - * processing of the outline data when banding mode is in effect. - */ -{ -ufix8 format1, format2; -point_t P0, P1, P2, P3; -fix15 depth; -fix15 curve_count; - -sp_globals.x_int = 0; -sp_globals.y_int = sp_globals.Y_int_org; -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - -sp_globals.x_orus = sp_globals.y_orus = 0; -curve_count = 0; -while(TRUE) - { - format1 = NEXT_BYTE(pointer); - switch(format1 >> 4) - { - case 0: /* LINE */ - pointer = sp_get_args(pointer, format1, &P1); -#if DEBUG - printf("LINE %6.1f, %6.1f\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix); -#endif - fn_line(P1); - sp_globals.P0 = P1; - continue; - - case 1: /* Short XINT */ - sp_globals.x_int = format1 & 0x0f; -#if DEBUG - printf("XINT %d\n", sp_globals.x_int); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -#endif - continue; - - case 2: /* Short YINT */ - sp_globals.y_int = sp_globals.Y_int_org + (format1 & 0x0f); -#if DEBUG - printf("YINT %d\n", sp_globals.y_int - sp_globals.Y_int_org); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - continue; - - case 3: /* Miscellaneous */ - switch(format1 & 0x0f) - { - case 0: /* END */ - if (curve_count) - { - fn_end_contour(); - } - return; - - case 1: /* Long XINT */ - sp_globals.x_int = NEXT_BYTE(pointer); -#if DEBUG - printf("XINT %d\n", sp_globals.x_int); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -#endif - continue; - - case 2: /* Long YINT */ - sp_globals.y_int = sp_globals.Y_int_org + NEXT_BYTE(pointer); -#if DEBUG - printf("YINT %d\n", sp_globals.y_int - sp_globals.Y_int_org); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - continue; - - default: /* Not used */ - continue; - } - - case 4: /* MOVE Inside */ - case 5: /* MOVE Outside */ - if (curve_count++) - { - fn_end_contour(); - } - - pointer = sp_get_args(pointer, format1, &P0); - sp_globals.P0 = P0; -#if DEBUG - printf("MOVE %6.1f, %6.1f\n", - (real)sp_globals.P0.x / (real)sp_globals.onepix, (real)sp_globals.P0.y / (real)sp_globals.onepix); -#endif - fn_begin_contour(sp_globals.P0, (boolean)(format1 & BIT4)); - continue; - - case 6: /* Undefined */ -#if DEBUG - printf("*** Undefined instruction (Hex %4x)\n", format1); -#endif - continue; - - case 7: /* Undefined */ -#if DEBUG - printf("*** Undefined instruction (Hex %4x)\n", format1); -#endif - continue; - - default: /* CRVE */ - format2 = NEXT_BYTE(pointer); - pointer = sp_get_args(pointer, format1, &P1); - pointer = sp_get_args(pointer, format2, &P2); - pointer = sp_get_args(pointer, (ufix8)(format2 >> 4), &P3); - depth = (format1 >> 4) & 0x07; -#if DEBUG - printf("CRVE %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %d\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix, - depth); -#endif - depth += sp_globals.depth_adj; - if (sp_globals.curves_out) - { - fn_curve(P1, P2, P3, depth); - sp_globals.P0 = P3; - continue; - } - if (depth <= 0) - { - fn_line(P3); - sp_globals.P0 = P3; - continue; - } - sp_split_curve(P1, P2, P3, depth); - continue; - } - } -} - -FUNCTION static void sp_split_curve( -GDECL -point_t P1, /* First control point of Bezier curve */ -point_t P2, /* Second control point of Bezier curve */ -point_t P3, /* End point of Bezier curve */ -fix15 depth) /* Levels of recursive subdivision required */ -/* - * Called by proc_outl_data() to subdivide Bezier curves into an - * appropriate number of vectors, whenever curves are not enabled - * for output to the currently selected output module. - * sp_split_curve() calls itself recursively to the depth specified - * at which point it calls line() to deliver each vector resulting - * from the spliting process. - */ -{ -fix31 X0 = (fix31)sp_globals.P0.x; -fix31 Y0 = (fix31)sp_globals.P0.y; -fix31 X1 = (fix31)P1.x; -fix31 Y1 = (fix31)P1.y; -fix31 X2 = (fix31)P2.x; -fix31 Y2 = (fix31)P2.y; -fix31 X3 = (fix31)P3.x; -fix31 Y3 = (fix31)P3.y; -point_t Pmid; -point_t Pctrl1; -point_t Pctrl2; - -#if DEBUG -printf("CRVE(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif - - -Pmid.x = (X0 + (X1 + X2) * 3 + X3 + 4) >> 3; -Pmid.y = (Y0 + (Y1 + Y2) * 3 + Y3 + 4) >> 3; -if ((--depth) <= 0) - { - fn_line(Pmid); - sp_globals.P0 = Pmid; - fn_line(P3); - sp_globals.P0 = P3; - } -else - { - Pctrl1.x = (X0 + X1 + 1) >> 1; - Pctrl1.y = (Y0 + Y1 + 1) >> 1; - Pctrl2.x = (X0 + (X1 << 1) + X2 + 2) >> 2; - Pctrl2.y = (Y0 + (Y1 << 1) + Y2 + 2) >> 2; - sp_split_curve(Pctrl1, Pctrl2, Pmid, depth); - Pctrl1.x = (X1 + (X2 << 1) + X3 + 2) >> 2; - Pctrl1.y = (Y1 + (Y2 << 1) + Y3 + 2) >> 2; - Pctrl2.x = (X2 + X3 + 1) >> 1; - Pctrl2.y = (Y2 + Y3 + 1) >> 1; - sp_split_curve(Pctrl1, Pctrl2, P3, depth); - } -} - -FUNCTION static ufix8 FONTFAR *sp_get_args( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format, /* Format specifiaction of argument pair */ -point_t STACKFAR *pP) /* Resulting transformed point */ -/* - * Called by read_bbox() and proc_outl_data() to read an X Y argument - * pair from the font. - * The format is specified as follows: - * Bits 0-1: Type of X argument. - * Bits 2-3: Type of Y argument. - * where the 4 possible argument types are: - * Type 0: Controlled coordinate represented by one byte - * index into the X or Y controlled coordinate table. - * Type 1: Interpolated coordinate represented by a two-byte - * signed integer. - * Type 2: Interpolated coordinate represented by a one-byte - * signed increment/decrement relative to the - * proceding X or Y coordinate. - * Type 3: Repeat of preceding X or Y argument value and type. - * The units of P are sub-pixels. - * Updates *ppointer to point to the byte following the - * argument pair. - */ -{ -ufix8 edge; - -/* Read X argument */ -switch(format & 0x03) - { -case 0: /* Index to controlled oru */ - edge = NEXT_BYTE(pointer); - sp_globals.x_orus = sp_plaid.orus[edge]; -#if INCL_RULES - sp_globals.x_pix = sp_plaid.pix[edge]; -#endif - break; - -case 1: /* 2 byte interpolated oru value */ - sp_globals.x_orus = NEXT_WORD(pointer); - goto L1; - -case 2: /* 1 byte signed oru increment */ - sp_globals.x_orus += (fix15)((fix7)NEXT_BYTE(pointer)); -L1: -#if INCL_RULES - sp_globals.x_pix = TRANS(sp_globals.x_orus, sp_plaid.mult[sp_globals.x_int], sp_plaid.offset[sp_globals.x_int], sp_globals.mpshift); -#endif - break; - -default: /* No change in X value */ - break; - } - -/* Read Y argument */ -switch((format >> 2) & 0x03) - { -case 0: /* Index to controlled oru */ - edge = sp_globals.Y_edge_org + NEXT_BYTE(pointer); - sp_globals.y_orus = sp_plaid.orus[edge]; -#if INCL_RULES - sp_globals.y_pix = sp_plaid.pix[edge]; -#endif - break; - -case 1: /* 2 byte interpolated oru value */ - sp_globals.y_orus = NEXT_WORD(pointer); - goto L2; - -case 2: /* 1 byte signed oru increment */ - sp_globals.y_orus += (fix15)((fix7)NEXT_BYTE(pointer)); -L2: -#if INCL_RULES - sp_globals.y_pix = TRANS(sp_globals.y_orus, sp_plaid.mult[sp_globals.y_int], sp_plaid.offset[sp_globals.y_int], sp_globals.mpshift); -#endif - break; - -default: /* No change in X value */ - break; - } - -#if INCL_RULES -switch(sp_globals.tcb.xmode) - { -case 0: /* X mode 0 */ - pP->x = sp_globals.x_pix; - break; - -case 1: /* X mode 1 */ - pP->x = -sp_globals.x_pix; - break; - -case 2: /* X mode 2 */ - pP->x = sp_globals.y_pix; - break; - -case 3: /* X mode 3 */ - pP->x = -sp_globals.y_pix; - break; - -default: /* X mode 4 */ -#endif - pP->x = (MULT16(sp_globals.x_orus, sp_globals.tcb.xxmult) + - MULT16(sp_globals.y_orus, sp_globals.tcb.xymult) + - sp_globals.tcb.xoffset) >> sp_globals.mpshift; -#if INCL_RULES - break; - } - -switch(sp_globals.tcb.ymode) - { -case 0: /* Y mode 0 */ - pP->y = sp_globals.y_pix; - break; - -case 1: /* Y mode 1 */ - pP->y = -sp_globals.y_pix; - break; - -case 2: /* Y mode 2 */ - pP->y = sp_globals.x_pix; - break; - -case 3: /* Y mode 3 */ - pP->y = -sp_globals.x_pix; - break; - -default: /* Y mode 4 */ -#endif - pP->y = (MULT16(sp_globals.x_orus, sp_globals.tcb.yxmult) + - MULT16(sp_globals.y_orus, sp_globals.tcb.yymult) + - sp_globals.tcb.yoffset) >> sp_globals.mpshift; -#if INCL_RULES - break; - } -#endif - -return pointer; -} - - - diff --git a/nx-X11/lib/font/Speedo/htest.c b/nx-X11/lib/font/Speedo/htest.c deleted file mode 100644 index 235b76560..000000000 --- a/nx-X11/lib/font/Speedo/htest.c +++ /dev/null @@ -1,361 +0,0 @@ -/* $Xorg: htest.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - -/****************************** H T E S T . C ******************************** - * * - * SPEEDO FONT HEADER TEST MODULE * - * * - ****************************************************************************/ - - -#include "speedo.h" /* General definition for make_bmap */ -#include - -#define DEBUG 0 - -#if DEBUG -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -#define FONT_BUFFER_SIZE 1000 - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ -static char pathname[100]; /* Name of font file to be output */ -static ufix8 font_buffer[FONT_BUFFER_SIZE]; /* Font buffer */ -static FILE *fdescr; /* Speedo outline file descriptor */ - - - -FUNCTION main(argc,argv) -int argc; -char *argv[]; -{ -int bytes_read; /* Number of bytes read from font file */ -ufix8 tmpufix8; /* Temporary workspace */ -fix15 tmpfix15; /* Temporary workspace */ -ufix16 tmpufix16; /* Temporary workspace */ -ufix32 tmpufix32; /* Temporary workspace */ -ufix8 *pvt_header_org; /* Origin of provate header data */ - -ufix8 read_1b(); /* Read 1 byte field from font header */ -fix15 read_2b(); /* Read 2 byte field from font header */ -fix31 read_4b(); /* Read 4 byte field from font header */ - -if (argc != 2) - { - fprintf(stderr,"Usage: htest {fontfile}\n\n"); - exit (1); - } - -sprintf(pathname, argv[1]); - -/* Initialization */ -printf("\n SPEEDO FONT FILE HEADER DATA\n"); -printf(" -------------------------\n\n"); -/* Load Speedo outline file */ -fdescr = fopen (pathname, "rb"); -if (fdescr == NULL) - { - printf("****** Cannot open file %s\n", pathname); - return; - } - -bytes_read = fread(font_buffer, sizeof(ufix8), sizeof(font_buffer), fdescr); -if (bytes_read == 0) - { - printf("****** Error on reading %s: %x\n", pathname, bytes_read); - fclose(fdescr); - return; - } - -printf("Format Identifier ...................... %.4s\n", font_buffer + FH_FMVER); - -tmpufix32 = (ufix32)read_4b(font_buffer + FH_FMVER + 4); -printf("CR-LF-NULL-NULL data ............... %8.8lx %s\n", tmpufix32, (tmpufix32 != 0x0d0a0000)? "(incorrect)": " "); - -printf("Font Size .............................. %4ld\n", (ufix32)read_4b(font_buffer + FH_FNTSZ)); - -printf("Minimum Font Buffer Size ............... %4ld\n", (ufix32)read_4b(font_buffer + FH_FBFSZ)); - -printf("Minimum Character Buffer Size .......... %4d\n", (ufix16)read_2b(font_buffer + FH_CBFSZ)); - -printf("Header Size ............................ %4d\n", (ufix16)read_2b(font_buffer + FH_HEDSZ)); - -printf("Font ID ................................ %4.4d\n", (ufix16)read_2b(font_buffer + FH_FNTID)); - -printf("Font Version Number .................... %4d\n", (ufix16)read_1b(font_buffer + FH_SFVNR)); - -printf("Font Full Name:\n %.70s\n", font_buffer + FH_FNTNM); - -printf("Manufacturing Date ................ %10.10s\n", font_buffer + FH_MDATE); - -printf("Character Set Name:\n %s\n", font_buffer + FH_LAYNM); - -printf("Character Set ID: ...................... %.4s\n", font_buffer + FH_LAYNM + 66); - -printf("Copyright Notice:\n %.70s\n", font_buffer + FH_CPYRT); - -printf("Number of Char. Indexes in Char. Set ... %4d\n", (ufix16)read_2b(font_buffer + FH_NCHRL)); - -printf("Total number of Char. Indexes in Font .. %4d\n", (ufix16)read_2b(font_buffer + FH_NCHRF)); - -printf("Index of First Character ............... %4d\n", (ufix16)read_2b(font_buffer + FH_FCHRF)); - -printf("Number of Kerning Tracks ............... %4d\n", (ufix16)read_2b(font_buffer + FH_NKTKS)); - -printf("Number of Kerning Pairs ................ %4d\n", (ufix16)read_2b(font_buffer + FH_NKPRS)); - -printf("Font Flags:\n"); -tmpufix8 = read_1b(font_buffer + FH_FLAGS); -printf(" Extended font ...................... %s\n", (tmpufix8 & BIT0)? " Yes": " No"); - -printf("Classification Flags:\n"); -tmpufix8 = read_1b(font_buffer + FH_CLFGS); -printf(" Italic ............................. %s\n", (tmpufix8 & BIT0)? " Yes": " No"); -printf(" Monospace .......................... %s\n", (tmpufix8 & BIT1)? " Yes": " No"); -printf(" Serif .............................. %s\n", (tmpufix8 & BIT2)? " Yes": " No"); -printf(" Display ............................ %s\n", (tmpufix8 & BIT3)? " Yes": " No"); - -tmpufix8 = read_1b(font_buffer + FH_FAMCL); -printf("Family Classification .................. %4d ", tmpufix8); -switch (tmpufix8) - { -case 0: - printf("(Don't care)\n"); - break; -case 1: - printf("(Serif)\n"); - break; -case 2: - printf("(Sans serif)\n"); - break; -case 3: - printf("(Monospace)\n"); - break; -case 4: - printf("(Script or calligraphic)\n"); - break; -case 5: - printf("(Decorative)\n"); - break; -default: - printf("\n"); - break; - } - -printf("Font Form Classification:\n"); -tmpufix8 = read_1b(font_buffer + FH_FRMCL); -printf(" Width Type ......................... %4d ", (tmpufix8 & 0x0f)); -switch (tmpufix8 & 0x0f) - { -case 4: - printf("(Condensed)\n"); - break; -case 6: - printf("(Semi-condensed)\n"); - break; -case 8: - printf("(Normal)\n"); - break; -case 10: - printf("(Semi-expanded)\n"); - break; -case 12: - printf("(Expanded)\n"); - break; -default: - printf("\n"); - break; - } -printf(" Weight ............................. %4d ", (tmpufix8 >> 4)); -switch (tmpufix8 >> 4) - { -case 1: - printf("(Thin)\n"); - break; -case 2: - printf("(Ultralight)\n"); - break; -case 3: - printf("(Extra light)\n"); - break; -case 4: - printf("(Light)\n"); - break; -case 5: - printf("(Book)\n"); - break; -case 6: - printf("(Normal)\n"); - break; -case 7: - printf("(Medium)\n"); - break; -case 8: - printf("(Semibold)\n"); - break; -case 9: - printf("(Demibold)\n"); - break; -case 10: - printf("(Bold)\n"); - break; -case 11: - printf("(Extrabold)\n"); - break; -case 12: - printf("(Ultrabold)\n"); - break; -case 13: - printf("(Heavy)\n"); - break; -case 14: - printf("(Black)\n"); - break; -default: - printf("\n"); - break; - } - -printf("Short Font Name ........................ %.16s\n", font_buffer + FH_SFNTN); - -printf("Short Face Name ........................ %.16s\n", font_buffer + FH_SFACN); - -printf("Font Form .............................. %.14s\n", font_buffer + FH_FNTFM); - -printf("Italic Angle ........................... %7.2f\n", ((real)read_2b(font_buffer + FH_ITANG) / 256.0)); - -printf("ORUs per Em ............................ %4d\n", (ufix16)read_2b(font_buffer + FH_ORUPM)); - -printf("Width of Word Space .................... %4d\n", (ufix16)read_2b(font_buffer + FH_WDWTH)); - -printf("Width of Em Space ...................... %4d\n", (ufix16)read_2b(font_buffer + FH_EMWTH)); - -printf("Width of En Space ...................... %4d\n", (ufix16)read_2b(font_buffer + FH_ENWTH)); - -printf("Width of Thin Space .................... %4d\n", (ufix16)read_2b(font_buffer + FH_TNWTH)); - -printf("Width of Figure Space .................. %4d\n", (ufix16)read_2b(font_buffer + FH_FGWTH)); - -printf("Min X coordinate in font ............... %4d\n", (fix15)read_2b(font_buffer + FH_FXMIN)); - -printf("Min Y coordinate in font ............... %4d\n", (fix15)read_2b(font_buffer + FH_FYMIN)); - -printf("Max X coordinate in font ............... %4d\n", (fix15)read_2b(font_buffer + FH_FXMAX)); - -printf("Max Y coordinate in font ............... %4d\n", (fix15)read_2b(font_buffer + FH_FYMAX)); - -printf("Underline Position ..................... %4d\n", (fix15)read_2b(font_buffer + FH_ULPOS)); - -printf("Underline Thickness .................... %4d\n", (fix15)read_2b(font_buffer + FH_ULTHK)); - -printf("Small Caps Y position .................. %4d\n", (fix15)read_2b(font_buffer + FH_SMCTR)); -printf("Small Caps X scale ..................... %7.2f\n", ((real)read_2b(font_buffer + FH_SMCTR + 2) / 4096.0)); -printf("Small Caps Y scale ..................... %7.2f\n", ((real)(fix15)read_2b(font_buffer + FH_SMCTR + 4) / 4096.0)); - -printf("Display Superiors Y position ........... %4d\n", (fix15)read_2b(font_buffer + FH_SMCTR)); -printf("Display Superiors X scale .............. %7.2f\n", ((real)read_2b(font_buffer + FH_SMCTR + 2) / 4096.0)); -printf("Display Superiors Y scale .............. %7.2f\n", ((real)read_2b(font_buffer + FH_SMCTR + 4) / 4096.0)); - -printf("Footnote Superiors Y position .......... %4d\n", (fix15)read_2b(font_buffer + FH_FNSTR)); -printf("Footnote Superiors X scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_FNSTR + 2) / 4096.0)); -printf("Footnote Superiors Y scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_FNSTR + 4) / 4096.0)); - -printf("Alpha Superiors Y position ............. %4d\n", (fix15)read_2b(font_buffer + FH_ALSTR)); -printf("Alpha Superiors X scale ................ %7.2f\n", ((real)read_2b(font_buffer + FH_ALSTR + 2) / 4096.0)); -printf("Alpha Superiors Y scale ................ %7.2f\n", ((real)read_2b(font_buffer + FH_ALSTR + 4) / 4096.0)); - -printf("Chemical Inferiors Y position .......... %4d\n", (fix15)read_2b(font_buffer + FH_CMITR)); -printf("Chemical Inferiors X scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_CMITR + 2) / 4096.0)); -printf("Chemical Inferiors Y scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_CMITR + 4) / 4096.0)); - -printf("Small Numerators Y position ............ %4d\n", (fix15)read_2b(font_buffer + FH_SNMTR)); -printf("Small Numerators X scale ............... %7.2f\n", ((real)read_2b(font_buffer + FH_SNMTR + 2) / 4096.0)); -printf("Small Numerators Y scale ............... %7.2f\n", ((real)read_2b(font_buffer + FH_SNMTR + 4) / 4096.0)); - -printf("Small Denominators Y position .......... %4d\n", (fix15)read_2b(font_buffer + FH_SDNTR)); -printf("Small Denominators X scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_SDNTR + 2) / 4096.0)); -printf("Small Denominators Y scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_SDNTR + 4) / 4096.0)); - -printf("Medium Numerators Y position ........... %4d\n", (fix15)read_2b(font_buffer + FH_MNMTR)); -printf("Medium Numerators X scale .............. %7.2f\n", ((real)read_2b(font_buffer + FH_MNMTR + 2) / 4096.0)); -printf("Medium Numerators Y scale .............. %7.2f\n", ((real)read_2b(font_buffer + FH_MNMTR + 4) / 4096.0)); - -printf("Medium Denominators Y position ......... %4d\n", (fix15)read_2b(font_buffer + FH_MDNTR)); -printf("Medium Denominators X scale ............ %7.2f\n", ((real)read_2b(font_buffer + FH_MDNTR + 2) / 4096.0)); -printf("Medium Denominators Y scale ............ %7.2f\n", ((real)read_2b(font_buffer + FH_MDNTR + 4) / 4096.0)); - -printf("Large Numerators Y position ............ %4d\n", (fix15)read_2b(font_buffer + FH_LNMTR)); -printf("Large Numerators X scale ............... %7.2f\n", ((real)read_2b(font_buffer + FH_LNMTR + 2) / 4096.0)); -printf("Large Numerators Y scale ............... %7.2f\n", ((real)read_2b(font_buffer + FH_LNMTR + 4) / 4096.0)); - -printf("Large Denominators Y position .......... %4d\n", (fix15)read_2b(font_buffer + FH_LDNTR)); -printf("Large Denominators X scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_LDNTR + 2) / 4096.0)); -printf("Large Denominators Y scale ............. %7.2f\n", ((real)read_2b(font_buffer + FH_LDNTR + 4) / 4096.0)); - -fclose(fdescr); -} - - -FUNCTION ufix8 read_1b(pointer) -ufix8 *pointer; -/* - * Reads 1-byte field from font buffer - */ -{ -return *pointer; -} - -FUNCTION fix15 read_2b(pointer) -ufix8 *pointer; -/* - * Reads 2-byte field from font buffer - */ -{ -fix31 temp; - -temp = *pointer++; -temp = (temp << 8) + *(pointer); -return temp; -} - -FUNCTION fix31 read_4b(pointer) -ufix8 *pointer; -/* - * Reads 4-byte field from font buffer - */ -{ -fix31 temp; - -temp = *pointer++; -temp = (temp << 8) + *(pointer++); -temp = (temp << 8) + *(pointer++); -temp = (temp << 8) + *(pointer); -return temp; -} - diff --git a/nx-X11/lib/font/Speedo/iface.c b/nx-X11/lib/font/Speedo/iface.c deleted file mode 100644 index 1dad5ae48..000000000 --- a/nx-X11/lib/font/Speedo/iface.c +++ /dev/null @@ -1,650 +0,0 @@ -/* $Xorg: iface.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/iface.c,v 1.2 1998/07/25 06:56:53 dawes Exp $ */ - -/***************************** I F A C E . C ********************************* - * * - * This module provides a layer to make Speedo function calls to and * - * from it compatible with Fontware 2.X function calls. * - * * - ****************************************************************************/ - -#include "speedo.h" /* General definitions for Speedo */ -#ifndef FONTMODULE -#include -#else -#include "xf86_ansic.h" -#endif - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -#define PI 3.1415926536 /* pi */ -#define PTPERINCH 72.2892 /* nbr points per inch, exactly! */ - -#define BIT8 0x0100 -#define BIT9 0x0200 -#define BIT10 0x0400 -#define BIT11 0x0800 -#define BIT12 0x1000 -#define BIT13 0x2000 -#define BIT14 0x4000 -#define BIT15 0x8000 - -#define READ 0 - -typedef short bool16; -typedef int bool; - -typedef -struct - { - bool16 left; - bool16 right; - bool16 top; - bool16 bottom; - } lrtb; - - -typedef -struct - { - buff_t *pfont; /* Pointer to font data */ - ufix16 mode; /* what mode is the font generator in */ - real point_size_x; /* Point size in X dimension */ - real point_size_y; /* Point size in Y dimension */ - real res_hor; /* Horizontal resolution of output device */ - real res_ver; /* Vertical resolution of output device */ - real rot_angle; /* Rotation angle in degrees (clockwise) */ - real obl_angle; /* Obliquing angle in degrees (clockwise) */ - bool16 whitewrite; /* if T, generate bitmaps for whitewriters */ - fix15 thresh; /* Scan conversion threshold * - * Thickens characters on each edge by * - * sub-pixels */ - bool16 import_widths; /* Use imported width table */ - lrtb clip; /* Clip to standard character cell */ - lrtb squeeze; /* Squeeze to standard character cell */ - bool16 bogus_mode; /* if T, ignore plaid data */ - } comp_char_desc; /* character attributes for scan conv */ - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - fw_reset(); /* Fontware 2.X reset call */ - fw_set_specs(); /* Fontware 2.X set specs call */ -bool fw_make_char(); /* Fontware 2.X make character call */ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ -void _open_bitmap(); -void _close_bitmap(); -void _set_bitmap_bits(); -void _open_outline(); -void _open_outline(); -void _start_new_char(); -void _start_curve(); -void _line_to(); -void _close_curve(); -void _close_outline(); - -/***** STATIC VARIABLES *****/ -static specs_t *pspecs; -static buff_t *pfont; -static buff_t char_data; -static fix15 set_width_x; -static specs_t specsarg; - -/***** STATIC FUNCTIONS *****/ -static fix31 make_mult(); - - -FUNCTION fw_reset() -{ -sp_reset(); -} - -FUNCTION fw_set_specs(pspecs) -comp_char_desc *pspecs; /* Pointer to scan conversion parameters structure */ - -/* Fontware 2.X character generator call to set font specifications - * compc -- pointer to structure containing scan conversion parameters. - * ->compf -- compressed font data structure - * ->point_size_x -- x pointsize - * ->point_size_y -- y pointsize - * ->res_hor -- horizontal pixels per inch - * ->res_ver -- vertical pixels per inch - * ->rot_angle -- rotation angle in degrees (clockwise) - * ->obl_angle -- obliquing angle in degrees (clockwise) - * ->whitewrite -- if true, generate bitmaps for whitewriters - * ->thresh -- scan-conversion threshold - * ->import_widths -- if true, use external width table - * ->clip.left -- clips min x at left of emsquare - * ->clip.right -- clips max x at right of emsquare - * ->clip.bottom -- clips min x at bottom of emsquare - * ->clip.top -- clips max x at top of emsquare - * ->squeeze.left -- squeezes min x at left of emsquare - * ->squeeze.right, .top, .bottom &c - * ->sw_fixed -- if TRUE, match pixel widths to scaled outline widths - * ->bogus_mode -- ignore plaid data if TRUE - */ - -{ -fix15 irot; -fix15 iobl; -fix15 x_trans_type; -fix15 y_trans_type; -fix31 xx_mult; -fix31 xy_mult; -fix31 yx_mult; -fix31 yy_mult; -real sinrot, cosrot, tanobl; -real x_distortion; -real pixperem_h; -real pixperem_v; -real point_size_x; -real point_size_y; -real res_hor; -real res_ver; -fix15 mode; - -specsarg.pfont = pspecs->pfont; - -irot = floor(pspecs->rot_angle + 0.5); -iobl = floor(pspecs->obl_angle + 0.5); -if (iobl > 85) - iobl = 85; -if (iobl < -85) - iobl = -85; -if ((irot % 90) == 0) - { - x_trans_type = y_trans_type = irot / 90 & 0x0003; - if (iobl != 0) - { - if (x_trans_type & 0x01) - y_trans_type = 4; - else - x_trans_type = 4; - } - } -else if (((irot + iobl) % 90) == 0) - { - x_trans_type = y_trans_type = (irot + iobl) / 90 & 0x0003; - if (iobl != 0) - { - if (x_trans_type & 0x01) - x_trans_type = 4; - else - y_trans_type = 4; - } - } -else - { - x_trans_type = y_trans_type = 4; - } - -point_size_x = pspecs->point_size_x; -point_size_y = pspecs->point_size_y; -res_hor = pspecs->res_hor; -res_ver = pspecs->res_ver; - -switch (x_trans_type) - { -case 0: - xx_mult = make_mult(point_size_x, res_hor); - xy_mult = 0; - break; - -case 1: - xx_mult = 0; - xy_mult = make_mult(point_size_y, res_hor); - break; - -case 2: - xx_mult = -make_mult(point_size_x, res_hor); - xy_mult = 0; - break; - -case 3: - xx_mult = 0; - xy_mult = -make_mult(point_size_y, res_hor); - break; - -default: - sinrot = sin((real)irot * PI / 180.); - cosrot = cos((real)irot * PI / 180.); - tanobl = tan((real)iobl * PI / 180.); - x_distortion = point_size_x / point_size_y; - pixperem_h = point_size_y * res_hor / (real)PTPERINCH; /* this is NOT a bug */ - xx_mult = floor(cosrot * x_distortion * pixperem_h * 65536.0 + 0.5); - xy_mult = floor((sinrot + cosrot * tanobl) * pixperem_h * 65536.0 + 0.5); - break; - } - -switch (y_trans_type) - { -case 0: - yx_mult = 0; - yy_mult = make_mult(point_size_y, res_ver); - break; - -case 1: - yx_mult = -make_mult(point_size_x, res_hor); - yy_mult = 0; - break; - -case 2: - yx_mult = 0; - yy_mult = -make_mult(point_size_y, res_ver); - break; - -case 3: - yx_mult = make_mult(point_size_x, res_ver); - yy_mult = 0; - break; - -default: - sinrot = sin((real)irot * PI / 180.); - cosrot = cos((real)irot * PI / 180.); - tanobl = tan((real)iobl * PI / 180.); - x_distortion = point_size_x / point_size_y; - pixperem_v = point_size_y * res_ver / (real)PTPERINCH; - yx_mult = floor(-sinrot * x_distortion * pixperem_v * 65536.0 + 0.5); - yy_mult = floor((cosrot - sinrot * tanobl) * pixperem_v * 65536.0 + 0.5); - break; - } - -specsarg.xxmult = xx_mult; -specsarg.xymult = xy_mult; -specsarg.xoffset = 0; -specsarg.yxmult = yx_mult; -specsarg.yymult = yy_mult; -specsarg.yoffset = 0; -specsarg.out_info = 0; - -/* Select processing mode */ -switch (pspecs->mode) - { -case 1: - if (pspecs->whitewrite) /* White-write requested? */ - { - mode = 1; - } - else - { - mode = 0; - } - break; - -case 2: - mode = 2; - break; - -default: - mode = pspecs->mode; - break; - } - -if (pspecs->bogus_mode) /* Linear transformation requested? */ - { - mode |= BIT4; /* Set linear tranformation flag */ - } - -if (pspecs->import_widths) /* Imported widths requested? */ - { - mode |= BIT6; /* Set imported width flag */ - } - -if (pspecs->clip.left) /* Clip left requested? */ - { - mode |= BIT8; /* Set clip left flag */ - } - -if (pspecs->clip.right) /* Clip right requested? */ - { - mode |= BIT9; /* Set clip right flag */ - } - -if (pspecs->clip.top) /* Clip top requested? */ - { - mode |= BIT10; /* Set clip top flag */ - } - -if (pspecs->clip.bottom) /* Clip bottom requested? */ - { - mode |= BIT11; /* Set clip bottom flag */ - } - -if (pspecs->squeeze.left) /* Squeeze left requested? */ - { - mode |= BIT12; /* Set squeeze left flag */ - } - -if (pspecs->squeeze.right) /* Squeeze right requested? */ - { - mode |= BIT13; /* Set squeeze right flag */ - } - -if (pspecs->squeeze.top) /* Squeeze top requested? */ - { - mode |= BIT14; /* Set squeeze top flag */ - } - -if (pspecs->squeeze.bottom) /* Squeeze bottom requested? */ - { - mode |= BIT15; /* Set squeeze bottom flag */ - } - -specsarg.flags = mode; - -sp_set_specs(&specsarg); -} - -FUNCTION static fix31 make_mult(point_size, resolution) -real point_size; -real resolution; -{ -real ms_factor; - -return (fix31)floor((point_size * resolution * 65536.0) / (real)PTPERINCH + 0.5); -} - -FUNCTION bool fw_make_char(char_index) -ufix16 char_index; -{ -return sp_make_char(char_index); -} - -FUNCTION buff_t *sp_load_char_data(file_offset, no_bytes, cb_offset) -fix31 file_offset; -fix15 no_bytes; -fix15 cb_offset; -/* - * Called by Speedo character generator to request that character - * data be loaded from the font file. - * This is a dummy function that assumes that the entire font has - * been loaded. - */ -{ -#if DEBUG -printf("load_char_data(%d, %d, %d)\n", file_offset, no_bytes, char_offset); -#endif -char_data.org = pfont->org + file_offset; -char_data.no_bytes = no_bytes; -return &char_data; -} - -FUNCTION void sp_report_error(n) -fix15 n; /* Error identification number */ -/* - * Called by Speedo character generator to report an error. - */ -{ -switch(n) - { -case 1: - printf("Insufficient font data loaded\n"); - break; - -case 3: - printf("Transformation matrix out of range\n"); - break; - -case 4: - printf("Font format error\n"); - break; - -case 5: - printf("Requested specs not compatible with output module\n"); - break; - -case 7: - printf("Intelligent transformation requested but not supported\n"); - break; - -case 8: - printf("Unsupported output mode requested\n"); - break; - -case 9: - printf("Extended font loaded but only compact fonts supported\n"); - break; - -case 10: - printf("Font specs not set prior to use of font\n"); - break; - -case 12: - printf("Character data not available()\n"); - break; - -case 13: - printf("Track kerning data not available()\n"); - break; - -case 14: - printf("Pair kerning data not available()\n"); - break; - -default: - printf("report_error(%d)\n", n); - break; - } -} - - - -FUNCTION void sp_open_bitmap(sw_x, sw_y, xorg, yorg, xsize, ysize) -fix31 sw_x; /* X component of escapement vector */ -fix31 sw_y; /* Y component of escapement vector */ -fix31 xorg; /* X origin */ -fix31 yorg; /* Y origin */ -fix15 xsize; /* width of bitmap */ -fix15 ysize; /* height of bitmap */ -/* - * Called by Speedo character generator to initialize a buffer prior - * to receiving bitmap data. - */ -{ - -fix15 xmin,xmax,ymin,ymax; - -#if DEBUG -printf("sp_open_bitmap:\n"); -printf(" X component of set width vector = %3.1f\n", (real)sw_x / 65536.0); -printf(" Y component of set width vector = %3.1f\n", (real)sw_y / 65536.0); -printf(" Bounding box is (%d, %d, %d, %d)\n", xmin, ymin, xmax, ymax); -#endif - -xmin = xorg >> 16; -ymin = yorg >> 16; -xmax = xmin + xsize; -ymax = ymin + ysize; - -set_width_x = ((sw_x >> 15) + 1) >> 1; -open_bitmap(set_width_x, xmin, xmax, ymin, ymax); -} - -FUNCTION void sp_set_bitmap_bits(y, x1, x2) -fix15 y, x1, x2; -/* - * Called by Speedo character generator to write one row of pixels - * into the generated bitmap character. - */ -{ -#if DEBUG -printf("set_bitmap_bits(%d, %d, %d)\n", y, x1, x2); -#endif - -set_bitmap_bits(y, x1, x2); -} - -FUNCTION void sp_close_bitmap() -/* - * Called by Speedo character generator to indicate all bitmap data - * has been generated. - */ -{ -#if DEBUG -printf("close_bitmap()\n"); -#endif - -close_bitmap(); -} - -FUNCTION void sp_open_outline(sw_x, sw_y, xmin, xmax, ymin, ymax) -fix31 sw_x; /* X component of escapement vector */ -fix31 sw_y; /* Y component of escapement vector */ -fix31 xmin; /* Minimum X value in outline */ -fix31 xmax; /* Maximum X value in outline */ -fix31 ymin; /* Minimum Y value in outline */ -fix31 ymax; /* Maximum Y value in outline */ -/* - * Called by Speedo character generator to initialize prior to - * outputting scaled outline data. - */ -{ -#if DEBUG -printf("open_outline(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)sw_x / 65536.0, (real)sw_y / 65536.0, - (real)xmin / 65536.0, (real)xmax / 65536.0, (real)ymin / 65536.0, (real)ymax / 65536.0); -#endif - -set_width_x = ((sw_x >> 15) + 1) >> 1; -open_outline(set_width_x); -} - -FUNCTION void sp_start_new_char() -/* - * Called by Speedo character generator to initialize prior to - * outputting scaled outline data for a sub-character in a compound - * character. - */ -{ -#if DEBUG -printf("start_new_char()\n"); -#endif - -start_new_char(); -} - -FUNCTION void sp_start_contour(x, y, outside) -fix31 x; /* X coordinate of start point in 1/65536 pixels */ -fix31 y; /* Y coordinate of start point in 1/65536 pixels */ -boolean outside; /* TRUE if curve encloses ink (Counter-clockwise) */ -/* - * Called by Speedo character generator at the start of each contour - * in the outline data of the character. - */ -{ -real realx, realy; - -realx = (real)x / 65536.0; -realy = (real)y / 65536.0; - -#if DEBUG -printf("start_curve(%3.1f, %3.1f, %s)\n", - realx, realy, - outside? "outside": "inside"); -#endif - -start_curve(realx, realy, outside); -} - -FUNCTION void sp_curve_to(x1, y1, x2, y2, x3, y3) -fix31 x1; /* X coordinate of first control point in 1/65536 pixels */ -fix31 y1; /* Y coordinate of first control point in 1/65536 pixels */ -fix31 x2; /* X coordinate of second control point in 1/65536 pixels */ -fix31 y2; /* Y coordinate of second control point in 1/65536 pixels */ -fix31 x3; /* X coordinate of curve end point in 1/65536 pixels */ -fix31 y3; /* Y coordinate of curve end point in 1/65536 pixels */ -/* - * Called by Speedo character generator once for each curve in the - * scaled outline data of the character. This function is only called if curve - * output is enabled in the set_specs() call. - */ -{ -#if DEBUG -printf("curve_to(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)x1 / 65536.0, (real)y1 / 65536.0, - (real)x2 / 65536.0, (real)y2 / 65536.0, - (real)x3 / 65536.0, (real)y3 / 65536.0); -#endif -} - -FUNCTION void sp_line_to(x, y) -fix31 x; /* X coordinate of vector end point in 1/65536 pixels */ -fix31 y; /* Y coordinate of vector end point in 1/65536 pixels */ -/* - * Called by Speedo character generator onece for each vector in the - * scaled outline data for the character. This include curve data that has - * been sub-divided into vectors if curve output has not been enabled - * in the set_specs() call. - */ -{ -real realx, realy; - -realx = (real)x / 65536.0; -realy = (real)y / 65536.0; - -#if DEBUG -printf("line_to(%3.1f, %3.1f)\n", - realx, realy); -#endif - -line_to(realx, realy); -} - -FUNCTION void sp_close_contour() -/* - * Called by Speedo character generator at the end of each contour - * in the outline data of the character. - */ -{ -#if DEBUG -printf("close_curve()\n"); -#endif - -close_curve(); -} - -FUNCTION void sp_close_outline() -/* - * Called by Speedo character generator at the end of output of the - * scaled outline of the character. - */ -{ -#if DEBUG -printf("close_outline()\n"); -#endif - -close_outline(set_width_x); -} - diff --git a/nx-X11/lib/font/Speedo/keys.h b/nx-X11/lib/font/Speedo/keys.h deleted file mode 100644 index dd9d0bff7..000000000 --- a/nx-X11/lib/font/Speedo/keys.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $Xorg: keys.h,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - - -/***** DECRYPTION KEY CONSTANTS (PC Platform) *****/ - -#define CUS0 432 /* Customer number */ - -#define KEY0 0 /* Decryption key 0 */ -#define KEY1 72 /* Decryption key 1 */ -#define KEY2 123 /* Decryption key 2 */ -#define KEY3 1 /* Decryption key 3 */ -#define KEY4 222 /* Decryption key 4 */ -#define KEY5 194 /* Decryption key 5 */ -#define KEY6 113 /* Decryption key 6 */ -#define KEY7 119 /* Decryption key 7 */ -#define KEY8 52 /* Decryption key 8 */ - -/***** DECRYPTION KEY CONSTANTS (Sample) *****/ - -#define XSAMPLEFONTS - -#define XCUS0 0 /* Customer number */ - -#define XKEY0 0 /* Decryption key 0 */ -#define XKEY1 0 /* Decryption key 1 */ -#define XKEY2 0 /* Decryption key 2 */ -#define XKEY3 0 /* Decryption key 3 */ -#define XKEY4 0 /* Decryption key 4 */ -#define XKEY5 0 /* Decryption key 5 */ -#define XKEY6 0 /* Decryption key 6 */ -#define XKEY7 0 /* Decryption key 7 */ -#define XKEY8 0 /* Decryption key 8 */ - - diff --git a/nx-X11/lib/font/Speedo/module/Imakefile b/nx-X11/lib/font/Speedo/module/Imakefile deleted file mode 100644 index e517707c5..000000000 --- a/nx-X11/lib/font/Speedo/module/Imakefile +++ /dev/null @@ -1,47 +0,0 @@ -XCOMM $XFree86: xc/lib/font/Speedo/module/Imakefile,v 1.5 1999/08/14 10:49:18 dawes Exp $ - -#define IHaveModules -#include - - INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XINCLUDESRC) -I../ - HEADERS = - DEFINES = -DFONTMODULE - - SPEEDOSRCS = do_char.c do_trns.c out_bl2d.c out_blk.c speedomod.c \ - out_scrn.c out_util.c reset.c set_spcs.c set_trns.c - SPEEDOOBJS = do_char.o do_trns.o out_bl2d.o out_blk.o speedomod.o \ - out_scrn.o out_util.o reset.o set_spcs.o set_trns.o - - SRCS = spfuncs.c spfile.c spinfo.c sperr.c spfont.c spglyph.c \ - spencode.c bics-unicode.c \ - $(SPEEDOSRCS) - OBJS = spfuncs.o spfile.o spinfo.o sperr.o spfont.o spglyph.o \ - spencode.o bics-unicode.o \ - $(SPEEDOOBJS) - -LinkSourceFile(bics-unicode.c,..) -LinkSourceFile(do_char.c,..) -LinkSourceFile(do_trns.c,..) -LinkSourceFile(out_bl2d.c,..) -LinkSourceFile(out_blk.c,..) -LinkSourceFile(out_scrn.c,..) -LinkSourceFile(out_util.c,..) -LinkSourceFile(reset.c,..) -LinkSourceFile(set_spcs.c,..) -LinkSourceFile(set_trns.c,..) -LinkSourceFile(spfuncs.c,..) -LinkSourceFile(spfile.c,..) -LinkSourceFile(spinfo.c,..) -LinkSourceFile(sperr.c,..) -LinkSourceFile(spfont.c,..) -LinkSourceFile(spglyph.c,..) -LinkSourceFile(spencode.c,..) - -ModuleObjectRule() -LibraryModuleTarget(speedo,$(OBJS)) -InstallLibraryModule(speedo,$(MODULEDIR),fonts) - -DependTarget() - -InstallDriverSDKLibraryModule(speedo,$(DRIVERSDKMODULEDIR),fonts) diff --git a/nx-X11/lib/font/Speedo/module/speedomod.c b/nx-X11/lib/font/Speedo/module/speedomod.c deleted file mode 100644 index 94820fe44..000000000 --- a/nx-X11/lib/font/Speedo/module/speedomod.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), 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 - * XFREE86 PROJECT 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 XFree86 Project 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 - * XFree86 Project. - */ -/* $XFree86: xc/lib/font/Speedo/module/speedomod.c,v 1.8 2001/09/04 13:49:16 dawes Exp $ */ - -#include "misc.h" - -#include -#include "xf86Module.h" - -static MODULESETUPPROTO(speedoSetup); - - /* - * This is the module data function that is accessed when loading - * libspeedo as a module. - */ - -static XF86ModuleVersionInfo VersRec = -{ - "speedo", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 1, - ABI_CLASS_FONT, /* A font module */ - ABI_FONT_VERSION, - MOD_CLASS_FONT, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -XF86ModuleData speedoModuleData = { &VersRec, speedoSetup, NULL }; - -extern void SpeedoRegisterFontFileFunctions(void); - -FontModule speedoModule = { - SpeedoRegisterFontFileFunctions, - "Speedo", - NULL -}; - -static pointer -speedoSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - speedoModule.module = module; - LoadFont(&speedoModule); - - /* Need a non-NULL return */ - return (pointer)1; -} diff --git a/nx-X11/lib/font/Speedo/nsample.c b/nx-X11/lib/font/Speedo/nsample.c deleted file mode 100644 index a90367f0a..000000000 --- a/nx-X11/lib/font/Speedo/nsample.c +++ /dev/null @@ -1,745 +0,0 @@ -/* $Xorg: nsample.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - - -/*************************** N S A M P L E . C ******************************* - * * - * SPEEDO CHARACTER GENERATOR TEST MODULE * - * * - * This is an illustration of what external resources are required to * - * load a Speedo outline and use the Speedo character generator to generate * - * bitmaps or scaled outlines according to the desired specification. * * - * * - * This program loads a Speedo outline, defines a set of character * - * generation specifications, generates bitmap (or outline) data for each * - * character in the font and prints them on the standard output. * - * * - * If the font buffer is too small to hold the entire font, the first * - * part of the font is loaded. Character data is then loaded dynamically * - * as required. * - * * - ****************************************************************************/ - -#include -#if PROTOS_AVAIL -#include -#include -#include -void main(int argc,char *argv[]); -#else -void* malloc(); -#endif - -#include "speedo.h" /* General definition for make_bmap */ -#include "keys.h" /* Font decryption keys */ - -#define DEBUG 0 - -#if DEBUG -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -#define MAX_BITS 256 /* Max line length of generated bitmap */ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC FUNCTIONS *****/ - -#if PROTOS_AVAIL -fix31 read_4b(ufix8 FONTFAR *ptr); -fix15 read_2b(ufix8 FONTFAR *ptr); -#else -fix31 read_4b(); -fix15 read_2b(); -#endif -/***** STATIC VARIABLES *****/ -static char pathname[100]; /* Name of font file to be output */ -static ufix8 FONTFAR *font_buffer; /* Pointer to allocated Font buffer */ -static ufix8 FONTFAR *char_buffer; /* Pointer to allocate Character buffer */ -static buff_t font; /* Buffer descriptor for font data */ -#if INCL_LCD -static buff_t char_data; /* Buffer descriptor for character data */ -#endif -static FILE *fdescr; /* Speedo outline file descriptor */ -static ufix16 char_index; /* Index of character to be generated */ -static ufix16 char_id; /* Character ID */ -static ufix16 minchrsz; /* minimum character buffer size */ - -static ufix8 key[] = - { - KEY0, - KEY1, - KEY2, - KEY3, - KEY4, - KEY5, - KEY6, - KEY7, - KEY8 - }; /* Font decryption key */ - -static fix15 raswid; /* raster width */ -static fix15 rashgt; /* raster height */ -static fix15 offhor; /* horizontal offset from left edge of emsquare */ -static fix15 offver; /* vertical offset from baseline */ -static fix15 set_width; /* character set width */ -static fix15 y_cur; /* Current y value being generated and printed */ -static char line_of_bits[2 * MAX_BITS + 1]; /* Buffer for row of generated bits */ - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -bitmap_t bfuncs = { sp_open_bitmap, sp_set_bitmap_bits, sp_close_bitmap }; -#endif -#if INCL_OUTLINE -outline_t ofuncs = { sp_open_outline, sp_start_new_char, sp_start_contour, sp_curve_to, - sp_line_to, sp_close_contour, sp_close_outline }; -#endif -#endif - - -ufix8 temp[16]; /* temp buffer for first 16 bytes of font */ - - -FUNCTION void main(argc,argv) -int argc; -char *argv[]; -{ -ufix16 bytes_read; /* Number of bytes read from font file */ -specs_t specs; /* Bundle of character generation specs */ -int first_char_index; /* Index of first character in font */ -int no_layout_chars; /* number of characters in layout */ -ufix32 i; -ufix32 minbufsz; /* minimum font buffer size to allocate */ -ufix16 cust_no; -ufix8 FONTFAR *byte_ptr; - -#if REENTRANT_ALLOC -SPEEDO_GLOBALS* sp_global_ptr; -#endif - - -if (argc != 2) - { - fprintf(stderr,"Usage: nsample {fontfile}\n\n"); - exit (1); - } - -sprintf(pathname, argv[1]); - -/* Load Speedo outline file */ -fdescr = fopen (pathname, "rb"); -if (fdescr == NULL) - { - printf("****** Cannot open file %s\n", pathname); - return; - } - -/* get minimum font buffer size - read first 16 bytes to get the minimum - size field from the header, then allocate buffer dynamically */ - -bytes_read = fread(temp, sizeof(ufix8), 16, fdescr); - -if (bytes_read != 16) - { - printf("****** Error on reading %s: %x\n", pathname, bytes_read); - fclose(fdescr); - return; - } -#if INCL_LCD -minbufsz = (ufix32)read_4b(temp+FH_FBFSZ); -#else -minbufsz = (ufix32)read_4b(temp+FH_FNTSZ); -if (minbufsz >= 0x10000) - { - printf("****** Cannot process fonts greater than 64K - use dynamic character loading configuration option\n"); - fclose(fdescr); - return; - } -#endif - -#if (defined(M_I86SM) || defined(M_I86MM)) -font_buffer = (ufix8 FONTFAR *)_fmalloc((ufix16)minbufsz); -#else -font_buffer = (ufix8 *)malloc((ufix16)minbufsz); -#endif - -if (font_buffer == NULL) - { - printf("****** Unable to allocate memory for font buffer\n"); - fclose(fdescr); - return; - } - -#if DEBUG -printf("Loading font file %s\n", pathname); -#endif - -fseek(fdescr, (ufix32)0, 0); -#if (defined(M_I86SM) || (defined(M_I86MM))) -byte_ptr = font_buffer; -for (i=0; i< minbufsz; i++){ - int ch; - ch = getc(fdescr); - if (ch == EOF) - {printf ("Premature EOF in reading font buffer, %ld bytes read\n",i); - exit(2);} - *byte_ptr=(ufix8)ch; - byte_ptr++; - } -bytes_read = i; -#else -bytes_read = fread((ufix8 *)font_buffer, sizeof(ufix8), (ufix16)minbufsz, fdescr); -if (bytes_read == 0) - { - printf("****** Error on reading %s: %x\n", pathname, bytes_read); - fclose(fdescr); - return; - } -#endif - -#if INCL_LCD -/* now allocate minimum character buffer */ - -minchrsz = read_2b(font_buffer+FH_CBFSZ); -#if (defined(M_I86SM) || (defined(M_I86MM))) -char_buffer = (ufix8 FONTFAR *)_fmalloc(minchrsz); -#else -char_buffer = (ufix8*)malloc(minchrsz); -#endif - -if (char_buffer == NULL) - { - printf("****** Unable to allocate memory for character buffer\n"); - fclose(fdescr); - return; - } -#endif - -#if DYNAMIC_ALLOC || REENTRANT_ALLOC - sp_global_ptr = (SPEEDO_GLOBALS *)malloc(sizeof(SPEEDO_GLOBALS)); - memset(sp_global_ptr,(ufix8)0,sizeof(SPEEDO_GLOBALS)); -#endif - - -/* Initialization */ -#if REENTRANT_ALLOC -sp_reset(sp_global_ptr); /* Reset Speedo character generator */ -#else -sp_reset(); /* Reset Speedo character generator */ -#endif - -font.org = font_buffer; -font.no_bytes = bytes_read; - -#if REENTRANT_ALLOC -if ((cust_no=sp_get_cust_no(sp_global_ptr,font)) != CUS0 && /* NOT STANDARD ENCRYPTION */ -#else -if ((cust_no=sp_get_cust_no(font)) != CUS0 && /* NOT STANDARD ENCRYPTION */ -#endif - cust_no != 0) - { -#if REENTRANT_ALLOC - printf("Unable to use fonts for customer number %d\n", - sp_get_cust_no(sp_global_ptr(font))); -#else - printf("Unable to use fonts for customer number %d\n", - sp_get_cust_no(font)); -#endif - fclose(fdescr); - return; - } - -#if INCL_KEYS -#if REENTRANT_ALLOC -sp_set_key(sp_global_ptr,key); /* Set decryption key */ -#else -sp_set_key(key); /* Set decryption key */ -#endif -#endif - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -#if REENTRANT_ALLOC -sp_set_bitmap_device(sp_global_ptr,&bfuncs,sizeof(bfuncs)); /* Set decryption key */ -#else -sp_set_bitmap_device(&bfuncs,sizeof(bfuncs)); /* Set decryption key */ -#endif -#endif -#if INCL_OUTLINE -#if REENTRANT_ALLOC -sp_set_outline_device(sp_global_ptr,&ofuncs,sizeof(ofuncs)); /* Set decryption key */ -#else -sp_set_outline_device(&ofuncs,sizeof(ofuncs)); /* Set decryption key */ -#endif -#endif -#endif - -first_char_index = read_2b(font_buffer + FH_FCHRF); -no_layout_chars = read_2b(font_buffer + FH_NCHRL); - -/* Set specifications for character to be generated */ -specs.pfont = &font; /* Pointer to Speedo outline structure */ -specs.xxmult = 25L << 16; /* Coeff of X to calculate X pixels */ -specs.xymult = 0L << 16; /* Coeff of Y to calculate X pixels */ -specs.xoffset = 0L << 16; /* Position of X origin */ -specs.yxmult = 0L << 16; /* Coeff of X to calculate Y pixels */ -specs.yymult = 25L << 16; /* Coeff of Y to calculate Y pixels */ -specs.yoffset = 0L << 16; /* Position of Y origin */ -specs.flags = 0; /* Mode flags */ -specs.out_info = NULL; - - -#if REENTRANT_ALLOC -if (!sp_set_specs(sp_global_ptr,&specs)) /* Set character generation specifications */ -#else -if (!sp_set_specs(&specs)) /* Set character generation specifications */ -#endif - { - printf("****** Cannot set requested specs\n"); - } -else - { - for (i = 0; i < no_layout_chars; i++) /* For each character in font */ - { - char_index = i + first_char_index; -#if REENTRANT_ALLOC - char_id = sp_get_char_id(sp_global_ptr,char_index); -#else - char_id = sp_get_char_id(char_index); -#endif - if (char_id != 0) - { -#if REENTRANT_ALLOC - if (!sp_make_char(sp_global_ptr,char_index)) -#else - if (!sp_make_char(char_index)) -#endif - { - printf("****** Cannot generate character %d\n", char_index); - } - } - } - } - -fclose(fdescr); -} - -#if INCL_LCD -#if REENTRANT_ALLOC -FUNCTION buff_t *sp_load_char_data(sp_global_ptr, file_offset, no_bytes, cb_offset) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION buff_t *sp_load_char_data(file_offset, no_bytes, cb_offset) -#endif -fix31 file_offset; /* Offset in bytes from the start of the font file */ -fix15 no_bytes; /* Number of bytes to be loaded */ -fix15 cb_offset; /* Offset in bytes from start of char buffer */ -/* - * Called by Speedo character generator to request that character - * data be loaded from the font file into a character data buffer. - * The character buffer offset is zero for all characters except elements - * of compound characters. If a single buffer is allocated for character - * data, cb_offset ensures that sub-character data is loaded after the - * top-level compound character. - * Returns a pointer to a buffer descriptor. - */ -{ -int bytes_read; - -#if DEBUG -printf("\nCharacter data(%d, %d, %d) requested\n", file_offset, no_bytes, cb_offset); -#endif -if (fseek(fdescr, (long)file_offset, (int)0) != 0) - { - printf("****** Error in seeking character\n"); - fclose(fdescr); - exit(1); - } - -if ((no_bytes + cb_offset) > minchrsz) - { - printf("****** Character buffer overflow\n"); - fclose(fdescr); - exit(3); - } - -bytes_read = fread((char_buffer + cb_offset), sizeof(ufix8), no_bytes, fdescr); -if (bytes_read != no_bytes) - { - printf("****** Error on reading character data\n"); - fclose(fdescr); - exit(2); - } - -#if DEBUG -printf("Character data loaded\n"); -#endif - -char_data.org = (ufix8 FONTFAR *)char_buffer + cb_offset; -char_data.no_bytes = no_bytes; -return &char_data; -} -#endif - - -#if REENTRANT_ALLOC -FUNCTION void sp_report_error(sp_global_ptr,n) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_report_error(n) -#endif -fix15 n; /* Error identification number */ -/* - * Called by Speedo character generator to report an error. - * - * Since character data not available is one of those errors - * that happens many times, don't report it to user - */ -{ - -switch(n) - { -case 1: - printf("Insufficient font data loaded\n"); - break; - -case 3: - printf("Transformation matrix out of range\n"); - break; - -case 4: - printf("Font format error\n"); - break; - -case 5: - printf("Requested specs not compatible with output module\n"); - break; - -case 7: - printf("Intelligent transformation requested but not supported\n"); - break; - -case 8: - printf("Unsupported output mode requested\n"); - break; - -case 9: - printf("Extended font loaded but only compact fonts supported\n"); - break; - -case 10: - printf("Font specs not set prior to use of font\n"); - break; - -case 12: - break; - -case 13: - printf("Track kerning data not available()\n"); - break; - -case 14: - printf("Pair kerning data not available()\n"); - break; - -default: - printf("report_error(%d)\n", n); - break; - } -} - -#if REENTRANT_ALLOC -FUNCTION void sp_open_bitmap(sp_global_ptr, x_set_width, y_set_width, xorg, yorg, xsize, ysize) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_open_bitmap(x_set_width, y_set_width, xorg, yorg, xsize, ysize) -#endif -fix31 x_set_width; -fix31 y_set_width; /* Set width vector */ -fix31 xorg; /* Pixel boundary at left extent of bitmap character */ -fix31 yorg; /* Pixel boundary at right extent of bitmap character */ -fix15 xsize; /* Pixel boundary of bottom extent of bitmap character */ -fix15 ysize; /* Pixel boundary of top extent of bitmap character */ -/* - * Called by Speedo character generator to initialize a buffer prior - * to receiving bitmap data. - */ -{ -fix15 i; - -#if DEBUG -printf("open_bitmap(%3.1f, %3.1f, %3.1f, %3.1f, %d, %d)\n", - (real)x_set_width / 65536.0, (real)y_set_width / 65536.0, - (real)xorg / 65536.0, (real)yorg / 65536.0, (int)xsize, (int)ysize); -#endif -raswid = xsize; -rashgt = ysize; -offhor = (fix15)(xorg >> 16); -offver = (fix15)(yorg >> 16); - -if (raswid > MAX_BITS) - raswid = MAX_BITS; - -printf("\nCharacter index = %d, ID = %d\n", char_index, char_id); -printf("set width = %3.1f, %3.1f\n", (real)x_set_width / 65536.0, (real)y_set_width / 65536.0); -printf("X offset = %d\n", offhor); -printf("Y offset = %d\n\n", offver); -for (i = 0; i < raswid; i++) - { - line_of_bits[i << 1] = '.'; - line_of_bits[(i << 1) + 1] = ' '; - } -line_of_bits[raswid << 1] = '\0'; -y_cur = 0; -} - -#if REENTRANT_ALLOC -FUNCTION void sp_set_bitmap_bits (sp_global_ptr, y, xbit1, xbit2) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_set_bitmap_bits (y, xbit1, xbit2) -#endif - fix15 y; /* Scan line (0 = first row above baseline) */ - fix15 xbit1; /* Pixel boundary where run starts */ - fix15 xbit2; /* Pixel boundary where run ends */ - -/* - * Called by Speedo character generator to write one row of pixels - * into the generated bitmap character. - */ - -{ -fix15 i; - -#if DEBUG -printf("set_bitmap_bits(%d, %d, %d)\n", (int)y, (int)xbit1, (int)xbit2); -#endif -/* Clip runs beyond end of buffer */ -if (xbit1 > MAX_BITS) - xbit1 = MAX_BITS; - -if (xbit2 > MAX_BITS) - xbit2 = MAX_BITS; - -/* Output backlog lines if any */ -while (y_cur != y) - { - printf(" %s\n", line_of_bits); - for (i = 0; i < raswid; i++) - { - line_of_bits[i << 1] = '.'; - } - y_cur++; - } - -/* Add bits to current line */ -for (i = xbit1; i < xbit2; i++) - { - line_of_bits[i << 1] = 'X'; - } -} - -#if REENTRANT_ALLOC -FUNCTION void sp_close_bitmap(sp_global_ptr) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_close_bitmap() -#endif -/* - * Called by Speedo character generator to indicate all bitmap data - * has been generated. - */ -{ -#if DEBUG -printf("close_bitmap()\n"); -#endif -printf(" %s\n", line_of_bits); -} - -#if INCL_OUTLINE -#if REENTRANT_ALLOC -FUNCTION void sp_open_outline(sp_global_ptr, x_set_width, y_set_width, xmin, xmax, ymin, ymax) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#endif -fix31 x_set_width; -fix31 y_set_width; /* Transformed escapement vector */ -fix31 xmin; /* Minimum X value in outline */ -fix31 xmax; /* Maximum X value in outline */ -fix31 ymin; /* Minimum Y value in outline */ -fix31 ymax; /* Maximum Y value in outline */ -/* - * Called by Speedo character generator to initialize prior to - * outputting scaled outline data. - */ -{ -printf("\nopen_outline(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)x_set_width / 65536.0, (real)y_set_width / 65536.0, - (real)xmin / 65536.0, (real)xmax / 65536.0, (real)ymin / 65536.0, (real)ymax / 65536.0); -} - - -#if REENTRANT_ALLOC -FUNCTION void sp_start_new_char(sp_global_ptr) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_start_new_char() -#endif -/* - * Called by Speedo character generator to initialize prior to - * outputting scaled outline data for a sub-character in a compound - * character. - */ -{ -printf("start_new_char()\n"); -} - -#if REENTRANT_ALLOC -FUNCTION void sp_start_contour(sp_global_ptr, x, y, outside) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_start_contour(x, y, outside) -#endif -fix31 x; /* X coordinate of start point in 1/65536 pixels */ -fix31 y; /* Y coordinate of start point in 1/65536 pixels */ -boolean outside; /* TRUE if curve encloses ink (Counter-clockwise) */ -/* - * Called by Speedo character generator at the start of each contour - * in the outline data of the character. - */ -{ -printf("start_contour(%3.1f, %3.1f, %s)\n", - (real)x / 65536.0, (real)y / 65536.0, - outside? "outside": "inside"); -} - -#if REENTRANT_ALLOC -FUNCTION void sp_curve_to(sp_global_ptr, x1, y1, x2, y2, x3, y3) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_curve_to(x1, y1, x2, y2, x3, y3) -#endif -fix31 x1; /* X coordinate of first control point in 1/65536 pixels */ -fix31 y1; /* Y coordinate of first control point in 1/65536 pixels */ -fix31 x2; /* X coordinate of second control point in 1/65536 pixels */ -fix31 y2; /* Y coordinate of second control point in 1/65536 pixels */ -fix31 x3; /* X coordinate of curve end point in 1/65536 pixels */ -fix31 y3; /* Y coordinate of curve end point in 1/65536 pixels */ -/* - * Called by Speedo character generator onece for each curve in the - * scaled outline data of the character. This function is only called if curve - * output is enabled in the set_specs() call. - */ -{ -printf("curve_to(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)x1 / 65536.0, (real)y1 / 65536.0, - (real)x2 / 65536.0, (real)y2 / 65536.0, - (real)x3 / 65536.0, (real)y3 / 65536.0); -} - -#if REENTRANT_ALLOC -FUNCTION void sp_line_to(sp_global_ptr, x, y) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_line_to(x, y) -#endif -fix31 x; /* X coordinate of vector end point in 1/65536 pixels */ -fix31 y; /* Y coordinate of vector end point in 1/65536 pixels */ -/* - * Called by Speedo character generator onece for each vector in the - * scaled outline data for the character. This include curve data that has - * been sub-divided into vectors if curve output has not been enabled - * in the set_specs() call. - */ -{ -printf("line_to(%3.1f, %3.1f)\n", - (real)x / 65536.0, (real)y / 65536.0); -} - - -#if REENTRANT_ALLOC -FUNCTION void sp_close_contour(sp_global_ptr) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_close_contour() -#endif -/* - * Called by Speedo character generator at the end of each contour - * in the outline data of the character. - */ -{ -printf("close_contour()\n"); -} - -#if REENTRANT_ALLOC -FUNCTION void sp_close_outline(sp_global_ptr) -SPEEDO_GLOBALS *sp_global_ptr; -#else -FUNCTION void sp_close_outline() -#endif -/* - * Called by Speedo character generator at the end of output of the - * scaled outline of the character. - */ -{ -printf("close_outline()\n"); -} - -#endif - -FUNCTION fix15 read_2b(pointer) -ufix8 FONTFAR *pointer; -/* - * Reads 2-byte field from font buffer - */ -{ -fix15 temp; - -temp = *pointer++; -temp = (temp << 8) + *(pointer); -return temp; -} - - - FUNCTION fix31 read_4b(pointer) -ufix8 FONTFAR *pointer; -/* - * Reads 4-byte field from font buffer - */ -{ -fix31 temp; - -temp = *pointer++; -temp = (temp << 8) + *(pointer++); -temp = (temp << 8) + *(pointer++); -temp = (temp << 8) + *(pointer); -return temp; -} - - diff --git a/nx-X11/lib/font/Speedo/out_bl2d.c b/nx-X11/lib/font/Speedo/out_bl2d.c deleted file mode 100644 index 6c38cb30d..000000000 --- a/nx-X11/lib/font/Speedo/out_bl2d.c +++ /dev/null @@ -1,772 +0,0 @@ -/* $Xorg: out_bl2d.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_bl2d.c,v 1.3 1999/02/07 11:47:14 dawes Exp $ */ - -/*************************** O U T _ B L 2 D . C ***************************** - * * - * This is an output module for screen writer using two dimensional scanning * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for speedo */ - -#define CLOCKWISE 1 -#define DEBUG 0 -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -#if INCL_2D -static void sp_draw_vector_to_2d(PROTO_DECL2 fix15 x0,fix15 y0,fix15 x1,fix15 y1,band_t GLOBALFAR *band); -static void sp_add_intercept_2d(PROTO_DECL2 fix15 y,fix15 x); -static void sp_proc_intercepts_2d(PROTO_DECL1); -#endif - -#if INCL_2D -FUNCTION boolean init_2d( -GDECL -specs_t GLOBALFAR *specsarg) -/* - * init_out_2d() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ - -if (specsarg->flags & CURVES_OUT) - return FALSE; /* Curves out, clipping not supported */ - -#if DEBUG -printf("INIT_OUT__2d()\n"); -#endif -return TRUE; -} -#endif - -#if INCL_2D -FUNCTION boolean begin_char_2d( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - * Initializes intercept table, either calculates pixel maxima or - * decides that they need to be collected - */ -{ -#if DEBUG -printf("BEGIN_CHAR__2d(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -/* Convert PIX.FRAC to 16.16 form */ -sp_globals.x_scan_active = TRUE; /* Assume x-scanning from the start */ - -init_char_out(Psw,Pmin,Pmax); -return TRUE; -} -#endif - - -#if INCL_2D -FUNCTION void begin_contour_2d( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR__2d(%3.4f, %3.4f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, - (real)P1.y / (real)sp_globals.onepix, - outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -} -#endif - -#if INCL_2D -FUNCTION void line_2d( -GDECL -point_t P1) -/* - * Called for each vector in the transformed character - * "draws" vector into intercept table - */ -{ - -#if DEBUG -printf("LINE_0(%3.4f, %3.4f)\n", - (real)P1.x / (real)sp_globals.onepix, - (real)P1.y / (real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (!sp_globals.intercept_oflo) - { - sp_draw_vector_to_2d(sp_globals.x0_spxl, - sp_globals.y0_spxl, - P1.x, - P1.y, - &sp_globals.y_band); /* y-scan */ - - if (sp_globals.x_scan_active) - sp_draw_vector_to_2d(sp_globals.y0_spxl, - sp_globals.x0_spxl, - P1.y, - P1.x, - &sp_globals.x_band); /* x-scan if selected */ - } - -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; /* update endpoint */ -} - -FUNCTION static void sp_draw_vector_to_2d( -GDECL -fix15 x0, /* X coordinate */ -fix15 y0, /* Y coordinate */ -fix15 x1, -fix15 y1, -band_t GLOBALFAR *band) -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 y_pxl; - -yc = (y0 + sp_globals.pixrnd) >> sp_globals.pixshift; /* current scan line = end of last line */ -y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan line */ - -if ((how_many_y = y_pxl - yc) == 0) return; /* Don't draw a null line */ - -if (how_many_y < 0) yc--; /* Predecrment downward lines */ - -if (yc > band->band_max) /* Is start point above band? */ - { - if (y_pxl > band->band_max) return; /* line has to go down! */ - how_many_y = y_pxl - (yc = band->band_max) - 1; /* Yes, limit it */ - } - -if (yc < band->band_min) /* Is start point below band? */ - { - if (y_pxl < band->band_min) return; /* line has to go up! */ - how_many_y = y_pxl - (yc = band->band_min); /* Yes, limit it */ - } - -xc = (fix31)(x0 + sp_globals.pixrnd) << 16; /* Original x coordinate with built in */ - /* rounding. int.16 + pixshift form */ - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - dx_dy = 0L; /* Zero slope, leave xc alone */ - goto skip_calc; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independent. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)0xFFFF) && - (temp2 != 0x0000) ) - { /* Overflow. Pick point closest to yc + .5 */ - if (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } - goto skip_calc; - } -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we leave it as an int.pixshift + 16 delta */ - -xc += (fix31)temp1 * dx_dy; -dx_dy <<= sp_globals.pixshift; -skip_calc: - -yc -= band->band_array_offset; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < band->band_floor) - how_many_y = band->band_floor; /* can't go below floor */ - while(yc >= how_many_y) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_2d(yc--,temp1); - xc -= dx_dy; - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > band->band_ceiling) - how_many_y = band->band_ceiling; - while(yc < how_many_y) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_2d(yc++,temp1); - xc += dx_dy; - } - } -} - -#endif - -#if INCL_2D -FUNCTION boolean end_char_2d() -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; -#if INCL_CLIPPING -fix31 em_max, em_min, bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR__2d()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - sp_globals.x_scan_active = FALSE; - sp_globals.no_x_lists = 0; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_2d(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_2d(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_2D -FUNCTION static void sp_add_intercept_2d( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix15 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; - -#if DEBUG -/* Bounds checking IS done in debug mode */ -if ((y >= MAX_INTERCEPTS) || (y < 0)) - { - printf("Intercept out of table!!!!! (%d)\n",y); - return; - } - -if (y >= sp_globals.no_y_lists) - { - printf(" Add x intercept(%2d, %f)\n", - y + sp_globals.x_band.band_min - sp_globals.no_y_lists, - (real)x/(real)sp_globals.onepix); - if (y > (sp_globals.no_x_lists + sp_globals.no_y_lists)) - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } - } - else - { - printf(" Add y intercept(%2d, %f)\n", y + sp_globals.y_band.band_min,(real)x/(real)sp_globals.onepix); - } - -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = x; - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) >= sp_globals.first_offset) /* Until to == end of list */ - { - if (x <= sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_2D -FUNCTION static void sp_proc_intercepts_2d() -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to xmin, xmax, sp_globals.ymin, ymax boundaries - */ -{ -register fix15 i; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 local_bmap_xmin; - fix15 local_bmap_xmax; - fix15 first_y, last_y; - fix15 j,k; - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax << sp_globals.pixshift; - xmin = sp_globals.clip_xmin << sp_globals.pixshift; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if (sp_globals.x_scan_active) /* If xscanning, we need to make sure we don't miss any important pixels */ - { - first_y = sp_globals.x_band.band_floor; /* start of x lists */ - last_y = sp_globals.x_band.band_ceiling; /* end of x lists */ - for (y = first_y; y != last_y; y++) /* scan all xlists */ - { - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - from = sp_intercepts.car[i]; - j = i; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { -#if DEBUG - printf("****** proc_intercepts: odd number of intercepts in x list\n"); -#endif - break; - } - to = sp_intercepts.car[i]; - k = sp_intercepts.cdr[i]; - if (((to >> sp_globals.pixshift) >= (from >> sp_globals.pixshift)) && - ((to - from) < (sp_globals.onepix + 1))) - { - from = ((fix31)to + (fix31)from - (fix31)sp_globals.onepix) >> (sp_globals.pixshift + 1); - if (from > sp_globals.y_band.band_max) - from = sp_globals.y_band.band_max; - if ((from -= sp_globals.y_band.band_min) < 0) - from = 0; - to = ((y - sp_globals.x_band.band_floor + sp_globals.x_band.band_min) - << sp_globals.pixshift) - + sp_globals.pixrnd; - sp_intercepts.car[j] = to; - sp_intercepts.car[i] = to + sp_globals.onepix; - sp_intercepts.cdr[i] = sp_intercepts.cdr[from]; - sp_intercepts.cdr[from] = j; - } - i = k; - } - } - } -#if DEBUG -printf("\nIntercept lists:\n"); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_array_offset; - -local_bmap_xmin = sp_globals.xmin << sp_globals.pixshift; -local_bmap_xmax = (sp_globals.xmax << sp_globals.pixshift) + sp_globals.pixrnd; - -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - local_bmap_xmin) < 0) - from = 0; /* Clip to xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.bmap_xmax) - to = sp_globals.bmap_xmax - local_bmap_xmin; /* Clip to xmax boundary */ - else - to -= local_bmap_xmin; - printf(" Y = %2d (scanline %2d): %3.4f %3.4f:\n", - y + sp_globals.y_band.band_min, - scan_line, - (real)from / (real)sp_globals.onepix, - (real)to / (real)sp_globals.onepix); - } - } -#endif - -/* Draw the image */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - local_bmap_xmin) < 0) - from = 0; /* Clip to xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - - if ((to = sp_intercepts.car[i]) > local_bmap_xmax) - to = sp_globals.bmap_xmax - local_bmap_xmin; /* Clip to xmax boundary */ - else - to -= local_bmap_xmin; -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - continue; - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - continue; - if (to > xmax) - to = xmax; - } -#endif - if ( (to - from) <= sp_globals.onepix) - { - from = (to + from - sp_globals.onepix) >> (sp_globals.pixshift + 1); - set_bitmap_bits(scan_line, from, from + 1); - } - else - { - set_bitmap_bits(scan_line, from >> sp_globals.pixshift, to >> sp_globals.pixshift); - } - } - } -} - -#endif diff --git a/nx-X11/lib/font/Speedo/out_blk.c b/nx-X11/lib/font/Speedo/out_blk.c deleted file mode 100644 index a5b669b2a..000000000 --- a/nx-X11/lib/font/Speedo/out_blk.c +++ /dev/null @@ -1,706 +0,0 @@ -/* $Xorg: out_blk.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_blk.c,v 1.2 1999/02/07 06:18:16 dawes Exp $ */ - - -/*************************** O U T _ B L K . C ********************************* - * * - * This is an output module for black-writer mode. * - * * - *****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 -#define LOCAL static -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -#if INCL_BLACK -static void sp_add_intercept_black(PROTO_DECL2 fix15 y, fix15 x); -static void sp_proc_intercepts_black(PROTO_DECL1); -#endif - - -#if INCL_BLACK -FUNCTION boolean init_black( -GDECL -specs_t GLOBALFAR *specsarg) -/* - * init_out0() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_BLK()\n"); -#endif -if (specsarg->flags & CURVES_OUT) - return FALSE; /* Curves out not supported */ -return (TRUE); -} -#endif - - -#if INCL_BLACK -FUNCTION boolean begin_char_black( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - */ -{ -#if DEBUG -printf("BEGIN_CHAR_BLACK(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -init_char_out(Psw,Pmin,Pmax); -return TRUE; -} -#endif - - -#if INCL_BLACK -FUNCTION void begin_contour_black( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR_BLACK(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -sp_globals.y_pxl = (sp_globals.y0_spxl + sp_globals.pixrnd) >> sp_globals.pixshift; -} -#endif - -#if INCL_BLACK -FUNCTION void line_black( -GDECL -point_t P1) -/* Called for each vector in the transformed character - */ -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc, i; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 x0,y0,x1,y1; /* PIX.FRAC start and endpoints */ - -x0 = sp_globals.x0_spxl; /* get start of line (== current point) */ -y0 = sp_globals.y0_spxl; -sp_globals.x0_spxl = x1 = P1.x; /* end of line */ -sp_globals.y0_spxl = y1 = P1.y; /* (also update current point to end of line) */ - -yc = sp_globals.y_pxl; /* current scan line = end of last line */ -sp_globals.y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ - - -#if DEBUG -printf("LINE_BLACK(%3.4f, %3.4f)\n", - (real)P1.x/(real)sp_globals.onepix, - (real)P1.y/(real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (sp_globals.intercept_oflo) return; - -if ((how_many_y = sp_globals.y_pxl - yc) == 0) return; /* Don't draw a null line */ - -if (how_many_y < 0) yc--; /* Predecrment downward lines */ - -if (yc > sp_globals.y_band.band_max) /* Is start point above band? */ - { - if (sp_globals.y_pxl > sp_globals.y_band.band_max) return; /* line has to go down! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_max) - 1; /* Yes, limit it */ - } - -if (yc < sp_globals.y_band.band_min) /* Is start point below band? */ - { - if (sp_globals.y_pxl < sp_globals.y_band.band_min) return; /* line has to go up! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_min); /* Yes, limit it */ - } - -xc = (fix31)(x0 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); /* Original x coordinate with built in */ - /* rounding. 16.16 form */ - - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - temp1 = (fix15)(xc >> 16); - if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - for (i = yc; i >= how_many_y; i--) - sp_add_intercept_black(i,temp1); - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - for (i = yc; i != how_many_y; i++) - sp_add_intercept_black(i,temp1); - } - return; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independant. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)0xFFFF) && - (temp2 != 0x0000) && - /* Overflow. Pick point closest to yc + .5 */ - (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) ) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } -else - { -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we shift it to be a 16.16 delta */ - - xc += ((fix31)temp1 * dx_dy) >> sp_globals.pixshift; - } - -yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if (how_many_y == -1) - sp_add_intercept_black(yc, (fix15) (xc >> 16)); - else - { - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - for (i = yc; i >= how_many_y; i--) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_black(i,temp1); - xc -= dx_dy; - } - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if (how_many_y == 1) - sp_add_intercept_black(yc, (fix15) (xc >> 16)); - else - { - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - for (i = yc; i != how_many_y; i++) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_black(i,temp1); - xc += dx_dy; - } - } - } -} -#endif -#if INCL_BLACK -FUNCTION boolean end_char_black() -GDECL -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; -#if INCL_CLIPPING -fix31 bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR_BLACK()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_black(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_black(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_BLACK -FUNCTION LOCAL void sp_add_intercept_black( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix15 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; - -#if DEBUG -printf(" Add intercept(%2d, %d)\n", y + sp_globals.y_band.band_min,x); - -/* Bounds checking IS done in debug mode */ -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } - -if (y > (sp_globals.no_y_lists - 1)) /* Y value above top of current band? */ - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = x; - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) >= sp_globals.first_offset) /* Until to == end of list */ - { - if (x <= sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "sp_globals.next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_BLACK -FUNCTION LOCAL void sp_proc_intercepts_black() -GDECL - -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries - */ -{ -register fix15 i; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 first_y, last_y; - -#if DEBUG -printf("\nIntercept lists:\n"); -#endif - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax; - xmin = sp_globals.clip_xmin; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to sp_globals.ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_min; -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* Draw the image */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - if (from >= to) - { - if (from >= sp_globals.xmax - sp_globals.xmin) - { - --from ; - } - to = from+1; - } -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - continue; - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - continue; - if (to > xmax) - to = xmax; - } -#endif - set_bitmap_bits(scan_line, from, to); - } - } -} - -#endif - - - - diff --git a/nx-X11/lib/font/Speedo/out_outl.c b/nx-X11/lib/font/Speedo/out_outl.c deleted file mode 100644 index 013901092..000000000 --- a/nx-X11/lib/font/Speedo/out_outl.c +++ /dev/null @@ -1,290 +0,0 @@ -/* $Xorg: out_outl.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - - -/**************************** O U T _ 2 _ 1 . C ****************************** - * * - * This is the standard output module for vector output mode. * - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/* the following macro is used to limit points on the outline to the bounding box */ - -#define RANGECHECK(value,min,max) (((value) >= (min) ? (value) : (min)) < (max) ? (value) : (max)) -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - - -#if INCL_OUTLINE -FUNCTION boolean init_outline(specsarg) -GDECL -specs_t GLOBALFAR *specsarg; -/* - * init_out2() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_OUT_2()\n"); -#endif -if (specsarg->flags & (CLIP_LEFT + CLIP_RIGHT + CLIP_TOP + CLIP_BOTTOM)) - return FALSE; /* Clipping not supported */ -return (TRUE); -} -#endif - -#if INCL_OUTLINE -FUNCTION boolean begin_char_outline(Psw, Pmin, Pmax) -GDECL -point_t Psw; /* End of escapement vector (sub-pixels) */ -point_t Pmin; /* Bottom left corner of bounding box */ -point_t Pmax; /* Top right corner of bounding box */ -/* - * If two or more output modules are included in the configuration, begin_char2() - * is called by begin_char() to signal the start of character output data. - * If only one output module is included in the configuration, begin_char() is - * called by make_simp_char() and make_comp_char(). - */ -{ -fix31 set_width_x; -fix31 set_width_y; -fix31 xmin; -fix31 xmax; -fix31 ymin; -fix31 ymax; - -#if DEBUG -printf("BEGIN_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix, - (real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix, - (real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix); -#endif -sp_globals.poshift = 16 - sp_globals.pixshift; -set_width_x = (fix31)Psw.x << sp_globals.poshift; -set_width_y = (fix31)Psw.y << sp_globals.poshift; -xmin = (fix31)Pmin.x << sp_globals.poshift; -xmax = (fix31)Pmax.x << sp_globals.poshift; -ymin = (fix31)Pmin.y << sp_globals.poshift; -ymax = (fix31)Pmax.y << sp_globals.poshift; -sp_globals.xmin = Pmin.x; -sp_globals.xmax = Pmax.x; -sp_globals.ymin = Pmin.y; -sp_globals.ymax = Pmax.y; -open_outline(set_width_x, set_width_y, xmin, xmax, ymin, ymax); -return TRUE; -} -#endif - -#if INCL_OUTLINE -FUNCTION void begin_sub_char_outline(Psw, Pmin, Pmax) -GDECL -point_t Psw; /* End of sub-char escapement vector */ -point_t Pmin; /* Bottom left corner of sub-char bounding box */ -point_t Pmax; /* Top right corner of sub-char bounding box */ -/* - * If two or more output modules are included in the configuration, begin_sub_char2() - * is called by begin_sub_char() to signal the start of sub-character output data. - * If only one output module is included in the configuration, begin_sub_char() is - * called by make_comp_char(). - */ -{ -#if DEBUG -printf("BEGIN_SUB_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix, - (real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix, - (real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix); -#endif -start_new_char(); -} -#endif - - -#if INCL_OUTLINE -FUNCTION void begin_contour_outline(P1, outside) -GDECL -point_t P1; /* Start point of contour */ -boolean outside; /* TRUE if outside (counter-clockwise) contour */ -/* - * If two or more output modules are included in the configuration, begin_contour2() - * is called by begin_contour() to define the start point of a new contour - * and to indicate whether it is an outside (counter-clockwise) contour - * or an inside (clockwise) contour. - * If only one output module is included in the configuration, begin_sub_char() is - * called by proc_outl_data(). - */ -{ -fix15 x,y; -#if DEBUG -printf("BEGIN_CONTOUR_2(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)onepix, (real)P1.y / (real)onepix, outside? "outside": "inside"); -#endif -x = RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y = RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -start_contour((fix31)x << sp_globals.poshift, (fix31)y << sp_globals.poshift, outside); -} -#endif - -#if INCL_OUTLINE -FUNCTION void curve_outline(P1, P2, P3,depth) -GDECL -point_t P1; /* First control point of Bezier curve */ -point_t P2; /* Second control point of Bezier curve */ -point_t P3; /* End point of Bezier curve */ -fix15 depth; -/* - * If two or more output modules are included in the configuration, curve2() - * is called by curve() to output one curve segment. - * If only one output module is included in the configuration, curve() is - * called by proc_outl_data(). - * This function is only called when curve output is enabled. - */ -{ -fix15 x1,y1,x2,y2,x3,y3; -#if DEBUG -printf("CURVE_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)onepix, (real)P1.y / (real)onepix, - (real)P2.x / (real)onepix, (real)P2.y / (real)onepix, - (real)P3.x / (real)onepix, (real)P3.y / (real)onepix); -#endif -x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -x2= RANGECHECK(P2.x,sp_globals.xmin,sp_globals.xmax); -y2= RANGECHECK(P2.y,sp_globals.ymin,sp_globals.ymax); - -x3= RANGECHECK(P3.x,sp_globals.xmin,sp_globals.xmax); -y3= RANGECHECK(P3.y,sp_globals.ymin,sp_globals.ymax); - -curve_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift, - (fix31)x2<< sp_globals.poshift, (fix31)y2 << sp_globals.poshift, - (fix31)x3 << sp_globals.poshift, (fix31)y3 << sp_globals.poshift); -} -#endif - -#if INCL_OUTLINE -FUNCTION void line_outline(P1) -GDECL -point_t P1; /* End point of vector */ -/* - * If two or more output modules are included in the configuration, line2() - * is called by line() to output one vector. - * If only one output module is included in the configuration, line() is - * called by proc_outl_data(). If curve output is enabled, line() is also - * called by split_curve(). - */ -{ -fix15 x1,y1; -#if DEBUG -printf("LINE_2(%3.1f, %3.1f)\n", (real)P1.x / (real)onepix, (real)P1.y / (real)onepix); -#endif -x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -line_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift); -} -#endif - -#if INCL_OUTLINE -FUNCTION void end_contour_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_contour2() - * is called by end_contour() to signal the end of a contour. - * If only one output module is included in the configuration, end_contour() is - * called by proc_outl_data(). - */ -{ -#if DEBUG -printf("END_CONTOUR_2()\n"); -#endif -close_contour(); -} -#endif - - -#if INCL_OUTLINE -FUNCTION void end_sub_char_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_sub_char2() - * is called by end_sub_char() to signal the end of sub-character data. - * If only one output module is included in the configuration, end_sub_char() is - * called by make_comp_char(). - */ -{ -#if DEBUG -printf("END_SUB_CHAR_2()\n"); -#endif -} -#endif - - -#if INCL_OUTLINE -FUNCTION boolean end_char_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_char2() - * is called by end_char() to signal the end of the character data. - * If only one output module is included in the configuration, end_char() is - * called by make_simp_char() and make_comp_char(). - * Returns TRUE if output process is complete - * Returns FALSE to repeat output of the transformed data beginning - * with the first contour (of the first sub-char if compound). - */ -{ -#if DEBUG -printf("END_CHAR_2()\n"); -#endif -close_outline(); -return TRUE; -} -#endif - diff --git a/nx-X11/lib/font/Speedo/out_scrn.c b/nx-X11/lib/font/Speedo/out_scrn.c deleted file mode 100644 index 0ea3b1976..000000000 --- a/nx-X11/lib/font/Speedo/out_scrn.c +++ /dev/null @@ -1,1090 +0,0 @@ -/* $Xorg: out_scrn.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_scrn.c,v 1.4 1999/12/27 00:39:25 robin Exp $ */ - - -/*************************** O U T _ S C R N . C ***************************** - * * - * This is an output module for screen-writer mode. * - * * - *****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 -#define LOCAL static -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_add_intercept_screen(PROTO_DECL2 fix15 y,fix31 x); -static void sp_proc_intercepts_screen(PROTO_DECL1); - - -#if INCL_SCREEN -FUNCTION boolean init_screen( -GDECL -specs_t FONTFAR *specsarg) -/* - * init_out0() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_SCREEN()\n"); -#endif -return (TRUE); -} -#endif - - -#if INCL_SCREEN -FUNCTION boolean begin_char_screen( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - */ -{ -#if DEBUG -printf("BEGIN_CHAR_SCREEN(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -if (sp_globals.pixshift > 8) - sp_intercepts.fracpix = sp_globals.onepix << (8 - sp_globals.pixshift); -else - sp_intercepts.fracpix = sp_globals.onepix >> (sp_globals.pixshift - 8); - -init_char_out(Psw,Pmin,Pmax); - -return TRUE; -} -#endif - - -#if INCL_SCREEN -FUNCTION void begin_contour_screen( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR_SCREEN(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -sp_globals.y_pxl = (sp_globals.y0_spxl + sp_globals.pixrnd) >> sp_globals.pixshift; -} -#endif - -#if INCL_SCREEN -FUNCTION void curve_screen( -GDECL -point_t P1, point_t P2, point_t P3, -fix15 depth) -{ -fix31 X0; -fix31 Y0; -fix31 X1; -fix31 Y1; -fix31 X2; -fix31 Y2; -fix31 X3; -fix31 Y3; -#if DEBUG -printf("CURVE_SCREEN(%6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif - - -if (sp_globals.extents_running) /* Accumulate actual character extents if required */ - { - if (P3.x > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = P3.x; - if (P3.x < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = P3.x; - if (P3.y > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = P3.y; - if (P3.y < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = P3.y; - } - -X0 = ((fix31)sp_globals.x0_spxl << sp_globals.poshift) + (fix31)32768; -Y0 = ((fix31)sp_globals.y0_spxl << sp_globals.poshift) + (fix31)32768; -X1 = ((fix31)P1.x << sp_globals.poshift) + (fix31)32768; -Y1 = ((fix31)P1.y << sp_globals.poshift) + (fix31)32768; -X2 = ((fix31)P2.x << sp_globals.poshift) + (fix31)32768; -Y2 = ((fix31)P2.y << sp_globals.poshift) + (fix31)32768; -X3 = ((fix31)P3.x << sp_globals.poshift) + (fix31)32768; -Y3 = ((fix31)P3.y << sp_globals.poshift) + (fix31)32768; - -if (((Y0 - Y3) * sp_globals.tcb.mirror) > 0) - { - sp_intercepts.leftedge = LEFT_INT; - } -else - { - sp_intercepts.leftedge = 0; - } - -scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3); -sp_globals.x0_spxl = P3.x; -sp_globals.y0_spxl = P3.y; -sp_globals.y_pxl = (P3.y + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ -} - -FUNCTION void scan_curve_screen( -GDECL -fix31 X0, fix31 Y0, fix31 X1, fix31 Y1, fix31 X2, fix31 Y2, fix31 X3, fix31 Y3) -/* Called for each curve in the transformed character if curves out enabled - */ -{ -fix31 Pmidx; -fix31 Pmidy; -fix31 Pctrl1x; -fix31 Pctrl1y; -fix31 Pctrl2x; -fix31 Pctrl2y; - -#ifdef DBGCRV -printf("SCAN_CURVE_SCREEN(%6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f)\n", - (real)(X0-32768) / 65536.0, (real)(Y0-32768) / 65536.0, - (real)(X1-32768) / 65536.0, (real)(Y1-32768) / 65536.0, - (real)(X2-32768) / 65536.0, (real)(Y2-32768) / 65536.0, - (real)(X3-32768) / 65536.0, (real)(Y3-32768) / 65536.0); -#endif - -if (((Y3 >> 16)) == (Y0 >> 16) || (Y3+1) == Y0 || Y3 == (Y0+1)) - { - return; - } -if ((X3 >> 16) == (X0 >> 16)) - { - vert_line_screen(X3,(fix15)(Y0>>16),(fix15)(Y3>>16)); - return; - } -Pmidx = (X0 + (X1 + X2) * 3 + X3 + 4 ) >> 3; -Pmidy = (Y0 + (Y1 + Y2) * 3 + Y3 + 4 ) >> 3; - -Pctrl1x = (X0 + X1 + 1 ) >> 1; -Pctrl1y = (Y0 + Y1 + 1) >> 1; -Pctrl2x = (X0 + (X1 << 1) + X2 + 2 ) >> 2; -Pctrl2y = (Y0 + (Y1 << 1) + Y2 + 2 ) >> 2; -scan_curve_screen(X0,Y0, Pctrl1x, Pctrl1y, Pctrl2x,Pctrl2y, Pmidx,Pmidy); - -Pctrl1x = (X1 + (X2 << 1) + X3 + 2 ) >> 2; -Pctrl1y = (Y1 + (Y2 << 1) + Y3 + 2 ) >> 2; -Pctrl2x = (X2 + X3 + 1 ) >> 1; -Pctrl2y = (Y2 + Y3 + 1 ) >> 1; -scan_curve_screen(Pmidx,Pmidy, Pctrl1x,Pctrl1y, Pctrl2x,Pctrl2y, X3,Y3); -} - -FUNCTION void vert_line_screen( -GDECL -fix31 x, -fix15 y1, fix15 y2) -{ - -#ifdef DBGCRV -printf("VERT_LINE_SCREEN(%6.4f, %6.4f, %6.4f)\n", - (real)(x - 32768) / 65536.0, - (real)(y1 - 32768) / 65536.0, - (real)(y2 - 32768) / 65536.0); -#endif - -if (sp_globals.intercept_oflo) - return; - -if (y1 > y2) /* Line goes downwards ? */ - { - if (y1 > (sp_globals.y_band.band_max + 1)) /* Start point above top of band? */ - y1 = sp_globals.y_band.band_max + 1; /* Adjust start point to top of band */ - if (y2 < sp_globals.y_band.band_min) /* End point below bottom of band? */ - y2 = sp_globals.y_band.band_min; /* Adjust end point bottom of band */ - - y1 -= sp_globals.y_band.band_min; /* Translate start point to band origin */ - y2 -= sp_globals.y_band.band_min; /* Translate end point to band origin */ - - while (y2 < y1) /* At least one intercept left? */ - { - sp_add_intercept_screen(--y1, x); /* Add intercept */ - } - } -else if (y2 > y1) /* Line goes upwards ? */ - { - if (y1 < sp_globals.y_band.band_min) /* Start point below bottom of band? */ - y1 = sp_globals.y_band.band_min; /* Adjust start point to bottom of band */ - if (y2 > (sp_globals.y_band.band_max + 1)) /* End point above top of band? */ - y2 = sp_globals.y_band.band_max + 1; /* Adjust end point to top of band */ - - y1 -= sp_globals.y_band.band_min; /* Translate start point to band origin */ - y2 -= sp_globals.y_band.band_min; /* Translate end point to band origin */ - - while (y1 < y2) /* At least one intercept left? */ - { - sp_add_intercept_screen(y1++, x); /* Add intercept */ - } - } - - -} - -#endif - - -#if INCL_SCREEN -FUNCTION void line_screen( -GDECL -point_t P1) -/* Called for each vector in the transformed character - */ -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 x0,y0,x1,y1; /* PIX.FRAC start and endpoints */ - -x0 = sp_globals.x0_spxl; /* get start of line (== current point) */ -y0 = sp_globals.y0_spxl; -sp_globals.x0_spxl = x1 = P1.x; /* end of line */ -sp_globals.y0_spxl = y1 = P1.y; /* (also update current point to end of line) */ - -yc = sp_globals.y_pxl; /* current scan line = end of last line */ -sp_globals.y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ - - -#if DEBUG -printf("LINE_SCREEN(%3.4f, %3.4f)\n", - (real)P1.x/(real)sp_globals.onepix, - (real)P1.y/(real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (sp_globals.intercept_oflo) return; - -if ((how_many_y = sp_globals.y_pxl - yc) == 0) return; /* Don't draw a null line */ - -xc = (fix31)(x0 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); /* Original x coordinate with built in */ - /* rounding. 16.16 form */ - -if (how_many_y < 0) - { - yc--; /* Predecrment downward lines */ - } - -if ((how_many_y * sp_globals.tcb.mirror) < 0) - { - sp_intercepts.leftedge = LEFT_INT; - } -else - { - sp_intercepts.leftedge = 0; - } - -if (yc > sp_globals.y_band.band_max) /* Is start point above band? */ - { - if (sp_globals.y_pxl > sp_globals.y_band.band_max) return; /* line has to go down! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_max) - 1; /* Yes, limit it */ - } - -if (yc < sp_globals.y_band.band_min) /* Is start point below band? */ - { - if (sp_globals.y_pxl < sp_globals.y_band.band_min) return; /* line has to go up! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_min); /* Yes, limit it */ - } - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - dx_dy = 0L; /* Zero slope, leave xc alone */ - goto skip_calc; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independant. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)-1) && - (temp2 != 0x0000) ) - { /* Overflow. Pick point closest to yc + .5 */ - if (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } - goto skip_calc; - } -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we shift it to be a 16.16 delta */ - -xc += ((fix31)temp1 * dx_dy) >> sp_globals.pixshift; - -skip_calc: - -yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - while(yc >= how_many_y) - { - sp_add_intercept_screen(yc--,xc); - xc -= dx_dy; - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - while(yc != how_many_y) - { - sp_add_intercept_screen(yc++,xc); - xc += dx_dy; - } - } -} -#endif - -#if INCL_SCREEN -FUNCTION void end_contour_screen() -GDECL -/* Called after the last vector in each contour - */ -{ -#if DEBUG -printf("END_CONTOUR_SCREEN()\n"); -#endif -sp_intercepts.inttype[sp_globals.next_offset-1] |= END_INT; -} -#endif - - - -#if INCL_SCREEN -FUNCTION boolean end_char_screen() -GDECL -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; - -#if INCL_CLIPPING -fix31 em_max, em_min, bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR_SCREEN()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_screen(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_screen(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_SCREEN -FUNCTION LOCAL void sp_add_intercept_screen( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix31 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; -register fix15 xloc; -register fix15 xfrac; - -#if DEBUG -printf(" Add intercept(%2d, %x)\n", y + sp_globals.y_band.band_min, x); - -/* Bounds checking IS done in debug mode */ -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } - -if (y > (sp_globals.no_y_lists - 1)) /* Y value above top of current band? */ - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = xloc = (fix15)(x >> 16); -sp_intercepts.inttype[sp_globals.next_offset] = sp_intercepts.leftedge | (xfrac = ((x >> 8) & FRACTION)); - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) != 0) /* Until to == end of list */ - { - if (xloc < sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - else if (xloc == sp_intercepts.car[to] && xfrac < (sp_intercepts.inttype[to] & FRACTION)) - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "sp_globals.next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_SCREEN -FUNCTION LOCAL void sp_proc_intercepts_screen() -GDECL - -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries - */ -{ -register fix15 i,j, jplus1, iminus1; -fix15 k,nextk, previ; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 first_y, last_y; - fix15 xsave; - - -fix15 diff; - -#if DEBUG -printf("\nPROC_INTERCEPTS_SCREEN: Intercept lists before:\n"); -#endif - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax + sp_globals.xmin; - xmin = sp_globals.clip_xmin + sp_globals.xmin; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to sp_globals.ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_min; - -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* CHECK INTERCEPT LIST FOR DROPOUT AND WINDING, FIX IF NECESSARY */ - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--) - { - previ = y; - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - j = i; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (sp_intercepts.inttype[i] & LEFT_INT) - { - if (sp_intercepts.inttype[j] & LEFT_INT) - { - do { i = sp_intercepts.cdr[i]; } while (sp_intercepts.inttype[i] & LEFT_INT); - do { i = sp_intercepts.cdr[i]; } while (sp_intercepts.cdr[i] && !(sp_intercepts.inttype[sp_intercepts.cdr[i]] & LEFT_INT)); - sp_intercepts.cdr[j] = i; - } - else - { - xsave = sp_intercepts.car[j]; - sp_intercepts.car[j] = sp_intercepts.car[i]; - sp_intercepts.car[i] = xsave; - - xsave = sp_intercepts.inttype[j]; - sp_intercepts.inttype[j] = sp_intercepts.inttype[i] & FRACTION; - sp_intercepts.inttype[i] = xsave | LEFT_INT; - - sp_intercepts.cdr[previ] = i; - sp_intercepts.cdr[j] = sp_intercepts.cdr[i]; - sp_intercepts.cdr[i] = j; - i = j; - j = sp_intercepts.cdr[previ]; - } - } - - if (sp_intercepts.car[j] < sp_globals.xmin) - sp_intercepts.car[j] = sp_globals.xmin; /* Clip to sp_globals.xmin boundary */ - - if (sp_intercepts.car[i] > sp_globals.xmax) - sp_intercepts.car[i] = sp_globals.xmax; - - if (sp_intercepts.car[j] >= sp_intercepts.car[i]) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + (ufix16)(sp_intercepts.inttype[i] & FRACTION) > sp_intercepts.fracpix) - ++sp_intercepts.car[i]; - else - --sp_intercepts.car[j]; - } - if (sp_globals.first_pass) - { - if (sp_intercepts.inttype[i-1] & END_INT) - { - for (iminus1 = i+1; !(sp_intercepts.inttype[iminus1] & END_INT); iminus1++) - ; - } - else - iminus1 = i-1; - - if (sp_intercepts.inttype[j] & END_INT) - { - for (jplus1 = j-1; !(sp_intercepts.inttype[jplus1] & END_INT); jplus1--) - ; - jplus1++; - } - else - jplus1 = j+1; - - if ((sp_intercepts.inttype[iminus1] & LEFT_INT)) - { - if ( sp_intercepts.car[jplus1] > sp_intercepts.car[i]) - { - diff = sp_intercepts.car[jplus1] - sp_intercepts.car[i]; - sp_intercepts.car[i] += diff/2; - sp_intercepts.car[jplus1] -= diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[i] & FRACTION) + (ufix16)(sp_intercepts.inttype[jplus1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i] ++; - else - sp_intercepts.car[jplus1]--; - } - } - } - else if (!(sp_intercepts.inttype[jplus1] & LEFT_INT)) - { - if (sp_intercepts.car[iminus1] < sp_intercepts.car[j]) - { - diff = sp_intercepts.car[j] - sp_intercepts.car[iminus1]; - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[iminus1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + - (ufix16)(sp_intercepts.inttype[iminus1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[iminus1]++; - else - sp_intercepts.car[j]--; - } - } - } - if (sp_globals.tcb.mirror == -1) - { - if (sp_intercepts.inttype[j-1] & END_INT) - { - for (jplus1 = j+1; !(sp_intercepts.inttype[jplus1] & END_INT); jplus1++) - ; - } - else - { - jplus1 = j-1; - } - } - - if (!(sp_intercepts.inttype[jplus1] & LEFT_INT) && - sp_intercepts.car[j] > sp_intercepts.car[jplus1]) - { - k = sp_intercepts.cdr[y - 1]; - while (k > 0) - { - nextk = sp_intercepts.cdr[k]; - if (!(sp_intercepts.inttype[k] & LEFT_INT) && - (sp_intercepts.inttype[nextk] & LEFT_INT) && - sp_intercepts.car[nextk] > sp_intercepts.car[jplus1]) - { - if ((diff=sp_intercepts.car[j] - sp_intercepts.car[k]) > 0) - { - if (diff <= (sp_intercepts.car[nextk] - sp_intercepts.car[jplus1])) - { - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[k] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + - (ufix16)(sp_intercepts.inttype[k] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[j]--; - else - sp_intercepts.car[k]++; - } - } - else - { - diff = sp_intercepts.car[nextk] - sp_intercepts.car[jplus1]; - sp_intercepts.car[nextk] -= diff/2; - sp_intercepts.car[jplus1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[jplus1] & FRACTION) + - (ufix16)(sp_intercepts.inttype[nextk] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[nextk]--; - else - sp_intercepts.car[jplus1]++; - } - } - } - break; - } - k = nextk; - } - } - if (j > 0 && sp_intercepts.car[j-1] > sp_intercepts.car[i] && !(sp_intercepts.inttype[j-1] & END_INT)) - { - diff = sp_intercepts.car[j-1] - sp_intercepts.car[i]; - sp_intercepts.car[i] += diff/2; - sp_intercepts.car[j-1] -= diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[i] & FRACTION) + (ufix16)(sp_intercepts.inttype[j-1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i]++; - else - sp_intercepts.car[j-1]--; - } - } - if (sp_intercepts.car[i+1] < sp_intercepts.car[j] && !(sp_intercepts.inttype[i] & END_INT)) - { - diff = sp_intercepts.car[j] - sp_intercepts.car[i+1]; - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[i+1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + (ufix16)(sp_intercepts.inttype[i+1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i+1]++; - else - sp_intercepts.car[j]--; - } - - } - previ = i; - } - i = sp_intercepts.cdr[i]; - } - } - -#if DEBUG -printf("\nPROC_INTERCEPTS_SCREEN: Intercept lists after:\n"); -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* INTERCEPTS ALL PATCHED, NOW DRAW THE IMAGE */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - from = sp_intercepts.car[i]; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - to = sp_intercepts.car[i]; -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - { - i = sp_intercepts.cdr[i]; - continue; - } - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - { - i = sp_intercepts.cdr[i]; - continue; - } - if (to > xmax) - to = xmax; - } -#endif - set_bitmap_bits(scan_line, from-sp_globals.xmin, to-sp_globals.xmin); - i = sp_intercepts.cdr[i]; - } - } -} - -#endif diff --git a/nx-X11/lib/font/Speedo/out_util.c b/nx-X11/lib/font/Speedo/out_util.c deleted file mode 100644 index 171241030..000000000 --- a/nx-X11/lib/font/Speedo/out_util.c +++ /dev/null @@ -1,341 +0,0 @@ -/* $Xorg: out_util.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_util.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#define DEBUG 0 - -/*************************** O U T _ U T I L . C ***************************** - * * - * This is a utility module share by all bitmap output modules * - * * - *****************************************************************************/ - - -#include "spdo_prv.h" /* General definitions for Speedo */ -/* absolute value function */ -#define ABS(X) ( (X < 0) ? -X : X) -#if INCL_BLACK || INCL_2D || INCL_SCREEN - -FUNCTION void init_char_out( -GDECL -point_t Psw, point_t Pmin, point_t Pmax) -{ -sp_globals.set_width.x = (fix31)Psw.x << sp_globals.poshift; -sp_globals.set_width.y = (fix31)Psw.y << sp_globals.poshift; -set_first_band_out(Pmin, Pmax); -init_intercepts_out(); -if (sp_globals.normal) - { - sp_globals.bmap_xmin = Pmin.x; - sp_globals.bmap_xmax = Pmax.x; - sp_globals.bmap_ymin = Pmin.y; - sp_globals.bmap_ymax = Pmax.y; - sp_globals.extents_running = FALSE; - } -else - { - sp_globals.bmap_xmin = 32000; - sp_globals.bmap_xmax = -32000; - sp_globals.bmap_ymin = 32000; - sp_globals.bmap_ymax = -32000; - sp_globals.extents_running = TRUE; - } -sp_globals.first_pass = TRUE; -} - -FUNCTION void begin_sub_char_out( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called at the start of each sub-character in a composite character - */ -{ -#if DEBUG -printf("BEGIN_SUB_CHAR_out(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -restart_intercepts_out(); -if (!sp_globals.extents_running) - { - sp_globals.bmap_xmin = 32000; - sp_globals.bmap_xmax = -32000; - sp_globals.bmap_ymin = 32000; - sp_globals.bmap_ymax = -32000; - sp_globals.extents_running = TRUE; - } -} - -FUNCTION void curve_out( -GDECL -point_t P1, point_t P2, point_t P3, -fix15 depth) -/* Called for each curve in the transformed character if curves out enabled - */ -{ -#if DEBUG -printf("CURVE_OUT(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif -} - - - -FUNCTION void end_contour_out() -GDECL -/* Called after the last vector in each contour - */ -{ -#if DEBUG -printf("END_CONTOUR_OUT()\n"); -#endif -} - - -FUNCTION void end_sub_char_out() -GDECL -/* Called after the last contour in each sub-character in a compound character - */ -{ -#if DEBUG -printf("END_SUB_CHAR_OUT()\n"); -#endif -} - - -FUNCTION void init_intercepts_out() -GDECL -/* Called to initialize intercept storage data structure - */ - -{ -fix15 i; -fix15 no_lists; - -#if DEBUG -printf(" Init intercepts (Y band from %d to %d)\n", sp_globals.y_band.band_min, sp_globals.y_band.band_max); -if (sp_globals.x_scan_active) - printf(" (X band from %d to %d)\n", sp_globals.x_band.band_min, sp_globals.x_band.band_max); -#endif - -sp_globals.intercept_oflo = FALSE; - -sp_globals.no_y_lists = sp_globals.y_band.band_max - sp_globals.y_band.band_min + 1; -#if INCL_2D -if (sp_globals.output_mode == MODE_2D) - { - sp_globals.no_x_lists = sp_globals.x_scan_active ? - sp_globals.x_band.band_max - sp_globals.x_band.band_min + 1 : 0; - no_lists = sp_globals.no_y_lists + sp_globals.no_x_lists; - } -else -#endif - no_lists = sp_globals.no_y_lists; - -#if INCL_2D -sp_globals.y_band.band_floor = 0; -sp_globals.y_band.band_ceiling = sp_globals.no_y_lists; -#endif - -if (no_lists >= MAX_INTERCEPTS) /* Not enough room for list table? */ - { - no_lists = sp_globals.no_y_lists = MAX_INTERCEPTS; - sp_globals.intercept_oflo = TRUE; - sp_globals.y_band.band_min = sp_globals.y_band.band_max - sp_globals.no_y_lists + 1; -#if INCL_2D - sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; - sp_globals.y_band.band_ceiling = sp_globals.no_y_lists; - sp_globals.no_x_lists = 0; - sp_globals.x_scan_active = FALSE; -#endif - } - -for (i = 0; i < no_lists; i++) /* For each active value... */ - { -#if INCL_SCREEN - if (sp_globals.output_mode == MODE_SCREEN) - sp_intercepts.inttype[i]=0; -#endif - sp_intercepts.cdr[i] = 0; /* Mark each intercept list empty */ - } - -sp_globals.first_offset = sp_globals.next_offset = no_lists; - -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -sp_globals.x_band.band_array_offset = sp_globals.x_band.band_min - sp_globals.no_y_lists; -sp_globals.x_band.band_floor = sp_globals.no_y_lists; -sp_globals.x_band.band_ceiling = no_lists; -#endif -#if INCL_SCREEN -sp_intercepts.inttype[sp_globals.no_y_lists-1] = END_INT; -#endif - -} - - -FUNCTION void restart_intercepts_out() -GDECL - -/* Called by sp_make_char when a new sub character is started - * Freezes current sorted lists - */ - -{ - -#if DEBUG -printf(" Restart intercepts:\n"); -#endif -sp_globals.first_offset = sp_globals.next_offset; -} - - - -FUNCTION void set_first_band_out( -GDECL -point_t Pmin, -point_t Pmax) -{ - -sp_globals.ymin = Pmin.y; -sp_globals.ymax = Pmax.y; - -sp_globals.ymin = (sp_globals.ymin - sp_globals.onepix + 1) >> sp_globals.pixshift; -sp_globals.ymax = (sp_globals.ymax + sp_globals.onepix - 1) >> sp_globals.pixshift; - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_ymin = -1* sp_globals.clip_ymin; - if (sp_globals.ymin < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - if (sp_globals.ymax > sp_globals.clip_ymax) - sp_globals.ymax = sp_globals.clip_ymax; - } - break; - case 2: /* 90 degree rotation */ - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - case 3: /* 270 degree rotation */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - if (sp_globals.ymax > sp_globals.clip_ymax) - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - if (sp_globals.ymin < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - } - break; - } -#endif -sp_globals.y_band.band_min = sp_globals.ymin; -sp_globals.y_band.band_max = sp_globals.ymax - 1; - -sp_globals.xmin = (Pmin.x + sp_globals.pixrnd) >> sp_globals.pixshift; -sp_globals.xmax = (Pmax.x + sp_globals.pixrnd) >> sp_globals.pixshift; - - -#if INCL_2D -sp_globals.x_band.band_min = sp_globals.xmin - 1; /* subtract one pixel of "safety margin" */ -sp_globals.x_band.band_max = sp_globals.xmax /* - 1 + 1 */; /* Add one pixel of "safety margin" */ -#endif -} - - - - - - - -FUNCTION void reduce_band_size_out() -GDECL -{ -sp_globals.y_band.band_min = sp_globals.y_band.band_max - ((sp_globals.y_band.band_max - sp_globals.y_band.band_min) >> 1); -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -#endif -} - - -FUNCTION boolean next_band_out() -GDECL -{ -fix15 tmpfix15; - -if (sp_globals.y_band.band_min <= sp_globals.ymin) - return FALSE; -tmpfix15 = sp_globals.y_band.band_max - sp_globals.y_band.band_min; -sp_globals.y_band.band_max = sp_globals.y_band.band_min - 1; -sp_globals.y_band.band_min = sp_globals.y_band.band_max - tmpfix15; -if (sp_globals.y_band.band_min < sp_globals.ymin) - sp_globals.y_band.band_min = sp_globals.ymin; -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -#endif -return TRUE; -} -#endif - diff --git a/nx-X11/lib/font/Speedo/reset.c b/nx-X11/lib/font/Speedo/reset.c deleted file mode 100644 index 4cb9f7de0..000000000 --- a/nx-X11/lib/font/Speedo/reset.c +++ /dev/null @@ -1,131 +0,0 @@ -/* $Xorg: reset.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/reset.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ - - - -/******************************* R E S E T . C ******************************* - * * - * This module provides initialization functions. * - * * - ****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ -#include "keys.h" /* Font decryption keys */ - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - - -FUNCTION void reset() -GDECL -/* - * Called by the host software to intialize the Speedo mechanism - */ -{ -sp_globals.specs_valid = FALSE; /* Flag specs not valid */ - -/* Reset decryption key */ -sp_globals.key32 = (KEY3 << 8) | KEY2; -sp_globals.key4 = KEY4; -sp_globals.key6 = KEY6; -sp_globals.key7 = KEY7; -sp_globals.key8 = KEY8; - -#if INCL_RULES -sp_globals.constr.font_id_valid = FALSE; -#endif - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -sp_globals.bitmap_device_set = FALSE; -#endif -#if INCL_OUTLINE -sp_globals.outline_device_set = FALSE; -#endif -#endif -} - -#if INCL_KEYS -FUNCTION void set_key( -GDECL -ufix8 key[]) /* Specified decryption key */ -/* - * Dynamically sets font decryption key. - */ -{ -sp_globals.key32 = ((ufix16)key[3] << 8) | key[2]; -sp_globals.key4 = key[4]; -sp_globals.key6 = key[6]; -sp_globals.key7 = key[7]; -sp_globals.key8 = key[8]; -} -#endif - - - -FUNCTION ufix16 get_cust_no( -GDECL -buff_t font_buff) -/* - returns customer number from font -*/ -{ -ufix8 FONTFAR *hdr2_org; -ufix16 private_off; - -private_off = read_word_u(font_buff.org + FH_HEDSZ); -if (private_off + FH_CUSNR > font_buff.no_bytes) - { - report_error(1); /* Insufficient font data loaded */ - return FALSE; - } - -hdr2_org = font_buff.org + private_off; - -return (read_word_u(hdr2_org + FH_CUSNR)); -} - - diff --git a/nx-X11/lib/font/Speedo/set_spcs.c b/nx-X11/lib/font/Speedo/set_spcs.c deleted file mode 100644 index b69b13f34..000000000 --- a/nx-X11/lib/font/Speedo/set_spcs.c +++ /dev/null @@ -1,773 +0,0 @@ -/* $Xorg: set_spcs.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - - -/*************************** S E T _ S P C S . C ***************************** - * * - * This module implements all sp_set_specs() functionality. * - * * - ****************************************************************************/ -#ifdef HAVE_CONFIG_H -#include -#endif -#define SET_SPCS -#include "spdo_prv.h" /* General definitions for Speedo */ -#include "keys.h" - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/****** EXTERNAL VARIABLES *****/ - -/***** STATIC VARIABLES *****/ - - -/****** STATIC FUNCTIONS *****/ - -static boolean sp_setup_consts(PROTO_DECL2 fix15 xmin, fix15 xmax, - fix15 ymin, fix15 ymax); -static void sp_setup_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb); -static fix15 sp_setup_mult(PROTO_DECL2 fix31 input_mult); -static fix31 sp_setup_offset(PROTO_DECL2 fix31 input_offset); - - - -FUNCTION boolean set_specs( -GDECL -specs_t STACKFAR *specsarg) /* Bundle of conversion specifications */ -/* - * Called by host software to set character generation specifications - */ -{ -fix31 offcd; /* Offset to start of character directory */ -fix31 ofcns; /* Offset to start of constraint data */ -fix31 cd_size; /* Size of character directory */ -fix31 no_bytes_min; /* Min number of bytes in font buffer */ -ufix16 font_id; /* Font ID */ -ufix16 private_off; /* offset to private header */ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 xmax; /* Maximum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ - -sp_globals.specs_valid = FALSE; /* Flag specs not valid */ - -sp_globals.specs = *specsarg; /* copy specs structure into sp_globals */ -sp_globals.pspecs = &sp_globals.specs; -sp_globals.font = *sp_globals.pspecs->pfont; -sp_globals.pfont = &sp_globals.font; -sp_globals.font_org = sp_globals.font.org; - -if (read_word_u(sp_globals.font_org + FH_FMVER + 4) != 0x0d0a) - { - report_error(4); /* Font format error */ - return FALSE; - } -if (read_word_u(sp_globals.font_org + FH_FMVER + 6) != 0x0000) - { - report_error(4); /* Font format error */ - return FALSE; - } - -if (get_cust_no(*specsarg->pfont) == 0) - { - sp_globals.key32 = 0; - sp_globals.key4 = 0; - sp_globals.key6 = 0; - sp_globals.key7 = 0; - sp_globals.key8 = 0; - } -else - { - sp_globals.key32 = (KEY3 << 8) | KEY2; - sp_globals.key4 = KEY4; - sp_globals.key6 = KEY6; - sp_globals.key7 = KEY7; - sp_globals.key8 = KEY8; - } - - -sp_globals.no_chars_avail = read_word_u(sp_globals.font_org + FH_NCHRF); - -/* Read sp_globals.orus per em from font header */ -sp_globals.orus_per_em = read_word_u(sp_globals.font_org + FH_ORUPM); - -/* compute address of private header */ -private_off = read_word_u(sp_globals.font_org + FH_HEDSZ); -sp_globals.hdr2_org = sp_globals.font_org + private_off; - -/* set metric resolution if specified, default to outline res otherwise */ -if (private_off > EXP_FH_METRES) - { - sp_globals.metric_resolution = read_word_u(sp_globals.font_org + EXP_FH_METRES); - } -else - { - sp_globals.metric_resolution = sp_globals.orus_per_em; - } - -#if INCL_METRICS -sp_globals.kern.tkorg = sp_globals.font_org + read_long(sp_globals.hdr2_org + FH_OFFTK); -sp_globals.kern.pkorg = sp_globals.font_org + read_long(sp_globals.hdr2_org + FH_OFFPK); -sp_globals.kern.no_tracks = read_word_u(sp_globals.font_org + FH_NKTKS); -sp_globals.kern.no_pairs = read_word_u(sp_globals.font_org + FH_NKPRS); -#endif - -offcd = read_long(sp_globals.hdr2_org + FH_OFFCD); /* Read offset to character directory */ -ofcns = read_long(sp_globals.hdr2_org + FH_OFCNS); /* Read offset to constraint data */ -cd_size = ofcns - offcd; -if ((((sp_globals.no_chars_avail << 1) + 3) != cd_size) && - (((sp_globals.no_chars_avail * 3) + 4) != cd_size)) - { - report_error(4); /* Font format error */ - return FALSE; - } - -#if INCL_LCD /* Dynamic character data load suppoorted? */ -#if INCL_METRICS -no_bytes_min = read_long(sp_globals.hdr2_org + FH_OCHRD); /* Offset to character data */ -#else /* Dynamic character data load not supported? */ -no_bytes_min = read_long(sp_globals.hdr2_org + FH_OFFTK); /* Offset to track kerning data */ -#endif -#else /* Dynamic character data load not supported? */ -no_bytes_min = read_long(sp_globals.hdr2_org + FH_NBYTE); /* Offset to EOF + 1 */ -#endif - -sp_globals.font_buff_size = sp_globals.pfont->no_bytes; -if (sp_globals.font_buff_size < no_bytes_min) /* Minimum data not loaded? */ - { - report_error(1); /* Insufficient font data loaded */ - return FALSE; - } - -sp_globals.pchar_dir = sp_globals.font_org + offcd; -sp_globals.first_char_idx = read_word_u(sp_globals.font_org + FH_FCHRF); - -/* Register font name with sp_globals.constraint mechanism */ -#if INCL_RULES -font_id = read_word_u(sp_globals.font_org + FH_FNTID); -if (!(sp_globals.constr.font_id_valid) || (sp_globals.constr.font_id != font_id)) - { - sp_globals.constr.font_id = font_id; - sp_globals.constr.font_id_valid = TRUE; - sp_globals.constr.data_valid = FALSE; - } -sp_globals.constr.org = sp_globals.font_org + ofcns; -sp_globals.constr.active = ((sp_globals.pspecs->flags & CONSTR_OFF) == 0); -#endif - -/* Set up sliding point constants */ -/* Set pixel shift to accomodate largest transformed pixel value */ -xmin = read_word_u(sp_globals.font_org + FH_FXMIN); -xmax = read_word_u(sp_globals.font_org + FH_FXMAX); -ymin = read_word_u(sp_globals.font_org + FH_FYMIN); -ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - -if (!sp_setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } -#if INCL_ISW -/* save the value of the max x oru that the fixed point constants are based on*/ -sp_globals.isw_xmax = xmax; -#endif - -/* Setup transformation control block */ -sp_setup_tcb(&sp_globals.tcb0); - - -/* Select output module */ -sp_globals.output_mode = sp_globals.pspecs->flags & 0x0007; - -#if INCL_USEROUT -if (!init_userout(sp_globals.pspecs)) -#endif - -switch (sp_globals.output_mode) - { -#if INCL_BLACK -case MODE_BLACK: /* Output mode 0 (Black writer) */ - sp_globals.init_out = sp_init_black; - sp_globals.begin_char = sp_begin_char_black; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_black; - sp_globals.curve = sp_curve_out; - sp_globals.line = sp_line_black; - sp_globals.end_contour = sp_end_contour_out; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_black; - break; -#endif - -#if INCL_SCREEN -case MODE_SCREEN: /* Output mode 1 (Screen writer) */ - sp_globals.init_out = sp_init_screen; - sp_globals.begin_char = sp_begin_char_screen; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_screen; - sp_globals.curve = sp_curve_screen; - sp_globals.line = sp_line_screen; - sp_globals.end_contour = sp_end_contour_screen; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_screen; - break; -#endif - -#if INCL_OUTLINE -case MODE_OUTLINE: /* Output mode 2 (Vector) */ - sp_globals.init_out = sp_init_outline; - sp_globals.begin_char = sp_begin_char_outline; - sp_globals.begin_sub_char = sp_begin_sub_char_outline; - sp_globals.begin_contour = sp_begin_contour_outline; - sp_globals.curve = sp_curve_outline; - sp_globals.line = sp_line_outline; - sp_globals.end_contour = sp_end_contour_outline; - sp_globals.end_sub_char = sp_end_sub_char_outline; - sp_globals.end_char = sp_end_char_outline; - break; -#endif - -#if INCL_2D -case MODE_2D: /* Output mode 3 */ - sp_globals.init_out = sp_init_2d; - sp_globals.begin_char = sp_begin_char_2d; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_2d; - sp_globals.curve = sp_curve_out; - sp_globals.line = sp_line_2d; - sp_globals.end_contour = sp_end_contour_out; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_2d; - break; -#endif - -default: - report_error(8); /* Unsupported mode requested */ - return FALSE; - } - - if (!fn_init_out(sp_globals.pspecs)) - { - report_error(5); - return FALSE; - } - - -sp_globals.curves_out = sp_globals.pspecs->flags & CURVES_OUT; - -if (sp_globals.pspecs->flags & BOGUS_MODE) /* Linear transformation requested? */ - { - sp_globals.tcb0.xtype = sp_globals.tcb0.ytype = 4; - } -else /* Intelligent transformation requested? */ - { -#if INCL_RULES -#else - report_error(7); /* Rules requested; not supported */ - return FALSE; -#endif - } - -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) || - (sp_globals.pspecs->flags & SQUEEZE_RIGHT) || - (sp_globals.pspecs->flags & SQUEEZE_TOP) || - (sp_globals.pspecs->flags & SQUEEZE_BOTTOM) ) - { -#if (INCL_SQUEEZING) -#else - report_error(11); - return FALSE; -#endif - } - -if ((sp_globals.pspecs->flags & CLIP_LEFT) || - (sp_globals.pspecs->flags & CLIP_RIGHT) || - (sp_globals.pspecs->flags & CLIP_TOP) || - (sp_globals.pspecs->flags & CLIP_BOTTOM) ) - { -#if (INCL_CLIPPING) -#else - report_error(11); - return FALSE; -#endif - } - -sp_globals.specs_valid = TRUE; -return TRUE; -} - - - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -FUNCTION boolean set_bitmap_device( -GDECL -bitmap_t *bfuncs, -ufix16 size) -{ - -if (size != sizeof(sp_globals.bitmap_device)) - return FALSE; - -sp_globals.bitmap_device = *bfuncs; -sp_globals.bitmap_device_set = TRUE; -} -#endif - -#if INCL_OUTLINE -FUNCTION boolean set_outline_device( -GDECL -outline_t *ofuncs, -ufix16 size) -{ - -if (size != sizeof(sp_globals.outline_device)) - return FALSE; - -sp_globals.outline_device = *ofuncs; -sp_globals.outline_device_set = TRUE; -} -#endif -#endif - - -#ifdef old -FUNCTION boolean sp_setup_consts( -GDECL -fix15 xmin, /* Minimum X ORU value in font */ -fix15 xmax, /* Maximum X ORU value in font */ -fix15 ymin, /* Minimum Y ORU value in font */ -fix15 ymax) /* Maximum Y ORU value in font */ -#else -static FUNCTION boolean sp_setup_consts( -GDECL -fix15 xmin, /* Minimum X ORU value in font */ -fix15 xmax, /* Maximum X ORU value in font */ -fix15 ymin, /* Minimum Y ORU value in font */ -fix15 ymax) /* Maximum Y ORU value in font */ -#endif -/* - * Sets the following constants used for fixed point arithmetic: - * sp_globals.multshift multipliers and products; range is 14 to 8 - * sp_globals.pixshift pixels: range is 0 to 8 - * sp_globals.mpshift shift from product to sub-pixels (sp_globals.multshift - sp_globals.pixshift) - * sp_globals.multrnd rounding for products - * sp_globals.pixrnd rounding for pixels - * sp_globals.mprnd rounding for sub-pixels - * sp_globals.onepix 1 pixel in shifted pixel units - * sp_globals.pixfix mask to eliminate fractional bits of shifted pixels - * sp_globals.depth_adj curve splitting depth adjustment - * Returns FALSE if specs are out of range - */ -{ -fix31 mult; /* Successive multiplier values */ -ufix32 num; /* Numerator of largest multiplier value */ -ufix32 numcopy; /* Copy of numerator */ -ufix32 denom; /* Denominator of largest multiplier value */ -ufix32 denomcopy; /* Copy of denominator */ -ufix32 pix_max; /* Maximum pixel rounding error */ -fix31 xmult; /* Coefficient of X oru value in transformation */ -fix31 ymult; /* Coefficient of Y oru value in transformation */ -fix31 offset; /* Constant in transformation */ -fix15 i; /* Loop counter */ -fix15 x, y; /* Successive corners of bounding box in ORUs */ -fix31 pixval; /* Successive pixel values multiplied by orus per em */ -fix15 xx = 0, yy = 0;/* Bounding box corner that produces max pixel value */ - -/* Determine numerator and denominator of largest multiplier value */ -mult = sp_globals.pspecs->xxmult >> 16; -if (mult < 0) - mult = -mult; -num = mult; - -mult = sp_globals.pspecs->xymult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; - -mult = sp_globals.pspecs->yxmult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; - -mult = sp_globals.pspecs->yymult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; -num++; /* Max absolute pixels per em (rounded up) */ -denom = (ufix32)sp_globals.orus_per_em; - -/* Set curve splitting depth adjustment to accomodate largest multiplier value */ -sp_globals.depth_adj = 0; /* 0 = 0.5 pel, 1 = 0.13 pel, 2 = 0.04 pel accuracy */ -denomcopy = denom; -/* The following two occurances of a strange method of shifting twice by 1 - are intentional and should not be changed to a single shift by 2. - It prevents MicroSoft C 5.1 from generating functions calls to do the shift. - Worse, using the REENTRANT_ALLOC option in conjunction with the /AC compiler - option, the function appears to be called incorrectly, causing depth_adj to always - be set to -7, causing very angular characters. */ - -while ((num > denomcopy) && (sp_globals.depth_adj < 5)) /* > 1, 4, 16, ... pixels per oru? */ - { - denomcopy <<= 1; - denomcopy <<= 1; - sp_globals.depth_adj++; /* Add 1, 2, 3, ... to depth adjustment */ - } -numcopy = num << 2; -while ((numcopy <= denom) && (sp_globals.depth_adj > -4)) /* <= 1/4, 1/16, 1/64 pix per oru? */ - { - numcopy <<= 1; - numcopy <<= 1; - sp_globals.depth_adj--; /* Subtract 1, 2, 3, ... from depth adjustment */ - } -SHOW(sp_globals.depth_adj); - -/* Set multiplier shift to accomodate largest multiplier value */ -sp_globals.multshift = 14; -numcopy = num; -while (numcopy >= denom) /* More than 1, 2, 4, ... pix per oru? */ - { - numcopy >>= 1; - sp_globals.multshift--; /* sp_globals.multshift is 13, 12, 11, ... */ - } - -sp_globals.multrnd = ((fix31)1 << sp_globals.multshift) >> 1; -SHOW(sp_globals.multshift); - - -pix_max = (ufix32)( 0xffff & read_word_u(sp_globals.hdr2_org + FH_PIXMX)); - -num = 0; -xmult = ((sp_globals.pspecs->xxmult >> 16) + 1) >> 1; -ymult = ((sp_globals.pspecs->xymult >> 16) + 1) >> 1; -offset = ((sp_globals.pspecs->xoffset >> 16) + 1) >> 1; -for (i = 0; i < 8; i++) - { - if (i == 4) - { - xmult = ((sp_globals.pspecs->yxmult >> 16) + 1) >> 1; - ymult = ((sp_globals.pspecs->yymult >> 16) + 1) >> 1; - offset = ((sp_globals.pspecs->yoffset >> 16) + 1) >> 1; - } - x = (i & BIT1)? xmin: xmax; - y = (i & BIT0)? ymin: ymax; - pixval = (fix31)x * xmult + (fix31)y * ymult + offset * denom; - if (pixval < 0) - pixval = -pixval; - if (pixval > num) - { - num = pixval; - xx = x; - yy = y; - } - } -if (xx < 0) - xx = -xx; -if (yy < 0) - yy = -yy; -num += xx + yy + ((pix_max + 2) * denom); - /* Allow (with 2:1 safety margin) for 1 pixel rounding errors in */ - /* xmult, ymult and offset values, pix_max pixel expansion */ - /* due to intelligent scaling, and */ - /* 1 pixel rounding of overall character position */ -denom = denom << 14; /* Note num is in units of half pixels times orus per em */ - -sp_globals.pixshift = -1; -while ((num <= denom) && (sp_globals.pixshift < 8)) /* Max pixels <= 32768, 16384, 8192, ... pixels? */ - { - num <<= 1; - sp_globals.pixshift++; /* sp_globals.pixshift = 0, 1, 2, ... */ - } -if (sp_globals.pixshift < 0) - return FALSE; - -SHOW(sp_globals.pixshift); -sp_globals.poshift = 16 - sp_globals.pixshift; - -sp_globals.onepix = (fix15)1 << sp_globals.pixshift; -sp_globals.pixrnd = sp_globals.onepix >> 1; -sp_globals.pixfix = ~0 << sp_globals.pixshift; - -sp_globals.mpshift = sp_globals.multshift - sp_globals.pixshift; -if (sp_globals.mpshift < 0) - return FALSE; -sp_globals.mprnd = ((fix31)1 << sp_globals.mpshift) >> 1; - -return TRUE; -} - -#ifdef old -FUNCTION void sp_setup_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -#else -static FUNCTION void sp_setup_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -#endif -/* - * Convert transformation coeffs to internal form - */ -{ - -ptcb->xxmult = sp_setup_mult(sp_globals.pspecs->xxmult); -ptcb->xymult = sp_setup_mult(sp_globals.pspecs->xymult); -ptcb->xoffset = sp_setup_offset(sp_globals.pspecs->xoffset); -ptcb->yxmult = sp_setup_mult(sp_globals.pspecs->yxmult); -ptcb->yymult = sp_setup_mult(sp_globals.pspecs->yymult); -ptcb->yoffset = sp_setup_offset(sp_globals.pspecs->yoffset); - -SHOW(ptcb->xxmult); -SHOW(ptcb->xymult); -SHOW(ptcb->xoffset); -SHOW(ptcb->yxmult); -SHOW(ptcb->yymult); -SHOW(ptcb->yoffset); - -type_tcb(ptcb); /* Classify transformation type */ -} - -FUNCTION static fix15 sp_setup_mult( -GDECL -fix31 input_mult) /* Multiplier in input format */ -/* - * Called by sp_setup_tcb() to convert multiplier in transformation - * matrix from external to internal form. - */ -{ -fix15 imshift; /* Right shift to internal format */ -fix31 imdenom; /* Divisor to internal format */ -fix31 imrnd; /* Rounding for division operation */ - -imshift = 15 - sp_globals.multshift; -imdenom = (fix31)sp_globals.orus_per_em << imshift; -imrnd = imdenom >> 1; - -input_mult >>= 1; -if (input_mult >= 0) - return (fix15)((input_mult + imrnd) / imdenom); -else - return -(fix15)((-input_mult + imrnd) / imdenom); -} - -FUNCTION static fix31 sp_setup_offset( -GDECL -fix31 input_offset) /* Multiplier in input format */ -/* - * Called by sp_setup_tcb() to convert offset in transformation - * matrix from external to internal form. - */ -{ -fix15 imshift; /* Right shift to internal format */ -fix31 imrnd; /* Rounding for right shift operation */ - -imshift = 15 - sp_globals.multshift; -imrnd = ((fix31)1 << imshift) >> 1; - -return (((input_offset >> 1) + imrnd) >> imshift) + sp_globals.mprnd; -} - -FUNCTION void type_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -{ -fix15 x_trans_type; -fix15 y_trans_type; -fix15 xx_mult; -fix15 xy_mult; -fix15 yx_mult; -fix15 yy_mult; -fix15 h_pos; -fix15 v_pos; -fix15 x_ppo; -fix15 y_ppo; -fix15 x_pos; -fix15 y_pos; - -/* check for mirror image transformations */ -xx_mult = ptcb->xxmult; -xy_mult = ptcb->xymult; -yx_mult = ptcb->yxmult; -yy_mult = ptcb->yymult; - -ptcb->mirror = ((((fix31)xx_mult*(fix31)yy_mult)- - ((fix31)xy_mult*(fix31)yx_mult)) < 0) ? -1 : 1; - -if (sp_globals.pspecs->flags & BOGUS_MODE) /* Linear transformation requested? */ - { - ptcb->xtype = 4; - ptcb->ytype = 4; - - ptcb->xppo = 0; - ptcb->yppo = 0; - ptcb->xpos = 0; - ptcb->ypos = 0; - } -else /* Intelligent tranformation requested? */ - { - h_pos = ((ptcb->xoffset >> sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - v_pos = ((ptcb->yoffset >> sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - - x_trans_type = 4; - x_ppo = 0; - x_pos = 0; - - y_trans_type = 4; - y_ppo = 0; - y_pos = 0; - - if (xy_mult == 0) - { - if (xx_mult >= 0) - { - x_trans_type = 0; /* X pix is function of X orus only */ - x_ppo = xx_mult; - x_pos = h_pos; - } - else - { - x_trans_type = 1; /* X pix is function of -X orus only */ - x_ppo = -xx_mult; - x_pos = -h_pos; - } - } - - else if (xx_mult == 0) - { - if (xy_mult >= 0) - { - x_trans_type = 2; /* X pix is function of Y orus only */ - y_ppo = xy_mult; - y_pos = h_pos; - } - else - { - x_trans_type = 3; /* X pix is function of -Y orus only */ - y_ppo = -xy_mult; - y_pos = -h_pos; - } - } - - if (yx_mult == 0) - { - if (yy_mult >= 0) - { - y_trans_type = 0; /* Y pix is function of Y orus only */ - y_ppo = yy_mult; - y_pos = v_pos; - } - else - { - y_trans_type = 1; /* Y pix is function of -Y orus only */ - y_ppo = -yy_mult; - y_pos = -v_pos; - } - } - else if (yy_mult == 0) - { - if (yx_mult >= 0) - { - y_trans_type = 2; /* Y pix is function of X orus only */ - x_ppo = yx_mult; - x_pos = v_pos; - } - else - { - y_trans_type = 3; /* Y pix is function of -X orus only */ - x_ppo = -yx_mult; - x_pos = -v_pos; - } - } - - ptcb->xtype = x_trans_type; - ptcb->ytype = y_trans_type; - - ptcb->xppo = x_ppo; - ptcb->yppo = y_ppo; - ptcb->xpos = x_pos; - ptcb->ypos = y_pos; - } - -sp_globals.normal = (ptcb->xtype != 4) && (ptcb->ytype != 4); - -ptcb->xmode = 4; -ptcb->ymode = 4; - -SHOW(ptcb->xtype); -SHOW(ptcb->ytype); -SHOW(ptcb->xppo); -SHOW(ptcb->yppo); -SHOW(ptcb->xpos); -SHOW(ptcb->ypos); -} - -FUNCTION fix31 read_long( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of encrypted 3-byte integer */ -/* - * Reads a 3-byte encrypted integer from the byte string starting at - * the specified point. - * Returns the decrypted value read as a signed integer. - */ -{ -fix31 tmpfix31; - -tmpfix31 = (fix31)((*pointer++) ^ sp_globals.key4) << 8; /* Read middle byte */ -tmpfix31 += (fix31)(*pointer++) << 16; /* Read most significant byte */ -tmpfix31 += (fix31)((*pointer) ^ sp_globals.key6); /* Read least significant byte */ -return tmpfix31; -} - -FUNCTION fix15 read_word_u( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of unencrypted 2-byte integer */ -/* - * Reads a 2-byte unencrypted integer from the byte string starting at - * the specified point. - * Returns the decrypted value read as a signed integer. - */ -{ -fix15 tmpfix15; - -tmpfix15 = (fix15)(*pointer++) << 8; /* Read most significant byte */ -tmpfix15 += (fix15)(*pointer); /* Add least significant byte */ -return tmpfix15; -} - - diff --git a/nx-X11/lib/font/Speedo/set_trns.c b/nx-X11/lib/font/Speedo/set_trns.c deleted file mode 100644 index 3b8f60378..000000000 --- a/nx-X11/lib/font/Speedo/set_trns.c +++ /dev/null @@ -1,1324 +0,0 @@ -/* $Xorg: set_trns.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.5tsi Exp $ */ - - - -/*************************** S E T _ T R N S . C ***************************** - * * - * This module is called from do_char.c to set up the intelligent * - * transformation for one character (or sub-character of a composite * - * character. - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif -/***** LOCAL MACROS *****/ - -#define SQUEEZE_X_ORU(A,B,C) ((((fix31)A * (fix31)B) + C) >> 16) -#define ABS(A) ((A < 0)? -A:A) /* absolute value */ -#define IMPORT_FACTOR \ - shift = 16;\ - while (*x_factor > (0x7fffffffL / (isw_scale >> (16 - shift))))\ - shift--;\ - *x_factor = (*x_factor * (isw_scale>>(16-shift))) >> shift; - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_constr_update(PROTO_DECL1); -static ufix8 FONTFAR *sp_setup_pix_table(PROTO_DECL2 ufix8 FONTFAR *pointer,boolean short_form,fix15 no_X_ctrl_zones,fix15 no_Y_ctrl_zones); -static ufix8 FONTFAR *sp_setup_int_table(PROTO_DECL2 ufix8 FONTFAR *pointer,fix15 no_X_int_zones,fix15 no_Y_int_zones); - - -FUNCTION void init_tcb() -GDECL -/* - * Called by sp_make_char() and make_comp_char() to initialize the current - * transformation control block to the top level transformation. - */ -{ -sp_globals.tcb = sp_globals.tcb0; -} - -FUNCTION void scale_tcb( -GDECL -tcb_t GLOBALFAR *ptcb, /* Transformation control block */ -fix15 x_pos, /* X position (outline res units) */ -fix15 y_pos, /* Y position (outline res units) */ -fix15 x_scale, /* X scale factor * ONE_SCALE */ -fix15 y_scale) /* Y scale factor * ONE_SCALE */ -/* - * Called by make_comp_char() to apply position and scale for each of the - * components of a compound character. - */ -{ -fix15 xx_mult = ptcb->xxmult; -fix15 xy_mult = ptcb->xymult; -fix31 x_offset = ptcb->xoffset; -fix15 yx_mult = ptcb->yxmult; -fix15 yy_mult = ptcb->yymult; -fix31 y_offset = ptcb->yoffset; - -ptcb->xxmult = TRANS(xx_mult, x_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->xymult = TRANS(xy_mult, y_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->xoffset = MULT16(xx_mult, x_pos) + MULT16(xy_mult, y_pos) + x_offset; -ptcb->yxmult = TRANS(yx_mult, x_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->yymult = TRANS(yy_mult, y_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->yoffset = MULT16(yx_mult, x_pos) + MULT16(yy_mult, y_pos) + y_offset; - -type_tcb(ptcb); /* Reclassify transformation types */ -} - -FUNCTION ufix8 FONTFAR *skip_interpolation_table( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format) /* Character format byte */ -{ -fix15 i,n; -ufix8 intsize[9]; - -intsize[0] = 1; -intsize[1] = 2; -intsize[2] = 3; -intsize[3] = 1; -intsize[4] = 2; -intsize[5] = 1; -intsize[6] = 2; -intsize[7] = 0; -intsize[8] = 0; - -n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0); -n += ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0); -for (i = 0; i < n; i++) /* For each entry in int table ... */ - { - format = NEXT_BYTE(pointer); /* Read format byte */ - if (format & BIT7) /* Short Start/End point spec? */ - { - pointer++; /* Skip Start/End point byte */ - } - else - { - pointer += intsize[format & 0x7]; /* Skip Start point spec */ - pointer += intsize[(format >> 3) & 0x7]; /* Skip End point spec */ - } - } -return pointer; -} -FUNCTION ufix8 FONTFAR *skip_control_zone( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format) /* Character format byte */ -{ -fix15 i,n; -ufix16 tmpufix16; - -n = sp_globals.no_X_orus + sp_globals.no_Y_orus - 2; -for (i = 0; i < n; i++) /* For each entry in control table ... */ - { - if (format & BIT4) - pointer++; /* Skip short form From/To fields */ - else - pointer += 2; /* Skip FROM and TO fields */ - /* skip constraints field */ - NEXT_BYTES (pointer, tmpufix16); - - } -return pointer; -} - -#if INCL_RULES -#else -FUNCTION ufix8 FONTFAR *plaid_tcb( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format) /* Character format byte */ -/* - * Called by make_simp_char() and make_comp_char() to set up the controlled - * coordinate table and skip all other intelligent scaling rules embedded - * in the character data. - * Updates pointer to first byte after plaid data. - * This is used only if intelligent scaling is not supported in the - * configuration definitions. - */ -{ -fix15 i, n; - - - -sp_globals.no_X_orus = (format & BIT2)? - (fix15)NEXT_BYTE(pointer): - 0; -sp_globals.no_Y_orus = (format & BIT3)? - (fix15)NEXT_BYTE(pointer): - 0; -pointer = read_oru_table(pointer); /* Updates no_X/Y/orus */ -sp_globals.Y_edge_org = sp_globals.no_X_orus; - -/* Skip over control zone table */ -pointer = skip_control_zone(pointer,format); - -/* Skip over interpolation table */ -pointer = skip_interpolation_table(pointer,format); -return pointer; -} -#endif - -#if INCL_RULES -FUNCTION ufix8 FONTFAR *plaid_tcb( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format) /* Character format byte */ -/* - * Called by make_simp_char() and make_comp_char() to set up the controlled - * coordinate table and process all intelligent scaling rules embedded - * in the character data. - * Updates pointer to first byte after plaid data. - * This is used only if intelligent scaling is enabled in the - * configuration definitions. - */ -{ -fix15 no_X_ctrl_zones; -fix15 no_Y_ctrl_zones; -fix15 no_X_int_zones; -fix15 no_Y_int_zones; - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_plaid_data(); -#endif - -sp_constr_update(); /* Update constraint table if required */ - -sp_globals.no_X_orus = (format & BIT2)? - (fix15)NEXT_BYTE(pointer): - 0; -sp_globals.no_Y_orus = (format & BIT3)? - (fix15)NEXT_BYTE(pointer): - 0; -pointer = read_oru_table(pointer); /* Updates no_X/Y/orus to include zero values */ -sp_globals.Y_edge_org = sp_globals.no_X_orus; -if (sp_globals.no_X_orus > 1) /* 2 or more controlled X coordinates? */ - sp_globals.tcb.xmode = sp_globals.tcb.xtype; /* Enable intelligent scaling in X */ - -if (sp_globals.no_Y_orus > 1) /* 2 or more controlled Y coordinates? */ - sp_globals.tcb.ymode = sp_globals.tcb.ytype; /* Enable intelligent scaling in Y */ - -no_X_ctrl_zones = sp_globals.no_X_orus - 1; -no_Y_ctrl_zones = sp_globals.no_Y_orus - 1; -pointer = sp_setup_pix_table(pointer, (boolean)(format & BIT4), - no_X_ctrl_zones, no_Y_ctrl_zones); - -no_X_int_zones = (format & BIT6)? - (fix15)NEXT_BYTE(pointer): - 0; -no_Y_int_zones = (format & BIT7)? - (fix15)NEXT_BYTE(pointer): - 0; -sp_globals.Y_int_org = no_X_int_zones; -pointer = sp_setup_int_table(pointer, no_X_int_zones, no_Y_int_zones); - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -end_plaid_data(); -#endif - -return pointer; -} -#endif - -#if INCL_RULES -FUNCTION static void sp_constr_update() -GDECL -/* - * Called by plaid_tcb() to update the constraint table for the current - * transformation. - * This is always carried out whenever a character is generated following - * a change of font or scale factor or after initialization. - */ -{ -fix31 ppo; -fix15 xppo; -fix15 yppo; -ufix8 FONTFAR *pointer; -fix15 no_X_constr; -fix15 no_Y_constr; -fix15 i, j, k, l, n; -fix15 ppm; -ufix8 format; -ufix8 format1; -fix15 limit; -ufix16 constr_org; -fix15 constr_nr; -fix15 size; -fix31 off; -fix15 min; -fix15 orus; -fix15 pix; -ufix16 tmpufix16; /* in extended mode, macro uses secnd term */ - -if (sp_globals.constr.data_valid && /* Constr table already done and ... */ - (sp_globals.tcb.xppo == sp_globals.constr.xppo) && /* ... X pix per oru unchanged and ... */ - (sp_globals.tcb.yppo == sp_globals.constr.yppo)) /* ... Y pix per oru unchanged? */ - { - return; /* No need to update constraint table */ - } - -sp_globals.constr.xppo = xppo = sp_globals.tcb.xppo; /* Update X pixels per oru indicator */ -sp_globals.constr.yppo = yppo = sp_globals.tcb.yppo; /* Update Y pixels per oru indicator */ -sp_globals.constr.data_valid = TRUE; /* Mark constraint table valid */ - -pointer = sp_globals.constr.org; /* Point to first byte of constraint data */ -no_X_constr = NEXT_BYTES(pointer, tmpufix16); /* Read nmbr of X constraints */ -no_Y_constr = NEXT_BYTES(pointer, tmpufix16); /* Read nmbr of Y constraints */ - -i = 0; -constr_org = 0; -n = no_X_constr; -ppo = xppo; -for (j = 0; ; j++) - { - sp_globals.c_act[i] = FALSE; /* Flag constraint 0 not active */ - sp_globals.c_pix[i++] = 0; /* Constraint 0 implies no minimum */ - sp_globals.c_act[i] = FALSE; /* Flag constraint 1 not active */ - sp_globals.c_pix[i++] = sp_globals.onepix; /* Constraint 1 implies min 1 pixel*/ - ppm = (ppo * (fix31)sp_globals.orus_per_em) >> sp_globals.multshift; - for (k = 0; k < n; k++) - { - format = NEXT_BYTE(pointer); /* Read format byte */ - limit = (fix15)NEXT_BYTE(pointer); /* Read limit field */ - sp_globals.c_act[i] = - ((ppm < limit) || (limit == 255)) && - sp_globals.constr.active; - if (sp_globals.c_act[i]) /* Constraint active? */ - { - if ((format & BIT1) && /* Constraint specified and ... */ - (constr_nr = constr_org + - ((format & BIT0)? /* Read unsigned constraint value */ - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer)), - sp_globals.c_act[constr_nr])) /* ... and specified constraint active? */ - { - pix = sp_globals.c_pix[constr_nr]; /* Use constrained pixel value */ - format1 = format; - for (l = 2; l > 0; l--) /* Skip 2 arguments */ - { - format1 >>= 2; - if ((size = format1 & 0x03)) - pointer += size - 1; - } - } - else /* Constraint absent or inactive? */ - { - orus = (format & BIT2)? /* Read unsigned oru value */ - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - - if (format & BIT5) /* Specified offset value? */ - { - off = (fix31)((format & BIT4)? /* Read offset value */ - NEXT_WORD(pointer): - (fix7)NEXT_BYTE(pointer)); - off = (off << (sp_globals.multshift - 6)) + sp_globals.multrnd; - } - else /* Unspecified (zero) offset value? */ - { - off = sp_globals.multrnd; - } - - pix = (fix15)(((fix31)orus * ppo + off) / (1 << sp_globals.mpshift)) & sp_globals.pixfix; - } - } - else /* Constraint inactive? */ - { - format1 = format; - for (l = 3; l > 0; l--) /* Skip over 3 arguments */ - { - if ((size = format1 & 0x03)) - pointer += size - 1; - format1 >>= 2; - } - pix = 0; - } - - if (format & 0xc0) /* Specified minimum value? */ - { - min = (format & BIT7)? /* Read unsigned minimum value */ - (fix15)NEXT_BYTE(pointer) << sp_globals.pixshift: - sp_globals.onepix; - } - else /* Unspecified (zero) minimum value? */ - { - min = 0; - } - - sp_globals.c_pix[i] = (pix < min)? min: pix; - i++; - } - if (j) break; /* Finished if second time around loop */ - constr_org = sp_globals.Y_constr_org = i; - n = no_Y_constr; - ppo = yppo; - } - -#if DEBUG -printf("\nCONSTRAINT TABLE\n"); -n = no_X_constr + 2; -for (i = 0; i < n; i++) - { - printf("%3d ", i); - if (sp_globals.c_act[i]) - { - printf("T "); - } - else - { - printf("F "); - } - printf("%5.1f\n", ((real)sp_globals.c_pix[i] / (real)sp_globals.onepix)); - } -printf("--------------\n"); -n = no_Y_constr + 2; -for (i = 0; i < n; i++) - { - j = i + sp_globals.Y_constr_org; - printf("%3d ", i); - if (sp_globals.c_act[j]) - { - printf("T "); - } - else - { - printf("F "); - } - printf("%5.1f\n", ((real)sp_globals.c_pix[j] / (real)sp_globals.onepix)); - } -#endif - -} -#endif - -FUNCTION ufix8 FONTFAR *read_oru_table( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte in controlled coord table */ -/* - * Called by plaid_tcb() to read the controlled coordinate table from the - * character data in the font. - * Updates the pointer to the byte following the controlled coordinate - * data. - */ -{ -fix15 i, j, k, n; -boolean zero_not_in; -boolean zero_added; -fix15 oru; - -#if INCL_RULES -fix15 pos; -#endif - -i = 0; -n = sp_globals.no_X_orus; -#if INCL_RULES -pos = sp_globals.tcb.xpos; -#endif -for (j = 0; ; j++) - { - zero_not_in = TRUE; - zero_added = FALSE; - for (k = 0; k < n; k++) - { - oru = NEXT_WORD(pointer); - if (zero_not_in && (oru >= 0)) /* First positive oru value? */ - { -#if INCL_RULES - sp_plaid.pix[i] = pos; /* Insert position in pix array */ -#endif - if (oru != 0) /* Zero oru value omitted? */ - { - sp_plaid.orus[i++] = 0; /* Insert zero value in oru array */ - zero_added = TRUE; /* Remember to increment size of array */ - } - zero_not_in = FALSE; /* Inhibit further testing for zero ins */ - } - sp_plaid.orus[i++] = oru; /* Add specified oru value to array */ - } - if (zero_not_in) /* All specified oru values negative? */ - { -#if INCL_RULES - sp_plaid.pix[i] = pos; /* Insert position in pix array */ -#endif - sp_plaid.orus[i++] = 0; /* Add zero oru value */ - zero_added = TRUE; /* Remember to increment size of array */ - } - if (j) /* Both X and Y orus read? */ - break; - if (zero_added) - sp_globals.no_X_orus++; /* Increment X array size */ - n = sp_globals.no_Y_orus; /* Prepare to read Y oru values */ -#if INCL_RULES - pos = sp_globals.tcb.ypos; -#endif - } -if (zero_added) /* Zero Y oru value added to array? */ - sp_globals.no_Y_orus++; /* Increment Y array size */ - -#if DEBUG -printf("\nX ORUS\n"); -n = sp_globals.no_X_orus; -for (i = 0; i < n; i++) - { - printf("%2d %4d\n", i, sp_plaid.orus[i]); - } -printf("\nY ORUS\n"); -n = sp_globals.no_Y_orus; -for (i = 0; i < n; i++) - { - printf("%2d %4d\n", i, sp_plaid.orus[i + sp_globals.no_X_orus]); - } -#endif - -return pointer; /* Update pointer */ -} -#if INCL_SQUEEZING || INCL_ISW -FUNCTION static void calculate_x_pix( -GDECL -ufix8 start_edge, ufix8 end_edge, -ufix16 constr_nr, -fix31 x_scale, -fix31 x_offset, -fix31 ppo, -fix15 setwidth_pix) -/* - * Called by sp_setup_pix_table() when X squeezing is necessary - * to insert the correct edge in the global pix array - */ -{ -fix15 zone_pix; -fix15 start_oru, end_oru; - -/* compute scaled oru coordinates */ -start_oru= (fix15)(SQUEEZE_X_ORU(sp_plaid.orus[start_edge], x_scale, x_offset)); -end_oru = (fix15)(SQUEEZE_X_ORU(sp_plaid.orus[end_edge], x_scale, x_offset)); - -if (!sp_globals.c_act[constr_nr]) /* constraint inactive */ - { - /* calculate zone width */ - zone_pix = (fix15)(((((fix31)end_oru - (fix31)start_oru) * ppo) / - (1< 0) && (zone_pix < 0)) - zone_pix = 0x7ffff; - /* check for minimum */ - if ((ABS(zone_pix)) >= sp_globals.c_pix[constr_nr]) - goto Lx; - } -/* use the zone size from the constr table - scale it */ -zone_pix = (fix15)(((SQUEEZE_MULT(x_scale,sp_globals.c_pix[constr_nr])) - + sp_globals.pixrnd) & sp_globals.pixfix); - -/* look for overflow */ -if ((sp_globals.c_pix[constr_nr] > 0) && (zone_pix < 0)) - zone_pix = 0x7fff; - -if (start_edge > end_edge) - { - zone_pix = -zone_pix; - } -Lx: -/* assign pixel value to global pix array */ -sp_plaid.pix[end_edge]=sp_plaid.pix[start_edge] + zone_pix; - -/* check for overflow */ -if (((sp_plaid.pix[start_edge] >0) && (zone_pix >0)) && - (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0x7fff; /* set it to the max */ - -/* be sure to be in the setwidth !*/ -#if INCL_ISW -if (!sp_globals.import_setwidth_act) /* only check left edge if not isw only */ -#endif -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) && (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0; -if ((sp_globals.pspecs->flags & SQUEEZE_RIGHT) && - (sp_plaid.pix[end_edge] > setwidth_pix)) - sp_plaid.pix[end_edge] = setwidth_pix; - -} -#endif - -#if INCL_SQUEEZING -FUNCTION static void calculate_y_pix( -GDECL -ufix8 start_edge, ufix8 end_edge, -ufix16 constr_nr, -fix31 top_scale, fix31 bottom_scale, -fix31 ppo, -fix15 em_top_pix, fix15 em_bot_pix) - -/* - * Called by sp_setup_pix_table() when Y squeezing is necessary - * to insert the correct edge in the global pix array - */ -{ -fix15 zone_pix; -fix15 start_oru, end_oru; -fix31 zone_width, above_base, below_base; - -/* check whether edge is above or below the baseline */ -/* and apply appropriate scale factor to get scaled oru coordinates */ -if (sp_plaid.orus[start_edge] < 0) - start_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[start_edge], bottom_scale)); -else - start_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[start_edge], top_scale)); - -if (sp_plaid.orus[end_edge] < 0) - end_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[end_edge], bottom_scale)); -else - end_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[end_edge], top_scale)); - -if (!sp_globals.c_act[constr_nr]) /* Constraint inactive? */ - { - /* calculate zone width */ - zone_pix = (fix15)(((((fix31)end_oru - (fix31)start_oru) * ppo) - >> sp_globals.mpshift)+ sp_globals.pixrnd) & sp_globals.pixfix; - /* check minimum */ - if ((ABS(zone_pix)) >= sp_globals.c_pix[constr_nr]) - goto Ly; - } - -/* Use zone size from constr table */ -if ((end_oru >= 0) && (start_oru >=0)) - /* all above baseline */ - zone_pix = (fix15)(SQUEEZE_MULT(top_scale, sp_globals.c_pix[constr_nr])); -else if ((end_oru <= 0) && (start_oru <=0)) - /* all below baseline */ - zone_pix = (fix15)(SQUEEZE_MULT(bottom_scale, sp_globals.c_pix[constr_nr])); -else - { - /* mixture */ - if (start_oru > 0) - { - zone_width = start_oru - end_oru; - /* get % above baseline in 16.16 fixed point */ - above_base = (((fix31)start_oru) << 16) / - ((fix31)zone_width) ; - /* get % below baseline in 16.16 fixed point */ - below_base = (((fix31)-end_oru) << 16) / - ((fix31)zone_width) ; - } - else - { - zone_width = end_oru - start_oru; - /* get % above baseline in 16.16 fixed point */ - above_base = (((fix31)-start_oru) << 16) / - ((fix31)zone_width) ; - /* get % below baseline in 16.16 fixed point */ - below_base = (((fix31)end_oru) << 16) / - ((fix31)zone_width) ; - } - /* % above baseline * total zone * top_scale + */ - /* % below baseline * total zone * bottom_scale */ - zone_pix = ((((above_base * (fix31)sp_globals.c_pix[constr_nr]) >> 16) * - top_scale) + - (((below_base * (fix31)sp_globals.c_pix[constr_nr]) >> 16) * - bottom_scale)) >> 16; - } - -/* make this zone pix fall on a pixel boundary */ -zone_pix = (zone_pix + sp_globals.pixrnd) & sp_globals.pixfix; - -/* if minimum is in effect make the zone one pixel */ -if ((sp_globals.c_pix[constr_nr] != 0) && (zone_pix < sp_globals.onepix)) - zone_pix = sp_globals.onepix; - -if (start_edge > end_edge) - { - zone_pix = -zone_pix; /* Use negatve zone size */ - } -Ly: -/* assign global pix value */ -sp_plaid.pix[end_edge] = sp_plaid.pix[start_edge] + zone_pix; /* Insert end pixels */ - -/* make sure it is in the EM !*/ -if ((sp_globals.pspecs->flags & SQUEEZE_TOP) && - (sp_plaid.pix[end_edge] > em_top_pix)) - sp_plaid.pix[end_edge] = em_top_pix; -if ((sp_globals.pspecs->flags & SQUEEZE_BOTTOM) && - (sp_plaid.pix[end_edge] < em_bot_pix)) - sp_plaid.pix[end_edge] = em_bot_pix; -} - -FUNCTION boolean calculate_x_scale(x_factor, x_offset, no_X_ctrl_zones) -GDECL -fix31 *x_factor, -fix31 *x_offset, -fix15 no_X_ctrl_zones) /* Number of X control zones */ -/* - * Called by sp_setup_pix_table() when squeezing is included - * to determine whether X scaling is necessary. If it is, the - * scale factor and offset are computed. This function returns - * a boolean value TRUE = X squeezind is necessary, FALSE = no - * X squeezing is necessary. - */ -{ -boolean squeeze_left, squeeze_right; -boolean out_on_right, out_on_left; -fix15 bbox_width,set_width; -fix15 bbox_xmin, bbox_xmax; -fix15 x_offset_pix; -fix15 i; -#if INCL_ISW -fix31 isw_scale; -fix15 shift; -#endif - - -/* set up some flags and common calculations */ -squeeze_left = (sp_globals.pspecs->flags & SQUEEZE_LEFT)? TRUE:FALSE; -squeeze_right = (sp_globals.pspecs->flags & SQUEEZE_RIGHT)? TRUE:FALSE; -bbox_xmin = sp_globals.bbox_xmin_orus; -bbox_xmax = sp_globals.bbox_xmax_orus; -set_width = sp_globals.setwidth_orus; - -if (bbox_xmax > set_width) - out_on_right = TRUE; -else - out_on_right = FALSE; -if (bbox_xmin < 0) - out_on_left = TRUE; -else - out_on_left = FALSE; -bbox_width =bbox_xmax - bbox_xmin; - -/* - * don't need X squeezing if: - * - X squeezing not enabled - * - bbox doesn't violate on left or right - * - left squeezing only is enabled and char isn't out on left - * - right squeezing only is enabled and char isn't out on right - */ - -if ((!squeeze_left && !squeeze_right) || - (!out_on_right && !out_on_left) || - (squeeze_left && !squeeze_right && !out_on_left) || - (squeeze_right && !squeeze_left && !out_on_right)) - return FALSE; - -#if INCL_ISW -if (sp_globals.import_setwidth_act) - { - /* if both isw and squeezing is going on - let the imported */ - /* setwidth factor be factored in with the squeeze */ - isw_scale = compute_isw_scale(); - /*sp_globals.setwidth_orus = sp_globals.imported_width;*/ - } -else - isw_scale = 0x10000L; /* 1 in 16.16 notation */ -#endif - -/* squeezing on left and right ? */ -if (squeeze_left && squeeze_right) - { - /* calculate scale factor */ - if (bbox_width < set_width) - *x_factor = 0x10000L; /* 1 in 16.16 notation */ - else - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; -#if INCL_ISW - IMPORT_FACTOR -#endif - /* calculate offset */ - if (out_on_left) /* fall out on left ? */ - *x_offset = -(fix31)*x_factor * (fix31)bbox_xmin; - /* fall out on right and I am shifting only ? */ - else if (out_on_right && (*x_factor == 0x10000L)) - *x_offset = -(fix31)*x_factor * (fix31)(bbox_xmax - set_width); - else - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } -/* squeezing on left only and violates left */ -else if (squeeze_left) - { - if (bbox_width < set_width) /* will it fit if I shift it ? */ - *x_factor = 0x10000L; /* 1 in 16.16 notation */ - else if (out_on_right) - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; - else - *x_factor = ((fix31)set_width<<16)/ - (fix31)(bbox_width - (bbox_xmax-set_width)); -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = (fix31)-*x_factor * (fix31)bbox_xmin; - } - -/* I must be squeezing on right, and violates right */ -else - { - if (bbox_width < set_width) /* will it fit if I shift it ? */ - { /* just shift it left - it will fit in the bbox */ - *x_factor = 0x10000L; /* 1 in 16.16 notation */ -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = (fix31)-*x_factor * (fix31)bbox_xmin; - } - else if (out_on_left) - { - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } - else - { - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_xmax; -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } - } - -x_offset_pix = (fix15)(((*x_offset >> 16) * sp_globals.tcb0.xppo) - / (1<0) && (x_offset_pix < sp_globals.onepix)) - x_offset_pix = sp_globals.onepix; - -/* look for the first non-negative oru value, scale and add the offset */ -/* to the corresponding pixel value - note that the pixel value */ -/* is set in read_oru_table. */ - -/* look at all the X edges */ -for (i=0; i < (no_X_ctrl_zones+1); i++) - if (sp_plaid.orus[i] >= 0) - { - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *x_factor) - +sp_globals.pixrnd + x_offset_pix) & sp_globals.pixfix; - break; - } - -return TRUE; -} - -FUNCTION boolean calculate_y_scale( -GDECL -fix31 *top_scale, fix31 *bottom_scale, -fix15 first_Y_zone, -fix15 no_Y_ctrl_zones) -/* - * Called by sp_setup_pix_table() when squeezing is included - * to determine whether Y scaling is necessary. If it is, - * two scale factors are computed, one for above the baseline, - * and one for below the basline. - * This function returns a boolean value TRUE = Y squeezind is necessary, - * FALSE = no Y squeezing is necessary. - */ -{ -boolean squeeze_top, squeeze_bottom; -boolean out_on_top, out_on_bottom; -fix15 bbox_top, bbox_bottom; -fix15 bbox_height; -fix15 i; - -/* set up some flags and common calculations */ -squeeze_top = (sp_globals.pspecs->flags & SQUEEZE_TOP)? TRUE:FALSE; -squeeze_bottom = (sp_globals.pspecs->flags & SQUEEZE_BOTTOM)? TRUE:FALSE; -bbox_top = sp_globals.bbox_ymax_orus; -bbox_bottom = sp_globals.bbox_ymin_orus; -bbox_height = bbox_top - bbox_bottom; - -if (bbox_top > EM_TOP) - out_on_top = TRUE; -else - out_on_top = FALSE; - -if (bbox_bottom < EM_BOT) - out_on_bottom = TRUE; -else - out_on_bottom = FALSE; - -/* - * don't need Y squeezing if: - * - Y squeezing not enabled - * - bbox doesn't violate on top or bottom - * - top squeezing only is enabled and char isn't out on top - * - bottom squeezing only is enabled and char isn't out on bottom - */ -if ((!squeeze_top && !squeeze_bottom) || - (!out_on_top && !out_on_bottom) || - (squeeze_top && !squeeze_bottom && !out_on_top) || - (squeeze_bottom && !squeeze_top && !out_on_bottom)) - return FALSE; - -if (squeeze_top && (bbox_top > EM_TOP)) - *top_scale = ((fix31)EM_TOP << 16)/(fix31)(bbox_top); -else - *top_scale = 0x10000L; /* 1 in 16.16 fixed point */ - -if (squeeze_bottom && (bbox_bottom < EM_BOT)) - *bottom_scale = ((fix31)-(EM_BOT) << 16)/(fix31)-bbox_bottom; -else - *bottom_scale = 0x10000L; - -if (sp_globals.squeezing_compound) - { - for (i=first_Y_zone; i < (first_Y_zone + no_Y_ctrl_zones + 1); i++) - { - if (sp_plaid.orus[i] >= 0) - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *top_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - else - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *bottom_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - } - } -return TRUE; -} -#endif - -#if INCL_RULES -FUNCTION static ufix8 FONTFAR *sp_setup_pix_table( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte in control zone table */ -boolean short_form, /* TRUE if 1 byte from/to specification */ -fix15 no_X_ctrl_zones, /* Number of X control zones */ -fix15 no_Y_ctrl_zones) /* Number of Y control zones */ -/* - * Called by plaid_tcb() to read the control zone table from the - * character data in the font. - * Sets up a table of pixel values for all controlled coordinates. - * Updates the pointer to the byte following the control zone - * data. - */ -{ -fix15 i, j, n; -fix31 ppo; -#if INCL_SQUEEZING || INCL_ISW -fix31 xppo0; /* top level pixels per oru */ -fix31 yppo0; /* top level pixels per oru */ -#endif -ufix8 edge_org; -ufix8 edge; -ufix8 start_edge; -ufix8 end_edge; -ufix16 constr_org; -fix15 constr_nr; -fix15 zone_pix; -fix31 whole_zone; /* non-transformed value of the first X zone */ -ufix16 tmpufix16; /* in extended mode, macro uses secnd term */ -#if INCL_SQUEEZING -fix31 x_scale; -fix31 y_top_scale, y_bottom_scale; -fix31 x_offset; -boolean squeezed_y; -fix15 setwidth_pix, em_top_pix, em_bot_pix; -#endif - -#if INCL_ISW -boolean imported_width; -fix31 isw_scale; -fix15 isw_setwidth_pix; -#endif - -#if INCL_ISW || INCL_SQUEEZING -boolean squeezed_x; -#endif - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_ctrl_zones(no_X_ctrl_zones, no_Y_ctrl_zones); -#endif - - -edge_org = 0; -constr_org = 0; -sp_globals.rnd_xmin = 0; /* initialize the error for chars with no zone */ -n = no_X_ctrl_zones; -ppo = sp_globals.tcb.xppo; -#if INCL_SQUEEZING || INCL_ISW -xppo0 = sp_globals.tcb0.xppo; -yppo0 = sp_globals.tcb0.yppo; -squeezed_x = FALSE; -#endif - -#if INCL_SQUEEZING -squeezed_x = calculate_x_scale (&x_scale, &x_offset, no_X_ctrl_zones); -squeezed_y = calculate_y_scale(&y_top_scale,&y_bottom_scale,(n+1), - no_Y_ctrl_zones); -#if INCL_ISW -if (sp_globals.import_setwidth_act == TRUE) -setwidth_pix = ((fix15)(((fix31)sp_globals.imported_width * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - -else -#endif -setwidth_pix = ((fix15)(((fix31)sp_globals.setwidth_orus * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -/* check for overflow */ -if (setwidth_pix < 0) - setwidth_pix = 0x7fff; /* set to maximum */ -em_bot_pix = ((fix15)(((fix31)EM_BOT * yppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -em_top_pix = ((fix15)(((fix31)EM_TOP * yppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -#endif - -#if INCL_ISW -/* convert to pixels */ -isw_setwidth_pix = ((fix15)(((fix31)sp_globals.imported_width * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -/* check for overflow */ -if (isw_setwidth_pix < 0) - isw_setwidth_pix = 0x7fff; /* set to maximum */ -if (!squeezed_x && ((imported_width = sp_globals.import_setwidth_act) == TRUE)) - { - isw_scale = compute_isw_scale(); - - /* look for the first non-negative oru value, scale and add the offset */ - /* to the corresponding pixel value - note that the pixel value */ - /* is set in read_oru_table. */ - - /* look at all the X edges */ - for (i=0; i < (no_X_ctrl_zones+1); i++) - if (sp_plaid.orus[i] >= 0) - { - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], isw_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - break; - } - - } -#endif - -for (i = 0; ; i++) /* For X and Y control zones... */ - { - for (j = 0; j < n; j++) /* For each zone in X or Y... */ - { - if (short_form) /* 1 byte from/to specification? */ - { - edge = NEXT_BYTE(pointer); /* Read packed from/to spec */ - start_edge = edge_org + (edge & 0x0f); /* Extract start edge */ - end_edge = edge_org + (edge >> 4); /* Extract end edge */ - } - else /* 2 byte from/to specification? */ - { - start_edge = edge_org + NEXT_BYTE(pointer); /* Read start edge */ - end_edge = edge_org + NEXT_BYTE(pointer); /* read end edge */ - } - constr_nr = constr_org + - NEXT_BYTES(pointer, tmpufix16); /* Read constraint number */ -#if INCL_SQUEEZING - if (i == 0 && squeezed_x) - calculate_x_pix(start_edge, end_edge, constr_nr, - x_scale, x_offset, ppo, setwidth_pix); - else if (i == 1 && squeezed_y) - calculate_y_pix(start_edge, end_edge,constr_nr, - y_top_scale, y_bottom_scale, ppo, em_top_pix, em_bot_pix); - else - { -#endif -#if INCL_ISW - if (i==0 && imported_width) - calculate_x_pix(start_edge, end_edge, constr_nr, - isw_scale, 0, ppo, isw_setwidth_pix); - else - { -#endif - if (!sp_globals.c_act[constr_nr]) /* Constraint inactive? */ - { - zone_pix = ((fix15)((((fix31)sp_plaid.orus[end_edge] - - (fix31)sp_plaid.orus[start_edge]) * ppo) / - (1<= sp_globals.c_pix[constr_nr]) - goto L1; - } - zone_pix = sp_globals.c_pix[constr_nr]; /* Use zone size from constr table */ - if (start_edge > end_edge) /* sp_plaid.orus[start_edge] > sp_plaid.orus[end_edge]? */ - { - zone_pix = -zone_pix; /* Use negatve zone size */ - } - L1: - /* inter-character spacing fix */ - if ((j == 0) && (i == 0)) /* if this is the 1st X zone, save rounding error */ - { /* get the non-xformed - xformed zone, in right direction */ - whole_zone = (((fix31)sp_plaid.orus[end_edge] - - (fix31)sp_plaid.orus[start_edge]) * - ppo) / (1<flags & SQUEEZE_LEFT) && - (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0; - if ((sp_globals.pspecs->flags & SQUEEZE_RIGHT) && - (sp_plaid.pix[end_edge] > setwidth_pix)) - sp_plaid.pix[end_edge] = setwidth_pix; - } - if (i == 1) /* in the y direction */ - { /* brute force squeeze */ - if ((sp_globals.pspecs->flags & SQUEEZE_TOP) && - (sp_plaid.pix[end_edge] > em_top_pix)) - sp_plaid.pix[end_edge] = em_top_pix; - if ((sp_globals.pspecs->flags & SQUEEZE_BOTTOM) && - (sp_plaid.pix[end_edge] < em_bot_pix)) - sp_plaid.pix[end_edge] = em_bot_pix; - } -#endif -#if INCL_SQUEEZING - } -#endif -#if INCL_ISW - } -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ - record_ctrl_zone( - (fix31)sp_plaid.pix[start_edge] << (16 - sp_globals.pixshift), - (fix31)sp_plaid.pix[end_edge] << (16 - sp_globals.pixshift), - (fix15)(constr_nr - constr_org)); -#endif - } - if (i) /* Y pixels done? */ - break; - edge_org = sp_globals.Y_edge_org; /* Prepare to process Y ctrl zones */ - constr_org = sp_globals.Y_constr_org; - n = no_Y_ctrl_zones; - ppo = sp_globals.tcb.yppo; - } - -#if DEBUG -printf("\nX PIX TABLE\n"); -n = no_X_ctrl_zones + 1; -for (i = 0; i < n; i++) - printf("%2d %6.1f\n", i, (real)sp_plaid.pix[i] / (real)sp_globals.onepix); -printf("\nY PIX TABLE\n"); -n = no_Y_ctrl_zones + 1; -for (i = 0; i < n; i++) - { - j = i + no_X_ctrl_zones + 1; - printf("%2d %6.1f\n", i, (real)sp_plaid.pix[j] / (real)sp_globals.onepix); - } -#endif - -return pointer; -} -#endif - - -#if INCL_RULES -FUNCTION static ufix8 FONTFAR *sp_setup_int_table( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte in interpolation zone table */ -fix15 no_X_int_zones, /* Number of X interpolation zones */ -fix15 no_Y_int_zones) /* Number of X interpolation zones */ -/* - * Called by plaid_tcb() to read the interpolation zone table from the - * character data in the font. - * Sets up a table of interpolation coefficients with one entry for - * every X or Y interpolation zone. - * Updates the pointer to the byte following the interpolation zone - * data. - */ -{ -fix15 i, j, k, l, n; -ufix8 format; -ufix8 format_copy; -ufix8 tmpufix8; -fix15 start_orus = 0; -ufix8 edge_org; -ufix8 edge; -ufix16 adj_factor; -fix15 adj_orus; -fix15 end_orus = 0; -fix31 zone_orus; -fix15 start_pix = 0; -fix15 end_pix = 0; - - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_int_zones(no_X_int_zones, no_Y_int_zones); -#endif - -i = 0; -edge_org = 0; -n = no_X_int_zones; -for (j = 0; ; j++) - { - for (k = 0; k < n; k++) - { - format = NEXT_BYTE(pointer); - if (format & BIT7) /* Short start/end point spec? */ - { - tmpufix8 = NEXT_BYTE(pointer); - edge = edge_org + (tmpufix8 & 0xf); - start_orus = sp_plaid.orus[edge]; - start_pix = sp_plaid.pix[edge]; - edge = edge_org + (tmpufix8 >> 4); - end_orus = sp_plaid.orus[edge]; - end_pix = sp_plaid.pix[edge]; - } - else /* Standard start and end point spec? */ - { - format_copy = format; - for (l = 0; ; l++) /* Loop for start and end point */ - { - switch (format_copy & 0x7) /* Decode start/end point format */ - { - - case 0: /* Index to control edge */ - edge = edge_org + NEXT_BYTE(pointer); - end_orus = sp_plaid.orus[edge]; - end_pix = sp_plaid.pix[edge]; - break; - - case 1: /* 1 byte fractional distance to next edge */ - adj_factor = 0xffff & NEXT_BYTE(pointer) << 8; - goto L1; - - - case 2: /* 2 byte fractional distance to next edge */ - adj_factor = 0xffff & NEXT_WORD(pointer); - L1: edge = edge_org + NEXT_BYTE(pointer); - end_orus = sp_plaid.orus[edge] + - ((((fix31)sp_plaid.orus[edge + 1] - (fix31)sp_plaid.orus[edge]) * - (ufix32)adj_factor + (fix31)32768) >> 16); - end_pix = sp_plaid.pix[edge] + - ((((fix31)sp_plaid.pix[edge + 1] - (fix31)sp_plaid.pix[edge]) * - (ufix32)adj_factor + (fix31)32768) >> 16); - break; - - case 3: /* 1 byte delta orus before first edge */ - adj_orus = -(fix15)NEXT_BYTE(pointer); - goto L2; - - case 4: /* 2 byte delta orus before first edge */ - adj_orus = -NEXT_WORD(pointer); - L2: edge = edge_org; - goto L4; - - case 5: /* 1 byte delta orus after last edge */ - adj_orus = (fix15)NEXT_BYTE(pointer); - goto L3; - - case 6: /* 2 byte delta orus after last edge */ - adj_orus = NEXT_WORD(pointer); - L3: edge = j? sp_globals.Y_edge_org + sp_globals.no_Y_orus - 1: sp_globals.no_X_orus - 1; - L4: end_orus = sp_plaid.orus[edge] + adj_orus; - end_pix = sp_plaid.pix[edge] + - (((fix31)adj_orus * (fix31)(j? sp_globals.tcb.yppo: sp_globals.tcb.xppo) + - sp_globals.mprnd) / (1<>= 3; /* Adj format to decode end point format */ - start_orus = end_orus; /* Save start point oru value */ - start_pix = end_pix; /* Save start point pixel value */ - } - } -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ - record_int_zone( - (fix31)start_pix << (16 - sp_globals.pixshift), - (fix31)end_pix << (16 - sp_globals.pixshift)); -#endif - zone_orus = (fix31)end_orus - (fix31)start_orus; - sp_plaid.mult[i] = ((((fix31)end_pix - (fix31)start_pix) << sp_globals.mpshift) + - (zone_orus / 2)) / zone_orus; - sp_plaid.offset[i] = - (((((fix31)start_pix + (fix31)end_pix) << sp_globals.mpshift) - - ((fix31)sp_plaid.mult[i] * ((fix31)start_orus + (fix31)end_orus))) / 2) + - sp_globals.mprnd; - i++; - } - if (j) /* Finished? */ - break; - edge_org = sp_globals.Y_edge_org; /* Prepare to process Y ctrl zones */ - n = no_Y_int_zones; - } - -#if DEBUG -printf("\nX INT TABLE\n"); -n = no_X_int_zones; -for (i = 0; i < n; i++) - { - printf("%2d %7.4f %7.4f\n", i, - (real)sp_plaid.mult[i] / (real)(1 << sp_globals.multshift), - (real)sp_plaid.offset[i] / (real)(1 << sp_globals.multshift)); - } -printf("\nY INT TABLE\n"); -n = no_Y_int_zones; -for (i = 0; i < n; i++) - { - j = i + no_X_int_zones; - printf("%2d %7.4f %7.4f\n", i, - (real)sp_plaid.mult[j] / (real)(1 << sp_globals.multshift), - (real)sp_plaid.offset[j] / (real)(1 << sp_globals.multshift)); - } -#endif - -return pointer; -} -#endif -#if INCL_ISW -FUNCTION fix31 compute_isw_scale() -GDECL -{ -fix31 isw_scale; - -if (sp_globals.setwidth_orus == 0) - isw_scale = 0x00010000; -else - isw_scale = ((fix31)sp_globals.imported_width << 16)/ - (fix31)sp_globals.setwidth_orus; -return isw_scale; -} -#endif diff --git a/nx-X11/lib/font/Speedo/spdo_prv.h b/nx-X11/lib/font/Speedo/spdo_prv.h deleted file mode 100644 index 162c0fddd..000000000 --- a/nx-X11/lib/font/Speedo/spdo_prv.h +++ /dev/null @@ -1,421 +0,0 @@ -/* $Xorg: spdo_prv.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/spdo_prv.h,v 1.4 1999/03/14 03:21:17 dawes Exp $ */ - - - -/***************************** S P D O _ P R V . H *******************************/ - -#include "speedo.h" /* include public definitions */ - -/***** CONFIGURATION DEFINITIONS *****/ - - -/***** PRIVATE FONT HEADER OFFSET CONSTANTS *****/ -#define FH_ORUMX 0 /* U Max ORU value 2 bytes */ -#define FH_PIXMX 2 /* U Max Pixel value 2 bytes */ -#define FH_CUSNR 4 /* U Customer Number 2 bytes */ -#define FH_OFFCD 6 /* E Offset to Char Directory 3 bytes */ -#define FH_OFCNS 9 /* E Offset to Constraint Data 3 bytes */ -#define FH_OFFTK 12 /* E Offset to Track Kerning 3 bytes */ -#define FH_OFFPK 15 /* E Offset to Pair Kerning 3 bytes */ -#define FH_OCHRD 18 /* E Offset to Character Data 3 bytes */ -#define FH_NBYTE 21 /* E Number of Bytes in File 3 bytes */ - - -/***** MODE FLAGS CONSTANTS *****/ -#define CURVES_OUT 0X0008 /* Output module accepts curves */ -#define BOGUS_MODE 0X0010 /* Linear scaling mode */ -#define CONSTR_OFF 0X0020 /* Inhibit constraint table */ -#define IMPORT_WIDTHS 0X0040 /* Imported width mode */ -#define SQUEEZE_LEFT 0X0100 /* Squeeze left mode */ -#define SQUEEZE_RIGHT 0X0200 /* Squeeze right mode */ -#define SQUEEZE_TOP 0X0400 /* Squeeze top mode */ -#define SQUEEZE_BOTTOM 0X0800 /* Squeeze bottom mode */ -#define CLIP_LEFT 0X1000 /* Clip left mode */ -#define CLIP_RIGHT 0X2000 /* Clip right mode */ -#define CLIP_TOP 0X4000 /* Clip top mode */ -#define CLIP_BOTTOM 0X8000 /* Clip bottom mode */ - - -/***** MACRO DEFINITIONS *****/ - -#define SQUEEZE_MULT(A,B) (((fix31)A * (fix31)B) / (1 << 16)) - -#define NEXT_BYTE(A) (*(A)++) - -#define NEXT_WORD(A) \ - ((fix15)(sp_globals.key32 ^ ((A) += 2, \ - ((fix15)((A)[-1]) << 8) | (fix15)((A)[-2]) | \ - ((A)[-1] & 0x80? ~0xFFFF : 0)))) - -#if INCL_EXT /* Extended fonts supported? */ - -#define NEXT_BYTES(A, B) \ - (((B = (ufix16)(*(A)++) ^ sp_globals.key7) >= 248)? \ - ((ufix16)(B & 0x07) << 8) + ((*(A)++) ^ sp_globals.key8) + 248: \ - B) - -#else /* Compact fonts only supported? */ - -#define NEXT_BYTES(A, B) ((*(A)++) ^ sp_globals.key7) - -#endif - - -#define NEXT_BYTE_U(A) (*(A)++) - -#define NEXT_WORD_U(A, B) \ - (fix15)(B = (*(A)++) << 8, (fix15)(*(A)++) + B) - -#define NEXT_CHNDX(A, B) \ - ((B)? (ufix16)NEXT_WORD(A): (ufix16)NEXT_BYTE(A)) - -/* Multiply (fix15)X by (fix15)Y to produce (fix31)product */ -#define MULT16(X, Y) \ - ((fix31)X * (fix31)Y) - -/* Multiply (fix15)X by (fix15)MULT, add (fix31)OFFSET, - * shift right SHIFT bits to produce (fix15)result */ -#define TRANS(X, MULT, OFFSET, SHIFT) \ - ((fix15)((((fix31)X * (fix31)MULT) + OFFSET) / (1 << SHIFT))) - -/****************************************************************************** - * - * the following block of definitions redefines every function - * reference to be prefixed with an "sp_". In addition, if this - * is a reentrant version, the parameter sp_globals will be added - * as the first parameter. - * - *****************************************************************************/ - -#if STATIC_ALLOC || DYNAMIC_ALLOC - -#define GDECL - -#define get_char_id(char_index) sp_get_char_id(char_index) -#define get_char_width(char_index) sp_get_char_width(char_index) -#define get_track_kern(track,point_size) sp_get_track_kern(track,point_size) -#define get_pair_kern(char_index1,char_index2) sp_get_pair_kern(char_index1,char_index2) -#define get_char_bbox(char_index,bbox) sp_get_char_bbox(char_index,bbox) -#define make_char(char_index) sp_make_char(char_index) -#if INCL_ISW -#define compute_isw_scale() sp_compute_isw_scale() -#define do_make_char(char_index) sp_do_make_char(char_index) -#define make_char_isw(char_index,imported_width) sp_make_char_isw(char_index,imported_width) -#define reset_xmax(xmax) sp_reset_xmax(xmax) -#endif -#if INCL_ISW || INCL_SQUEEZING -#define preview_bounding_box(pointer,format) sp_preview_bounding_box(pointer,format) -#endif -#define make_simp_char(pointer,format) sp_make_simp_char(pointer,format) -#define make_comp_char(pointer) sp_make_comp_char(pointer) -#define get_char_org(char_index,top_level) sp_get_char_org(char_index,top_level) -#define get_posn_arg(ppointer,format) sp_get_posn_arg(ppointer,format) -#define get_scale_arg(ppointer,format) sp_get_scale_arg(ppointer,format) -#define read_bbox(ppointer,pPmin,pPmax,set_flag) sp_read_bbox(ppointer,pPmin,pPmax,set_flag) -#define proc_outl_data(pointer) sp_proc_outl_data(pointer) -#define split_curve(P1,P2,P3,depth) sp_split_curve(P1,P2,P3,depth) -#define get_args(ppointer,format,pP) sp_get_args(ppointer,format,pP) - -#define init_black(specsarg) sp_init_black(specsarg) -#define begin_char_black(Psw,Pmin,Pmax) sp_begin_char_black(Psw,Pmin,Pmax) -#define begin_contour_black(P1,outside) sp_begin_contour_black(P1,outside) -#define line_black(P1) sp_line_black(P1) -#define end_char_black() sp_end_char_black() -#define add_intercept_black(y,x) sp_add_intercept_black(y,x) -#define proc_intercepts_black() sp_proc_intercepts_black() - -#define init_screen(specsarg) sp_init_screen(specsarg) -#define begin_char_screen(Psw,Pmin,Pmax) sp_begin_char_screen(Psw,Pmin,Pmax) -#define begin_contour_screen(P1,outside) sp_begin_contour_screen(P1,outside) -#define curve_screen(P1,P2,P3,depth) sp_curve_screen(P1,P2,P3,depth) -#define scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) sp_scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) -#define vert_line_screen(x,y1,y2) sp_vert_line_screen(x,y1,y2) -#define line_screen(P1) sp_line_screen(P1) -#define end_contour_screen() sp_end_contour_screen() -#define end_char_screen() sp_end_char_screen() -#define add_intercept_screen(y,x) sp_add_intercept_screen(y,x) -#define proc_intercepts_screen() sp_proc_intercepts_screen() - -#define init_outline(specsarg) sp_init_outline(specsarg) -#define begin_char_outline(Psw,Pmin,Pmax) sp_begin_char_outline(Psw,Pmin,Pmax) -#define begin_sub_char_outline(Psw,Pmin,Pmax) sp_begin_sub_char_outline(Psw,Pmin,Pmax) -#define begin_contour_outline(P1,outside) sp_begin_contour_outline(P1,outside) -#define curve_outline(P1,P2,P3,depth) sp_curve_outline(P1,P2,P3,depth) -#define line_outline(P1) sp_line_outline(P1) -#define end_contour_outline() sp_end_contour_outline() -#define end_sub_char_outline() sp_end_sub_char_outline() -#define end_char_outline() sp_end_char_outline() - -#define init_2d(specsarg) sp_init_2d(specsarg) -#define begin_char_2d(Psw, Pmin, Pmax) sp_begin_char_2d(Psw, Pmin, Pmax) -#define begin_contour_2d(P1, outside) sp_begin_contour_2d(P1, outside) -#define line_2d(P1) sp_line_2d(P1) -#define end_char_2d() sp_end_char_2d() -#define add_intercept_2d(y, x) sp_add_intercept_2d(y, x) -#define proc_intercepts_2d() sp_proc_intercepts_2d() -#define draw_vector_to_2d(x0, y0, x1, y1, band) sp_draw_vector_to_2d(x0, y0, x1, y1, band) - -#define init_char_out(Psw,Pmin,Pmax) sp_init_char_out(Psw,Pmin,Pmax) -#define begin_sub_char_out(Psw,Pmin,Pmax) sp_begin_sub_char_out(Psw,Pmin,Pmax) -#define curve_out(P1,P2,P3,depth) sp_curve_out(P1,P2,P3,depth) -#define end_contour_out() sp_end_contour_out() -#define end_sub_char_out() sp_end_sub_char_out() -#define init_intercepts_out() sp_init_intercepts_out() -#define restart_intercepts_out() sp_restart_intercepts_out() -#define set_first_band_out(Pmin,Pmax) sp_set_first_band_out(Pmin,Pmax) -#define reduce_band_size_out() sp_reduce_band_size_out() -#define next_band_out() sp_next_band_out() - -#define init_userout(specsarg) sp_init_userout(specsarg) - -#define reset() sp_reset() -#define set_key(key) sp_set_key(key) -#define get_cust_no(font_buff) sp_get_cust_no(font_buff) -#define set_specs(specsarg) sp_set_specs(specsarg) -#define setup_consts(xmin,xmax,ymin,ymax) sp_setup_consts(xmin,xmax,ymin,ymax) -#define setup_tcb(ptcb) sp_setup_tcb(ptcb) -#define setup_mult(input_mult) sp_setup_mult(input_mult) -#define setup_offset(input_offset) sp_setup_offset(input_offset) -#define type_tcb(ptcb) sp_type_tcb(ptcb) -#define read_long(pointer) sp_read_long(pointer) -#define read_word_u(pointer) sp_read_word_u(pointer) -#define init_tcb() sp_init_tcb() -#define scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) sp_scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) -#define plaid_tcb(ppointer,format) sp_plaid_tcb(ppointer,format) -#define skip_orus(ppointer,short_form,no_ctrl_zones) sp_skip_orus(ppointer,short_form,no_ctrl_zones) -#define skip_interpolation_table(ppointer,format) sp_skip_interpolation_table(ppointer,format) -#define skip_control_zone(ppointer,format) sp_skip_control_zone(ppointer,format) -#define constr_update() sp_constr_update() -#define read_oru_table(ppointer) sp_read_oru_table(ppointer) -#define calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) sp_calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) -#define calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) sp_calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) -#define calculate_x_scale(x_factor,x_offset,no_x_ctrl_zones) sp_calculate_x_scale(x_factor,x_offset,no_x_ctrl_zones) -#define calculate_y_scale(top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) sp_calculate_y_scale(top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) -#define setup_pix_table(ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) sp_setup_pix_table(ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) -#define setup_int_table(ppointer,no_X_int_zones, no_Y_int_zones) sp_setup_int_table(ppointer,no_X_int_zones, no_Y_int_zones) - -#define fn_init_out(specsarg) (*sp_globals.init_out)(specsarg) -#define fn_begin_char(Psw,Pmin,Pmax) (*sp_globals.begin_char)(Psw,Pmin,Pmax) -#define fn_begin_sub_char(Psw,Pmin,Pmax) (*sp_globals.begin_sub_char)(Psw,Pmin,Pmax) -#define fn_end_sub_char() (*sp_globals.end_sub_char)() -#define fn_end_char() (*sp_globals.end_char)() -#define fn_line(P1) (*sp_globals.line)(P1) -#define fn_end_contour() (*sp_globals.end_contour)() -#define fn_begin_contour(P0,fmt) (*sp_globals.begin_contour)(P0,fmt) -#define fn_curve(P1,P2,P3,depth) (*sp_globals.curve)(P1,P2,P3,depth) - -#define load_char_data(offset, no_bytes, buff_off) sp_load_char_data(offset, no_bytes, buff_off) -#define report_error(n) sp_report_error(n) - -#if INCL_MULTIDEV - -#define set_bitmap_device(bfuncs,size) sp_set_bitmap_device(bfuncs,size) -#define set_outline_device(ofuncs,size) sp_set_outline_device(ofuncs,size) - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) (*sp_globals.bitmap_device.p_open_bitmap)(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2) (*sp_globals.bitmap_device.p_set_bits)(y, xbit1, xbit2) -#define close_bitmap() (*sp_globals.bitmap_device.p_close_bitmap)() - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) (*sp_globals.outline_device.p_open_outline)(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char() (*sp_globals.outline_device.p_start_char)() -#define start_contour(x,y,outside) (*sp_globals.outline_device.p_start_contour)(x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3) (*sp_globals.outline_device.p_curve)(x1,y1,x2,y2,x3,y3) -#define line_to(x,y) (*sp_globals.outline_device.p_line)(x,y) -#define close_contour() (*sp_globals.outline_device.p_close_contour)() -#define close_outline() (*sp_globals.outline_device.p_close_outline)() - -#else - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2) sp_set_bitmap_bits(y, xbit1, xbit2) -#define close_bitmap() sp_close_bitmap() - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char() sp_start_new_char() -#define start_contour(x,y,outside) sp_start_contour(x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3) sp_curve_to(x1,y1,x2,y2,x3,y3) -#define line_to(x,y) sp_line_to(x,y) -#define close_contour() sp_close_contour() -#define close_outline() sp_close_outline() - -#endif - -#else - -#define GDECL SPEEDO_GLOBALS* sp_global_ptr, - -#define get_char_id(char_index) sp_get_char_id(sp_global_ptr,char_index) -#define get_char_width(char_index) sp_get_char_width(sp_global_ptr,char_index) -#define get_track_kern(track,point_size) sp_get_track_kern(sp_global_ptr,track,point_size) -#define get_pair_kern(char_index1,char_index2) sp_get_pair_kern(sp_global_ptr,char_index1,char_index2) -#define get_char_bbox(char_index,bbox) sp_get_char_bbox(sp_global_ptr,char_index,bbox) -#define make_char(char_index) sp_make_char(sp_global_ptr,char_index) -#if INCL_ISW -#define compute_isw_scale() sp_compute_isw_scale(sp_global_ptr) -#define do_make_char(char_index) sp_do_make_char(sp_global_ptr,char_index) -#define make_char_isw(char_index,imported_width) sp_make_char_isw(sp_global_ptr,char_index,imported_width) -#define reset_xmax(xmax) sp_reset_xmax(sp_global_ptr,xmax) -#endif -#if INCL_ISW || INCL_SQUEEZING -#define preview_bounding_box(pointer,format) sp_preview_bounding_box(sp_global_ptr,pointer,format) -#endif -#define make_simp_char(pointer,format) sp_make_simp_char(sp_global_ptr,pointer,format) -#define make_comp_char(pointer) sp_make_comp_char(sp_global_ptr,pointer) -#define get_char_org(char_index,top_level) sp_get_char_org(sp_global_ptr,char_index,top_level) -#define get_posn_arg(ppointer,format) sp_get_posn_arg(sp_global_ptr,ppointer,format) -#define get_scale_arg(ppointer,format) sp_get_scale_arg(sp_global_ptr,ppointer,format) -#define read_bbox(ppointer,pPmin,pPmax,set_flag) sp_read_bbox(sp_global_ptr,ppointer,pPmin,pPmax,set_flag) -#define proc_outl_data(pointer) sp_proc_outl_data(sp_global_ptr,pointer) -#define split_curve(P1,P2,P3,depth) sp_split_curve(sp_global_ptr,P1,P2,P3,depth) -#define get_args(ppointer,format,pP) sp_get_args(sp_global_ptr,ppointer,format,pP) - -#define init_black(specsarg) sp_init_black(sp_global_ptr,specsarg) -#define begin_char_black(Psw,Pmin,Pmax) sp_begin_char_black(sp_global_ptr,Psw,Pmin,Pmax) -#define begin_contour_black(P1,outside) sp_begin_contour_black(sp_global_ptr,P1,outside) -#define line_black(P1) sp_line_black(sp_global_ptr,P1) -#define end_char_black() sp_end_char_black(sp_global_ptr) -#define add_intercept_black(y,x) sp_add_intercept_black(sp_global_ptr,y,x) -#define proc_intercepts_black() sp_proc_intercepts_black(sp_global_ptr) - -#define init_screen(specsarg) sp_init_screen(sp_global_ptr,specsarg) -#define begin_char_screen(Psw,Pmin,Pmax) sp_begin_char_screen(sp_global_ptr,Psw,Pmin,Pmax) -#define begin_contour_screen(P1,outside) sp_begin_contour_screen(sp_global_ptr,P1,outside) -#define curve_screen(P1,P2,P3,depth) sp_curve_screen(sp_global_ptr,P1,P2,P3,depth) -#define scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) sp_scan_curve_screen(sp_global_ptr,X0,Y0,X1,Y1,X2,Y2,X3,Y3) -#define vert_line_screen(x,y1,y2) sp_vert_line_screen(sp_global_ptr,x,y1,y2) -#define line_screen(P1) sp_line_screen(sp_global_ptr,P1) -#define end_char_screen() sp_end_char_screen(sp_global_ptr) -#define end_contour_screen() sp_end_contour_screen(sp_global_ptr) -#define add_intercept_screen(y,x) sp_add_intercept_screen(sp_global_ptr,y,x) -#define proc_intercepts_screen() sp_proc_intercepts_screen(sp_global_ptr) - -#define init_outline(specsarg) sp_init_outline(sp_global_ptr,specsarg) -#define begin_char_outline(Psw,Pmin,Pmax) sp_begin_char_outline(sp_global_ptr,Psw,Pmin,Pmax) -#define begin_sub_char_outline(Psw,Pmin,Pmax) sp_begin_sub_char_outline(sp_global_ptr,Psw,Pmin,Pmax) -#define begin_contour_outline(P1,outside) sp_begin_contour_outline(sp_global_ptr,P1,outside) -#define curve_outline(P1,P2,P3,depth) sp_curve_outline(sp_global_ptr,P1,P2,P3,depth) -#define line_outline(P1) sp_line_outline(sp_global_ptr,P1) -#define end_contour_outline() sp_end_contour_outline(sp_global_ptr) -#define end_sub_char_outline() sp_end_sub_char_outline(sp_global_ptr) -#define end_char_outline() sp_end_char_outline(sp_global_ptr) - -#define init_2d(specsarg) sp_init_2d(sp_global_ptr,specsarg) -#define begin_char_2d(Psw, Pmin, Pmax) sp_begin_char_2d(sp_global_ptr,Psw, Pmin, Pmax) -#define begin_contour_2d(P1, outside) sp_begin_contour_2d(sp_global_ptr,P1, outside) -#define line_2d(P1) sp_line_2d(sp_global_ptr,P1) -#define end_char_2d() sp_end_char_2d(sp_global_ptr) -#define add_intercept_2d(y, x) sp_add_intercept_2d(sp_global_ptr,y, x) -#define proc_intercepts_2d() sp_proc_intercepts_2d(sp_global_ptr) -#define draw_vector_to_2d(x0, y0, x1, y1, band) sp_draw_vector_to_2d(sp_global_ptr,x0, y0, x1, y1, band) - -#define init_char_out(Psw,Pmin,Pmax) sp_init_char_out(sp_global_ptr,Psw,Pmin,Pmax) -#define begin_sub_char_out(Psw,Pmin,Pmax) sp_begin_sub_char_out(sp_global_ptr,Psw,Pmin,Pmax) -#define curve_out(P1,P2,P3,depth) sp_curve_out(sp_global_ptr,P1,P2,P3,depth) -#define end_contour_out() sp_end_contour_out(sp_global_ptr) -#define end_sub_char_out() sp_end_sub_char_out(sp_global_ptr) -#define init_intercepts_out() sp_init_intercepts_out(sp_global_ptr) -#define restart_intercepts_out() sp_restart_intercepts_out(sp_global_ptr) -#define set_first_band_out(Pmin,Pmax) sp_set_first_band_out(sp_global_ptr,Pmin,Pmax) -#define reduce_band_size_out() sp_reduce_band_size_out(sp_global_ptr) -#define next_band_out() sp_next_band_out(sp_global_ptr) - -#define init_userout(specsarg) sp_init_userout(sp_global_ptr,specsarg) - -#define reset() sp_reset(sp_global_ptr) -#define set_key(key) sp_set_key(sp_global_ptr,key) -#define get_cust_no(font_buff) sp_get_cust_no(sp_global_ptr,font_buff) -#define set_specs(specsarg) sp_set_specs(sp_global_ptr,specsarg) -#define setup_consts(xmin,xmax,ymin,ymax) sp_setup_consts(sp_global_ptr,xmin,xmax,ymin,ymax) -#define setup_tcb(ptcb) sp_setup_tcb(sp_global_ptr,ptcb) -#define setup_mult(input_mult) sp_setup_mult(sp_global_ptr,input_mult) -#define setup_offset(input_offset) sp_setup_offset(sp_global_ptr,input_offset) -#define type_tcb(ptcb) sp_type_tcb(sp_global_ptr,ptcb) -#define read_long(pointer) sp_read_long(sp_global_ptr,pointer) -#define read_word_u(pointer) sp_read_word_u(sp_global_ptr,pointer) -#define init_tcb() sp_init_tcb(sp_global_ptr) -#define scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) sp_scale_tcb(sp_global_ptr,ptcb,x_pos,y_pos,x_scale,y_scale) -#define plaid_tcb(ppointer,format) sp_plaid_tcb(sp_global_ptr,ppointer,format) -#define skip_orus(ppointer,short_form,no_ctrl_zones) sp_skip_orus(sp_global_ptr,ppointer,short_form,no_ctrl_zones) -#define skip_interpolation_table(ppointer,format) sp_skip_interpolation_table(sp_global_ptr,ppointer,format) -#define skip_control_zone(ppointer,format) sp_skip_control_zone(sp_global_ptr,ppointer,format) -#define constr_update() sp_constr_update(sp_global_ptr) -#define read_oru_table(ppointer) sp_read_oru_table(sp_global_ptr,ppointer) -#define calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) sp_calculate_x_pix(sp_global_ptr,start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) -#define calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) sp_calculate_y_pix(sp_global_ptr,start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) -#define calculate_x_scale(x_factor,x_offset,no_x_ctrl_zones) sp_calculate_x_scale(sp_global_ptr,x_factor,x_offset,no_x_ctrl_zones) -#define calculate_y_scale(top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) sp_calculate_y_scale(sp_global_ptr,top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) -#define setup_pix_table(ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) sp_setup_pix_table(sp_global_ptr,ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) -#define setup_int_table(ppointer,no_X_int_zones, no_Y_int_zones) sp_setup_int_table(sp_global_ptr,ppointer,no_X_int_zones, no_Y_int_zones) - -#define fn_init_out(specsarg) (*sp_globals.init_out)(sp_global_ptr,specsarg) -#define fn_begin_char(Psw,Pmin,Pmax) (*sp_globals.begin_char)(sp_global_ptr,Psw,Pmin,Pmax) -#define fn_begin_sub_char(Psw,Pmin,Pmax) (*sp_globals.begin_sub_char)(sp_global_ptr,Psw,Pmin,Pmax) -#define fn_end_sub_char() (*sp_globals.end_sub_char)(sp_global_ptr) -#define fn_end_char() (*sp_globals.end_char)(sp_global_ptr) -#define fn_line(P1) (*sp_globals.line)(sp_global_ptr,P1) -#define fn_end_contour() (*sp_globals.end_contour)(sp_global_ptr) -#define fn_begin_contour(P0,fmt) (*sp_globals.begin_contour)(sp_global_ptr,P0,fmt) -#define fn_curve(P1,P2,P3,depth) (*sp_globals.curve)(sp_global_ptr,P1,P2,P3,depth) - - -#define load_char_data(offset, no_bytes, buff_off) sp_load_char_data(sp_global_ptr, offset, no_bytes, buff_off) -#define report_error(n) sp_report_error(sp_global_ptr, n) - -#if INCL_MULTIDEV - -#define set_bitmap_device(bfuncs,size) sp_set_bitmap_device(sp_global_ptr,bfuncs,size) -#define set_outline_device(ofuncs,size) sp_set_outline_device(sp_global_ptr,ofuncs,size) - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax)(*sp_globals.bitmap_device.p_open_bitmap)(sp_global_ptr,x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2)(*sp_globals.bitmap_device.p_set_bits)(sp_global_ptr,y, xbit1, xbit2) -#define close_bitmap()(*sp_globals.bitmap_device.p_close_bitmap)(sp_global_ptr) - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax)(*sp_globals.outline_device.p_open_outline)(sp_global_ptr,x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char()(*sp_globals.outline_device.p_start_char)(sp_global_ptr) -#define start_contour(x,y,outside)(*sp_globals.outline_device.p_start_contour)(sp_global_ptr,x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3)(*sp_globals.outline_device.p_curve)(sp_global_ptr,x1,y1,x2,y2,x3,y3) -#define line_to(x,y)(*sp_globals.outline_device.p_line)(sp_global_ptr,x,y) -#define close_contour()(*sp_globals.outline_device.p_close_contour)(sp_global_ptr) -#define close_outline()(*sp_globals.outline_device.p_close_outline)(sp_global_ptr) - -#else - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_bitmap(sp_global_ptr, x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2) sp_set_bitmap_bits(sp_global_ptr, y, xbit1, xbit2) -#define close_bitmap() sp_close_bitmap(sp_global_ptr) - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_outline(sp_global_ptr, x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char() sp_start_new_char(sp_global_ptr ) -#define start_contour(x,y,outside) sp_start_contour(sp_global_ptr, x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3) sp_curve_to(sp_global_ptr, x1,y1,x2,y2,x3,y3) -#define line_to(x,y) sp_line_to(sp_global_ptr, x,y) -#define close_contour() sp_close_contour(sp_global_ptr) -#define close_outline() sp_close_outline(sp_global_ptr) - -#endif -#endif - - diff --git a/nx-X11/lib/font/Speedo/speedo.h b/nx-X11/lib/font/Speedo/speedo.h deleted file mode 100644 index 5eb516c1c..000000000 --- a/nx-X11/lib/font/Speedo/speedo.h +++ /dev/null @@ -1,890 +0,0 @@ -/* $Xorg: speedo.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.5 2001/01/17 19:43:18 dawes Exp $ */ - -#ifndef _SPEEDO_H_ -#define _SPEEDO_H_ - -#include - -/***************************** S P E E D O . H ******************************* - ****************************************************************************/ - -/***** USER OPTIONS OVERRIDE DEFAULTS ******/ -#include "useropt.h" - -/***** CONFIGURATION DEFINITIONS *****/ - -#ifndef INCL_CLIPPING -#define INCL_CLIPPING 0 /* 0 indicates CLIPPING code is not compiled in*/ -#endif - -#ifndef INCL_SQUEEZING -#define INCL_SQUEEZING 0 /* 0 indicates SQUEEZE code is not compiled in*/ -#endif - -#ifndef INCL_EXT -#define INCL_EXT 1 /* 1 to include extended font support */ -#endif /* 0 to omit extended font support */ - -#ifndef INCL_RULES -#define INCL_RULES 1 /* 1 to include intelligent scaling support */ -#endif /* 0 to omit intelligent scaling support */ - -#ifndef INCL_BLACK -#define INCL_BLACK 1 /* 1 to include blackwriter output support */ -#endif /* 0 to omit output mode 0 support */ - -#ifndef INCL_SCREEN -#define INCL_SCREEN 0 /* 1 to include screen writeroutput support */ -#endif /* 0 to omit support */ - -#ifndef INCL_OUTLINE -#define INCL_OUTLINE 0 /* 1 to include outline output support */ -#endif /* 0 to omit output mode 2 support */ - -#ifndef INCL_2D -#define INCL_2D 0 /* 1 to include 2d blackwriter output support */ -#endif /* 0 to omit output mode 3 support */ - -#ifndef INCL_USEROUT -#define INCL_USEROUT 0 /* 1 to include user defined output module support */ -#endif /* 0 to omit user defined output module support */ - -#ifndef INCL_LCD -#define INCL_LCD 1 /* 1 to include load char data support*/ -#endif /* 0 to omit load char data support */ -#ifndef INCL_ISW -#define INCL_ISW 0 /* 1 to include imported width support */ -#endif /* 0 to omit imported width support */ - -#ifndef INCL_METRICS -#define INCL_METRICS 1 /* 1 to include metrics support */ -#endif /* 0 to omit metrics support */ - -#ifndef INCL_KEYS -#define INCL_KEYS 0 /* 1 to include multi key support */ -#endif /* 0 to omit multi key support */ - -#ifndef INCL_MULTIDEV -#define INCL_MULTIDEV 0 /* 1 to include multiple output device support */ -#endif /* 0 to omit multi device support */ - -#ifndef SHORT_LISTS -#define SHORT_LISTS 1 /* 1 to allocate small intercept lists */ -#endif - -#ifndef INCL_PLAID_OUT -#define INCL_PLAID_OUT 0 /* 1 to include plaid data monitoring */ -#endif /* 0 to omit plaid data monitoring */ - -#ifndef FONTFAR /* if Intel mixed memory model implementation */ -#define FONTFAR /* pointer type modifier for font buffer */ -#endif - -#ifndef STACKFAR /* if Intel mixed memory model implementation */ -#define STACKFAR /* pointer type modifier for font buffer */ -#endif - -#ifndef GLOBALFAR -#define GLOBALFAR -#endif - -#define MODE_BLACK 0 -#define MODE_SCREEN MODE_BLACK + INCL_BLACK -#define MODE_OUTLINE MODE_SCREEN + INCL_SCREEN -#define MODE_2D MODE_OUTLINE + INCL_OUTLINE - -#ifdef DYNAMIC_ALLOC -#if DYNAMIC_ALLOC -#define STATIC_ALLOC 0 -#endif -#endif - -#ifdef REENTRANT_ALLOC -#if REENTRANT_ALLOC -#define STATIC_ALLOC 0 -#endif -#endif - -#ifndef STATIC_ALLOC -#define STATIC_ALLOC 1 -#endif - -#ifndef DYNAMIC_ALLOC -#define DYNAMIC_ALLOC 0 -#endif - -#ifndef REENTRANT_ALLOC -#define REENTRANT_ALLOC 0 -#endif - -/***** TYPE DEFINITIONS *****/ - -#ifndef STDEF -#ifndef SPD_BMAP - -typedef INT8 fix7; - -typedef double real; - -typedef CARD8 ufix8; -#ifndef VFONT -typedef CARD8 boolean; -#endif -#endif - -typedef INT16 fix15; - -typedef CARD16 ufix16; - -typedef INT32 fix31; - -typedef CARD32 ufix32; -#endif - -/***** GENERAL CONSTANTS *****/ - -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#ifndef NULL -#include -#endif - -#define FUNCTION - -#define BIT0 0x01 -#define BIT1 0x02 -#define BIT2 0x04 -#define BIT3 0x08 -#define BIT4 0x10 -#define BIT5 0x20 -#define BIT6 0x40 -#define BIT7 0x80 - -#if INCL_EXT /* Extended fonts supported? */ - -#define MAX_CONSTR 750 /* Max constraints (incl 4 dummies) */ -#define MAX_CTRL_ZONES 256 /* Max number of controlled orus */ -#define MAX_INT_ZONES 256 /* Max number of interpolation zones */ - -#else /* Compact fonts only supported */ - -#define MAX_CONSTR 512 /* Max constraints (incl 4 dummies) */ -#define MAX_CTRL_ZONES 64 /* Max number of controlled orus */ -#define MAX_INT_ZONES 64 /* Max number of interpolation zones */ - -#endif - -#define SCALE_SHIFT 12 /* Binary point positiion for scale values */ -#define SCALE_RND 2048 /* Rounding bit for scaling transformation */ -#define ONE_SCALE 4096 /* Unity scale value */ - -#ifdef INCL_SCREEN /* constants used by Screenwriter module */ -#define LEFT_INT 1 /* left intercept */ -#define END_INT 2 /* last intercept */ -#define FRACTION 0xFC /* fractional portion of intercept type list */ -#endif - -#if INCL_SQUEEZING || INCL_CLIPPING /* constants used by SQUEEZEing code */ -#define EM_TOP 764 -#define EM_BOT -236 -#endif - -/***** STRUCTURE DEFINITIONS *****/ -#if REENTRANT_ALLOC -#define PROTO_DECL1 struct speedo_global_data GLOBALFAR *sp_global_ptr -#define PROTO_DECL2 PROTO_DECL1 , -#else -#define PROTO_DECL1 void -#define PROTO_DECL2 -#endif - -typedef -struct buff_tag - { - ufix8 FONTFAR *org; /* Pointer to start of buffer */ - ufix32 no_bytes; /* Size of buffer in bytes */ - } -buff_t; /* Buffer descriptor */ - -typedef struct constr_tag - { - ufix8 FONTFAR *org; /* Pointer to first byte in constr data */ - ufix16 font_id; /* Font id for calculated data */ - fix15 xppo; /* X pixels per oru for calculated data */ - fix15 yppo; /* Y pixels per oru for calculated data */ - boolean font_id_valid; /* TRUE if font id valid */ - boolean data_valid; /* TRUE if calculated data valid */ - boolean active; /* TRUE if constraints enabled */ - } -constr_t; /* Constraint data state */ - -typedef struct kern_tag - { - ufix8 FONTFAR *tkorg; /* First byte of track kerning data */ - ufix8 FONTFAR *pkorg; /* First byte of pair kerning data */ - fix15 no_tracks; /* Number of kerning tracks */ - fix15 no_pairs; /* Number of kerning pairs */ - } -kern_t; /* Kerning control block */ - -typedef struct specs_tag - { - buff_t STACKFAR *pfont; /* Pointer to font data */ - fix31 xxmult; /* Coeff of X orus to compute X pix */ - fix31 xymult; /* Coeff of Y orus to compute X pix */ - fix31 xoffset; /* Constant to compute X pix */ - fix31 yxmult; /* Coeff of X orus to compute Y pix */ - fix31 yymult; /* Coeff of Y orus to compute Y pix */ - fix31 yoffset; /* Constant to compute Y pix */ - ufix32 flags; /* Mode flags: */ - /* Bit 0 - 2: Output module selector: */ - /* Bit 3: Send curves to output module*/ - /* Bit 4: Use linear scaling if set */ - /* Bit 5: Inhibit constraint table */ - /* Bit 6: Import set width if set */ - /* Bit 7: not used */ - /* Bit 8: Squeeze left if set */ - /* Bit 9: Squeeze right if set */ - /* Bit 10: Squeeze top if set */ - /* Bit 11: Squeeze bottom if set */ - /* Bit 12: Clip left if set */ - /* Bit 13: Clip right if set */ - /* Bit 14: Clip top if set */ - /* Bit 15: Clip bottom if set */ - /* Bits 16-31 not used */ - void *out_info; /* information for output module */ - } -specs_t; /* Specs structure for fw_set_specs */ - -typedef struct tcb_tag - { - fix15 xxmult; /* Linear coeff of Xorus to compute Xpix */ - fix15 xymult; /* Linear coeff of Yorus to compute Xpix */ - fix31 xoffset; /* Linear constant to compute Xpix */ - fix15 yxmult; /* Linear coeff of Xorus to compute Ypix */ - fix15 yymult; /* Linear coeff of Yorus to compute Ypix */ - fix31 yoffset; /* Linear constant to compute Ypix */ - fix15 xppo; /* Pixels per oru in X dimension of char */ - fix15 yppo; /* Pixels per oru in Y dimension of char */ - fix15 xpos; /* Origin in X dimension of character */ - fix15 ypos; /* Origin in Y dimension of character */ - ufix16 xtype; /* Transformation type for X oru coords */ - ufix16 ytype; /* Transformation type for Y oru coords */ - ufix16 xmode; /* Transformation mode for X oru coords */ - ufix16 ymode; /* Transformation mode for Y oru coords */ - fix15 mirror; /* Transformation creates mirror image */ - } -tcb_t; /* Transformation control block */ - -typedef struct point_tag - { - fix15 x; /* X coord of point (shifted pixels) */ - fix15 y; /* Y coord of point (shifted pixels) */ - } -point_t; /* Point in device space */ - -typedef struct band_tag - { - fix15 band_max; - fix15 band_min; - fix15 band_array_offset; - fix15 band_floor; - fix15 band_ceiling; - } band_t; - -typedef struct bbox_tag - { - fix31 xmin; - fix31 xmax; - fix31 ymin; - fix31 ymax; - } bbox_t; - -#if SHORT_LISTS -#define MAX_INTERCEPTS 256 /* Max storage for intercepts */ -typedef ufix8 cdr_t; /* 8 bit links in intercept chains */ -#else -#define MAX_INTERCEPTS 1000 /* Max storage for intercepts */ -typedef ufix16 cdr_t; /* 16 bit links in intercept chains */ -#endif - -#if REENTRANT_ALLOC - -typedef struct intercepts_tag - { - fix15 car[MAX_INTERCEPTS]; - fix15 cdr[MAX_INTERCEPTS]; -#if INCL_SCREEN - ufix8 inttype[MAX_INTERCEPTS]; - ufix8 leftedge; - ufix16 fracpix; -#endif - } intercepts_t; - -typedef struct plaid_tag - { - fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */ -#if INCL_RULES - fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ - fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ - fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */ -#endif - } plaid_t; -#endif - -#if INCL_MULTIDEV -typedef struct bitmap_tag - { - void (*p_open_bitmap)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, fix15 xsize,fix15 ysize); - void (*p_set_bits)(PROTO_DECL2 fix15 y, fix15 xbit1, fix15 xbit2); - void (*p_close_bitmap)(PROTO_DECL1); - } bitmap_t; - -typedef struct outline_tag - { - void (*p_open_outline)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xmin, fix31 xmax, fix31 ymin,fix31 ymax); - void (*p_start_char)(PROTO_DECL1); - void (*p_start_contour)(PROTO_DECL2 fix31 x,fix31 y,boolean outside); - void (*p_curve)(PROTO_DECL2 fix31 x1, fix31 y1, fix31 x2, fix31 y2, fix31 x3, fix31 y3); - void (*p_line)(PROTO_DECL2 fix31 x, fix31 y); - void (*p_close_contour)(PROTO_DECL1); - void (*p_close_outline)(PROTO_DECL1); - } outline_t; -#endif - -/* ---------------------------------------------------*/ -/**** MAIN GLOBAL DATA STRUCTURE, SPEEDO_GLOBALS *****/ - -typedef struct speedo_global_data - { -/* do_char.c data definitions */ -#if INCL_METRICS /* Metrics functions supported? */ - kern_t kern; /* Kerning control block */ -#endif /* endif incl_metrics */ - point_t Psw; /* End of escapement vector (1/65536 pixel units) */ - -#if INCL_LCD /* Dynamic load character data supported? */ - fix15 cb_offset; /* Offset to sub-char data in char buffer */ -#endif /* endif incl_lcd */ - -/* do_trns.c data definitions */ - point_t P0; /* Current point (sub-pixels) */ - fix15 x_orus; /* Current X argument (orus) */ - fix15 y_orus; /* Current Y argument (orus) */ - fix15 x_pix; /* Current X argument (sub-pixels) */ - fix15 y_pix; /* Current Y argument (sub-pixels) */ - ufix8 x_int; /* Current X interpolation zone */ - ufix8 y_int; /* Current Y interpolation zone */ - -#if INCL_MULTIDEV && INCL_OUTLINE - outline_t outline_device; - boolean outline_device_set; -#endif - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -#if INCL_MULTIDEV - bitmap_t bitmap_device; - boolean bitmap_device_set; -#endif - band_t y_band; /* Y current band(whole pixels) */ - - struct set_width_tag - { - fix31 x; - fix31 y; - } set_width; /* Character escapement vector */ - - boolean first_pass; /* TRUE during first pass thru outline data */ - boolean extents_running; /* T if extent accumulation for each vector */ - fix15 x0_spxl; /* X coord of current point (sub pixels) */ - fix15 y0_spxl; /* Y coord of current point (sub pixels) */ - fix15 y_pxl; /* Y coord of current point (whole pixels) */ -#if REENTRANT_ALLOC - intercepts_t STACKFAR *intercepts; -#else /* else if not reentrant */ - fix15 car[MAX_INTERCEPTS]; /* Data field of intercept storage */ - cdr_t cdr[MAX_INTERCEPTS]; /* Link field of intercept storage */ -#if INCL_SCREEN - ufix8 inttype[MAX_INTERCEPTS]; - ufix8 leftedge; - ufix16 fracpix; -#endif /* endif incl_screen */ -#endif /* endif reentrant */ - fix15 bmap_xmin; /* Min X value (sub-pixel units) */ - fix15 bmap_xmax; /* Max X value (sub-pixel units) */ - fix15 bmap_ymin; /* Min Y value (sub-pixel units) */ - fix15 bmap_ymax; /* Max Y value (sub-pixel units) */ - fix15 no_y_lists; /* Number of active intercept lists */ - fix15 first_offset; /* Index of first active list cell */ - fix15 next_offset; /* Index of next free list cell */ - boolean intercept_oflo; /* TRUE if intercepts data lost */ -#endif /* endif incl_black, incl_screen, incl_2d */ - -/* bounding box now used by all output modules, including outline */ - fix15 xmin; /* Min X value in whole character */ - fix15 xmax; /* Max X value in whole character */ - fix15 ymin; /* Min Y value in whole character */ - fix15 ymax; /* Max Y value in whole character */ - -#if INCL_2D - fix15 no_x_lists; /* Number of active x intercept lists */ - band_t x_band; /* X current band(whole pixels) */ - boolean x_scan_active; /* X scan flag during scan conversion */ -#endif - -/* reset.c data definitions */ - ufix16 key32; /* Decryption keys 3,2 combined */ - ufix8 key4; /* Decryption key 4 */ - ufix8 key6; /* Decryption key 6 */ - ufix8 key7; /* Decryption key 7 */ - ufix8 key8; /* Decryption key 8 */ - -/* set_spcs.c data definitions */ - buff_t font; - buff_t GLOBALFAR *pfont; /* Pointer to font buffer structure */ - fix31 font_buff_size; /* Number of bytes loaded in font buffer */ - ufix8 FONTFAR *pchar_dir; /* Pointer to character directory */ - fix15 first_char_idx; /* Index to first character in font */ - fix15 no_chars_avail; /* Total characters in font layout */ - fix15 orus_per_em; /* Outline resolution */ - fix15 metric_resolution; /* metric resolution for setwidths, kerning pairs - (defaults to orus_per_em) */ - tcb_t tcb0; /* Top level transformation control block */ - - boolean specs_valid; /* TRUE if fw_set_specs() successful */ - - fix15 depth_adj; /* Curve splitting depth adjustment */ - boolean curves_out; /* Allow curves to output module */ - fix15 output_mode; /* Output module selector */ - fix15 thresh; /* Scan conversion threshold (sub-pixels) */ - boolean normal; /* TRUE if 0 obl and mult of 90 deg rot */ - - fix15 multshift; /* Fixed point shift for multipliers */ - fix15 pixshift; /* Fixed point shift for sub-pixels */ - fix15 poshift; /* Left shift from pixel to output format */ - fix15 mpshift; /* Fixed point shift for mult to sub-pixels */ - fix31 multrnd; /* 0.5 in multiplier units */ - fix15 pixrnd; /* 0.5 in sub-pixel units */ - fix31 mprnd; /* 0.5 sub-pixels in multiplier units */ - fix15 pixfix; /* Mask to remove fractional pixels */ - fix15 onepix; /* 1.0 pixels in sub-pixel units */ - - boolean (*init_out)(PROTO_DECL2 specs_t GLOBALFAR *specsarg); - boolean (*begin_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); - void (*begin_sub_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); - void (*begin_contour)(PROTO_DECL2 point_t P1,boolean outside); - void (*curve)(PROTO_DECL2 point_t P1, point_t P2, point_t P3, fix15 depth); - void (*line)(PROTO_DECL2 point_t P1); - void (*end_contour)(PROTO_DECL1); - void (*end_sub_char)(PROTO_DECL1); - boolean (*end_char)(PROTO_DECL1); - specs_t GLOBALFAR *pspecs; /* Pointer to specifications bundle */ - specs_t specs; /* copy specs onto stack */ - ufix8 FONTFAR *font_org; /* Pointer to start of font data */ - ufix8 FONTFAR *hdr2_org; /* Pointer to start of private header data */ - -/* set_trns.c data definitions */ - tcb_t tcb; /* Current transformation control block */ - ufix8 Y_edge_org; /* Index to first Y controlled coordinate */ - ufix8 Y_int_org; /* Index to first Y interpolation zone */ - fix31 rnd_xmin; /* rounded out value of xmin for int-char spac. fix */ - -#if REENTRANT_ALLOC - plaid_t STACKFAR *plaid; -#else /* if not reentrant */ - fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */ -#if INCL_RULES - fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ - fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ - fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */ -#endif /* endif incl_rules */ -#endif /* endif not reentrant */ - - fix15 no_X_orus; /* Number of X controlled coordinates */ - fix15 no_Y_orus; /* Number of Y controlled coordinates */ - ufix16 Y_constr_org; /* Origin of constraint table in font data */ - -#if INCL_RULES - constr_t constr; /* Constraint data state */ - boolean c_act[MAX_CONSTR]; /* TRUE if constraint currently active */ - fix15 c_pix[MAX_CONSTR]; /* Size of constrained zone if active */ -#endif -#if INCL_ISW - boolean import_setwidth_act; /* boolean to indicate imported setwidth */ - boolean isw_modified_constants; - ufix32 imported_width; /* value of imported setwidth */ - fix15 isw_xmax; /* maximum oru value for constants*/ -#endif -#if INCL_SQUEEZING || INCL_ISW - fix15 setwidth_orus; /* setwidth value in orus */ - /* bounding box in orus for squeezing */ - fix15 bbox_xmin_orus; /* X minimum in orus */ - fix15 bbox_xmax_orus; /* X maximum in orus */ - fix15 bbox_ymin_orus; /* Y minimum in orus */ - fix15 bbox_ymax_orus; /* Y maximum in orus */ -#endif -#ifdef INCL_SQUEEZING - boolean squeezing_compound; /* flag to indicate a compound character*/ -#endif -#ifdef INCL_CLIPPING - fix31 clip_xmax; - fix31 clip_ymax; - fix31 clip_xmin; - fix31 clip_ymin; -#endif - } SPEEDO_GLOBALS; - -/*********************************************************************************** - * - * Speedo global data structure allocation - * - ***********************************************************************************/ - -#ifdef SET_SPCS -#define EXTERN -#else -#define EXTERN extern -#endif -#if STATIC_ALLOC -EXTERN SPEEDO_GLOBALS GLOBALFAR sp_globals; -#define sp_intercepts sp_globals -#define sp_plaid sp_globals -#else -#if DYNAMIC_ALLOC -EXTERN SPEEDO_GLOBALS GLOBALFAR *sp_global_ptr; -#define sp_globals (*sp_global_ptr) -#define sp_intercepts (*sp_global_ptr) -#define sp_plaid (*sp_global_ptr) -#else -#if REENTRANT_ALLOC -#define sp_globals (*sp_global_ptr) -#define sp_intercepts (*(*sp_global_ptr).intercepts) -#define sp_plaid (*(*sp_global_ptr).plaid) -#endif -#endif -#endif -#ifdef EXTERN -#undef EXTERN -#endif - - -/***** PUBLIC FONT HEADER OFFSET CONSTANTS *****/ -#define FH_FMVER 0 /* U D4.0 CR LF NULL NULL 8 bytes */ -#define FH_FNTSZ 8 /* U Font size (bytes) 4 bytes */ -#define FH_FBFSZ 12 /* U Min font buffer size (bytes) 4 bytes */ -#define FH_CBFSZ 16 /* U Min char buffer size (bytes) 2 bytes */ -#define FH_HEDSZ 18 /* U Header size (bytes) 2 bytes */ -#define FH_FNTID 20 /* U Source Font ID 2 bytes */ -#define FH_SFVNR 22 /* U Source Font Version Number 2 bytes */ -#define FH_FNTNM 24 /* U Source Font Name 70 bytes */ -#define FH_MDATE 94 /* U Manufacturing Date 10 bytes */ -#define FH_LAYNM 104 /* U Layout Name 70 bytes */ -#define FH_CPYRT 174 /* U Copyright Notice 78 bytes */ -#define FH_NCHRL 252 /* U Number of Chars in Layout 2 bytes */ -#define FH_NCHRF 254 /* U Total Number of Chars in Font 2 bytes */ -#define FH_FCHRF 256 /* U Index of first char in Font 2 bytes */ -#define FH_NKTKS 258 /* U Number of kerning tracks in font 2 bytes */ -#define FH_NKPRS 260 /* U Number of kerning pairs in font 2 bytes */ -#define FH_FLAGS 262 /* U Font flags 1 byte: */ - /* Bit 0: Extended font */ - /* Bit 1: not used */ - /* Bit 2: not used */ - /* Bit 3: not used */ - /* Bit 4: not used */ - /* Bit 5: not used */ - /* Bit 6: not used */ - /* Bit 7: not used */ -#define FH_CLFGS 263 /* U Classification flags 1 byte: */ - /* Bit 0: Italic */ - /* Bit 1: Monospace */ - /* Bit 2: Serif */ - /* Bit 3: Display */ - /* Bit 4: not used */ - /* Bit 5: not used */ - /* Bit 6: not used */ - /* Bit 7: not used */ -#define FH_FAMCL 264 /* U Family Classification 1 byte: */ - /* 0: Don't care */ - /* 1: Serif */ - /* 2: Sans serif */ - /* 3: Monospace */ - /* 4: Script or calligraphic */ - /* 5: Decorative */ - /* 6-255: not used */ -#define FH_FRMCL 265 /* U Font form Classification 1 byte: */ - /* Bits 0-3 (width type): */ - /* 0-3: not used */ - /* 4: Condensed */ - /* 5: not used */ - /* 6: Semi-condensed */ - /* 7: not used */ - /* 8: Normal */ - /* 9: not used */ - /* 10: Semi-expanded */ - /* 11: not used */ - /* 12: Expanded */ - /* 13-15: not used */ - /* Bits 4-7 (Weight): */ - /* 0: not used */ - /* 1: Thin */ - /* 2: Ultralight */ - /* 3: Extralight */ - /* 4: Light */ - /* 5: Book */ - /* 6: Normal */ - /* 7: Medium */ - /* 8: Semibold */ - /* 9: Demibold */ - /* 10: Bold */ - /* 11: Extrabold */ - /* 12: Ultrabold */ - /* 13: Heavy */ - /* 14: Black */ - /* 15-16: not used */ -#define FH_SFNTN 266 /* U Short Font Name 32 bytes */ -#define FH_SFACN 298 /* U Short Face Name 16 bytes */ -#define FH_FNTFM 314 /* U Font form 14 bytes */ -#define FH_ITANG 328 /* U Italic angle 2 bytes (1/256th deg) */ -#define FH_ORUPM 330 /* U Number of ORUs per em 2 bytes */ -#define FH_WDWTH 332 /* U Width of Wordspace 2 bytes */ -#define FH_EMWTH 334 /* U Width of Emspace 2 bytes */ -#define FH_ENWTH 336 /* U Width of Enspace 2 bytes */ -#define FH_TNWTH 338 /* U Width of Thinspace 2 bytes */ -#define FH_FGWTH 340 /* U Width of Figspace 2 bytes */ -#define FH_FXMIN 342 /* U Font-wide min X value 2 bytes */ -#define FH_FYMIN 344 /* U Font-wide min Y value 2 bytes */ -#define FH_FXMAX 346 /* U Font-wide max X value 2 bytes */ -#define FH_FYMAX 348 /* U Font-wide max Y value 2 bytes */ -#define FH_ULPOS 350 /* U Underline position 2 bytes */ -#define FH_ULTHK 352 /* U Underline thickness 2 bytes */ -#define FH_SMCTR 354 /* U Small caps transformation 6 bytes */ -#define FH_DPSTR 360 /* U Display sups transformation 6 bytes */ -#define FH_FNSTR 366 /* U Footnote sups transformation 6 bytes */ -#define FH_ALSTR 372 /* U Alpha sups transformation 6 bytes */ -#define FH_CMITR 378 /* U Chemical infs transformation 6 bytes */ -#define FH_SNMTR 384 /* U Small nums transformation 6 bytes */ -#define FH_SDNTR 390 /* U Small denoms transformation 6 bytes */ -#define FH_MNMTR 396 /* U Medium nums transformation 6 bytes */ -#define FH_MDNTR 402 /* U Medium denoms transformation 6 bytes */ -#define FH_LNMTR 408 /* U Large nums transformation 6 bytes */ -#define FH_LDNTR 414 /* U Large denoms transformation 6 bytes */ - /* Transformation data format: */ - /* Y position 2 bytes */ - /* X scale 2 bytes (1/4096ths) */ - /* Y scale 2 bytes (1/4096ths) */ -#define SIZE_FW FH_LDNTR + 6 /* size of nominal font header */ -#define EXP_FH_METRES SIZE_FW /* offset to expansion field metric resolution (optional) */ - - - -/***** MODE FLAGS CONSTANTS *****/ -#define CURVES_OUT 0X0008 /* Output module accepts curves */ -#define BOGUS_MODE 0X0010 /* Linear scaling mode */ -#define CONSTR_OFF 0X0020 /* Inhibit constraint table */ -#define IMPORT_WIDTHS 0X0040 /* Imported width mode */ -#define SQUEEZE_LEFT 0X0100 /* Squeeze left mode */ -#define SQUEEZE_RIGHT 0X0200 /* Squeeze right mode */ -#define SQUEEZE_TOP 0X0400 /* Squeeze top mode */ -#define SQUEEZE_BOTTOM 0X0800 /* Squeeze bottom mode */ -#define CLIP_LEFT 0X1000 /* Clip left mode */ -#define CLIP_RIGHT 0X2000 /* Clip right mode */ -#define CLIP_TOP 0X4000 /* Clip top mode */ -#define CLIP_BOTTOM 0X8000 /* Clip bottom mode */ - -/*********************************************************************************** - * - * Speedo function declarations - use prototypes if available - * - ***********************************************************************************/ - -/* do_char.c functions */ -ufix16 sp_get_char_id(PROTO_DECL2 ufix16 char_index); -boolean sp_make_char(PROTO_DECL2 ufix16 char_index); -#if INCL_ISW -fix31 sp_compute_isw_scale(PROTO_DECL2); -static boolean sp_do_make_char(PROTO_DECL2 ufix16 char_index); -boolean sp_make_char_isw(PROTO_DECL2 ufix16 char_index, ufix32 imported_width); -static boolean sp_reset_xmax(PROTO_DECL2 fix31 xmax); -#endif -#if INCL_ISW || INCL_SQUEEZING -static void sp_preview_bounding_box(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); -#endif - -#if INCL_METRICS /* Metrics functions supported? */ -fix31 sp_get_char_width(PROTO_DECL2 ufix16 char_index); -fix15 sp_get_track_kern(PROTO_DECL2 fix15 track,fix15 point_size); -fix31 sp_get_pair_kern(PROTO_DECL2 ufix16 char_index1,ufix16 char_index2); -boolean sp_get_char_bbox(PROTO_DECL2 ufix16 char_index, bbox_t *bbox); -#endif - -/* do_trns.c functions */ -ufix8 FONTFAR *sp_read_bbox(PROTO_DECL2 ufix8 FONTFAR *pointer,point_t STACKFAR *pPmin,point_t STACKFAR *pPmax,boolean set_flag); -void sp_proc_outl_data(PROTO_DECL2 ufix8 FONTFAR *pointer); - -/* out_blk.c functions */ -#if INCL_BLACK -boolean sp_init_black(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_black(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_black(PROTO_DECL2 point_t P1,boolean outside); -void sp_line_black(PROTO_DECL2 point_t P1); -boolean sp_end_char_black(PROTO_DECL1); -#endif - -/* out_scrn.c functions */ -#if INCL_SCREEN -boolean sp_init_screen(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_screen(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_screen(PROTO_DECL2 point_t P1,boolean outside); -void sp_curve_screen(PROTO_DECL2 point_t P1,point_t P2,point_t P3, fix15 depth); -void sp_scan_curve_screen(PROTO_DECL2 fix31 X0,fix31 Y0,fix31 X1,fix31 Y1,fix31 X2,fix31 Y2,fix31 X3,fix31 Y3); -void sp_vert_line_screen(PROTO_DECL2 fix31 x, fix15 y1, fix15 y2); -void sp_line_screen(PROTO_DECL2 point_t P1); -void sp_end_contour_screen(PROTO_DECL1); -boolean sp_end_char_screen(PROTO_DECL1); -#endif - -/* out_outl.c functions */ -#if INCL_OUTLINE -#if INCL_MULTIDEV -boolean sp_set_outline_device(PROTO_DECL2 outline_t *ofuncs, ufix16 size); -#endif - - -boolean sp_init_outline(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_outline(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_sub_char_outline(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_outline(PROTO_DECL2 point_t P1,boolean outside); -void sp_curve_outline(PROTO_DECL2 point_t P1,point_t P2,point_t P3, fix15 depth); -void sp_line_outline(PROTO_DECL2 point_t P1); -void sp_end_contour_outline(PROTO_DECL1); -void sp_end_sub_char_outline(PROTO_DECL1); -boolean sp_end_char_outline(PROTO_DECL1); -#endif - -/* out_bl2d.c functions */ -#if INCL_2D -boolean sp_init_2d(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_2d(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_2d(PROTO_DECL2 point_t P1,boolean outside); -void sp_line_2d(PROTO_DECL2 point_t P1); -boolean sp_end_char_2d(PROTO_DECL1); -#endif - -/* out_util.c functions */ -#if INCL_BLACK || INCL_SCREEN || INCL_2D - -#if INCL_MULTIDEV -boolean sp_set_bitmap_device(PROTO_DECL2 bitmap_t *bfuncs, ufix16 size); -#endif - -void sp_init_char_out(PROTO_DECL2 point_t Psw, point_t Pmin, point_t Pmax); -void sp_begin_sub_char_out(PROTO_DECL2 point_t Psw, point_t Pmin, point_t Pmax); -void sp_curve_out(PROTO_DECL2 point_t P1, point_t P2, point_t P3, fix15 depth); -void sp_end_contour_out(PROTO_DECL1); -void sp_end_sub_char_out(PROTO_DECL1); -void sp_init_intercepts_out(PROTO_DECL1); -void sp_restart_intercepts_out(PROTO_DECL1); -void sp_set_first_band_out(PROTO_DECL2 point_t Pmin, point_t Pmax); -void sp_reduce_band_size_out(PROTO_DECL1); -boolean sp_next_band_out(PROTO_DECL1); -#endif - -#if INCL_USEROUT -boolean sp_init_userout(specs_t *specsarg); -#endif - - -/* reset.c functions */ -void sp_reset(PROTO_DECL1); -#if INCL_KEYS -void sp_set_key(PROTO_DECL2 ufix8 key[]); -#endif -ufix16 sp_get_cust_no(PROTO_DECL2 buff_t font_buff); - -/* set_spcs.c functions */ -boolean sp_set_specs(PROTO_DECL2 specs_t STACKFAR *specsarg); -void sp_type_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb); - -fix31 sp_read_long(PROTO_DECL2 ufix8 FONTFAR *pointer); -fix15 sp_read_word_u(PROTO_DECL2 ufix8 FONTFAR *pointer); - -/* set_trns.c functions */ -void sp_init_tcb(PROTO_DECL1); -void sp_scale_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb,fix15 x_pos,fix15 y_pos,fix15 x_scale,fix15 y_scale); -ufix8 FONTFAR *sp_plaid_tcb(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); -ufix8 FONTFAR *sp_skip_interpolation_table(PROTO_DECL2 ufix8 FONTFAR *pointer, ufix8 format); -ufix8 FONTFAR *sp_skip_control_zone(PROTO_DECL2 ufix8 FONTFAR *pointer, ufix8 format); - -ufix8 FONTFAR *sp_read_oru_table(PROTO_DECL2 ufix8 FONTFAR *pointer); -#if INCL_SQUEEZING || INCL_ISW -static void sp_calculate_x_pix(PROTO_DECL2 ufix8 start_edge,ufix8 end_edge,ufix16 constr_nr,fix31 x_scale,fix31 x_offset,fix31 ppo,fix15 setwidth_pix); -#endif -#if INCL_SQUEEZING -static void sp_calculate_y_pix(PROTO_DECL2 ufix8 start_edge,ufix8 end_edge,ufix16 constr_nr,fix31 top_scale,fix31 bottom_scale,fix31 ppo,fix15 emtop_pix,fix15 embot_pix); -boolean sp_calculate_x_scale(PROTO_DECL2 fix31 *x_factor,fix31 *x_offset,fix15 no_x_ctrl_zones); -boolean sp_calculate_y_scale(PROTO_DECL2 fix31 *top_scale,fix31 *bottom_scale,fix15 first_y_zone, fix15 no_Y_ctrl_zones); -#endif - - -/* user defined functions */ - -void sp_report_error(PROTO_DECL2 fix15 n); - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -void sp_open_bitmap(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, fix15 xsize,fix15 ysize); -void sp_set_bitmap_bits(PROTO_DECL2 fix15 y, fix15 xbit1, fix15 xbit2); -void sp_close_bitmap(PROTO_DECL1); -#endif - -#if INCL_OUTLINE -void sp_open_outline(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xmin, fix31 xmax, fix31 ymin,fix31 ymax); -void sp_start_new_char(PROTO_DECL1); -void sp_start_contour(PROTO_DECL2 fix31 x,fix31 y,boolean outside); -void sp_curve_to(PROTO_DECL2 fix31 x1, fix31 y1, fix31 x2, fix31 y2, fix31 x3, fix31 y3); -void sp_line_to(PROTO_DECL2 fix31 x, fix31 y); -void sp_close_contour(PROTO_DECL1); -void sp_close_outline(PROTO_DECL1); -#endif - -#if INCL_LCD /* Dynamic load character data supported? */ -buff_t *sp_load_char_data(PROTO_DECL2 fix31 file_offset,fix15 no_bytes,fix15 cb_offset); /* Load character data from font file */ -#endif - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -void sp_record_xint(PROTO_DECL2 fix15 int_num); /* Record xint data */ -void sp_record_yint(PROTO_DECL2 fix15 int_num); /* Record yint data */ -void sp_begin_plaid_data(PROTO_DECL1); /* Signal start of plaid data */ -void sp_begin_ctrl_zones(PROTO_DECL2 fix15, no_X_zones, fix15 no_Y_zones); /* Signal start of control zones */ -void sp_record_ctrl_zone(PROTO_DECL2 fix31 start, fix31 end, fix15 constr); /* Record control zone data */ -void sp_begin_int_zones(PROTO_DECL2 fix15 no_X_int_zones, fix15 no_Y_int_zones); /* Signal start of interpolation zones */ -void sp_record_int_zone(PROTO_DECL2 fix31 start, fix31 end); /* Record interpolation zone data */ -void sp_end_plaid_data(PROTO_DECL1); /* Signal end of plaid data */ -#endif - -#endif /* _SPEEDO_H_ */ diff --git a/nx-X11/lib/font/Speedo/spencode.c b/nx-X11/lib/font/Speedo/spencode.c deleted file mode 100644 index 96a13504a..000000000 --- a/nx-X11/lib/font/Speedo/spencode.c +++ /dev/null @@ -1,67 +0,0 @@ -/* $Xorg: spencode.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.6 2001/01/17 19:43:18 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spint.h" - -/* No longer needed with new encoding code */ -/* #include "bics-iso.h" - -int sp_bics_map_size = (sizeof(sp_bics_map) / (sizeof(int) * 2));*/ - -#ifdef EXTRAFONTS -#include "adobe-iso.h" - -int adobe_map_size = (sizeof(adobe_map) / (sizeof(int) * 2)); - -#endif /* EXTRAFONTS */ diff --git a/nx-X11/lib/font/Speedo/sperr.c b/nx-X11/lib/font/Speedo/sperr.c deleted file mode 100644 index 36ce51125..000000000 --- a/nx-X11/lib/font/Speedo/sperr.c +++ /dev/null @@ -1,127 +0,0 @@ -/* $Xorg: sperr.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 names of M.I.T., Network Computing Devices, - * or Digital not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. Network Computing Devices, or Digital - * make no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. - * - */ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.6 2001/12/14 19:56:41 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "spint.h" - -#ifndef FONTMODULE -#include -#endif - -extern void ErrorF(const char* f, ...); - -void -SpeedoErr(char *str, ...) -{ - va_list v; - int a1; - - va_start(v, str); - ErrorF("Speedo: "); - a1 = va_arg(v, int); - ErrorF(str, a1); - va_end(v); -} - -/* - * Called by Speedo character generator to report an error. - * - * Since character data not available is one of those errors - * that happens many times, don't report it to user - */ -void -sp_report_error(fix15 n) -{ - switch (n) { - case 1: - SpeedoErr("Insufficient font data loaded\n"); - break; - case 3: - SpeedoErr("Transformation matrix out of range\n"); - break; - case 4: - SpeedoErr("Font format error\n"); - break; - case 5: - SpeedoErr("Requested specs not compatible with output module\n"); - break; - case 7: - SpeedoErr("Intelligent transformation requested but not supported\n"); - break; - case 8: - SpeedoErr("Unsupported output mode requested\n"); - break; - case 9: - SpeedoErr("Extended font loaded but only compact fonts supported\n"); - break; - case 10: - SpeedoErr("Font specs not set prior to use of font\n"); - break; - case 12: - break; - case 13: - SpeedoErr("Track kerning data not available()\n"); - break; - case 14: - SpeedoErr("Pair kerning data not available()\n"); - break; - default: - SpeedoErr("report_error(%d)\n", n); - break; - } -} diff --git a/nx-X11/lib/font/Speedo/spfile.c b/nx-X11/lib/font/Speedo/spfile.c deleted file mode 100644 index c58c0e471..000000000 --- a/nx-X11/lib/font/Speedo/spfile.c +++ /dev/null @@ -1,460 +0,0 @@ -/* $Xorg: spfile.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL - * 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. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.13 2001/08/13 21:46:47 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#ifndef FONTMODULE -#include -#else -#include "xf86_ansic.h" -#endif - -#include "spint.h" -#include "bics-unicode.h" - -SpeedoFontPtr sp_fp_cur = (SpeedoFontPtr) 0; - -#ifdef EXTRAFONTS -#include "ncdkeys.h" -#endif - -#include "keys.h" - -#ifdef EXTRAFONTS -static ufix8 skey[] = -{ - SKEY0, - SKEY1, - SKEY2, - SKEY3, - SKEY4, - SKEY5, - SKEY6, - SKEY7, - SKEY8 -}; /* Sample Font decryption key */ - -static ufix8 rkey[] = -{ - RKEY0, - RKEY1, - RKEY2, - RKEY3, - RKEY4, - RKEY5, - RKEY6, - RKEY7, - RKEY8 -}; /* Retail Font decryption key */ - -#endif /* EXTRAFONTS */ - -#ifdef XSAMPLEFONTS -static ufix8 xkey[] = -{ - XKEY0, - XKEY1, - XKEY2, - XKEY3, - XKEY4, - XKEY5, - XKEY6, - XKEY7, - XKEY8 -}; /* Sample Font decryption key */ -#endif - -static ufix8 mkey[] = -{ - KEY0, - KEY1, - KEY2, - KEY3, - KEY4, - KEY5, - KEY6, - KEY7, - KEY8 -}; /* Font decryption key */ - - -static fix15 -read_2b(ufix8 *ptr) -{ - fix15 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -static fix31 -read_4b(ufix8 *ptr) -{ - fix31 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -/* - * loads the specified char's data - */ -buff_t * -sp_load_char_data(fix31 file_offset, fix15 num, fix15 cb_offset) -{ - SpeedoMasterFontPtr master = sp_fp_cur->master; - - if (fseek(master->fp, (long) file_offset, (int) 0)) { - SpeedoErr("can't seek to char\n"); - } - if ((num + cb_offset) > master->mincharsize) { - SpeedoErr("char buf overflow\n"); - } - if (fread((master->c_buffer + cb_offset), sizeof(ufix8), num, - master->fp) != num) { - SpeedoErr("can't get char data\n"); - } - master->char_data.org = (ufix8 *) master->c_buffer + cb_offset; - master->char_data.no_bytes = num; - - return &master->char_data; -} - -struct speedo_encoding { - char *name; - int *enc; - int enc_size; -}; - -/* Takes care of caching encodings already referenced */ -static int -find_encoding(const char *fontname, const char *filename, - int **enc, int *enc_size) -{ - static struct speedo_encoding *known_encodings=0; - static int number_known_encodings=0; - static int known_encodings_size=0; - - char *encoding_name; - int iso8859_1; - FontMapPtr mapping; - int i, j, k, size; - struct speedo_encoding *temp; - int *new_enc; - char *new_name; - - iso8859_1 = 0; - - encoding_name = FontEncFromXLFD(fontname, strlen(fontname)); - if(!encoding_name) { - encoding_name="iso8859-1"; - iso8859_1=1; - } - /* We don't go through the font library if asked for Latin-1 */ - iso8859_1 = iso8859_1 || !strcmp(encoding_name, "iso8859-1"); - - for(i=0; i= known_encodings_size) { - if((temp= - (struct speedo_encoding*)xrealloc(known_encodings, - 2*sizeof(struct speedo_encoding)* - known_encodings_size))==0) - return AllocError; - known_encodings=temp; - known_encodings_size*=2; - } - - mapping=0; - if(!iso8859_1) { - mapping = FontEncMapFind(encoding_name, - FONT_ENCODING_UNICODE, -1, -1, - filename); - } -#define SPEEDO_RECODE(c) \ - (mapping? \ - unicode_to_bics(FontEncRecode(c, mapping)): \ - unicode_to_bics(c)) - - if((new_name = (char*)xalloc(strlen(encoding_name)))==0) - return AllocError; - strcpy(new_name, encoding_name); - - /* For now, we limit ourselves to 256 glyphs */ - size=0; - for(i=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) - if(SPEEDO_RECODE(i)>=0) - size++; - new_enc = (int*)xalloc(2*size*sizeof(int)); - if(!new_enc) { - xfree(new_name); - return AllocError; - } - for(i=j=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) - if((k = SPEEDO_RECODE(i))>=0) { - new_enc[2*j] = i; - new_enc[2*j+1] = k; - j++; - } - known_encodings[number_known_encodings].name = new_name; - known_encodings[number_known_encodings].enc = new_enc; - known_encodings[number_known_encodings].enc_size = size; - number_known_encodings++; - - *enc = new_enc; - *enc_size = size; - return Successful; -#undef SPEEDO_RECODE -} - -int -sp_open_master(const char *fontname, const char *filename, - SpeedoMasterFontPtr *master) -{ - SpeedoMasterFontPtr spmf; - ufix8 tmp[16]; - ufix16 cust_no; - FILE *fp; - ufix32 minbufsize; - ufix16 mincharsize; - ufix8 *f_buffer; - ufix8 *c_buffer; - int ret; - ufix8 *key; - - spmf = (SpeedoMasterFontPtr) xalloc(sizeof(SpeedoMasterFontRec)); - if (!spmf) - return AllocError; - bzero(spmf, sizeof(SpeedoMasterFontRec)); - spmf->entry = NULL; - spmf->f_buffer = NULL; - spmf->c_buffer = NULL; - - /* open font */ - spmf->fname = (char *) xalloc(strlen(filename) + 1); - if (!spmf->fname) - return AllocError; - fp = fopen(filename, "r"); - if (!fp) { - ret = BadFontName; - goto cleanup; - } - strcpy(spmf->fname, filename); - spmf->fp = fp; - spmf->state |= MasterFileOpen; - - if (fread(tmp, sizeof(ufix8), 16, fp) != 16) { - ret = BadFontName; - goto cleanup; - } - minbufsize = (ufix32) read_4b(tmp + FH_FBFSZ); - f_buffer = (ufix8 *) xalloc(minbufsize); - if (!f_buffer) { - ret = AllocError; - goto cleanup; - } - spmf->f_buffer = f_buffer; - - fseek(fp, (ufix32) 0, 0); - - /* read in the font */ - if (fread(f_buffer, sizeof(ufix8), (ufix16) minbufsize, fp) != minbufsize) { - ret = BadFontName; - goto cleanup; - } - spmf->copyright = (char *) (f_buffer + FH_CPYRT); - spmf->mincharsize = mincharsize = read_2b(f_buffer + FH_CBFSZ); - - c_buffer = (ufix8 *) xalloc(mincharsize); - if (!c_buffer) { - ret = AllocError; - goto cleanup; - } - spmf->c_buffer = c_buffer; - - spmf->font.org = spmf->f_buffer; - spmf->font.no_bytes = minbufsize; - - cust_no = sp_get_cust_no(spmf->font); - - /* XXX add custom encryption stuff here */ - -#ifdef EXTRAFONTS - if (cust_no == SCUS0) { - key = skey; - } else if (cust_no == RCUS0) { - key = rkey; - } else -#endif - -#ifdef XSAMPLEFONTS - if (cust_no == XCUS0) { - key = xkey; - } else -#endif - - if (cust_no == CUS0) { - key = mkey; - } else { - SpeedoErr("Non - standard encryption for \"%s\"\n", filename); - ret = BadFontName; - goto cleanup; - } - spmf->key = key; - sp_set_key(key); - - spmf->first_char_id = read_2b(f_buffer + FH_FCHRF); - spmf->num_chars = read_2b(f_buffer + FH_NCHRL); - - - spmf->enc = 0; - spmf->enc_size = 0; - -#ifdef EXTRAFONTS - { /* choose the proper encoding */ - char *f; - - f = strrchr(filename, '/'); - if (f) { - f++; - if (strncmp(f, "bx113", 5) == 0) { - spmf->enc = adobe_map; - spmf->enc_size = adobe_map_size; - } - } - } -#endif - - if(!spmf->enc) - if((ret=find_encoding(fontname, filename, &spmf->enc, &spmf->enc_size)) - !=Successful) - goto cleanup; - - spmf->first_char_id = spmf->enc[0]; - /* size of extents array */ - spmf->max_id = spmf->enc[(spmf->enc_size - 1) * 2]; - spmf->num_chars = spmf->enc_size; - - *master = spmf; - - return Successful; - -cleanup: - *master = (SpeedoMasterFontPtr) 0; - sp_close_master_font(spmf); - return ret; -} - -void -sp_close_master_font(SpeedoMasterFontPtr spmf) -{ - if (!spmf) - return; - if (spmf->state & MasterFileOpen) - fclose(spmf->fp); - if (spmf->entry) - spmf->entry->u.scalable.extra->private = NULL; - xfree(spmf->fname); - xfree(spmf->f_buffer); - xfree(spmf->c_buffer); - xfree(spmf); -} - -void -sp_close_master_file(SpeedoMasterFontPtr spmf) -{ - (void) fclose(spmf->fp); - spmf->state &= ~MasterFileOpen; -} - - -/* - * reset the encryption key, and make sure the file is opened - */ -void -sp_reset_master(SpeedoMasterFontPtr spmf) -{ - sp_set_key(spmf->key); - if (!(spmf->state & MasterFileOpen)) { - spmf->fp = fopen(spmf->fname, "r"); - /* XXX -- what to do if we can't open the file? */ - spmf->state |= MasterFileOpen; - } - fseek(spmf->fp, 0, 0); -} diff --git a/nx-X11/lib/font/Speedo/spfont.c b/nx-X11/lib/font/Speedo/spfont.c deleted file mode 100644 index c209d5a51..000000000 --- a/nx-X11/lib/font/Speedo/spfont.c +++ /dev/null @@ -1,453 +0,0 @@ -/* $Xorg: spfont.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ -/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.12tsi Exp $ */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/* - * Speedo font loading - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include "spint.h" -#include -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include -#undef _XOPEN_SOURCE -#endif -#else -#include "servermd.h" -#include "xf86_ansic.h" -#endif - -#ifndef M_PI -#define M_PI 3.14159 -#endif /* M_PI */ -#ifndef DEFAULT_BIT_ORDER - -#ifdef BITMAP_BIT_ORDER -#define DEFAULT_BIT_ORDER BITMAP_BIT_ORDER -#else -#define DEFAULT_BIT_ORDER UNKNOWN_BIT_ORDER -#endif - -#endif - -static void SpeedoCloseFont(FontPtr pfont); - -static int -sp_get_glyphs( - FontPtr pFont, - unsigned long count, - register unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - SpeedoFontPtr spf; - unsigned int firstCol; - register unsigned int numCols; - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr encoding; - CharInfoPtr pDefault; -#ifdef notyet - int itemSize; -#endif - int err = Successful; - - spf = (SpeedoFontPtr) pFont->fontPrivate; - encoding = spf->encoding; - pDefault = spf->pDefault; - firstCol = pFont->info.firstCol; - numCols = pFont->info.lastCol - firstCol + 1; - glyphsBase = glyphs; - - - /* XXX - this should be much smarter */ - /* make sure the glyphs are there */ -#ifdef notyet - if (charEncoding == Linear8Bit || charEncoding == TwoD8Bit) - itemSize = 1; - else - itemSize = 2; - - if (!fsd->complete) - err = fs_load_glyphs(NULL, pFont, count, itemSize, chars); -#endif - - if (err != Successful) - return err; - - switch (charEncoding) { - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - if (pFont->info.allExist && pDefault) { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = &encoding[c]; - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols && (pci = &encoding[c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - case Linear16Bit: - if (pFont->info.allExist && pDefault) { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = &encoding[c]; - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols && (pci = &encoding[c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++) - firstCol; - if (r < numRows && c < numCols && - (pci = &encoding[r * numCols + c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; -} - -static CharInfoRec nonExistantChar; - -static int -sp_get_metrics( - FontPtr pFont, - unsigned long count, - register unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - int ret; - SpeedoFontPtr spf; - CharInfoPtr oldDefault; - - spf = (SpeedoFontPtr) pFont->fontPrivate; - oldDefault = spf->pDefault; - spf->pDefault = &nonExistantChar; - ret = sp_get_glyphs(pFont, count, chars, charEncoding, - glyphCount, (CharInfoPtr *) glyphs); - - spf->pDefault = oldDefault; - return ret; -} - -int -sp_open_font( - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Mask flags, - SpeedoFontPtr *spfont) -{ - SpeedoFontPtr spf; - SpeedoMasterFontPtr spmf; - int ret; - specs_t specs; - int xx8, xy8, yx8, yy8; - - /* find a master (create it if necessary) */ - spmf = (SpeedoMasterFontPtr) entry->u.scalable.extra->private; - if (!spmf) - { - ret = sp_open_master(fontname, filename, &spmf); - if (ret != Successful) - return ret; - entry->u.scalable.extra->private = (pointer) spmf; - spmf->entry = entry; - } - - spf = (SpeedoFontPtr) xalloc(sizeof(SpeedoFontRec)); - if (!spf) - return AllocError; - bzero((char *) spf, sizeof(SpeedoFontRec)); - - *spfont = spf; - - /* clobber everything -- this may be leaking, but other wise evil - * stuff is left behind -- succesive transformed fonts get mangled */ - bzero((char *)&sp_globals, sizeof(sp_globals)); - - spf->master = spmf; - spf->entry = entry; - spmf->refcount++; - sp_reset_master(spmf); - /* now we've done enough that if we bail out we must call sp_close_font */ - - spf->vals = *vals; - - /* set up specs */ - - specs.pfont = &spmf->font; - - specs.xxmult = (int)(vals->pixel_matrix[0] * (double)(1L << 16)); - specs.xymult = (int)(vals->pixel_matrix[2] * (double)(1L << 16)); - specs.yxmult = (int)(vals->pixel_matrix[1] * (double)(1L << 16)); - specs.yymult = (int)(vals->pixel_matrix[3] * (double)(1L << 16)); - - specs.xoffset = 0L << 16; /* XXX tweak? */ - specs.yoffset = 0L << 16; /* XXX tweak? */ - - specs.flags = MODE_SCREEN; - specs.out_info = NULL; - - /* When Speedo tries to generate a very small font bitmap, it - often crashes or goes into an infinite loop. - Don't know why this is so, but until we can fix it properly, - return BadFontName for anything smaller than 4 pixels. - */ -#define TINY_FACTOR (16 << 16) - xx8 = specs.xxmult >> 8; - xy8 = specs.xymult >> 8; - yx8 = specs.yxmult >> 8; - yy8 = specs.yymult >> 8; - if (xx8 * xx8 + xy8 * xy8 < TINY_FACTOR || - yx8 * yx8 + yy8 * yy8 < TINY_FACTOR) - { - sp_close_font(spf); - return BadFontName; - } - - /* clobber global state to avoid wrecking future transformed fonts */ - bzero ((char *) &sp_globals, sizeof(sp_globals)); - - if (!sp_set_specs(&specs)) - { - sp_close_font(spf); - return BadFontName; - } - - spf->specs = specs; - spf->master = spmf; - - *spfont = spf; - return Successful; -} - -static int -sp_load_font( - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr pfont, - Mask flags) -{ - SpeedoFontPtr spf; - SpeedoMasterFontPtr spmf; - int esize; - int ret; - long sWidth; - - ret = sp_open_font(fontname, filename, entry, vals, format, fmask, - flags, &spf); - - if (ret != Successful) - return ret; - - spmf = spf->master; - sp_reset_master(spmf); - esize = sizeof(CharInfoRec) * (spmf->max_id - spmf->first_char_id + 1); - - spf->encoding = (CharInfoPtr) xalloc(esize); - if (!spf->encoding) { - sp_close_font(spf); - return AllocError; - } - bzero((char *) spf->encoding, esize); - - sp_fp_cur = spf; - - sp_make_header(spf, &pfont->info); - - sp_compute_bounds(spf, &pfont->info, SaveMetrics, &sWidth); - - sp_compute_props(spf, fontname, &pfont->info, sWidth); - - pfont->fontPrivate = (pointer) spf; - -/* XXX */ - flags |= FontLoadBitmaps; - - if (flags & FontLoadBitmaps) { - sp_fp_cur = spf; - ret = sp_build_all_bitmaps(pfont, format, fmask); - } - if (ret != Successful) - return ret; - - /* compute remaining accelerators */ - FontComputeInfoAccelerators(&pfont->info); - - pfont->format = format; - - pfont->get_metrics = sp_get_metrics; - pfont->get_glyphs = sp_get_glyphs; - pfont->unload_font = SpeedoCloseFont; - pfont->unload_glyphs = NULL; - pfont->refcnt = 0; - - /* have to hold on to master for min/max id */ - sp_close_master_file(spmf); - - return ret; -} - -int -SpeedoFontLoad( - FontPtr *ppfont, - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Mask flags) -{ - FontPtr pfont; - int ret; - - /* Reject ridiculously small sizes that will blow up the math */ - if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) - return BadFontName; - - if (!(pfont = CreateFontRec())) - return AllocError; - - ret = sp_load_font(fontname, filename, entry, vals, format, fmask, - pfont, flags); - - if (ret == Successful) - *ppfont = pfont; - else - DestroyFontRec (pfont); - - return ret; -} - -void -sp_close_font(SpeedoFontPtr spf) -{ - SpeedoMasterFontPtr spmf; - - spmf = spf->master; - --spmf->refcount; - if (spmf->refcount == 0) - sp_close_master_font (spmf); - xfree(spf->encoding); - xfree(spf->bitmaps); - xfree(spf); -} - -static void -SpeedoCloseFont(FontPtr pfont) -{ - SpeedoFontPtr spf; - - spf = (SpeedoFontPtr) pfont->fontPrivate; - sp_close_font(spf); - xfree(pfont->info.isStringProp); - xfree(pfont->info.props); - DestroyFontRec(pfont); - -} diff --git a/nx-X11/lib/font/Speedo/spfuncs.c b/nx-X11/lib/font/Speedo/spfuncs.c deleted file mode 100644 index da4d5c55e..000000000 --- a/nx-X11/lib/font/Speedo/spfuncs.c +++ /dev/null @@ -1,167 +0,0 @@ -/* $Xorg: spfuncs.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.7 2001/08/27 19:49:51 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifndef FONTMODULE -#include -#endif -#include -#include -#include "spint.h" - -/* ARGSUSED */ -static int -SpeedoOpenScalable ( - FontPathElementPtr fpe, - FontPtr *pFont, - int flags, - FontEntryPtr entry, - char *fileName, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - char fullName[MAXFONTNAMELEN]; - - strcpy (fullName, entry->name.name); - return SpeedoFontLoad (pFont, fullName, fileName, entry, vals, - format, fmask, flags); -} - -/* - * XXX - * - * this does a lot more then i'd like, but it has to get the bitmaps - * in order to get accurate metrics (which it *must* have). - * - * a possible optimization is to avoid allocating the glyph memory - * and to simply save the values without doing the work. - */ -static int -get_font_info( - FontInfoPtr pinfo, - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - SpeedoFontPtr *spfont) -{ - SpeedoFontPtr spf; - int err; - long sWidth; - - err = sp_open_font(fontname, filename, entry, vals, - (fsBitmapFormat) 0, (fsBitmapFormatMask) 0, (unsigned long) 0, - &spf); - - if (err != Successful) - return err; - - sp_fp_cur = spf; - sp_reset_master(spf->master); - - sp_make_header(spf, pinfo); - - sp_compute_bounds(spf, pinfo, (unsigned long) 0, &sWidth); - - sp_compute_props(spf, fontname, pinfo, sWidth); - - /* compute remaining accelerators */ - FontComputeInfoAccelerators (pinfo); - - *spfont = spf; - - return Successful; -} - -/* ARGSUSED */ -static int -SpeedoGetInfoScaleable( - FontPathElementPtr fpe, - FontInfoPtr pFontInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr vals) -{ - SpeedoFontPtr spf = NULL; - char fullName[MAXFONTNAMELEN]; - int err; - - strcpy(fullName, entry->name.name); - FontParseXLFDName(fullName, vals, FONT_XLFD_REPLACE_VALUE); - - err = get_font_info(pFontInfo, fullName, fileName, entry, vals, &spf); - - if (spf) - sp_close_font(spf); - - return err; -} - -static FontRendererRec renderer = { - ".spd", 4, NULL, SpeedoOpenScalable, - NULL, SpeedoGetInfoScaleable, 0 - , CAP_MATRIX | CAP_CHARSUBSETTING -}; - -void -SpeedoRegisterFontFileFunctions() -{ - sp_make_standard_props(); - sp_reset(); - FontFileRegisterRenderer(&renderer); -} diff --git a/nx-X11/lib/font/Speedo/spglyph.c b/nx-X11/lib/font/Speedo/spglyph.c deleted file mode 100644 index 3577f5567..000000000 --- a/nx-X11/lib/font/Speedo/spglyph.c +++ /dev/null @@ -1,399 +0,0 @@ -/* $Xorg: spglyph.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include /* for bit order #defines */ -#include "spint.h" -#include - -#undef CLIP_BBOX_NOISE - -static CurrentFontValuesRec current_font_values; -static CurrentFontValuesPtr cfv = ¤t_font_values; -static int bit_order, - byte_order, - scan; - -unsigned long -sp_compute_data_size( - FontPtr pfont, - int mappad, - int scanlinepad, - unsigned long start, - unsigned long end) -{ - unsigned long ch; - unsigned long size = 0; - int bpr; - SpeedoFontPtr spf = (SpeedoFontPtr) pfont->fontPrivate; - FontInfoPtr pinfo = &pfont->info; - int firstChar; - - firstChar = spf->master->first_char_id; - - /* allocate the space */ - switch (mappad) { - int charsize; - CharInfoPtr ci; - xCharInfo *cim; - - case BitmapFormatImageRectMin: - cfv->bpr = 0; - for (ch = start; ch <= end; ch++) { - ci = &spf->encoding[ch - firstChar]; - if (!ci) - ci = spf->pDefault; - cim = &ci->metrics; - charsize = GLYPH_SIZE(ci, scanlinepad); - charsize *= cim->ascent + cim->descent; - size += charsize; - } - break; - case BitmapFormatImageRectMaxWidth: - bpr = GLWIDTHBYTESPADDED(FONT_MAX_WIDTH(pinfo), scanlinepad); - cfv->bpr = bpr; - for (ch = start; ch <= end; ch++) { - ci = &spf->encoding[ch - firstChar]; - if (!ci) - ci = spf->pDefault; - cim = &ci->metrics; - charsize = bpr * (cim->ascent + cim->descent); - size += charsize; - } - break; - case BitmapFormatImageRectMax: - bpr = GLWIDTHBYTESPADDED(FONT_MAX_WIDTH(pinfo), scanlinepad); - cfv->bpr = bpr; - size = (end - start + 1) * bpr * FONT_MAX_HEIGHT(pinfo); - break; - default: - assert(0); - } - - return size; -} - -static void -finish_line(SpeedoFontPtr spf) -{ - int bpr = cfv->bpr; - CharInfoPtr ci = &spf->encoding[cfv->char_id - spf->master->first_char_id]; - - if (bpr == 0) { - bpr = GLYPH_SIZE(ci, cfv->scanpad); - } - if (bpr) { /* char may not have any metrics... */ - cfv->bp = (char *)cfv->bp + bpr; - } - assert(cfv->bp - sp_fp_cur->bitmaps <= sp_fp_cur->bitmap_size); -} - - -void -sp_set_bitmap_bits(fix15 y, fix15 xbit1, fix15 xbit2) -{ - int nmiddle; - CARD8 startmask, - endmask; - CARD8 *dst; - - if (xbit1 > cfv->bit_width) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Run wider than bitmap width -- truncated\n"); -#endif - - xbit1 = cfv->bit_width; - } - if (xbit2 > cfv->bit_width) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Run wider than bitmap width -- truncated\n"); -#endif - - xbit2 = cfv->bit_width; - } - - if (xbit2 < xbit1) { - xbit2 = xbit1; - } - - while (cfv->cur_y != y) { - finish_line(sp_fp_cur); - cfv->cur_y++; - } - - cfv->last_y = y; - if (y >= cfv->bit_height) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Y larger than bitmap height -- truncated\n"); -#endif - - cfv->trunc = 1; - return; - } - if (xbit1 < 0) /* XXX this is more than a little bit rude... */ - xbit1 = 0; - - nmiddle = (xbit1 >> 3); - dst = (CARD8 *)cfv->bp + nmiddle; - xbit2 -= (xbit1 & ~7); - nmiddle = (xbit2 >> 3); - xbit1 &= 7; - xbit2 &= 7; - if (bit_order == MSBFirst) { - startmask = ((CARD8) ~0) >> xbit1; - endmask = ~(((CARD8) ~0) >> xbit2); - } else { - startmask = ((CARD8) ~0) << xbit1; - endmask = ~(((CARD8) ~0) << xbit2); - } - if (nmiddle == 0) - *dst |= endmask & startmask; - else { - *dst++ |= startmask; - while (--nmiddle) - *dst++ = (CARD8)~0; - *dst |= endmask; - } -} - -/* ARGSUSED */ -void -sp_open_bitmap(fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, - fix15 xsize, fix15 ysize) -{ - CharInfoPtr ci = &sp_fp_cur->encoding[cfv->char_id - sp_fp_cur->master->first_char_id]; - -/*- - * this is set to provide better quality bitmaps. since the Speedo - * sp_get_bbox() function returns an approximate (but guarenteed to contain) - * set of metrics, some of the bitmaps can be place poorly inside and - * look bad. - * - * with this set, the actual bitmap values are used instead of the bboxes. - * it makes things look better, but causes two possible problems: - * - * 1 - the reported min & max bounds may not correspond to the extents - * reported - * 2 - if the extents are reported before the character is generated, - * a client could see them change. this currently never happens, - * but will when a desired enhancement (don't reneder till needed) - * is made. - */ - -#define BBOX_FIXUP 1 - -#ifdef BBOX_FIXUP - int off_horz; - int off_vert; - - if (xorg < 0) - off_horz = (fix15) ((xorg - 32768L) / 65536); - else - off_horz = (fix15) ((xorg + 32768L) / 65536); - if (yorg < 0) - off_vert = (fix15) ((yorg - 32768L) / 65536); - else - off_vert = (fix15) ((yorg + 32768L) / 65536); - if (xsize != 0 || ysize != 0 || ci->metrics.characterWidth) - { - ci->metrics.leftSideBearing = off_horz; - ci->metrics.descent = -off_vert; - ci->metrics.rightSideBearing = xsize + off_horz; - ci->metrics.ascent = ysize + off_vert; - } - else - { - /* If setting the proper size would cause the character to appear to - be non-existent, fudge things by giving it a pixel to occupy. */ - xsize = ysize = 1; - ci->metrics.leftSideBearing = ci->metrics.descent = 0; - ci->metrics.rightSideBearing = ci->metrics.ascent = 1; - } - - cfv->bit_width = xsize; - cfv->bit_height = ysize; -#else - cfv->bit_width = ci->metrics.rightSideBearing - - ci->metrics.leftSideBearing; - cfv->bit_height = ci->metrics.ascent + ci->metrics.descent; -#endif - - assert(cfv->bp - sp_fp_cur->bitmaps <= sp_fp_cur->bitmap_size); - ci->bits = (char *) cfv->bp; - - cfv->cur_y = 0; -} - -void -sp_close_bitmap() -{ - CharInfoPtr ci = &sp_fp_cur->encoding[cfv->char_id - sp_fp_cur->master->first_char_id]; - int bpr = cfv->bpr; - - if (bpr == 0) - bpr = GLYPH_SIZE(ci, cfv->scanpad); - if (!cfv->trunc) - finish_line(sp_fp_cur); - cfv->trunc = 0; - cfv->last_y++; - while (cfv->last_y < cfv->bit_height) { - finish_line(sp_fp_cur); - cfv->last_y++; - } - if (byte_order != bit_order) { - switch (scan) { - case 1: - break; - case 2: - TwoByteSwap(cfv->bp, bpr * cfv->bit_height); - break; - case 4: - FourByteSwap(cfv->bp, bpr * cfv->bit_height); - break; - } - } -} - -int -sp_build_all_bitmaps( - FontPtr pfont, - fsBitmapFormat format, - fsBitmapFormatMask fmask) -{ - int ret, - glyph = 1, - image = BitmapFormatImageRectMin; - unsigned long glyph_size; - SpeedoFontPtr spf = (SpeedoFontPtr) pfont->fontPrivate; - SpeedoMasterFontPtr spmf = spf->master; - pointer bitmaps; - int start, - end, - i; - - scan = 1; - ret = CheckFSFormat(format, fmask, - &bit_order, &byte_order, &scan, &glyph, &image); - - pfont->bit = bit_order; - pfont->byte = byte_order; - pfont->glyph = glyph; - pfont->scan = scan; - if (ret != Successful) - return BadFontFormat; - - start = spmf->first_char_id; - end = spmf->max_id; - glyph_size = sp_compute_data_size(pfont, image, glyph, start, end); - - /* XXX -- MONDO KLUDGE -- add some slop */ - /* - * not sure why this is wanted, but it keeps the packer from going off the - * end and toasting us down the line - */ - glyph_size += 20; - -#ifdef DEBUG - spf->bitmap_size = glyph_size; -#endif - - bitmaps = (pointer) xalloc(glyph_size); - if (!bitmaps) - return AllocError; - bzero((char *) bitmaps, glyph_size); - - /* set up some state */ - sp_fp_cur = spf; - spf->bitmaps = bitmaps; - cfv->format = format; - cfv->scanpad = glyph; - cfv->bp = bitmaps; - - for (i = 0; i < spmf->num_chars; i++) { - int j; - cfv->char_index = spmf->enc[i * 2 + 1]; - cfv->char_id = spmf->enc[i * 2]; -#ifdef DEBUG -fprintf(stderr, "build_all_sp_bitmaps:i = %d, Char ID = %d\n", i, cfv->char_id); -#endif - if (!cfv->char_id) - continue; - - /* - * See if this character is in the list of ranges specified in the - * XLFD name - */ - for (j = 0; j < spf->vals.nranges; j++) - if (cfv->char_id >= mincharno(spf->vals.ranges[j]) && - cfv->char_id <= maxcharno(spf->vals.ranges[j])) - break; - - /* If not, don't realize it. */ - if (spf->vals.nranges && j == spf->vals.nranges) - continue; - - if (!sp_make_char(cfv->char_index)) { - -#ifdef DEBUG /* can be very common with some encodings */ - SpeedoErr("Can't make char %d\n", cfv->char_index); -#endif - } - } - - return Successful; -} diff --git a/nx-X11/lib/font/Speedo/spinfo.c b/nx-X11/lib/font/Speedo/spinfo.c deleted file mode 100644 index d7a1edd98..000000000 --- a/nx-X11/lib/font/Speedo/spinfo.c +++ /dev/null @@ -1,462 +0,0 @@ -/* $Xorg: spinfo.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.12 2001/12/14 19:56:42 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include "spint.h" -#ifndef FONTMODULE -#include -#else -#include "xf86_ansic.h" -#endif - -/* percentage of pointsize used to specify ascent & descent */ -#define STRETCH_FACTOR 120 - -enum scaleType { - atom, truncate_atom, pixel_size, point_size, resolution_x, - resolution_y, average_width -}; - -typedef struct _fontProp { - char *name; - long atom; - enum scaleType type; -} fontProp; - -static fontProp fontNamePropTable[] = { - { "FOUNDRY", 0, atom }, - { "FAMILY_NAME", 0, atom }, - { "WEIGHT_NAME", 0, atom }, - { "SLANT", 0, atom }, - { "SETWIDTH_NAME", 0, atom }, - { "ADD_STYLE_NAME", 0, atom }, - { "PIXEL_SIZE", 0, pixel_size }, - { "POINT_SIZE", 0, point_size }, - { "RESOLUTION_X", 0, resolution_x }, - { "RESOLUTION_Y", 0, resolution_y }, - { "SPACING", 0, atom }, - { "AVERAGE_WIDTH", 0, average_width }, - { "CHARSET_REGISTRY", 0, atom }, - { "CHARSET_ENCODING", 0, truncate_atom } -}; - -/* Warning: following array is closely related to the sequence of - defines after it. */ - -static fontProp extraProps[] = { - { "FONT", 0, }, - { "COPYRIGHT", 0, }, - { "RAW_PIXEL_SIZE", 0, }, - { "RAW_POINT_SIZE", 0, }, - { "RAW_ASCENT", 0, }, - { "RAW_DESCENT", 0, }, - { "RAW_AVERAGE_WIDTH", 0, }, - { "FONT_TYPE", 0, }, - { "RASTERIZER_NAME", 0, } -}; - -/* this is a bit kludgy */ -#define FONTPROP 0 -#define COPYRIGHTPROP 1 -#define RAWPIXELPROP 2 -#define RAWPOINTPROP 3 -#define RAWASCENTPROP 4 -#define RAWDESCENTPROP 5 -#define RAWWIDTHPROP 6 -#define FONT_TYPEPROP 7 -#define RASTERIZER_NAMEPROP 8 - -#define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) -#define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) - -#define NPROPS (NNAMEPROPS + NEXTRAPROPS) - -void -sp_make_standard_props() -{ - int i; - fontProp *t; - - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - i = sizeof(extraProps) / sizeof(fontProp); - for (t = extraProps; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); -} - -void -sp_make_header( - SpeedoFontPtr spf, - FontInfoPtr pinfo) -{ - int pixel_size; - SpeedoMasterFontPtr spmf = spf->master; - - pinfo->firstCol = spmf->first_char_id & 0xff; - pinfo->firstRow = spmf->first_char_id >> 8; - pinfo->lastCol = spmf->max_id & 0xff; - pinfo->lastRow = spmf->max_id >> 8; - - /* XXX -- hackery here */ - pinfo->defaultCh = 0; -/* computed by FontComputeInfoAccelerators: - * noOverlap - * constantMetrics - * terminalFont - * constantWidth - * inkInside - */ - pinfo->inkMetrics = 0; - pinfo->allExist = 0; - pinfo->drawDirection = LeftToRight; - pinfo->cachable = 1; - if (spf->specs.xxmult != spf->specs.yymult) - pinfo->anamorphic = TRUE; - else - pinfo->anamorphic = FALSE; -/* computed by sp_compute_bounds: - * maxOverlap - * maxbounds - * minbounds - * ink_maxbounds - * ink_minbounds - */ - pixel_size = spf->vals.pixel_matrix[3] * STRETCH_FACTOR / 100; - pinfo->fontAscent = pixel_size * 764 / 1000; /* 764 == EM_TOP */ - pinfo->fontDescent = pixel_size - pinfo->fontAscent; -} - -static void -adjust_min_max( - xCharInfo *minc, - xCharInfo *maxc, - xCharInfo *tmp) -{ -#define MINMAX(field,ci) \ - if (minc->field > (ci)->field) \ - minc->field = (ci)->field; \ - if (maxc->field < (ci)->field) \ - maxc->field = (ci)->field; - - MINMAX(ascent, tmp); - MINMAX(descent, tmp); - MINMAX(leftSideBearing, tmp); - MINMAX(rightSideBearing, tmp); - MINMAX(characterWidth, tmp); - - if ((INT16)minc->attributes > (INT16)tmp->attributes) - minc->attributes = tmp->attributes; - if ((INT16)maxc->attributes < (INT16)tmp->attributes) - maxc->attributes = tmp->attributes; - -#undef MINMAX -} - - -void -sp_compute_bounds( - SpeedoFontPtr spf, - FontInfoPtr pinfo, - unsigned long flags, - long *sWidth) -{ - int i, - id, - index, - maxOverlap, - overlap, - total_width = 0; - xCharInfo minchar, - maxchar, - tmpchar; - bbox_t bbox; - fix31 width; - double pix_width; - SpeedoMasterFontPtr spmf = spf->master; - int firstChar; - int num_chars = 0; - - firstChar = spmf->first_char_id; - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - maxOverlap = -32767; - *sWidth = 0; - for (i = 0; i < spmf->num_chars; i++) { - int j; - int char_id; - - index = spmf->enc[i * 2 + 1]; - char_id = spmf->enc[i * 2]; - /* - * See if this character is in the list of ranges specified in the - * XLFD name - */ - for (j = 0; j < spf->vals.nranges; j++) - if (char_id >= mincharno(spf->vals.ranges[j]) && - char_id <= maxcharno(spf->vals.ranges[j])) - break; - if (spf->vals.nranges && j == spf->vals.nranges) - continue; - num_chars++; - - if (!(flags & ComputeBoundsOnly)) { - - width = sp_get_char_width(index); - - /* convert to pixel coords */ - pix_width = (int)width * (spf->specs.xxmult / 65536L) + - ((int) width * (spf->specs.xxmult % 65536L)) - / 65536L; - pix_width /= 65536L; - - (void) sp_get_char_bbox(index, &bbox); - bbox.ymax = (bbox.ymax + 32768L) >> 16; - bbox.ymin = (bbox.ymin + 32768L) >> 16; - bbox.xmin = (bbox.xmin + 32768L) >> 16; - bbox.xmax = (bbox.xmax + 32768L) >> 16; - tmpchar.ascent = bbox.ymax; - tmpchar.descent = -bbox.ymin; - tmpchar.characterWidth = (int)(pix_width + /* round */ - (pix_width > 0 ? 0.5 : -0.5)); - tmpchar.rightSideBearing = bbox.xmax; - tmpchar.leftSideBearing = bbox.xmin; - - if (!tmpchar.characterWidth && - tmpchar.ascent == -tmpchar.descent && - tmpchar.rightSideBearing == tmpchar.leftSideBearing) - { - /* Character appears non-existent, probably as a result - of the transformation. Let's give it one pixel in - the universe so it's not mistaken for non-existent. */ - tmpchar.leftSideBearing = tmpchar.descent = 0; - tmpchar.rightSideBearing = tmpchar.ascent = 1; - } - - tmpchar.attributes = (int)((double)(int)width / 65.536 + .5); - } - else - tmpchar = spf->encoding[char_id - firstChar].metrics; - - adjust_min_max(&minchar, &maxchar, &tmpchar); - overlap = tmpchar.rightSideBearing - tmpchar.characterWidth; - if (maxOverlap < overlap) - maxOverlap = overlap; - - total_width += ((int)(INT16)tmpchar.attributes); - *sWidth += abs((int)(INT16)tmpchar.attributes); - - if (flags & SaveMetrics) { - id = spmf->enc[i * 2] - firstChar; - assert(id <= spmf->max_id - firstChar); - spf->encoding[id].metrics = tmpchar; - } - } - - - if (num_chars > 0) - { - *sWidth = (int)(((double)*sWidth * 10.0 + (double)num_chars / 2.0) / - num_chars); - if (total_width < 0) - { - /* Predominant direction is R->L */ - *sWidth = -*sWidth; - } - spf->vals.width = (int)((double)*sWidth * spf->vals.pixel_matrix[0] / - 1000.0 + - (spf->vals.pixel_matrix[0] > 0 ? .5 : -.5)); - } - else - { - spf->vals.width = 0; - } - pinfo->maxbounds = maxchar; - pinfo->minbounds = minchar; - pinfo->ink_maxbounds = maxchar; - pinfo->ink_minbounds = minchar; - pinfo->maxOverlap = maxOverlap; -} - -void -sp_compute_props( - SpeedoFontPtr spf, - char *fontname, - FontInfoPtr pinfo, - long sWidth) -{ - FontPropPtr pp; - int i, - nprops; - fontProp *fpt; - char *is_str; - char *ptr1 = NULL, - *ptr2; - char *ptr3; - char tmpname[1024]; - FontScalableRec tmpvals; - - nprops = pinfo->nprops = NPROPS; - pinfo->isStringProp = (char *) xalloc(sizeof(char) * nprops); - pinfo->props = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops); - if (!pinfo->isStringProp || !pinfo->props) { - xfree(pinfo->isStringProp); - pinfo->isStringProp = (char *) 0; - xfree(pinfo->props); - pinfo->props = (FontPropPtr) 0; - pinfo->nprops = 0; - return; - } - bzero(pinfo->isStringProp, (sizeof(char) * nprops)); - - ptr2 = fontname; - for (i = NNAMEPROPS, pp = pinfo->props, fpt = fontNamePropTable, - is_str = pinfo->isStringProp; - i; - i--, pp++, fpt++, is_str++) { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - pp->name = fpt->atom; - switch (fpt->type) { - case atom: - *is_str = TRUE; - pp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - break; - case truncate_atom: - *is_str = TRUE; - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - pp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - break; - case pixel_size: - pp->value = (int)(spf->vals.pixel_matrix[3] + - (spf->vals.pixel_matrix[3] > 0 ? .5 : -.5)); - break; - case point_size: - pp->value = (int)(spf->vals.point_matrix[3] * 10.0 + - (spf->vals.point_matrix[3] > 0 ? .5 : -.5)); - break; - case resolution_x: - pp->value = spf->vals.x; - break; - case resolution_y: - pp->value = spf->vals.y; - break; - case average_width: - pp->value = spf->vals.width; - break; - } - } - - for (i = 0, fpt = extraProps; i < NEXTRAPROPS; i++, is_str++, pp++, fpt++) { - pp->name = fpt->atom; - switch (i) { - case FONTPROP: - *is_str = TRUE; - strcpy(tmpname, fontname); - FontParseXLFDName(tmpname, &tmpvals, FONT_XLFD_REPLACE_ZERO); - FontParseXLFDName(tmpname, &spf->vals, FONT_XLFD_REPLACE_VALUE); - pp->value = MakeAtom(tmpname, strlen(tmpname), TRUE); - break; - case COPYRIGHTPROP: - *is_str = TRUE; - pp->value = MakeAtom(spf->master->copyright, - strlen(spf->master->copyright), TRUE); - break; - case FONT_TYPEPROP: - *is_str = TRUE; - pp->value = MakeAtom("Speedo", strlen("Speedo"), TRUE); - break; - case RASTERIZER_NAMEPROP: - *is_str = TRUE; - pp->value = MakeAtom("X Consortium Speedo Rasterizer", - strlen("X Consortium Speedo Rasterizer"), - TRUE); - break; - case RAWPIXELPROP: - *is_str = FALSE; - pp->value = 1000; - break; - case RAWPOINTPROP: - *is_str = FALSE; - pp->value = (long)(72270.0 / (double)spf->vals.y + .5); - break; - case RAWASCENTPROP: - *is_str = FALSE; - pp->value = STRETCH_FACTOR * 764 / 100; - break; - case RAWDESCENTPROP: - *is_str = FALSE; - pp->value = STRETCH_FACTOR * 236 / 100; - break; - case RAWWIDTHPROP: - *is_str = FALSE; - pp->value = sWidth; - break; - } - } -} diff --git a/nx-X11/lib/font/Speedo/spint.h b/nx-X11/lib/font/Speedo/spint.h deleted file mode 100644 index 118ea8f42..000000000 --- a/nx-X11/lib/font/Speedo/spint.h +++ /dev/null @@ -1,180 +0,0 @@ -/* $Xorg: spint.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.9 2001/01/17 19:43:20 dawes Exp $ */ - -#ifndef _SPINT_H_ -#define _SPINT_H_ - -#include -#ifndef XFree86LOADER -#include -#else -#include -#endif -#include -#include "speedo.h" - -#define SaveMetrics 0x1 -#define ComputeBoundsOnly 0x2 - -#define GLWIDTHBYTESPADDED(bits,nbytes) \ - ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ - :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ - :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ - :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ - : 0) - -#define GLYPH_SIZE(ch, nbytes) \ - GLWIDTHBYTESPADDED((ch)->metrics.rightSideBearing - \ - (ch)->metrics.leftSideBearing, (nbytes)) - -#define mincharno(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxcharno(p) ((p).max_char_low + ((p).max_char_high << 8)) - -#define MasterFileOpen 0x1 - -typedef struct _sp_master { - FontEntryPtr entry; /* back pointer */ - FILE *fp; - char *fname; - ufix8 *f_buffer; - ufix8 *c_buffer; - char *copyright; - ufix8 *key; - buff_t font; - buff_t char_data; - ufix16 mincharsize; - int first_char_id; - int num_chars; - int max_id; - int state; /* open, closed */ - int refcount; /* number of instances */ - int *enc; - int enc_size; -} SpeedoMasterFontRec, *SpeedoMasterFontPtr; - -typedef struct _cur_font_stats { - fsBitmapFormat format; - /* current glyph info */ - ufix16 char_index; - ufix16 char_id; - - fix15 bit_width, - bit_height; - fix15 cur_y; - int bpr; - - /* - * since Speedo returns extents that are not identical to what it feeds to - * the bitmap builder, and we want to be able to use the extents for - * preformance reasons, some of the bitmaps require padding out. the next - * two flags keep track of this. - */ - fix15 last_y; - int trunc; - - pointer bp; - int scanpad; -} CurrentFontValuesRec, *CurrentFontValuesPtr; - - -typedef struct _sp_font { - struct _sp_master *master; - specs_t specs; - - FontEntryPtr entry; - - FontScalableRec vals; - - /* char & metric data */ - CharInfoPtr encoding; - CharInfoPtr pDefault; - pointer bitmaps; - -#ifdef DEBUG - unsigned long bitmap_size; -#endif - -} SpeedoFontRec, *SpeedoFontPtr; - -extern SpeedoFontPtr sp_fp_cur; - -extern int sp_open_font(char *, char *, FontEntryPtr, FontScalablePtr, - fsBitmapFormat, fsBitmapFormatMask, Mask, - SpeedoFontPtr *); -extern int sp_open_master(const char *, const char *, SpeedoMasterFontPtr *); -extern void sp_close_font(SpeedoFontPtr); -extern void sp_close_master_font(SpeedoMasterFontPtr); -extern void sp_close_master_file(SpeedoMasterFontPtr); -extern void sp_reset_master(SpeedoMasterFontPtr); -extern void SpeedoErr(char *fmt, ...); - -extern void sp_make_standard_props(void); -extern void sp_make_header(SpeedoFontPtr, FontInfoPtr); -extern void sp_compute_bounds(SpeedoFontPtr, FontInfoPtr, unsigned long, long *); -extern void sp_compute_props(SpeedoFontPtr, char *, FontInfoPtr, long); -extern int sp_build_all_bitmaps(FontPtr, fsBitmapFormat, fsBitmapFormatMask); -extern unsigned long sp_compute_data_size(FontPtr, int, int, unsigned long, - unsigned long); - -extern int SpeedoFontLoad(FontPtr *, char *, char *, FontEntryPtr, - FontScalablePtr, fsBitmapFormat, fsBitmapFormatMask, - Mask); - -extern int sp_bics_map[]; -extern int sp_bics_map_size; - -#ifdef EXTRAFONTS -extern int adobe_map[]; -extern int adobe_map_size; - -#endif - -#endif /* _SPINT_H_ */ diff --git a/nx-X11/lib/font/Speedo/sptobdf.c b/nx-X11/lib/font/Speedo/sptobdf.c deleted file mode 100644 index ca3caa515..000000000 --- a/nx-X11/lib/font/Speedo/sptobdf.c +++ /dev/null @@ -1,678 +0,0 @@ -/* $Xorg: sptobdf.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices and - * Digital not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * Network Computing Devices and Digital make no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - * - * Dave Lemke - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/* - * Speedo outline to BFD format converter - */ - -#include -#include "speedo.h" - -#ifdef EXTRAFONTS -#include "ncdkeys.h" -#else -#include "keys.h" -#endif - -#include "iso8859.h" - -#define MAX_BITS 1024 - -#define BBOX_CLIP - -static char line_of_bits[MAX_BITS + 1]; - -static FILE *fp; -static ufix16 char_index, - char_id; -static buff_t font; -static buff_t char_data; -static ufix8 *f_buffer, - *c_buffer; -static ufix16 mincharsize; -static fix15 cur_y; -static fix15 bit_width, - bit_height; - -static ufix8 key[] = -{ - KEY0, - KEY1, - KEY2, - KEY3, - KEY4, - KEY5, - KEY6, - KEY7, - KEY8 -}; /* Font decryption key */ - - -static char *progname; -static char *fontname = NULL; -static char *fontfile = NULL; - -static int point_size = 120; -static int x_res = 72; -static int y_res = 72; -static int quality = 0; -static int iso_encoding = 1; - -static int num_props = 7; -static int stretch = 120; - -static specs_t specs; - -static void dump_header(); - -static void -usage() -{ - fprintf(stderr, "Usage: %s [-xres x resolution] [-yres y resolution]\n\t[-ptsize pointsize] [-fn fontname] [-q quality (0-1)] fontfile\n", progname); - fprintf(stderr, "Where:\n"); - fprintf(stderr, "-xres specifies the X resolution (72)\n"); - fprintf(stderr, "-yres specifies the Y resolution (72)\n"); - fprintf(stderr, "-pts specifies the pointsize in decipoints (120)\n"); - fprintf(stderr, "-fn specifies the font name (full Bitstream name)\n"); - fprintf(stderr, "-q specifies the font quality [0-1] (0)\n"); - fprintf(stderr, "\n"); - exit(0); -} - -static fix15 -read_2b(ptr) - ufix8 *ptr; -{ - fix15 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -static fix31 -read_4b(ptr) - ufix8 *ptr; -{ - fix31 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -static void -process_args(ac, av) - int ac; - char **av; -{ - int i; - - for (i = 1; i < ac; i++) { - if (!strncmp(av[i], "-xr", 3)) { - if (av[i + 1]) { - x_res = atoi(av[++i]); - } else - usage(); - } else if (!strncmp(av[i], "-yr", 3)) { - if (av[i + 1]) { - y_res = atoi(av[++i]); - } else - usage(); - } else if (!strncmp(av[i], "-pt", 3)) { - if (av[i + 1]) { - point_size = atoi(av[++i]); - } else - usage(); - } else if (!strncmp(av[i], "-fn", 3)) { - if (av[i + 1]) { - fontname = av[++i]; - } else - usage(); - } else if (!strncmp(av[i], "-q", 2)) { - if (av[i + 1]) { - quality = atoi(av[++i]); - } else - usage(); - } else if (!strncmp(av[i], "-st", 3)) { - if (av[i + 1]) { - stretch = atoi(av[++i]); - } else - usage(); - } else if (!strncmp(av[i], "-noni", 5)) { - iso_encoding = 0; - } else if (*av[i] == '-') { - usage(); - } else - fontfile = av[i]; - } - if (!fontfile) - usage(); -} - -void -main(argc, argv) - int argc; - char **argv; -{ - ufix32 i; - ufix8 tmp[16]; - ufix32 minbufsize; - ufix16 cust_no; - int first_char_index, - num_chars; - - progname = argv[0]; - process_args(argc, argv); - fp = fopen(fontfile, "r"); - if (!fp) { - fprintf(stderr, "No such font file, \"%s\"\n", fontfile); - exit(-1); - } - if (fread(tmp, sizeof(ufix8), 16, fp) != 16) { - fprintf(stderr, "error reading \"%s\"\n", fontfile); - exit(-1); - } - minbufsize = (ufix32) read_4b(tmp + FH_FBFSZ); - f_buffer = (ufix8 *) malloc(minbufsize); - if (!f_buffer) { - fprintf(stderr, "can't get %x bytes of memory\n", minbufsize); - exit(-1); - } - fseek(fp, (ufix32) 0, 0); - - if (fread(f_buffer, sizeof(ufix8), (ufix16) minbufsize, fp) != minbufsize) { - fprintf(stderr, "error reading file \"%s\"\n", fontfile); - exit(-1); - } - mincharsize = read_2b(f_buffer + FH_CBFSZ); - - c_buffer = (ufix8 *) malloc(mincharsize); - if (!c_buffer) { - fprintf(stderr, "can't get %x bytes for char buffer\n", mincharsize); - exit(-1); - } - /* init */ - sp_reset(); - - font.org = f_buffer; - font.no_bytes = minbufsize; - - if ((cust_no = sp_get_cust_no(font)) != CUS0) { - fprintf(stderr, "Non-standard encryption for \"%s\"\n", fontfile); - exit(-1); - } - sp_set_key(key); - - first_char_index = read_2b(f_buffer + FH_FCHRF); - num_chars = read_2b(f_buffer + FH_NCHRL); - - /* set up specs */ - /* Note that point size is in decipoints */ - specs.pfont = &font; - /* XXX beware of overflow */ - specs.xxmult = point_size * x_res / 720 * (1 << 16); - specs.xymult = 0L << 16; - specs.xoffset = 0L << 16; - specs.yxmult = 0L << 16; - specs.yymult = point_size * y_res / 720 * (1 << 16); - specs.yoffset = 0L << 16; - switch (quality) { - case 0: - specs.flags = 0; - break; - case 1: - specs.flags = MODE_SCREEN; - break; - case 2: - specs.flags = MODE_2D; - break; - default: - fprintf(stderr, "bogus quality value %d\n", quality); - break; - } - specs.out_info = NULL; - - if (!fontname) { - fontname = (char *) (f_buffer + FH_FNTNM); - } - if (iso_encoding) - num_chars = num_iso_chars; - dump_header(num_chars); - - if (!sp_set_specs(&specs)) { - fprintf(stderr, "can't set specs\n"); - } else { - if (iso_encoding) { - for (i = 0; i < num_iso_chars * 2; i += 2) { - char_index = iso_map[i + 1]; - char_id = iso_map[i]; - if (!sp_make_char(char_index)) { - fprintf(stderr, "can't make char %x\n", char_index); - } - } - } else { - for (i = 0; i < num_chars; i++) { - char_index = i + first_char_index; - char_id = sp_get_char_id(char_index); - if (char_id) { - if (!sp_make_char(char_index)) { - fprintf(stderr, "can't make char %x\n", char_index); - } - } - } - } - } - - (void) fclose(fp); - - printf("ENDFONT\n"); - exit(0); -} - -static void -dump_header(num_chars) - ufix32 num_chars; -{ - fix15 xmin, - ymin, - xmax, - ymax; - fix15 ascent, - descent; - fix15 pixel_size; - - xmin = read_2b(f_buffer + FH_FXMIN); - ymin = read_2b(f_buffer + FH_FYMIN); - xmax = read_2b(f_buffer + FH_FXMAX); - ymax = read_2b(f_buffer + FH_FYMAX); - pixel_size = point_size * x_res / 720; - - printf("STARTFONT 2.1\n"); - printf("COMMENT\n"); - printf("COMMENT Generated from Bitstream Speedo outlines via sptobdf\n"); - printf("COMMENT\n"); - printf("FONT %s\n", fontname); - printf("SIZE %d %d %d\n", pixel_size, x_res, y_res); - printf("FONTBOUNDINGBOX %d %d %d %d\n", xmin, ymin, xmax, ymax); - printf("STARTPROPERTIES %d\n", num_props); - - printf("RESOLUTION_X %d\n", x_res); - printf("RESOLUTION_Y %d\n", y_res); - printf("POINT_SIZE %d\n", point_size); - printf("PIXEL_SIZE %d\n", pixel_size); - printf("COPYRIGHT \"%s\"\n", f_buffer + FH_CPYRT); - - /* do some stretching here so that its isn't too tight */ - pixel_size = pixel_size * stretch / 100; - ascent = pixel_size * 764 / 1000; /* 764 == EM_TOP */ - descent = pixel_size - ascent; - printf("FONT_ASCENT %d\n", ascent); - printf("FONT_DESCENT %d\n", descent); - - printf("ENDPROPERTIES\n"); - printf("CHARS %d\n", num_chars); -} - -buff_t * -sp_load_char_data(file_offset, num, cb_offset) - fix31 file_offset; - fix15 num; - fix15 cb_offset; -{ - if (fseek(fp, (long) file_offset, (int) 0)) { - fprintf(stderr, "can't seek to char\n"); - (void) fclose(fp); - exit(-1); - } - if ((num + cb_offset) > mincharsize) { - fprintf(stderr, "char buf overflow\n"); - (void) fclose(fp); - exit(-2); - } - if (fread((c_buffer + cb_offset), sizeof(ufix8), num, fp) != num) { - fprintf(stderr, "can't get char data\n"); - exit(-1); - } - char_data.org = (ufix8 *) c_buffer + cb_offset; - char_data.no_bytes = num; - - return &char_data; -} - -/* - * Called by Speedo character generator to report an error. - * - * Since character data not available is one of those errors - * that happens many times, don't report it to user - */ -void -sp_report_error(n) - fix15 n; -{ - switch (n) { - case 1: - fprintf(stderr, "Insufficient font data loaded\n"); - break; - case 3: - fprintf(stderr, "Transformation matrix out of range\n"); - break; - case 4: - fprintf(stderr, "Font format error\n"); - break; - case 5: - fprintf(stderr, "Requested specs not compatible with output module\n"); - break; - case 7: - fprintf(stderr, "Intelligent transformation requested but not supported\n"); - break; - case 8: - fprintf(stderr, "Unsupported output mode requested\n"); - break; - case 9: - fprintf(stderr, "Extended font loaded but only compact fonts supported\n"); - break; - case 10: - fprintf(stderr, "Font specs not set prior to use of font\n"); - break; - case 12: - break; - case 13: - fprintf(stderr, "Track kerning data not available()\n"); - break; - case 14: - fprintf(stderr, "Pair kerning data not available()\n"); - break; - default: - fprintf(stderr, "report_error(%d)\n", n); - break; - } -} - -void -sp_open_bitmap(x_set_width, y_set_width, xorg, yorg, xsize, ysize) - fix31 x_set_width; - fix31 y_set_width; - fix31 xorg; - fix31 yorg; - fix15 xsize; - fix15 ysize; -{ - fix15 i; - fix15 off_horz; - fix15 off_vert; - fix31 width, - pix_width; - bbox_t bb; - - bit_width = xsize; - - bit_height = ysize; - off_horz = (fix15) ((xorg + 32768L) >> 16); - off_vert = (fix15) ((yorg + 32768L) >> 16); - - if (bit_width > MAX_BITS) { - -#ifdef DEBUG - fprintf(stderr, "char wider than max bits -- truncated\n"); -#endif - - bit_width = MAX_BITS; - } - width = sp_get_char_width(char_index); - pix_width = width * (specs.xxmult / 65536L) + - ((ufix32) width * ((ufix32) specs.xxmult & 0xffff)) / 65536L; - pix_width /= 65536L; - - width = (pix_width * 7200L) / (point_size * y_res); - - (void) sp_get_char_bbox(char_index, &bb); - bb.xmin >>= 16; - bb.ymin >>= 16; - bb.xmax >>= 16; - bb.ymax >>= 16; - -#ifdef DEBUG - if ((bb.xmax - bb.xmin) != bit_width) - fprintf(stderr, "bbox & width mismatch 0x%x (%d) (%d vs %d)\n", - char_index, char_id, (bb.xmax - bb.xmin), bit_width); - if ((bb.ymax - bb.ymin) != bit_height) - fprintf(stderr, "bbox & height mismatch 0x%x (%d) (%d vs %d)\n", - char_index, char_id, (bb.ymax - bb.ymin), bit_height); - if (bb.xmin != off_horz) - fprintf(stderr, "x min mismatch 0x%x (%d) (%d vs %d)\n", - char_index, char_id, bb.xmin, off_horz); - if (bb.ymin != off_vert) - fprintf(stderr, "y min mismatch 0x%x (%d) (%d vs %d)\n", - char_index, char_id, bb.ymin, off_vert); -#endif - -#ifdef BBOX_CLIP - bit_width = bb.xmax - bb.xmin; - bit_height = bb.ymax - bb.ymin; - off_horz = bb.xmin; - off_vert = bb.ymin; -#endif - - /* XXX kludge to handle space */ - if (bb.xmin == 0 && bb.ymin == 0 && bb.xmax == 0 && bb.ymax == 0 && - width) { - bit_width = 1; - bit_height = 1; - } - printf("STARTCHAR %d\n", char_id); - printf("ENCODING %d\n", char_id); - printf("SWIDTH %d 0\n", width); - printf("DWIDTH %d 0\n", pix_width); - printf("BBX %d %d %d %d\n", bit_width, bit_height, off_horz, off_vert); - printf("BITMAP\n"); - - for (i = 0; i < bit_width; i++) { - line_of_bits[i] = '.'; - } - line_of_bits[bit_width] = '\0'; - cur_y = 0; -} - -static void -dump_line(line) - ufix8 *line; -{ - int bit; - unsigned byte; - - byte = 0; - for (bit = 0; bit < bit_width; bit++) { - if (line[bit] == 'X') - byte |= (1 << (7 - (bit & 7))); - if ((bit & 7) == 7) { - printf("%02X", byte); - byte = 0; - } - } - if ((bit & 7) != 0) - printf("%02X", byte); - printf("\n"); -} - -#ifdef BBOX_CLIP -static fix15 last_y; -static int trunc = 0; - -#endif - -void -sp_set_bitmap_bits(y, xbit1, xbit2) - fix15 y; - fix15 xbit1; - fix15 xbit2; -{ - fix15 i; - - if (xbit1 > MAX_BITS) { - -#ifdef DEBUG - fprintf(stderr, "run wider than max bits -- truncated\n"); -#endif - - xbit1 = MAX_BITS; - } - if (xbit2 > MAX_BITS) { - -#ifdef DEBUG - fprintf(stderr, "run wider than max bits -- truncated\n"); -#endif - - xbit2 = MAX_BITS; - } - while (cur_y != y) { - dump_line(line_of_bits); - for (i = 0; i < bit_width; i++) { - line_of_bits[i] = '.'; - } - cur_y++; - } - -#ifdef BBOX_CLIP - last_y = y; - if (y >= bit_height) { - -#ifdef DEBUG - fprintf(stderr, - "y value is larger than height 0x%x (%d) -- truncated\n", - char_index, char_id); -#endif - - trunc = 1; - return; - } -#endif /* BBOX_CLIP */ - - for (i = xbit1; i < xbit2; i++) { - line_of_bits[i] = 'X'; - } -} - -void -sp_close_bitmap() -{ - -#ifdef BBOX_CLIP - int i; - - if (!trunc) - dump_line(line_of_bits); - trunc = 0; - - - last_y++; - while (last_y < bit_height) { - -#ifdef DEBUG - fprintf(stderr, "padding out height for 0x%x (%d)\n", - char_index, char_id); -#endif - - for (i = 0; i < bit_width; i++) { - line_of_bits[i] = '.'; - } - dump_line(line_of_bits); - last_y++; - } - -#else - dump_line(line_of_bits); -#endif - - printf("ENDCHAR\n"); -} - -/* outline stubs */ -void -sp_open_outline() -{ -} - -void -sp_start_new_char() -{ -} - -void -sp_start_contour() -{ -} - -void -sp_curve_to() -{ -} - -void -sp_line_to() -{ -} - -void -sp_close_contour() -{ -} - -void -sp_close_outline() -{ -} diff --git a/nx-X11/lib/font/Speedo/useropt.h b/nx-X11/lib/font/Speedo/useropt.h deleted file mode 100644 index e879aae96..000000000 --- a/nx-X11/lib/font/Speedo/useropt.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Xorg: useropt.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - -Copyright 1993, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -#define INCL_LCD 1 -#define STATIC_ALLOC 1 - -#define INCL_BLACK 1 -#define INCL_SCREEN 1 -#define INCL_2D 1 -#define SHORT_LISTS 0 - -#define INCL_RULES 1 -#define INCL_METRICS 1 - -#define INCL_KEYS 1 diff --git a/nx-X11/lib/font/Type1/AFM.h b/nx-X11/lib/font/Type1/AFM.h deleted file mode 100644 index f2c997a3f..000000000 --- a/nx-X11/lib/font/Type1/AFM.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#ifndef AFM_H -#define AFM_H - -/* Bounding box definition. Used for the Font BBox as well as the - * Character BBox. - */ -typedef struct -{ - int llx; /* lower left x-position */ - int lly; /* lower left y-position */ - int urx; /* upper right x-position */ - int ury; /* upper right y-position */ -} BBox; - -/* Character Metric Information. This structure is used only if ALL - * character metric information is requested. If only the character - * widths is requested, then only an array of the character x-widths - * is returned. - * - * The key that each field is associated with is in comments. For an - * explanation about each key and its value please refer to the - * Character Metrics section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - long code; /* CID code */ - int wx; /* key: WX or W0X */ - BBox charBBox; /* key: B */ -} Metrics; - -typedef struct -{ - int nChars; /* number of entries in char metrics array */ - Metrics *metrics; /* ptr to char metrics array */ -} FontInfo; - -int CIDAFM(FILE *, FontInfo **); -#endif /* AFM_H */ -#endif diff --git a/nx-X11/lib/font/Type1/Imakefile b/nx-X11/lib/font/Type1/Imakefile deleted file mode 100644 index 3b10c0399..000000000 --- a/nx-X11/lib/font/Type1/Imakefile +++ /dev/null @@ -1,91 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.12 2002/02/13 21:32:48 dawes Exp $ - -#if BuildServer && DoLoadableServer -#define IHaveSubdirs -#define NoLibSubdirs -#define PassCDebugFlags -SUBDIRS = module -#endif - -INCLUDES = -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/include - -#if BuildCID -CIDSRCS = cidchar.c afm.c -CIDOBJS = cidchar.o afm.o -#if HasUsableFileMmap -MMAPDEFINES = -DUSE_MMAP -#endif -DEFINES = -DBUILDCID -DHAVE_CFM $(MMAPDEFINES) -#endif - -SRCS = \ - arith.c \ - curves.c \ - fontfcn.c \ - hints.c \ - lines.c \ - objects.c \ - paths.c \ - regions.c \ - scanfont.c \ - spaces.c \ - t1funcs.c \ - t1info.c \ - t1io.c \ - t1malloc.c \ - t1snap.c \ - t1stub.c \ - token.c \ - type1.c \ - util.c \ - $(CIDSRCS) \ - t1unicode.c - - -OBJS = \ - arith.o \ - curves.o \ - fontfcn.o \ - hints.o \ - lines.o \ - objects.o \ - paths.o \ - regions.o \ - scanfont.o \ - spaces.o \ - t1funcs.o \ - t1info.o \ - t1io.o \ - t1malloc.o \ - t1snap.o \ - t1stub.o \ - token.o \ - type1.o \ - util.o \ - $(CIDOBJS) \ - t1unicode.o - -#if BuildFontLib -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) -#endif - -#if BuildServer && DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() diff --git a/nx-X11/lib/font/Type1/afm.c b/nx-X11/lib/font/Type1/afm.c deleted file mode 100644 index 9a6dafee7..000000000 --- a/nx-X11/lib/font/Type1/afm.c +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/afm.c,v 1.2 1999/08/21 13:47:38 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifdef XFONT_CID -#ifndef FONTMODULE -#include -#include -#include -#include -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#include /* for xalloc/xfree */ -#include "AFM.h" - -#define PBUF 256 -#define KBUF 20 - -char *gettoken(FILE *); - -static char *afmbuf = NULL; - -char *gettoken(FILE *fd) { - char *bp; - int c, found; - - bp = afmbuf; - found = 0; - - while((c = getc(fd)) != EOF) { - if (found == 0 && (c == ' ' || c == '\t' || c == '\n' || c == '\r' || - c == ';' || c == ',')) continue; - found = 1; - if (c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ';') { - *bp++ = c; - if (bp - afmbuf >= PBUF) { - bp = afmbuf; - break; - } - } else - break; - } - - *bp = 0; - return(afmbuf); -} - -int CIDAFM(FILE *fd, FontInfo **pfi) { - char *p = 0; - int i, j, k = 0, found = 0; - FontInfo *fi; - - if (fd == NULL || pfi == NULL) return(1); - - *pfi = NULL; - - if ((afmbuf = (char *)xalloc(PBUF)) == NULL) - return(1); - - while(1) { - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - - if (strncmp(p, "StartFontMetrics", 16) == 0) { - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - if (strncmp(p, "4", 1) < 0) { - free(afmbuf); - return(1); - } - found = 1; - } else if (strncmp(p, "StartCharMetrics", 16) == 0) { - if (!found) { - xfree(afmbuf); - return(1); - } - - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - - fi = (FontInfo *)xalloc(sizeof(FontInfo)); - - if (fi == NULL) { - xfree(afmbuf); - return(1); - } - bzero(fi, sizeof(FontInfo)); - - fi->nChars = atoi(p); - - if (fi->nChars < 0 || fi->nChars > INT_MAX / sizeof(Metrics)) { - xfree(afmbuf); - xfree(fi); - return(1); - } - fi->metrics = (Metrics *)xalloc(fi->nChars * - sizeof(Metrics)); - if (fi->metrics == NULL) { - xfree(afmbuf); - xfree(fi); - return(1); - } - - j = 0; - for (i = 0; i < fi->nChars; i++) { - k = 0; - while(1) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - if (strncmp(p, "W0X", 3) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].wx = atoi(p); - } else if (strncmp(p, "N", 1) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].code = (long)atoi(p); - } else if (strncmp(p, "B", 1) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.llx = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.lly = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.urx = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.ury = atoi(p); - j++; - break; - } - k++; - if (k >= KBUF) break; - } - if (k >= KBUF) break; - } - if (k >= KBUF || j != fi->nChars) { - xfree(fi->metrics); - xfree(fi); - xfree(afmbuf); - return(1); - } else { - *pfi = fi; - xfree(afmbuf); - return(0); - } - } - } - - xfree(afmbuf); - return(1); -} -#endif diff --git a/nx-X11/lib/font/Type1/arith.c b/nx-X11/lib/font/Type1/arith.c deleted file mode 100644 index 961154335..000000000 --- a/nx-X11/lib/font/Type1/arith.c +++ /dev/null @@ -1,486 +0,0 @@ -/* $Xorg: arith.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/arith.c,v 1.6tsi Exp $ */ - - /* ARITH CWEB V0006 ******** */ -/* -:h1.ARITH Module - Portable Module for Multiple Precision Fixed Point Arithmetic - -This module provides division and multiplication of 64-bit fixed point -numbers. (To be more precise, the module works on numbers that take -two 'longs' to store. That is almost always equivalent to saying 64-bit -numbers.) - -Note: it is frequently easy and desirable to recode these functions in -assembly language for the particular processor being used, because -assembly language, unlike C, will have 64-bit multiply products and -64-bit dividends. This module is offered as a portable version. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) and Sten F. Andler - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "arith.h" - - -/* -:h3. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Reference for all algorithms: Donald E. Knuth, "The Art of Computer -Programming, Volume 2, Semi-Numerical Algorithms," Addison-Wesley Co., -Massachusetts, 1969, pp. 229-279. - -Knuth talks about a 'digit' being an arbitrary sized unit and a number -being a sequence of digits. We'll take a digit to be a 'short'. -The following assumption must be valid for these algorithms to work: -:ol. -:li.A 'long' is two 'short's. -:eol. -The following code is INDEPENDENT of: -:ol. -:li.The actual size of a short. -:li.Whether shorts and longs are stored most significant byte -first or least significant byte first. -:eol. - -SHORTSIZE is the number of bits in a short; LONGSIZE is the number of -bits in a long; MAXSHORT is the maximum unsigned short: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -ASSEMBLE concatenates two shorts to form a long: -*/ -#define ASSEMBLE(hi,lo) ((((unsigned long)hi)<>SHORTSIZE) -#define LOWDIGIT(u) ((u)&MAXSHORT) - -/* -SIGNBITON tests the high order bit of a long 'w': -*/ -#define SIGNBITON(w) (((long)w)<0) - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Double Long Arithmetic - -:h3.DLmult() - Multiply Two Longs to Yield a Double Long - -The two multiplicands must be positive. -*/ - -void -DLmult(doublelong *product, unsigned long u, unsigned long v) -{ -#ifdef LONG64 -/* printf("DLmult(? ?, %lx, %lx)\n", u, v); */ - *product = u*v; -/* printf("DLmult returns %lx\n", *product); */ -#else - register unsigned long u1, u2; /* the digits of u */ - register unsigned long v1, v2; /* the digits of v */ - register unsigned int w1, w2, w3, w4; /* the digits of w */ - register unsigned long t; /* temporary variable */ -/* printf("DLmult(? ?, %x, %x)\n", u, v); */ - u1 = HIGHDIGIT(u); - u2 = LOWDIGIT(u); - v1 = HIGHDIGIT(v); - v2 = LOWDIGIT(v); - - if (v2 == 0) w4 = w3 = w2 = 0; - else - { - t = u2 * v2; - w4 = LOWDIGIT(t); - t = u1 * v2 + HIGHDIGIT(t); - w3 = LOWDIGIT(t); - w2 = HIGHDIGIT(t); - } - - if (v1 == 0) w1 = 0; - else - { - t = u2 * v1 + w3; - w3 = LOWDIGIT(t); - t = u1 * v1 + w2 + HIGHDIGIT(t); - w2 = LOWDIGIT(t); - w1 = HIGHDIGIT(t); - } - - product->high = ASSEMBLE(w1, w2); - product->low = ASSEMBLE(w3, w4); -#endif /* LONG64 else */ -} - -/* -:h2.DLdiv() - Divide Two Longs by One Long, Yielding Two Longs - -Both the dividend and the divisor must be positive. -*/ - -void -DLdiv(doublelong *quotient, /* also where dividend is, originally */ - unsigned long divisor) -{ -#ifdef LONG64 -/* printf("DLdiv(%lx %lx)\n", quotient, divisor); */ - *quotient /= divisor; -/* printf("DLdiv returns %lx\n", *quotient); */ -#else - register unsigned long u1u2 = quotient->high; - register unsigned long u3u4 = quotient->low; - register long u3; /* single digit of dividend */ - register int v1,v2; /* divisor in registers */ - register long t; /* signed copy of u1u2 */ - register int qhat; /* guess at the quotient digit */ - register unsigned long q3q4; /* low two digits of quotient */ - register int shift; /* holds the shift value for normalizing */ - register int j; /* loop variable */ - -/* printf("DLdiv(%x %x, %x)\n", quotient->high, quotient->low, divisor); */ - /* - * Knuth's algorithm works if the dividend is smaller than the - * divisor. We can get to that state quickly: - */ - if (u1u2 >= divisor) { - quotient->high = u1u2 / divisor; - u1u2 %= divisor; - } - else - quotient->high = 0; - - if (divisor <= MAXSHORT) { - - /* - * This is the case where the divisor is contained in one - * 'short'. It is worthwhile making this fast: - */ - u1u2 = ASSEMBLE(u1u2, HIGHDIGIT(u3u4)); - q3q4 = u1u2 / divisor; - u1u2 %= divisor; - u1u2 = ASSEMBLE(u1u2, LOWDIGIT(u3u4)); - quotient->low = ASSEMBLE(q3q4, u1u2 / divisor); - return; - } - - - /* - * At this point the divisor is a true 'long' so we must use - * Knuth's algorithm. - * - * Step D1: Normalize divisor and dividend (this makes our 'qhat' - * guesses more accurate): - */ - for (shift=0; !SIGNBITON(divisor); shift++, divisor <<= 1) { ; } - shift--; - divisor >>= 1; - - if ((u1u2 >> (LONGSIZE - shift)) != 0 && shift != 0) - Abort("DLdiv: dividend too large"); - u1u2 = (u1u2 << shift) + ((shift == 0) ? 0 : u3u4 >> (LONGSIZE - shift)); - u3u4 <<= shift; - - /* - * Step D2: Begin Loop through digits, dividing u1,u2,u3 by v1,v2, - * then shifting U left by 1 digit: - */ - v1 = HIGHDIGIT(divisor); - v2 = LOWDIGIT(divisor); - q3q4 = 0; - u3 = HIGHDIGIT(u3u4); - - for (j=0; j < 2; j++) { - - /* - * Step D3: make a guess (qhat) at the next quotient denominator: - */ - qhat = (HIGHDIGIT(u1u2) == v1) ? MAXSHORT : u1u2 / v1; - /* - * At this point Knuth would have us further refine our - * guess, since we know qhat is too big if - * - * v2 * qhat > ASSEMBLE(u1u2 % v, u3) - * - * That would make sense if u1u2 % v was easy to find, as it - * would be in assembly language. I ignore this step, and - * repeat step D6 if qhat is too big. - */ - - /* - * Step D4: Multiply v1,v2 times qhat and subtract it from - * u1,u2,u3: - */ - u3 -= qhat * v2; - /* - * The high digit of u3 now contains the "borrow" for the - * rest of the substraction from u1,u2. - * Sometimes we can lose the sign bit with the above. - * If so, we have to force the high digit negative: - */ - t = HIGHDIGIT(u3); - if (t > 0) - t |= -1 << SHORTSIZE; - t += u1u2 - qhat * v1; -/* printf("..>divide step qhat=%x t=%x u3=%x u1u2=%x v1=%x v2=%x\n", - qhat, t, u3, u1u2, v1, v2); */ - while (t < 0) { /* Test is Step D5. */ - - /* - * D6: Oops, qhat was too big. Add back in v1,v2 and - * decrease qhat by 1: - */ - u3 = LOWDIGIT(u3) + v2; - t += HIGHDIGIT(u3) + v1; - qhat--; -/* printf("..>>qhat correction t=%x u3=%x qhat=%x\n", t, u3, qhat); */ - } - /* - * Step D7: shift U left one digit and loop: - */ - u1u2 = t; - if (HIGHDIGIT(u1u2) != 0) - Abort("divide algorithm error"); - u1u2 = ASSEMBLE(u1u2, LOWDIGIT(u3)); - u3 = LOWDIGIT(u3u4); - q3q4 = ASSEMBLE(q3q4, qhat); - } - quotient->low = q3q4; -/* printf("DLdiv returns %x %x\n", quotient->high, quotient->low); */ -#endif /* !LONG64 */ - return; -} - -/* -:h3.DLadd() - Add Two Double Longs - -In this case, the doublelongs may be signed. The algorithm takes the -piecewise sum of the high and low longs, with the possibility that the -high should be incremented if there is a carry out of the low. How to -tell if there is a carry? Alex Harbury suggested that if the sum of -the lows is less than the max of the lows, there must have been a -carry. Conversely, if there was a carry, the sum of the lows must be -less than the max of the lows. So, the test is "if and only if". -*/ - -void -DLadd(doublelong *u, /* u = u + v */ - doublelong *v) -{ -#ifdef LONG64 -/* printf("DLadd(%lx %lx)\n", *u, *v); */ - *u = *u + *v; -/* printf("DLadd returns %lx\n", *u); */ -#else - register unsigned long lowmax = MAX(u->low, v->low); - -/* printf("DLadd(%x %x, %x %x)\n", u->high, u->low, v->high, v->low); */ - u->high += v->high; - u->low += v->low; - if (lowmax > u->low) - u->high++; -#endif -} -/* -:h3.DLsub() - Subtract Two Double Longs - -Testing for a borrow is even easier. If the v.low is greater than -u.low, there must be a borrow. -*/ - -void -DLsub(doublelong *u, /* u = u - v */ - doublelong *v) -{ -#ifdef LONG64 -/* printf("DLsub(%lx %lx)\n", *u, *v); */ - *u = *u - *v; -/* printf("DLsub returns %lx\n", *u); */ -#else -/* printf("DLsub(%x %x, %x %x)\n", u->high, u->low, v->high, v->low);*/ - u->high -= v->high; - if (v->low > u->low) - u->high--; - u->low -= v->low; -#endif -} -/* -:h3.DLrightshift() - Macro to Shift Double Long Right by N -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Fractional Pel Arithmetic -*/ -/* -:h3.FPmult() - Multiply Two Fractional Pel Values - -This funtion first calculates w = u * v to "doublelong" precision. -It then shifts w right by FRACTBITS bits, and checks that no -overflow will occur when the resulting value is passed back as -a fractpel. -*/ - -fractpel -FPmult(fractpel u, fractpel v) -{ - doublelong w; - register int negative = FALSE; /* sign flag */ -#ifdef LONG64 - register fractpel ret; -#endif - - if ((u == 0) || (v == 0)) return (0); - - - if (u < 0) {u = -u; negative = TRUE;} - if (v < 0) {v = -v; negative = !negative;} - - if (u == TOFRACTPEL(1)) return ((negative) ? -v : v); - if (v == TOFRACTPEL(1)) return ((negative) ? -u : u); - - DLmult(&w, u, v); - DLrightshift(w, FRACTBITS); -#ifndef LONG64 - if (w.high != 0 || SIGNBITON(w.low)) { - w.low = TOFRACTPEL(MAXSHORT); - } - - return ((negative) ? -w.low : w.low); -#else - if (w & 0xffffffff80000000L ) { - ret = TOFRACTPEL(MAXSHORT); - } - else - ret = (fractpel)w; - - return ((negative) ? -ret : ret); -#endif -} - -/* -:h3.FPdiv() - Divide Two Fractional Pel Values - -These values may be signed. The function returns the quotient. -*/ - -fractpel -FPdiv(fractpel dividend, fractpel divisor) -{ - doublelong w; /* result will be built here */ - int negative = FALSE; /* flag for sign bit */ -#ifdef LONG64 - register fractpel ret; -#endif - - if (dividend < 0) { - dividend = -dividend; - negative = TRUE; - } - if (divisor < 0) { - divisor = -divisor; - negative = !negative; - } -#ifndef LONG64 - w.low = dividend << FRACTBITS; - w.high = dividend >> (LONGSIZE - FRACTBITS); - DLdiv(&w, divisor); - if (w.high != 0 || SIGNBITON(w.low)) { - w.low = TOFRACTPEL(MAXSHORT); - } - return( (negative) ? -w.low : w.low); -#else - w = ((long)dividend) << FRACTBITS; - DLdiv(&w, divisor); - if (w & 0xffffffff80000000L ) { - ret = TOFRACTPEL(MAXSHORT); - } - else - ret = (fractpel)w; - return( (negative) ? -ret : ret); -#endif -} - -/* -:h3.FPstarslash() - Multiply then Divide - -Borrowing a chapter from the language Forth, it is useful to define -an operator that first multiplies by one constant then divides by -another, keeping the intermediate result in extended precision. -*/ - -fractpel -FPstarslash(fractpel a, /* result = a * b / c */ - fractpel b, - fractpel c) -{ - doublelong w; /* result will be built here */ - int negative = FALSE; -#ifdef LONG64 - register fractpel ret; -#endif - - if (a < 0) { a = -a; negative = TRUE; } - if (b < 0) { b = -b; negative = !negative; } - if (c < 0) { c = -c; negative = !negative; } - - DLmult(&w, a, b); - DLdiv(&w, c); -#ifndef LONG64 - if (w.high != 0 || SIGNBITON(w.low)) { - w.low = TOFRACTPEL(MAXSHORT); - } - return((negative) ? -w.low : w.low); -#else - if (w & 0xffffffff80000000L ) { - ret = TOFRACTPEL(MAXSHORT); - } - else - ret = (fractpel)w; - return( (negative) ? -ret : ret); -#endif -} diff --git a/nx-X11/lib/font/Type1/arith.h b/nx-X11/lib/font/Type1/arith.h deleted file mode 100644 index 6c810b946..000000000 --- a/nx-X11/lib/font/Type1/arith.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $Xorg: arith.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/arith.h,v 1.4 1999/08/21 13:47:39 dawes Exp $ */ - -/*SHARED*/ - -#include /* LONG64 */ - -/*END SHARED*/ -/*SHARED*/ - -#undef SHORTSIZE -#define SHORTSIZE (sizeof(short)*8) -#undef LONGSIZE -#define LONGSIZE (SHORTSIZE*2) -#undef MAXSHORT -#define MAXSHORT ((1<>= (N)) -#else -#define DLrightshift(dl,N) { \ - dl.low = (dl.low >> N) + (((unsigned long) dl.high) << (LONGSIZE - N)); \ - dl.high >>= N; \ -} -#endif - -extern void DLmult ( doublelong *product, unsigned long u, unsigned long v ); -extern void DLdiv ( doublelong *quotient, unsigned long divisor ); -extern void DLadd ( doublelong *u, doublelong *v ); -extern void DLsub ( doublelong *u, doublelong *v ); -extern fractpel FPmult ( fractpel u, fractpel v ); -extern fractpel FPdiv ( fractpel dividend, fractpel divisor ); -extern fractpel FPstarslash ( fractpel a, fractpel b, fractpel c ); - -/*END SHARED*/ diff --git a/nx-X11/lib/font/Type1/blues.h b/nx-X11/lib/font/Type1/blues.h deleted file mode 100644 index 88602f79e..000000000 --- a/nx-X11/lib/font/Type1/blues.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $Xorg: blues.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * Portions Copyright (c) 1990 Adobe Systems Incorporated. - * All Rights Reserved - * - * License 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 IBM or Lexmark or Adobe - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * IBM, LEXMARK, AND ADOBE PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY - * WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE - * ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING - * ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY - * PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM, - * LEXMARK, OR ADOBE) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND - * CORRECTION. IN NO EVENT SHALL IBM, LEXMARK, OR ADOBE 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. - */ -/* $XFree86: xc/lib/font/Type1/blues.h,v 1.3 1999/08/22 08:58:49 dawes Exp $ */ - - -extern psobj *GetType1CharString ( psfont *fontP, unsigned char code ); - -#define TOPLEFT 1 -#define BOTTOMRIGHT 2 - -#define NUMBLUEVALUES 14 -#define NUMOTHERBLUES 10 -#define NUMFAMILYBLUES 14 -#define NUMFAMILYOTHERBLUES 10 -#define NUMSTEMSNAPH 12 -#define NUMSTEMSNAPV 12 -#define NUMSTDHW 1 -#define NUMSTDVW 1 - -#define DEFAULTBOLDSTEMWIDTH 2.0 - -#define MAXALIGNMENTZONES ((NUMBLUEVALUES+NUMOTHERBLUES)/2) -#define DEFAULTBLUESCALE 0.039625 -#define DEFAULTBLUESHIFT 7 -#define DEFAULTBLUEFUZZ 1 -#define DEFAULTSTDHW 0 -#define DEFAULTSTDVW 0 -#define DEFAULTFORCEBOLD FALSE -#define DEFAULTLANGUAGEGROUP 0 -#define DEFAULTRNDSTEMUP FALSE -#define DEFAULTLENIV 4 -#define DEFAULTEXPANSIONFACTOR 0.06 - -/* see Type 1 Font Format book for explanations of these values */ -/* Note that we're currently doing nothing for minfeature and password. */ -struct blues_struct { - struct blues_struct *next; /* ptr to next Blues structure in list */ - int numBlueValues; /* # of BlueValues in following array */ - int BlueValues[NUMBLUEVALUES]; - int numOtherBlues; /* # of OtherBlues values in following array */ - int OtherBlues[NUMOTHERBLUES]; - int numFamilyBlues; /* # of FamilyBlues values in following array */ - int FamilyBlues[NUMFAMILYBLUES]; - int numFamilyOtherBlues; /* # of FamilyOtherBlues values in */ - int FamilyOtherBlues[NUMFAMILYOTHERBLUES]; /* this array */ - double BlueScale; - int BlueShift; - int BlueFuzz; - double StdHW; - double StdVW; - int numStemSnapH; /* # of StemSnapH values in following array */ - double StemSnapH[NUMSTEMSNAPH]; - int numStemSnapV; /* # of StemSnapV values in following array */ - double StemSnapV[NUMSTEMSNAPV]; - int ForceBold; - int LanguageGroup; - int RndStemUp; - int lenIV; - double ExpansionFactor; -}; - -/* the alignment zone structure -- somewhat similar to the stem structure */ -/* see Adobe Type1 Font Format book about the terms used in this structure */ -struct alignmentzone { - int topzone; /* TRUE if a topzone, FALSE if a bottom zone */ - double bottomy, topy; /* interval of this alignment zone */ -}; diff --git a/nx-X11/lib/font/Type1/cidchar.c b/nx-X11/lib/font/Type1/cidchar.c deleted file mode 100644 index 20d26650c..000000000 --- a/nx-X11/lib/font/Type1/cidchar.c +++ /dev/null @@ -1,621 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/cidchar.c,v 1.9tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#ifndef FONTMODULE -#include -#include -#include -#ifdef USE_MMAP -#include -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)(-1)) -#endif -#endif -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE -#include -#undef _XOPEN_SOURCE -#endif -#endif -#include -#include "objects.h" -#include "spaces.h" -#include "range.h" -#include "util.h" -#include "fontfcn.h" -#include "blues.h" -#include "AFM.h" -#include "t1intf.h" - -#define BSIZE 4096 - -extern cidfont *CIDFontP; -extern psfont *FDArrayP; -extern psfont *FontP; - -static unsigned char sd[] = "StartData"; - -CharInfoPtr -CIDGetGlyphInfo(FontPtr pFont, unsigned int cidcode, CharInfoPtr pci, int *rc) -{ - CharInfoPtr cp = NULL; -#ifdef USE_MMAP - int fd; - unsigned char *buf; - long total_len = 0; -#else - FILE *fp; - unsigned char buf[BSIZE]; - unsigned int count = 0; -#endif - cidglyphs *cid; - unsigned char *p1 = NULL; -#ifndef USE_MMAP - unsigned char *p2; -#endif - register int i = 0, j; - long byteoffset; - int FDindex, FDBytes, GDBytes, SDBytes, SubrCount, CIDMapOffset, len; - psobj *arrayP; - psobj charstring; - long *subroffsets = NULL, cstringoffset, nextcstringoffset; - struct blues_struct *blues; - - cid = (cidglyphs *)pFont->fontPrivate; - -#ifdef USE_MMAP - if (!cid->CIDdata) { - if (!(fd = open(cid->CIDFontName, O_RDONLY, 0))) { - *rc = BadFontName; - return(cp); - } - cid->CIDsize = lseek(fd, 0, SEEK_END); - cid->CIDdata = (unsigned char *) - mmap(0, (size_t)cid->CIDsize, PROT_READ, MAP_SHARED, fd, 0); - close(fd); - if (cid->CIDdata == (unsigned char *)MAP_FAILED) { - *rc = AllocError; - cid->CIDdata = NULL; - return (cp); - } - } -#else - if (!(fp = fopen(cid->CIDFontName,"rb"))) { - *rc = BadFontName; - return(cp); - } -#endif - -#ifdef USE_MMAP - if (cid->dataoffset == 0) { - if ((p1 = (unsigned char *)strstr((char *)cid->CIDdata, (char *)sd)) - != NULL) { - cid->dataoffset = (p1 - cid->CIDdata) + strlen((char *)sd); - } - else { - *rc = BadFontFormat; - return(cp); - } - } -#else /* USE_MMAP */ - if (cid->dataoffset == 0) { - p2 = sd; - - /* find "StartData" */ - while (*p2) { - cid->dataoffset += count; - if ((count = fread(buf, 1, BSIZE, fp)) == 0) - break; - p1 = buf; - for (i=0; i < count && *p2; i++) { - if (*p1 == *p2) - p2++; - else { - p2 = sd; - if (*p1 == *p2) - p2++; - } - p1++; - } - } - - /* if "StartData" not found, or end of file */ - if (*p2 || count == 0) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - - if (i >= count) { - cid->dataoffset += count; - count = fread(buf, 1, BSIZE, fp); - p1 = buf; - } else { - cid->dataoffset += p1 - buf; - count = count - (p1 - buf); - } - } else { - if (fseek(fp, cid->dataoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - if ((count = fread(buf, 1, BSIZE, fp)) == 0) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - p1 = buf; - } - - /* if "StartData" not found, or "Binary" data and the next character */ - /* is not the space character (0x20) */ - - if (count == 0 || (CIDFontP->binarydata && (*p1 != ' '))) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif /* USE_MMAP */ - - FDBytes = CIDFontP->CIDfontInfoP[CIDFDBYTES].value.data.integer; - GDBytes = CIDFontP->CIDfontInfoP[CIDGDBYTES].value.data.integer; - CIDMapOffset = CIDFontP->CIDfontInfoP[CIDMAPOFFSET].value.data.integer; - byteoffset = cid->dataoffset + 1 + CIDMapOffset + - cidcode * (FDBytes + GDBytes); -#ifdef USE_MMAP - buf = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - if ((count = fread(buf, 1, BSIZE, fp)) < 2*(FDBytes + GDBytes)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif - - /* if FDBytes is equal to 0, the CIDMap contains no FD indices, and the */ - /* FD index of 0 is assumed. */ - if (FDBytes == 0) - FDindex = 0; - else { - FDindex = 0; - for (i = 0; i < FDBytes; i++) - FDindex += (unsigned char)buf[i] << (8 * (FDBytes - 1 - i)); - } - - if (FDindex >= CIDFontP->CIDfontInfoP[CIDFDARRAY].value.len) { - *rc = BadFontFormat; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - cstringoffset = 0; - for (i = 0; i < GDBytes; i++) - cstringoffset += (unsigned char)buf[FDBytes + i] << - (8 * (GDBytes - 1 - i)); - - nextcstringoffset = 0; - for (i = 0; i < GDBytes; i++) - nextcstringoffset += (unsigned char)buf[2*FDBytes + GDBytes + i] << - (8 * (GDBytes - 1 - i)); - - len = nextcstringoffset - cstringoffset; - - if (len <= 0) { /* empty interval, missing glyph */ - *rc = BadFontFormat; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - FontP = &FDArrayP[FDindex]; - - charstring.type = OBJ_INTEGER; - charstring.len = len; - -#ifndef USE_MMAP - if (!(charstring.data.stringP = (unsigned char *)xalloc(len))) { - *rc = AllocError; - fclose(fp); - return(cp); - } -#endif - - byteoffset = cid->dataoffset + 1 + cstringoffset; - -#ifdef USE_MMAP - charstring.data.stringP = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - xfree(charstring.data.stringP); - fclose(fp); - return(cp); - } - - if ((count = fread(charstring.data.stringP, 1, len, fp)) != len) { - *rc = BadFontFormat; - xfree(charstring.data.stringP); - fclose(fp); - return(cp); - } -#endif - - if (FontP->Subrs.data.arrayP == NULL) { - /* get subroutine data */ - byteoffset = cid->dataoffset + 1 + - FDArrayP[FDindex].Private[CIDT1SUBMAPOFF].value.data.integer; - - SDBytes = FDArrayP[FDindex].Private[CIDT1SDBYTES].value.data.integer; - - SubrCount = FDArrayP[FDindex].Private[CIDT1SUBRCNT].value.data.integer; -#ifdef USE_MMAP - buf = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - - if ((count = fread(buf, 1, BSIZE, fp)) < SDBytes * (SubrCount + 1)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif - - arrayP = (psobj *)vm_alloc(SubrCount*sizeof(psobj)); - if (!arrayP) { - *rc = AllocError; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - if (!(subroffsets = (long *)xalloc((SubrCount + 1)*sizeof(long)))) { - *rc = AllocError; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - for (i = 0; i <= SubrCount; i++) { - subroffsets[i] = 0; - for (j = 0; j < SDBytes; j++) - subroffsets[i] += (unsigned char)buf[i * SDBytes + j] << - (8 * (SDBytes - 1 - j)); - } - - byteoffset = cid->dataoffset + 1 + subroffsets[0]; - - /* get subroutine info */ -#ifndef USE_MMAP - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#else - total_len = byteoffset; -#endif - for (i = 0; i < SubrCount; i++) { - len = subroffsets[i + 1] - subroffsets[i]; -#ifndef USE_MMAP - arrayP[i].data.valueP = vm_alloc(len); - if (!arrayP[i].data.valueP) { - *rc = AllocError; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#endif - arrayP[i].len = len; -#ifdef USE_MMAP - arrayP[i].data.valueP = (char *)&cid->CIDdata[total_len]; - total_len += len; -#else - if ((count = fread(arrayP[i].data.valueP, 1, len, fp)) != len) { - *rc = BadFontFormat; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#endif - } - - FontP->Subrs.len = SubrCount; - FontP->Subrs.data.arrayP = arrayP; - xfree(subroffsets); - } - - if (FontP->BluesP == NULL) { - blues = (struct blues_struct *) vm_alloc(sizeof(struct blues_struct)); - if (!blues) { - *rc = AllocError; -#ifndef USE_MMAP - xfree(subroffsets); - fclose(fp); -#endif - return(cp); - } - bzero(blues, sizeof(struct blues_struct)); - blues->numBlueValues = - FDArrayP[FDindex].Private[CIDT1BLUEVALUES].value.len; - for (i = 0; i < blues->numBlueValues; i++) - blues->BlueValues[i] = - FDArrayP[FDindex].Private[CIDT1BLUEVALUES].value.data.arrayP[i].data.integer; - blues->numOtherBlues = - FDArrayP[FDindex].Private[CIDT1OTHERBLUES].value.len; - for (i = 0; i < blues->numOtherBlues; i++) - blues->OtherBlues[i] = - FDArrayP[FDindex].Private[CIDT1OTHERBLUES].value.data.arrayP[i].data.integer; - blues->numFamilyBlues = - FDArrayP[FDindex].Private[CIDT1FAMBLUES].value.len; - for (i = 0; i < blues->numFamilyBlues; i++) - blues->FamilyBlues[i] = - FDArrayP[FDindex].Private[CIDT1FAMBLUES].value.data.arrayP[i].data.integer; - blues->numFamilyOtherBlues = - FDArrayP[FDindex].Private[CIDT1FAMOTHERBLUES].value.len; - for (i = 0; i < blues->numFamilyOtherBlues; i++) - blues->FamilyOtherBlues[i] = - FDArrayP[FDindex].Private[CIDT1FAMOTHERBLUES].value.data.arrayP[i].data.integer; - blues->BlueScale = FDArrayP[FDindex].Private[CIDT1BLUESCALE].value.data.real; - blues->BlueShift = FDArrayP[FDindex].Private[CIDT1BLUESHIFT].value.data.integer; - blues->BlueFuzz = FDArrayP[FDindex].Private[CIDT1BLUEFUZZ].value.data.integer; - blues->StdHW = (double)FDArrayP[FDindex].Private[CIDT1STDHW].value.data.arrayP[0].data.integer; - blues->StdVW = (double)FDArrayP[FDindex].Private[CIDT1STDVW].value.data.arrayP[0].data.integer; - - blues->numStemSnapH = - FDArrayP[FDindex].Private[CIDT1STEMSNAPH].value.len; - for (i = 0; i < blues->numStemSnapH; i++) - blues->StemSnapH[i] = - FDArrayP[FDindex].Private[CIDT1STEMSNAPH].value.data.arrayP[i].data.integer; - blues->numStemSnapV = - FDArrayP[FDindex].Private[CIDT1STEMSNAPV].value.len; - for (i = 0; i < blues->numStemSnapV; i++) - blues->StemSnapV[i] = - FDArrayP[FDindex].Private[CIDT1STEMSNAPV].value.data.arrayP[i].data.integer; - blues->ForceBold = - FDArrayP[FDindex].Private[CIDT1FORCEBOLD].value.data.boolean; - - blues->LanguageGroup = - FDArrayP[FDindex].Private[CIDT1LANGGROUP].value.data.integer; - - blues->RndStemUp = - FDArrayP[FDindex].Private[CIDT1RNDSTEMUP].value.data.boolean; - - blues->lenIV = - FDArrayP[FDindex].Private[CIDT1LENIV].value.data.integer; - - blues->ExpansionFactor = - FDArrayP[FDindex].Private[CIDT1EXPFACTOR].value.data.real; - - FontP->BluesP = blues; - } - - cp = CIDRenderGlyph(pFont, &charstring, &FontP->Subrs, FontP->BluesP, pci, rc); - -#ifndef USE_MMAP - xfree(charstring.data.stringP); - - fclose(fp); -#endif - return(cp); -} - -static int -node_compare(const void *node1, const void *node2) -{ - return (((Metrics *)node1)->code - ((Metrics *)node2)->code); -} - -static CharInfoRec * -CIDGetCharMetrics(FontPtr pFont, FontInfo *fi, unsigned int charcode, double sxmult) -{ - CharInfoPtr cp; - Metrics *p, node; - unsigned int cidcode; - - cidcode = node.code = getCID(pFont, charcode); - if ((cidcode < fi->nChars) && (cidcode == fi->metrics[cidcode].code)) - p = &fi->metrics[cidcode]; - else - p = (Metrics *)bsearch(&node, fi->metrics, fi->nChars, sizeof(Metrics), node_compare); - - if (!p) - p = &fi->metrics[0]; - - if (!(cp = (CharInfoRec *)Xalloc(sizeof(CharInfoRec)))) - return NULL; - bzero(cp, sizeof(CharInfoRec)); - - /* indicate that character bitmap is not defined */ - cp->bits = (char *)CID_BITMAP_UNDEFINED; - - - /* get metric data for this CID code from the CID AFM file */ - cp->metrics.leftSideBearing = - floor(p->charBBox.llx / sxmult + 0.5); - cp->metrics.rightSideBearing = - floor(p->charBBox.urx / sxmult + 0.5); - cp->metrics.characterWidth = floor(p->wx / sxmult + 0.5); - cp->metrics.ascent = floor(p->charBBox.ury / sxmult + 0.5); - cp->metrics.descent = -floor(p->charBBox.lly / sxmult + 0.5); - - cp->metrics.attributes = p->wx; - - return cp; -} - -int -CIDGetAFM(FontPtr pFont, unsigned long count, unsigned char *chars, FontEncoding charEncoding, unsigned long *glyphCount, CharInfoPtr *glyphs, char *cidafmfile) -{ - FILE *fp; - FontInfo *fi = NULL; - cidglyphs *cid; - CharInfoPtr *glyphsBase; - register unsigned int c; - - register CharInfoPtr pci; - CharInfoPtr pDefault; - unsigned int firstCol, code, char_row, char_col; - double sxmult; - - cid = (cidglyphs *)pFont->fontPrivate; - - if (cid->AFMinfo == NULL) { - if (!(fp = fopen(cidafmfile, "rb"))) - return(BadFontName); - - if (CIDAFM(fp, &fi) != 0) { - fprintf(stderr, - "There is something wrong with Adobe Font Metric file %s.\n", - cidafmfile); - fclose(fp); - return(BadFontName); - } - fclose(fp); - cid->AFMinfo = fi; - } - fi = cid->AFMinfo; - - firstCol = pFont->info.firstCol; - pDefault = cid->pDefault; - glyphsBase = glyphs; - - /* multiplier for computation of raw values */ - sxmult = hypot(cid->pixel_matrix[0], cid->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - if (sxmult == 0.0) return(0); - - switch (charEncoding) { - -#define EXIST(pci) \ - ((pci)->metrics.attributes || \ - (pci)->metrics.ascent != -(pci)->metrics.descent || \ - (pci)->metrics.leftSideBearing != (pci)->metrics.rightSideBearing) - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - while (count--) { - c = (*chars++); - if (c >= firstCol && c <= pFont->info.lastCol) { - code = c - firstCol; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - case Linear16Bit: - while (count--) { - char_row = *chars++; - char_col = *chars++; - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - - case TwoD16Bit: - while (count--) { - char_row = (*chars++); - char_col = (*chars++); - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - -#undef EXIST - - return Successful; - -} -#endif diff --git a/nx-X11/lib/font/Type1/cluts.h b/nx-X11/lib/font/Type1/cluts.h deleted file mode 100644 index 67d930324..000000000 --- a/nx-X11/lib/font/Type1/cluts.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $Xorg: cluts.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* STUB */ - -#define KillCLUT(T) -#define CopyCLUT(T) T -#define UniqueCLUT(T) - diff --git a/nx-X11/lib/font/Type1/curves.c b/nx-X11/lib/font/Type1/curves.c deleted file mode 100644 index 9d0c3f8cc..000000000 --- a/nx-X11/lib/font/Type1/curves.c +++ /dev/null @@ -1,228 +0,0 @@ -/* $Xorg: curves.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 */ -/* All Rights Reserved */ - -/* License to use, copy, modify, and distribute this software */ -/* and its documentation for any purpose and without fee is */ -/* hereby granted, provided that licensee provides a license to */ -/* IBM, Corp. to use, copy, modify, and distribute derivative */ -/* works and their documentation for any purpose and without */ -/* fee, 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 IBM not be used in advertising or publicity pertaining to */ -/* distribution of the software without specific, written prior */ -/* permission. */ - -/* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES */ -/* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT */ -/* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, */ -/* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF */ -/* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND */ -/* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT */ -/* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF */ -/* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES */ -/* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN */ -/* NO EVENT SHALL IBM 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. */ -/* $XFree86: xc/lib/font/Type1/curves.c,v 1.7 2001/08/27 19:49:52 dawes Exp $ */ - -/* -:h1.CURVES Module - Stepping Beziers - -This module is responsible for "rasterizing" -third order curves. That is, it changes the high level curve -specification into a list of pels that that curve travels -through. - -:h3.Include Files - -Include files needed: -*/ -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "curves.h" -#include "lines.h" -#include "arith.h" - - -/* -:h3.Functions Provided to Other Modules - -External entry points: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -Note that "stepping" and "flattening" are so similiar that they use the -same routine. When the "region" parameter is NULL, that is a flag that -we are flattening instead of stepping. -*/ -/* -:h2.Bezier Third Order Curves -*/ -/* -:h3.The "bezierinfo" Structure - -This structure is used to store information used when we subdivide -Bezier curves. -*/ - -struct bezierinfo { - struct region *region; /* the region being built or NULL */ - struct fractpoint last; /* not used yet; maybe could save some work */ - struct fractpoint origin; /* the origin of the bezier */ -} ; - -/* - Checking for termination of the subdivision process: - This is the stupidest test in the world, just check if the coordinatewise - distance from an end control point to the next control point is less than - one half pel. If so, we must be done. - This returns 1 if the subdivision is terminated and 0 if you still need - to subdivide. -*/ - -static int -BezierTerminationTest(fractpel xa, fractpel ya, - fractpel xb, fractpel yb, - fractpel xc, fractpel yc, - fractpel xd, fractpel yd) -{ - fractpel dmax; - dmax = ABS(xa - xb); - dmax = MAX(dmax,ABS(ya - yb)); - dmax = MAX(dmax,ABS(xd - xc)); - dmax = MAX(dmax,ABS(yd - yc)); - if(dmax > FPHALF) - return(0); /* not done yet */ - else - return(1); /* done */ -} - -/* -:h3.StepBezierRecurse() - The Recursive Logic in StepBezier() - -The recursion involves dividing the control polygon into two smaller -control polygons by finding the midpoints of the lines. This idea is -described in any graphics text book and its simplicity is what caused -Bezier to define his curves as he did. If the input region 'R' is NULL, -the result is a path that is the 'flattened' curve; otherwise StepBezier -returns nothing special. -*/ -static struct segment * -StepBezierRecurse(struct bezierinfo *I, /* Region under construction or NULL */ - fractpel xA, fractpel yA, /* A control point */ - fractpel xB, fractpel yB, /* B control point */ - fractpel xC, fractpel yC, /* C control point */ - fractpel xD, fractpel yD) /* D control point */ -{ - if (BezierTerminationTest(xA,yA,xB,yB,xC,yC,xD,yD)) - { - if (I->region == NULL) - return(PathSegment(LINETYPE, xD - xA, yD - yA)); - else - StepLine(I->region, I->origin.x + xA, I->origin.y + yA, - I->origin.x + xD, I->origin.y + yD); - } - else - { - fractpel xAB,yAB; - fractpel xBC,yBC; - fractpel xCD,yCD; - fractpel xABC,yABC; - fractpel xBCD,yBCD; - fractpel xABCD,yABCD; - - xAB = xA + xB; yAB = yA + yB; - xBC = xB + xC; yBC = yB + yC; - xCD = xC + xD; yCD = yC + yD; - - xABC = xAB + xBC; yABC = yAB + yBC; - xBCD = xBC + xCD; yBCD = yBC + yCD; - - xABCD = xABC + xBCD; yABCD = yABC + yBCD; - - xAB >>= 1; yAB >>= 1; - xBC >>= 1; yBC >>= 1; - xCD >>= 1; yCD >>= 1; - xABC >>= 2; yABC >>= 2; - xBCD >>= 2; yBCD >>= 2; - xABCD >>= 3; yABCD >>= 3; - - if (I->region == NULL) - { - return( Join( - StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD), - StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD) - ) - ); - } - else - { - StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD); - StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD); - } - } - return NULL; - /*NOTREACHED*/ -} - -/* -:h3.TOOBIG() - Macro to Test if a Coordinate is Too Big to Bezier SubDivide Normally - -Intermediate values in the Bezier subdivision are 8 times bigger than -the starting values. If this overflows, a 'long', we are in trouble: -*/ - -#undef BITS -#define BITS (sizeof(long)*8) -#define HIGHTEST(p) (((p)>>(BITS-4)) != 0) /* includes sign bit */ -#define TOOBIG(xy) ((xy < 0) ? HIGHTEST(-xy) : HIGHTEST(xy)) - -/* -:h3.StepBezier() - Produce Run Ends for a Bezier Curve - -This is the entry point called from outside the module. -*/ - -struct segment * -StepBezier(struct region *R, /* Region under construction or NULL */ - fractpel xA, fractpel yA, /* A control point */ - fractpel xB, fractpel yB, /* B control point */ - fractpel xC, fractpel yC, /* C control point */ - fractpel xD, fractpel yD) /* D control point */ -{ - struct bezierinfo Info; - - Info.region = R; - Info.origin.x = xA; - Info.origin.y = yA; - - xB -= xA; - xC -= xA; - xD -= xA; - yB -= yA; - yC -= yA; - yD -= yA; - - if ( TOOBIG(xB) || TOOBIG(yB) || TOOBIG(xC) || TOOBIG(yC) - || TOOBIG(xD) || TOOBIG(yD) ) - Abort("Beziers this big not yet supported"); - - return(StepBezierRecurse(&Info, - (fractpel) 0, (fractpel) 0, xB, yB, xC, yC, xD, yD)); -} - diff --git a/nx-X11/lib/font/Type1/curves.h b/nx-X11/lib/font/Type1/curves.h deleted file mode 100644 index ca54bad62..000000000 --- a/nx-X11/lib/font/Type1/curves.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $Xorg: curves.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/curves.h,v 1.3 1999/08/22 08:58:50 dawes Exp $ */ - -/*SHARED*/ - -#define StepConic(R,xA,yA,xB,yB,xC,yC,r) t1_StepConic(R,xA,yA,xB,yB,xC,yC,r) -#define StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD) t1_StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD) - -#define FlattenConic(xM,yM,xC,yC,r) t1_StepConic(NULL,(fractpel)0,(fractpel)0,xM,yM,xC,yC,r) -#define FlattenBezier(xB,yB,xC,yC,xD,yD) t1_StepBezier(NULL,(fractpel)0,(fractpel)0,xB,yB,xC,yC,xD,yD) - -#if 0 -struct segment *t1_StepConic(); -#endif -extern struct segment *t1_StepBezier ( struct region *R, fractpel xA, fractpel yA, fractpel xB, fractpel yB, fractpel xC, fractpel yC, fractpel xD, fractpel yD ); - -/*END SHARED*/ diff --git a/nx-X11/lib/font/Type1/digit.h b/nx-X11/lib/font/Type1/digit.h deleted file mode 100644 index c69380954..000000000 --- a/nx-X11/lib/font/Type1/digit.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: digit.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef DIGIT -#define DIGIT 1 - -/* - * Digit Value Table -- - * - * The entries in the Digit Value Table map character - * codes in the set {0-9,a-z,A-Z} to their numeric - * values as part of numbers of radix 2-36. - * - */ -unsigned char digit_value[256] = { -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18, - 0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18, - 0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF -}; - -#endif diff --git a/nx-X11/lib/font/Type1/fontfcn.c b/nx-X11/lib/font/Type1/fontfcn.c deleted file mode 100644 index 9b48b9834..000000000 --- a/nx-X11/lib/font/Type1/fontfcn.c +++ /dev/null @@ -1,709 +0,0 @@ -/* $Xorg: fontfcn.c,v 1.4 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.10 2001/04/05 17:42:27 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef FONTMODULE -#include -#include -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#include "t1imager.h" -#include "util.h" -#if XFONT_CID -#include "range.h" -#include -#endif -#include -#include "fontfcn.h" - -extern struct segment *Type1Char ( char *env, XYspace S, - psobj *charstrP, psobj *subrsP, - psobj *osubrsP, - struct blues_struct *bluesP, int *modeP ); - -#if XFONT_CID -extern struct xobject *CIDChar ( char *env, XYspace S, - psobj *charstrP, psobj *subrsP, - psobj *osubrsP, - struct blues_struct *bluesP, int *modeP ); -static boolean initCIDFont( int cnt ); -#endif - -/***================================================================***/ -/* GLOBALS */ -/***================================================================***/ -char CurFontName[120]; -char *CurFontEnv; -char *vm_base = NULL; -psfont *FontP = NULL; -psfont TheCurrentFont; -#if XFONT_CID -char CurCIDFontName[CID_PATH_MAX]; -char CurCMapName[CID_PATH_MAX]; -cidfont *CIDFontP = NULL; -cmapres *CMapP = NULL; -cidfont TheCurrentCIDFont; -cmapres TheCurrentCMap; -psfont *FDArrayP = NULL; -int FDArrayIndex = 0; -#endif - -/***================================================================***/ -/* SearchDict - look for name */ -/* - compare for match on len and string */ -/* return 0 - not found. */ -/* return n - nth element in dictionary. */ -/***================================================================***/ -int -SearchDictName(psdict *dictP, psobj *keyP) -{ - int i,n; - - - n = dictP[0].key.len; - for (i=1;i<=n;i++) { /* scan the intire dictionary */ - if ( - (dictP[i].key.len == keyP->len ) - && - (strncmp(dictP[i].key.data.valueP, - keyP->data.valueP, - keyP->len) == 0 - ) - ) return(i); - } - return(0); -} - -#if XFONT_CID -static boolean -initCIDFont(int cnt) -{ - if (!(vm_init(cnt))) return(FALSE); - vm_base = vm_next_byte(); - strcpy(CurCIDFontName, ""); /* initialize to none */ - strcpy(CurCMapName, ""); /* initialize to none */ - /* cause a font data reset on the next Type 1 font */ - strcpy(CurFontName, ""); /* initialize to none */ - CIDFontP = &TheCurrentCIDFont; - CMapP = &TheCurrentCMap; - CIDFontP->vm_start = vm_next_byte(); - CIDFontP->spacerangecnt = 0; - CIDFontP->notdefrangecnt = 0; - CIDFontP->cidrangecnt = 0; - CIDFontP->spacerangeP = NULL; - CIDFontP->notdefrangeP = NULL; - CIDFontP->cidrangeP = NULL; - CIDFontP->CIDFontFileName.len = 0; - CIDFontP->CIDFontFileName.data.valueP = CurCIDFontName; - CMapP->CMapFileName.len = 0; - CMapP->CMapFileName.data.valueP = CurCMapName; - CMapP->firstRow = 0xFFFF; - CMapP->firstCol = 0xFFFF; - CMapP->lastRow = 0; - CMapP->lastCol = 0; - return(TRUE); -} - -/***================================================================***/ -boolean -initCIDType1Font(void) -{ - strcpy(CurFontName, ""); /* initialize to none */ - FontP = &FDArrayP[FDArrayIndex]; - FontP->vm_start = vm_next_byte(); - FontP->FontFileName.len = 0; - FontP->FontFileName.data.valueP = CurFontName; - FontP->Subrs.len = 0; - FontP->Subrs.data.stringP = NULL; - FontP->CharStringsP = NULL; - FontP->Private = NULL; - FontP->fontInfoP = NULL; - FontP->BluesP = NULL; - return(TRUE); -} -#endif - -boolean -initFont(int cnt) -{ - - if (!(vm_init(cnt))) return(FALSE); - vm_base = vm_next_byte(); - if (!(Init_BuiltInEncoding())) return(FALSE); - strcpy(CurFontName, ""); /* iniitialize to none */ -#if XFONT_CID - /* cause a font data reset on the next CID-keyed font */ - strcpy(CurCIDFontName, ""); /* initialize to none */ -#endif - FontP = &TheCurrentFont; - FontP->vm_start = vm_next_byte(); - FontP->FontFileName.len = 0; - FontP->FontFileName.data.valueP = CurFontName; - return(TRUE); -} -/***================================================================***/ -#if XFONT_CID -static void -resetCIDFont(char *cidfontname, char *cmapfile) -{ - - vm_next = CIDFontP->vm_start; - vm_free = vm_size - ( vm_next - vm_base); - CIDFontP->spacerangecnt = 0; - CIDFontP->notdefrangecnt = 0; - CIDFontP->cidrangecnt = 0; - CIDFontP->spacerangeP = NULL; - CIDFontP->notdefrangeP = NULL; - CIDFontP->cidrangeP = NULL; - CIDFontP->CIDfontInfoP = NULL; - /* This will load the font into the FontP */ - strcpy(CurCIDFontName,cidfontname); - strcpy(CurCMapName,cmapfile); - CIDFontP->CIDFontFileName.len = strlen(CurCIDFontName); - CIDFontP->CIDFontFileName.data.valueP = CurCIDFontName; - CMapP->CMapFileName.len = strlen(CurCMapName); - CMapP->CMapFileName.data.valueP = CurCMapName; - CMapP->firstRow = 0xFFFF; - CMapP->firstCol = 0xFFFF; - CMapP->lastRow = 0; - CMapP->lastCol = 0; -} - -static void -resetCIDType1Font(void) -{ - - vm_next = FontP->vm_start; - vm_free = vm_size - ( vm_next - vm_base); - FontP->Subrs.len = 0; - FontP->Subrs.data.stringP = NULL; - FontP->CharStringsP = NULL; - FontP->Private = NULL; - FontP->fontInfoP = NULL; - FontP->BluesP = NULL; - /* This will load the font into the FontP */ - FontP->FontFileName.len = strlen(CurFontName); - FontP->FontFileName.data.valueP = CurFontName; -} -#endif - -static void -resetFont(char *env) -{ - - vm_next = FontP->vm_start; - vm_free = vm_size - ( vm_next - vm_base); - FontP->Subrs.len = 0; - FontP->Subrs.data.stringP = NULL; - FontP->CharStringsP = NULL; - FontP->Private = NULL; - FontP->fontInfoP = NULL; - FontP->BluesP = NULL; - /* This will load the font into the FontP */ - strcpy(CurFontName,env); - FontP->FontFileName.len = strlen(CurFontName); - FontP->FontFileName.data.valueP = CurFontName; - -} - -#if XFONT_CID -/***================================================================***/ -int -readCIDFont(char *cidfontname, char *cmapfile) -{ - int rcode; - - /* restore the virtual memory and eliminate old font */ - resetCIDFont(cidfontname, cmapfile); - /* This will load the font into the FontP */ - rcode = scan_cidfont(CIDFontP, CMapP); - if (rcode == SCAN_OUT_OF_MEMORY) { - /* free the memory and start again */ - if (!(initCIDFont(vm_size * 2))) { - /* we are really out of memory */ - return(SCAN_OUT_OF_MEMORY); - } - resetCIDFont(cidfontname, cmapfile); - rcode = scan_cidfont(CIDFontP, CMapP); - /* only double the memory twice, then report error */ - if (rcode == SCAN_OUT_OF_MEMORY) { - /* free the memory and start again */ - if (!(initCIDFont(vm_size * 2))) { - /* we are really out of memory */ - return(SCAN_OUT_OF_MEMORY); - } - resetCIDFont(cidfontname, cmapfile); - rcode = scan_cidfont(CIDFontP, CMapP); - } - } - return(rcode); -} - -int -readCIDType1Font(void) -{ - int rcode; - - resetCIDType1Font(); - - /* This will load the font into the FontP */ - rcode = scan_cidtype1font(FontP); - return(rcode); -} -#endif - -int -readFont(char *env) -{ - int rcode; - - /* restore the virtual memory and eliminate old font */ - resetFont(env); - /* This will load the font into the FontP */ - rcode = scan_font(FontP); - if (rcode == SCAN_OUT_OF_MEMORY) { - /* free the memory and start again */ -#if XFONT_CID - /* xfree(vm_base); */ -#else - xfree(vm_base); -#endif - if (!(initFont(vm_size * 2))) { - /* we are really out of memory */ - return(SCAN_OUT_OF_MEMORY); - } - resetFont(env); - rcode = scan_font(FontP); -#if XFONT_CID - /* only double the memory twice, then report error */ - if (rcode == SCAN_OUT_OF_MEMORY) { - /* free the memory and start again */ - /* xfree(vm_base) */ - if (!(initFont(vm_size * 2))) { - /* we are really out of memory */ - return(SCAN_OUT_OF_MEMORY); - } - resetFont(env); - rcode = scan_font(FontP); - } -#else - /* only double the memory once, then report error */ -#endif - } - return(rcode); -} -/***================================================================***/ -struct xobject * -fontfcnB(struct XYspace *S, unsigned char *code, int *lenP, int *mode) -{ - psobj *charnameP; /* points to psobj that is name of character*/ - int N; - psdict *CharStringsDictP; /* dictionary with char strings */ - psobj CodeName; /* used to store the translation of the name*/ - psobj *SubrsArrayP; - psobj *theStringP; - - struct xobject *charpath; /* the path for this character */ - - charnameP = &CodeName; - charnameP->len = *lenP; - charnameP->data.stringP = code; - - CharStringsDictP = FontP->CharStringsP; - - /* search the chars string for this charname as key */ - N = SearchDictName(CharStringsDictP,charnameP); - if (N<=0) { - *mode = FF_PARSE_ERROR; - return(NULL); - } - /* ok, the nth item is the psobj that is the string for this char */ - theStringP = &(CharStringsDictP[N].value); - - /* get the dictionary pointers to the Subrs */ - - SubrsArrayP = &(FontP->Subrs); - /* scale the Adobe fonts to 1 unit high */ - /* call the type 1 routine to rasterize the character */ - charpath = (struct xobject *)Type1Char((char *)FontP,S,theStringP, - SubrsArrayP,NULL, - FontP->BluesP , mode); - /* if Type1Char reported an error, then return */ - if ( *mode == FF_PARSE_ERROR) return(NULL); - /* fill with winding rule unless path was requested */ - if (*mode != FF_PATH) { - charpath = (struct xobject *)Interior((struct segment *)charpath, - WINDINGRULE+CONTINUITY); - } - return(charpath); -} - -#if XFONT_CID -/***================================================================***/ -/* CIDfontfcnA(cidfontname, cmapfile, mode) */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/***================================================================***/ -Bool -CIDfontfcnA(char *cidfontname, char *cmapfile, int *mode) -{ - int rcode, cidinit; - - cidinit = 0; - if (CIDFontP == NULL || strcmp(CurCIDFontName, "") == 0) { - InitImager(); - if (!(initCIDFont(VM_SIZE))) { - /* we are really out of memory */ - *mode = SCAN_OUT_OF_MEMORY; - return(FALSE); - } - cidinit = 1; - } - - /* if the cidfontname is null, then use font already loaded */ - - /* if not the same font name */ - if (cidinit || (cidfontname && strcmp(cidfontname,CurCIDFontName) != 0) || - (cmapfile && strcmp(cmapfile,CurCMapName) != 0)) { - /* restore the virtual memory and eliminate old font, read new one */ - rcode = readCIDFont(cidfontname, cmapfile); - if (rcode != 0 ) { - strcpy(CurCIDFontName, ""); /* no CIDFont loaded */ - strcpy(CurCMapName, ""); /* no CMap loaded */ - *mode = rcode; - return(FALSE); - } - } - return(TRUE); - -} - -/***================================================================***/ -/* CIDType1fontfcnA(mode) */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/***================================================================***/ -Bool -CIDType1fontfcnA(int *mode) -{ - int rcode; - - if (!(initCIDType1Font())) { - /* we are really out of memory */ - *mode = SCAN_OUT_OF_MEMORY; - return(FALSE); - } - - if ((rcode = readCIDType1Font()) != 0) { - strcpy(CurFontName, ""); /* no font loaded */ - *mode = rcode; - return(FALSE); - } - return(TRUE); - -} -#endif - -/***================================================================***/ -/* fontfcnA(env, mode) */ -/* */ -/* env is a pointer to a string that contains the fontname. */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/***================================================================***/ -Bool -fontfcnA(char *env, int *mode) -{ - int rc; - - /* Has the FontP initialized? If not, then */ - /* Initialize */ -#if XFONT_CID - if (FontP == NULL || strcmp(CurFontName, "") == 0) { -#else - if (FontP == NULL) { -#endif - InitImager(); - if (!(initFont(VM_SIZE))) { - /* we are really out of memory */ - *mode = SCAN_OUT_OF_MEMORY; - return(FALSE); - } - } - - /* if the env is null, then use font already loaded */ - - /* if the not same font name */ - if ( (env) && (strcmp(env,CurFontName) != 0 ) ) { - /* restore the virtual memory and eliminate old font, read new one */ - rc = readFont(env); - if (rc != 0 ) { - strcpy(CurFontName, ""); /* no font loaded */ - *mode = rc; - return(FALSE); - } - } - return(TRUE); - -} - -#if XFONT_CID -/***================================================================***/ -/* CIDQueryFontLib(cidfontname,cmapfile,infoName,infoValue,rcodeP) */ -/* */ -/* cidfontname is a pointer to a string that contains the fontname. */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/* 3) use the font to call getInfo for that value. */ -/***================================================================***/ - -void -CIDQueryFontLib(char *cidfontname, char *cmapfile, char *infoName, - pointer infoValue, /* parameter returned here */ - int *rcodeP) -{ - int rc,N,i,cidinit; - psdict *dictP; - psobj nameObj; - psobj *valueP; - - /* Has the CIDFontP initialized? If not, then */ - /* Initialize */ - cidinit = 0; - if (CIDFontP == NULL || strcmp(CurCIDFontName, "") == 0) { - InitImager(); - if (!(initCIDFont(VM_SIZE))) { - *rcodeP = 1; - return; - } - cidinit = 1; - } - /* if the file name is null, then use font already loaded */ - /* if the not same font name, reset and load next font */ - if (cidinit || (cidfontname && strcmp(cidfontname,CurCIDFontName) != 0) || - (cmapfile && strcmp(cmapfile,CurCMapName) != 0)) { - /* restore the virtual memory and eliminate old font */ - rc = readCIDFont(cidfontname, cmapfile); - if (rc != 0 ) { - strcpy(CurCIDFontName, ""); /* no font loaded */ - strcpy(CurCMapName, ""); /* no font loaded */ - *rcodeP = 1; - return; - } - } - dictP = CIDFontP->CIDfontInfoP; - objFormatName(&nameObj,strlen(infoName),infoName); - N = SearchDictName(dictP,&nameObj); - /* if found */ - if ( N > 0 ) { - *rcodeP = 0; - switch (dictP[N].value.type) { - case OBJ_ARRAY: - valueP = dictP[N].value.data.arrayP; - /* Just double check valueP. H.J. */ - if (valueP == NULL) break; - if (strcmp(infoName,"FontMatrix") == 0) { - /* 6 elments, return them as floats */ - for (i=0;i<6;i++) { - if (valueP->type == OBJ_INTEGER ) - ((float *)infoValue)[i] = valueP->data.integer; - else - ((float *)infoValue)[i] = valueP->data.real; - valueP++; - } - } - if (strcmp(infoName,"FontBBox") == 0) { - /* 4 elments for Bounding Box. all integers */ - for (i=0;i<4;i++) { - ((int *)infoValue)[i] = valueP->data.integer; - valueP++; - } - break; - case OBJ_INTEGER: - case OBJ_BOOLEAN: - *((int *)infoValue) = dictP[N].value.data.integer; - break; - case OBJ_REAL: - *((float *)infoValue) = dictP[N].value.data.real; - break; - case OBJ_NAME: - case OBJ_STRING: - *((char **)infoValue) = dictP[N].value.data.valueP; - break; - default: - *rcodeP = 1; - break; - } - } - } - else *rcodeP = 1; -} -#endif - -/***================================================================***/ -/* QueryFontLib(env, infoName,infoValue,rcodeP) */ -/* */ -/* env is a pointer to a string that contains the fontname. */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/* 3) use the font to call getInfo for that value. */ -/***================================================================***/ - -void -QueryFontLib(char *env, char *infoName, - pointer infoValue, /* parameter returned here */ - int *rcodeP) -{ - int rc,N,i; - psdict *dictP; - psobj nameObj; - psobj *valueP; - - /* Has the FontP initialized? If not, then */ - /* Initialize */ - if (FontP == NULL) { - InitImager(); - if (!(initFont(VM_SIZE))) { - *rcodeP = 1; - return; - } - } - /* if the env is null, then use font already loaded */ - /* if the not same font name, reset and load next font */ - if ( (env) && (strcmp(env,CurFontName) != 0 ) ) { - /* restore the virtual memory and eliminate old font */ - rc = readFont(env); - if (rc != 0 ) { - strcpy(CurFontName, ""); /* no font loaded */ - *rcodeP = 1; - return; - } - } - dictP = FontP->fontInfoP; - objFormatName(&nameObj,strlen(infoName),infoName); - N = SearchDictName(dictP,&nameObj); - /* if found */ - if ( N > 0 ) { - *rcodeP = 0; - switch (dictP[N].value.type) { - case OBJ_ARRAY: - valueP = dictP[N].value.data.arrayP; - /* Just double check valueP. H.J. */ - if (valueP == NULL) break; - if (strcmp(infoName,"FontMatrix") == 0) { - /* 6 elments, return them as floats */ - for (i=0;i<6;i++) { - if (valueP->type == OBJ_INTEGER ) - ((float *)infoValue)[i] = valueP->data.integer; - else - ((float *)infoValue)[i] = valueP->data.real; - valueP++; - } - } - if (strcmp(infoName,"FontBBox") == 0) { - /* 4 elments for Bounding Box. all integers */ - for (i=0;i<4;i++) { - ((int *)infoValue)[i] = valueP->data.integer; - valueP++; - } - break; - case OBJ_INTEGER: - case OBJ_BOOLEAN: - *((int *)infoValue) = dictP[N].value.data.integer; - break; - case OBJ_REAL: - *((float *)infoValue) = dictP[N].value.data.real; - break; - case OBJ_NAME: - case OBJ_STRING: - *((char **)infoValue) = dictP[N].value.data.valueP; - break; - default: - *rcodeP = 1; - break; - } - } - } - else *rcodeP = 1; -} - -#if XFONT_CID -struct xobject * -CIDfontfcnC(struct XYspace *S, psobj *theStringP, - psobj *SubrsArrayP, struct blues_struct *BluesP, - int *lenP, int *mode) -{ - struct xobject *charpath; /* the path for this character */ - - charpath = (struct xobject *)CIDChar((char *)FontP,S,theStringP, - SubrsArrayP,NULL,BluesP,mode); - /* if Type1Char reported an error, then return */ - if ( *mode == FF_PARSE_ERROR) return(NULL); - /* fill with winding rule unless path was requested */ - if (*mode != FF_PATH) { - charpath = (struct xobject *)Interior((struct segment *)charpath, - WINDINGRULE+CONTINUITY); - } - return(charpath); -} -#endif diff --git a/nx-X11/lib/font/Type1/fontfcn.h b/nx-X11/lib/font/Type1/fontfcn.h deleted file mode 100644 index 1409eb9a9..000000000 --- a/nx-X11/lib/font/Type1/fontfcn.h +++ /dev/null @@ -1,250 +0,0 @@ -/* $Xorg: fontfcn.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.4 1999/08/22 08:58:50 dawes Exp $ */ - - -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -/* modular config.h defines VERSION as libXfont version */ -#ifdef VERSION -#undef VERSION -#endif - -#if XFONT_CID -/* Definition of a PostScript CIDFont resource */ -typedef struct cid_font { - char *vm_start; - int spacerangecnt; - int notdefrangecnt; - int cidrangecnt; - spacerange *spacerangeP; - cidrange *notdefrangeP; - cidrange *cidrangeP; - int binarydata; /* 1=binary data, 0=hex data */ - long bytecnt; - psobj CIDFontFileName; - psdict *CIDfontInfoP; -} cidfont; - -/* Definition of a PostScript CMap resource */ -typedef struct cmap_res { - unsigned short firstCol; - unsigned short lastCol; - unsigned short firstRow; - unsigned short lastRow; - psobj CMapFileName; - psdict *CMapInfoP; -} cmapres; -#endif - -/* Definition of a PostScript FONT */ -typedef struct ps_font { - char *vm_start; - psobj FontFileName; - psobj Subrs; - psdict *CharStringsP; - psdict *Private; - psdict *fontInfoP; -struct blues_struct *BluesP; -} psfont; -/***================================================================***/ -/* Routines in scan_font */ -/***================================================================***/ - -extern boolean Init_BuiltInEncoding ( void ); -#if XFONT_CID -extern int scan_cidfont ( cidfont *CIDFontP, cmapres *CMapP ); -extern int scan_cidtype1font ( psfont *FontP ); -#endif -extern int scan_font ( psfont *FontP ); -/***================================================================***/ -/* Return codes from scan_font */ -/***================================================================***/ -#define SCAN_OK 0 -#define SCAN_FILE_EOF -1 -#define SCAN_ERROR -2 -#define SCAN_OUT_OF_MEMORY -3 -#define SCAN_FILE_OPEN_ERROR -4 -#define SCAN_TRUE -5 -#define SCAN_FALSE -6 -#define SCAN_END -7 - -#if XFONT_CID -/***================================================================***/ -/* Name of CID FontInfo fields */ -/***================================================================***/ -#define CIDCOUNT 1 -#define CIDFONTNAME 2 -#define CIDFONTTYPE 3 -#define CIDVERSION 4 -#define CIDREGISTRY 5 -#define CIDORDERING 6 -#define CIDSUPPLEMENT 7 -#define CIDMAPOFFSET 8 -#define CIDFDARRAY 9 -#define CIDFDBYTES 10 -#define CIDFONTBBOX 11 -#define CIDFULLNAME 12 -#define CIDFAMILYNAME 13 -#define CIDWEIGHT 14 -#define CIDNOTICE 15 -#define CIDGDBYTES 16 -#define CIDUIDBASE 17 -#define CIDXUID 18 - -/***================================================================***/ -/* Name of CMapInfo fields */ -/***================================================================***/ -#define CMAPREGISTRY 1 -#define CMAPORDERING 2 -#define CMAPSUPPLEMENT 3 -#define CMAPNAME 4 -#define CMAPVERSION 5 -#define CMAPTYPE 6 -#define CMAPWMODE 7 -#define CMAPCIDCOUNT 8 -#endif - -/***================================================================***/ -/* Name of FontInfo fields */ -/***================================================================***/ - -#define FONTNAME 1 -#define PAINTTYPE 2 -#define FONTTYPENUM 3 -#define FONTMATRIX 4 -#define FONTBBOX 5 -#define UNIQUEID 6 -#define STROKEWIDTH 7 -#define VERSION 8 -#define NOTICE 9 -#define FULLNAME 10 -#define FAMILYNAME 11 -#define WEIGHT 12 -#define ITALICANGLE 13 -#define ISFIXEDPITCH 14 -#define UNDERLINEPOSITION 15 -#define UNDERLINETHICKNESS 16 -#define ENCODING 17 -/***================================================================***/ -/* Name of Private values */ -/***================================================================***/ -#define BLUEVALUES 1 -#define OTHERBLUES 2 -#define FAMILYBLUES 3 -#define FAMILYOTHERBLUES 4 -#define BLUESCALE 5 -#define BLUESHIFT 6 -#define BLUEFUZZ 7 -#define STDHW 8 -#define STDVW 9 -#define STEMSNAPH 10 -#define STEMSNAPV 11 -#define FORCEBOLD 12 -#define LANGUAGEGROUP 13 -#define LENIV 14 -#define RNDSTEMUP 15 -#define EXPANSIONFACTOR 16 - -#if XFONT_CID -/***================================================================***/ -/* Name of CID Type 1 Private values */ -/***================================================================***/ -#define CIDT1MINFEATURE 1 -#define CIDT1LENIV 2 -#define CIDT1LANGGROUP 3 -#define CIDT1BLUEVALUES 4 -#define CIDT1OTHERBLUES 5 -#define CIDT1BLUESCALE 6 -#define CIDT1BLUEFUZZ 7 -#define CIDT1BLUESHIFT 8 -#define CIDT1FAMBLUES 9 -#define CIDT1FAMOTHERBLUES 10 -#define CIDT1STDHW 11 -#define CIDT1STDVW 12 -#define CIDT1STEMSNAPH 13 -#define CIDT1STEMSNAPV 14 -#define CIDT1SUBMAPOFF 15 -#define CIDT1SDBYTES 16 -#define CIDT1SUBRCNT 17 -#define CIDT1FORCEBOLD 18 -#define CIDT1RNDSTEMUP 19 -#define CIDT1EXPFACTOR 20 - -#define CID_BITMAP_UNDEFINED 0 -extern int SearchDictName ( psdict *dictP, psobj *keyP ); -#if XFONT_CID -extern boolean initCIDType1Font ( void ); -#endif -extern boolean initFont ( int cnt ); -#if XFONT_CID -extern int readCIDFont ( char *cidfontname, char *cmapfile ); -extern int readCIDType1Font ( void ); -#endif -extern int readFont ( char *env ); -extern struct xobject *fontfcnB ( struct XYspace *S, unsigned char *code, - int *lenP, int *mode ); -#if XFONT_CID -extern Bool CIDfontfcnA ( char *cidfontname, char *cmapfile, int *mode ); -extern Bool CIDType1fontfcnA ( int *mode ); -#endif -extern Bool fontfcnA ( char *env, int *mode ); -#if XFONT_CID -extern void CIDQueryFontLib ( char *cidfontname, char *cmapfile, - char *infoName, pointer infoValue, int *rcodeP ); -#endif -extern void QueryFontLib ( char *env, char *infoName, pointer infoValue, - int *rcodeP ); -#if XFONT_CID -extern struct xobject *CIDfontfcnC ( struct XYspace *S, psobj *theStringP, - psobj *SubrsArrayP, - struct blues_struct *BluesP, int *lenP, - int *mode ); -#endif -#endif diff --git a/nx-X11/lib/font/Type1/fonts.h b/nx-X11/lib/font/Type1/fonts.h deleted file mode 100644 index 7215e0f7a..000000000 --- a/nx-X11/lib/font/Type1/fonts.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $Xorg: fonts.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ - -/* STUB */ - -#define CopyFont(f) f -#define UniqueFont(f) f -#define KillFont(f) -#define KillText(t) -#define CopyText(t) t -#define I_DumpText(t) -#define CoerceText(t) t -#define TextDelta(t,pt) -#define XformText(p,s) -#define GimeSpace() FALSE - -#define LibInit() -#define InitFonts() -#define InitFiles() -#define TraceClose() - -#define FF_PARSE_ERROR -1 diff --git a/nx-X11/lib/font/Type1/hdigit.h b/nx-X11/lib/font/Type1/hdigit.h deleted file mode 100644 index fbaa9c1db..000000000 --- a/nx-X11/lib/font/Type1/hdigit.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Xorg: hdigit.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef HDIGIT -#define HDIGIT 1 - -/* - * Hex Digit Value Table -- - * - * The entries in the Digit Value Table map character codes in the set - * {0-9,a-f,A-F} to their numeric values for readhexstring - * (00 10...F0 for the high hex digit and 00 01...0F for the low). - * The white-space and hex string termination characters are. - * mapped to codes > 0xf0 to enable usage by several modules. - * 2 tables are build HighHex and LowHex. - * - */ - -/* Indicators for special characters in these tables */ -#define HERROR (0xfe) -#define HWHITE_SPACE (0xfd) -#define HRIGHT_ANGLE (0xfc) -#define LAST_HDIGIT (0xf0) - -#define HighHexP (HighHex+1) -unsigned char HighHex[257] = { 0xFF, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE, - 0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE -}; -#define LowHexP (LowHex+1) -unsigned char LowHex[257] = { 0xFF, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE, - 0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE -}; - -#endif diff --git a/nx-X11/lib/font/Type1/hints.c b/nx-X11/lib/font/Type1/hints.c deleted file mode 100644 index 14deac229..000000000 --- a/nx-X11/lib/font/Type1/hints.c +++ /dev/null @@ -1,890 +0,0 @@ -/* $Xorg: hints.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/hints.c,v 1.7tsi Exp $ */ - - /* HINTS CWEB V0006 ******** */ -/* -:h1.HINTS Module - Processing Rasterization Hints - -&author. Sten F. Andler; continuity by Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) and Duaine -W. Pryor, Jr. - - -:h3.Include Files - -The included files are: -*/ -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "hints.h" - -/* -:h3.Functions Provided to the TYPE1IMAGER User - -None. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry point to other modules: -*/ - - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Macros Provided to Other Modules - -None. -*/ - -/* -:h2.InitHints() - Initialize hint data structure -*/ - -#define MAXLABEL 20 -static struct { - int inuse; - int computed; - struct fractpoint hint; -} oldHint[MAXLABEL]; - -#define ODD(x) (((int)(x)) & 01) -#define FPFLOOR(fp) TOFRACTPEL((fp) >> FRACTBITS) -#define FPROUND(fp) FPFLOOR((fp) + FPHALF) - -void -InitHints(void) -{ - int i; - - for (i = 0; i < MAXLABEL; i++) - { - oldHint[i].inuse = FALSE; - oldHint[i].computed = FALSE; - } -} - -/* -:h3.CloseHints(hintP) - Reverse hints that are still open -*/ - -void -CloseHints(struct fractpoint *hintP) -{ - int i; - - for (i = 0; i < MAXLABEL; i++) - { - if (oldHint[i].inuse) - { - hintP->x -= oldHint[i].hint.x; - hintP->y -= oldHint[i].hint.y; - - oldHint[i].inuse = FALSE; - } - } -} - -/* -:h3.ComputeHint(hP, currX, currY, hintP) - Compute the value of a hint -*/ - -static void -ComputeHint(struct hintsegment *hP, - fractpel currX, fractpel currY, - struct fractpoint *hintP) -{ - fractpel currRef, currWidth; - int idealWidth; - fractpel hintValue; - char orientation; - -/* -By construction, width is never zero. Therefore we can use the -width value to determine if the hint has been rotated by a -multiple of 90 degrees. -*/ - - if (hP->width.y == 0) - { - orientation = 'v'; /* vertical */ - } - else if (hP->width.x == 0) - { - orientation = 'h'; /* horizontal */ - } - else - { - hintP->x = hintP->y = 0; - return; - } - - /* Compute currRef and currWidth with a unit of 1 pel */ - if (orientation == 'v') /* vertical */ - { - currRef = hP->ref.x + currX; - currWidth = ABS(hP->width.x); - } - else if (orientation == 'h') /* horizontal */ - { - currRef = hP->ref.y + currY; - currWidth = ABS(hP->width.y); - } - else /* error */ - { - Abort("ComputeHint: invalid orientation"); - } - - if ((hP->hinttype == 'b') /* Bar or stem */ - || (hP->hinttype == 's')) /* Serif */ - { - idealWidth = NEARESTPEL(currWidth); - if (idealWidth == 0) idealWidth = 1; - if (ODD(idealWidth)) /* Is ideal width odd? */ - { - /* center "ref" over pel */ - hintValue = FPFLOOR(currRef) + FPHALF - currRef; - } - else - { - /* align "ref" on pel boundary */ - hintValue = FPROUND(currRef) - currRef; - } - } - else if (hP->hinttype == 'c') /* Curve extrema */ - { - /* align "ref" on pel boundary */ - hintValue = FPROUND(currRef) - currRef; - } - else /* error */ - { - Abort("ComputeHint: invalid hinttype"); - } - - if (orientation == 'v') /* vertical */ - { - hintP->x = hintValue; - hintP->y = 0; - } - else if (orientation == 'h') /* horizontal */ - { - hintP->x = 0; - hintP->y = hintValue; - } - else /* error */ - { - Abort("ComputeHint: invalid orientation"); - } -} - -/* -:h3.ProcessHint(hP, currX, currY, hintP) - Process a rasterization hint -*/ - -void -ProcessHint(struct hintsegment *hP, - fractpel currX, fractpel currY, - struct fractpoint *hintP) -{ - struct fractpoint thisHint; - - if ((hP->adjusttype == 'm') /* Move */ - || (hP->adjusttype == 'a')) /* Adjust */ - { - /* Look up hint in oldHint table */ - if ((hP->label >= 0) && (hP->label < MAXLABEL)) - { - if (oldHint[hP->label].computed) - /* Use old hint value if already computed */ - { - thisHint.x = oldHint[hP->label].hint.x; - thisHint.y = oldHint[hP->label].hint.y; - oldHint[hP->label].inuse = TRUE; - } - else - /* Compute new value for hint and store it for future use */ - { - ComputeHint(hP, currX, currY, &thisHint); - - oldHint[hP->label].hint.x = thisHint.x; - oldHint[hP->label].hint.y = thisHint.y; - oldHint[hP->label].inuse = TRUE; - oldHint[hP->label].computed = TRUE; - } - } - else /* error */ - { - Abort("ProcessHint: invalid label"); - } - } - else if (hP->adjusttype == 'r') /* Reverse */ - { - /* Use the inverse of the existing hint value to reverse hint */ - if ((hP->label >= 0) && (hP->label < MAXLABEL)) - { - if (oldHint[hP->label].inuse) - { - thisHint.x = -oldHint[hP->label].hint.x; - thisHint.y = -oldHint[hP->label].hint.y; - oldHint[hP->label].inuse = FALSE; - } - else /* error */ - { - Abort("ProcessHint: label is not in use"); - } - } - else /* error */ - { - Abort("ProcessHint: invalid label"); - } - - } - else /* error */ - { - Abort("ProcessHint: invalid adjusttype"); - } - - hintP->x += thisHint.x; - hintP->y += thisHint.y; -} - -/* -:h2 id=subpath.Navigation Through Edge Lists - -For continuity checking purposes, we need to navigate through edge -lists by the "subpath" chains and answer questions about edges. The -subpath chain links together edges that were part of the same subpath -(no intervening move segments) when the interior of the path was -calculated. Here we use the term "edge" to mean every edge list -that was created in between changes of direction. - -The subpath chains are singly-linked circular chains. For the convenience -of building them, they direction of the list (from edge to edge) is the -reverse of the order in which they were built. Within any single edge, -the subpath chain goes from top-to-bottom. (There might be a violation -of this because of the way the user started the first chain; see -:hdref refid=fixsubp..). - -:h3.ISTOP() and ISBOTTOM() - Flag Bits for Edge Lists at the Top and -Bottom of Their SubPaths -*/ - -#define ISTOP(flag) ((flag)&0x20) -#define ISBOTTOM(flag) ((flag)&0x10) -/* -:h3.ISLEFT() - Flag Bit for Left Edges -*/ - -#define ISLEFT(flag) ((flag)&0x08) - -/* -:h3.XofY() - Macro to Find X Value at Given Y - -This macro can only be used if it is known that the Y is within the -given edgelist's ymin and ymax. -*/ - -#define XofY(edge, y) edge->xvalues[y - edge->ymin] - -/* -:h3.findXofY() - Like XofY(), Except not Restricted - -If the Y is out of bounds of the given edgelist, this macro will -call SearchXofY to search the edge's subpath chain for the correct -Y range. If the Y value is off the edge, MINPEL is returned. -*/ -#define findXofY(edge, y) ((y < edge->ymin || y >= edge->ymax) ? SearchXofY(edge, y) : XofY(edge, y)) - -/* -:h4.SearchXofY() - Routine Called by FindXofY() for Difficult Cases - -The concept of this routine is to follow the subpath chain to find the -edge just below (i.e., next in chain) or just above (i.e., immediately -before in chain. It is assumed that the Y value is no more than one -off of the edge's range; XofY() could be replace by FindXofY() to -call ourselves recursively if this were not true. -*/ - -static pel -SearchXofY(register struct edgelist *edge, /* represents edge */ - register pel y) /* 'y' value to find edge for */ -{ - register struct edgelist *e; /* loop variable */ - - if (y < edge->ymin) { - if (ISTOP(edge->flag)) - return(MINPEL); - for (e = edge->subpath; e->subpath != edge; e = e->subpath) { ; } - if (e->ymax == edge->ymin) - return(XofY(e, y)); - } - else if (y >= edge->ymax) { - if (ISBOTTOM(edge->flag)) - return(MINPEL); - e = edge->subpath; - if (e->ymin == edge->ymax) - return(XofY(e, y)); - } - else - return(XofY(edge, y)); - - Abort("bad subpath chain"); - /*NOTREACHED*/ -} -/* -:h3.ISBREAK() Macro - Tests if an Edge List is at a "Break" - -The subpath chains are organized top to bottom. When the bottom of -a given edge is reached, the subpath chain points to the top of the -next edge. We call this a "break" in the chain. The following macro -is the simple test for the break condition: -*/ - -#define ISBREAK(top,bot) (top->ymax != bot->ymin) - - -/* -:h3.ImpliedHorizontalLine() - Tests for Horizontal Connectivity - -This function returns true if two edges are connected horizontally. -They are connected horizontally if they are consecutive in the subpath, -and either we are at the bottom and the first edge is going down or we -are at the top and the first edge is going up. -*/ - -#define BLACKABOVE -1 -#define BLACKBELOW +1 -#define NONE 0 - -static int -ImpliedHorizontalLine(struct edgelist *e1, /* two edges to check */ - struct edgelist *e2, - int y) /* y where they might be connected */ -{ - register struct edgelist *e3,*e4; - - if (ISDOWN(e1->flag) == ISDOWN(e2->flag)) - return(NONE); /* can't be consecutive unless different directions */ -/* -Now we check for consecutiveness: Can we get from 'e1' to 'e2' with -only one intervening break? Can we get from 'e2' to 'e1' with only one -intervening break? 'e3' will be as far as we can get after 'e1'; 'e4' -will be has far as we can get after 'e2': -*/ - for (e3 = e1; !ISBREAK(e3, e3->subpath); e3 = e3->subpath) { ; } - for (e3 = e3->subpath; e3 != e2; e3 = e3->subpath) - if (ISBREAK(e3, e3->subpath)) - break; - - for (e4 = e2; !ISBREAK(e4, e4->subpath); e4 = e4->subpath) { ; } - for (e4 = e4->subpath; e4 != e1; e4 = e4->subpath) - if (ISBREAK(e4, e4->subpath)) - break; -/* -If the edges are mutually consecutive, we must have horizontal lines -both top and bottom: -*/ - if (e3 == e2 && e4 == e1) - return(TRUE); -/* -If the edges are not consecutive either way, no horizontal lines are -possible: -*/ - if (e3 != e2 && e4 != e1) - return(NONE); -/* -Now let's swap 'e1' and 'e2' if necessary to enforce the rule that 'e2' -follows 'e1'. Remember that subpath chains go in the opposite direction -from the way the subpaths were built; this led to the simplest way -do build them. -*/ - if (e4 != e1) { - e2 = e1; - e1 = e3; /* remember e3 == e2, this just swaps 'e1' and 'e2' */ - } -/* -Now we have everything to return the answer: -*/ - if (ISTOP(e1->flag) && y == e1->ymin) - return(ISDOWN(e2->flag)); - else if (ISBOTTOM(e1->flag) && y == e1->ymax) - return(!ISDOWN(e2->flag)); - else - Abort("ImpliedHorizontalLine: why ask?"); - /*NOTREACHED*/ -} - -/* -:h3 id=fixsubp.FixSubPaths() - Must be Called to Organize Subpath Chains - -The region-building code in Interior(), in particular splitedge(), -maintains the rule that sub-paths are linked top-to-bottom except -at breaks. However, it is possible that there may be a "false break" -because the user started the subpath in the middle of an edge (and -went in the "wrong" direction from there, up instead of down). This -routine finds and fixes false breaks. - -Also, this routine sets the ISTOP and ISBOTTOM flags in the edge lists. -*/ - -static void -FixSubPaths(struct region *R) /* anchor of region */ -{ - register struct edgelist *e; /* fast loop variable */ - register struct edgelist *edge; /* current edge in region */ - register struct edgelist *next; /* next in subpath after 'edge' */ - register struct edgelist *break1; /* first break after 'next' */ - register struct edgelist *break2 = NULL; /* last break before 'edge' */ - register struct edgelist *prev; /* previous edge for fixing links */ - int left = TRUE; - - for (edge = R->anchor; edge != NULL; edge = edge->link) { - - if (left) - edge->flag |= ISLEFT(ON); - left = !left; - - next = edge->subpath; - - if (!ISBREAK(edge, next)) - continue; - if (edge->ymax < next->ymin) - Abort("disjoint subpath?"); -/* -'edge' now contains an edgelist at the bottom of an edge, and 'next' -contains the next subsequent edgelist in the subpath, which must be at -the top. We refer to this a "break" in the subpath. -*/ - next->flag |= ISTOP(ON); - edge->flag |= ISBOTTOM(ON); - - if (ISDOWN(edge->flag) != ISDOWN(next->flag)) - continue; -/* -We are now in the unusual case; both edges are going in the same -direction so this must be a "false break" due to the way that the user -created the path. We'll have to fix it. -*/ - for (break1 = next; !ISBREAK(break1, break1->subpath); break1 = break1->subpath) { ; } - - for (e = break1->subpath; e != edge; e = e->subpath) - if (ISBREAK(e, e->subpath)) - break2 = e; -/* -Now we've set up 'break1' and 'break2'. I've found the following -diagram invaluable. 'break1' is the first break after 'next'. 'break2' -is the LAST break before 'edge'. -&drawing. - next - +------+ +---->+------+ - +--->| >-----+ | | >-----+ - | | | | | | | | - | +-------------+ | +-------------+ - | | |break1| | | | | - | +->| >-------+ +->| >-----+ - | | | | | | - | | | +-------------+ - | +------+ | | | - | +----------------+ | | | - | | +------+ | +->| >-----+ - | +->| >-----+ | | | | - | | | | | +-------------+ - | +-------------+ | | | | - | | |edge | | | |break2| - | +->| >-----+ | +->| >-----+ - | | | | | | | | - | | | | | | | | - | | | | | | | | - | +------+ | | +------+ | - | | | | - +---------------+ +---------------+ - -&edrawing. -We want to fix this situation by having 'edge' point to where 'break1' -now points, and having 'break1' point to where 'break2' now points. -Finally, 'break2' should point to 'next'. Also, we observe that -'break1' can't be a bottom, and is also not a top unless it is the same -as 'next': -*/ - edge->subpath = break1->subpath; - - break1->subpath = break2->subpath; - if (ISBREAK(break1, break1->subpath)) - Abort("unable to fix subpath break?"); - - break2->subpath = next; - - break1->flag &= ~ISBOTTOM(ON); - if (break1 != next) - break1->flag &= ~ISTOP(ON); - } -/* -This region might contain "ambiguous" edges; edges exactly equal to -edge->link. Due to the random dynamics of where they get sorted into -the list, they can yield false crossings, where the edges appear -to cross. This confuses our continuity logic no end. Since we can -swap them without changing the region, we do. -*/ - for (edge = R->anchor, prev = NULL; VALIDEDGE(edge); prev = edge, edge = prev->link) { - - if (! ISAMBIGUOUS(edge->flag)) - continue; - - next = edge->subpath; - - while (ISAMBIGUOUS(next->flag) && next != edge) - next = next->subpath; -/* -We've finally found a non-ambiguous edge; we make sure it is left/right -compatible with 'edge': -*/ - if ( (ISLEFT(edge->flag) == ISLEFT(next->flag) && ISDOWN(edge->flag) == ISDOWN(next->flag) ) - || (ISLEFT(edge->flag) != ISLEFT(next->flag) && ISDOWN(edge->flag) != ISDOWN(next->flag) ) ) - continue; - -/* -Incompatible, we will swap 'edge' and the following edge in the list. -You may think that there must be a next edge in this swath. So did I. -No! If there is a totally ambiguous inner loop, for example, we could -get all the way to the outside without resolving ambiguity. -*/ - next = edge->link; /* note new meaning of 'next' */ - if (next == NULL || edge->ymin != next->ymin) - continue; - if (prev == NULL) - R->anchor = next; - else - prev->link = next; - edge->link = next->link; - next->link = edge; - edge->flag ^= ISLEFT(ON); - edge->flag &= ~ISAMBIGUOUS(ON); - next->flag ^= ISLEFT(ON); - next->flag &= ~ISAMBIGUOUS(ON); - edge = next; - } -} -/* -:h3.DumpSubPaths() - -A debug tool. -*/ - -static struct edgelist *before(struct edgelist *e); /* subroutine of DumpSubPaths */ - -static void -DumpSubPaths(struct edgelist *anchor) -{ - - register struct edgelist *edge,*e,*e2; - pel y; - - for (edge = anchor; VALIDEDGE(edge); edge = edge->link) { - if (ISPERMANENT(edge->flag)) - continue; - for (e2 = edge; !ISPERMANENT(e2->flag);) { - if (ISDOWN(e2->flag)) { - for (e = e2;; e = e->subpath) { - for (y=e->ymin+1; y < e->ymax; y++) - e->flag |= ISPERMANENT(ON); - if (ISBREAK(e, e->subpath)) - break; - } - } - else { - for (e = e2; !ISBREAK(e, e->subpath); e = e->subpath) { ; } - for (;; e=before(e)) { - for (y=e->ymax-2; y >= e->ymin; y--) - e->flag |= ISPERMANENT(ON); - if (e == e2) - break; - } - } - do { - e2 = before(e2); - } while (!ISBREAK(before(e2), e2)); - } - } -} - -static struct edgelist * -before(struct edgelist *e) -{ - struct edgelist *r; - for (r = e->subpath; r->subpath != e; r = r->subpath) { ; } - return(r); -} - -/* -:h2.Fixing Region Continuity Problems - -Small regions may become disconnected when their connecting segments are -less than a pel wide. This may be correct in some applications, but in -many (especially small font characters), it is more pleasing to keep -connectivity. ApplyContinuity() (invoked by +CONTINUITY on the -Interior() fill rule) fixes connection breaks. The resulting region -is geometrically less accurate, but may be more pleasing to the eye. -*/ -/* -Here are some macros which we will need: -*/ - -#define IsValidPel(j) (j!=MINPEL) - -/* -:h3.writeXofY() - Stuffs an X Value Into an "edgelist" - -writeXofY writes an x value into an edge at position 'y'. It must -update the edge's xmin and xmax. If there is a possibility that this -new x might exceed the region's bounds, updating those are the -responsibility of the caller. -*/ - -static void -writeXofY(struct edgelist *e,/* relevant edgelist */ - int y, /* y value */ - int x) /* new x value */ -{ - if (e->xmin > x) e->xmin = x; - if (e->xmax < x) e->xmax = x; - e->xvalues[y - e->ymin] = x; -} - -/*-------------------------------------------------------------------------*/ -/* the following three macros tell us whether we are at a birth point, a */ -/* death point, or simply in the middle of the character */ -/*-------------------------------------------------------------------------*/ -#define WeAreAtTop(e,i) (ISTOP(e->flag) && e->ymin == i) -#define WeAreAtBottom(e,i) (ISBOTTOM(e->flag) && e->ymax-1 == i) -#define WeAreInMiddle(e,i) \ - ((!ISTOP(e->flag) && !ISBOTTOM(e->flag))||(i < e->ymax-1 && i > e->ymin)) -/* -The following macro tests if two "edgelist" structures are in the same -swath: -*/ -#define SAMESWATH(e1,e2) (e1->ymin == e2->ymin) - -/* -:h3.CollapseWhiteRun() - Subroutine of ApplyContinuity() - -When we have a white run with an implied horizontal line above or -below it, we better have black on the other side of this line. This -function both tests to see if black is there, and adjusts the end -points (collapses) the white run as necessary if it is not. The -goal is to collapse the white run as little as possible. -*/ - -static void -CollapseWhiteRun(struct edgelist *anchor, /* anchor of edge list */ - pel yblack, /* y of (hopefully) black run above or below */ - struct edgelist *left, /* edgelist at left of WHITE run */ - struct edgelist *right, /* edgelist at right of WHITE run */ - pel ywhite) /* y location of white run */ -{ - struct edgelist *edge; - struct edgelist *swathstart = anchor; - register pel x; - - if (XofY(left, ywhite) >= XofY(right, ywhite)) - return; -/* -Find the swath with 'yblack'. If we don't find it, completely collapse -the white run and return: -*/ - while (VALIDEDGE(swathstart)) { - if (yblack < swathstart->ymin) { - writeXofY(left, ywhite, XofY(right, ywhite)); - return; - } - if (yblack < swathstart->ymax) break; - swathstart = swathstart->link->link; - } - if(!VALIDEDGE(swathstart)) { - writeXofY(left, ywhite, XofY(right, ywhite)); - return; - } -/* -Now we are in the swath that contains 'y', the reference line above -or below that we are trying to maintain continuity with. If black -in this line begins in the middle of our white run, we must collapse -the white run from the left to that point. If black ends in the -middle of our white run, we must collapse the white run from the right -to that point. -*/ - for (edge = swathstart; VALIDEDGE(edge); edge = edge->link) { - - if (!SAMESWATH(swathstart,edge)) - break; - if( XofY(edge, yblack) > XofY(left, ywhite)) { - if (ISLEFT(edge->flag)) { - x = XofY(edge, yblack); - if (XofY(right, ywhite) < x) - x = XofY(right, ywhite); - writeXofY(left, ywhite, x); - } - else { - x = XofY(edge, yblack); - while (edge->link != NULL && SAMESWATH(edge, edge->link) - && x >= XofY(edge->link, yblack) ) { - edge = edge->link->link; - x = XofY(edge, yblack); - } - if (x < XofY(right, ywhite)) - writeXofY(right, ywhite, x); - return; - } - } - } - writeXofY(left, ywhite, XofY(right, ywhite)); -} - -/* -:h3.ApplyContinuity() - Fix False Breaks in a Region - -This is the externally visible routine called from the REGIONS module -when the +CONTINUITY flag is on the Interior() fill rule. -*/ - -void -ApplyContinuity(struct region *R) -{ - struct edgelist *left; - struct edgelist *right; - struct edgelist *edge,*e2; - pel rightXabove,rightXbelow,leftXabove,leftXbelow; - pel leftX,rightX; - int i; - long newcenter,abovecenter,belowcenter; - - FixSubPaths(R); - if (RegionDebug >= 3) - DumpSubPaths(R->anchor); - left = R->anchor; -/* loop through and do all of the easy checking. ( no tops or bottoms) */ - while(VALIDEDGE(left)) - { - right = left->link; - for(i=left->ymin;iymax;++i) - { - leftX = findXofY(left,i); - rightX = findXofY(right,i); - leftXbelow = findXofY(left,i+1); - rightXbelow = findXofY(right,i+1); - if(rightX <= leftX) - { -/* then, we have a break in a near vertical line */ - leftXabove = findXofY(left,i-1); - rightXabove = findXofY(right,i-1); - if( IsValidPel(leftXabove) && IsValidPel(rightXabove) ) - { - abovecenter = leftXabove + rightXabove; - } - else - { - abovecenter = leftX + rightX; - } - if( IsValidPel(leftXbelow) && IsValidPel(rightXbelow) ) - { - belowcenter = leftXbelow + rightXbelow; - } - else - { - belowcenter = leftX + rightX; - } - newcenter = abovecenter + belowcenter; - if( newcenter > 4*leftX ) - { - rightX = rightX + 1; - } - else if( newcenter < 4*leftX) - { - leftX = leftX - 1; - } - else - { - rightX = rightX + 1; - } - writeXofY(right,i,rightX); - writeXofY(left,i,leftX); - if(rightX > R->xmax) {R->xmax = rightX;} - if(leftX < R->xmin) {R->xmin = leftX;} - } - if( !WeAreAtBottom(left,i) && (leftXbelow>=rightX)) - { -/* then we have a break in a near horizontal line in the middle */ - writeXofY(right,i,leftXbelow); - } - if( !WeAreAtBottom(right,i) && (leftX >=rightXbelow)) - { -/* then we have a break in a near horizontal line in the middle */ - writeXofY(left,i,rightXbelow); - } - } - left = right->link; - } -/* -There may be "implied horizontal lines" between edges that have -implications for continuity. This loop looks for white runs that -have implied horizontal lines on the top or bottom, and calls -CollapseWhiteRuns to check and fix any continuity problems from -them. -*/ - for (edge = R->anchor; VALIDEDGE(edge); edge = edge->link) { - if ((!ISTOP(edge->flag) && !ISBOTTOM(edge->flag)) || ISLEFT(edge->flag)) - continue; /* at some future date we may want left edge logic here too */ - for (e2 = edge->link; VALIDEDGE(e2) && SAMESWATH(edge,e2); e2 = e2->link) { - if (ISTOP(e2->flag) && ISTOP(edge->flag) - && NONE != ImpliedHorizontalLine(edge,e2,edge->ymin)) { - if (ISLEFT(e2->flag)) - CollapseWhiteRun(R->anchor, edge->ymin-1, - edge, e2, edge->ymin); - } - if (ISBOTTOM(e2->flag) && ISBOTTOM(edge->flag) - && NONE != ImpliedHorizontalLine(edge,e2, edge->ymax)) { - if (ISLEFT(e2->flag)) - CollapseWhiteRun(R->anchor, edge->ymax, - edge, e2, edge->ymax-1); - } - } - } -} - - - - diff --git a/nx-X11/lib/font/Type1/hints.h b/nx-X11/lib/font/Type1/hints.h deleted file mode 100644 index 8e2ae2ade..000000000 --- a/nx-X11/lib/font/Type1/hints.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $Xorg: hints.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/hints.h,v 1.3 1999/08/22 08:58:51 dawes Exp $ */ - -/*SHARED*/ - -#define InitHints t1_InitHints -extern void t1_InitHints ( void ); /* Initialize hint data structure */ - -#define CloseHints(hintP) t1_CloseHints(hintP) -/* Reverse hints that are still open */ -extern void t1_CloseHints ( struct fractpoint *hintP ); - -#define ProcessHint(hP, currX, currY, hintP) t1_ProcessHint(hP, currX, currY, hintP) -/* Process a rasterization hint */ -extern void t1_ProcessHint ( struct hintsegment *hP, fractpel currX, fractpel currY, struct fractpoint *hintP ); - -#define ApplyContinuity(R) t1_ApplyContinuity(R) -/* fix false connection breaks in a region */ -extern void t1_ApplyContinuity ( struct region *R ); - -/*END SHARED*/ diff --git a/nx-X11/lib/font/Type1/lines.c b/nx-X11/lib/font/Type1/lines.c deleted file mode 100644 index 835afc6ed..000000000 --- a/nx-X11/lib/font/Type1/lines.c +++ /dev/null @@ -1,189 +0,0 @@ -/* $Xorg: lines.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/lines.c,v 1.4tsi Exp $ */ - - /* LINES CWEB V0003 ******** */ -/* -:h1.LINES Module - Rasterizing Lines - -&author. Duaine W. Pryor, Jr. and Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "lines.h" - -/* -:h3.Functions Provided to the TYPE1IMAGER User - -None. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry point to other modules: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Macros Provided to Other Modules - -None. -*/ - -/* -:h2.StepLine() - Produces Run Ends for a Line After Checks - -The main work is done by Bresenham(); here we just perform checks and -get the line so that its Y direction is always increasing: -*/ - -void StepLine(R, x1, y1, x2, y2) - register struct region *R; /* region being built */ - register fractpel x1,y1; /* starting point */ - register fractpel x2,y2; /* ending point */ -{ - register fractpel dy; - - dy = y2 - y1; - -/* -We execute the "GOING_TO" macro to call back the REGIONS module, if -necessary (like if the Y direction of the edge has changed): -*/ - GOING_TO(R, x1, y1, x2, y2, dy); - - if (dy == 0) - return; - - if (dy < 0) - Bresenham(R->edge, x2, y2, x1, y1); - else - Bresenham(R->edge, x1, y1, x2, y2); - return; -} -/* -:h3.Bresenham() - Actually Produces Run Ends - -This routine runs a Bresenham line-stepping -algorithm. See, for example, Newman and Sproul, :hp1/Principles -of Interactive Computer Graphics/, pp. 25-27. -When we enter this, we -are guaranteed that dy is positive. -We'd like to work in 8 bit precision, so we'll define some macros and -constants to let us do that: -*/ - -#define PREC 8 /* we'll keep fraction pels in 8 bit precision */ -/* -RoundFP() rounds down by 'b' bits: -*/ -#define RoundFP(xy,b) (((xy)+(1<<((b)-1)))>>(b)) - -/* -TruncFP() truncates down by 'b' bits: -*/ -#define TruncFP(xy,b) ((xy)>>(b)) - - -void Bresenham(edgeP,x1,y1,x2,y2) - register pel *edgeP; /* pointer to top of list (y == 0) */ - register fractpel x1,y1; /* starting point on line */ - register fractpel x2,y2; /* ending point on the line (down) */ -{ - register long dx,dy; /* change in x and y, in my own precision */ - register long x,y; /* integer pel starting point */ - register int count; /* integer pel delta y */ - register long d; /* the Bresenham algorithm error term */ - - x1 = TruncFP(x1, FRACTBITS-PREC); - y1 = TruncFP(y1, FRACTBITS-PREC); - x2 = TruncFP(x2, FRACTBITS-PREC); - y2 = TruncFP(y2, FRACTBITS-PREC); - - dx = x2 - x1; - dy = y2 - y1; -/* -Find the starting x and y integer pel coordinates: -*/ - - x = RoundFP(x1,PREC); - y = RoundFP(y1,PREC); - edgeP += y; - count = RoundFP(y2,PREC) - y; -/*------------------------------------------------------------------*/ -/* Force dx to be positive so that dfy will be negative */ -/* this means that vertical moves will decrease d */ -/*------------------------------------------------------------------*/ - if (dx<0) - { - dx = -dx; -#define P PREC - d=(dy*(x1-(x<>P; -#undef P - while(--count >= 0 ) - { - while(d<0) - { - --x; - d += dy; - } - *(edgeP++) = x; - d -= dx; - } - } - else /* positive dx */ - { -#define P PREC - d = (dy*((x<>P; -#undef P - while(--count >= 0 ) - { - while(d<0) - { - ++x; - d += dy; - } - *(edgeP++) = x; - d -= dx; - } - } -} diff --git a/nx-X11/lib/font/Type1/lines.h b/nx-X11/lib/font/Type1/lines.h deleted file mode 100644 index f8ffd3a43..000000000 --- a/nx-X11/lib/font/Type1/lines.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Xorg: lines.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/lines.h,v 1.3 1999/08/22 08:58:52 dawes Exp $ */ - -/*SHARED*/ - -#define StepLine(R,x1,y1,x2,y2) t1_StepLine(R,x1,y1,x2,y2) -#define Bresenham(e,x1,y1,x2,y2) t1_Bresenham(e,x1,y1,x2,y2) - -extern void t1_StepLine ( struct region *R, fractpel x1, fractpel y1, fractpel x2, fractpel y2 ); -extern void t1_Bresenham ( pel *edgeP, fractpel x1, fractpel y1, fractpel x2, fractpel y2 ); - -/*END SHARED*/ diff --git a/nx-X11/lib/font/Type1/minimain.c b/nx-X11/lib/font/Type1/minimain.c deleted file mode 100644 index 4aa826dc1..000000000 --- a/nx-X11/lib/font/Type1/minimain.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Xorg: minimain.c,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ - -/* - -Copyright 1993, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -#include "ximager5.h" - -main() -{ - XYspace S; - path p; - - InitImager(); - S = Scale(IDENTITY, 300.0, -300.0); - p = Join(Line(Loc(S, 0.0, 1.0)), Line(Loc(S, 1.0, 0.0))); - Interior(ClosePath(p), EVENODDRULE); -} - -void Trace() -{ -} - -void *DEFAULTDEVICE; diff --git a/nx-X11/lib/font/Type1/module/Imakefile b/nx-X11/lib/font/Type1/module/Imakefile deleted file mode 100644 index db8ab54f7..000000000 --- a/nx-X11/lib/font/Type1/module/Imakefile +++ /dev/null @@ -1,99 +0,0 @@ -XCOMM $XFree86: xc/lib/font/Type1/module/Imakefile,v 1.6 1999/08/14 10:49:18 dawes Exp $ - -#define IHaveModules -#include - -INCLUDES = -I$(FONTINCSRC) -I../ -I../../include -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/include - -#if BuildCID -CIDSRCS = cidchar.c afm.c -CIDOBJS = cidchar.o afm.o -#if HasUsableFileMmap -MMAPDEFINES = -DUSE_MMAP -#endif -CIDDEFINES = -DBUILDCID -DHAVE_CFM $(MMAPDEFINES) -#endif - -DEFINES = -DFONTMODULE $(CIDDEFINES) - -SRCS = \ - arith.c \ - curves.c \ - fontfcn.c \ - hints.c \ - lines.c \ - objects.c \ - paths.c \ - regions.c \ - scanfont.c \ - spaces.c \ - t1funcs.c \ - t1info.c \ - t1io.c \ - t1malloc.c \ - t1snap.c \ - t1stub.c \ - token.c \ - type1.c \ - util.c \ - t1unicode.c \ - $(CIDSRCS) \ - type1mod.c - -OBJS = \ - arith.o \ - curves.o \ - fontfcn.o \ - hints.o \ - lines.o \ - objects.o \ - paths.o \ - regions.o \ - scanfont.o \ - spaces.o \ - t1funcs.o \ - t1info.o \ - t1io.o \ - t1malloc.o \ - t1snap.o \ - t1stub.o \ - token.o \ - type1.o \ - util.o \ - t1unicode.o \ - $(CIDOBJS) \ - type1mod.o - -LinkSourceFile(arith.c,..) -LinkSourceFile(curves.c,..) -LinkSourceFile(fontfcn.c,..) -LinkSourceFile(hints.c,..) -LinkSourceFile(lines.c,..) -LinkSourceFile(objects.c,..) -LinkSourceFile(paths.c,..) -LinkSourceFile(regions.c,..) -LinkSourceFile(scanfont.c,..) -LinkSourceFile(spaces.c,..) -LinkSourceFile(t1funcs.c,..) -LinkSourceFile(t1info.c,..) -LinkSourceFile(t1io.c,..) -LinkSourceFile(t1malloc.c,..) -LinkSourceFile(t1snap.c,..) -LinkSourceFile(t1stub.c,..) -LinkSourceFile(t1unicode.c,..) -LinkSourceFile(token.c,..) -LinkSourceFile(type1.c,..) -LinkSourceFile(util.c,..) -#if BuildCID -LinkSourceFile(afm.c,..) -LinkSourceFile(cidchar.c,..) -#endif - -ModuleObjectRule() -LibraryModuleTarget(type1,$(OBJS)) -InstallLibraryModule(type1,$(MODULEDIR),fonts) - -DependTarget() - -InstallDriverSDKLibraryModule(type1,$(DRIVERSDKMODULEDIR),fonts) diff --git a/nx-X11/lib/font/Type1/module/type1mod.c b/nx-X11/lib/font/Type1/module/type1mod.c deleted file mode 100644 index e652591a2..000000000 --- a/nx-X11/lib/font/Type1/module/type1mod.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), 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 - * XFREE86 PROJECT 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 XFree86 Project 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 - * XFree86 Project. - */ -/* $XFree86: xc/lib/font/Type1/module/type1mod.c,v 1.10 2002/12/09 17:29:59 dawes Exp $ */ - -#include "misc.h" - -#include -#include "xf86Module.h" - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -static MODULESETUPPROTO(type1Setup); - - /* - * This is the module data function that is accessed when loading - * libtype1 as a module. - */ - -static XF86ModuleVersionInfo VersRec = -{ - "type1", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 2, - ABI_CLASS_FONT, /* Font module */ - ABI_FONT_VERSION, - MOD_CLASS_FONT, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -XF86ModuleData type1ModuleData = { &VersRec, type1Setup, NULL }; - -extern void Type1RegisterFontFileFunctions(void); -#ifdef BUILDCID -extern void CIDRegisterFontFileFunctions(void); -#endif - -FontModule type1Module = { - Type1RegisterFontFileFunctions, - "Type1", - NULL -}; - -#ifdef BUILDCID -FontModule CIDModule = { - CIDRegisterFontFileFunctions, - "CID", - NULL -}; -#endif - -static pointer -type1Setup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - type1Module.module = module; - LoadFont(&type1Module); -#ifdef BUILDCID - CIDModule.module = module; - LoadFont(&CIDModule); -#endif - - /* Need a non-NULL return */ - return (pointer)1; -} diff --git a/nx-X11/lib/font/Type1/objects.c b/nx-X11/lib/font/Type1/objects.c deleted file mode 100644 index c86587dba..000000000 --- a/nx-X11/lib/font/Type1/objects.c +++ /dev/null @@ -1,1101 +0,0 @@ -/* $Xorg: objects.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/objects.c,v 1.10tsi Exp $ */ - /* OBJECTS CWEB V0025 ******** */ -/* -:h1.OBJECTS Module - TYPE1IMAGER Objects Common Routines - -This module defines and implements the C structures that represent -objects in the TYPE1IMAGER. All common routines for manipulating these -objects are defined in this module. Specific routines for -specific objects are defined in the modules that deal with that -object type. - - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ -#ifdef HAVE_CONFIG_H -#include -#endif -#define GLOBALS 1 /* see :hdref refid=debugvar. */ -/* -The following two includes are C standards; we include them because we -use 'toupper' and the 'str'-type functions in this module. Potentially -these may be defined as macros; if these ".h" files do not exist on your -system it is a pretty safe bet that these are external entry points and -you do do not need to include these header files. -*/ - -#ifndef FONTMODULE -#include -#include -#include -#include -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "os.h" -#include "xf86_ansic.h" -#endif - -/* -override incorrect system functions; for example you might define -a macro for "strcpy" that diverts it to "my_strcpy". -*/ - - /* moved these includes from above the */ - /* was included first (it contains com- */ - /* piler defines). dsr 081291 */ -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "fonts.h" -#include "pictures.h" -#include "strokes.h" -#include "cluts.h" - - -static char *TypeFmt(int type); - -/* -:h3.The "pointer" Macro - Define a Generic Pointer - -Sadly, many compilers will give a warning message when a pointer to -one structure is assigned to a pointer to another. We've even seen -some that give severe errors (when the wrong pointer type is used as -an initializer or returned from a function). TYPE1IMAGER has routines -like Dup and Allocate that are perfectly willing to duplicate or -allocate any of a number of different types of structures. How to -declare them in a truely portable way? - -Well, there is no single good answer that I've found. You can always -beg the question and "cast" everything. I find this distracting and the -resulting code ugly. On the other hand, we have found at least one -compiler that will accept "void *" as a generic pointer that can -assigned to any other pointer type without error or warning (apparently -this is also the ANSI standard). So, we define "void *" to be a generic -pointer. (You might have to change this for your compiler; the "ifndef" -allows the change to be made on the command line if you want.) -:i1/portability assumptions/ -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to the TYPE1IMAGER User - -This module provides the following TYPE1IMAGER entry points: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Note that entry points that are intended for use external to TYPE1IMAGER -begin with the characters :q/xi/. Macros are used to make the names -more mnemonic. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following functions for other modules: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Note that entry points that intended for use within TYPE1IMAGER, but -which must be global because they are used across module boundaries, -begin with the characters :q/I_/. Macros are used to make the names -more mnemonic. - -Entry points totally within a module use mnemonic names and are -declared :hp2/static/. One of the compilers I used had a bug when -static functions were passed as addresses. Thus, some functions -which are logically "static" are not so declared. - -Note also the trick of declaring routines, like Consume(), with a -variable number of arguments. To avoid the restrictions on variable -numbers of arguments in the macro processor, we just replace the -text 'Consume' with 'I_Consume'. -*/ -/* -:h3.Macros Provided to Other Modules - -This is the module where we define all the useful constants like -TRUE, FALSE, and NULL, and simple expressions like MIN(), MAX(), and ABS(). -We might as well get to it right here: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Notice that upper case is used for constant values and macro -definitions. I generally follow that convention. - -Many more global macros are defined later in this module. -*/ -/* -:h2.Basic TYPE1IMAGER Object Structure - -All TYPE1IMAGER objects which are available to the user have a common -header. This header is defined below: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -The following define is an attempt to centralize the definition of the -common xobject data shared by structures that are derived from the -generic xobject structure. For example, the structure font, defined in -fonts.shr : -&code. - struct font { - char type; - char flag; - int references; - ... other data types & structs ... - } -&ecode. -would now be defined as: -&code. - struct font { - XOBJ_COMMON - ... other data types & structs ... - } -&ecode. -Thus we have a better-structured inheritance mechanism. 3-26-91 PNM -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Object Type Definitions - -These constants define the values which go in the 'type' field of -an TYPE1IMAGER object structure: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Flag Byte Definitions - -Many programmers define flag bits as a mask (for example, 0x04), and -test, set, and reset them as follows: - -&code. - if ((flag & PERMANENT) != 0) - - flag |= PERMANENT; - flag &= &inv.PERMANENT; -:exmp. - -I favor a style where the 'if' statement can ask a question: - -&code. - if (ISPERMANENT(flag)) - - flag |= ISPERMANENT(ON); - flag &= &inv.ISPERMANENT(ON); - -:exmp. -This said, we now define two bit settings of the flag byte of the -object. "ISPERMANENT" will be set by the user, when he calls -Permanent(). "ISIMMORTAL" will be used for compiled-in objects -that we don't want the user to ever destroy. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Flag bit definitions that apply to all objects are assigned -starting with the least significant (0x01) bit. Flag bit definitions -specific to a certain object type are assigned starting with the -most significant (0x80) bit. We hope they never meet. -*/ -/* -:h3 id=preserve.PRESERVE() Macro - -Occasionally an TYPE1IMAGER operator is implemented by calling other -TYPE1IMAGER operators. For example, Arc2() calls Conic(). When we -call more than one operator as a subroutine, we have to be careful -of temporary objects. A temporary object will be consumed by the -subroutine operator and then is no longer available for the caller. -This can be prevented simply by bumping a temporary object's reference -count. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.RefRoll() Macro to Detect References Count Rollover - -The following macro is designed to check for reference count rollover. -A return value of TRUE means rollover has not occurred; a return value -of FALSE means we cannot increment the reference count. Note also that -those functions that use this macro must decrement the reference count -afterwards. 3-26-91 PNM -*/ - -#define RefRoll(obj) (++(obj)->references > 0) - -/* -:h2.TYPE1IMAGER Object Functions - -:h3.LONGCOPY() - Macro to Copy "long" Aligned Data - -Copying arbitrary bytes in C is a bit of a problem. "strcpy" can't be -used, because 0 bytes are special-cased. Most environments have a -routine "memcopy" or "bcopy" or "bytecopy" that copies memory containing -zero bytes. Sadly, there is no standard on the name of such a routine, -which makes it impossible to write truely portable code to use it. - -It turns out that TYPE1IMAGER, when it wants to copy data, frequently -knows that both the source and destination are aligned on "long" -boundaries. This allows us to copy by using "long *" pointers. This -is usually very efficient on almost all processors. Frequently, it -is more efficient than using general-purpose assembly language routines. -So, we define a macro to do this in a portable way. "dest" and "source" -must be long-aligned, and "bytes" must be a multiple of "sizeof(long)": -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Allocate() - Allocating a Memory Block - -Allocate returns a pointer to memory object that is a copy of -the template passed (if any). In addition, extra bytes may be -allocated contiguously with the object. (This may be useful for -variable size objects such as edge lists. See :hdref refid=regions..) - -Allocate() always returns a non-immortal object, even if the template is -immortal. Therefore a non-NULL template must have a "flag" byte. - -If the template is NULL, then 'size' bytes are cleared to all NULLs. - -If the template is non-NULL, a new object is allocated in memory. -It therefore seems logical that its reference count field should be -set to 1. So, a nun-NULL template must also have a "references" field. -PNM 3-26-91 -*/ - -struct xobject * -t1_Allocate(int size, /* number of bytes to allocate & initialize */ - pointer ptr, /* example structure to allocate */ - int extra) /* any extra uninitialized bytes needed contiguously */ -{ - register struct xobject *template = (struct xobject *)ptr; - register struct xobject *r; - - /* - * round up 'size' and 'extra' to be an integer number of 'long's: - */ - size = (size + sizeof(long) - 1) & -(int)sizeof(long); - extra = (extra + sizeof(long) - 1) & -(int)sizeof(long); - if (size + extra <= 0) - Abort("Non-positive allocate?"); - r = (struct xobject *) xiMalloc(size + extra); - - while (r == NULL) { - if (!GimeSpace()) { - Abort("We have REALLY run out of memory"); - } - r = (struct xobject *) xiMalloc(size + extra); - } - - /* - * copy the template into the new memory: - */ - if (template != NULL) { - /* Added references count decrement if template is not permanent. - This is for the case where Allocate is called by a Dupxxxx - function, which was in turn called by Unique(). (PNM) */ - if (!ISPERMANENT(template->flag)) - --template->references; - LONGCOPY(r, template, size); - r->flag &= ~(ISPERMANENT(ON) | ISIMMORTAL(ON)); - /* added reference field 3-2-6-91 PNM */ - r->references = 1; - } - else { - register char **p1; - - for (p1=(char **)r; size > 0; size -= sizeof(char *)) - *p1++ = NULL; - } - - return(r); -} - -/* -:h3.Free() - Frees an Allocated Object - -This routine makes a sanity check to make sure the "type" field of the -standard object structure has not been cleared. If the object is -not a standard structure, then the macro "NonObjectFree" is available -that does not perform this check. - -In either case, the object must not be the NULL pointer. This preserves -portability, as the C system xiFree() will not always accept NULL. -*/ - -void -Free(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; /* structure to free */ - - if (obj->type == INVALIDTYPE) - Abort("Free of already freed object?"); - obj->type = INVALIDTYPE; - - xiFree((long *)obj); -} - -/* -:h3.Permanent() - Makes an Object Permanent - -Real simple--just set a flag. Every routine that consumes its objects -(which is almost every user entry) must check this flag, and not consume -the object if it is set. - -If a temporary object is made permanent, and there is more than one -reference to it, we must first Copy() it, then set the ISPERMANENT -flag. Note also that the reference count must be incremented when an -object is changed from temporary to permanent (see the ISUNIQUE macro). - -Note that the purpose of this function is to convert an object into a -permanent object: - If it was permanent to begin with, we do nothing; - If it was temporary and unique, we set the PERMANENT flag and increment -the reference count; - If it was temporary and nonunique, we must make a unique Copy(), set -the PERMANENT flag, and set the reference count to 2. We must also -decrement the original object's reference count, because what we have -done is to change one of the old temporary handles to a permanent one. -3-26-91 PNM -*/ - -struct xobject * -t1_Permanent(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; /* object to be made permanent */ - - if ( (obj != NULL) && ( !(ISPERMANENT(obj->flag)) ) ) - { - /* there is a non-NULL, temporary object to be made permanent. - If there are multiple references to this object, first get - a new COPY(). - Note also that we have to decrement the reference count if - we do a Copy() here, because we are consuming the temporary - argument passed, and returning a unique, permanent one. - */ - if ( obj->references > 1) - { - obj = Copy(obj); - } - /* now set the permanent flag, and increment the reference - count, since a temporary object has now become permanent. */ - obj->references++; - obj->flag |= ISPERMANENT(ON); - } - return(obj); -} - -#ifdef notused -/* -:h3.Temporary() - Undoes the Effect of "Permanent()" - -This simply resets the "ISPERMANENT" flag. - -If a permanent object is made temporary, and there is more than one reference -to it, we must first Copy() it, then reset the ISPERMANENT flag. However, -if the permanent object has obly one reference, we need only decrement the -reference count ( and reset the flag). - -Note that this function, in the case of a PERMANENT argument, basically -converts the PERMANENT handle to a TEMPORARY one. Thus, in the case of -a nonunique, permanent argument passed, we not only make a Copy(), -we also decrement the reference count, to reflect the fact that we have -lost a permanent handle and gained a temporary one. -PNM 3-2-6-91 -*/ - -struct xobject * -xiTemporary(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be made permanent */ - if (obj != NULL) { - /* if it's already temporary, there's nothing to do. */ - if ISPERMANENT(obj->flag) - { - /* if there are multiple references to this object, get a - Copy we can safely alter. Recall that the reference count - is incremented for permanent objects. - Recall further that Copy returns an object with the - same flag state and a reference count of 2 (for PERMANENT - objects). - Thus, regardless of whether or not we need to copy a - permanent object, we still decrement its reference - count and reset the flag. - */ - if (obj->references != 2 || ISIMMORTAL(obj->flag)) - { - /* not unique; consume handle, get a temporary Copy! */ - obj = Copy(obj); - } - /* else decrement the reference count (since it's going from - permanent to temporary) and clear the flag. */ - else { - obj->references--; - obj->flag &= ~ISPERMANENT(ON); - } - } - } - return(obj); -} -#endif /* notused */ - -/* -:h3.Dup() - Duplicate an Object - -Dup will increment the reference count of an object, only making a -Copy() if needed. -Note that Dup() retains the state of the permanent flag. -3-26-91 PNM -*/ - - -struct xobject * -t1_Dup(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be duplicated */ - register char oldflag; /* copy of original object's flag byte */ - - if (obj == NULL) - return(NULL); - /* An immortal object must be Copy'ed, so that we get a mortal - copy of it, since we try not to destroy immortal objects. */ - if (ISIMMORTAL(obj->flag)) - return(Copy(obj)); - - /* if incrementing the reference count doesn't cause the count - to wrap, simply return the object with the count bumped. Note - that the RefRoll macro increments the count to perform the - rollover check, so we must decrement the count. */ - if (RefRoll(obj)) - return(obj); - - /* that didn't work out, so put the count back and call Copy(). */ - --obj->references; - oldflag = obj->flag; - obj = Copy(obj); - if (ISPERMANENT(oldflag)) - obj = Permanent(obj); - return(obj); -} - -/* -:h3.Copy() - Make a New Copy of an Object - -This is the generic Copy() where the object type is unknown. There -are specific Copyxxx functions for known object types. - -Copy will create a NEW temporary object, and WILL NOT simply bump the -reference count. - -Sometimes duplicating an object is just as simple as Allocating with it -as a template. But other objects are complicated linked lists. So, we -let each module provide us a routine (or macro) that duplicates the -objects it knows about. -*/ - -struct xobject * -t1_Copy(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be Copy'ed */ - if (obj == NULL) - return(NULL); - - if (ISPATHTYPE(obj->type)) - obj = (struct xobject *) CopyPath((struct segment *)obj); - else - switch (obj->type) { - case SPACETYPE: - obj = (struct xobject *) - CopySpace((struct XYspace *)obj); - break; - case FONTTYPE: - obj = (struct xobject *) CopyFont(obj); break; - case REGIONTYPE: - obj = (struct xobject *) - CopyRegion((struct region *)obj); - break; - case PICTURETYPE: - obj = (struct xobject *) CopyPicture(obj); break; - case LINESTYLETYPE: - obj = (struct xobject *) CopyLineStyle(obj); break; - case STROKEPATHTYPE: - obj = (struct xobject *) CopyStrokePath(obj); break; - case CLUTTYPE: - obj = (struct xobject *) CopyCLUT(obj); break; - default: - return(ArgErr("Copy: invalid object", obj, NULL)); - } - - return(obj); -} - -/* -:h3.Destroy() - Destroys an Object - -This can get complicated. Just like with Copy(), we let the experts -handle it. -*/ -struct xobject * -Destroy(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be destroyed */ - if (obj == NULL) - return(NULL); - if (ISIMMORTAL(obj->flag)) { - return(NULL); - } - if (ISPATHTYPE(obj->type)) - KillPath((struct segment *)obj); - else { - switch (obj->type) { - case REGIONTYPE: - KillRegion((struct region *)obj); - break; - case SPACETYPE: - KillSpace(obj); - break; - case LINESTYLETYPE: - KillLineStyle(obj); - break; - case FONTTYPE: - KillFont(obj); - break; - case PICTURETYPE: - KillPicture(obj); - break; - case STROKEPATHTYPE: - KillStrokePath(obj); - break; - case CLUTTYPE: - KillCLUT(obj); - break; - default: - return(ArgErr("Destroy: invalid object", obj, NULL)); - } - } - return(NULL); -} -/* -:h2.Generally Useful Macros - -:h3.FOLLOWING() - Macro to Point to the Data Following a Structure - -There are several places in TYPE1IMAGER where we will allocate variable -data that belongs to a structure immediately after that structure. -This is a performance technique, because it reduces the number of -trips we have to take through xiMalloc() and xiFree(). It turns out C has -a very convenient way to point past a structure--if 'p' is a pointer -to a structure, 'p+1' is a pointer to the data after it. This -behavior of C is somewhat startling and somewhat hard to follow, if -you are not used to it, so we define a macro to point to the data -following a structure: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.TYPECHECK() - Verify the Type of an Argument - -This macro tests the type of an argument. If the test fails, it consumes -any other arguments as necessary and causes the imbedding routine to -return the value 'whenBAD'. - -Note that the consumeables list should be an argument list itself, for -example (0) or (2,A,B). See :hdref refid=consume. below. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.ARGCHECK() - Perform an Arbitrary Check on an Argument - -This macro is a generalization of TYPECHECK to take an arbitrary -predicate. If the error occurs (i.e., the predicate is true), the -arbitrary message 'msg' is returned. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.TYPENULLCHECK() - Extension of TYPECHECK() for NULL arguments - -Many routines allow NULLs to be passed as arguments. 'whenBAD' will -be returned in this case, too. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.MAKECONSUME() - Create a "Consume"-type Macro - -Consuming an object means destroying it if it is not permanent. This -logic is so common to all the routines, that it is immortalized in this -macro. For example, ConsumePath(p) can be simply defined as -MAKECONSUME(p,KillPath(p)). In effect, this macro operates on a -meta-level. -:i1/consuming objects/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.MAKEUNIQUE() - Create a "Unique"-type Macro - -Many routines are written to modify their arguments in place. Thus, -they want to insure that they duplicate an object if it is permanent. -This is called making an object "unique". For example, UniquePath(p) -can be simply defined as MAKEUNIQUE(p,DupPath(p)). -:i1/unique objects/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -An object is unique (and directly alterable) if there is only one -reference to it, and it is not permanent (in which case we increment -the reference count, so we don't have to check the permanent bit). -3-26-91 PNM - -Note the rules for making a unique object: -&drawing. - IF (obj->references = 1) return(obj); - ELSE (references > 1) - IF (ISPERMANENT(obj->flag)) return(Dupxxx(obj)); - ELSE (nonunique, temporary object!) - obj->references--; return(Dupxxx(obj)); -&edrawing. -If we must make a Copy of a nonunique, temporary object, we decrement -reference count of the original object! -*/ - -/* -:h3.Unique() - Make a Unique Object - -Here is a generic 'Unique' function if the object type is not known. -Why didn't we build it with the MAKEUNIQUE macro, you ask? Well, we -used to, but there is at least one damn compiler in the world that -raises errors if the types of an "(a) ? b : c" expression do not match. -Also, when we changed Dup() to retain the permanent/temporary flag, we -wanted to make sure "Unique" always returned a temporary object. - -Note that we cannot use Dup() to create a copy of the object in question, -because Dup() may simply bump the reference count, and not return a -unique copy to us. That is why we use t1_Copy(). - -The purpose of this function is to make sure we have a copy of an object -that we can safely alter: -:ol. -:li.If we have a unique, temporary object, we simply return the argument. -:li.If we have a nonunique, temporary object, we have to make a new copy -of it, and decrement the reference count of the original object, to reflect -the fact that we traded temporary handles. -:li.If we have a permanent object, we make a temporary copy of it, but -we do not decrement the reference count of the original permanent object, -because permanent objects, by definition, are persistent. 3-2-6-91 PNM -:eol. -*/ - -struct xobject * -t1_Unique(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; - - /* if the original object is not already unique, make a unique - copy...Note also that if the object was not permanent, we must - consume the old handle! 3-26-91 PNM - NOTE : consumption of the old handle moved to Allocate. 4-18-91 */ - if (!obj || obj->references == 1) - return(obj); - - obj = Copy(obj); - /* and make sure we return a temporary object ! */ - if (ISPERMANENT(obj->flag)) - { - obj->flag &= ~ISPERMANENT(ON); - obj->references--; - } - return(obj); -} - - -/* -:h2.Initialization, Error, and Debug Routines - -:h3 id=debugvar.Declarations for Debug Purposes - -We declare all the debug flags here. Some link editors make the not -unreasonable restriction that only one module may declare and -initialize global variables; all the rest must declare the variable -'extern'. This is logical, but is somewhat awkward to implement with -C include files. We solve the problem by temporarily making the name -'extern' a null name if GLOBALS is defined. (GLOBALS is only defined -in this OBJECTS module.) Since 'externs' can't be initialized, we -have to handle that with #defines too. -:i1/GLOBALS (&#define.)/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -static char *ErrorMessage = NULL; - -/* -:h3.Pragmatics() - Set/Reset Debug Flags - -We provide a controlled way for the TYPE1IMAGER user to set and reset -our debugging and tracing: -*/ -void -Pragmatics(char *username, /* name of the flag */ - int value) /* value to set it to */ -{ - register char *p; /* temporary loop variable */ -#define NAMESIZE 40 - char name[NAMESIZE]; /* buffer to store my copy of 'username' */ - - if (strlen(username) >= (unsigned)NAMESIZE) - Abort("Pragmatics name too large"); - strcpy(name, username); - for (p = name; *p != '\0'; p++) - *p = toupper(*p); - - if (!strcmp(name, "ALL")) - MustTraceCalls = InternalTrace = /* MustCrash = */ - LineIOTrace = value; - - else if (!strcmp(name, "LINEIOTRACE")) - LineIOTrace = value; - - else if (!strcmp(name, "TRACECALLS")) - MustTraceCalls = value; - - else if (!strcmp(name, "CHECKARGS")) - MustCheckArgs = value; - - else if (!strcmp(name, "PROCESSHINTS")) - ProcessHints = value; - - else if (!strcmp(name, "SAVEFONTPATHS")) - SaveFontPaths = value; - - else if (!strcmp(name, "CRASTERCOMPRESSIONTYPE")) - CRASTERCompressionType = value; - - else if (!strcmp(name, "CRASHONUSERERROR")) - MustCrash = value; - - else if (!strcmp(name, "DEBUG")) - StrokeDebug = SpaceDebug = PathDebug = ConicDebug = LineDebug = - RegionDebug = MemoryDebug = FontDebug = - HintDebug = ImageDebug = OffPageDebug = value; - - else if (!strcmp(name, "CONICDEBUG")) - ConicDebug = value; - - else if (!strcmp(name, "LINEDEBUG")) - LineDebug = value; - - else if (!strcmp(name, "REGIONDEBUG")) - RegionDebug = value; - - else if (!strcmp(name, "PATHDEBUG")) - PathDebug = value; - - else if (!strcmp(name, "SPACEDEBUG")) - SpaceDebug = value; - - else if (!strcmp(name, "STROKEDEBUG")) - StrokeDebug = value; - - else if (!strcmp(name, "MEMORYDEBUG")) - MemoryDebug = value; - - else if (!strcmp(name, "FONTDEBUG")) - FontDebug = value; - - else if (!strcmp(name, "HINTDEBUG")) - HintDebug = value; - - else if (!strcmp(name, "IMAGEDEBUG")) - ImageDebug = value; - - else if (!strcmp(name, "OFFPAGEDEBUG")) - OffPageDebug = value; - -#ifdef MC68000 -/* -The following pragmatics flag turns on or off instruction histograming -for performance analysis. It is only defined in the Delta card -environment. -*/ - else if (!strcmp(name, "PROFILE")) { - if (value) - StartProfile(); - else - StopProfile(); - } -#endif - else if (!strcmp(name, "FLUSHCACHE")) { -#ifdef notdef - while (GimeSpace()) { ; } -#endif - } - - else if (!strcmp(name, "CACHEDCHARS")) - CachedChars = (value <= 0) ? 1 : value; - - else if (!strcmp(name, "CACHEDFONTS")) - CachedFonts = (value <= 0) ? 1 : value; - - else if (!strcmp(name, "CACHEBLIMIT")) - CacheBLimit = value; - - else if (!strcmp(name, "CONTINUITY")) - Continuity = value; - - - else { - printf("Pragmatics flag = '%s'\n", name); - ArgErr("Pragmatics: flag not known", NULL, NULL); - } - return; -} - -/* -:h3.Consume() - Consume a List of Arguments - -This general purpose routine is provided in the case where the object -type(s) to be consumed are unknown or not yet verified, and/or it is -not known whether the object is permanent. - -If the type of the argument is known, it is faster to directly consume -that type, for example, ConsumeRegion() or ConsumePath(). Furthermore, -if it is already known that the object is temporary, it is faster to -just kill it rather than consume it, for example, KillSpace(). -*/ - -void -Consume(int n, ...) -{ - struct xobject *obj; - va_list ap; - - va_start(ap, n); - - while (n-- > 0) { - obj = va_arg(ap, struct xobject *); - if (obj != NULL && !ISPERMANENT(obj->flag)) - Destroy(obj); - } -} - -/* -:h3.TypeErr() - Handles "Invalid Object Type" Errors -*/ - -struct xobject * -TypeErr(char *name, /* Name of routine (for error message) */ - pointer objPtr, /* Object in error */ - int expect, /* type expected */ - pointer retPtr) /* object to return to caller */ -{ - struct xobject *obj = (struct xobject *)objPtr; - struct xobject *ret = (struct xobject *)retPtr; - /* - * This buffer must be large enough to hold 'name' plus - * two of the largest strings that can be returned by TypeFmt. - * The largest value of 'name' is currently 9 ("ClosePath") - * and the longest strings in TypeFmt are 30 characters. - */ - static char typemsg[115]; - - if (MustCrash) - LineIOTrace = TRUE; - - sprintf(typemsg, "Wrong object type in %s. Expected %s; was %s.\n", - name, TypeFmt(expect), TypeFmt(obj->type)); - - if (MustCrash) - Abort("Terminating because of CrashOnUserError..."); - else - ErrorMessage = typemsg; - -/* changed ISPERMANENT to ret->references > 1 3-26-91 PNM */ - if (ret != NULL && (ret->references > 1)) - ret = Dup(ret); - return(ret); -} - -/* -:h4.TypeFmt() - Returns Pointer to English Name of Object Type - -This is a subroutine of TypeErr(). -*/ - -static char * -TypeFmt(int type) /* type field */ -{ - char *r; - - if (ISPATHTYPE(type)) - if (type == TEXTTYPE) - r = "path or region (from TextPath)"; - else - r = "path"; - else { - switch (type) { - case INVALIDTYPE: - r = "INVALID (previously consumed?)"; - break; - case REGIONTYPE: - r = "region"; - break; - case SPACETYPE: - r = "XYspace"; - break; - case LINESTYLETYPE: - r = "linestyle"; - break; - case FONTTYPE: - r = "font"; - break; - case PICTURETYPE: - r = "picture"; - break; - case STROKEPATHTYPE: - r = "path (from StrokePath)"; - break; - default: - r = "UNKNOWN"; - break; - } - } - return(r); -} -/* -:h3.ArgErr() - Invalid Argument Passed to a Routine - -A common routine to report argument errors. It is usually called -is returned to the caller in case MustCrash is FALSE and ArgErr -returns to its caller. -*/ - -struct xobject * -ArgErr(char *string, /* description of error */ - pointer objPtr, /* object, if any, that was in error */ - pointer retPtr) /* object returned to caller or NULL */ -{ - struct xobject *ret = (struct xobject *)retPtr; - - if (MustCrash) - LineIOTrace = TRUE; - - if (MustCrash) - Abort("Terminating because of CrashOnUserError..."); - else - ErrorMessage = string; - return(ret); -} - -/* -:h3.Abort() - Crash Due to Error - -Defined in objects.h to be FatalError(), the server's abort routine. -*/ - -/* -:h3.REAL Miscellaneous Stuff - -:h4.ErrorMsg() - Return the User an Error Message -*/ - -char * -ErrorMsg(void) -{ - register char *r; - - r = ErrorMessage; - ErrorMessage = NULL; - return(r); -} - -/* -:h4.InitImager() - Initialize TYPE1IMAGER - -We check that a short is 16 bits and a long 32 bits; we have made -those assumptions elsewhere in the code. (This is almost a C standard, -anyway.) Note that TYPE1IMAGER makes no assumptions about the size of an -'int'! -:i1/portability assumptions/ -*/ - -void -InitImager(void) -{ - -/* Check to see if we have been using our own malloc. If so,*/ -/* Undef malloc so that we can get to the system call. */ -/* All other calls to malloc are defined to xiMalloc. */ - - -/* if (sizeof(short) != 2 || sizeof(INT32) != 4) - Abort("Fundamental TYPE1IMAGER assumptions invalid in this port"); -*/ - InitSpaces(); - InitFonts(); - InitFiles(); -/* -In some environments, constants and/or exception handling need to be -*/ - LibInit(); -} -/* -:h4.TermImager() - Terminate TYPE1IMAGER - -This only makes sense in a server environment; true TYPE1IMAGER needs do -nothing. -*/ -void -TermImager(void) -{ - return; -} -#ifdef notused -/* -:h4.reportusage() - A Stub to Get a Clean Link with Portable PMP -*/ -void -reportusage(void) -{ - return; -} -#endif diff --git a/nx-X11/lib/font/Type1/objects.h b/nx-X11/lib/font/Type1/objects.h deleted file mode 100644 index 7552f98d9..000000000 --- a/nx-X11/lib/font/Type1/objects.h +++ /dev/null @@ -1,354 +0,0 @@ -/* $Xorg: objects.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/objects.h,v 1.14tsi Exp $ */ -/*SHARED*/ - -/*END SHARED*/ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#include -#include -#ifndef FONTMODULE -#include -#endif -/*SHARED*/ - -#define Permanent(obj) t1_Permanent(obj) -#ifdef notused -#define Temporary(obj) t1_Temporary(obj) -#endif -#define Destroy(obj) t1_Destroy(obj) -#define Dup(obj) t1_Dup(obj) -#define InitImager t1_InitImager -#define TermImager t1_TermImager -#define Pragmatics(f,v) t1_Pragmatics(f,v) -#define ErrorMsg t1_ErrorMsg - -/* make an object permanent */ -extern struct xobject *t1_Permanent ( pointer obj ); - -#ifdef notused -/* make an object temporary */ -extern struct xobject *t1_Temporary( pointer obj ); -#endif - -/* destroy an object */ -extern struct xobject *t1_Destroy ( pointer obj ); - -/* duplicate an object */ -extern struct xobject *t1_Dup ( pointer obj ); - - -extern void t1_InitImager ( void ); /* initialize TYPE1IMAGER */ -extern void t1_TermImager ( void ); /* terminate TYPE1IMAGER */ -/* set debug flags, etc. */ -extern void t1_Pragmatics ( char *username, int value ); - -/* return last TYPE1IMAGER error message */ -extern char *t1_ErrorMsg ( void ); - -/*END SHARED*/ -/*SHARED*/ -extern void xiFree ( long *addr ); -extern char *xiMalloc ( unsigned Size ); -extern void addmemory ( long *addr, long size ); -extern void delmemory ( void ); - -#ifndef OS_H -extern void FatalError(const char *f, ...) -#if defined(__GNUC__) && \ - ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) -__attribute((noreturn)) -#endif -; - -extern void ErrorF(const char *f, ...); -#endif - -#define Abort(line) FatalError(line) -#define Allocate(n,t,s) t1_Allocate(n,t,s) -#define Free(obj) t1_Free(obj) -#define NonObjectFree(a) xiFree((long *)(a)) -#define Consume t1_Consume -#define ArgErr(s,o,r) t1_ArgErr(s,o,r) -#define TypeErr(n,o,e,r) t1_TypeErr(n,o,e,r) -#define Copy(obj) t1_Copy(obj) -#define Unique(obj) t1_Unique(obj) - -/* allocate memory */ -extern struct xobject *t1_Allocate( int size, pointer template, - int extra ); - -/* free memory */ -extern void t1_Free ( pointer obj ); - -/* make a unique temporary copy of an object */ -extern struct xobject *t1_Unique ( pointer obj ); - -/* handle argument errors */ -extern struct xobject *t1_ArgErr ( char *string, pointer obj, pointer ret ); - -/* handle 'bad type' argument errors */ -extern struct xobject *t1_TypeErr ( char *name, pointer obj, - int expect, pointer ret ); - -/* consume a variable number of arguments */ -extern void t1_Consume ( int n, ... ); - -/* make a new copy, not reference bump PNM */ -extern struct xobject *t1_Copy ( pointer obj ); - - -/*END SHARED*/ -/*SHARED*/ - -#define ON (~0) /* all bits on */ -#ifndef FALSE -#define FALSE 0 /* handy zero value */ -#endif -#ifndef TRUE -#define TRUE 1 /* handy non-zero value */ -#endif - -#ifndef NULL -#include -/* -The NULL pointer is system specific. (Most systems, however, use 0.) -TYPE1IMAGER could have its own NULL, independent of the rest of the system, -were it not for malloc(). The system call malloc() returns NULL when -out of memory. -:i1/portibility assumptions/ -*/ -#endif - -#ifndef MIN -#define MIN(a,b) (((a)<(b)) ? a : b) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b)) ? a : b) -#endif -#ifndef ABS -#define ABS(a) (((a)>=0)?(a):-(a)) -#endif - -/*END SHARED*/ -/*SHARED*/ - -struct xobject { - char type; /* encoded type of object */ - unsigned char flag; /* flag byte for temporary object characteristics*/ - short references; /* count of pointers to this object - (plus 1 for permanent objects) PNM */ -} ; - -/*END SHARED*/ -/*SHARED*/ - -#define XOBJ_COMMON char type; unsigned char flag; short references; - -/*END SHARED*/ -/*SHARED*/ - - -#define INVALIDTYPE 0 -#define FONTTYPE 1 -#define REGIONTYPE 3 -#define PICTURETYPE 4 -#define SPACETYPE 5 -#define LINESTYLETYPE 6 -#define EDGETYPE 7 -#define STROKEPATHTYPE 8 -#define CLUTTYPE 9 - -#define ISPATHTYPE(type) ((type)&0x10) /* all path segments have this bit on */ -#define LINETYPE (0+ISPATHTYPE(ON)) -#define CONICTYPE (1+ISPATHTYPE(ON)) -#define BEZIERTYPE (2+ISPATHTYPE(ON)) -#define HINTTYPE (3+ISPATHTYPE(ON)) - -#define MOVETYPE (5+ISPATHTYPE(ON)) -#define TEXTTYPE (6+ISPATHTYPE(ON)) - -/*END SHARED*/ -/*SHARED*/ - -#define ISPERMANENT(flag) ((flag)&0x01) -#define ISIMMORTAL(flag) ((flag)&0x02) - -/*END SHARED*/ -/*SHARED*/ - -#define PRESERVE(obj) if (!ISPERMANENT((obj)->flag)) \ - (obj)->references++; - -/*END SHARED*/ -/*SHARED*/ - -#define LONGCOPY(dest,source,bytes) { \ - register long *p1 = (long *)dest; register long *p2 = (long *)source; \ - register int count = (bytes) / sizeof(long); \ - while (--count >= 0) *p1++ = *p2++; } - - -/*END SHARED*/ -/*SHARED*/ - -#define FOLLOWING(p) ((p)+1) - -/*END SHARED*/ -/*SHARED*/ - -#define TYPECHECK(name, obj, expect, whenBAD, consumables, rettype) { \ - if (obj->type != expect) { \ - (Consume)consumables; \ - return((rettype)TypeErr(name, obj, expect, whenBAD)); \ - } \ -} - -/*END SHARED*/ -/*SHARED*/ - -#define ARGCHECK(test,msg,obj,whenBAD,consumables,rettype) { \ - if (test) { \ - (Consume)consumables; \ - return((rettype)ArgErr(msg, obj, whenBAD)); \ - } \ -} - -/*END SHARED*/ -/*SHARED*/ - -/* Changed use of Dup() below to Temporary(Copy()) because Dup() does not - necessarily return a Unique Copy anymore! 3-26-91 */ -#define TYPENULLCHECK(name, obj, expect, whenBAD, consumables,rettype) \ - if (obj == NULL) { \ - (Consume)consumables; \ - if (whenBAD != NULL && ISPERMANENT(whenBAD->flag)) \ - return((rettype)Temporary(Copy(whenBAD))); \ - else return((rettype)whenBAD); \ - } else { \ - if (obj->type != expect) { \ - (Consume)consumables; \ - return((rettype)TypeErr(name, obj, expect, whenBAD)); \ - } \ - } -/*END SHARED*/ -/*SHARED*/ - -#define MAKECONSUME(obj,stmt) { if (!ISPERMANENT(obj->flag)) stmt; } - -/*END SHARED*/ -/*SHARED*/ - -#define MAKEUNIQUE(obj,stmt) ( ( (obj)->references > 1 ) ? stmt : obj ) - -/*END SHARED*/ -/*SHARED*/ - -#ifdef GLOBALS - -#define extern -#define INITIALIZED(value) = value - -#else - -#define INITIALIZED(value) - -#endif - -extern char MustCheckArgs INITIALIZED(TRUE); -extern char MustTraceCalls INITIALIZED(FALSE); -#if XFONT_CID -extern char MustCrash INITIALIZED(FALSE); -#else -extern char MustCrash INITIALIZED(TRUE); -#endif -extern char InternalTrace INITIALIZED(TRUE); -extern char LineIOTrace INITIALIZED(TRUE); - -extern char ProcessHints INITIALIZED(TRUE); - -extern char SaveFontPaths INITIALIZED(TRUE); - -extern short CRASTERCompressionType INITIALIZED(1); - -extern char ConicDebug INITIALIZED(0); -extern char LineDebug INITIALIZED(0); -extern char RegionDebug INITIALIZED(0); -extern char PathDebug INITIALIZED(0); -extern char FontDebug INITIALIZED(0); -extern char SpaceDebug INITIALIZED(0); -extern char StrokeDebug INITIALIZED(0); -extern char MemoryDebug INITIALIZED(0); -extern char HintDebug INITIALIZED(0); -extern char ImageDebug INITIALIZED(0); -extern char OffPageDebug INITIALIZED(0); - -extern short CachedChars INITIALIZED(0x7FFF); -extern short CachedFonts INITIALIZED(0x7FFF); -extern int CacheBLimit INITIALIZED(12500); -extern char Continuity INITIALIZED(2); - -#ifdef extern -#undef extern -#endif - -/* -We define other routines formatting parameters -*/ -#define DumpArea(area) t1_DumpArea(area) -#define DumpText(text) t1_DumpText(text) -#define DumpPath(path) t1_DumpPath(path) -#define DumpSpace(space) t1_DumpSpace(space) -#define DumpEdges(e) t1_DumpEdges(e) -#define FormatFP(s,p) t1_FormatFP(s,p) - -/* dump a textpath structure */ -extern void t1_DumpText(void); - -/*END SHARED*/ diff --git a/nx-X11/lib/font/Type1/paths.c b/nx-X11/lib/font/Type1/paths.c deleted file mode 100644 index 1ab25ecef..000000000 --- a/nx-X11/lib/font/Type1/paths.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* $Xorg: paths.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/paths.c,v 1.7tsi Exp $ */ - - /* PATHS CWEB V0021 ******** */ -/* -:h1 id=paths.PATHS Module - Path Operator Handler - -This is the module that is responsible for building and transforming -path lists. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - - /* after the system includes (dsr) */ -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" /* understands about Union */ -#include "fonts.h" /* understands about TEXTTYPEs */ -#include "pictures.h" /* understands about handles */ -#include "strokes.h" /* understands how to coerce stroke paths */ -#include "trig.h" - - -/* -:h3.Routines Available to the TYPE1IMAGER User - -The PATHS routines that are made available to the outside user are: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to Other Modules - -The path routines that are made available to other TYPE1IMAGER modules -are defined here: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -NOTE: because of the casts put in the macros for Loc, ArcCA, Conic, -RoundConic, PathSegment, and JoinSegment, we cannot use the macro names -when the functions are actually defined. We have to use the unique -names with their unique first two characters. Thus, if anyone in the -future ever decided to change the first two characters, it would not be -enough just to change the macro (as it would for most other functions). -He would have to also change the function definition. -*/ -/* -:h3.Macros Provided to Other Modules - -The CONCAT macro is defined here and used in the STROKES module. See -:hdref refid=pathmac.. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Path Segment Structures - -A path is represented as a linked list of the following structure: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -When 'link' is NULL, we are at the last segment in the path (surprise!). - -'last' is only non-NULL on the first segment of a path, -for all the other segments 'last' == NULL. We test for a non-NULL -'last' (ISPATHANCHOR predicate) when we are given an alleged path -to make sure the user is not trying to pull a fast one on us. - -A path may be a collection of disjoint paths. Every break in the -disjoint path is represented by a MOVETYPE segment. - -Closed paths are discussed in :hdref refid=close.. - -:h3.CopyPath() - Physically Duplicating a Path - -This simple function illustrates moving through the path linked list. -Duplicating a segment just involves making a copy of it, except for -text, which has some auxilliary things involved. We don't feel -competent to duplicate text in this module, so we call someone who -knows how (in the FONTS module). -*/ -struct segment * -CopyPath(struct segment *p0) /* path to duplicate */ -{ - register struct segment *p,*n = NULL,*last = NULL,*anchor; - - for (p = p0, anchor = NULL; p != NULL; p = p->link) { - - ARGCHECK((!ISPATHTYPE(p->type) || (p != p0 && p->last != NULL)), - "CopyPath: invalid segment", p, NULL, (0), struct segment *); - - if (p->type == TEXTTYPE) - n = (struct segment *) CopyText(p); - else - n = (struct segment *)Allocate(p->size, p, 0); - n->last = NULL; - if (anchor == NULL) - anchor = n; - else - last->link = n; - last = n; - } -/* -At this point we have a chain of newly allocated segments hanging off -'anchor'. We need to make sure the first segment points to the last: -*/ - if (anchor != NULL) { - n->link = NULL; - anchor->last = n; - } - - return(anchor); -} -/* -:h3.KillPath() - Destroying a Path - -Destroying a path is simply a matter of freeing each segment in the -linked list. Again, we let the experts handle text. -*/ -void -KillPath(struct segment *p) /* path to destroy */ -{ - register struct segment *linkp; /* temp register holding next segment*/ - - /* return conditional based on reference count 3-26-91 PNM */ - if ( (--(p->references) > 1) || - ( (p->references == 1) && !ISPERMANENT(p->flag) ) ) - return; - - while (p != NULL) { - if (!ISPATHTYPE(p->type)) { - ArgErr("KillPath: bad segment", p, NULL); - return; - } - linkp = p->link; - if (p->type == TEXTTYPE) - KillText(p); - else - Free(p); - p = linkp; - } -} - -/* -:h2 id=location."location" Objects - -The TYPE1IMAGER user creates and destroys objects of type "location". These -objects locate points for the primitive path operators. We play a trick -here and store these objects in the same "segment" structure used for -paths, with a type field == MOVETYPE. - -This allows the Line() operator, for example, to be very trivial: -It merely stamps its input structure as a LINETYPE and returns it to the -caller--assuming, of course, the input structure was not permanent (as -it usually isn't). - -:h3.The "movesegment" Template Structure - -This template is used as a generic segment structure for Allocate: -*/ - -/* added reference field 1 to temporary template below 3-26-91 PNM */ -static struct segment movetemplate = { MOVETYPE, 0, 1, sizeof(struct segment), 0, - NULL, NULL, {0, 0} }; -/* -:h3.Loc() - Create an "Invisible Line" Between (0,0) and a Point - -*/ - -struct segment * -t1_Loc(struct XYspace *S, /* coordinate space to interpret X,Y */ - double x, double y) /* destination point */ -{ - register struct segment *r; - - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *); - - r->last = r; - r->context = S->context; - (*S->convert)(&r->dest, S, x, y); - ConsumeSpace(S); - return(r); -} -/* -:h3.ILoc() - Loc() With Integer Arguments - -*/ -struct segment * -ILoc(struct XYspace *S, /* coordinate space to interpret X,Y */ - int x, int y) /* destination point */ -{ - register struct segment *r; - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *); - - r->last = r; - r->context = S->context; - (*S->iconvert)(&r->dest, S, (long) x, (long) y); - ConsumeSpace(S); - return(r); -} - -/* -:h3.SubLoc() - Vector Subtraction of Two Locition Objects - -This user operator subtracts two location objects, yielding a new -location object that is the result. - -The symmetrical function AddLoc() is totally redundent with Join(), -so it is not provided. -*/ - -struct segment * -SubLoc(struct segment *p1, struct segment *p2) -{ - ARGCHECK(!ISLOCATION(p1), "SubLoc: bad first arg", p1, NULL, (0), struct segment *); - ARGCHECK(!ISLOCATION(p2), "SubLoc: bad second arg", p2, NULL, (0), struct segment *); - p1 = UniquePath(p1); - p1->dest.x -= p2->dest.x; - p1->dest.y -= p2->dest.y; - ConsumePath(p2); - return(p1); -} - -/* -:h2.Straight Line Segments - -:h3.PathSegment() - Create a Generic Path Segment - -Many routines need a LINETYPE or MOVETYPE path segment, but do not -want to go through the external user's interface, because, for example, -they already know the "fractpel" destination of the segment and the -conversion is unnecessary. PathSegment() is an internal routine -provided to the rest of TYPE1IMAGER for handling these cases. -*/ - -struct segment * -t1_PathSegment(int type, /* LINETYPE or MOVETYPE */ - fractpel x, fractpel y) /* where to go to, if known */ -{ - register struct segment *r; /* newly created segment */ - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - r->type = type; - r->last = r; /* last points to itself for singleton */ - r->dest.x = x; - r->dest.y = y; - return(r); -} -/* -:h3.Line() - Create a Line Segment Between (0,0) and a Point P - -This involves just creating and filling out a segment structure: -*/ -struct segment * -Line(struct segment *P) /* relevant coordinate space */ -{ - ARGCHECK(!ISLOCATION(P), "Line: arg not a location", P, NULL, (0), struct segment *); - - P = UniquePath(P); - P->type = LINETYPE; - return(P); -} -/* -:h2.Curved Path Segments - -We need more points to describe curves. So, the structures for curved -path segments are slightly different. The first part is identical; -the curved structures are larger with the extra points on the end. - -:h3.Bezier Segment Structure - -We support third order Bezier curves. They are specified with four -control points A, B, C, and D. The curve starts at A with slope AB -and ends at D with slope CD. The curvature at the point A is inversely -related to the length |AB|, and the curvature at the point D is -inversely related to the length |CD|. Point A is always point (0,0). - -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Bezier() - Generate a Bezier Segment - -This is just a simple matter of filling out a 'beziersegment' structure: -*/ - -struct beziersegment * -Bezier(struct segment *B, /* second control point */ - struct segment *C, /* third control point */ - struct segment *D) /* fourth control point (ending point) */ -{ -/* added reference field of 1 to temporary template below 3-26-91 PNM */ - static struct beziersegment template = - { BEZIERTYPE, 0, 1, sizeof(struct beziersegment), 0, - NULL, NULL, { 0, 0 }, { 0, 0 }, { 0, 0 } }; - - register struct beziersegment *r; /* output segment */ - - ARGCHECK(!ISLOCATION(B), "Bezier: bad B", B, NULL, (2,C,D), struct beziersegment *); - ARGCHECK(!ISLOCATION(C), "Bezier: bad C", C, NULL, (2,B,D), struct beziersegment *); - ARGCHECK(!ISLOCATION(D), "Bezier: bad D", D, NULL, (2,B,C), struct beziersegment *); - - r = (struct beziersegment *)Allocate(sizeof(struct beziersegment), &template, 0); - r->last = (struct segment *) r; - r->dest.x = D->dest.x; - r->dest.y = D->dest.y; - r->B.x = B->dest.x; - r->B.y = B->dest.y; - r->C.x = C->dest.x; - r->C.y = C->dest.y; - - ConsumePath(B); - ConsumePath(C); - ConsumePath(D); - return(r); -} - -/* -:h2.Font "Hint" Segments - -:h3.Hint() - A Font 'Hint' Segment - -This is temporary code while we experiment with hints. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -struct hintsegment * -Hint(struct XYspace *S, float ref, float width, - char orientation, char hinttype, char adjusttype, char direction, - int label) -{ -/* added reference field of 1 to hintsegment template below 3-26-91 PNM */ - static struct hintsegment template = { HINTTYPE, 0, 1, sizeof(struct hintsegment), 0, - NULL, NULL, { 0, 0 }, { 0, 0 }, { 0, 0 }, - ' ', ' ', ' ', ' ', 0}; - - register struct hintsegment *r; - - r = (struct hintsegment *)Allocate(sizeof(struct hintsegment), &template, 0); - - r->orientation = orientation; - if (width == 0.0) width = 1.0; - - if (orientation == 'h') { - (*S->convert)(&r->ref, S, 0.0, ref); - (*S->convert)(&r->width, S, 0.0, width); - } - else if (orientation == 'v') { - (*S->convert)(&r->ref, S, ref, 0.0); - (*S->convert)(&r->width, S, width, 0.0); - } - else - return((struct hintsegment *)ArgErr("Hint: orient not 'h' or 'v'", NULL, NULL)); - if (r->width.x < 0) r->width.x = - r->width.x; - if (r->width.y < 0) r->width.y = - r->width.y; - r->hinttype = hinttype; - r->adjusttype = adjusttype; - r->direction = direction; - r->label = label; - r->last = (struct segment *) r; - ConsumeSpace(S); - return(r); -} - -/* -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -POP removes the first segment in a path 'p' and Frees it. 'p' is left -pointing to the end of the path: -*/ -#define POP(p) \ - { register struct segment *linkp; \ - linkp = p->link; \ - if (linkp != NULL) \ - linkp->last = p->last; \ - Free(p); \ - p = linkp; } -/* -INSERT inserts a single segment in the middle of a chain. 'b' is -the segment before, 'p' the segment to be inserted, and 'a' the -segment after. -*/ -#define INSERT(b,p,a) b->link=p; p->link=a; p->last=NULL - -/* -:h3.Join() - Join Two Objects Together - -If these are paths, this operator simply invokes the CONCAT macro. -Why so much code then, you ask? Well we have to check for object -types other than paths, and also check for certain path consistency -rules. -*/ - -struct segment * -Join(struct segment *p1, struct segment *p2) -{ -/* -We start with a whole bunch of very straightforward argument tests: -*/ - if (p2 != NULL) { - if (!ISPATHTYPE(p2->type)) { - - if (p1 == NULL) - return((struct segment *)Unique(p2)); - - switch (p1->type) { - - case REGIONTYPE: - - case STROKEPATHTYPE: - p1 = CoercePath(p1); - break; - - default: - return((struct segment *)BegHandle(p1, p2)); - } - } - - ARGCHECK((p2->last == NULL), "Join: right arg not anchor", p2, NULL, (1,p1), struct segment *); - p2 = UniquePath(p2); - -/* -In certain circumstances, we don't have to duplicate a permanent -location. (We would just end up destroying it anyway). These cases -are when 'p2' begins with a move-type segment: -*/ - if (p2->type == TEXTTYPE || p2->type == MOVETYPE) { - if (p1 == NULL) - return(p2); - if (ISLOCATION(p1)) { - p2->dest.x += p1->dest.x; - p2->dest.y += p1->dest.y; - ConsumePath(p1); - return(p2); - } - } - } - else - return((struct segment *)Unique(p1)); - - if (p1 != NULL) { - if (!ISPATHTYPE(p1->type)) - - switch (p2->type) { - - case REGIONTYPE: - - case STROKEPATHTYPE: - p2 = CoercePath(p2); - break; - - default: - return((struct segment *)EndHandle(p1, p2)); - } - - ARGCHECK((p1->last == NULL), "Join: left arg not anchor", p1, NULL, (1,p2), struct segment *); - p1 = UniquePath(p1); - } - else - return(p2); - -/* -At this point all the checking is done. We have two temporary non-null -path types in 'p1' and 'p2'. If p1 ends with a MOVE, and p2 begins with -a MOVE, we collapse the two MOVEs into one. We enforce the rule that -there may not be two MOVEs in a row: -*/ - - if (p1->last->type == MOVETYPE && p2->type == MOVETYPE) { - p1->last->flag |= p2->flag; - p1->last->dest.x += p2->dest.x; - p1->last->dest.y += p2->dest.y; - POP(p2); - if (p2 == NULL) - return(p1); - } -/* -Now we check for another silly rule. If a path has any TEXTTYPEs, -then it must have only TEXTTYPEs and MOVETYPEs, and furthermore, -it must begin with a TEXTTYPE. This rule makes it easy to check -for the special case of text. If necessary, we will coerce -TEXTTYPEs into paths so we don't mix TEXTTYPEs with normal paths. -*/ - if (p1->type == TEXTTYPE) { - if (p2->type != TEXTTYPE && !ISLOCATION(p2)) - p1 = CoerceText(p1); - } - else { - if (p2->type == TEXTTYPE) { - if (ISLOCATION(p1)) { - p2->dest.x += p1->dest.x; - p2->dest.y += p1->dest.y; - Free(p1); - return(p2); - } - else - p2 = CoerceText(p2); - } - } -/* -Thank God! Finally! It's hard to believe, but we are now able to -actually do the join. This is just invoking the CONCAT macro: -*/ - CONCAT(p1, p2); - - return(p1); -} - -/* -:h3.JoinSegment() - Create a Path Segment and Join It to a Known Path - -This internal function is quicker than a full-fledged join because -it can do much less checking. -*/ - -struct segment * -t1_JoinSegment(struct segment *before, /* path to join before new segment */ - int type, /* type of new segment (MOVETYPE or LINETYPE) */ - fractpel x, fractpel y, /* x,y of new segment */ - struct segment *after) /* path to join after new segment */ -{ - register struct segment *r; /* returned path built here */ - - r = PathSegment(type, x, y); - if (before != NULL) { - CONCAT(before, r); - r = before; - } - else - r->context = after->context; - if (after != NULL) - CONCAT(r, after); - return(r); -} - -/* -:h2.Other Path Functions - -*/ - - -struct segment * -t1_ClosePath(struct segment *p0, /* path to close */ - int lastonly) /* flag deciding to close all subpaths or... */ -{ - register struct segment *p,*last = NULL,*start; /* used in looping through path */ - register fractpel x,y; /* current position in path */ - register fractpel firstx = 0,firsty = 0; /* start position of sub path */ - register struct segment *lastnonhint = NULL; /* last non-hint segment in path */ - - if (p0 != NULL && p0->type == TEXTTYPE) - return(UniquePath(p0)); - if (p0->type == STROKEPATHTYPE) - return((struct segment *)Unique(p0)); - /* - * NOTE: a null closed path is different from a null open path - * and is denoted by a closed (0,0) move segment. We make - * sure this path begins and ends with a MOVETYPE: - */ - if (p0 == NULL || p0->type != MOVETYPE) - p0 = JoinSegment(NULL, MOVETYPE, 0, 0, p0); - TYPECHECK("ClosePath", p0, MOVETYPE, NULL, (0), struct segment *); - if (p0->last->type != MOVETYPE) - p0 = JoinSegment(p0, MOVETYPE, 0, 0, NULL); - - p0 = UniquePath(p0); - -/* -We now begin a loop through the path, -incrementing current 'x' and 'y'. We are searching -for MOVETYPE segments (breaks in the path) that are not already closed. -At each break, we insert a close segment. -*/ - for (p = p0, x = y = 0, start = NULL; - p != NULL; - x += p->dest.x, y += p->dest.y, last = p, p = p->link) - { - - if (p->type == MOVETYPE) { - if (start != NULL && (lastonly?p->link==NULL:TRUE) && - !(ISCLOSED(start->flag) && LASTCLOSED(last->flag))) { - register struct segment *r; /* newly created */ - - start->flag |= ISCLOSED(ON); - r = PathSegment(LINETYPE, firstx - x, - firsty - y); - INSERT(last, r, p); - r->flag |= LASTCLOSED(ON); - /*< adjust 'last' if possible for a 0,0 close >*/ -{ - -#define CLOSEFUDGE 3 /* if we are this close, let's change last segment */ - - if (r->dest.x != 0 || r->dest.y != 0) { - if (r->dest.x <= CLOSEFUDGE && r->dest.x >= -CLOSEFUDGE - && r->dest.y <= CLOSEFUDGE && r->dest.y >= -CLOSEFUDGE) { - lastnonhint->dest.x += r->dest.x; - lastnonhint->dest.y += r->dest.y; - r->dest.x = r->dest.y = 0; - } - } -} - if (p->link != NULL) { - p->dest.x += x - firstx; - p->dest.y += y - firsty; - x = firstx; - y = firsty; - } - } - start = p; - firstx = x + p->dest.x; - firsty = y + p->dest.y; - } - else if (p->type != HINTTYPE) - lastnonhint = p; - } - return(p0); -} -/* -*/ -/* -:h2.Reversing the Direction of a Path - -This turned out to be more difficult than I thought at first. The -trickiness was due to the fact that closed paths must remain closed, -etc. - -We need three subroutines: -*/ - -/* break a path at any point */ -static struct segment *SplitPath ( struct segment *anchor, - struct segment *before ); -/* breaks a path after first sub-path */ -static struct segment *DropSubPath ( struct segment *p0 ); -/* reverses a single sub-path */ -static struct segment *ReverseSubPath ( struct segment *p ); - -/* -:h3.Reverse() - User Operator to Reverse a Path - -This operator reverses the entire path. -*/ - -struct segment * -Reverse(struct segment *p) /* full path to reverse */ -{ - register struct segment *r; /* output path built here */ - register struct segment *nextp; /* contains next sub-path */ - - if (p == NULL) - return(NULL); - - ARGCHECK(!ISPATHANCHOR(p), "Reverse: invalid path", p, NULL, (0), struct segment *); - - if (p->type == TEXTTYPE) - p = CoerceText(p); - p = UniquePath(p); - - r = NULL; - - do { - nextp = DropSubPath(p); - p = ReverseSubPath(p); - r = Join(p, r); - p = nextp; - - } while (p != NULL); - - return(r); -} - -/* -:h4.ReverseSubPath() - Subroutine to Reverse a Single Sub-Path -*/ - -static struct segment * -ReverseSubPath(struct segment *p) /* input path */ -{ - register struct segment *r; /* reversed path will be created here */ - register struct segment *nextp; /* temporary variable used in loop */ - register int wasclosed; /* flag, path was closed */ - - if (p == NULL) - return(NULL); - - wasclosed = ISCLOSED(p->flag); - r = NULL; - - do { -/* -First we reverse the direction of this segment and clean up its flags: -*/ - p->dest.x = - p->dest.x; p->dest.y = - p->dest.y; - p->flag &= ~(ISCLOSED(ON) | LASTCLOSED(ON)); - - switch (p->type) { - - case LINETYPE: - case MOVETYPE: - break; - - case CONICTYPE: - { -/* -The logic of this is that the new M point (stored relative to the new -beginning) is (M - C). However, C ("dest") has already been reversed -So, we add "dest" instead of subtracting it: -*/ - register struct conicsegment *cp = (struct conicsegment *) p; - - cp->M.x += cp->dest.x; cp->M.y += cp->dest.y; - } - break; - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) p; - - bp->B.x += bp->dest.x; bp->B.y += bp->dest.y; - bp->C.x += bp->dest.x; bp->C.y += bp->dest.y; - } - break; - - case HINTTYPE: - { - register struct hintsegment *hp = (struct hintsegment *) p; - - hp->ref.x = -hp->ref.x; hp->ref.y = -hp->ref.y; - } - break; - - default: - Abort("Reverse: bad path segment"); - } -/* -We need to reverse the order of segments too, so we break this segment -off of the input path, and tack it on the front of the growing path -in 'r': -*/ - nextp = p->link; - p->link = NULL; - p->last = p; - if (r != NULL) - CONCAT(p,r); /* leaves result in 'p'... not what we want */ - r = p; - p = nextp; /* advance to next segment in input path */ - - } while (p != NULL); - - if (wasclosed) - r = ClosePath(r); - - return(r); -} - -/* -:h4.DropSubPath() - Drops the First Sub-Path Off a Path - -This subroutine returns the remaining sub-path(s). While doing so, it -breaks the input path after the first sub-path so that a pointer to -the original path now contains the first sub-path only. -*/ - -static struct segment * -DropSubPath(struct segment *p0) /* original path */ -{ - register struct segment *p; /* returned remainder here */ - - for (p = p0; p->link != NULL; p = p->link) { - if (p->link->type == MOVETYPE) - break; - } - - return(SplitPath(p0, p)); -} - -static struct segment * -SplitPath(struct segment *anchor, struct segment *before) -{ - register struct segment *r; - - if (before == anchor->last) - return(NULL); - - r = before->link; - r->last = anchor->last; - anchor->last = before; - before->link = NULL; - - return(r); -} - -static void -UnClose(struct segment *p0) -{ - register struct segment *p; - - for (p=p0; p->link->link != NULL; p=p->link) { ; } - - if (!LASTCLOSED(p->link->flag)) - Abort("UnClose: no LASTCLOSED"); - - Free(SplitPath(p0, p)); - p0->flag &= ~ISCLOSED(ON); -} - -/* -:h3.ReverseSubPaths() - Reverse the Direction of Sub-paths Within a Path - -This user operator reverses the sub-paths in a path, but leaves the -'move' segments unchanged. It builds on top of the subroutines -already established. -*/ - -struct segment * -ReverseSubPaths(struct segment *p) /* input path */ -{ - register struct segment *r; /* reversed path will be created here */ - register struct segment *nextp; /* temporary variable used in loop */ - int wasclosed; /* flag; subpath was closed */ - register struct segment *nomove; /* the part of sub-path without move segment */ - struct fractpoint delta; - - if (p == NULL) - return(NULL); - - ARGCHECK(!ISPATHANCHOR(p), "ReverseSubPaths: invalid path", p, NULL, (0), struct segment *); - - if (p->type == TEXTTYPE) - p = CoerceText(p); - if (p->type != MOVETYPE) - p = JoinSegment(NULL, MOVETYPE, 0, 0, p); - - p = UniquePath(p); - - r = NULL; - - for (; p != NULL;) { - nextp = DropSubPath(p); - wasclosed = ISCLOSED(p->flag); - if (wasclosed) - UnClose(p); - - nomove = SplitPath(p, p); - r = Join(r, p); - - PathDelta(nomove, &delta); - - nomove = ReverseSubPath(nomove); - p->dest.x += delta.x; - p->dest.y += delta.y; - if (nextp != NULL) { - nextp->dest.x += delta.x; - nextp->dest.y += delta.y; - } - if (wasclosed) { - nomove = ClosePath(nomove); - nextp->dest.x -= delta.x; - nextp->dest.y -= delta.y; - } - r = Join(r, nomove); - p = nextp; - - } - - return(r); -} - -/* -:h2.Transforming and Putting Handles on Paths - -:h3.PathTransform() - Transform a Path - -Transforming a path involves transforming all the points. In order -that closed paths do not become "unclosed" when their relative -positions are slightly changed due to loss of arithmetic precision, -all point transformations are in absolute coordinates. - -(It might be better to reset the "absolute" coordinates every time a -move segment is encountered. This would mean that we could accumulate -error from subpath to subpath, but we would be less likely to make -the "big error" where our fixed point arithmetic "wraps". However, I -think I'll keep it this way until something happens to convince me -otherwise.) - -The transform is described as a "space", that way we can use our -old friend the "iconvert" function, which should be very efficient. -*/ - -struct segment * -PathTransform(struct segment *p0, /* path to transform */ - struct XYspace *S) /* pseudo space to transform in */ -{ - register struct segment *p; /* to loop through path with */ - register fractpel newx,newy; /* current transformed position in path */ - register fractpel oldx,oldy; /* current untransformed position in path */ - register fractpel savex,savey; /* save path delta x,y */ - - p0 = UniquePath(p0); - - newx = newy = oldx = oldy = 0; - - for (p=p0; p != NULL; p=p->link) { - - savex = p->dest.x; savey = p->dest.y; - - (*S->iconvert)(&p->dest, S, p->dest.x + oldx, p->dest.y + oldy); - p->dest.x -= newx; - p->dest.y -= newy; - - switch (p->type) { - - case LINETYPE: - case MOVETYPE: - break; - - case CONICTYPE: - { - register struct conicsegment *cp = (struct conicsegment *) p; - - (*S->iconvert)(&cp->M, S, cp->M.x + oldx, cp->M.y + oldy); - cp->M.x -= newx; - cp->M.y -= newy; - /* - * Note roundness doesn't change... linear transform - */ - break; - } - - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) p; - - (*S->iconvert)(&bp->B, S, bp->B.x + oldx, bp->B.y + oldy); - bp->B.x -= newx; - bp->B.y -= newy; - (*S->iconvert)(&bp->C, S, bp->C.x + oldx, bp->C.y + oldy); - bp->C.x -= newx; - bp->C.y -= newy; - break; - } - - case HINTTYPE: - { - register struct hintsegment *hp = (struct hintsegment *) p; - - (*S->iconvert)(&hp->ref, S, hp->ref.x + oldx, hp->ref.y + oldy); - hp->ref.x -= newx; - hp->ref.y -= newy; - (*S->iconvert)(&hp->width, S, hp->width.x, hp->width.y); - /* Note: width is not relative to origin */ - break; - } - - case TEXTTYPE: - { - XformText(p,S); - break; - } - - default: - Abort("PathTransform: invalid segment"); - } - oldx += savex; - oldy += savey; - newx += p->dest.x; - newy += p->dest.y; - } - return(p0); -} - -/* -:h3.PathDelta() - Return a Path's Ending Point -*/ - -void -PathDelta(struct segment *p, /* input path */ - struct fractpoint *pt) /* pointer to x,y to set */ -{ - struct fractpoint mypoint; /* I pass this to TextDelta */ - register fractpel x,y; /* working variables for path current point */ - - for (x=y=0; p != NULL; p=p->link) { - x += p->dest.x; - y += p->dest.y; - if (p->type == TEXTTYPE) { - TextDelta(p, &mypoint); - x += mypoint.x; - y += mypoint.y; - } - } - - pt->x = x; - pt->y = y; -} - -/* -:h3.BoundingBox() - Produce a Bounding Box Path - -This function is called by image code, when we know the size of the -image in pels, and need to get a bounding box path that surrounds it. -The starting/ending handle is in the lower right hand corner. -*/ -struct segment * -BoundingBox(pel h, pel w) /* size of box */ -{ - register struct segment *path; - - path = PathSegment(LINETYPE, -TOFRACTPEL(w), 0); - path = JoinSegment(NULL, LINETYPE, 0, -TOFRACTPEL(h), path); - path = JoinSegment(NULL, LINETYPE, TOFRACTPEL(w), 0, path); - path = ClosePath(path); - - return(path); -} - -/* -:h2.Querying Locations and Paths - -:h3.QueryLoc() - Return the X,Y of a Locition -*/ - -void -QueryLoc(struct segment *P, /* location to query, not consumed */ - struct XYspace *S, /* XY space to return coordinates in */ - double *xP, double *yP) /* coordinates returned here */ -{ - if (!ISLOCATION(P)) { - ArgErr("QueryLoc: first arg not a location", P, NULL); - return; - } - if (S->type != SPACETYPE) { - ArgErr("QueryLoc: second arg not a space", S, NULL); - return; - } - UnConvert(S, &P->dest, xP, yP); -} -/* -:h3.QueryPath() - Find Out the Type of Segment at the Head of a Path - -This is a very simple routine that looks at the first segment of a -path and tells the caller what it is, as well as returning the control -point(s) of the path segment. Different path segments have different -number of control points. If the caller knows that the segment is -a move segment, for example, he only needs to pass pointers to return -one control point. -*/ - -void -QueryPath(struct segment *path, /* path to check */ - int *typeP, /* return the type of path here */ - struct segment **Bp, /* return location of first point */ - struct segment **Cp, /* return location of second point */ - struct segment **Dp, /* return location of third point */ - double *fP) /* return Conic sharpness */ -{ - register int coerced = FALSE; /* did I coerce a text path? */ - - if (path == NULL) { - *typeP = -1; - return; - } - if (!ISPATHANCHOR(path)) { - ArgErr("QueryPath: arg not a valid path", path, NULL); - } - if (path->type == TEXTTYPE) { - path = CoerceText(path); - coerced = TRUE; - } - - switch (path->type) { - - case MOVETYPE: - *typeP = 0; - *Bp = PathSegment(MOVETYPE, path->dest.x, path->dest.y); - break; - - case LINETYPE: - *typeP = (LASTCLOSED(path->flag)) ? 4 : 1; - *Bp = PathSegment(MOVETYPE, path->dest.x, path->dest.y); - break; - - case CONICTYPE: - { - register struct conicsegment *cp = (struct conicsegment *) path; - - *typeP = 2; - *Bp = PathSegment(MOVETYPE, cp->M.x, cp->M.y); - *Cp = PathSegment(MOVETYPE, cp->dest.x, cp->dest.y); - *fP = cp->roundness; - } - break; - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) path; - - *typeP = 3; - *Bp = PathSegment(MOVETYPE, bp->B.x, bp->B.y); - *Cp = PathSegment(MOVETYPE, bp->C.x, bp->C.y); - *Dp = PathSegment(MOVETYPE, bp->dest.x, bp->dest.y); - } - break; - - case HINTTYPE: - *typeP = 5; - break; - - default: - Abort("QueryPath: unknown segment"); - } - if (coerced) - KillPath(path); -} -/* -:h3.QueryBounds() - Return the Bounding Box of a Path - -Returns the bounding box by setting the user's variables. -*/ - -void -QueryBounds(struct segment *p0, /* object to check for bound */ - struct XYspace *S, /* coordinate space of returned values */ - double *xminP, /* lower left hand corner (set by routine) */ - double *yminP, - double *xmaxP, /* upper right hand corner (set by routine) */ - double *ymaxP) -{ - register struct segment *path; /* loop variable for path segments */ - register fractpel lastx,lasty; /* loop variables: previous endingpoint */ - register fractpel x,y; /* loop variables: current ending point */ - struct fractpoint min; /* registers to keep lower left hand corner */ - struct fractpoint max; /* registers to keep upper right hand corner */ - int coerced = FALSE; /* we have coerced the path from another object */ - double x1,y1,x2,y2,x3,y3,x4,y4; /* corners of rectangle in space X */ - - if (S->type != SPACETYPE) { - ArgErr("QueryBounds: bad XYspace", S, NULL); - return; - } - - min.x = min.y = max.x = max.y = 0; - if (p0 != NULL) { - if (!ISPATHANCHOR(p0)) { - switch(p0->type) { - case STROKEPATHTYPE: - /* replaced DupStrokePath() with Dup() 3-26-91 PNM */ - p0 = (struct segment *) DoStroke(Dup(p0)); - /* no break here, we have a region in p0 */ - case REGIONTYPE: - p0 = RegionBounds((struct region *)p0); - break; - - case PICTURETYPE: - p0 = PictureBounds(p0); - break; - - default: - ArgErr("QueryBounds: bad object", p0, NULL); - return; - } - coerced = TRUE; - } - if (p0->type == TEXTTYPE) { - /* replaced CopyPath() with Dup() 3-26-91 PNM */ - p0 = (struct segment *)CoerceText(Dup(p0)); /* there are faster ways */ - coerced = TRUE; - } - if (p0->type == MOVETYPE) { - min.x = max.x = p0->dest.x; - min.y = max.y = p0->dest.y; - } - } - lastx = lasty = 0; - - for (path = p0; path != NULL; path = path->link) { - - x = lastx + path->dest.x; - y = lasty + path->dest.y; - - switch (path->type) { - - case LINETYPE: - break; - - case CONICTYPE: - { - register struct conicsegment *cp = (struct conicsegment *) path; - register fractpel Mx = lastx + cp->M.x; - register fractpel My = lasty + cp->M.y; - register fractpel deltax = 0.5 * cp->roundness * cp->dest.x; - register fractpel deltay = 0.5 * cp->roundness * cp->dest.y; - register fractpel Px = Mx - deltax; - register fractpel Py = My - deltay; - register fractpel Qx = Mx + deltax; - register fractpel Qy = My + deltay; - - - if (Mx < min.x) min.x = Mx; - else if (Mx > max.x) max.x = Mx; - if (My < min.y) min.y = My; - else if (My > max.y) max.y = My; - - if (Px < min.x) min.x = Px; - else if (Px > max.x) max.x = Px; - if (Py < min.y) min.y = Py; - else if (Py > max.y) max.y = Py; - - if (Qx < min.x) min.x = Qx; - else if (Qx > max.x) max.x = Qx; - if (Qy < min.y) min.y = Qy; - else if (Qy > max.y) max.y = Qy; - } - break; - - - case MOVETYPE: - /* - * We can't risk adding trailing Moves to the - * bounding box: - */ - if (path->link == NULL) - goto done; /* God forgive me */ - break; - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) path; - register fractpel Bx = lastx + bp->B.x; - register fractpel By = lasty + bp->B.y; - register fractpel Cx = lastx + bp->C.x; - register fractpel Cy = lasty + bp->C.y; - - if (Bx < min.x) min.x = Bx; - else if (Bx > max.x) max.x = Bx; - if (By < min.y) min.y = By; - else if (By > max.y) max.y = By; - - if (Cx < min.x) min.x = Cx; - else if (Cx > max.x) max.x = Cx; - if (Cy < min.y) min.y = Cy; - else if (Cy > max.y) max.y = Cy; - } - break; - - case HINTTYPE: - break; - default: - Abort("QueryBounds: unknown type"); - } - - if (x < min.x) min.x = x; - else if (x > max.x) max.x = x; - if (y < min.y) min.y = y; - else if (y > max.y) max.y = y; - - lastx = x; lasty = y; - } -done: - UnConvert(S, &min, &x1, &y1); - UnConvert(S, &max, &x4, &y4); - x = min.x; min.x = max.x; max.x = x; - UnConvert(S, &min, &x2, &y2); - UnConvert(S, &max, &x3, &y3); - - *xminP = *xmaxP = x1; - if (x2 < *xminP) *xminP = x2; - else if (x2 > *xmaxP) *xmaxP = x2; - if (x3 < *xminP) *xminP = x3; - else if (x3 > *xmaxP) *xmaxP = x3; - if (x4 < *xminP) *xminP = x4; - else if (x4 > *xmaxP) *xmaxP = x4; - - *yminP = *ymaxP = y1; - if (y2 < *yminP) *yminP = y2; - else if (y2 > *ymaxP) *ymaxP = y2; - if (y3 < *yminP) *yminP = y3; - else if (y3 > *ymaxP) *ymaxP = y3; - if (y4 < *yminP) *yminP = y4; - else if (y4 > *ymaxP) *ymaxP = y4; - - if (coerced) - Destroy(p0); -} -/* -:h3.BoxPath() -*/ -struct segment * -BoxPath(struct XYspace *S, int h, int w) -{ - struct segment *path; - - path = Join( Line(ILoc(S, w, 0)), Line(ILoc(S, 0, h)) ); - path = JoinSegment(path, LINETYPE, -path->dest.x, -path->dest.y, NULL); - return(ClosePath(path)); -} - -/* -:h3.DropSegment() - Drop the First Segment in a Path - -This routine takes the path and returns a new path that is one segment -shorter. It can be used in conjunction with QueryPath(), for example, -to ask about an entire path. -*/ - -struct segment * -DropSegment(struct segment *path) -{ - if (path != NULL && path->type == STROKEPATHTYPE) - path = CoercePath(path); - ARGCHECK((path == NULL || !ISPATHANCHOR(path)), - "DropSegment: arg not a non-null path", path, path, (0), struct segment *); - if (path->type == TEXTTYPE) - path = CoerceText(path); - path = UniquePath(path); - - POP(path); - return(path); -} -/* -:h3.HeadSegment() - Return the First Segment in a Path - -This routine takes the path and returns a new path consists of the -first segment only. -*/ - -struct segment * -HeadSegment(struct segment *path) /* input path */ -{ - if (path == NULL) - return(NULL); - if (path->type == STROKEPATHTYPE) - path = CoercePath(path); - ARGCHECK(!ISPATHANCHOR(path), "HeadSegment: arg not a path", path, path, (0), struct segment *); - if (path->type == TEXTTYPE) - path = CoerceText(path); - path = UniquePath(path); - - if (path->link != NULL) - KillPath(path->link); - path->link = NULL; - path->last = path; - return(path); -} - -/* -:h2.Path Debug Routines - -:h3.DumpPath() - Display a Path on the Trace File -*/ - -void -DumpPath(struct segment *p) -{ -} diff --git a/nx-X11/lib/font/Type1/paths.h b/nx-X11/lib/font/Type1/paths.h deleted file mode 100644 index b61275b9c..000000000 --- a/nx-X11/lib/font/Type1/paths.h +++ /dev/null @@ -1,239 +0,0 @@ -/* $Xorg: paths.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/paths.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ - -/*SHARED*/ - -#define Loc(S,x,y) t1_Loc(S,(double)x,(double)y) -#define ILoc(S,x,y) t1_ILoc(S,x,y) -#define Line(P) t1_Line(P) -#define Join(p1,p2) t1_Join(p1,p2) -#define ClosePath(p) t1_ClosePath(p,0) -#define CloseLastSubPath(p) t1_ClosePath(p,1) -#define Conic(B,C,s) t1_Conic(B,C,(double)s) -#define RoundConic(M,C,r) t1_RoundConic(M,C,(double)r) -#define ArcP3(S,P2,P3) t1_ArcP3(S,P2,P3) -#define ArcCA(S,C,d) t1_ArcCA(S,C,(double)d) -#define Bezier(B,C,D) t1_Bezier(B,C,D) -#define Hint(S,r,w,o,h,a,d,l) t1_Hint(S,r,w,o,h,a,d,l) -#define Reverse(p) t1_Reverse(p) -#define ReverseSubPaths(p) t1_ReverseSubPaths(p) -#define AddLoc(p1,p2) t1_Join(p1,p2) -#define SubLoc(p1,p2) t1_SubLoc(p1,p2) -#define DropSegment(p) t1_DropSegment(p) -#define HeadSegment(p) t1_HeadSegment(p) -#define QueryLoc(P,S,x,y) t1_QueryLoc(P,S,x,y) -#define QueryPath(p,t,B,C,D,r) t1_QueryPath(p,t,B,C,D,r) -#define QueryBounds(p,S,x1,y1,x2,y2) t1_QueryBounds(p,S,x1,y1,x2,y2) - - -/* create a location object (or "move" segment) */ -extern struct segment *t1_Loc ( struct XYspace *S, double x, double y ); -/* integer argument version of same */ -extern struct segment *t1_ILoc ( struct XYspace *S, int x, int y ); -/* straight line path segment */ -extern struct segment *t1_Line ( struct segment *P ); -/* join two paths or regions together */ -extern struct segment *t1_Join ( struct segment *p1, struct segment *p2 ); -/* close a path or path set */ -extern struct segment *t1_ClosePath ( struct segment *p0, int lastonly ); -#if 0 -struct conicsegment *t1_Conic(); /* conic curve path segment */ - -struct conicsegment *t1_RoundConic(); /* ditto, specified another way */ -struct conicsegment *t1_ArcP3(); /* circular path segment with three points */ -struct conicsegment *t1_ArcCA(); /* ditto, with center point and angle */ -#endif -/* Bezier third order curve path segment */ -extern struct beziersegment *t1_Bezier ( struct segment *B, struct segment *C, - struct segment *D ); -/* produce a font 'hint' path segment */ -extern struct hintsegment *t1_Hint ( struct XYspace *S, float ref, float width, - char orientation, char hinttype, - char adjusttype, char direction, - int label ); -/* reverse the complete order of paths */ -extern struct segment *t1_Reverse ( struct segment *p ); -/* reverse only sub-paths; moves unchanged */ -extern struct segment *t1_ReverseSubPaths ( struct segment *p ); -/* subtract two location objects */ -extern struct segment *t1_SubLoc ( struct segment *p1, struct segment *p2 ); -/* Drop the first segment in a path */ -extern struct segment *t1_DropSegment ( struct segment *path ); -/* return the first segment in a path */ -extern struct segment *t1_HeadSegment ( struct segment *path ); -/* Query location; return its (x,y) */ -extern void t1_QueryLoc ( struct segment *P, struct XYspace *S, double *xP, - double *yP ); -/* Query segment at head of a path */ -extern void t1_QueryPath ( struct segment *path, int *typeP, - struct segment **Bp, struct segment **Cp, - struct segment **Dp, double *fP ); -/* Query the bounding box of a path */ -extern void t1_QueryBounds ( struct segment *p0, struct XYspace *S, - double *xminP, double *yminP, - double *xmaxP, double *ymaxP ); - -/*END SHARED*/ -/*SHARED*/ - -#define CopyPath(p) t1_CopyPath(p) -#define KillPath(p) t1_KillPath(p) -#define PathTransform(p,m) t1_PathXform(p,m) -#define PathDelta(p,pt) t1_PathDelta(p,pt) -#define BoundingBox(h,w) t1_BoundingBox(h,w) -#define PathSegment(t,x,y) t1_PathSegment(t,(fractpel)x,(fractpel)y) -#define JoinSegment(b,t,x,y,a) t1_JoinSegment(b,t,(fractpel)x,(fractpel)y,a) -#define Hypoteneuse(dx,dy) t1_Hypoteneuse(dx,dy) -#define BoxPath(S,h,w) t1_BoxPath(S,h,w) - -/* duplicate a path */ -extern struct segment *t1_CopyPath ( struct segment *p0 ); -/* destroy a path */ -extern void t1_KillPath ( struct segment *p ); -/* transform a path arbitrarily */ -extern struct segment *t1_PathXform ( struct segment *p0, struct XYspace *S ); -/* calculate the ending point of a path */ -extern void t1_PathDelta ( struct segment *p, struct fractpoint *pt ); -/* */ -extern struct segment *t1_BoundingBox ( pel h, pel w ); -/* produce a MOVE or LINE segment */ -extern struct segment *t1_PathSegment ( int type, fractpel x, fractpel y ); -/* join a MOVE or LINE segment to a path */ -extern struct segment *t1_JoinSegment ( struct segment *before, int type, fractpel x, fractpel y, struct segment *after ); -#if 0 -double t1_Hypoteneuse(); /* returns the length of a line */ -#endif -/* returns a rectangular path */ -extern struct segment *t1_BoxPath ( struct XYspace *S, int h, int w ); - -/*END SHARED*/ -/*SHARED*/ - -#define ConsumePath(p) MAKECONSUME(p,KillPath(p)) -#define UniquePath(p) MAKEUNIQUE(p,CopyPath(p)) - -/*END SHARED*/ -/*SHARED*/ - -struct segment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - unsigned char size; /* size of the structure */ - unsigned char context; /* index to device context */ - struct segment *link; /* pointer to next structure in linked list */ - struct segment *last; /* pointer to last structure in list */ - struct fractpoint dest; /* relative ending location of path segment */ -} ; - -#define ISCLOSED(flag) ((flag)&0x80) /* subpath is closed */ -#define LASTCLOSED(flag) ((flag)&0x40) /* last segment in closed subpath */ - -/* -NOTE: The ISCLOSED flag is set on the MOVETYPE segment before the -subpath proper; the LASTCLOSED flag is set on the last segment (LINETYPE) -in the subpath - -We define the ISPATHANCHOR predicate to test that a path handle -passed by the user is valid: -*/ - -#define ISPATHANCHOR(p) (ISPATHTYPE(p->type)&&p->last!=NULL) - -/* -For performance reasons, a user's "location" object is identical to -a path whose only segment is a move segment. We define a predicate -to test for this case. See also :hdref refid=location.. -*/ - -#define ISLOCATION(p) ((p)->type == MOVETYPE && (p)->link == NULL) - -/*END SHARED*/ -/*SHARED*/ - -struct conicsegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = CONICTYPE */ - unsigned char size; /* as with any 'segment' type */ - unsigned char context; /* as with any 'segment' type */ - struct segment *link; /* as with any 'segment' type */ - struct segment *last; /* as with any 'segment' type */ - struct fractpoint dest; /* Ending point (C point) */ - struct fractpoint M; /* "midpoint" of conic explained above */ - float roundness; /* explained above */ -} ; -/*END SHARED*/ -/*SHARED*/ - -struct beziersegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = BEZIERTYPE */ - unsigned char size; /* as with any 'segment' type */ - unsigned char context; /* as with any 'segment' type */ - struct segment *link; /* as with any 'segment' type */ - struct segment *last; /* as with any 'segment' type */ - struct fractpoint dest; /* ending point (D) */ - struct fractpoint B; /* control point B */ - struct fractpoint C; /* control point C */ -} ; - -/*END SHARED*/ -/*SHARED*/ - -struct hintsegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = HINTTYPE */ - unsigned char size; /* size of the structure */ - unsigned char context; /* device context */ - struct segment *link; /* pointer to next structure in linked list */ - struct segment *last; /* pointer to last structure in list */ - struct fractpoint dest; /* ALWAYS 0,0 */ - struct fractpoint ref; - struct fractpoint width; - char orientation; - char hinttype; - char adjusttype; - char direction; - int label; -} ; - -/*END SHARED*/ -/*SHARED*/ - -/* -CONCAT links the 'p2' path chain on the end of the 'p1' chain. (This macro -is also used by the STROKES module.) -*/ -#define CONCAT(p1, p2) { \ - p1->last->link = p2; /* link p2 on end of p1 */ \ - p1->last = p2->last; /* last of new is last of p2 */ \ - p2->last = NULL; } /* only first segment has non-NULL "last" */ - -/*END SHARED*/ -/* dump a path list */ -extern void t1_DumpPath ( struct segment *p ); diff --git a/nx-X11/lib/font/Type1/pictures.h b/nx-X11/lib/font/Type1/pictures.h deleted file mode 100644 index 0abc715ce..000000000 --- a/nx-X11/lib/font/Type1/pictures.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Xorg: pictures.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/pictures.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ - -/* STUB */ - -#define CopyPicture(p) p -#define UniquePicture(p) p -#define KillPicture(p) -#define BegHandle(o,m) o -#define EndHandle(o,m) o -#define PictureBounds(P) P - -struct picture { - struct fractpoint origin; - struct fractpoint ending; -}; - -#define Phantom(o) t1_Phantom(o) -#define Snap(o) t1_Snap(o) - -extern struct segment *t1_Phantom ( struct segment *p ); -extern struct segment *t1_Snap ( struct segment *p ); diff --git a/nx-X11/lib/font/Type1/range.h b/nx-X11/lib/font/Type1/range.h deleted file mode 100644 index 496f000da..000000000 --- a/nx-X11/lib/font/Type1/range.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#define CID_NAME_MAX 255 /* max # of characters in a file name */ -#define CID_PATH_MAX 1024 /* max # of characters in a path name */ - -typedef struct spacerange_code { - unsigned int srcCodeLo; - unsigned int srcCodeHi; -} spacerangecode; - -typedef struct space_range { - struct space_range *next; - int rangecnt; - struct spacerange_code *spacecode; -} spacerange; - -typedef struct cidrange_code { - unsigned int srcCodeLo; - unsigned int srcCodeHi; - unsigned int dstCIDLo; -} cidrangecode; - -typedef struct cid_range { - struct cid_range *next; - int rangecnt; - struct cidrange_code *range; -} cidrange; -#endif diff --git a/nx-X11/lib/font/Type1/regions.c b/nx-X11/lib/font/Type1/regions.c deleted file mode 100644 index f8875dafb..000000000 --- a/nx-X11/lib/font/Type1/regions.c +++ /dev/null @@ -1,1651 +0,0 @@ -/* $Xorg: regions.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/regions.c,v 3.8tsi Exp $ */ - /* REGIONS CWEB V0023 LOTS */ -/* -:h1 id=regions.REGIONS Module - Regions Operator Handler - -This module is responsible for creating and manipulating regions. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "curves.h" -#include "lines.h" -#include "pictures.h" -#include "fonts.h" -#include "hints.h" -#include "strokes.h" /* to pick up 'DoStroke' */ - - -static void newfilledge ( struct region *R, fractpel xmin, fractpel xmax, - fractpel ymin, fractpel ymax, int isdown ); -static struct edgelist *splitedge ( struct edgelist *list, pel y ); -static void vertjoin ( struct edgelist *top, struct edgelist *bottom ); -static int touches ( int h, pel *left, pel *right ); -static int crosses ( int h, pel *left, pel *right ); -static void edgemin ( int h, pel *e1, pel *e2 ); -static void edgemax ( int h, pel *e1, pel *e2 ); -static struct edgelist *NewEdge ( pel xmin, pel xmax, pel ymin, pel ymax, - pel *xvalues, int isdown ); -static struct edgelist *swathxsort ( struct edgelist *before0, - struct edgelist *edge ); -/* -:h3.Functions Provided to the TYPE1IMAGER User - -This module provides the following TYPE1IMAGER entry points: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry points to other modules: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Macros Provided to Other Modules - -:h4.GOING_TO() - Macro Predicate Needed for Changing Direction, Etc. - -The actual generation of run end lists (edge boundaries) is left -to the low level rasterizing modules, LINES and CURVES. There -are some global region-type -questions that occur when doing a low-level -rasterization: -:ol. -:li.Did we just change direction in Y and therefore need to start -a new edge? -:li.Did we run out of allocated edge space? -:li.Do the minimum or maximum X values for the current edge need -updating? -:eol. -In general the REGIONS is not smart enough to answer those questions -itself. (For example, determining if and when a curve changes direction -may need detailed curve knowledge.) Yet, this must be done efficiently. -We provide a macro "GOING_TO" where the invoker tells us where it is -heading for (x2,y2), plus where it is now (x1,y1), plus the current -region under construction, and the macro answers the questions above. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h2.Data Structures Used to Represent Regions - -:h3.The "region" Structure - -The region structure is an anchor for a linked list of "edgelist" -structures (see :hdref refid=edgelist..). It also summarizes the -information in the edgelist structures (for example, the bounding -box of the region). And, it contains scratch areas used during -the creation of a region. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -The ISOPTIMIZED flag tells us if we've put a permanent region in -'optimal' form. -*/ -#define ISOPTIMIZED(flag) ((flag)&0x10) - -/* -The ISRECTANGULAR flag tells us if a region is a rectangle. We don't -always notice rectangles--if this flag is set, the region definitely -is a rectangle, but some rectangular regions will not have the flag -set. The flag is used to optimize some paths. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h4."TT_INFINITY" - A Constant Region Structure of Infinite Extent - -Infinity is the complement of a null area: -Note - removed the refcount = 1 init, replaced with references = 2 3-26-91 PNM -*/ -static struct region _infinity = { REGIONTYPE, - ISCOMPLEMENT(ON)+ISINFINITE(ON)+ISPERMANENT(ON)+ISIMMORTAL(ON), 2, - {0, 0}, {0, 0}, - 0, 0, 0, 0, - NULL, NULL, - 0, 0, 0, 0, 0, NULL, NULL, - NULL, 0, NULL, NULL }; -struct region *TT_INFINITY = &_infinity; - -/* -:h4."EmptyRegion" - A Region Structure with Zero Area - -This structure is used to initialize the region to be built in -Interior(): -Note - replaced refcount = 1 init with references = 2 3-26-91 PNM -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -struct region EmptyRegion = { REGIONTYPE, - ISPERMANENT(ON)+ISIMMORTAL(ON), 2, - {0, 0}, {0, 0}, - MAXPEL, MAXPEL, MINPEL, MINPEL, - NULL, NULL, - 0, 0, 0, 0, 0, NULL, NULL, - NULL, 0, NULL, NULL }; - -/* -:h3 id=edgelist.The "edgelist" Structure - -Regions are represented by a linked list of 'edgelist' structures. -When a region is complete, the structures are paired, one for the -left and one for the right edge. While a region is being built, -this rule may be violated temporarily. - -An 'edgelist' structure contains the X values for a given span -of Y values. The (X,Y) pairs define an edge. We use the crack -and edge coordinate system, so that integer values of X and Y -go between pels. The edge is defined between the minimum Y and -maximum Y. - -The linked list is kept sorted from top to bottom, that is, in -increasing y. Also, if 'e1' is an edgelist structure and 'e2' is the -next one in the list, they must have exactly the same ymin,ymax values -or be totally disjoint. These two requirements mean that if e2's ymin -is less than e1's ymax, it must be exactly equal to e1's ymin. A -sublist of structures with identical ymin and ymax values is called a -'swath'. - -In addition, edgelist structures are separately linked together based -on what subpath originally created them; each subpath is kept as a -separate circular linked list. This information is ignored unless -continuity checking is invoked. See :hdref refid=subpath. for a -complete description of this. -*/ - - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -The "edgelist" structure follows the convention of TYPE1IMAGER user -objects, having a type field and a flag field as the first two -elements. However, the user never sees "edgelist" structures -directly; he is given handles to "region" structures only. - -By having a type field, we can use the "copy" feature of Allocate() -to duplicate edge lists quickly. - -We also define two flag bits for this structure. The ISDOWN bit is set -if the edge is going in the direction of increasing Y. The ISAMBIGUOUS -bit is set if the edge is identical to its neighbor (edge->link); such -edges may be "left" when they should be "right", or vice versa, -unnecessarily confusing the continuity checking logic. The FixSubPaths() -routine in HINTS will swap ambiguous edges if that avoids crossing edges; -see :hdref refid=fixsubp.. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.KillRegion() - Destroys a Region - -KillRegion nominally just decrements the reference count to that region. -If the reference count becomes 0, all memory associated with it is -freed. We just follow the linked list, freeing as we go, then kill any -associated (thresholded) picture. -Note - added conditional return based on references 3-26-91 PNM -*/ - -void -KillRegion(struct region *area) /* area to free */ -{ - register struct edgelist *p; /* loop variable */ - register struct edgelist *next; /* loop variable */ - - if (area->references < 0) - Abort("KillRegion: negative reference count"); - if ( (--(area->references) > 1) || - ( (area->references == 1) && !ISPERMANENT(area->flag) ) ) - return; - - for (p=area->anchor; p != NULL; p=next) { - next = p->link; - Free(p); - } - if (area->thresholded != NULL) - KillPicture(area->thresholded); - Free(area); -} -/* -:h3.CopyRegion() - Makes a Copy of a Region -*/ -struct region * -CopyRegion(struct region *area) /* region to duplicate */ -{ - register struct region *r; /* output region built here */ - register struct edgelist *last = NULL; /* loop variable */ - register struct edgelist *p,*newp; /* loop variables */ - - r = (struct region *)Allocate(sizeof(struct region), area, 0); - r->anchor = NULL; - - for (p=area->anchor; VALIDEDGE(p); p=p->link) { - - newp = NewEdge(p->xmin, p->xmax, p->ymin, p->ymax, p->xvalues, ISDOWN(p->flag)); - if (r->anchor == NULL) - r->anchor = last = newp; - else - last->link = newp; - - last = newp; - } - if (area->thresholded != NULL) - /* replaced DupPicture with Dup() 3-26-91 PNM */ - r->thresholded = (struct picture *)Dup(area->thresholded); - return(r); -} -/* -:h4.NewEdge() - Allocates and Returns a New "edgelist" Structure - -We allocate space for the X values contiguously with the 'edgelist' -structure that locates them. That way, we only have to free the -edgelist structure to free all memory associated with it. Damn -clever, huh? -*/ - -static struct edgelist * -NewEdge(pel xmin, pel xmax, /* X extent of edge */ - pel ymin, pel ymax, /* Y extent of edge */ - pel *xvalues, /* list of X values for entire edge */ - int isdown) /* flag: TRUE means edge progresses downward */ -{ - static struct edgelist template = { - EDGETYPE, 0, 1, NULL, NULL, - 0, 0, 0, 0, NULL }; - - register struct edgelist *r; /* returned structure */ - register int iy; /* ymin adjusted for 'long' alignment purposes */ - - if (ymin >= ymax) - Abort("newedge: height not positive"); -/* -We are going to copy the xvalues into a newly allocated area. It -helps performance if the values are all "long" aligned. We can test -if the xvalues are long aligned by ANDing the address with the -(sizeof(long) - 1)--if non zero, the xvalues are not aligned well. We -set 'iy' to the ymin value that would give us good alignment: -*/ - iy = ymin - (((unsigned long)xvalues) & (sizeof(long)-1)) / sizeof(pel); - - r = (struct edgelist *)Allocate(sizeof(struct edgelist), &template, - (ymax - iy) * sizeof(pel)); - - if (isdown) r->flag = ISDOWN(ON); - r->xmin = xmin; - r->xmax = xmax; - r->ymin = ymin; - r->ymax = ymax; - - r->xvalues = (pel *) FOLLOWING(r); - if (ymin != iy) { - r->xvalues += ymin - iy; - xvalues -= ymin - iy; - } - -/* -We must round up (ymax - iy) so we get the ceiling of the number of -longs. The destination must be able to hold these extra bytes because -Allocate() makes everything it allocates be in multiples of longs. -*/ - LONGCOPY(&r[1], xvalues, (ymax - iy) * sizeof(pel) + sizeof(long) - 1); - - return(r); -} - -/* -:h3 id=discard.discard() - Discard All Edges Between Two Edges - -At first glance it would seem that we could discard an edgelist -structure merely by unlinking it from the list and freeing it. You are -wrong, region-breath! For performance, the X values associated with an -edge are allocated contiguously with it. So, we free the X values when -we free a structure. However, once an edge has been split, we are no -longer sure which control block actually is part of the memory block -that contains the edges. Rather than trying to decide, we play it safe -and never free part of a region. - -So, to mark a 'edgelist' structure as discarded, we move it to the end -of the list and set ymin=ymax. -*/ - -static void -discard(struct edgelist *left, /* all edges between here exclusive */ - struct edgelist *right) /* should be discarded */ -{ - register struct edgelist *beg,*end,*p; - - beg = left->link; - if (beg == right) - return; - - for (p = beg; p != right; p = p->link) { - if (p->link == NULL && right != NULL) - Abort("discard(): ran off end"); - p->ymin = p->ymax = 32767; - end = p; - } - /* - * now put the chain beg/end at the end of right, if it is not - * already there: - */ - if (right != NULL) { - left->link = right; - while (right->link != NULL) - right = right->link; - right->link = beg; - } - end->link = NULL; -} - -/* -:h4.Unwind() - Discards Edges That Fail the Winding Rule Test - -The winding rule says that upward going edges should be paired with -downward going edges only, and vice versa. So, if two upward edges -or two downward edges are nominally left/right pairs, Unwind() should -discard the second one. Everything should balance; we should discard -an even number of edges; of course, we abort if we don't. -*/ -static void -Unwind(struct edgelist *area) /* input area modified in place */ -{ - register struct edgelist *last = NULL,*next; /* struct before and after current one */ - register int y; /* ymin of current swath */ - register int count,newcount; /* winding count registers */ - - while (VALIDEDGE(area)) { - - count = 0; - y = area->ymin; - - do { - next = area->link; - - if (ISDOWN(area->flag)) - newcount = count + 1; - else - newcount = count - 1; - - if (count == 0 || newcount == 0) - last = area; - else - discard(last, next); - - count = newcount; - area = next; - - } while (area != NULL && area->ymin == y); - - if (count != 0) - Abort("Unwind: uneven edges"); - } -} -/* -:h2.Building Regions - -:h3.Interior() - Iterate Through a Path, Building a Region - -This routine is the workhorse driver routine that iterates through a -path, calling the appropriate stepping routines to actually produce the -run end "edgelist" structures. - -:ol. -:li."Interior" calls StepLine or StepConic or StepBezier as appropriate -to produce run ends. -:li.Occasionally these routines will notice a change in Y direction -and will call ChangeDirection (through the GOING_TO macro); this is -a call back to the REGIONS module. -:li.ChangeDirection will call whatever function is in the region -structure; for Interior, this function is 'newfilledge'. -:li.Newfilledge will call NewEdge to create a new edgelist structure, -then, call SortSwath to sort it onto the linked list being built at -the region "anchor". -:eol. - -By making the function called by ChangeDirection be a parameter of the -region, we allow the same ChangeDirection logic to be used by stroking. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -struct region * -Interior(struct segment *p, /* take interior of this path */ - int fillrule) /* rule to follow if path crosses itself */ -{ - register fractpel x,y; /* keeps ending point of path segment */ - fractpel lastx,lasty; /* previous x,y from path segment before */ - register struct region *R; /* region I will build */ - register struct segment *nextP; /* next segment of path */ - struct fractpoint hint; /* accumulated hint value */ - char tempflag; /* flag; is path temporary? */ - char Cflag; /* flag; should we apply continuity? */ - - if (p == NULL) - return(NULL); -/* -Establish the 'Cflag' continuity flag based on user's fill rule and -our own 'Continuity' pragmatic (0: never do continuity, 1: do what -user asked, >1: do it regardless). -*/ - if (fillrule > 0) { - Cflag = Continuity > 0; - fillrule -= CONTINUITY; - } - else - Cflag = Continuity > 1; - - ARGCHECK((fillrule != WINDINGRULE && fillrule != EVENODDRULE), - "Interior: bad fill rule", NULL, NULL, (1,p), struct region *); - - if (p->type == TEXTTYPE) -/* if (fillrule != EVENODDRULE) - else */ - return((struct region *)UniquePath(p)); - if (p->type == STROKEPATHTYPE) { - if (fillrule == WINDINGRULE) - return((struct region *)DoStroke(p)); - else - p = CoercePath(p); - } - - R = (struct region *)Allocate(sizeof(struct region), &EmptyRegion, 0); - - ARGCHECK(!ISPATHANCHOR(p), "Interior: bad path", p, R, (0), struct region *); - ARGCHECK((p->type != MOVETYPE), "Interior: path not closed", p, R, (0), struct region *); - - -/* changed definition from !ISPERMANENT to references <= 1 3-26-91 PNM */ - tempflag = (p->references <= 1); /* only first segment in path is so marked */ - if (!ISPERMANENT(p->flag)) p->references -= 1; - - R->newedgefcn = newfilledge; -/* -Believe it or not, "R" is now completely initialized. We are counting -on the copy of template to get other fields the way we want them, -namely -:ol. -:li.anchor = NULL -:li.xmin, ymin, xmax, ymax, to minimum and maximum values respectively. -:eol. -Anchor = NULL is very -important to ChangeDirection. -See :hdref refid=CD.. - -To minimize problems of "wrapping" in our pel arithmetic, we keep an -origin of the region which is the first move. Hopefully, that keeps -numbers within plus or minus 32K pels. -*/ - R->origin.x = 0/*TOFRACTPEL(NEARESTPEL(p->dest.x))*/; - R->origin.y = 0/*TOFRACTPEL(NEARESTPEL(p->dest.y))*/; - lastx = - R->origin.x; - lasty = - R->origin.y; -/* -ChangeDirection initializes other important fields in R, such as -lastdy, edge, edgeYstop, edgexmin, and edgexmax. The first segment -is a MOVETYPE, so it will be called first. -*/ -/* -The hints data structure must be initialized once for each path. -*/ - - if (ProcessHints) - InitHints(); /* initialize hint data structure */ - - while (p != NULL) { - - x = lastx + p->dest.x; - y = lasty + p->dest.y; - - nextP = p->link; - -/* -Here we start the hints processing by initializing the hint value to -zero. If ProcessHints is FALSE, the value will remain zero. -Otherwise, hint accumulates the computed hint values. -*/ - - hint.x = hint.y = 0; - -/* -If we are processing hints, and this is a MOVE segment (other than -the first on the path), we need to close (reverse) any open hints. -*/ - - if (ProcessHints) - if ((p->type == MOVETYPE) && (p->last == NULL)) { - CloseHints(&hint); - } - -/* -Next we run through all the hint segments (if any) attached to this -segment. If ProcessHints is TRUE, we will accumulate computed hint -values. In either case, nextP will be advanced to the first non-HINT -segment (or NULL), and each hint segment will be freed if necessary. -*/ - - while ((nextP != NULL) && (nextP->type == HINTTYPE)) { - if (ProcessHints) - ProcessHint((struct hintsegment *)nextP, - x + hint.x, y + hint.y, &hint); - - { - register struct segment *saveP = nextP; - - nextP = nextP->link; - if (tempflag) - Free(saveP); - } - } - -/* -We now apply the full hint value to the ending point of the path segment. -*/ - - x += hint.x; - y += hint.y; - - switch(p->type) { - - case LINETYPE: - StepLine(R, lastx, lasty, x, y); - break; - - case CONICTYPE: - { - -/* -For a conic curve, we apply half the hint value to the conic midpoint. -*/ - - } - break; - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) p; - -/* -For a Bezier curve, we apply the full hint value to the Bezier C point. -*/ - - StepBezier(R, lastx, lasty, - lastx + bp->B.x, lasty + bp->B.y, - lastx + bp->C.x + hint.x, - lasty + bp->C.y + hint.y, - x, y); - } - break; - - case MOVETYPE: -/* -At this point we have encountered a MOVE segment. This breaks the -path, making it disjoint. -*/ - if (p->last == NULL) /* i.e., not first in path */ - ChangeDirection(CD_LAST, R, lastx, lasty, (fractpel) 0); - - ChangeDirection(CD_FIRST, R, x, y, (fractpel) 0); -/* -We'll just double check for closure here. We forgive an appended -MOVETYPE at the end of the path, if it isn't closed: -*/ - if (!ISCLOSED(p->flag) && p->link != NULL) - return((struct region *)ArgErr("Fill: sub-path not closed", p, NULL)); - break; - - default: - Abort("Interior: path type error"); - } -/* -We're done with this segment. Advance to the next path segment in -the list, freeing this one if necessary: -*/ - lastx = x; lasty = y; - - if (tempflag) - Free(p); - p = nextP; - } - ChangeDirection(CD_LAST, R, lastx, lasty, (fractpel) 0); - R->ending.x = lastx; - R->ending.y = lasty; -/* -Finally, clean up the region's based on the user's 'fillrule' request: -*/ - if (Cflag) - ApplyContinuity(R); - if (fillrule == WINDINGRULE) - Unwind(R->anchor); - return(R); -} -/* -:h3."workedge" Array - -This is a statically allocated array where edges are built -before being copied into more permanent storage by NewEdge(). -*/ - -#ifndef MAXEDGE -#define MAXEDGE 1000 -#endif - -static pel workedge[MAXEDGE]; -static pel *currentworkarea = workedge; -static pel currentsize = MAXEDGE; - -/* -:h3 id=cd.ChangeDirection() - Called When Y Direction Changes - -The rasterizing routines call this entry point when they detect -a change in Y. We then build the current edge and sort it into -emerging edgelist at 'anchor' by calling whatever "newedgefcn" -is appropriate. -*/ - -void -ChangeDirection(int type, /* CD_FIRST, CD_CONTINUE, or CD_LAST */ - struct region *R, /* region in which we are changing direction */ - fractpel x, fractpel y, /* current beginning x,y */ - fractpel dy) /* direction and magnitude of change in y */ -{ - register fractpel ymin,ymax; /* minimum and maximum Y since last call */ - register pel iy; /* nearest integer pel to 'y' */ - register pel idy; /* nearest integer pel to 'dy' */ - register int ydiff; /* allowed Y difference in 'currentworkarea' */ - - if (type != CD_FIRST) { - - if (R->lastdy > 0) { - ymin = R->firsty; - ymax = y; - } - else { - ymin = y; - ymax = R->firsty; - } - - if (ymax < ymin) - Abort("negative sized edge?"); - - - (*R->newedgefcn)(R, R->edgexmin, R->edgexmax, ymin, ymax, - R->lastdy > 0); - - } - - R->firsty = y; - R->firstx = x; - R->lastdy = dy; - - iy = NEARESTPEL(y); - idy = NEARESTPEL(dy); - if (currentworkarea != workedge && idy < MAXEDGE && idy > -MAXEDGE) { - NonObjectFree(currentworkarea); - currentworkarea = workedge; - currentsize = MAXEDGE; - } - ydiff = currentsize - 1; - if (dy > 0) { - R->edge = ¤tworkarea[-iy]; - R->edgeYstop = TOFRACTPEL(ydiff + iy) + FPHALF; - } - else { - R->edge = ¤tworkarea[ydiff - iy]; - R->edgeYstop = TOFRACTPEL(iy - ydiff) - FPHALF; - } - R->edgexmax = R->edgexmin = x; -/* -If this is the end of a subpath, we complete the subpath circular -chain: -*/ - if (type == CD_LAST && R->lastedge != NULL) { - register struct edgelist *e = R->firstedge; - - while (e->subpath != NULL) - e = e->subpath; - e->subpath = R->lastedge; - R->lastedge = R->firstedge = NULL; - } -} -/* -:h3 id=newfill.newfilledge() - Called When We Have a New Edge While Filling - -This is the prototypical "newedge" function passed to "Rasterize" and -stored in "newedgefcn" in the region being built. - -If the edge is non-null, we sort it onto the list of edges we are -building at "anchor". - -This function also has to keep the bounding box of the region -up to date. -*/ - -static void -newfilledge(struct region *R, /* region being built */ - fractpel xmin, fractpel xmax, /* X range of this edge */ - fractpel ymin, fractpel ymax, /* Y range of this edge */ - int isdown) /* flag: TRUE means edge goes down, else up */ -{ - - register pel pelxmin,pelymin,pelxmax,pelymax; /* pel versions of bounds */ - register struct edgelist *edge; /* newly created edge */ - - pelymin = NEARESTPEL(ymin); - pelymax = NEARESTPEL(ymax); - if (pelymin == pelymax) - return; - - pelxmin = NEARESTPEL(xmin); - pelxmax = NEARESTPEL(xmax); - - if (pelxmin < R->xmin) R->xmin = pelxmin; - if (pelxmax > R->xmax) R->xmax = pelxmax; - if (pelymin < R->ymin) R->ymin = pelymin; - if (pelymax > R->ymax) R->ymax = pelymax; - - edge = NewEdge(pelxmin, pelxmax, pelymin, pelymax, &R->edge[pelymin], isdown); - edge->subpath = R->lastedge; - R->lastedge = edge; - if (R->firstedge == NULL) - R->firstedge = edge; - - R->anchor = SortSwath(R->anchor, edge, swathxsort); - -} - -/* -:h2.Sorting Edges - -:h3.SortSwath() - Vertically Sort an Edge into a Region - -This routine sorts an edge or a pair of edges into a growing region, -so that the region maintains its top-to-bottom, left-to-right form. -The rules for sorting horizontally may vary depending on what you -are doing, but the rules for vertical sorting are always the same. -This routine is passed an argument that is a function that will -perform the horizontal sort on demand (for example, swathxsort() or -SwathUnion()). - -This is a recursive routine. A new edge (or edge pair) may overlap -the list I am building in strange and wonderful ways. Edges may -cross. When this happens, my strategy is to split the incoming edge -(or the growing list) in two at that point, execute the actual sort on -the top part of the split, and recursively call myself to figure out -exactly where the bottom part belongs. -*/ - -#define TOP(e) ((e)->ymin) /* the top of an edge (for readability */ -#define BOTTOM(e) ((e)->ymax) /* the bottom of an edge (for readability */ - -struct edgelist * -SortSwath(struct edgelist *anchor, /* list being built */ - struct edgelist *edge, /* incoming edge or pair of edges */ - SwathFunc swathfcn) /* horizontal sorter */ -{ - register struct edgelist *before,*after; - struct edgelist base; - - if (anchor == NULL) - return(edge); - - before = &base; - before->ymin = before->ymax = MINPEL; - before->link = after = anchor; - -/* -If the incoming edge is above the current list, we connect the current -list to the bottom of the incoming edge. One slight complication is -if the incoming edge overlaps into the current list. Then, we -first split the incoming edge in two at the point of overlap and recursively -call ourselves to sort the bottom of the split into the current list: -*/ - if (TOP(edge) < TOP(after)) { - if (BOTTOM(edge) > TOP(after)) { - - after = SortSwath(after, splitedge(edge, TOP(after)), swathfcn); - } - vertjoin(edge, after); - return(edge); - } -/* -At this point the top of edge is not higher than the top of the list, -which we keep in 'after'. We move the 'after' point down the list, -until the top of the edge occurs in the swath beginning with 'after'. - -If the bottom of 'after' is below the bottom of the edge, we have to -split the 'after' swath into two parts, at the bottom of the edge. -If the bottom of 'after' is above the bottom of the swath, -*/ - - while (VALIDEDGE(after)) { - - if (TOP(after) == TOP(edge)) { - if (BOTTOM(after) > BOTTOM(edge)) - vertjoin(after, splitedge(after, BOTTOM(edge))); - else if (BOTTOM(after) < BOTTOM(edge)) { - after = SortSwath(after, - splitedge(edge, BOTTOM(after)), swathfcn); - } - break; - } - else if (TOP(after) > TOP(edge)) { - if (BOTTOM(edge) > TOP(after)) { - after = SortSwath(after, - splitedge(edge, TOP(after)), swathfcn); - } - break; - } - else if (BOTTOM(after) > TOP(edge)) - vertjoin(after, splitedge(after, TOP(edge))); - - before = after; - after = after->link; - } - -/* -At this point 'edge' exactly corresponds in height to the current -swath pointed to by 'after'. -*/ - if (after != NULL && TOP(after) == TOP(edge)) { - before = (*swathfcn)(before, edge); - after = before->link; - } -/* -At this point 'after' contains all the edges after 'edge', and 'before' -contains all the edges before. Whew! A simple matter now of adding -'edge' to the linked list in its rightful place: -*/ - before->link = edge; - if (RegionDebug > 1) { - while (edge->link != NULL) { - edge = edge->link; - } - } - else - for (; edge->link != NULL; edge = edge->link) { ; } - - edge->link = after; - return(base.link); -} - -/* -:h3.splitedge() - Split an Edge or Swath in Two at a Given Y Value - -This function returns the edge or swath beginning at the Y value, and -is guaranteed not to change the address of the old swath while splitting -it. -*/ - -static struct edgelist * -splitedge(struct edgelist *list, /* area to split */ - pel y) /* Y value to split list at */ -{ - register struct edgelist *new; /* anchor for newly built list */ - register struct edgelist *last = NULL; /* end of newly built list */ - register struct edgelist *r; /* temp pointer to new structure */ - register struct edgelist *lastlist; /* temp pointer to last 'list' value */ - - lastlist = new = NULL; - - while (list != NULL) { - if (y < list->ymin) - break; - if (y >= list->ymax) - Abort("splitedge: above top of list"); - if (y == list->ymin) - Abort("splitedge: would be null"); - - r = (struct edgelist *)Allocate(sizeof(struct edgelist), list, 0); -/* -At this point 'r' points to a copy of the single structure at 'list'. -We will make 'r' be the new split 'edgelist'--the lower half. -We don't bother to correct 'xmin' and 'xmax', we'll take the -the pessimistic answer that results from using the old values. -*/ - r->ymin = y; - r->xvalues = list->xvalues + (y - list->ymin); -/* -Note that we do not need to allocate new memory for the X values, -they can remain with the old "edgelist" structure. We do have to -update that old structure so it is not as high: -*/ - list->ymax = y; -/* -Insert 'r' in the subpath chain: -*/ - r->subpath = list->subpath; - list->subpath = r; -/* -Now attach 'r' to the list we are building at 'new', and advance -'list' to point to the next element in the old list: -*/ - if (new == NULL) - new = r; - else - last->link = r; - last = r; - lastlist = list; - list = list->link; - } -/* -At this point we have a new list built at 'new'. We break the old -list at 'lastlist', and add the broken off part to the end of 'new'. -Then, we return the caller a pointer to 'new': -*/ - if (new == NULL) - Abort("null splitedge"); - lastlist->link = NULL; - last->link = list; - return(new); -} - -/* -:h3.vertjoin() - Join Two Disjoint Edge Lists Vertically - -The two edges must be disjoint vertically. -*/ -static void vertjoin(top, bottom) - register struct edgelist *top; /* uppermost region */ - register struct edgelist *bottom; /* bottommost region */ -{ - if (BOTTOM(top) > TOP(bottom)) - Abort("vertjoin not disjoint"); - - for (; top->link != NULL; top=top->link) { ; } - - top->link = bottom; - return; -} - -/* -:h3.swathxsort() - Sorting by X Values - -We need to sort 'edge' into its rightful -place in the swath by X value, taking care that we do not accidentally -advance to the next swath while searching for the correct X value. Like -all swath functions, this function returns a pointer to the edge -BEFORE the given edge in the sort. -*/ - -static struct edgelist * -swathxsort(struct edgelist *before0, /* edge before this swath */ - struct edgelist *edge) /* input edge */ -{ - register struct edgelist *before; - register struct edgelist *after; - register pel y = 0; - - before = before0; - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - - register pel *x1,*x2; - - y = TOP(edge); - x1 = after->xvalues; - x2 = edge->xvalues; - - while (y < BOTTOM(edge) && *x1 == *x2) { - x1++; x2++; y++; - } - if (y >= BOTTOM(edge)) { - edge->flag |= ISAMBIGUOUS(ON); - after->flag |= ISAMBIGUOUS(ON); - break; - } - - if (*x1 >= *x2) - break; - - before = after; - after = after->link; - } - -/* -At this point, 'edge' is between 'before' and 'after'. If 'edge' didn't -cross either of those other edges, we would be done. We check for -crossing. If it does cross, we split the problem up by calling SortSwath -recursively with the part of the edge that is below the crossing point: -*/ -{ - register int h0,h; /* height of edge--number of scans */ - - h0 = h = BOTTOM(edge) - y; - y -= TOP(edge); - - if (h0 <= 0) { - return(before); - } - - if (TOP(before) == TOP(edge)) - h -= crosses(h, &before->xvalues[y], &edge->xvalues[y]); - if (after != NULL && TOP(after) == TOP(edge)) - h -= crosses(h, &edge->xvalues[y], &after->xvalues[y]); - - if (h < h0) { - SortSwath(before0->link, - splitedge(edge, TOP(edge) + y + h), - swathxsort); - - } -} - - return(before); -} -/* -:h3.SwathUnion() - Union Two Edges by X Value - -We have a left and right edge that must be unioned into a growing -swath. If they are totally disjoint, they are just added in. The -fun comes in they overlap the existing edges. Then some edges -will disappear. -*/ - -struct edgelist * -SwathUnion(struct edgelist *before0, /* edge before the swath */ - struct edgelist *edge) /* list of two edges to be unioned */ -{ - register int h; /* saves height of edge */ - register struct edgelist *rightedge; /* saves right edge of 'edge' */ - register struct edgelist *before,*after; /* edge before and after */ - int h0; /* saves initial height */ - - h0 = h = edge->ymax - edge->ymin; - if (h <= 0) - Abort("SwathUnion: 0 height swath?"); - - before = before0; - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - register struct edgelist *right; - - right = after->link; - if (right->xvalues[0] >= edge->xvalues[0]) - break; - before = right; - after = before->link; - } -/* -This is the picture at this point. 'L' indicates a left hand edge, -'R' indicates the right hand edge. -'<--->' indicates the degree of uncertainty as to its placement -relative to other edges: -:xmp atomic. - before after - R <---L----> R L R L R - <---L---> <------R--------------------------> - edge -:exmp. -In case the left of 'edge' touches 'before', we need to reduce -the height by that amount. -*/ - if (TOP(before) == TOP(edge)) - h -= touches(h, before->xvalues, edge->xvalues); - - rightedge = edge->link; - - if (after == NULL || TOP(after) != TOP(edge) || - after->xvalues[0] > rightedge->xvalues[0]) { -/* -On this side of the the above 'if', the new edge is disjoint from the -existing edges in the swath. This is the picture: -:xmp atomic. - before after - R L R L R L R - L R - edge -:exmp. -We will verify it remains disjoint for the entire height. If the -situation changes somewhere down the edge, we split the edge at that -point and recursively call ourselves (through 'SortSwath') to figure -out the new situation: -*/ - if (after != NULL && TOP(after) == TOP(edge)) - h -= touches(h, rightedge->xvalues, after->xvalues); - if (h < h0) - SortSwath(before0->link, splitedge(edge, edge->ymin + h), t1_SwathUnion); - /* go to "return" this edge pair; it is totally disjoint */ - } - else { -/* -At this point, at the 'else', we know that the -new edge overlaps one or more pairs in the existing swath. Here is -a picture of our knowledge and uncertainties: -:xmp atomic. - before after - R L R L R L R - <---L---> <---R-------------------> - edge -:exmp. -We need to move 'after' along until it is to the right of the -right of 'edge'. ('After' should always point to a left edge of a pair:) -*/ - register struct edgelist *left; /* variable to keep left edge in */ - - do { - left = after; - after = (after->link)->link; - - } while (after != NULL && TOP(after) == TOP(edge) - && after->xvalues[0] <= rightedge->xvalues[0]); -/* -At this point this is the picture: -:xmp atomic. - before left after - R L R L R L R - <---L---> <---R---> - edge -:exmp. -We need to verify that the situation stays like this all the way -down the edge. Again, if the -situation changes somewhere down the edge, we split the edge at that -point and recursively call ourselves (through 'SortSwath') to figure -out the new situation: -*/ - - h -= crosses(h, left->xvalues, rightedge->xvalues); - h -= crosses(h, edge->xvalues, ((before->link)->link)->xvalues); - - if (after != NULL && TOP(after) == TOP(edge)) - - h -= touches(h, rightedge->xvalues, after->xvalues); - -/* -OK, if we touched either of our neighbors we need to split at that point -and recursively sort the split edge onto the list. One tricky part -is that when we recursively sort, 'after' will change if it was not -in our current swath: -*/ - if (h < h0) { - SortSwath(before0->link, - splitedge(edge, edge->ymin + h), - t1_SwathUnion); - - if (after == NULL || TOP(after) != TOP(edge)) - for (after = before0->link; - TOP(after) == TOP(edge); - after = after->link) { ; } - } -/* -Now we need to augment 'edge' by the left and right of the overlapped -swath, and to discard all edges between before and after, because they -were overlapped and have been combined with the new incoming 'edge': -*/ - edge->xmin = MIN(edge->xmin, (before->link)->xmin); - edge->xmax = MIN(edge->xmax, (before->link)->xmax); - edgemin(h, edge->xvalues, (before->link)->xvalues); - rightedge->xmin = MAX(rightedge->xmin, (left->link)->xmin); - rightedge->xmax = MAX(rightedge->xmax, (left->link)->xmax); - edgemax(h, rightedge->xvalues, (left->link)->xvalues); - discard(before, after); - } - return(before); -} -#ifdef notused -/* -:h3.swathrightmost() - Simply Sorts New Edge to Rightmost of Swath - -Like all swath functions, this function returns a pointer to the edge -BEFORE the given edge in the sort. -*/ - -static struct edgelist * -swathrightmost(struct edgelist *before, /* edge before this swath */ - struct edgelist *edge) /* input edge */ -{ - register struct edgelist *after; - - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - before = after; - after = after->link; - } - - return(before); - -} -#endif -/* -:h3.touches() - Returns the Remaining Height When Two Edges Touch - -So, it will return 0 if they never touch. Allows incredibly(?) mnemonic -if (touches(...)) construct. -*/ - -static int -touches(int h, pel *left, pel *right) -{ - for (; h > 0; h--) - if (*left++ >= *right++) - break; - return(h); -} -/* -:h3.crosses() - Returns the Remaining Height When Two Edges Cross - -So, it will return 0 if they never cross. -*/ - -static int -crosses(int h, pel *left, pel *right) -{ - for (; h > 0; h--) - if (*left++ > *right++) - break; - return(h); -} -/* -:h3.cedgemin() - Stores the Mininum of an Edge and an X Value -*/ - -static void -cedgemin(int h, pel *e1, pel x) -{ - for (; --h >= 0; e1++) - if (*e1 > x) - *e1 = x; -} -/* -:h3.cedgemax() - Stores the Maximum of an Edge and an X Value -*/ - -static void -cedgemax(int h, pel *e1, pel x) -{ - for (; --h >= 0; e1++) - if (*e1 < x) - *e1 = x; -} -/* -:h3.edgemin() - Stores the Mininum of Two Edges in First Edge -*/ - -static void -edgemin(int h, pel *e1, pel *e2) -{ - for (; --h >= 0; e1++,e2++) - if (*e1 > *e2) - *e1 = *e2; -} -/* -:h3.edgemax() - Stores the Maximum of Two Edges in First Edge -*/ - -static void -edgemax(int h, pel *e1, pel *e2) -{ - for (; --h >= 0; e1++,e2++) - if (*e1 < *e2) - *e1 = *e2; -} - -/* -:h2.Changing the Representation of Regions - -For convenience and/or performance, we sometimes like to change the way -regions are represented. This does not change the object itself, just -the representation, so these transformations can be made on a permanent -region. - -*/ - -void -MoveEdges(struct region *R, /* region to modify */ - fractpel dx, fractpel dy) /* delta X and Y to move edge list by */ -{ - register struct edgelist *edge; /* for looping through edges */ - - R->origin.x += dx; - R->origin.y += dy; - R->ending.x += dx; - R->ending.y += dy; - if (R->thresholded != NULL) { - R->thresholded->origin.x -= dx; - R->thresholded->origin.y -= dy; - } -/* -From now on we will deal with dx and dy as integer pel values: -*/ - dx = NEARESTPEL(dx); - dy = NEARESTPEL(dy); - if (dx == 0 && dy == 0) - return; - - R->xmin += dx; - R->xmax += dx; - R->ymin += dy; - R->ymax += dy; - - for (edge = R->anchor; VALIDEDGE(edge); edge = edge->link) { - edge->ymin += dy; - edge->ymax += dy; - if (dx != 0) { - register int h; /* loop index; height of edge */ - register pel *Xp; /* loop pointer to X values */ - - edge->xmin += dx; - edge->xmax += dx; - for (Xp = edge->xvalues, h = edge->ymax - edge->ymin; - --h >= 0; ) - *Xp++ += dx; - } - } -} - -/* -:h3.UnJumble() - Sort a Region Top to Bottom - -It is an open question whether it pays in general to do this. -*/ - -void -UnJumble(struct region *region) /* region to sort */ -{ - register struct edgelist *anchor; /* new lists built here */ - register struct edgelist *edge; /* edge pointer for loop */ - register struct edgelist *next; /* ditto */ - - anchor = NULL; - - for (edge=region->anchor; VALIDEDGE(edge); edge=next) { - if (edge->link == NULL) - Abort("UnJumble: unpaired edge?"); - next = edge->link->link; - edge->link->link = NULL; - anchor = SortSwath(anchor, edge, t1_SwathUnion); - } - - if (edge != NULL) - vertjoin(anchor, edge); - - region->anchor = anchor; - region->flag &= ~ISJUMBLED(ON); -} - -/* -*/ -#ifdef notused -static void -OptimizeRegion(struct region *R) /* region to optimize */ -{ - register pel *xP; /* pel pointer for inner loop */ - register int x; /* holds X value */ - register int xmin,xmax; /* holds X range */ - register int h; /* loop counter */ - register struct edgelist *e; /* edgelist pointer for loop */ - - R->flag |= ISRECTANGULAR(ON); - - for (e = R->anchor; VALIDEDGE(e); e=e->link) { - xmin = MAXPEL; - xmax = MINPEL; - for (h = e->ymax - e->ymin, xP = e->xvalues; --h >= 0;) { - x = *xP++; - if (x < xmin) xmin = x; - if (x > xmax) xmax = x; - } - if (xmin != xmax || (xmin != R->xmin && xmax != R->xmax)) - R->flag &= ~ISRECTANGULAR(ON); - if (xmin < e->xmin || xmax > e->xmax) - Abort("Tighten: existing edge bound was bad"); - if (xmin < R->xmin || xmax > R->xmax) - Abort("Tighten: existing region bound was bad"); - e->xmin = xmin; - e->xmax = xmax; - } - R->flag |= ISOPTIMIZED(ON); -} -#endif - -/* -:h2.Miscelaneous Routines - -:h3.MoreWorkArea() - Allocate New Space for "edge" - -Our strategy is to temporarily allocate an array to hold this -unexpectedly large edge. ChangeDirection frees this array any time -it gets a shorter 'dy'. -*/ - -/*ARGSUSED*/ -void -MoreWorkArea(struct region *R, /* region we are generating */ - fractpel x1, fractpel y1, /* starting point of line */ - fractpel x2, fractpel y2) /* ending point of line */ -{ - register int idy; /* integer dy of line */ - - idy = NEARESTPEL(y1) - NEARESTPEL(y2); - if (idy < 0) idy = - idy; - - /* - * we must add one to the delta for the number of run ends we - * need to store: - */ - if (++idy > currentsize) { - if (currentworkarea != workedge) - NonObjectFree(currentworkarea); - currentworkarea = (pel *)Allocate(0, NULL, idy * sizeof(pel)); - currentsize = idy; - } - ChangeDirection(CD_CONTINUE, R, x1, y1, y2 - y1); -} - -/* -:h3.BoxClip() - Clip a Region to a Rectangle - -BoxClip also duplicates the region if it is permanent. Note the -clipping box is specified in REGION coordinates, that is, in -coordinates relative to the region (0,0) point -*/ - -struct region * -BoxClip(struct region *R, /* region to clip */ - pel xmin, pel ymin, /* upper left hand corner of rectangle */ - pel xmax, pel ymax) /* lower right hand corner */ -{ - struct edgelist anchor; /* pretend edgelist to facilitate discards */ - register struct edgelist *e,*laste; - - R = UniqueRegion(R); - - if (xmin > R->xmin) { - R->xmin = xmin; - } - if (xmax < R->xmax) { - R->xmax = xmax; - } - - if (ymin > R->ymin) { - R->ymin = ymin; - } - if (ymax < R->ymax) { - R->ymax = ymax; - } - - - laste = &anchor; - anchor.link = R->anchor; - - for (e = R->anchor; VALIDEDGE(e); e = e->link) { - if (TOP(e) < ymin) { - e->xvalues += ymin - e->ymin; - e->ymin = ymin; - } - if (BOTTOM(e) > ymax) - e->ymax = ymax; - if (TOP(e) >= BOTTOM(e)) { - discard(laste, e->link->link); - e = laste; - continue; - } - if (e->xmin < xmin) { - cedgemax(BOTTOM(e) - TOP(e), e->xvalues, xmin); - e->xmin = xmin; - e->xmax = MAX(e->xmax, xmin); - } - if (e->xmax > xmax) { - cedgemin(BOTTOM(e) - TOP(e), e->xvalues, xmax); - e->xmin = MIN(e->xmin, xmax); - e->xmax = xmax; - } - laste = e; - } - - R->anchor = anchor.link; - - return(R); -} - -#ifdef notdef -/* -:h3.CoerceRegion() - Force a TextPath Structure to Become a Region - -We also save the newly created region in the textpath structure, if the -structure was permanent. Then we don't have to do this again. Why not -save it all the time? Well, we certainly could, but I suspect it -wouldn't pay. We would have to make this region permanent (because we -couldn't have it be consumed) and this would probably require -unnecessary CopyRegions in most cases. -*/ - -struct region * -CoerceRegion(struct textpath *tp) /* input TEXTTYPE */ -{ - struct segment *path; /* temporary character path */ - struct region *R; /* returned region */ - - - R = Interior(path, EVENODDRULE); - return(R); -} -#endif - -/* -:h3.RegionBounds() - Returns Bounding Box of a Region -*/ - -struct segment * -RegionBounds(struct region *R) -{ - register struct segment *path; /* returned path */ - - path = BoxPath(IDENTITY, R->ymax - R->ymin, R->xmax - R->xmin); - path = Join(PathSegment(MOVETYPE, R->origin.x + TOFRACTPEL(R->xmin), - R->origin.y + TOFRACTPEL(R->ymin) ), - path); - return(path); -} - -/* -:h2.Formatting/Dump Routines for Debug - -:h3.DumpArea() - Display a Region -*/ -void -DumpArea(struct region *area) -{ - DumpEdges(area->anchor); -} - -#define INSWATH(p, y0, y1) (p != NULL && p->ymin == y0 && p->ymax == y1) -/* -:h3.DumpEdges() - Display Run End Lists (Edge Lists) -*/ - -/* -:h3.edgecheck() - For Debug, Verify that an Edge Obeys the Rules -*/ - -/*ARGSUSED*/ -static void -edgecheck(struct edgelist *edge, int oldmin, int oldmax) -{ - if (edge->type != EDGETYPE) - Abort("EDGE ERROR: non EDGETYPE in list"); -/* -The following check is not valid if the region is jumbled so I took it -out: -*/ -/* if (edge->ymin < oldmax && edge->ymin != oldmin) - Abort("EDGE ERROR: overlapping swaths"); */ -} - -void -DumpEdges(struct edgelist *edges) -{ - register struct edgelist *p,*p2; - register pel ymin = MINPEL; - register pel ymax = MINPEL; - - if (edges == NULL) { - return; - } - if (RegionDebug <= 1) { - for (p=edges; p != NULL; p = p->link) { - edgecheck(p, ymin, ymax); - ymin = p->ymin; ymax = p->ymax; - } - } - else { - - for (p2=edges; p2 != NULL; ) { - - edgecheck(p2, ymin, ymax); - ymin = p2->ymin; - ymax = p2->ymax; - - while (INSWATH(p2, ymin, ymax)) - p2 = p2->link; - } - } -} diff --git a/nx-X11/lib/font/Type1/regions.h b/nx-X11/lib/font/Type1/regions.h deleted file mode 100644 index 96ad1a53a..000000000 --- a/nx-X11/lib/font/Type1/regions.h +++ /dev/null @@ -1,250 +0,0 @@ -/* $Xorg: regions.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/regions.h,v 1.7 2001/01/17 19:43:23 dawes Exp $ */ -/*SHARED*/ - -#define Interior(p,rule) t1_Interior(p,rule) -#define Union(a1,a2) t1_Union(a1,a2) -#define Intersect(a1,a2) t1_Intersect(a1,a2) -#define Complement(area) t1_Complement(area) -#define Overlap(a1,a2) t1_OverLap(a1,a2) - - -/* returns the interior of a closed path */ -extern struct region *t1_Interior ( struct segment *p, int fillrule ); -#if 0 -struct region *t1_Union(); /* set union of paths or regions */ -struct region *t1_Intersect(); /* set intersection of regions */ -struct region *t1_Complement(); /* complement of a region */ -int t1_Overlap(); /* returns a Boolean; TRUE if regions overlap */ -#endif - -#define TT_INFINITY t1_Infinity - -/*END SHARED*/ -/*SHARED*/ - -#define ChangeDirection(type,R,x,y,dy) t1_ChangeDirection(type,R,x,y,dy) - -/* called when we change direction in Y */ -extern void t1_ChangeDirection ( int type, struct region *R, fractpel x, - fractpel y, fractpel dy ); -#define CD_FIRST -1 /* enumeration of ChangeDirection type */ -#define CD_CONTINUE 0 /* enumeration of ChangeDirection type */ -#define CD_LAST 1 /* enumeration of ChangeDirection type */ - -#define MoreWorkArea(R,x1,y1,x2,y2) t1_MoreWorkArea(R,x1,y1,x2,y2) -#define KillRegion(area) t1_KillRegion(area) -#define CopyRegion(area) t1_CopyRegion(area) -#define BoxClip(R,xmin,ymin,xmax,ymax) t1_BoxClip(R,xmin,ymin,xmax,ymax) -#define SortSwath(a,p,f) t1_SortSwath(a,p,f) -#define SwathUnion(b,e) t1_SwathUnion(b,e) -#define RegionBounds(r) t1_RegionBounds(r) -#define CoerceRegion(p) t1_CoerceRegion(p) -#define MoveEdges(R,dx,dy) t1_MoveEdges(R,dx,dy) -#define UnJumble(R) t1_UnJumble(R) - -typedef struct edgelist *(*SwathFunc)(struct edgelist *, struct edgelist *); - -/* get longer edge list for stepping */ -extern void t1_MoreWorkArea ( struct region *R, fractpel x1, fractpel y1, - fractpel x2, fractpel y2 ); -/* duplicate a region */ -extern struct region *t1_CopyRegion ( struct region *area ); -/* destroy a region */ -extern void t1_KillRegion ( struct region *area ); -/* clip a region to a rectangle */ -extern struct region *t1_BoxClip ( struct region *R, pel xmin, pel ymin, - pel xmax, pel ymax ); -/* sort edges onto growing edge list */ -extern struct edgelist *t1_SortSwath ( struct edgelist *anchor, - struct edgelist *edge, - SwathFunc swathfcn ); -/* 'union' two edges into a swath */ -extern struct edgelist *t1_SwathUnion ( struct edgelist *before0, - struct edgelist *edge ); -/* returns bounding box of a region */ -extern struct segment *t1_RegionBounds ( struct region *R ); -#ifdef notdef -/* force text to become a true region */ -struct region *t1_CoerceRegion(struct textpath *tp); -#endif -/* moves the edge values in a region */ -extern void t1_MoveEdges ( struct region *R, fractpel dx, fractpel dy ); -/* sort the edges and reset the jumbled flag */ -extern void t1_UnJumble ( struct region *region ); - - -/*END SHARED*/ -/*SHARED*/ - -#define GOING_TO(R, x1, y1, x2, y2, dy) { \ - if (dy < 0) { \ - if (R->lastdy >= 0) \ - ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (y2 < R->edgeYstop) \ - MoreWorkArea(R, x1, y1, x2, y2); \ - } \ - else if (dy > 0) { \ - if (R->lastdy <= 0) \ - ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (y2 > R->edgeYstop) \ - MoreWorkArea(R, x1, y1, x2, y2); \ - } \ - else /* dy == 0 */ ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (x2 < R->edgexmin) R->edgexmin = x2; \ - else if (x2 > R->edgexmax) R->edgexmax = x2; \ -} - -#ifndef FONTMODULE -#ifndef __sxg__ -#include -#endif -#endif -#ifdef SHRT_MIN -#define MINPEL SHRT_MIN -#else -#define MINPEL ((pel)(-1<<(8*sizeof(pel)-1))) /* smallest value fitting in a pel */ -#endif -#ifdef SHRT_MAX -#define MAXPEL SHRT_MAX -#else -#define MAXPEL ((pel)((1<<(8*sizeof(pel)-1))-1))/* largest value fitting in a pel */ -#endif - -/* -The "Unique"-type macro is different (unique?) for regions, because some -regions structures are shared among several objects, and might have -to be made unique for that reason (i.e., references > 1). -*/ - -#define ConsumeRegion(R) MAKECONSUME(R,KillRegion(R)) -#define UniqueRegion(R) MAKEUNIQUE(R,CopyRegion(R)) - - -/*END SHARED*/ -/*SHARED*/ - -typedef void (*NewEdgeFunc)(struct region *, - fractpel, fractpel, fractpel, fractpel, int); - -struct region { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = REGIONTYPE */ - struct fractpoint origin; /* beginning handle: X,Y origin of region */ - struct fractpoint ending; /* ending handle: X,Y change after painting region */ - pel xmin,ymin; /* minimum X,Y of region */ - pel xmax,ymax; /* mat1_mum X,Y of region */ - struct edgelist *anchor; /* list of edges that bound the region */ - struct picture *thresholded; /* region defined by thresholded picture*/ -/* -Note that the ending handle and the bounding box values are stored -relative to 'origin'. - -The above elements describe a region. The following elements are -scratchpad areas used while the region is being built: -*/ - fractpel lastdy; /* direction of last segment */ - fractpel firstx,firsty; /* starting point of current edge */ - fractpel edgexmin,edgexmax; /* x extent of current edge */ - struct edgelist *lastedge,*firstedge; /* last and first edges in subpath */ - pel *edge; /* pointer to array of X values for edge */ - fractpel edgeYstop; /* Y value where 'edges' array ends */ - NewEdgeFunc newedgefcn; /* function to use when building a new edge */ - struct strokeinfo *strokeinfo; /* scratchpad info during stroking only */ -} ; -/* -The ISCOMPLEMENT flag indicates the region is reversed--it is the -"outside" of the nominal region. -*/ -#define ISCOMPLEMENT(flag) ((flag)&0x80) -/* -The ISJUMBLED flag indicates the region is not sorted top-to-bottom. -*/ -#define ISJUMBLED(flag) ((flag)&0x40) -/* -The ISINFINITE flag allows a quick check for an INFINITE region, which -is frequently intersected. -*/ -#define ISINFINITE(flag) ((flag)&0x20) - -/*END SHARED*/ -/*SHARED*/ - -#define ISRECTANGULAR(flag) ((flag)&0x08) - -/*END SHARED*/ -/*SHARED*/ - -#define EmptyRegion t1_EmptyRegion - -/*END SHARED*/ -/*SHARED*/ - -struct edgelist { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = EDGETYPE */ - struct edgelist *link; /* pointer to next in linked list */ - struct edgelist *subpath; /* informational link for "same subpath" */ - pel xmin,xmax; /* range of edge in X */ - pel ymin,ymax; /* range of edge in Y */ - pel *xvalues; /* pointer to ymax-ymin X values */ -} ; -/* -The end of the list is marked by either "link" being NULL, or by -ymin == ymax. See :hdref refid=discard.. We define the VALIDEDGE -predicate to test for the opposite of these conditions: -*/ - -#define VALIDEDGE(p) ((p)!=NULL&&(p)->ymin<(p)->ymax) - -/*END SHARED*/ -/*SHARED*/ - -#define ISDOWN(f) ((f)&0x80) - -#define ISAMBIGUOUS(f) ((f)&0x40) - -/*END SHARED*/ -/*SHARED*/ - -/* -Interior() rule enumerations: -*/ -#define WINDINGRULE -2 -#define EVENODDRULE -3 - -#define CONTINUITY 0x80 /* can be added to above rules; e.g. WINDINGRULE+CONTINUITY */ - -/*END SHARED*/ - -/* dump a region structure */ -extern void t1_DumpArea ( struct region *area ); -/* dump a region's edge list */ -extern void t1_DumpEdges ( struct edgelist *edges ); diff --git a/nx-X11/lib/font/Type1/scanfont.c b/nx-X11/lib/font/Type1/scanfont.c deleted file mode 100644 index 8db497959..000000000 --- a/nx-X11/lib/font/Type1/scanfont.c +++ /dev/null @@ -1,2370 +0,0 @@ -/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.5 2005/07/09 23:30:06 keithp Exp $ */ -/* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.16 2003/05/27 22:26:46 tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef FONTMODULE -#include -#include -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "xf86_ansic.h" -#endif -#include "t1stdio.h" -#include "util.h" -#include "token.h" -#if XFONT_CID -#include "range.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "fontfcn.h" -#include "blues.h" - -#if XFONT_CID -#define CID_BUFSIZE 80 - -extern psfont *FDArrayP; -static spacerange *spacerangeP; -static cidrange *notdefrangeP; -static cidrange *cidrangeP; -extern int FDArrayIndex; -static boolean CIDWantFontInfo; -static psobj inputFile1; -#endif - -static int rc; -static boolean InPrivateDict; -static boolean WantFontInfo; -static boolean TwoSubrs; -static psobj inputFile; -static psobj filterFile; -static psobj *inputP; - - -/**********************************************************************/ -/* Init_BuiltInEncoding() */ -/* */ -/* Initializes the StandardEncoding and ISOLatin1Encoding vector. */ -/* */ -/**********************************************************************/ -typedef struct /* Builtin Standard Encoding */ -{ - int index; - char *name; -} EncodingTable; - -static EncodingTable StdEnc[] = { - { 040 , "space" }, - { 041 , "exclam" }, - { 042 , "quotedbl" }, - { 043 , "numbersign" }, - { 044 , "dollar" }, - { 045 , "percent" }, - { 046 , "ampersand" }, - { 047 , "quoteright" }, - { 050 , "parenleft" }, - { 051 , "parenright" }, - { 052 , "asterisk" }, - { 053 , "plus" }, - { 054 , "comma" }, - { 055 , "hyphen" }, - { 056 , "period" }, - { 057 , "slash" }, - { 060 , "zero" }, - { 061 , "one" }, - { 062 , "two" }, - { 063 , "three" }, - { 064 , "four" }, - { 065 , "five" }, - { 066 , "six" }, - { 067 , "seven" }, - { 070 , "eight" }, - { 071 , "nine" }, - { 072 , "colon" }, - { 073 , "semicolon" }, - { 074 , "less" }, - { 075 , "equal" }, - { 076 , "greater" }, - { 077 , "question" }, - { 0100 , "at" }, - { 0101 , "A" }, - { 0102 , "B" }, - { 0103 , "C" }, - { 0104 , "D" }, - { 0105 , "E" }, - { 0106 , "F" }, - { 0107 , "G" }, - { 0110 , "H" }, - { 0111 , "I" }, - { 0112 , "J" }, - { 0113 , "K" }, - { 0114 , "L" }, - { 0115 , "M" }, - { 0116 , "N" }, - { 0117 , "O" }, - { 0120 , "P" }, - { 0121 , "Q" }, - { 0122 , "R" }, - { 0123 , "S" }, - { 0124 , "T" }, - { 0125 , "U" }, - { 0126 , "V" }, - { 0127 , "W" }, - { 0130 , "X" }, - { 0131 , "Y" }, - { 0132 , "Z" }, - { 0133 , "bracketleft" }, - { 0134 , "backslash" }, - { 0135 , "bracketright" }, - { 0136 , "asciicircum" }, - { 0137 , "underscore" }, - { 0140 , "quoteleft" }, - { 0141 , "a" }, - { 0142 , "b" }, - { 0143 , "c" }, - { 0144 , "d" }, - { 0145 , "e" }, - { 0146 , "f" }, - { 0147 , "g" }, - { 0150 , "h" }, - { 0151 , "i" }, - { 0152 , "j" }, - { 0153 , "k" }, - { 0154 , "l" }, - { 0155 , "m" }, - { 0156 , "n" }, - { 0157 , "o" }, - { 0160 , "p" }, - { 0161 , "q" }, - { 0162 , "r" }, - { 0163 , "s" }, - { 0164 , "t" }, - { 0165 , "u" }, - { 0166 , "v" }, - { 0167 , "w" }, - { 0170 , "x" }, - { 0171 , "y" }, - { 0172 , "z" }, - { 0173 , "braceleft" }, - { 0174 , "bar" }, - { 0175 , "braceright" }, - { 0176 , "asciitilde" }, - { 0241 , "exclamdown" }, - { 0242 , "cent" }, - { 0243 , "sterling" }, - { 0244 , "fraction" }, - { 0245 , "yen" }, - { 0246 , "florin" }, - { 0247 , "section" }, - { 0250 , "currency" }, - { 0251 , "quotesingle" }, - { 0252 , "quotedblleft" }, - { 0253 , "guillemotleft" }, - { 0254 , "guilsinglleft" }, - { 0255 , "guilsinglright" }, - { 0256 , "fi" }, - { 0257 , "fl" }, - { 0261 , "endash" }, - { 0262 , "dagger" }, - { 0263 , "daggerdbl" }, - { 0264 , "periodcentered" }, - { 0266 , "paragraph" }, - { 0267 , "bullet" }, - { 0270 , "quotesinglbase" }, - { 0271 , "quotedblbase" }, - { 0272 , "quotedblright" }, - { 0273 , "guillemotright" }, - { 0274 , "ellipsis" }, - { 0275 , "perthousand" }, - { 0277 , "questiondown" }, - { 0301 , "grave" }, - { 0302 , "acute" }, - { 0303 , "circumflex" }, - { 0304 , "tilde" }, - { 0305 , "macron" }, - { 0306 , "breve" }, - { 0307 , "dotaccent" }, - { 0310 , "dieresis" }, - { 0312 , "ring" }, - { 0313 , "cedilla" }, - { 0315 , "hungarumlaut" }, - { 0316 , "ogonek" }, - { 0317 , "caron" }, - { 0320 , "emdash" }, - { 0341 , "AE" }, - { 0343 , "ordfeminine" }, - { 0350 , "Lslash" }, - { 0351 , "Oslash" }, - { 0352 , "OE" }, - { 0353 , "ordmasculine" }, - { 0361 , "ae" }, - { 0365 , "dotlessi" }, - { 0370 , "lslash" }, - { 0371 , "oslash" }, - { 0372 , "oe" }, - { 0373 , "germandbls" }, - { 0, 0 } -}; - -static EncodingTable ISO8859Enc[] = { - { 32, "space" }, - { 33, "exclam" }, - { 34, "quotedbl" }, - { 35, "numbersign" }, - { 36, "dollar" }, - { 37, "percent" }, - { 38, "ampersand" }, - { 39, "quoteright" }, - { 40, "parenleft" }, - { 41, "parenright" }, - { 42, "asterisk" }, - { 43, "plus" }, - { 44, "comma" }, - { 45, "minus" }, - { 46, "period" }, - { 47, "slash" }, - { 48, "zero" }, - { 49, "one" }, - { 50, "two" }, - { 51, "three" }, - { 52, "four" }, - { 53, "five" }, - { 54, "six" }, - { 55, "seven" }, - { 56, "eight" }, - { 57, "nine" }, - { 58, "colon" }, - { 59, "semicolon" }, - { 60, "less" }, - { 61, "equal" }, - { 62, "greater" }, - { 63, "question" }, - { 64, "at" }, - { 65, "A" }, - { 66, "B" }, - { 67, "C" }, - { 68, "D" }, - { 69, "E" }, - { 70, "F" }, - { 71, "G" }, - { 72, "H" }, - { 73, "I" }, - { 74, "J" }, - { 75, "K" }, - { 76, "L" }, - { 77, "M" }, - { 78, "N" }, - { 79, "O" }, - { 80, "P" }, - { 81, "Q" }, - { 82, "R" }, - { 83, "S" }, - { 84, "T" }, - { 85, "U" }, - { 86, "V" }, - { 87, "W" }, - { 88, "X" }, - { 89, "Y" }, - { 90, "Z" }, - { 91, "bracketleft" }, - { 92, "backslash" }, - { 93, "bracketright" }, - { 94, "asciicircum" }, - { 95, "underscore" }, - { 96, "quoteleft" }, - { 97, "a" }, - { 98, "b" }, - { 99, "c" }, - { 100, "d" }, - { 101, "e" }, - { 102, "f" }, - { 103, "g" }, - { 104, "h" }, - { 105, "i" }, - { 106, "j" }, - { 107, "k" }, - { 108, "l" }, - { 109, "m" }, - { 110, "n" }, - { 111, "o" }, - { 112, "p" }, - { 113, "q" }, - { 114, "r" }, - { 115, "s" }, - { 116, "t" }, - { 117, "u" }, - { 118, "v" }, - { 119, "w" }, - { 120, "x" }, - { 121, "y" }, - { 122, "z" }, - { 123, "braceleft" }, - { 124, "bar" }, - { 125, "braceright" }, - { 126, "asciitilde" }, - { 160, "space" }, - { 161, "exclamdown" }, - { 162, "cent" }, - { 163, "sterling" }, - { 164, "currency" }, - { 165, "yen" }, - { 166, "brokenbar" }, - { 167, "section" }, - { 168, "dieresis" }, - { 169, "copyright" }, - { 170, "ordfeminine" }, - { 171, "guillemotleft" }, - { 172, "logicalnot" }, - { 173, "hyphen" }, - { 174, "registered" }, - { 175, "macron" }, - { 176, "degree" }, - { 177, "plusminus" }, - { 178, "twosuperior" }, - { 179, "threesuperior" }, - { 180, "acute" }, - { 181, "mu" }, - { 182, "paragraph" }, - { 183, "periodcentered" }, - { 184, "cedilla" }, - { 185, "onesuperior" }, - { 186, "ordmasculine" }, - { 187, "guillemotright" }, - { 188, "onequarter" }, - { 189, "onehalf" }, - { 190, "threequarters" }, - { 191, "questiondown" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acircumflex" }, - { 195, "Atilde" }, - { 196, "Adieresis" }, - { 197, "Aring" }, - { 198, "AE" }, - { 199, "Ccedilla" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecircumflex" }, - { 203, "Edieresis" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icircumflex" }, - { 207, "Idieresis" }, - { 208, "Eth" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocircumflex" }, - { 213, "Otilde" }, - { 214, "Odieresis" }, - { 215, "multiply" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucircumflex" }, - { 220, "Udieresis" }, - { 221, "Yacute" }, - { 222, "Thorn" }, - { 223, "germandbls" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acircumflex" }, - { 227, "atilde" }, - { 228, "adieresis" }, - { 229, "aring" }, - { 230, "ae" }, - { 231, "ccedilla" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecircumflex" }, - { 235, "edieresis" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icircumflex" }, - { 239, "idieresis" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocircumflex" }, - { 245, "otilde" }, - { 246, "odieresis" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucircumflex" }, - { 252, "udieresis" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "ydieresis" }, - { 0, 0 } -}; - -static psobj *StdEncArrayP = NULL; -psobj *ISOLatin1EncArrayP = NULL; - -static psobj * -MakeEncodingArrayP(EncodingTable *encodingTable) -{ - int i; - psobj *encodingArrayP; - - encodingArrayP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!encodingArrayP) - return NULL; - - /* initialize everything to .notdef */ - for (i=0; i<256;i++) - objFormatName(&(encodingArrayP[i]),7, ".notdef"); - - for (i=0; encodingTable[i].name; i++) - { - objFormatName(&(encodingArrayP[encodingTable[i].index]), - strlen(encodingTable[i].name), - encodingTable[i].name); - } - - return(encodingArrayP); -} - -boolean -Init_BuiltInEncoding(void) -{ - StdEncArrayP = MakeEncodingArrayP(StdEnc); - ISOLatin1EncArrayP = MakeEncodingArrayP(ISO8859Enc); - return (StdEncArrayP && ISOLatin1EncArrayP); -} - -/********************************************************************/ -/***================================================================***/ -static int -getNextValue(int valueType) -{ - scan_token(inputP); - if (tokenType != valueType) { - return(SCAN_ERROR); - } - return(SCAN_OK); - -} -/***================================================================***/ -/* This routine will set the global rc if there is an error */ -/***================================================================***/ -static int -getInt(void) -{ - scan_token(inputP); - if (tokenType != TOKEN_INTEGER) { - rc = SCAN_ERROR; - return(0); - } - else { - return( tokenValue.integer); - } - -} -/***================================================================***/ -/* - * See Sec 10.3 of ``Adobe Type 1 Font Format'' v1.1, - * for parsing Encoding. - */ -static int -getEncoding(psobj *arrayP) -{ - scan_token(inputP); - if ((tokenType == TOKEN_NAME && (tokenLength==16 || tokenLength==17))) - { - if((tokenLength==16) && (!strncmp(tokenStartP,"StandardEncoding",16))) - arrayP->data.valueP = (char *) StdEncArrayP; - else - arrayP->data.valueP = (char *) ISOLatin1EncArrayP; - arrayP->len = 256; - return(SCAN_OK); - } - else if ( (tokenType == TOKEN_LEFT_BRACE) || - (tokenType == TOKEN_LEFT_BRACKET) ) - { - /* Array of literal names */ - - psobj *objP; - int i; - - objP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - arrayP->data.valueP = (char *) objP; - arrayP->len = 256; - - for (i=0; i<256; i++, objP++) - { - scan_token(inputP); - - if (tokenType != TOKEN_LITERAL_NAME) - return(SCAN_ERROR); - - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatName(objP,tokenLength,tokenStartP); - } - - scan_token(inputP); - if ( (tokenType == TOKEN_RIGHT_BRACE) || - (tokenType == TOKEN_RIGHT_BRACKET) ) - return(SCAN_OK); - } - else - { - /* Must be sequences of ``dup put" */ - - psobj *objP; - int i; - - objP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - arrayP->data.valueP = (char *) objP; - arrayP->len = 256; - - for (i=0; i<256; i++) - objFormatName(objP + i, 7, ".notdef"); - - while (TRUE) - { - scan_token(inputP); - - switch (tokenType) - { - case TOKEN_NAME: - if (tokenLength == 3) - { - if (strncmp(tokenStartP,"dup",3) == 0) - { - /* get */ - scan_token(inputP); - if (tokenType != TOKEN_INTEGER || - tokenValue.integer < 0 || - tokenValue.integer > 255) - return (SCAN_ERROR); - i = tokenValue.integer; - - /* get */ - scan_token(inputP); - if (tokenType != TOKEN_LITERAL_NAME) - return(SCAN_ERROR); - - if (!(vm_alloc(tokenLength)) ) - return(SCAN_OUT_OF_MEMORY); - objFormatName(objP + i,tokenLength,tokenStartP); - - /* get "put" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME) - return(SCAN_ERROR); - } - else if (strncmp(tokenStartP,"def",3) == 0) - return (SCAN_OK); - } - break; - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - return (SCAN_ERROR); - } - } - } - - return (SCAN_ERROR); -} -/***================================================================***/ -#if XFONT_CID -static int -getFDArray(psobj *arrayP) -{ - int rc; - - /* get the number of items in the FDArray */ - scan_token(inputP); - if (tokenType == TOKEN_INTEGER) { - /* an FD array must contain at least one element */ - if (tokenValue.integer <= 0) - return(SCAN_ERROR); - arrayP->len = tokenValue.integer; - } else - return(SCAN_ERROR); - - /* get the token "array" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || strncmp(tokenStartP, "array", 5) != 0) - return(SCAN_ERROR); - - /* format the array in memory, save pointer to the beginning */ - arrayP->data.valueP = tokenStartP; - - /* allocate FDArray */ - /* No integer overflow since arrayP->len is unsigned short */ - FDArrayP = (psfont *)vm_alloc(arrayP->len*(sizeof(psfont))); - if (!(FDArrayP)) return(SCAN_OUT_OF_MEMORY); - - /* get a specified number of font dictionaries */ - for (FDArrayIndex = 0; FDArrayIndex < arrayP->len; FDArrayIndex++) { - /* get "dup" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || strncmp(tokenStartP, "dup", 3) != 0) - return(SCAN_ERROR); - /* get an integer digit */ - scan_token(inputP); - if (tokenType != TOKEN_INTEGER) - return(SCAN_ERROR); - - /* read a CID version of a Type 1 font */ - if (!CIDType1fontfcnA(&rc)) - return(rc); - - /* get "put" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || strncmp(tokenStartP, "put", 3) != 0) - return(SCAN_ERROR); - } - return(SCAN_OK); -} -#endif - -static int -getArray(psobj *arrayP) -{ - int N; /* count the items in the array */ - psobj *objP; - - /* That is totally a kludge. If some stupid font file has - * /foo/foo # ftp://ftp.cdrom.com/pub/os2/fonts/future.zip - * we will treat it as /foo. - * H.J. */ - char tmp [1024]; - - strncpy (tmp, tokenStartP, sizeof (tmp)); - tmp [sizeof (tmp) - 1] = '\0'; - -restart: - scan_token(inputP); - switch (tokenType) - { - case TOKEN_LEFT_BRACE: - case TOKEN_LEFT_BRACKET: - break; - - case TOKEN_LITERAL_NAME: - tokenStartP[tokenLength] = '\0'; - if (strcmp (tokenStartP, tmp) == 0) - { - /* Ok, We see /foo/foo. Let's restart. */ - goto restart; - } - - default: - return(SCAN_ERROR); - } - /* format the array in memory, save pointer to the beginning */ - arrayP->data.valueP = tokenStartP; - /* loop, picking up next object, until right BRACE or BRACKET */ - N = 0; - do { - scan_token(inputP); - if ( (tokenType == TOKEN_RIGHT_BRACE) || - (tokenType == TOKEN_RIGHT_BRACKET) ) { - /* save then number of items in the array */ - arrayP->len = N; - return(SCAN_OK); - } - /* allocate the space for the object */ - objP = (psobj *)vm_alloc(sizeof(psobj)); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - /* array is an array of numbers, (real or integer) */ - if (tokenType == TOKEN_REAL) { - objFormatReal(objP, tokenValue.real); - } - else - if (tokenType == TOKEN_INTEGER) { - objFormatInteger(objP, tokenValue.integer); - } - else return(SCAN_ERROR); - N++; - } while ( 1>0 ); - /* NOTREACHED*/ -} -/***================================================================***/ -static int -getName(char *nameP) -{ - do { - scan_token(inputP); - if (tokenType <= TOKEN_NONE) { - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(SCAN_ERROR); - } - } while ((tokenType != TOKEN_NAME) || - (0 != strncmp(tokenStartP,nameP,strlen(nameP))) ); - /* found */ - return(SCAN_OK); -} -/***================================================================***/ -static int -getNbytes(int N) -{ - int I; - - - tokenStartP = vm_next_byte(); - tokenMaxP = tokenStartP + MIN(vm_free_bytes(), MAX_STRING_LEN); - if (N > vm_free_bytes()) { - return(SCAN_OUT_OF_MEMORY); - } - I = T1Read(tokenStartP,1,N,inputP->data.fileP); - if ( I != N ) return(SCAN_FILE_EOF); - return(SCAN_OK); -} - -/***================================================================***/ -/* getLiteralName(nameObjP) */ -/* scan for next literal. */ -/* if we encounter the name 'end' then terminate and say ok. */ -/* It means that the CharStrings does not have as many characters */ -/* as the dictionary said it would and that is ok. */ -/***================================================================***/ -static int -getLiteralName(psobj *nameObjP) -{ - do { - scan_token(inputP); - if (tokenType <= TOKEN_NONE) { - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(SCAN_ERROR); - } - if (tokenType == TOKEN_NAME) { - if (0 == strncmp(tokenStartP,"end",3) ) { - return(SCAN_END); - } - } - } while (tokenType != TOKEN_LITERAL_NAME) ; - nameObjP->len = tokenLength; - /* allocate all the names in the CharStrings Structure */ - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - nameObjP->data.valueP = tokenStartP; - /* found */ - return(SCAN_OK); -} - -/***================================================================***/ -/* - * BuildSubrs routine - */ -/***================================================================***/ - -static int -BuildSubrs(psfont *FontP) -{ - int N; /* number of values in Subrs */ - int I; /* index into Subrs */ - int i; /* loop thru Subrs */ - int J; /* length of Subrs entry */ - psobj *arrayP; - - /* next token should be a positive int */ - /* note: rc is set by getInt. */ - N = getInt(); - if (rc) return(rc); - if (N < 0 ) return(SCAN_ERROR); - /* if we already have a Subrs, then skip the second one */ - /* The second one is for hiresolution devices. */ - if (FontP->Subrs.data.arrayP != NULL) { - TwoSubrs = TRUE; - /* process all the Subrs, but do not update anything */ - /* can not just skip them because of the binary data */ - for (i=0;i INT_MAX / sizeof(psobj)) - return (SCAN_ERROR); - arrayP = (psobj *)vm_alloc(N*sizeof(psobj)); - if (!(arrayP) ) return(SCAN_OUT_OF_MEMORY); - FontP->Subrs.len = N; - FontP->Subrs.data.arrayP = arrayP; - /* get N values for Subrs */ - for (i=0;i INT_MAX / sizeof(psdict)) return(SCAN_ERROR); - /* save number of entries in the dictionary */ - - dictP = (psdict *)vm_alloc((N+1)*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - FontP->CharStringsP = dictP; - dictP[0].key.len = N; - /* get N values for CharStrings */ - for (i=1;i<=N;i++) { - /* look for next literal name */ - rc = getLiteralName(&(dictP[i].key)); - if (rc) return(rc); - /* get 1 integer */ - J = getInt(); - if (rc) return(rc); /* if next token was not an Int */ - if (J<0) return (SCAN_ERROR); - dictP[i].value.len = J; - /* get the next token, it should be RD or -|, either is ok */ - rc = getNextValue(TOKEN_NAME); - if ( rc != SCAN_OK ) return(rc); - rc = getNbytes(J); - if (rc == SCAN_OK) { - dictP[i].value.data.valueP = tokenStartP; - if ( !(vm_alloc(J)) ) return(SCAN_OUT_OF_MEMORY); - } - else return(rc); - } - return(SCAN_OK); - -} -/***================================================================***/ -#if XFONT_CID -/***================================================================***/ -/* - * BuildCIDFontInfo Dictionary - */ -/***================================================================***/ -static int -BuildCIDFontInfo(cidfont *CIDfontP) -{ - psdict *dictP; - - /* allocate the private dictionary (max number of entries + 1) */ - dictP = (psdict *)vm_alloc(20*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - - CIDfontP->CIDfontInfoP = dictP; - CIDfontP->CIDfontInfoP[0].key.len = 18; /* number of actual entries */ - objFormatName(&(dictP[CIDCOUNT].key),8,"CIDCount"); - objFormatInteger(&(dictP[CIDCOUNT].value),-1); - objFormatName(&(dictP[CIDFONTNAME].key),11,"CIDFontName"); - objFormatName(&(dictP[CIDFONTNAME].value),0,NULL); - objFormatName(&(dictP[CIDFONTTYPE].key),11,"CIDFontType"); - objFormatInteger(&(dictP[CIDFONTTYPE].value),-1); - objFormatName(&(dictP[CIDVERSION].key),14,"CIDFontVersion"); - objFormatInteger(&(dictP[CIDVERSION].value),-1); - objFormatName(&(dictP[CIDREGISTRY].key),8,"Registry"); - objFormatString(&(dictP[CIDREGISTRY].value),0,NULL); - objFormatName(&(dictP[CIDORDERING].key),8,"Ordering"); - objFormatString(&(dictP[CIDORDERING].value),0,NULL); - objFormatName(&(dictP[CIDSUPPLEMENT].key),10,"Supplement"); - objFormatInteger(&(dictP[CIDSUPPLEMENT].value),-1); - objFormatName(&(dictP[CIDMAPOFFSET].key),12,"CIDMapOffset"); - objFormatInteger(&(dictP[CIDMAPOFFSET].value),-1); - objFormatName(&(dictP[CIDFDARRAY].key),7,"FDArray"); - objFormatArray(&(dictP[CIDFDARRAY].value),0,NULL); - objFormatName(&(dictP[CIDFDBYTES].key),7,"FDBytes"); - objFormatInteger(&(dictP[CIDFDBYTES].value),-1); - objFormatName(&(dictP[CIDFONTBBOX].key),8,"FontBBox"); - objFormatArray(&(dictP[CIDFONTBBOX].value),0,NULL); - objFormatName(&(dictP[CIDFULLNAME].key),8,"FullName"); - objFormatString(&(dictP[CIDFULLNAME].value),0,NULL); - objFormatName(&(dictP[CIDFAMILYNAME].key),10,"FamilyName"); - objFormatString(&(dictP[CIDFAMILYNAME].value),0,NULL); - objFormatName(&(dictP[CIDWEIGHT].key),6,"Weight"); - objFormatString(&(dictP[CIDWEIGHT].value),0,NULL); - objFormatName(&(dictP[CIDNOTICE].key),6,"Notice"); - objFormatString(&(dictP[CIDNOTICE].value),0,NULL); - objFormatName(&(dictP[CIDGDBYTES].key),7,"GDBytes"); - objFormatInteger(&(dictP[CIDGDBYTES].value),-1); - objFormatName(&(dictP[CIDUIDBASE].key),7,"UIDBase"); - objFormatInteger(&(dictP[CIDUIDBASE].value),0); - objFormatName(&(dictP[CIDXUID].key),4,"XUID"); - objFormatInteger(&(dictP[CIDXUID].value),0); - return(SCAN_OK); -} -/***================================================================***/ -/* - * BuildCMapInfo Dictionary - */ -/***================================================================***/ -static int -BuildCMapInfo(cmapres *CMapP) -{ - psdict *dictP; - - /* allocate the private dictionary (max number of entries + 1) */ - dictP = (psdict *)vm_alloc(20*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - - CMapP->CMapInfoP = dictP; - CMapP->CMapInfoP[0].key.len = 8; /* number of actual entries */ - objFormatName(&(dictP[CMAPREGISTRY].key),8,"Registry"); - objFormatString(&(dictP[CMAPREGISTRY].value),0,NULL); - objFormatName(&(dictP[CMAPORDERING].key),8,"Ordering"); - objFormatString(&(dictP[CMAPORDERING].value),0,NULL); - objFormatName(&(dictP[CMAPSUPPLEMENT].key),10,"Supplement"); - objFormatInteger(&(dictP[CMAPSUPPLEMENT].value),-1); - objFormatName(&(dictP[CMAPNAME].key),8,"CMapName"); - objFormatString(&(dictP[CMAPNAME].value),0,NULL); - objFormatName(&(dictP[CMAPVERSION].key),11,"CMapVersion"); - objFormatInteger(&(dictP[CMAPVERSION].value),-1); - objFormatName(&(dictP[CMAPTYPE].key),8,"CMapType"); - objFormatInteger(&(dictP[CMAPTYPE].value),-1); - objFormatName(&(dictP[CMAPWMODE].key),5,"WMode"); - objFormatInteger(&(dictP[CMAPWMODE].value),-1); - objFormatName(&(dictP[CMAPCIDCOUNT].key),8,"CIDCount"); - objFormatInteger(&(dictP[CMAPCIDCOUNT].value),-1); - return(SCAN_OK); -} -#endif - -/***================================================================***/ -/* - * BuildFontInfo Dictionary - */ -/***================================================================***/ -static int -BuildFontInfo(psfont *fontP) -{ - psdict *dictP; - - /* allocate the private dictionary */ - dictP = (psdict *)vm_alloc(20*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - - fontP->fontInfoP = dictP; - fontP->fontInfoP[0].key.len = 17; /* number of actual entries */ - objFormatName(&(dictP[FONTNAME].key),8,"FontName"); - objFormatName(&(dictP[FONTNAME].value),0,NULL); - objFormatName(&(dictP[PAINTTYPE].key),9,"PaintType"); - objFormatInteger(&(dictP[PAINTTYPE].value),0); - objFormatName(&(dictP[FONTTYPENUM].key),8,"FontType"); - objFormatInteger(&(dictP[FONTTYPENUM].value),0); - objFormatName(&(dictP[FONTMATRIX].key),10,"FontMatrix"); - objFormatArray(&(dictP[FONTMATRIX].value),0,NULL); - objFormatName(&(dictP[FONTBBOX].key),8,"FontBBox"); - objFormatArray(&(dictP[FONTBBOX].value),0,NULL); - objFormatName(&(dictP[ENCODING].key),8,"Encoding"); - objFormatEncoding(&(dictP[ENCODING].value),0,NULL); - objFormatName(&(dictP[UNIQUEID].key),8,"UniqueID"); - objFormatInteger(&(dictP[UNIQUEID].value),0); - objFormatName(&(dictP[STROKEWIDTH].key),11,"StrokeWidth"); - objFormatReal(&(dictP[STROKEWIDTH].value),0.0); - objFormatName(&(dictP[VERSION].key),7,"version"); - objFormatString(&(dictP[VERSION].value),0,NULL); - objFormatName(&(dictP[NOTICE].key),6,"Notice"); - objFormatString(&(dictP[NOTICE].value),0,NULL); - objFormatName(&(dictP[FULLNAME].key),8,"FullName"); - objFormatString(&(dictP[FULLNAME].value),0,NULL); - objFormatName(&(dictP[FAMILYNAME].key),10,"FamilyName"); - objFormatString(&(dictP[FAMILYNAME].value),0,NULL); - objFormatName(&(dictP[WEIGHT].key),6,"Weight"); - objFormatString(&(dictP[WEIGHT].value),0,NULL); - objFormatName(&(dictP[ITALICANGLE].key),11,"ItalicAngle"); - objFormatReal(&(dictP[ITALICANGLE].value),0.0); - objFormatName(&(dictP[ISFIXEDPITCH].key),12,"isFixedPitch"); - objFormatBoolean(&(dictP[ISFIXEDPITCH].value),FALSE); - objFormatName(&(dictP[UNDERLINEPOSITION].key),17,"UnderlinePosition"); - objFormatReal(&(dictP[UNDERLINEPOSITION].value),0.0); - objFormatName(&(dictP[UNDERLINETHICKNESS].key),18,"UnderlineThickness"); - objFormatReal(&(dictP[UNDERLINETHICKNESS].value),0.0); - return(SCAN_OK); -} -#if XFONT_CID -/***================================================================***/ -/* - * BuildCIDType1Private Dictionary - */ -/***================================================================***/ -static int -BuildCIDType1Private(psfont *fontP) -{ - psdict *Private; - - /* allocate the private dictionary */ - Private = (psdict *)vm_alloc(21*sizeof(psdict)); - - if (!(Private)) return(SCAN_OUT_OF_MEMORY); - - fontP->Private = Private; - fontP->Private[0].key.len = 20; /* number of actual entries */ - - objFormatName(&(Private[CIDT1MINFEATURE].key),10,"MinFeature"); - objFormatArray(&(Private[CIDT1MINFEATURE].value),0,NULL); - objFormatName(&(Private[CIDT1LENIV].key),5,"lenIV"); - objFormatInteger(&(Private[CIDT1LENIV].value),DEFAULTLENIV); - objFormatName(&(Private[CIDT1LANGGROUP].key),13,"LanguageGroup"); - objFormatInteger(&(Private[CIDT1LANGGROUP].value),DEFAULTLANGUAGEGROUP); - objFormatName(&(Private[CIDT1BLUEVALUES].key),10,"BlueValues"); - objFormatArray(&(Private[CIDT1BLUEVALUES].value),0,NULL); - objFormatName(&(Private[CIDT1OTHERBLUES].key),10,"OtherBlues"); - objFormatArray(&(Private[CIDT1OTHERBLUES].value),0,NULL); - objFormatName(&(Private[CIDT1BLUESCALE].key),9,"BlueScale"); - objFormatReal(&(Private[CIDT1BLUESCALE].value),DEFAULTBLUESCALE); - objFormatName(&(Private[CIDT1BLUEFUZZ].key),8,"BlueFuzz"); - objFormatInteger(&(Private[CIDT1BLUEFUZZ].value),DEFAULTBLUEFUZZ); - objFormatName(&(Private[CIDT1BLUESHIFT].key),9,"BlueShift"); - objFormatInteger(&(Private[CIDT1BLUESHIFT].value),DEFAULTBLUESHIFT); - objFormatName(&(Private[CIDT1FAMBLUES].key),11,"FamilyBlues"); - objFormatArray(&(Private[CIDT1FAMBLUES].value),0,NULL); - objFormatName(&(Private[CIDT1FAMOTHERBLUES].key),16,"FamilyOtherBlues"); - objFormatArray(&(Private[CIDT1FAMOTHERBLUES].value),0,NULL); - objFormatName(&(Private[CIDT1STDHW].key),5,"StdHW"); - objFormatArray(&(Private[CIDT1STDHW].value),0,NULL); - objFormatName(&(Private[CIDT1STDVW].key),5,"StdVW"); - objFormatArray(&(Private[CIDT1STDVW].value),0,NULL); - objFormatName(&(Private[CIDT1STEMSNAPH].key),9,"StemSnapH"); - objFormatArray(&(Private[CIDT1STEMSNAPH].value),0,NULL); - objFormatName(&(Private[CIDT1STEMSNAPV].key),9,"StemSnapV"); - objFormatArray(&(Private[CIDT1STEMSNAPV].value),0,NULL); - /* skip password */ - objFormatName(&(Private[CIDT1SUBMAPOFF].key),13,"SubrMapOffset"); - objFormatInteger(&(Private[CIDT1SUBMAPOFF].value),0); - objFormatName(&(Private[CIDT1SDBYTES].key),7,"SDBytes"); - objFormatInteger(&(Private[CIDT1SDBYTES].value),0); - objFormatName(&(Private[CIDT1SUBRCNT].key),9,"SubrCount"); - objFormatInteger(&(Private[CIDT1SUBRCNT].value),0); - objFormatName(&(Private[CIDT1FORCEBOLD].key),9,"ForceBold"); - objFormatBoolean(&(Private[CIDT1FORCEBOLD].value),DEFAULTFORCEBOLD); - objFormatName(&(Private[CIDT1RNDSTEMUP].key),9,"RndStemUp"); - objFormatBoolean(&(Private[CIDT1RNDSTEMUP].value),DEFAULTRNDSTEMUP); - objFormatName(&(Private[CIDT1EXPFACTOR].key),15,"ExpansionFactor"); - objFormatReal(&(Private[CIDT1EXPFACTOR].value), - DEFAULTEXPANSIONFACTOR); - return(SCAN_OK); -} -#endif -/***================================================================***/ -/* - * BuildPrivate Dictionary - */ -/***================================================================***/ -static int -BuildPrivate(psfont *fontP) -{ - psdict *Private; - - /* allocate the private dictionary */ - Private = (psdict *)vm_alloc(20*sizeof(psdict)); - - if (!(Private)) return(SCAN_OUT_OF_MEMORY); - - fontP->Private = Private; - fontP->Private[0].key.len = 16; /* number of actual entries */ - - objFormatName(&(Private[BLUEVALUES].key),10,"BlueValues"); - objFormatArray(&(Private[BLUEVALUES].value),0,NULL); - objFormatName(&(Private[OTHERBLUES].key),10,"OtherBlues"); - objFormatArray(&(Private[OTHERBLUES].value),0,NULL); - objFormatName(&(Private[FAMILYBLUES].key),11,"FamilyBlues"); - objFormatArray(&(Private[FAMILYBLUES].value),0,NULL); - objFormatName(&(Private[FAMILYOTHERBLUES].key),16,"FamilyOtherBlues"); - objFormatArray(&(Private[FAMILYOTHERBLUES].value),0,NULL); - objFormatName(&(Private[BLUESCALE].key),9,"BlueScale"); - objFormatReal(&(Private[BLUESCALE].value),DEFAULTBLUESCALE); - objFormatName(&(Private[BLUESHIFT].key),9,"BlueShift"); - objFormatInteger(&(Private[BLUESHIFT].value),DEFAULTBLUESHIFT); - objFormatName(&(Private[BLUEFUZZ].key),8,"BlueFuzz"); - objFormatInteger(&(Private[BLUEFUZZ].value),DEFAULTBLUEFUZZ); - objFormatName(&(Private[STDHW].key),5,"StdHW"); - objFormatArray(&(Private[STDHW].value),0,NULL); - objFormatName(&(Private[STDVW].key),5,"StdVW"); - objFormatArray(&(Private[STDVW].value),0,NULL); - objFormatName(&(Private[STEMSNAPH].key),9,"StemSnapH"); - objFormatArray(&(Private[STEMSNAPH].value),0,NULL); - objFormatName(&(Private[STEMSNAPV].key),9,"StemSnapV"); - objFormatArray(&(Private[STEMSNAPV].value),0,NULL); - objFormatName(&(Private[FORCEBOLD].key),9,"ForceBold"); - objFormatBoolean(&(Private[FORCEBOLD].value),DEFAULTFORCEBOLD); - objFormatName(&(Private[LANGUAGEGROUP].key),13,"LanguageGroup"); - objFormatInteger(&(Private[LANGUAGEGROUP].value),DEFAULTLANGUAGEGROUP); - objFormatName(&(Private[LENIV].key),5,"lenIV"); - objFormatInteger(&(Private[LENIV].value),DEFAULTLENIV); - objFormatName(&(Private[RNDSTEMUP].key),9,"RndStemUp"); - objFormatBoolean(&(Private[RNDSTEMUP].value),DEFAULTRNDSTEMUP); - objFormatName(&(Private[EXPANSIONFACTOR].key),9,"ExpansionFactor"); - objFormatReal(&(Private[EXPANSIONFACTOR].value), - DEFAULTEXPANSIONFACTOR); - return(SCAN_OK); -} -/***================================================================***/ -/**********************************************************************/ -/* GetType1Blues(fontP) */ -/* */ -/* Routine to support font-level hints. */ -/* */ -/* Gets all the Blues information from the Private dictionary */ -/* for the font. */ -/* */ -/* */ -/**********************************************************************/ -static int -GetType1Blues(psfont *fontP) -{ - psdict *PrivateDictP; /* the Private dict relating to hints */ - struct blues_struct *blues; /* ptr for the blues struct we will allocate */ - int i; - psobj *HintEntryP; - - - - /* get the Private dictionary pointer */ - PrivateDictP = fontP->Private; - - /* allocate the memory for the blues structure */ - blues = (struct blues_struct *) vm_alloc(sizeof(struct blues_struct)); - - if (!blues) return(SCAN_OUT_OF_MEMORY); - - /* Make fontP's blues ptr point to this newly allocated structure. */ - fontP->BluesP = blues; - - /* fill in the BlueValues array */ - HintEntryP = &(PrivateDictP[BLUEVALUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numBlueValues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMBLUEVALUES) { - blues->numBlueValues = NUMBLUEVALUES; - } else - blues->numBlueValues = HintEntryP->len; - for (i = 0; i<= blues->numBlueValues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->BlueValues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->BlueValues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->BlueValues[i] = 0; - } - } - - /* fill in the OtherBlues array */ - HintEntryP = &(PrivateDictP[OTHERBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numOtherBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMOTHERBLUES) { - blues->numOtherBlues = NUMOTHERBLUES; - } else - blues->numOtherBlues = HintEntryP->len; - for (i = 0; i<= blues->numOtherBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->OtherBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->OtherBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->OtherBlues[i] = 0; - } - } - - /* fill in the FamilyBlues array */ - HintEntryP = &(PrivateDictP[FAMILYBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numFamilyBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMFAMILYBLUES) { - blues->numFamilyBlues = NUMFAMILYBLUES; - } else - blues->numFamilyBlues = HintEntryP->len; - for (i = 0; i<= blues->numFamilyBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->FamilyBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->FamilyBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->FamilyBlues[i] = 0; - } - } - - /* fill in the FamilyOtherBlues array */ - HintEntryP = &(PrivateDictP[FAMILYOTHERBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numFamilyOtherBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMFAMILYOTHERBLUES) { - blues->numFamilyOtherBlues = NUMFAMILYOTHERBLUES; - } else - blues->numFamilyOtherBlues = HintEntryP->len; - for (i = 0; i<= blues->numFamilyOtherBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->FamilyOtherBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->FamilyOtherBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->FamilyOtherBlues[i] = 0; - } - } - - /* fill in the StemSnapH array */ - HintEntryP = &(PrivateDictP[STEMSNAPH].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numStemSnapH = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMSTEMSNAPH) { - blues->numStemSnapH = NUMSTEMSNAPH; - } else - blues->numStemSnapH = HintEntryP->len; - for (i = 0; i<= blues->numStemSnapH-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->StemSnapH[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->StemSnapH[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->StemSnapH[i] = 0; - } - } - - /* fill in the StemSnapV array */ - HintEntryP = &(PrivateDictP[STEMSNAPV].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numStemSnapV = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMSTEMSNAPV) { - blues->numStemSnapV = NUMSTEMSNAPV; - } else - blues->numStemSnapV = HintEntryP->len; - for (i = 0; i<= blues->numStemSnapV-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->StemSnapV[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->StemSnapV[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->StemSnapV[i] = 0; - } - } - - /* fill in the StdVW array */ - HintEntryP = &(PrivateDictP[STDVW].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - /* a value of zero signifies no entry */ - blues->StdVW = 0; - else { - if (HintEntryP->len > NUMSTDVW) { - } - if (objPIsInteger(&HintEntryP->data.arrayP[0])) - blues->StdVW = HintEntryP->data.arrayP[0].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[0])) - blues->StdVW = HintEntryP->data.arrayP[0].data.real; - else - blues->StdVW = 0; - } - - /* fill in the StdHW array */ - HintEntryP = &(PrivateDictP[STDHW].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - /* a value of zero signifies no entry */ - blues->StdHW = 0; - else { - if (HintEntryP->len > NUMSTDHW) { - } - if (objPIsInteger(&HintEntryP->data.arrayP[0])) - blues->StdHW = HintEntryP->data.arrayP[0].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[0])) - blues->StdHW = HintEntryP->data.arrayP[0].data.real; - else - blues->StdHW = 0; - } - - - /* get the ptr to the BlueScale entry */ - HintEntryP = &(PrivateDictP[BLUESCALE].value); - /* put the BlueScale in the blues structure */ - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueScale = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueScale = HintEntryP->data.real; - else - blues->BlueScale = DEFAULTBLUESCALE; - - /* get the ptr to the BlueShift entry */ - HintEntryP = &(PrivateDictP[BLUESHIFT].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueShift = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueShift = HintEntryP->data.real; - else - blues->BlueShift = DEFAULTBLUESHIFT; - - /* get the ptr to the BlueFuzz entry */ - HintEntryP = &(PrivateDictP[BLUEFUZZ].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueFuzz = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueFuzz = HintEntryP->data.real; - else - blues->BlueFuzz = DEFAULTBLUEFUZZ; - - /* get the ptr to the ForceBold entry */ - HintEntryP = &(PrivateDictP[FORCEBOLD].value); - if (objPIsBoolean(HintEntryP)) /* Must be integer! */ - blues->ForceBold = HintEntryP->data.boolean; - else - blues->ForceBold = DEFAULTFORCEBOLD; - - /* get the ptr to the LanguageGroup entry */ - HintEntryP = &(PrivateDictP[LANGUAGEGROUP].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->LanguageGroup = HintEntryP->data.integer; - else - blues->LanguageGroup = DEFAULTLANGUAGEGROUP; - - /* get the ptr to the RndStemUp entry */ - HintEntryP = &(PrivateDictP[RNDSTEMUP].value); - if (objPIsBoolean(HintEntryP)) /* Must be integer! */ - blues->RndStemUp = HintEntryP->data.boolean; - else - blues->RndStemUp = DEFAULTRNDSTEMUP; - - /* get the ptr to the lenIV entry */ - HintEntryP = &(PrivateDictP[LENIV].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->lenIV = HintEntryP->data.integer; - else - blues->lenIV = DEFAULTLENIV; - - /* get the ptr to the ExpansionFactor entry */ - HintEntryP = &(PrivateDictP[EXPANSIONFACTOR].value); - if (objPIsInteger(HintEntryP)) - blues->ExpansionFactor = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) - blues->ExpansionFactor = HintEntryP->data.real; - else - blues->ExpansionFactor = DEFAULTEXPANSIONFACTOR; - return(SCAN_OK); -} -/**********************************************************************/ -/* GetType1CharString(fontP,code) */ -/* */ -/* Look up code in the standard encoding vector and return */ -/* the charstring associated with the character name. */ -/* */ -/* fontP is the psfont structure. */ -/* */ -/* Returns a psobj (string) */ -/**********************************************************************/ -psobj * -GetType1CharString(psfont *fontP, unsigned char code) -{ - int N; /* the 'Nth' entry in the CharStrings */ - psobj *charnameP; /* points to psobj that is name of character*/ - - psdict *CharStringsDictP; /* dictionary with char strings */ - psobj *theStringP; /* the definition for the code */ - - - - if (StdEncArrayP == NULL) { - return(NULL); - } - /* use the code to index into the standard encoding vector */ - charnameP = &(StdEncArrayP[code]); - - /* test if the encoding array points to a name */ - if (!(objPIsName(charnameP)) ) { - return(NULL); - } - - /* Now that we have the character name out of the standardencoding */ - /* get the character definition out of the current font */ - CharStringsDictP = fontP->CharStringsP; - - /* search the chars string for this charname as key */ - N = SearchDictName(CharStringsDictP,charnameP); - if (N<=0) { - return(NULL); - } - /* OK, the nth item is the psobj that is the string for this char */ - theStringP = &(CharStringsDictP[N].value); - - return(theStringP); -} - -/***================================================================***/ -/* - * FindDictValue - */ -/***================================================================***/ - -static int -FindDictValue(psdict *dictP) -{ - psobj LitName; - int N; - int V; - - /* we have just scanned a token and it is a literal name */ - /* need to check if that name is in Private dictionary */ - objFormatName(&LitName,tokenLength,tokenStartP); - /* is it in the dictP */ - N = SearchDictName(dictP,&LitName); - /* if found */ - if ( N > 0 ) { - /* what type */ - switch (dictP[N].value.type) { - case OBJ_ENCODING: - V = getEncoding(&(dictP[N].value)); - if ( V != SCAN_OK ) return(V); - break; - case OBJ_ARRAY: -#if XFONT_CID - if (0 == strncmp(tokenStartP,"FDArray",7)) - V = getFDArray(&(dictP[N].value)); - else - V = getArray(&(dictP[N].value)); -#else - V = getArray(&(dictP[N].value)); -#endif - if ( V != SCAN_OK ) return(V); - break; - case OBJ_INTEGER: - /* next value in integer */ - dictP[N].value.data.integer = getInt(); - if (rc) return(rc); /* if next token was not an Int */ - break; - case OBJ_REAL: - /* next value must be real or int, store as a real */ - scan_token(inputP); - if (tokenType == TOKEN_REAL) { - dictP[N].value.data.real = tokenValue.real; - } - else - if (tokenType == TOKEN_INTEGER) { - dictP[N].value.data.real = tokenValue.integer; - } - else return(SCAN_ERROR); - break; - case OBJ_NAME: - V = getNextValue(TOKEN_LITERAL_NAME); - if ( V != SCAN_OK ) return(V); - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatName(&(dictP[N].value),tokenLength,tokenStartP); - break; - case OBJ_STRING: - V = getNextValue(TOKEN_STRING); - if ( V != SCAN_OK ) return(V); - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatString(&(dictP[N].value),tokenLength,tokenStartP); - break; - case OBJ_BOOLEAN: - scan_token(inputP); - if (tokenType != TOKEN_NAME) { - return(SCAN_ERROR); - } - if (0 == strncmp(tokenStartP,"true",4) ) { - dictP[N].value.data.boolean =TRUE; - } - else - if (0 == strncmp(tokenStartP,"false",5) ) { - dictP[N].value.data.boolean =FALSE; - } - else return(SCAN_ERROR); - break; - - default: - return(SCAN_ERROR); - } - } - /* Name is not in dictionary. That is ok. */ - return(SCAN_OK); - -} -/***================================================================***/ - -#if XFONT_CID -/* - * ------------------------------------------------------------------- - * Scan the next token and convert it into an object - * Result is placed on the Operand Stack as next object - * ------------------------------------------------------------------- - */ -int -scan_cidfont(cidfont *CIDFontP, cmapres *CMapP) -{ - char filename[CID_PATH_MAX]; - char cmapfile[CID_PATH_MAX]; - char buf[CID_BUFSIZE]; - char filetype[3]; - FILE *fileP; - FILE *fileP1; - char *nameP; - int namelen; - int i, j; - int cread, rangecnt; - unsigned int char_row, char_col; - - filetype[0] = 'r'; - filetype[1] = 'b'; - filetype[2] = '\0'; - - /* copy the filename and remove leading or trailing blanks */ - /* point to name and search for leading blanks */ - nameP= CIDFontP->CIDFontFileName.data.nameP; - namelen = CIDFontP->CIDFontFileName.len; - while (nameP[0] == ' ') { - nameP++; - namelen--; - } - /* now remove any trailing blanks */ - while ((namelen>0) && ( nameP[namelen-1] == ' ')) { - namelen--; - } - strncpy(filename,nameP,namelen); - filename[namelen] = '\0'; - /* file name is now constructed */ - inputFile.data.fileP = NULL; - filterFile.data.fileP = NULL; - - /* check whether a CIDFont file */ - if ((fileP = fopen(filename,filetype))) { - cread = fread(buf, 1, CID_BUFSIZE, fileP); - fclose(fileP); - if (cread > 17) { - if (strncmp(buf, "%!", 2) || - strstr(buf, "Resource-CIDFont") == NULL) - return(SCAN_FILE_OPEN_ERROR); - } else - return(SCAN_FILE_OPEN_ERROR); - } else - return(SCAN_FILE_OPEN_ERROR); - - /* copy the CMap file name and remove leading or trailing blanks */ - /* point to name and search for leading blanks */ - nameP = CMapP->CMapFileName.data.nameP; - namelen = CMapP->CMapFileName.len; - while (nameP[0] == ' ') { - nameP++; - namelen--; - } - /* now remove any trailing blanks */ - while ((namelen>0) && ( nameP[namelen-1] == ' ')) { - namelen--; - } - strncpy(cmapfile,nameP,namelen); - cmapfile[namelen] = '\0'; - /* CMap file name is now constructed */ - inputFile1.data.fileP = NULL; - - /* check whether a CMap file */ - if ((fileP1 = fopen(cmapfile,filetype))) { - cread = fread(buf, 1, CID_BUFSIZE, fileP1); - fclose(fileP1); - if (cread > 17) { - if (strncmp(buf, "%!", 2) || - strstr(buf, "Resource-CMap") == NULL) - return(SCAN_FILE_OPEN_ERROR); - } else - return(SCAN_FILE_OPEN_ERROR); - } else - return(SCAN_FILE_OPEN_ERROR); - - /* read the specified CMap file */ - inputP = &inputFile1; - - if (!(fileP1 = fopen(cmapfile,filetype))) - return(SCAN_FILE_OPEN_ERROR); - - objFormatFile(inputP,fileP1); - - if ((rc = BuildCMapInfo(CMapP)) != 0) - return(rc); - - /* Assume everything will be OK */ - rc = 0; - rangecnt = 0; - - do { - /* Scan the next token */ - scan_token(inputP); - if (tokenType == TOKEN_INTEGER) - rangecnt = tokenValue.integer; - - if (rangecnt < 0 || rangecnt > INT_MAX / sizeof(spacerangecode)) { - rc = SCAN_ERROR; - break; - } - /* ==> tokenLength, tokenTooLong, tokenType, and */ - /* tokenValue are now set */ - - switch (tokenType) { - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - /* in this case we are done */ - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - rc = SCAN_ERROR; - break; - case TOKEN_LITERAL_NAME: - /* Look up the name */ - tokenStartP[tokenLength] = '\0'; - - rc = FindDictValue(CMapP->CMapInfoP); - /* we are not going to report errors except out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - case TOKEN_NAME: - if (0 == strncmp(tokenStartP,"begincodespacerange",19)) { - CIDFontP->spacerangecnt++; - spacerangeP = (spacerange *)vm_alloc(sizeof(spacerange)); - if (!spacerangeP) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - spacerangeP->next = NULL; - spacerangeP->rangecnt = rangecnt; - spacerangeP->spacecode = - (spacerangecode *)vm_alloc(rangecnt*sizeof(spacerangecode)); - if (!spacerangeP->spacecode) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - for (i = 0; i < rangecnt; i++) { - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - spacerangeP->spacecode[i].srcCodeLo = 0; - for (j = 0; j < tokenLength; j++) - spacerangeP->spacecode[i].srcCodeLo += - (unsigned char)tokenStartP[j] << (8 * (tokenLength - 1 - j)); - - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - spacerangeP->spacecode[i].srcCodeHi = 0; - for (j = 0; j < tokenLength; j++) - spacerangeP->spacecode[i].srcCodeHi += - (unsigned char)tokenStartP[j] << (8 * (tokenLength - 1 - j)); - } - - if (CIDFontP->spacerangeP) { - if (CIDFontP->spacerangeP->next == NULL) - CIDFontP->spacerangeP->next = spacerangeP; - else { - spacerangeP->next = CIDFontP->spacerangeP->next; - CIDFontP->spacerangeP->next = spacerangeP; - } - } else - CIDFontP->spacerangeP = spacerangeP; - - /* read "endcodespacerange" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || (tokenType == TOKEN_NAME && - (strncmp(tokenStartP,"endcodespacerange",17) != 0))) { - rc = SCAN_ERROR; - break; - } - } - if (0 == strncmp(tokenStartP,"begincidrange",13)) { - CIDFontP->cidrangecnt++; - cidrangeP = (cidrange *)vm_alloc(sizeof(cidrange)); - if (!cidrangeP) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - cidrangeP->next = NULL; - cidrangeP->rangecnt = rangecnt; - cidrangeP->range = - (cidrangecode *)vm_alloc(rangecnt*sizeof(cidrangecode)); - if (!cidrangeP->range) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - for (i = 0; i < rangecnt; i++) { - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - cidrangeP->range[i].srcCodeLo = 0; - for (j = 0; j < tokenLength; j++) - cidrangeP->range[i].srcCodeLo += - (unsigned char)tokenStartP[j] << (8 * (tokenLength - 1 - j)); - char_row = (cidrangeP->range[i].srcCodeLo >> 8) & 0xff; - char_col = cidrangeP->range[i].srcCodeLo & 0xff; - if (char_row < CMapP->firstRow) - CMapP->firstRow = char_row; - if (char_row > CMapP->lastRow) - CMapP->lastRow = char_row; - if (char_col < CMapP->firstCol) - CMapP->firstCol = char_col; - if (char_col > CMapP->lastCol) - CMapP->lastCol = char_col; - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - cidrangeP->range[i].srcCodeHi = 0; - for (j = 0; j < tokenLength; j++) - cidrangeP->range[i].srcCodeHi += - (unsigned char)tokenStartP[j] << (8 * (tokenLength - 1 - j)); - char_row = (cidrangeP->range[i].srcCodeHi >> 8) & 0xff; - char_col = cidrangeP->range[i].srcCodeHi & 0xff; - if (char_row < CMapP->firstRow) - CMapP->firstRow = char_row; - if (char_row > CMapP->lastRow) - CMapP->lastRow = char_row; - if (char_col < CMapP->firstCol) - CMapP->firstCol = char_col; - if (char_col > CMapP->lastCol) - CMapP->lastCol = char_col; - scan_token(inputP); - if (tokenType != TOKEN_INTEGER) { - rc = SCAN_ERROR; - break; - } - cidrangeP->range[i].dstCIDLo = tokenValue.integer; - } - - if (CIDFontP->cidrangeP) { - if (CIDFontP->cidrangeP->next == NULL) - CIDFontP->cidrangeP->next = cidrangeP; - else { - cidrangeP->next = CIDFontP->cidrangeP->next; - CIDFontP->cidrangeP->next = cidrangeP; - } - } else - CIDFontP->cidrangeP = cidrangeP; - - /* read "endcidrange" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || (tokenType == TOKEN_NAME && - (strncmp(tokenStartP,"endcidrange",11) != 0))) { - rc = SCAN_ERROR; - break; - } - } - - if (0 == strncmp(tokenStartP,"beginnotdefrange",16)) { - CIDFontP->notdefrangecnt++; - notdefrangeP = (cidrange *)vm_alloc(sizeof(cidrange)); - if (!notdefrangeP) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - notdefrangeP->next = 0; - notdefrangeP->rangecnt = rangecnt; - notdefrangeP->range = - (cidrangecode *)vm_alloc(rangecnt*sizeof(cidrangecode)); - if (!notdefrangeP->range) { - rc = SCAN_OUT_OF_MEMORY; - break; - } - for (i = 0; i < rangecnt; i++) { - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - notdefrangeP->range[i].srcCodeLo = 0; - for (j = 0; j < tokenLength; j++) - notdefrangeP->range[i].srcCodeLo = (int)(tokenStartP[j] << - (8 * (tokenLength - 1 - j))); - scan_token(inputP); - if (tokenType != TOKEN_HEX_STRING) { - rc = SCAN_ERROR; - break; - } - notdefrangeP->range[i].srcCodeHi = 0; - for (j = 0; j < tokenLength; j++) - notdefrangeP->range[i].srcCodeHi = (int)(tokenStartP[j] << - (8 * (tokenLength - 1 - j))); - scan_token(inputP); - if (tokenType != TOKEN_INTEGER) { - rc = SCAN_ERROR; - break; - } - notdefrangeP->range[i].dstCIDLo = tokenValue.integer; - } - if (CIDFontP->notdefrangeP) { - if (CIDFontP->notdefrangeP->next == NULL) - CIDFontP->notdefrangeP->next = notdefrangeP; - else { - notdefrangeP->next = CIDFontP->notdefrangeP->next; - CIDFontP->notdefrangeP->next = notdefrangeP; - } - } else - CIDFontP->notdefrangeP = notdefrangeP; - - /* read "endnotdefrange" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME || (tokenType == TOKEN_NAME && - (strncmp(tokenStartP,"endnotdefrange",14) != 0))) { - rc = SCAN_ERROR; - break; - } - } - - if (0 == strncmp(tokenStartP,"endcmap",7)) { - if (CMapP->CMapInfoP[CMAPREGISTRY].value.data.valueP == NULL || - CMapP->CMapInfoP[CMAPORDERING].value.data.valueP == NULL || - CMapP->CMapInfoP[CMAPSUPPLEMENT].value.data.integer == -1) { - rc = SCAN_ERROR; - break; - } else { - rc = SCAN_FILE_EOF; - break; - } - } - break; - } - } - while (rc == 0); - fclose(inputP->data.fileP); - if (tokenTooLong) - rc = SCAN_OUT_OF_MEMORY; - if (rc == SCAN_OUT_OF_MEMORY) return(rc); - - /* open the specified CIDFont file */ - if (!(fileP = fopen(filename,filetype))) - return(SCAN_FILE_OPEN_ERROR); - - inputP = &inputFile; - objFormatFile(inputP,fileP); - CIDWantFontInfo = TRUE; - TwoSubrs = FALSE; - rc = BuildCIDFontInfo(CIDFontP); - if (rc != 0) return(rc); - - /* Assume everything will be OK */ - rc = 0; - - /* Loop until complete font is read */ - do { - /* Scan the next token */ - scan_token(inputP); - - /* ==> tokenLength, tokenTooLong, tokenType, and tokenValue are */ - /* now set */ - - switch (tokenType) { - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - /* in this case we are done */ - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - rc = SCAN_ERROR; - break; - case TOKEN_LITERAL_NAME: - /* Look up the name */ - tokenStartP[tokenLength] = '\0'; - - if (CIDWantFontInfo) { - rc = FindDictValue(CIDFontP->CIDfontInfoP); - /* we are not going to report errors except out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } - break; - case TOKEN_STRING: - tokenStartP[tokenLength] = '\0'; - if (0 == strncmp(tokenStartP,"Binary",6)) { - CIDFontP->binarydata = 1; - scan_token(inputP); - if (tokenType == TOKEN_INTEGER) - CIDFontP->bytecnt = tokenValue.integer; - else { - rc = SCAN_ERROR; - break; - } - } else if (0 == strncmp(tokenStartP,"Hex",3)) { - /* not yet supported */ - rc = SCAN_ERROR; - break; -#if 0 - /* uncomment when the hex format is supported */ - CIDFontP->binarydata = 0; - scan_token(inputP); - if (tokenType == TOKEN_INTEGER) - CIDFontP->bytecnt = tokenValue.integer; - else { - rc = SCAN_ERROR; - break; - } -#endif - } - break; - case TOKEN_NAME: - /* end of PostScript and beginning of data */ - if (0 == strncmp(tokenStartP,"StartData",9)) { - /* every CIDFont must have an FDArray */ - /* check whether other required dictionary entries were found */ - if (CIDFontP->CIDfontInfoP[CIDFDARRAY].value.data.arrayP == NULL || - CIDFontP->CIDfontInfoP[CIDFONTNAME].value.data.nameP == NULL || - CIDFontP->CIDfontInfoP[CIDFONTTYPE].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDVERSION].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDREGISTRY].value.data.valueP == NULL || - CIDFontP->CIDfontInfoP[CIDORDERING].value.data.valueP == NULL || - CIDFontP->CIDfontInfoP[CIDSUPPLEMENT].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP == NULL || - CIDFontP->CIDfontInfoP[CIDMAPOFFSET].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDFDBYTES].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDGDBYTES].value.data.integer == -1 || - CIDFontP->CIDfontInfoP[CIDCOUNT].value.data.integer == -1) { - rc = SCAN_ERROR; - break; - } else { - /* do Registry and Ordering entries match? */ - if (strcmp(CIDFontP->CIDfontInfoP[CIDREGISTRY].value.data.valueP, - CMapP->CMapInfoP[CMAPREGISTRY].value.data.valueP) != 0 || - strcmp(CIDFontP->CIDfontInfoP[CIDORDERING].value.data.valueP, - CMapP->CMapInfoP[CMAPORDERING].value.data.valueP) != 0) { - rc = SCAN_ERROR; - break; - } else { - fclose(inputP->data.fileP); - return(SCAN_OK); - } - } - } - break; - } - - } - while (rc ==0); - fclose(inputP->data.fileP); - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(rc); -} - -/* - * ------------------------------------------------------------------- - * Scan the next token and convert it into an object - * Result is placed on the Operand Stack as next object - * ------------------------------------------------------------------- - */ -int -scan_cidtype1font(psfont *FontP) -{ - int i; - int begincnt = 0; /* counter for the number of unpaired begin operators */ - int currentfilefound = 0; - - WantFontInfo = TRUE; - InPrivateDict = FALSE; - TwoSubrs = FALSE; - rc = BuildFontInfo(FontP); - if (rc != 0) return(rc); - - /* Assume everything will be OK */ - rc = 0; - filterFile.data.fileP = NULL; - - /* Loop until complete font is read */ - do { - /* Scan the next token */ - scan_token(inputP); - - /* ==> tokenLength, tokenTooLong, tokenType, and tokenValue are */ - /* now set */ - - switch (tokenType) { - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - /* in this case we are done */ - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - rc = SCAN_ERROR; - break; - case TOKEN_LITERAL_NAME: - /* Look up the name */ - tokenStartP[tokenLength] = '\0'; - if (InPrivateDict ) { - rc = FindDictValue(FontP->Private); - /* we are not going to report errors */ - /* Sometimes the font file may test a value such as */ - /* testing to see if the font is alreadly loaded with */ - /* same UniqueID. We would faile on /UniqueID get */ - /* because we are expecting a int to follow UniqueID*/ - /* If the correct object type does not follow a Name*/ - /* then we will skip over it without reporting error except */ - /* out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } /* end of reading Private dictionary */ - else - if (0 == strncmp(tokenStartP,"Private",7) ) { - InPrivateDict = TRUE; - rc = BuildCIDType1Private(FontP); - break; - } - else - if (WantFontInfo) { - rc = FindDictValue(FontP->fontInfoP); - /* we are not going to report errors except out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } - break; - case TOKEN_NAME: - if (0 == strncmp(tokenStartP,"currentfile",11)) { - currentfilefound = 1; - break; - } else if (0 == strncmp(tokenStartP,"eexec",5)) { - if (currentfilefound == 1) { - currentfilefound = 0; - filterFile.data.fileP = CIDeexec(inputP->data.fileP); - if (filterFile.data.fileP == NULL) { - fclose(inputFile.data.fileP); - return(SCAN_FILE_OPEN_ERROR); - } - inputP = &filterFile; - } else { - rc = SCAN_ERROR; - break; - } - } else if (0 == strncmp(tokenStartP,"begin",5)) { - begincnt++; - currentfilefound = 0; - } else if (0 == strncmp(tokenStartP,"end",3)) { - currentfilefound = 0; - begincnt--; - if (begincnt == 0) { - if (filterFile.data.fileP != NULL) { - scan_token(inputP); /* get 'currentfile' */ - scan_token(inputP); /* get 'closefile' */ - inputP = &inputFile; - resetDecrypt(); - inputP->data.fileP->b_cnt = - F_BUFSIZ - (inputP->data.fileP->b_ptr - - inputP->data.fileP->b_base); - if (inputP->data.fileP->b_cnt > 0) { - for (i = 0; i < inputP->data.fileP->b_cnt; i++) - if (*(inputP->data.fileP->b_ptr + i) == '%') - break; - if (i < inputP->data.fileP->b_cnt) { - inputP->data.fileP->b_cnt -= i; - inputP->data.fileP->b_ptr += i; - } else - inputP->data.fileP->b_cnt = 0; - } - } - rc = SCAN_OK; - return(rc); - } - if (begincnt < 0) { - rc = SCAN_ERROR; - break; - } - } - break; - } - - } - while (rc == 0); - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(rc); -} -#endif - -/* - * ------------------------------------------------------------------- - * Scan the next token and convert it into an object - * Result is placed on the Operand Stack as next object - * ------------------------------------------------------------------- - */ -int -scan_font(psfont *FontP) -{ - - - char filename[128]; - char filetype[3]; - FILE *fileP; - char *nameP; - int namelen; - int V; - int i; - boolean starthex80; - - starthex80 = FALSE; - filetype[0] = 'r'; - filetype[1] = 'b'; - filetype[2] = '\0'; - /* copy the filename and remove leading or trailing blanks */ - /* point to name and search for leading blanks */ - nameP= FontP->FontFileName.data.nameP; - namelen = FontP->FontFileName.len; - while (nameP[0] == ' ') { - nameP++; - namelen--; - } - /* now remove any trailing blanks */ - while ((namelen>0) && ( nameP[namelen-1] == ' ')) { - namelen--; - } - strncpy(filename,nameP,namelen); - filename[namelen] = '\0'; - /* file name is now constructed */ - inputFile.data.fileP = NULL; - filterFile.data.fileP = NULL; - - inputP = &inputFile; - if ((fileP = T1Open(filename,filetype))) { - /* get the first byte of file */ - V = _XT1getc(fileP); - /* if file starts with x'80' then skip next 5 bytes */ - if ( V == 0X80 ) { - for (i=0;i<5;i++) V = _XT1getc(fileP); - starthex80 = TRUE; - } - else T1Ungetc(V,fileP); - objFormatFile(inputP,fileP); - } - else { - return(SCAN_FILE_OPEN_ERROR); - }; - - WantFontInfo = TRUE; - InPrivateDict = FALSE; - TwoSubrs = FALSE; - rc = BuildFontInfo(FontP); - if (rc != 0) return(rc); - - /* Assume everything will be OK */ - rc = 0; - - /* Loop until complete font is read */ - do { - /* Scan the next token */ - scan_token(inputP); - - /* ==> tokenLength, tokenTooLong, tokenType, and tokenValue are */ - /* now set */ - - switch (tokenType) { - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - /* in this case we are done */ - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - rc = SCAN_ERROR; - break; - case TOKEN_LITERAL_NAME: - /* Look up the name */ - tokenStartP[tokenLength] = '\0'; - if (InPrivateDict ) { - if (0== strncmp(tokenStartP,"Subrs",5) ) { - rc = BuildSubrs(FontP); - break; - } - if (0== strncmp(tokenStartP,"CharStrings",11) ) { - rc = BuildCharStrings(FontP); - if ( (rc == SCAN_OK) ||(rc == SCAN_END) ) { - T1Close(inputP->data.fileP); - /* Build the Blues Structure */ - rc = GetType1Blues(FontP); - /* whatever the return code, return it */ - /* all the work is done. This is the normal exit.*/ - return(rc); - } - break; - } - rc = FindDictValue(FontP->Private); - /* we are not going to report errors */ - /* Sometimes the font file may test a value such as */ - /* testing to see if the font is alreadly loaded with */ - /* same UniqueID. We would faile on /UniqueID get */ - /* because we are expecting a int to follow UniqueID*/ - /* If the correct object type does not follow a Name*/ - /* then we will skip over it without reporting error except */ - /* when out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } /* end of reading Private dictionary */ - else - if (0== strncmp(tokenStartP,"Private",7) ) { - InPrivateDict = TRUE; - rc = BuildPrivate(FontP); - break; - } - else - if (WantFontInfo) { - rc = FindDictValue(FontP->fontInfoP); - /* we are not going to report errors except out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } - break; - case TOKEN_NAME: - if (0 == strncmp(tokenStartP,"eexec",5) ) { - /* if file started with x'80', check next 5 bytes */ - if (starthex80) { - V = _XT1getc(fileP); - if ( V == 0X80 ) { - for (i=0;i<5;i++) V = _XT1getc(fileP); - } - else T1Ungetc(V,fileP); - } - filterFile.data.fileP = T1eexec(inputP->data.fileP); - if (filterFile.data.fileP == NULL) { - T1Close(inputFile.data.fileP); - return(SCAN_FILE_OPEN_ERROR); - } - inputP = &filterFile; - - WantFontInfo = FALSE; - } - break; - } - - } - while (rc ==0); - T1Close(inputP->data.fileP); - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(rc); -} - diff --git a/nx-X11/lib/font/Type1/spaces.c b/nx-X11/lib/font/Type1/spaces.c deleted file mode 100644 index 55cc96f67..000000000 --- a/nx-X11/lib/font/Type1/spaces.c +++ /dev/null @@ -1,998 +0,0 @@ -/* $Xorg: spaces.c,v 1.4 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.10tsi Exp $ */ - /* SPACES CWEB V0021 ******** */ -/* -:h1 id=spaces.SPACES Module - Handles Coordinate Spaces - -This module is responsible for handling the TYPE1IMAGER "XYspace" object. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -#include "Xdefs.h" /* Bool declaration ??? */ -#include "Xmd.h" /* INT32 declaration ??? */ -#include "os.h" -#include "xf86_ansic.h" -#else -#include "X11/Xos.h" -#include -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "pictures.h" -#include "fonts.h" -#include "arith.h" -#include "trig.h" - -static void FindFfcn ( double cx, double cy, - convertFunc *fcnP ); -static void FindIfcn ( double cx, double cy, - fractpel *icxP, fractpel *icyP, - iconvertFunc *fcnP ); - -/* -:h3.Entry Points Provided to the TYPE1IMAGER User -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Entry Points Provided to Other Modules -*/ - -/* -In addition, other modules call the SPACES module through function -vectors in the "XYspace" structure. The entry points accessed that -way are "FConvert()", "IConvert()", and "ForceFloat()". -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Macros and Typedefs Provided to Other Modules - -:h4.Duplicating and Killing Spaces - -Destroying XYspaces is so simple we can do it with a -macro: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -On the other hand, duplicating XYspaces is slightly more difficult -because of the need to keep a unique ID in the space, see -:hdref refid=dupspace.. - -:h4.Fixed Point Pel Representation - -We represent pel positions with fixed point numbers. This does NOT -mean integer, but truly means fixed point, with a certain number -of binary digits (FRACTBITS) representing the fractional part of the -pel. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h2.Data Structures for Coordinate Spaces and Points -*/ -/* -:h3 id=matrix.Matrices - -TYPE1IMAGER uses 2x2 transformation matrices. We'll use C notation for -such a matrix (M[2][2]), the first index being rows, the second columns. -*/ - -/* -:h3.The "doublematrix" Structure - -We frequently find it desirable to store both a matrix and its -inverse. We store these in a "doublematrix" structure. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.The "XYspace" Structure - -The XYspace structure represents the XYspace object. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -#define RESERVED 10 /* 'n' IDs are reserved for invalid & immortal spaces */ -/* -*/ -#define NEXTID ((SpaceID < RESERVED) ? (SpaceID = RESERVED) : ++SpaceID) - -static unsigned int SpaceID = 1; - -struct XYspace * -CopySpace(struct XYspace *S) -{ - S = (struct XYspace *)Allocate(sizeof(struct XYspace), S, 0); - S->ID = NEXTID; - return(S); -} -/* -:h3.The "fractpoint" Structure - -A fractional point is just a "fractpel" x and y: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Lazy Evaluation of Matrix Inverses - -Calculating the inverse of a matrix is somewhat involved, and we usually -do not need them. So, we flag whether or not the space has the inverse -already calculated: -*/ - -#define HASINVERSE(flag) ((flag)&0x80) - -/* -The following macro forces a space to have an inverse: -*/ - -#define CoerceInverse(S) if (!HASINVERSE((S)->flag)) { \ - MatrixInvert((S)->tofract.normal, (S)->tofract.inverse); (S)->flag |= HASINVERSE(ON); } -/* -:h3.IDENTITY Space - -IDENTITY space is (logically) the space corresponding to the identity -transformation matrix. However, since all our transformation matrices -have a common FRACTFLOAT scale factor to convert to 'fractpel's, that -is actually what we store in 'tofract' matrix of IDENTITY: -*/ - -static struct XYspace identity = { SPACETYPE, ISPERMANENT(ON) + ISIMMORTAL(ON) - + HASINVERSE(ON), 2, /* added 3-26-91 PNM */ - NULL, NULL, - NULL, NULL, NULL, NULL, - INVALIDID + 1, 0, - {{{FRACTFLOAT, 0.0}, {0.0, FRACTFLOAT}}, - {{1.0/FRACTFLOAT, 0.0}, {0.0, 1.0/FRACTFLOAT}}}, - {{0, 0}, {0, 0}}}; -struct XYspace *IDENTITY = &identity; - -/* -*/ -#define MAXCONTEXTS 16 - -static struct doublematrix contexts[MAXCONTEXTS]; - -#ifdef notdef - -static int nextcontext = 1; - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.FindDeviceContext() - Find the Context Given a Device - -This routine, given a device, returns the index of the device's -transformation matrix in the context array. If it cannot find it, -it will allocate a new array entry and fill it out. -*/ - -static int -FindDeviceContext(pointer device) /* device token */ -{ - double M[2][2]; /* temporary matrix */ - float Xres,Yres; /* device resolution */ - int orient = -1; /* device orientation */ - int rc = -1; /* return code for QueryDeviceState */ - - if (rc != 0) /* we only bother with this check once */ - Abort("Context: QueryDeviceState didn't work"); - - M[0][0] = M[1][0] = M[0][1] = M[1][1] = 0.0; - - switch (orient) { - case 0: - M[0][0] = Xres; M[1][1] = -Yres; - break; - case 1: - M[1][0] = Yres; M[0][1] = Xres; - break; - case 2: - M[0][0] = -Xres; M[1][1] = Yres; - break; - case 3: - M[1][0] = -Yres; M[0][1] = -Xres; - break; - default: - Abort("QueryDeviceState returned invalid orientation"); - } - return(FindContext(M)); -} - -/* -:h3.FindContext() - Find the Context Given a Matrix - -This routine, given a matrix, returns the index of that matrix matrix in -the context array. If it cannot find it, it will allocate a new array -entry and fill it out. -*/ - -int -FindContext(double M[2][2]) /* array to search for */ -{ - register int i; /* loop variable for search */ - for (i=0; i < nextcontext; i++) - if (M[0][0] == contexts[i].normal[0][0] && M[1][0] == contexts[i].normal[1][0] - && M[0][1] == contexts[i].normal[0][1] && M[1][1] == contexts[i].normal[1][1]) - break; - - if (i >= nextcontext) { - if (i >= MAXCONTEXTS) - Abort("Context: out of them"); - LONGCOPY(contexts[i].normal, M, sizeof(contexts[i].normal)); - MatrixInvert(M, contexts[i].inverse); - nextcontext++; - } - - return(i); -} - -/* -:h3.Context() - Create a Coordinate Space for a Device - -This user operator is implemented by first finding the device context -array index, then transforming IDENTITY space to create an appropriate -cooridnate space. -*/ - -struct XYspace * -Context(pointer device, /* device token */ - double units) /* multiples of one inch */ -{ - double M[2][2]; /* device transformation matrix */ - register int n; /* will hold device context number */ - register struct XYspace *S; /* XYspace constructed */ - - ARGCHECK((device == NULL), "Context of NULLDEVICE not allowed", - NULL, IDENTITY, (0), struct XYspace *); - ARGCHECK((units == 0.0), "Context: bad units", NULL, IDENTITY, (0), struct XYspace *); - - n = FindDeviceContext(device); - - LONGCOPY(M, contexts[n].normal, sizeof(M)); - - M[0][0] *= units; - M[0][1] *= units; - M[1][0] *= units; - M[1][1] *= units; - - S = (struct XYspace *)Xform(IDENTITY, M); - - S->context = n; - return(S); -} -#endif - -/* -:h3.ConsiderContext() - Adjust a Matrix to Take Out Device Transform - -Remember, we have :f/x times U times D/ and :f/M/ and and we want :f/x -times U times M times D/. An easy way to do this is to calculate -:f/D sup <-1> times M times D/, because: -:formula. -x times U times D times D sup <-1> times M times D = x times U times M times D -:formula. -So this subroutine, given an :f/M/and an object, finds the :f/D/ for that -object and modifies :f/M/ so it is :f/D sup <-1> times M times D/. -*/ - -static void -ConsiderContext(struct xobject *obj, /* object to be transformed */ - double M[2][2]) /* matrix (may be changed) */ -{ - register int context = 0; /* index in contexts array */ - - if (obj == NULL) return; - - if (ISPATHTYPE(obj->type)) { - struct segment *path = (struct segment *) obj; - - context = path->context; - } - else if (obj->type == SPACETYPE) { - struct XYspace *S = (struct XYspace *) obj; - - context = S->context; - } - else if (obj->type == PICTURETYPE) { - - } - else - context = NULLCONTEXT; - - if (context != NULLCONTEXT) { - MatrixMultiply(contexts[context].inverse, M, M); - MatrixMultiply(M, contexts[context].normal, M); - } -} - -/* -:h2.Conversion from User's X,Y to "fractpel" X,Y - -When the user is building paths (lines, moves, curves, etc.) he passes -the control points (x,y) for the paths together with an XYspace. We -must convert from the user's (x,y) to our internal representation -which is in pels (fractpels, actually). This involves transforming -the user's (x,y) under the coordinate space transformation. It is -important that we do this quickly. So, we store pointers to different -conversion functions right in the XYspace structure. This allows us -to have simpler special case functions for the more commonly -encountered types of transformations. - -:h3.Convert(), IConvert(), and ForceFloat() - Called Through "XYspace" Structure - -These are functions that fit in the "convert" and "iconvert" function -pointers in the XYspace structure. They call the "xconvert", "yconvert", -"ixconvert", and "iyconvert" as appropriate to actually do the work. -These secondary routines come in many flavors to handle different -special cases as quickly as possible. -*/ - -static void -FXYConvert(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - double x, double y) /* user's coordinates of point */ -{ - pt->x = (*S->xconvert)(S->tofract.normal[0][0], S->tofract.normal[1][0], x, y); - pt->y = (*S->yconvert)(S->tofract.normal[0][1], S->tofract.normal[1][1], x, y); -} - -static void -IXYConvert(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - long x, long y) /* user's coordinates of point */ -{ - pt->x = (*S->ixconvert)(S->itofract[0][0], S->itofract[1][0], x, y); - pt->y = (*S->iyconvert)(S->itofract[0][1], S->itofract[1][1], x, y); -} - -/* -ForceFloat is a substitute for IConvert(), when we just do not have -enough significant digits in the coefficients to get high enough -precision in the answer with fixed point arithmetic. So, we force the -integers to floats, and do the arithmetic all with floats: -*/ - -static void -ForceFloat(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - long x, long y) /* user's coordinates of point */ -{ - (*S->convert)(pt, S, (double) x, (double) y); -} - -/* -:h3.FXYboth(), FXonly(), FYonly() - Floating Point Conversion - -These are the routines we use when the user has given us floating -point numbers for x and y. FXYboth() is the general purpose routine; -FXonly() and FYonly() are special cases when one of the coefficients -is 0.0. -*/ - -static fractpel -FXYboth(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = x * cx + y * cy; - return((fractpel) r); -} - -/*ARGSUSED*/ -static fractpel -FXonly(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = x * cx; - return((fractpel) r); -} - -/*ARGSUSED*/ -static fractpel -FYonly(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = y * cy; - return((fractpel) r); -} - -/* -:h3.IXYboth(), IXonly(), IYonly() - Simple Integer Conversion - -These are the routines we use when the user has given us integers for -x and y, and the coefficients have enough significant digits to -provide precise answers with only "long" (32 bit?) multiplication. -IXYboth() is the general purpose routine; IXonly() and IYonly() are -special cases when one of the coefficients is 0. -*/ - -static fractpel -IXYboth(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(x * cx + y * cy); -} - -/*ARGSUSED*/ -static fractpel -IXonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(x * cx); -} - -/*ARGSUSED*/ -static fractpel -IYonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(y * cy); -} - - -/* -:h3.FPXYboth(), FPXonly(), FPYonly() - More Involved Integer Conversion - -These are the routines we use when the user has given us integers for -x and y, but the coefficients do not have enough significant digits to -provide precise answers with only "long" (32 bit?) multiplication. -We have increased the number of significant bits in the coefficients -by FRACTBITS; therefore we must use "double long" (64 bit?) -multiplication by calling FPmult(). FPXYboth() is the general purpose -routine; FPXonly() and FPYonly() are special cases when one of the -coefficients is 0. - -Note that it is perfectly possible for us to calculate X with the -"FP" method and Y with the "I" method, or vice versa. It all depends -on how the functions in the XYspace structure are filled out. -*/ - -static fractpel -FPXYboth(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(x, cx) + FPmult(y, cy) ); -} - -/*ARGSUSED*/ -static fractpel -FPXonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(x, cx) ); -} - -/*ARGSUSED*/ -static fractpel -FPYonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(y, cy) ); -} - - - -/* -:h3.FillOutFcns() - Determine the Appropriate Functions to Use for Conversion - -This function fills out the "convert" and "iconvert" function pointers -in an XYspace structure, and also fills the "helper" -functions that actually do the work. -*/ - -static void -FillOutFcns(struct XYspace *S) /* functions will be set in this structure */ -{ - S->convert = FXYConvert; - S->iconvert = IXYConvert; - - FindFfcn(S->tofract.normal[0][0], S->tofract.normal[1][0], &S->xconvert); - FindFfcn(S->tofract.normal[0][1], S->tofract.normal[1][1], &S->yconvert); - FindIfcn(S->tofract.normal[0][0], S->tofract.normal[1][0], - &S->itofract[0][0], &S->itofract[1][0], &S->ixconvert); - FindIfcn(S->tofract.normal[0][1], S->tofract.normal[1][1], - &S->itofract[0][1], &S->itofract[1][1], &S->iyconvert); - - if (S->ixconvert == NULL || S->iyconvert == NULL) - S->iconvert = ForceFloat; -} - -/* -:h4.FindFfcn() - Subroutine of FillOutFcns() to Fill Out Floating Functions - -This function tests for the special case of one of the coefficients -being zero: -*/ - -static void -FindFfcn(double cx, double cy, /* x and y coefficients */ - convertFunc *fcnP) /* pointer to function to set */ -{ - if (cx == 0.0) - *fcnP = FYonly; - else if (cy == 0.0) - *fcnP = FXonly; - else - *fcnP = FXYboth; -} - -/* -:h4.FindIfcn() - Subroutine of FillOutFcns() to Fill Out Integer Functions - -There are two types of integer functions, the 'I' type and the 'FP' type. -We use the I type functions when we are satisfied with simple integer -arithmetic. We used the FP functions when we feel we need higher -precision (but still fixed point) arithmetic. If all else fails, -we store a NULL indicating that this we should do the conversion in -floating point. -*/ - -static void -FindIfcn(double cx, double cy, /* x and y coefficients */ - fractpel *icxP, fractpel *icyP, /* fixed point coefficients to set */ - iconvertFunc *fcnP) /* pointer to function to set */ -{ - register fractpel imax; /* maximum of cx and cy */ - - *icxP = cx; - *icyP = cy; - - if (cx != (float) (*icxP) || cy != (float) (*icyP)) { -/* -At this point we know our integer approximations of the coefficients -are not exact. However, we will still use them if the maximum -coefficient will not fit in a 'fractpel'. Of course, we have little -choice at that point, but we haven't lost that much precision by -staying with integer arithmetic. We have enough significant digits -so that -any error we introduce is less than one part in 2:sup/16/. -*/ - - imax = MAX(ABS(*icxP), ABS(*icyP)); - if (imax < (fractpel) (1<<(FRACTBITS-1)) ) { -/* -At this point we know our integer approximations just do not have -enough significant digits for accuracy. We will add FRACTBITS -significant digits to the coefficients (by multiplying them by -1<x; - y = pt->y; - *xp = S->tofract.inverse[0][0] * x + S->tofract.inverse[1][0] * y; - *yp = S->tofract.inverse[0][1] * x + S->tofract.inverse[1][1] * y; -} - -/* -:h2.Transformations -*/ -/* -:h3 id=xform.Xform() - Transform Object in X and Y - -TYPE1IMAGER wants transformations of objects like paths to be identical -to transformations of spaces. For example, if you scale a line(1,1) -by 10 it should yield the same result as generating the line(1,1) in -a coordinate space that has been scaled by 10. - -We handle fonts by storing the accumulated transform, for example, SR -(accumulating on the right). Then when we map the font through space TD, -for example, we multiply the accumulated font transform on the left by -the space transform on the right, yielding SRTD in this case. We will -get the same result if we did S, then R, then T on the space and mapping -an unmodified font through that space. -*/ - -struct xobject * -t1_Xform(struct xobject *obj, /* object to transform */ - double M[2][2]) /* transformation matrix */ -{ - if (obj == NULL) - return(NULL); - - if (obj->type == FONTTYPE) { - register struct font *F = (struct font *) obj; - - F = UniqueFont(F); - return((struct xobject*)F); - } - if (obj->type == PICTURETYPE) { -/* -In the case of a picture, we choose both to update the picture's -transformation matrix and keep the handles up to date. -*/ - register struct picture *P = (struct picture *) obj; - register struct segment *handles; /* temporary path to transform handles */ - - P = UniquePicture(P); - handles = PathSegment(LINETYPE, P->origin.x, P->origin.y); - handles = Join(handles, - PathSegment(LINETYPE, P->ending.x, P->ending.y) ); - handles = (struct segment *)Xform((struct xobject *) handles, M); - P->origin = handles->dest; - P->ending = handles->link->dest; - KillPath(handles); - return((struct xobject *)P); - } - - if (ISPATHTYPE(obj->type)) { - struct XYspace pseudo; /* local temporary space */ - PseudoSpace(&pseudo, M); - return((struct xobject *) PathTransform((struct segment *)obj, - &pseudo)); - } - - - if (obj->type == SPACETYPE) { - register struct XYspace *S = (struct XYspace *) obj; - -/* replaced ISPERMANENT(S->flag) with S->references > 1 3-26-91 PNM */ - if (S->references > 1) - S = CopySpace(S); - else - S->ID = NEXTID; - - MatrixMultiply(S->tofract.normal, M, S->tofract.normal); - /* - * mark inverted matrix invalid: - */ - S->flag &= ~HASINVERSE(ON); - - FillOutFcns(S); - return((struct xobject *) S); - } - - return(ArgErr("Untransformable object", obj, obj)); -} - -/* -:h3.Transform() - Transform an Object - -This is the external user's entry point. -*/ -struct xobject * -t1_Transform(struct xobject *obj, - double cxx, double cyx, /* 2x2 transform matrix elements */ - double cxy, double cyy) /* in row order */ -{ - double M[2][2]; - - M[0][0] = cxx; - M[0][1] = cyx; - M[1][0] = cxy; - M[1][1] = cyy; - ConsiderContext(obj, M); - return(Xform(obj, M)); -} -/* -:h3.Scale() - Special Case of Transform() - -This is a user operator. -*/ - -struct xobject * -t1_Scale(struct xobject *obj, /* object to scale */ - double sx, double sy) /* scale factors in x and y */ -{ - double M[2][2]; - - M[0][0] = sx; - M[1][1] = sy; - M[1][0] = M[0][1] = 0.0; - ConsiderContext(obj, M); - return(Xform(obj, M)); -} - -/* -:h3 id=rotate.Rotate() - Special Case of Transform() - -We special-case different settings of 'degrees' for performance -and accuracy within the DegreeSin() and DegreeCos() routines themselves. -*/ - -#ifdef notdef -struct xobject * -xiRotate(struct xobject *obj, /* object to be transformed */ - double degrees) /* degrees of COUNTER-clockwise rotation */ -{ - double M[2][2]; - - M[0][0] = M[1][1] = DegreeCos(degrees); - M[1][0] = - (M[0][1] = DegreeSin(degrees)); - ConsiderContext(obj, M); - return(Xform(obj, M)); -} -#endif - -/* -:h3.PseudoSpace() - Build a Coordinate Space from a Matrix - -Since we have built all this optimized code that, given an (x,y) and -a coordinate space, yield transformed (x,y), it seems a shame not to -use the same logic when we need to multiply an (x,y) by an arbitrary -matrix that is not (initially) part of a coordinate space. This -subroutine takes the arbitrary matrix and builds a coordinate -space, with all its nifty function pointers. -*/ - -void -PseudoSpace(struct XYspace *S, /* coordinate space structure to fill out */ - double M[2][2]) /* matrix that will become 'tofract.normal' */ -{ - S->type = SPACETYPE; - S->flag = ISPERMANENT(ON) + ISIMMORTAL(ON); - S->references = 2; /* 3-26-91 added PNM */ - S->tofract.normal[0][0] = M[0][0]; - S->tofract.normal[1][0] = M[1][0]; - S->tofract.normal[0][1] = M[0][1]; - S->tofract.normal[1][1] = M[1][1]; - - FillOutFcns(S); -} - -/* -:h2 id=matrixa.Matrix Arithmetic - -Following the convention in Newman and Sproull, :hp1/Interactive -Computer Graphics/, -matrices are organized: -:xmp. - | cxx cyx | - | cxy cyy | -:exmp. -A point is horizontal, for example: -:xmp. - [ x y ] -:exmp. -This means that: -:formula/x prime = cxx times x + cxy times y/ -:formula/y prime = cyx times x + cyy times y/ -I've seen the other convention, where transform matrices are -transposed, equally often in the literature. -*/ - -/* -:h3.MatrixMultiply() - Implements Multiplication of Two Matrices - -Implements matrix multiplication, A * B = C. - -To remind myself, matrix multiplication goes rows of A times columns -of B. -The output matrix may be the same as one of the input matrices. -*/ -void -MatrixMultiply(double A[2][2], double B[2][2], /* input matrices */ - double C[2][2]) /* output matrix */ -{ - register double txx,txy,tyx,tyy; - - txx = A[0][0] * B[0][0] + A[0][1] * B[1][0]; - txy = A[1][0] * B[0][0] + A[1][1] * B[1][0]; - tyx = A[0][0] * B[0][1] + A[0][1] * B[1][1]; - tyy = A[1][0] * B[0][1] + A[1][1] * B[1][1]; - - C[0][0] = txx; - C[1][0] = txy; - C[0][1] = tyx; - C[1][1] = tyy; -} -/* -:h3.MatrixInvert() - Invert a Matrix - -My reference for matrix inversion was :hp1/Elementary Linear Algebra/ -by Paul C. Shields, Worth Publishers, Inc., 1968. -*/ -void -MatrixInvert(double M[2][2], /* input matrix */ - double Mprime[2][2]) /* output inverted matrix */ -{ - register double D; /* determinant of matrix M */ - register double txx,txy,tyx,tyy; - - txx = M[0][0]; - txy = M[1][0]; - tyx = M[0][1]; - tyy = M[1][1]; - - D = M[1][1] * M[0][0] - M[1][0] * M[0][1]; - if (D == 0.0) - Abort("MatrixInvert: can't"); - - Mprime[0][0] = tyy / D; - Mprime[1][0] = -txy / D; - Mprime[0][1] = -tyx / D; - Mprime[1][1] = txx / D; -} -/* -:h2.Initialization, Queries, and Debug -*/ -/* -:h3.InitSpaces() - Initialize Constant Spaces - -For compatibility, we initialize a coordinate space called USER which -maps 72nds of an inch to pels on the default device. -*/ - -struct XYspace *USER = &identity; - -void -InitSpaces(void) -{ - IDENTITY->type = SPACETYPE; - FillOutFcns(IDENTITY); - - contexts[NULLCONTEXT].normal[1][0] - = contexts[NULLCONTEXT].normal[0][1] - = contexts[NULLCONTEXT].inverse[1][0] - = contexts[NULLCONTEXT].inverse[0][1] = 0.0; - contexts[NULLCONTEXT].normal[0][0] - = contexts[NULLCONTEXT].normal[1][1] - = contexts[NULLCONTEXT].inverse[0][0] - = contexts[NULLCONTEXT].inverse[1][1] = 1.0; - - USER->flag |= ISIMMORTAL(ON); - CoerceInverse(USER); -} -/* -:h3.QuerySpace() - Returns the Transformation Matrix of a Space - -Since the tofract matrix of an XYspace includes the scale factor -necessary to produce fractpel results (i.e., FRACTFLOAT), this -must be taken out before we return the matrix to the user. Fortunately, -this is simple: just multiply by the inverse of IDENTITY! -*/ - -void -QuerySpace(struct XYspace *S, /* space asked about */ - double *cxxP, double *cyxP, /* where to put answer */ - double *cxyP, double *cyyP) -{ - double M[2][2]; /* temp matrix to build user's answer */ - - if (S->type != SPACETYPE) { - ArgErr("QuerySpace: not a space", S, NULL); - return; - } - MatrixMultiply(S->tofract.normal, IDENTITY->tofract.inverse, M); - *cxxP = M[0][0]; - *cxyP = M[1][0]; - *cyxP = M[0][1]; - *cyyP = M[1][1]; -} - -/* -:h3.FormatFP() - Format a Fixed Point Pel - -We format the pel as "dddd.XXXX", where XX's are hexidecimal digits, -and the dd's are decimal digits. This might be a little confusing -mixing hexidecimal and decimal like that, but it is convenient -to use for debug. - -We make sure we have N (FRACTBITS/4) digits past the decimal point. -*/ -#define FRACTMASK ((1<> FRACTBITS), s); -} - -/* -:h3.DumpSpace() - Display a Coordinate Space -*/ -/*ARGSUSED*/ -void -DumpSpace(struct XYspace *S) -{ -} diff --git a/nx-X11/lib/font/Type1/spaces.h b/nx-X11/lib/font/Type1/spaces.h deleted file mode 100644 index ef78f2f47..000000000 --- a/nx-X11/lib/font/Type1/spaces.h +++ /dev/null @@ -1,172 +0,0 @@ -/* $Xorg: spaces.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/spaces.h,v 3.3 1999/08/22 08:58:53 dawes Exp $ */ - -/*SHARED*/ - -#define USER t1_User -#define IDENTITY t1_Identity - -#define Context(d,u) t1_Context(d,u) -#define Transform(o,f1,f2,f3,f4) t1_Transform(o,f1,f2,f3,f4) -#define Rotate(o,d) t1_Rotate(o,d) -#define Scale(o,sx,sy) t1_Scale(o,sx,sy) -#define QuerySpace(S,f1,f2,f3,f4) t1_QuerySpace(S,f1,f2,f3,f4) -#define Warp(s1,o,s2) t1_Warp(s1,o,s2) - -/* IDENTITY space */ -extern struct XYspace *IDENTITY; - -/* creates a coordinate space for a device */ -extern struct XYspace *Context(pointer device, double units); -/* transform an object */ -extern struct xobject *t1_Transform ( struct xobject *obj, double cxx, - double cyx, double cxy, double cyy ); -#if 0 -struct xobject *t1_Rotate(); /* rotate an object */ -#endif -/* scale an object */ -extern struct xobject *t1_Scale ( struct xobject *obj, double sx, double sy ); -#if 0 -struct xobject *t1_Warp(); /* transform like delta of two spaces */ -#endif -/* returns coordinate space matrix */ -extern void t1_QuerySpace ( struct XYspace *S, double *cxxP, double *cyxP, - double *cxyP, double *cyyP ); - -/*END SHARED*/ -/*SHARED*/ - -/* #define KillSpace(s) Free(s) -Note - redefined KillSpace() to check references ! -3-26-91 PNM */ - -#define KillSpace(s) if ( (--(s->references) == 0) ||\ - ( (s->references == 1) && ISPERMANENT(s->flag) ) )\ - Free(s) - -#define ConsumeSpace(s) MAKECONSUME(s,KillSpace(s)) -#define UniqueSpace(s) MAKEUNIQUE(s,CopySpace(s)) - -/*END SHARED*/ -/*SHARED*/ - -typedef short pel; /* integer pel locations */ -typedef long fractpel; /* fractional pel locations */ - -#define FRACTBITS 16 /* number of fractional bits in 'fractpel' */ -/* -We define the following macros to convert from 'fractpel' to 'pel' and -vice versa: -*/ -#define TOFRACTPEL(p) (((fractpel)p)<>FRACTBITS) -#define FRACTFLOAT (double)(1L< -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef FONTMODULE -#include -#if XFONT_CID -#include -#include -#include -#endif -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include -#undef _XOPEN_SOURCE -#endif -#include "X11/Xfuncs.h" -#ifdef USE_MMAP -#include -#include -#endif -#else -#include "Xmd.h" -#include "Xdefs.h" -#endif - -#ifdef FONTMODULE -#include "os.h" -#include "xf86_ansic.h" -#endif - -#include -#include -#include -#include -#include "t1unicode.h" - -#if XFONT_CID -#include "range.h" -#endif - -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "t1stdio.h" -#include "util.h" -#include "fontfcn.h" -#include "t1intf.h" - - -static int Type1GetGlyphs ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs ); - -#if XFONT_CID -#define CMapDir "/CMap/" -#define CFMDir "/CFM/" -#define CIDFontDir "/CIDFont/" -#endif - -static int Type1GetMetrics ( FontPtr pFont, unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, - xCharInfo **glyphs ); - - -#define minchar(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxchar(p) ((p).max_char_low + ((p).max_char_high << 8)) - -static void fillrun ( char *p, pel x0, pel x1, int bit ); - -extern psfont *FontP; -extern psobj *ISOLatin1EncArrayP; - -#if XFONT_CID -extern char CurCIDFontName[]; -extern char CurCMapName[]; - -static CharInfoPtr CIDGetGlyph ( FontPtr pFont, unsigned int charcode, - CharInfoPtr pci ); - -extern cidfont *CIDFontP; -extern cmapres *CMapP; -#endif - -static void fill ( char *dest, int h, int w, struct region *area, int byte, - int bit, int wordsize ); - -#if XFONT_CID -int -CIDOpenScalable (FontPathElementPtr fpe, - FontPtr *ppFont, - int flags, - FontEntryPtr entry, - char *fileName, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - FontPtr pFont; - int bit, - byte, - glyph, - scan, - image; - long *pool; /* memory pool for ximager objects */ - int size; /* for memory size calculations */ - struct XYspace *S; /* coordinate space for character */ - register int i; - int nchars, len, rc; - cidglyphs *cid; - char *p; - double t1 = .001, t2 = 0.0, t3 = 0.0, t4 = .001; - double sxmult; - char CIDFontName[CID_NAME_MAX]; - char CMapName[CID_NAME_MAX]; - char cidfontname[CID_PATH_MAX]; - char cmapname[CID_PATH_MAX]; - char *path; - char cidfontpath[CID_PATH_MAX]; - char cmappath[CID_PATH_MAX]; -#if defined(HAVE_CFM) || defined(CID_ALL_CHARS) - char cfmdir[CID_PATH_MAX]; - char cfmfilename[CID_NAME_MAX]; -#endif -#if defined(CID_ALL_CHARS) - char *cf; -#else - long sAscent, sDescent; -#endif - - /* check the font name */ - len = strlen(fileName); - if (len <= 0 || len > CID_NAME_MAX - 1) - return BadFontName; - -#if defined(HAVE_CFM) || defined(CID_ALL_CHARS) - strcpy(cfmdir, fileName); - p = strrchr(cfmdir, '/'); - if (p) *p = '\0'; -#endif - - path = fileName; - if (!(fileName = strrchr(fileName, '/'))) - return BadFontName; - - len = fileName - path; - strncpy(cidfontpath, path, len); - cidfontpath[len] = '\0'; - strcpy(cmappath, cidfontpath); - strcat(cmappath, CMapDir); -#ifdef HAVE_CFM - strcpy(cfmdir, cidfontpath); - strcat(cfmdir, CFMDir); -#endif - strcat(cidfontpath, CIDFontDir); - - fileName++; - - /* extract the CIDFontName and CMapName from the font name */ - /* check for -- */ - if ((p = strstr(fileName, "--"))) { - if (p == fileName) - return BadFontName; - else { - strcpy(CIDFontName, fileName); - CIDFontName[p - fileName] = '\0'; - p += 2; - i = 0; - while (*p && *p != '.') - CMapName[i++] = *p++; - CMapName[i] = '\0'; - if ((len = strlen(CMapName)) <= 0) - return BadFontName; - } - } else - return BadFontName; - - /* The CMap files whose names end with -V are not yet supported */ - len = strlen(CMapName); - if ((len >= 2 && CMapName[len - 2] == '-' && CMapName[len - 1] == 'V') || - (len == 1 && CMapName[len - 1] == 'V')) - return BadFontName; - - /* Reject ridiculously small font sizes that will blow up the math */ - if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) - return BadFontName; - -#ifdef CID_ALL_CHARS - if ((cf = getenv("CFMDIR")) == NULL) - strcat(cfmdir, CFMDir); - else { - strcpy(cfmdir, cf); - strcat(cfmdir, "/"); - } -#endif - -#if defined(HAVE_CFM) || defined(CID_ALL_CHARS) - strcpy(cfmfilename, cfmdir); - strcat(cfmfilename, CIDFontName); - strcat(cfmfilename, "--"); - strcat(cfmfilename, CMapName); - strcat(cfmfilename, ".cfm"); -#endif - - /* create a full-path name for a CIDFont file */ - if (strlen(cidfontpath) + strlen(CIDFontName) + 2 > - CID_PATH_MAX) - return BadFontName; - strcpy(cidfontname, cidfontpath); - strcat(cidfontname, CIDFontName); - - /* create a full-path name for a CMap file */ - if (strlen(cmappath) + strlen(CMapName) + 2 > CID_PATH_MAX) - return BadFontName; - strcpy(cmapname, cmappath); - strcat(cmapname, CMapName); - - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - rc = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - if (rc != Successful) - return rc; - -#define PAD(bits, pad) (((bits)+(pad)-1)&-(pad)) - - if (!(pFont = CreateFontRec())) - return AllocError; - - cid = (cidglyphs *)xalloc(sizeof(cidglyphs)); - if (cid == NULL) { - DestroyFontRec(pFont); - return AllocError; - } - bzero(cid, sizeof(cidglyphs)); - - /* heuristic for "maximum" size of pool we'll need: */ - size = 200000 + 600 * - (int)hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) - * sizeof(short); - if (size < 0 || NULL == (pool = (long *) xalloc(size))) { - xfree(cid); - DestroyFontRec(pFont); - return AllocError; - } - - addmemory(pool, size); - - /* load font if not already loaded */ - if (!CIDfontfcnA(cidfontname, cmapname, &rc)) { - FontP = NULL; - delmemory(); - xfree(pool); - xfree(cid); - DestroyFontRec(pFont); - return Type1ReturnCodeToXReturnCode(rc); - } - - FontP = NULL; - - S = (struct XYspace *) t1_Transform((struct xobject *)IDENTITY, - t1, t2, t3, t4); - - S = (struct XYspace *) Permanent(t1_Transform((struct xobject *)S, - vals->pixel_matrix[0], - -vals->pixel_matrix[1], - vals->pixel_matrix[2], - -vals->pixel_matrix[3])); - - /* multiplier for computation of raw values */ - sxmult = hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - - pFont->info.firstRow = CMapP->firstRow; - pFont->info.firstCol = CMapP->firstCol; - pFont->info.lastRow = CMapP->lastRow; - pFont->info.lastCol = CMapP->lastCol; - - nchars = (pFont->info.lastRow - pFont->info.firstRow + 1) * - (pFont->info.lastCol - pFont->info.firstCol + 1); - - delmemory(); - xfree(pool); - - if (pFont->info.firstCol > pFont->info.lastCol) - { - xfree(cid); - DestroyFontRec(pFont); - return BadFontName; - } - - cid->glyphs = (CharInfoRec **)xalloc(nchars*sizeof(CharInfoRec *)); - if (cid->glyphs == NULL) { - xfree(cid); - DestroyFontRec(pFont); - return AllocError; - } - bzero(cid->glyphs, nchars*sizeof(CharInfoRec *)); - - pFont->info.defaultCh = 0; - pFont->format = format; - - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - - pFont->get_metrics = CIDGetMetrics; - pFont->get_glyphs = CIDGetGlyphs; - pFont->unload_font = CIDCloseFont; - pFont->unload_glyphs = NULL; - pFont->refcnt = 0; - - len = strlen(cidfontname); - cid->CIDFontName = (char *)xalloc(len + 1); - if (cid->CIDFontName == NULL) { - xfree(cid->glyphs); - xfree(cid); - DestroyFontRec(pFont); - return AllocError; - } - strcpy(cid->CIDFontName, cidfontname); - - len = strlen(cmapname); - cid->CMapName = (char *)xalloc(len + 1); - if (cid->CMapName == NULL) { - xfree(cid->CIDFontName); - xfree(cid->glyphs); - xfree(cid); - DestroyFontRec(pFont); - return AllocError; - } - strcpy(cid->CMapName, cmapname); - - cid->pixel_matrix[0] = vals->pixel_matrix[0]; - cid->pixel_matrix[1] = vals->pixel_matrix[1]; - cid->pixel_matrix[2] = vals->pixel_matrix[2]; - cid->pixel_matrix[3] = vals->pixel_matrix[3]; - - pFont->fontPrivate = (unsigned char *)cid; - - pFont->info.fontAscent = - (CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[3].data.integer * - vals->pixel_matrix[3] + - (CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[3].data.integer > - 0 ? 500 : -500)) / 1000; - - pFont->info.fontDescent = - -(int)((double)CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[1].data.integer - * vals->pixel_matrix[3] + - (CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[1].data.integer > - 0 ? 500 : -500)) / 1000; - - /* Adobe does not put isFixedPitch entries in CID-keyed fonts. */ - /* CID-keyed are not constant-width fonts. */ - pFont->info.constantWidth = 0; - -#ifndef CID_ALL_CHARS - sAscent = CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[3].data.integer; - sDescent = -CIDFontP->CIDfontInfoP[CIDFONTBBOX].value.data.arrayP[1].data.integer; -#endif - - if (strncmp(entry->name.name, "-bogus", 6)) { -#ifdef CID_ALL_CHARS - ComputeBoundsAllChars(pFont, cfmfilename, sxmult); -#else -#ifdef HAVE_CFM - CIDFillFontInfo(pFont, vals, cidfontname, entry->name.name, cmapname, - cfmfilename, sAscent, sDescent, sxmult); -#else - CIDFillFontInfo(pFont, vals, cidfontname, entry->name.name, cmapname, - sAscent, sDescent, sxmult); -#endif /* HAVE_CFM */ -#endif /* CID_ALL_CHARS */ - } - - *ppFont = pFont; - - return Successful; -} -#endif - -/*ARGSUSED*/ -int -Type1OpenScalable (FontPathElementPtr fpe, - FontPtr *ppFont, - int flags, - FontEntryPtr entry, - char *fileName, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - FontPtr pFont; - int bit, - byte, - glyph, - scan, - image; - int pad,wordsize; /* scan & image in bits */ - long *pool; /* memory pool for ximager objects */ - int size; /* for memory size calculations */ - struct XYspace *S; /* coordinate space for character */ - struct region *area; - CharInfoRec *glyphs; - int len, rc, count = 0, i = 0; - struct type1font *type1; - char *p; - FontMapPtr mapping = NULL; - int no_mapping; - psobj *fontmatrix; - long x0, total_width = 0, total_raw_width = 0; - double x1, y1, t1 = .001, t2 = 0.0, t3 = 0.0, t4 = .001; - double sxmult; - - /* Reject ridiculously small font sizes that will blow up the math */ - if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) - return BadFontName; - - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - rc = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - if (rc != Successful) - return rc; - - pad = glyph * 8; - wordsize = scan * 8; - -#define PAD(bits, pad) (((bits)+(pad)-1)&-(pad)) - - pFont = CreateFontRec(); - if (pFont == NULL) - return AllocError; - - type1 = (struct type1font *)xalloc(sizeof(struct type1font)); - if (type1 == NULL) { - DestroyFontRec(pFont); - return AllocError; - } - bzero(type1, sizeof(struct type1font)); - - /* heuristic for "maximum" size of pool we'll need: */ -#if XFONT_CID - size = 400000 + 600 * -#else - size = 200000 + 600 * -#endif - (int)hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) - * sizeof(short); - if (size < 0 || NULL == (pool = (long *) xalloc(size))) { - xfree(type1); - DestroyFontRec(pFont); - return AllocError; - } - - addmemory(pool, size); - - - glyphs = type1->glyphs; - - /* load font if not already loaded */ - if (!fontfcnA(fileName, &rc)) { - delmemory(); - xfree(type1); - DestroyFontRec(pFont); - xfree(pool); - return Type1ReturnCodeToXReturnCode(rc); - } - - fontmatrix = &FontP->fontInfoP[FONTMATRIX].value; - if (objPIsArray(fontmatrix) && fontmatrix->len == 6) - { -#define assign(n,d,f) if (objPIsInteger(fontmatrix->data.arrayP + n)) \ - d = fontmatrix->data.arrayP[n].data.integer; \ - else if (objPIsReal(fontmatrix->data.arrayP + n)) \ - d = fontmatrix->data.arrayP[n].data.real; \ - else d = f; - - assign(0, t1, .001); - assign(1, t2, 0.0); - assign(2, t3, 0.0); - assign(3, t4, .001); - } - - S = (struct XYspace *) t1_Transform((struct xobject *)IDENTITY, - t1, t2, t3, t4); - - S = (struct XYspace *) Permanent(t1_Transform((struct xobject *)S, - vals->pixel_matrix[0], - -vals->pixel_matrix[1], - vals->pixel_matrix[2], - -vals->pixel_matrix[3])); - - - /* multiplier for computation of raw values */ - sxmult = hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - - no_mapping=0; - p = FontEncFromXLFD(entry->name.name, entry->name.length); - - if(p==0) { /* XLFD does not specify an encoding */ - mapping=0; - no_mapping=2; /* ISO 8859-1 */ - } - - if(!strcmp(p, "adobe-fontspecific")) { - mapping=0; - no_mapping=1; /* font's native encoding vector */ - } - - pFont->info.firstCol = 255; - pFont->info.lastCol = 0; - - if(!no_mapping) { - mapping = FontEncMapFind(p, - FONT_ENCODING_POSTSCRIPT, -1, -1, - fileName); - if(!mapping) - mapping = FontEncMapFind(p, - FONT_ENCODING_UNICODE, -1, -1, - fileName); - if(!mapping) - goto NoEncoding; - else - no_mapping=0; - } - - for (i=0; i < 256; i++) { - long h,w; - long paddedW; - int j; - char *codename; - - if(no_mapping == 1) { - codename = FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].data.valueP; - len = FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].len; - } else if(no_mapping) { - codename = unicodetoPSname(i); - len = codename ? strlen(codename) : 0; - } else { - if(mapping->type == FONT_ENCODING_UNICODE) { - codename = unicodetoPSname(FontEncRecode(i, mapping)); - } else - codename = FontEncName(i, mapping); - len=codename?strlen(codename):0; - } - - /* Avoid multiply rasterising the undefined glyph */ - if(len==7 && !strncmp(codename, ".notdef", 7)) { - len=0; - codename=0; - } - - /* But do rasterise it at least once */ - if(len==0) { - if(i==0) { - codename=".notdef"; - len=7; - } else - continue; - } - - /* See if this character is in the list of ranges specified - in the XLFD name */ - if(i!=0) { - for (j = 0; j < vals->nranges; j++) - if (i >= minchar(vals->ranges[j]) && - i <= maxchar(vals->ranges[j])) - break; - - /* If not, don't realize it. */ - if (vals->nranges && j == vals->nranges) - continue; - } - - rc = 0; - area = (struct region *)fontfcnB(S, (unsigned char *)codename, - &len, &rc); - if (rc < 0) { - rc = Type1ReturnCodeToXReturnCode(rc); - break; - } - else if (rc > 0) - continue; - - if (area == NULL) - continue; - - if (pFont->info.firstCol > i) - pFont->info.firstCol = i; - if (pFont->info.lastCol < i) - pFont->info.lastCol = i; - - h = area->ymax - area->ymin; - w = area->xmax - area->xmin; - paddedW = PAD(w, pad); - - if (h > 0 && w > 0) { - size = h * paddedW / 8; - glyphs[i].bits = (char *)xalloc(size); - if (glyphs[i].bits == NULL) { - rc = AllocError; - break; - } - } - else { - size = 0; - h = w = 0; - area->xmin = area->xmax = 0; - area->ymax = area->ymax = 0; - } - - glyphs[i].metrics.leftSideBearing = area->xmin; - x1 = (double)(x0 = area->ending.x - area->origin.x); - y1 = (double)(area->ending.y - area->origin.y); - glyphs[i].metrics.characterWidth = - (x0 + (x0 > 0 ? FPHALF : -FPHALF)) / (1 << FRACTBITS); - if (!glyphs[i].metrics.characterWidth && size == 0) - { - /* Zero size and zero extents: presumably caused by - the choice of transformation. Let's create a - small bitmap so we're not mistaken for an undefined - character. */ - h = w = 1; - size = paddedW = PAD(w, pad); - glyphs[i].bits = (char *)xalloc(size); - if (glyphs[i].bits == NULL) { - rc = AllocError; - break; - } - } - glyphs[i].metrics.attributes = - NEARESTPEL((long)(hypot(x1, y1) * sxmult)); - total_width += glyphs[i].metrics.attributes; - total_raw_width += abs((int)(INT16)glyphs[i].metrics.attributes); - count++; - glyphs[i].metrics.rightSideBearing = w + area->xmin; - glyphs[i].metrics.descent = area->ymax - NEARESTPEL(area->origin.y); - glyphs[i].metrics.ascent = h - glyphs[i].metrics.descent; - - - bzero(glyphs[i].bits, size); - if (h > 0 && w > 0) { - fill(glyphs[i].bits, h, paddedW, area, byte, bit, wordsize ); - } - - Destroy(area); - } - NoEncoding: - - delmemory(); - xfree(pool); - - if (pFont->info.firstCol > pFont->info.lastCol) - { - xfree(type1); - DestroyFontRec(pFont); - return BadFontName; - } - - if (i != 256) { - for (i--; i >= 0; i--) - if (glyphs[i].bits != NULL) - xfree(glyphs[i].bits); - xfree(type1); - DestroyFontRec(pFont); - return rc; - } - type1->pDefault = NULL; - - pFont->format = format; - - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - - pFont->info.firstRow = 0; - pFont->info.lastRow = 0; - - pFont->get_metrics = Type1GetMetrics; - pFont->get_glyphs = Type1GetGlyphs; - pFont->unload_font = Type1CloseFont; - pFont->unload_glyphs = NULL; - pFont->refcnt = 0; - - pFont->fontPrivate = (unsigned char *) type1; - - if (count) - { - total_raw_width = (total_raw_width * 10 + count / 2) / count; - if (total_width < 0) - { - /* Predominant direction is R->L */ - total_raw_width = -total_raw_width; - } - vals->width = (int)((double)total_raw_width * - vals->pixel_matrix[0] / 1000.0 + - (vals->pixel_matrix[0] > 0 ? .5 : -.5)); - } - - T1FillFontInfo(pFont, vals, fileName, entry->name.name, total_raw_width); - - *ppFont = pFont; - return Successful; -} - -#if XFONT_CID -unsigned int -getCID(FontPtr pFont, unsigned int charcode) -{ - unsigned int cidcode = 0; - Bool charvalid = FALSE; - cidglyphs *cid; - int i, j; - unsigned int char_row, char_col, rangelo_row, rangelo_col, k; - unsigned int rangehi_row, rangehi_col; - spacerange *spacerangeP; - cidrange *notdefrangeP, *cidrangeP; - - cid = (cidglyphs *)pFont->fontPrivate; - - if (cid == NULL) - return cidcode; - - char_row = (charcode >> 8) & 0xff; - char_col = charcode & 0xff; - - spacerangeP = CIDFontP->spacerangeP; - for (i = 0; i < CIDFontP->spacerangecnt; i++) { - for (j = 0; j < spacerangeP->rangecnt; j++) { - rangelo_row = - (spacerangeP->spacecode[j].srcCodeLo >> 8) & 0xff; - rangelo_col = spacerangeP->spacecode[j].srcCodeLo & 0xff; - rangehi_row = - (spacerangeP->spacecode[j].srcCodeHi >> 8) & 0xff; - rangehi_col = spacerangeP->spacecode[j].srcCodeHi & 0xff; - if (char_row >= rangelo_row && char_row <= rangehi_row && - char_col >= rangelo_col && char_col <= rangehi_col) { - charvalid = TRUE; - break; - } - } - if (charvalid) break; - spacerangeP = spacerangeP->next; - } - - if (charvalid) { - charvalid = FALSE; - cidrangeP = CIDFontP->cidrangeP; - for (i = 0; i < CIDFontP->cidrangecnt; i++) { - for (j = 0; j < cidrangeP->rangecnt; j++) { - rangelo_row = - (cidrangeP->range[j].srcCodeLo >> 8) & 0xff; - rangelo_col = cidrangeP->range[j].srcCodeLo & 0xff; - rangehi_row = - (cidrangeP->range[j].srcCodeHi >> 8) & 0xff; - rangehi_col = cidrangeP->range[j].srcCodeHi & 0xff; - if (char_row >= rangelo_row && char_row <= rangehi_row && - char_col >= rangelo_col && char_col <= rangehi_col) { - charvalid = TRUE; - for (k = cidrangeP->range[j].srcCodeLo; - k <= cidrangeP->range[j].srcCodeHi; k++) { - if (k == charcode) - cidcode = cidrangeP->range[j].dstCIDLo + k - - cidrangeP->range[j].srcCodeLo; - } - break; - } - } - if (charvalid) break; - cidrangeP = cidrangeP->next; - } - } - - if (charvalid) { - charvalid = FALSE; - notdefrangeP = CIDFontP->notdefrangeP; - for (i = 0; i < CIDFontP->notdefrangecnt; i++) { - for (j = 0; j < notdefrangeP->rangecnt; j++) { - rangelo_row = - (notdefrangeP->range[j].srcCodeLo >> 8) & 0xff; - rangelo_col = notdefrangeP->range[j].srcCodeLo & 0xff; - rangehi_row = - (notdefrangeP->range[j].srcCodeHi >> 8) & 0xff; - rangehi_col = notdefrangeP->range[j].srcCodeHi & 0xff; - if (char_row >= rangelo_row && char_row <= rangehi_row && - char_col >= rangelo_col && char_col <= rangehi_col) { - charvalid = TRUE; - for (k = notdefrangeP->range[j].srcCodeLo; - k <= notdefrangeP->range[j].srcCodeHi; k++) { - if (k == charcode) - /* the whole range is mapped to a single CID code */ - cidcode = notdefrangeP->range[j].dstCIDLo; - } - break; - } - } - if (charvalid) break; - notdefrangeP = notdefrangeP->next; - } - } - - /* If you specify a CMap that has more CIDs than a specified CIDFont, */ - /* the program could go beyond the number of entries in CIDMap. Make */ - /* sure that that does not happen. */ - if (cidcode < CIDFontP->CIDfontInfoP[CIDCOUNT].value.data.integer) - return cidcode; - else - return 0; -} - -static CharInfoPtr -CIDGetGlyph(FontPtr pFont, unsigned int charcode, CharInfoPtr pci) -{ - int rc; - CharInfoPtr cp = NULL; - unsigned int cidcode; - - /* character code -> CID */ - cidcode = getCID(pFont, charcode); - - cp = CIDGetGlyphInfo(pFont, cidcode, pci, &rc); - - if (rc != Successful && cidcode) { - cidcode = 0; - cp = CIDGetGlyphInfo(pFont, cidcode, pci, &rc); - } - - return cp; -} - -int -CIDGetGlyphs(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - unsigned int code, char_row, char_col; - CharInfoPtr *glyphsBase; - register unsigned int c; - CharInfoPtr pci; - CharInfoPtr pDefault; - cidglyphs *cid; - register int firstCol; - int rc = 0; - int cid_valid = 0; - - cid = (cidglyphs *)pFont->fontPrivate; - - FontP = NULL; - - firstCol = pFont->info.firstCol; - pDefault = cid->pDefault; - glyphsBase = glyphs; - - switch (charEncoding) { - -#define EXIST(pci) \ - ((pci)->metrics.attributes || \ - (pci)->metrics.ascent != -(pci)->metrics.descent || \ - (pci)->metrics.leftSideBearing != (pci)->metrics.rightSideBearing) - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - while (count--) { - c = (*chars++); - if (c >= firstCol && c <= pFont->info.lastCol) { - code = c - firstCol; - if (!(pci = (CharInfoRec *)cid->glyphs[code]) || - ((long)pci->bits == CID_BITMAP_UNDEFINED)) { - /* load font if not already loaded */ - if(!cid_valid) { - if(!CIDfontfcnA(cid->CIDFontName, cid->CMapName, &rc)) { FontP = NULL; - return Type1ReturnCodeToXReturnCode(rc); - } - cid_valid = 1; - } - pci = CIDGetGlyph(pFont, c, pci); - } - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - case Linear16Bit: - while (count--) { - char_row = *chars++; - char_col = *chars++; - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code]) || - ((long)pci->bits == CID_BITMAP_UNDEFINED)) { - /* load font if not already loaded */ - if(!cid_valid) { - if(!CIDfontfcnA(cid->CIDFontName, cid->CMapName, &rc)) { FontP = NULL; - return Type1ReturnCodeToXReturnCode(rc); - } - cid_valid = 1; - } - pci = CIDGetGlyph(pFont, c, pci); - } - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - - case TwoD16Bit: - while (count--) { - char_row = (*chars++); - char_col = (*chars++); - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code]) || - ((long)pci->bits == CID_BITMAP_UNDEFINED)) { - /* load font if not already loaded */ - if(!cid_valid) { - if(!CIDfontfcnA(cid->CIDFontName, cid->CMapName, &rc)) { FontP = NULL; - return Type1ReturnCodeToXReturnCode(rc); - } - cid_valid = 1; - } - pci = CIDGetGlyph(pFont, c, pci); - } - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; - -#undef EXIST -} -#endif - -static int -Type1GetGlyphs(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr pDefault; - register struct type1font *type1Font; - register int firstCol; - - type1Font = (struct type1font *) pFont->fontPrivate; - firstCol = pFont->info.firstCol; - pDefault = type1Font->pDefault; - glyphsBase = glyphs; - - switch (charEncoding) { - -#define EXIST(pci) \ - ((pci)->metrics.attributes || \ - (pci)->metrics.ascent != -(pci)->metrics.descent || \ - (pci)->metrics.leftSideBearing != (pci)->metrics.rightSideBearing) - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - while (count--) { - c = (*chars++); - if (c >= firstCol && - (pci = &type1Font->glyphs[c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - case Linear16Bit: - while (count--) { - c = *chars++ << 8; - c = (c | *chars++); - if (c < 256 && c >= firstCol && - (pci = &type1Font->glyphs[c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++); - if (r < numRows && c < 256 && c >= firstCol && - (pci = &type1Font->glyphs[(r << 8) + c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; - -#undef EXIST -} - -#if XFONT_CID -static CharInfoRec nonExistantChar; - -int -CIDGetMetrics(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - int ret; - cidglyphs *cid; - CharInfoPtr oldDefault; - char cidafmname[CID_PATH_MAX]; - char CIDFontName[CID_NAME_MAX]; - char *ptr; - - cid = (cidglyphs *)pFont->fontPrivate; - - strcpy(cidafmname, cid->CIDFontName); - if (!(ptr = strrchr(cidafmname, '/'))) - return BadFontName; - - *ptr = '\0'; - - strcpy(CIDFontName, ptr + 1); - - if (!(ptr = strrchr(cidafmname, '/'))) - return BadFontName; - - *ptr = '\0'; - - strcat(cidafmname, "/AFM/"); - strcat(cidafmname, CIDFontName); - - strcat(cidafmname, ".afm"); - - oldDefault = cid->pDefault; - cid->pDefault = &nonExistantChar; - - ret = CIDGetAFM(pFont, count, chars, charEncoding, glyphCount, (CharInfoPtr -*)glyphs, cidafmname); - if (ret != Successful) - ret = CIDGetGlyphs(pFont, count, chars, charEncoding, glyphCount, - (CharInfoPtr *)glyphs); - - *ptr = 0; - cid->pDefault = oldDefault; - return ret; -} -#endif - -static int -Type1GetMetrics(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - static CharInfoRec nonExistantChar; - - int ret; - struct type1font *type1Font; - CharInfoPtr oldDefault; - - type1Font = (struct type1font *) pFont->fontPrivate; - oldDefault = type1Font->pDefault; - type1Font->pDefault = &nonExistantChar; - ret = Type1GetGlyphs(pFont, count, chars, charEncoding, glyphCount, (CharInfoPtr *) glyphs); - type1Font->pDefault = oldDefault; - return ret; -} - -#if XFONT_CID -void -CIDCloseFont(FontPtr pFont) -{ - register int i; - cidglyphs *cid; - int nchars; - - if (pFont) { - - cid = (cidglyphs *)pFont->fontPrivate; - - if (cid) { - - if (cid->CIDFontName && !strcmp(cid->CIDFontName, CurCIDFontName) - && cid->CMapName && !strcmp(cid->CMapName, CurCMapName)){ - strcpy(CurCIDFontName, ""); /* initialize to none */ - strcpy(CurCMapName, ""); /* initialize to none */ - } - - if (cid->CIDFontName) - xfree(cid->CIDFontName); - - if (cid->CMapName) - xfree(cid->CMapName); - - nchars = (pFont->info.lastRow - pFont->info.firstRow + 1) * - (pFont->info.lastCol - pFont->info.firstCol + 1); - - for (i = 0; i < nchars; i++) { - if (cid->glyphs[i] && (cid->glyphs[i] != &nonExistantChar)) { - if (cid->glyphs[i]->bits) - xfree(cid->glyphs[i]->bits); - xfree(cid->glyphs[i]); - } - } - - if (cid->glyphs) - xfree(cid->glyphs); - - if (cid->AFMinfo) - xfree(cid->AFMinfo); -#ifdef USE_MMAP - if (cid->CIDdata) - munmap(cid->CIDdata, cid->CIDsize); -#endif - xfree(cid); - } - - if (pFont->info.props) - xfree(pFont->info.props); - - if (pFont->info.isStringProp) - xfree(pFont->info.isStringProp); - - DestroyFontRec(pFont); - } -} -#endif - -void -Type1CloseFont(FontPtr pFont) -{ - register int i; - struct type1font *type1; - - type1 = (struct type1font *) pFont->fontPrivate; - for (i=0; i < 256; i++) - if (type1->glyphs[i].bits != NULL) - xfree(type1->glyphs[i].bits); - xfree(type1); - - if (pFont->info.props) - xfree(pFont->info.props); - - if (pFont->info.isStringProp) - xfree(pFont->info.isStringProp); - - DestroyFontRec(pFont); -} - -static void -fill(char *dest, /* destination bitmap */ - int h, int w, /* dimensions of 'dest', w padded */ - struct region *area, /* region to write to 'dest' */ - int byte, int bit, /* flags; LSBFirst or MSBFirst */ - int wordsize) /* number of bits per word for LSB/MSB purposes */ -{ - register struct edgelist *edge; /* for looping through edges */ - register char *p; /* current scan line in 'dest' */ - register int y; /* for looping through scans */ - register int wbytes = w / 8; /* number of bytes in width */ - register pel *leftP,*rightP; /* pointers to X values, left and right */ - int xmin = area->xmin; /* upper left X */ - int ymin = area->ymin; /* upper left Y */ - - for (edge = area->anchor; VALIDEDGE(edge); edge = edge->link->link) { - - p = dest + (edge->ymin - ymin) * wbytes; - leftP = edge->xvalues; - rightP = edge->link->xvalues; - - for (y = edge->ymin; y < edge->ymax; y++) { - fillrun(p, *leftP++ - xmin, *rightP++ - xmin, bit); - p += wbytes; - } - } -/* -Now, as an afterthought, we'll go reorganize if odd byte order requires -it: -*/ - if (byte == LSBFirst && wordsize != 8) { - register int i; - - switch (wordsize) { - case 16: - { - register unsigned short data,*p; - - p = (unsigned short *) dest; - - for (i = h * w /16; --i >= 0;) { - data = *p; - *p++ = (data << 8) + (data >> 8); - } - break; - } - case 64: - case 32: - { - register unsigned long data,*p; - - p = (unsigned long *) dest; - - for (i = h * w / 32; --i >= 0;) { - data = *p; - *p++ = (data << 24) + (data >> 24) - + (0xFF00 & (data >> 8)) - + (0xFF0000 & (data << 8)); - } - if (wordsize == 64) { - - p = (unsigned long *) dest; - - for (i = h * w / 64; --i >= 0;) { - data = *p++; - p[-1] = p[0]; - *p++ = data; - } - } - break; - } - default: - Abort("xiFill: unknown format"); - } - } - -} - -#define ALLONES 0xFF - -static void -fillrun(char *p, /* address of this scan line */ - pel x0, pel x1, /* left and right X */ - int bit) /* format: LSBFirst or MSBFirst */ -{ - register int startmask,endmask; /* bits to set in first and last char*/ - register int middle; /* number of chars between start and end + 1 */ - - if (x1 <= x0) - return; - middle = x1/8 - x0/8; - p += x0/8; - x0 &= 7; x1 &= 7; - if (bit == LSBFirst) { - startmask = ALLONES << x0; - endmask = ~(ALLONES << x1); - } - else { - startmask = ALLONES >> x0; - endmask = ~(ALLONES >> x1); - } - if (middle == 0) - *p++ |= startmask & endmask; - else { - *p++ |= startmask; - while (--middle > 0) - *p++ = (char)ALLONES; - *p |= endmask; - } -} - -#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING) - -#if XFONT_CID -FontRendererRec CIDRendererInfo[] = { - { ".cid", 4, NULL, CIDOpenScalable, - NULL, CIDGetInfoScalable, 0, CAPABILITIES } -}; -#endif - -#if XFONT_CID -FontRendererRec Type1RendererInfo[] = { -#else -static FontRendererRec renderers[] = { -#endif - { ".pfa", 4, NULL, Type1OpenScalable, - NULL, Type1GetInfoScalable, 0, CAPABILITIES }, - { ".pfb", 4, NULL, Type1OpenScalable, - NULL, Type1GetInfoScalable, 0, CAPABILITIES } -}; - -#if XFONT_CID -void -CIDRegisterFontFileFunctions(void) -{ - int i; - - Type1InitStdProps(); - for (i=0; i < sizeof(CIDRendererInfo) / sizeof(FontRendererRec); i++) - FontFileRegisterRenderer(&CIDRendererInfo[i]); -} -#endif - -void -Type1RegisterFontFileFunctions(void) -{ - int i; - -#if XFONT_CID - Type1InitStdProps(); - for (i=0; i < sizeof(Type1RendererInfo) / sizeof(FontRendererRec); i++) - FontFilePriorityRegisterRenderer(&Type1RendererInfo[i], -10); -#else - T1InitStdProps(); - for (i=0; i < sizeof(renderers) / sizeof(FontRendererRec); i++) - FontFilePriorityRegisterRenderer(&renderers[i], -10); -#endif -} - -int -Type1ReturnCodeToXReturnCode(int rc) -{ - switch(rc) { - case SCAN_OK: - return Successful; - case SCAN_FILE_EOF: - /* fall through to BadFontFormat */ - case SCAN_ERROR: - return BadFontFormat; - case SCAN_OUT_OF_MEMORY: - return AllocError; - case SCAN_FILE_OPEN_ERROR: - return BadFontName; - case SCAN_TRUE: - case SCAN_FALSE: - case SCAN_END: - /* fall through */ - default: - /* this should not happen */ -#if XFONT_CID - ErrorF("Font return code cannot be converted to X return code: %d\n", rc); -#else - ErrorF("Type1 return code not convertable to X return code: %d\n", rc); -#endif - return rc; - } -} - -#if XFONT_CID -CharInfoPtr -CIDRenderGlyph(FontPtr pFont, psobj *charstringP, psobj *subarrayP, - struct blues_struct *bluesP, CharInfoPtr pci, int *mode) -{ - int bit, - byte, - glyph, - scan, - image; - int pad,wordsize; /* scan & image in bits */ - long *pool; /* memory pool for ximager objects */ - int size; /* for memory size calculations */ - struct XYspace *S; /* coordinate space for character */ - struct region *area; - CharInfoRec *glyphs; - int len, rc; - long x0; - double x1, y1, t1 = .001, t2 = 0.0, t3 = 0.0, t4 = .001; - double sxmult; - long h,w; - long paddedW; - cidglyphs *cid; - fsBitmapFormat format = 0; - fsBitmapFormatMask fmask = 0; - - cid = (cidglyphs *)pFont->fontPrivate; - - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - rc = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - if (rc != Successful) { - *mode = rc; - return(NULL); - } - - pad = glyph * 8; - wordsize = scan * 8; - -#define PAD(bits, pad) (((bits)+(pad)-1)&-(pad)) - - /* heuristic for "maximum" size of pool we'll need: */ - size = 200000 + 600 * - (int)hypot(cid->pixel_matrix[2], cid->pixel_matrix[3]) - * sizeof(short); - if (size < 0 || NULL == (pool = (long *) xalloc(size))) { - *mode = AllocError; - return(NULL); - } - - addmemory(pool, size); - - if (pci && (long)pci->bits == CID_BITMAP_UNDEFINED) - glyphs = pci; - else { - if (!(glyphs = (CharInfoRec *)xalloc(sizeof(CharInfoRec)))) { - delmemory(); - xfree(pool); - *mode = AllocError; - return(NULL); - } - bzero(glyphs, sizeof(CharInfoRec)); - } - - S = (struct XYspace *) t1_Transform((struct xobject *)IDENTITY, - t1, t2, t3, t4); - - S = (struct XYspace *) Permanent(t1_Transform((struct xobject *)S, - cid->pixel_matrix[0], - -cid->pixel_matrix[1], - cid->pixel_matrix[2], - -cid->pixel_matrix[3])); - - /* multiplier for computation of raw values */ - sxmult = hypot(cid->pixel_matrix[0], cid->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - - rc = 0; - area = (struct region *)CIDfontfcnC(S, charstringP, subarrayP, bluesP, - &len, &rc); - if (rc < 0 || area == NULL) { - delmemory(); - xfree(pool); - if (pci != glyphs) xfree(glyphs); - *mode = Type1ReturnCodeToXReturnCode(rc); - return(NULL); - } - - h = area->ymax - area->ymin; - w = area->xmax - area->xmin; - paddedW = PAD(w, pad); - - if (h > 0 && w > 0) { - size = h * paddedW / 8; - glyphs[0].bits = (char *)xalloc(size); - if (glyphs[0].bits == NULL) { - Destroy(area); - delmemory(); - xfree(pool); - if (pci != glyphs) xfree(glyphs); - *mode = AllocError; - return(NULL); - } - bzero(glyphs[0].bits, size); - } - else { - size = 0; - h = w = 0; - area->xmin = area->xmax = 0; - area->ymax = area->ymax = 0; - glyphs[0].bits = NULL; - } - - glyphs[0].metrics.leftSideBearing = area->xmin; - x1 = (double)(x0 = area->ending.x - area->origin.x); - y1 = (double)(area->ending.y - area->origin.y); - glyphs[0].metrics.characterWidth = - (x0 + (x0 > 0 ? FPHALF : -FPHALF)) / (1 << FRACTBITS); - if (!glyphs[0].metrics.characterWidth && size == 0) - { - /* Zero size and zero extents: presumably caused by - the choice of transformation. Let's create a - small bitmap so we're not mistaken for an undefined - character. */ - h = w = 1; - size = paddedW = PAD(w, pad); - glyphs[0].bits = (char *)xalloc(size); - if (glyphs[0].bits == NULL) { - Destroy(area); - delmemory(); - xfree(pool); - if (pci != glyphs) xfree(glyphs); - *mode = AllocError; - return(NULL); - } - bzero(glyphs[0].bits, size); - } - glyphs[0].metrics.attributes = - NEARESTPEL((long)(hypot(x1, y1) * sxmult)); - glyphs[0].metrics.rightSideBearing = w + area->xmin; - glyphs[0].metrics.descent = area->ymax - NEARESTPEL(area->origin.y); - glyphs[0].metrics.ascent = h - glyphs[0].metrics.descent; - - if (h > 0 && w > 0) - fill(glyphs[0].bits, h, paddedW, area, byte, bit, wordsize); - Destroy(area); - delmemory(); - xfree(pool); - *mode = Successful; - return(glyphs); -} -#endif diff --git a/nx-X11/lib/font/Type1/t1hdigit.h b/nx-X11/lib/font/Type1/t1hdigit.h deleted file mode 100644 index e05f0de5d..000000000 --- a/nx-X11/lib/font/Type1/t1hdigit.h +++ /dev/null @@ -1,40 +0,0 @@ -/* $Xorg: t1hdigit.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Indicators for special characters in the p_hdigit.h tables */ -#define HERROR (0xfe) -#define HWHITE_SPACE (0xfd) -#define HRIGHT_ANGLE (0xfc) -#define LAST_HDIGIT (0xf0) - -/* Declarations for the tables */ -#define HighHexP (HighHex+1) -extern unsigned char HighHex[]; -#define LowHexP (LowHex+1) -extern unsigned char LowHex[]; diff --git a/nx-X11/lib/font/Type1/t1imager.h b/nx-X11/lib/font/Type1/t1imager.h deleted file mode 100644 index 9730f9a47..000000000 --- a/nx-X11/lib/font/Type1/t1imager.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $Xorg: t1imager.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.4 2001/01/17 19:43:23 dawes Exp $ */ - - -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" - -typedef struct xobject *xobject; -typedef struct segment *path; -typedef struct region *region; -typedef struct XYspace *XYspace; - - -#ifndef NULL -#include -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - - -#define WINDINGRULE -2 -#define EVENODDRULE -3 - -#define CONTINUITY 0x80 /* can be added to above rules; e.g. WINDINGRULE+CONTINUITY */ - - -/* -Generic null object definition: -*/ -#define NULLOBJECT ((xobject)NULL) - -/* -Null path definition: -*/ -#define NULLPATH NULLOBJECT - -/* -Full page and null region definition: -*/ -#define INFINITY t1_Infinity -#ifndef NOEXTERNS -extern region *INFINITY; -#endif -#define NULLREGION NULLOBJECT - -#define FF_PARSE_ERROR 5 -#define FF_PATH 1 - diff --git a/nx-X11/lib/font/Type1/t1info.c b/nx-X11/lib/font/Type1/t1info.c deleted file mode 100644 index 322572ee2..000000000 --- a/nx-X11/lib/font/Type1/t1info.c +++ /dev/null @@ -1,1096 +0,0 @@ -/* $Xorg: t1info.c,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License, subject to the license given below, 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software - * without specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - * - * Author: Carol H. Thompson IBM Almaden Research Center - * Modeled on spinfo.c by Dave Lemke, Network Computing Devices, Inc - * which contains the following copyright and permission notices: - * - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices and Digital make no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.18tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#include -#include -#ifndef FONTMODULE -#include -#ifndef BUILDCID -#include -#endif -#else -#include "xf86_ansic.h" -#endif -#include - -#if XFONT_CID -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE -#include -#undef _XOPEN_SOURCE -#endif -#endif -#include "objects.h" -#include "spaces.h" -#include "range.h" -#endif - -#if XFONT_CID -#include "util.h" -#include "fontfcn.h" - -#if defined(HAVE_CFM) || defined(CID_ALL_CHARS) -#ifndef DEFAULT_CFM_DIR -#define DEFAULT_CFM_DIR "./" -#endif -char cfmDefaultDir[] = DEFAULT_CFM_DIR; -#define CFMMAGIC 0x91239123 -#endif -#endif -#include "t1intf.h" - -#define DECIPOINTSPERINCH 722.7 -#define DEFAULTRES 75 -#define DEFAULTPOINTSIZE 120 - -enum scaleType { - atom, truncate_atom, pixel_size, point_size, resolution_x, - resolution_y, average_width -}; - -#if XFONT_CID -extern cidfont *CIDFontP; -static int stdpropsinit = 0; - -typedef struct cfm_rec { - xCharInfo maxbounds; - xCharInfo minbounds; - xCharInfo ink_maxbounds; - xCharInfo ink_minbounds; - INT32 totalrw; - INT16 maxo; - INT16 alle; -} cfmrec; -#endif - -typedef struct _fontProp { - char *name; - long atom; - enum scaleType type; -} fontProp; - -static fontProp fontNamePropTable[] = { /* Example: */ - { "FOUNDRY", 0, atom }, /* adobe */ - { "FAMILY_NAME", 0, atom }, /* times roman */ - { "WEIGHT_NAME", 0, atom }, /* bold */ - { "SLANT", 0, atom }, /* i */ - { "SETWIDTH_NAME", 0, atom }, /* normal */ - { "ADD_STYLE_NAME", 0, atom }, /* */ - { "PIXEL_SIZE", 0, pixel_size }, /* 18 */ - { "POINT_SIZE", 0, point_size }, /* 180 */ - { "RESOLUTION_X", 0, resolution_x }, /* 72 */ - { "RESOLUTION_Y", 0, resolution_y }, /* 72 */ - { "SPACING", 0, atom }, /* p */ - { "AVERAGE_WIDTH", 0, average_width }, /* 0 */ - { "CHARSET_REGISTRY", 0, atom }, /* ISO8859 */ - { "CHARSET_ENCODING", 0, truncate_atom } /* 1 */ -}; - -/* NOTICE: Following array is closely related to the sequence of defines - following it. */ -static fontProp extraProps[] = { - { "FONT", 0, }, - { "COPYRIGHT", 0, }, - { "RAW_PIXEL_SIZE", 0, }, - { "RAW_POINT_SIZE", 0, }, - { "RAW_ASCENT", 0, }, - { "RAW_DESCENT", 0, }, - { "RAW_AVERAGE_WIDTH", 0, }, - { "FACE_NAME", 0, }, - { "FONT_TYPE", 0, }, - { "RASTERIZER_NAME", 0, } -}; - -/* this is a bit kludgy */ -#define FONTPROP 0 -#define COPYRIGHTPROP 1 -#define RAWPIXELPROP 2 -#define RAWPOINTPROP 3 -#define RAWASCENTPROP 4 -#define RAWDESCENTPROP 5 -#define RAWWIDTHPROP 6 -#define FACE_NAMEPROP 7 -#define FONT_TYPEPROP 8 -#define RASTERIZER_NAMEPROP 9 - -#define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) -#define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) - -#define NPROPS (NNAMEPROPS + NEXTRAPROPS) - -/*ARGSUSED*/ -static void -FillHeader(FontInfoPtr pInfo, FontScalablePtr Vals) -{ - /* OpenScalable in T1FUNCS sets the following: - pInfo->firstCol, - pInfo->firstRow, - pInfo->lastCol, and - pInfo->lastRow. */ - /* the following are ununsed - pInfo->pad. */ - - /* Items we should handle better someday +++ */ - pInfo->defaultCh = 0; - pInfo->drawDirection = LeftToRight; - if (Vals->point_matrix[0] == Vals->point_matrix[3]) - pInfo->anamorphic = 0; - else - pInfo->anamorphic = 1; - pInfo->inkMetrics = 0; /* no ink metrics here */ - pInfo->cachable = 1; /* no licensing (yet) */ -} - -static void -adjust_min_max(xCharInfo *minc, xCharInfo *maxc, xCharInfo *tmp) -{ -#define MINMAX(field,ci) \ - if (minc->field > (ci)->field) \ - minc->field = (ci)->field; \ - if (maxc->field < (ci)->field) \ - maxc->field = (ci)->field; - - MINMAX(ascent, tmp); - MINMAX(descent, tmp); - MINMAX(leftSideBearing, tmp); - MINMAX(rightSideBearing, tmp); - MINMAX(characterWidth, tmp); - - /* Do MINMAX for attributes field. Since that field is CARD16, - we'll cast to a signed integer */ - if ((INT16)minc->attributes > (INT16)tmp->attributes) - minc->attributes = tmp->attributes; - if ((INT16)maxc->attributes < (INT16)tmp->attributes) - maxc->attributes = tmp->attributes; - -#undef MINMAX -} - -static void -ComputeBounds(FontInfoPtr pInfo, CharInfoPtr pChars, FontScalablePtr Vals) -{ - int i; - xCharInfo minchar, maxchar; - int numchars = 0; - int totchars; - int overlap; - int maxlap; - - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - - maxlap = -32767; - totchars = pInfo->lastCol - pInfo->firstCol + 1; - pChars += pInfo->firstCol; - pInfo->allExist = 1; - for (i = 0; i < totchars; i++,pChars++) { - xCharInfo *pmetrics = &pChars->metrics; - - if (pmetrics->attributes || - pmetrics->ascent != -pmetrics->descent || - pmetrics->leftSideBearing != pmetrics->rightSideBearing) { - numchars++; - adjust_min_max(&minchar, &maxchar, pmetrics); - overlap = pmetrics->rightSideBearing - pmetrics->characterWidth; - if (overlap > maxlap) maxlap = overlap; - } - else pInfo->allExist = 0; - } - - /* If we're monospaced, round the average width field to the - nearest pixel */ - if (minchar.characterWidth == maxchar.characterWidth) - Vals->width = minchar.characterWidth * 10; - - pInfo->maxbounds = maxchar; - pInfo->minbounds = minchar; - pInfo->ink_maxbounds = maxchar; - pInfo->ink_minbounds = minchar; - pInfo->maxOverlap = maxlap + -(minchar.leftSideBearing); - - /* Set the pInfo flags */ - /* Properties set by FontComputeInfoAccelerators: - pInfo->noOverlap; - pInfo->terminalFont; - pInfo->constantMetrics; - pInfo->constantWidth; - pInfo->inkInside; - - */ - FontComputeInfoAccelerators (pInfo); -} - -#if XFONT_CID -#ifdef CID_ALL_CHARS -void -ComputeBoundsAllChars(FontPtr pFont, char *cfmfilename, double sxmult) -{ - FILE *cfm; - CARD32 magic; - int count = 0; - int maxlap, overlap, i, j, k, ret; - xCharInfo minchar, maxchar; - cidrange *cidrangeP; - unsigned char ccode[2]; - unsigned long ccount; - xCharInfo *pmetrics; - long total_raw_width = 0, total_width = 0; - char cfmd[CID_PATH_MAX]; - cfmrec *cfmp; - char *p; - - if (!(cfm = fopen(cfmfilename, "w"))) { - fprintf(stderr, - "Unable to open the file %s. You are probably not logged in as root.\n", - cfmfilename); - p = strrchr(cfmfilename, '/'); - if (p == NULL) exit(1); - strcpy(cfmd, cfmDefaultDir); - strcat(cfmd, p + 1); - if (!(cfm = fopen(cfmd, "w"))) { - fprintf(stderr, - "Switching to current directory. Unable to open the file %s.\n", - cfmd); - exit(1); - } - } - - if ((cfmp = (cfmrec *)xalloc(sizeof(cfmrec))) == NULL) { - fprintf(stderr, "Unable to allocate memory."); - exit(1); - } - bzero(cfmp, sizeof(cfmrec)); - - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - - maxlap = -32767; - cfmp->alle = 1; - cidrangeP = CIDFontP->cidrangeP; - - /* go through all character codes specified in a given CMap */ - for (i = 0; i < CIDFontP->cidrangecnt; i++) { - for (j = 0; j < cidrangeP->rangecnt; j++) { - for (k = cidrangeP->range[j].srcCodeLo; - k <= cidrangeP->range[j].srcCodeHi; k++) { - ccode[0] = (k >> 8) & 0xff; - ccode[1] = k & 0xff; - ret = CIDGetMetrics(pFont, 1, ccode, Linear16Bit, &ccount, &pmetrics); - if (ret != Successful || (ret == Successful && pmetrics == NULL)) - continue; - total_width += pmetrics->attributes; - total_raw_width += abs((int)(INT16)pmetrics->attributes); - if (pmetrics->attributes || - pmetrics->ascent != -pmetrics->descent || - pmetrics->leftSideBearing != pmetrics->rightSideBearing) { - count++; - adjust_min_max(&minchar, &maxchar, pmetrics); - overlap = pmetrics->rightSideBearing - pmetrics->characterWidth; - if (overlap > maxlap) maxlap = overlap; - } - else cfmp->alle = 0; - } - } - } - - if (count) - { - total_raw_width = (total_raw_width * 10 + count / 2) / count; - if (total_width < 0) - { - /* Predominant direction is R->L */ - total_raw_width = -total_raw_width; - } - } - - cfmp->totalrw = (INT32)total_raw_width; - - cfmp->maxbounds.leftSideBearing = - floor((double)maxchar.leftSideBearing * sxmult + 0.5); - cfmp->maxbounds.rightSideBearing = - floor((double)maxchar.rightSideBearing * sxmult + 0.5); - cfmp->maxbounds.characterWidth = - floor((double)maxchar.characterWidth * sxmult + 0.5); - cfmp->maxbounds.ascent = - floor((double)maxchar.ascent * sxmult + 0.5); - cfmp->maxbounds.descent = - floor((double)maxchar.descent * sxmult); - cfmp->maxbounds.attributes = maxchar.attributes; - - cfmp->minbounds.leftSideBearing = - floor((double)minchar.leftSideBearing * sxmult + 0.5); - cfmp->minbounds.rightSideBearing = - floor((double)minchar.rightSideBearing * sxmult + 0.5); - cfmp->minbounds.characterWidth = - floor((double)minchar.characterWidth * sxmult + 0.5); - cfmp->minbounds.ascent = - floor((double)minchar.ascent * sxmult + 0.5); - cfmp->minbounds.descent = - floor((double)minchar.descent * sxmult + 0.5); - cfmp->minbounds.attributes = minchar.attributes; - - cfmp->ink_maxbounds.leftSideBearing = - floor((double)maxchar.leftSideBearing * sxmult + 0.5); - cfmp->ink_maxbounds.rightSideBearing = - floor((double)maxchar.rightSideBearing * sxmult + 0.5); - cfmp->ink_maxbounds.characterWidth = - floor((double)maxchar.characterWidth * sxmult + 0.5); - cfmp->ink_maxbounds.ascent = - floor((double)maxchar.ascent * sxmult + 0.5); - cfmp->ink_maxbounds.descent = - floor((double)maxchar.descent * sxmult + 0.5); - cfmp->ink_maxbounds.attributes = maxchar.attributes; - - cfmp->ink_minbounds.leftSideBearing = - floor((double)minchar.leftSideBearing * sxmult + 0.5); - cfmp->ink_minbounds.rightSideBearing = - floor((double)minchar.rightSideBearing * sxmult + 0.5); - cfmp->ink_minbounds.characterWidth = - floor((double)minchar.characterWidth * sxmult + 0.5); - cfmp->ink_minbounds.ascent = - floor((double)minchar.ascent * sxmult + 0.5); - cfmp->ink_minbounds.descent = - floor((double)minchar.descent * sxmult + 0.5); - cfmp->ink_minbounds.attributes = minchar.attributes; - - cfmp->maxo = (INT32)(maxlap + -(minchar.leftSideBearing)); - - magic = CFMMAGIC; - fwrite(&magic, sizeof(CARD32), 1, cfm); - fwrite(cfmp, sizeof(cfmrec), 1, cfm); - xfree(cfmp); - fclose(cfm); -} -#else -static long -ComputeBoundsAll(FontPtr pFont) -{ - int count = 0; - int maxlap, overlap, i, j, k, ret; - xCharInfo minchar, maxchar; - cidrange *cidrangeP; - unsigned char ccode[2]; - unsigned long ccount; - xCharInfo *pmetrics; - CharInfoRec *cinfo[1]; - long total_raw_width = 0, total_width = 0; - FontInfoPtr pInfo = &(pFont->info); - - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - - maxlap = -32767; - pInfo->allExist = 1; - cidrangeP = CIDFontP->cidrangeP; - - /* go through all character codes specified in a given CMap */ - for (i = 0; i < CIDFontP->cidrangecnt; i++) { - for (j = 0; j < cidrangeP->rangecnt; j++) { - for (k = cidrangeP->range[j].srcCodeLo; - k <= cidrangeP->range[j].srcCodeHi; k++) { - ccode[0] = (k >> 8) & 0xff; - ccode[1] = k & 0xff; - ret = CIDGetMetrics(pFont, 1, ccode, Linear16Bit, &ccount, (xCharInfo **)cinfo); - if (ret != Successful || cinfo == NULL) - continue; - pmetrics = &cinfo[0]->metrics; - total_width += pmetrics->attributes; - total_raw_width += abs((int)(INT16)pmetrics->attributes); - if (pmetrics->attributes || - pmetrics->ascent != -pmetrics->descent || - pmetrics->leftSideBearing != pmetrics->rightSideBearing) { - count++; - adjust_min_max(&minchar, &maxchar, pmetrics); - overlap = pmetrics->rightSideBearing - pmetrics->characterWidth; - if (overlap > maxlap) maxlap = overlap; - } - else pInfo->allExist = 0; - } - } - } - - if (count) - { - total_raw_width = (total_raw_width * 10 + count / 2) / count; - if (total_width < 0) - { - /* Predominant direction is R->L */ - total_raw_width = -total_raw_width; - } - } - - pInfo->maxbounds.leftSideBearing = maxchar.leftSideBearing; - pInfo->maxbounds.rightSideBearing = maxchar.rightSideBearing; - pInfo->maxbounds.characterWidth = maxchar.characterWidth; - pInfo->maxbounds.ascent = maxchar.ascent; - pInfo->maxbounds.descent = maxchar.descent; - pInfo->maxbounds.attributes = maxchar.attributes; - - pInfo->minbounds.leftSideBearing = minchar.leftSideBearing; - pInfo->minbounds.rightSideBearing = minchar.rightSideBearing; - pInfo->minbounds.characterWidth = minchar.characterWidth; - pInfo->minbounds.ascent = minchar.ascent; - pInfo->minbounds.descent = minchar.descent; - pInfo->minbounds.attributes = minchar.attributes; - - pInfo->ink_maxbounds.leftSideBearing = maxchar.leftSideBearing; - pInfo->ink_maxbounds.rightSideBearing = maxchar.rightSideBearing; - pInfo->ink_maxbounds.characterWidth = maxchar.characterWidth; - pInfo->ink_maxbounds.ascent = maxchar.ascent; - pInfo->ink_maxbounds.descent = maxchar.descent; - pInfo->ink_maxbounds.attributes = maxchar.attributes; - - pInfo->ink_minbounds.leftSideBearing = minchar.leftSideBearing; - pInfo->ink_minbounds.rightSideBearing = minchar.rightSideBearing; - pInfo->ink_minbounds.characterWidth = minchar.characterWidth; - pInfo->ink_minbounds.ascent = minchar.ascent; - pInfo->ink_minbounds.descent = minchar.descent; - pInfo->ink_minbounds.attributes = minchar.attributes; - - pInfo->maxOverlap = maxlap + -(minchar.leftSideBearing); - - return total_raw_width; -} -#endif -#endif - -static void -ComputeProps(FontInfoPtr pInfo, FontScalablePtr Vals, char *Filename, - long *sAscent, long *sDescent) -{ - int infoint; - int infoBBox[4]; - int rc; - - QueryFontLib(Filename, "isFixedPitch", &infoint, &rc); - if (!rc) { - pInfo->constantWidth = infoint; - } - QueryFontLib((char *)0, "FontBBox", infoBBox, &rc); - if (!rc) { - pInfo->fontAscent = - (int)((double)infoBBox[3] * Vals->pixel_matrix[3] + - (infoBBox[3] > 0 ? 500 : -500)) / 1000; - pInfo->fontDescent = - -(int)((double)infoBBox[1] * Vals->pixel_matrix[3] + - (infoBBox[1] > 0 ? 500 : -500)) / 1000; - *sAscent = infoBBox[3]; - *sDescent = -infoBBox[1]; - } -} - -#if XFONT_CID -#ifndef CID_ALL_CHARS -static void -CIDComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, - char *Filename, char *Cmapname, char *Fontname, - long sAscent, long sDescent, long sWidth) -{ - FontPropPtr pp; - int i, - nprops; - fontProp *fpt; - char *is_str; - char *ptr1 = NULL, - *ptr2; - char *ptr3; - char *infostrP; - int rc; - char scaledName[CID_PATH_MAX]; - - strcpy (scaledName, Fontname); - /* Fill in our copy of the fontname from the Vals structure */ - FontParseXLFDName (scaledName, Vals, FONT_XLFD_REPLACE_VALUE); - - /* This form of the properties is used by the X-client; the X-server - doesn't care what they are. */ - nprops = pInfo->nprops = NPROPS; - pInfo->isStringProp = (char *) xalloc(sizeof(char) * nprops); - pInfo->props = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops); - if (!pInfo->isStringProp || !pInfo->props) { - xfree(pInfo->isStringProp); - pInfo->isStringProp = (char *) 0; - xfree(pInfo->props); - pInfo->props = (FontPropPtr) 0; - pInfo->nprops = 0; - return; - } - bzero(pInfo->isStringProp, (sizeof(char) * nprops)); - - ptr2 = scaledName; - for (i = NNAMEPROPS, pp = pInfo->props, fpt = fontNamePropTable, is_str = pInfo->isStringProp; - i; - i--, pp++, fpt++, is_str++) { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - pp->name = fpt->atom; - switch (fpt->type) { - case atom: /* Just copy info from scaledName */ - *is_str = TRUE; - pp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - break; - case truncate_atom: - *is_str = TRUE; - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - pp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - break; - case pixel_size: - pp->value = (int)(fabs(Vals->pixel_matrix[3]) + .5); - break; - case point_size: - pp->value = (int)(fabs(Vals->point_matrix[3]) * 10.0 + .5); - break; - case resolution_x: - pp->value = Vals->x; - break; - case resolution_y: - pp->value = Vals->y; - break; - case average_width: - pp->value = Vals->width; - break; - } - } - - for (i = 0, fpt = extraProps; - i < NEXTRAPROPS; - i++, is_str++, pp++, fpt++) { - pp->name = fpt->atom; - switch (i) { - case FONTPROP: - *is_str = TRUE; - pp->value = MakeAtom(scaledName, strlen(scaledName), TRUE); - break; - case COPYRIGHTPROP: - *is_str = TRUE; - CIDQueryFontLib(Filename, Cmapname, "Notice", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "Copyright Notice not available"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FACE_NAMEPROP: - *is_str = TRUE; - CIDQueryFontLib(Filename, Cmapname, "CIDFontName", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "(unknown)"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FONT_TYPEPROP: - *is_str = TRUE; - infostrP = "CIDFont"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RASTERIZER_NAMEPROP: - *is_str = TRUE; - infostrP = "X Consortium Type 1 Rasterizer"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RAWPIXELPROP: - *is_str = FALSE; - pp->value = 1000; - break; - case RAWPOINTPROP: - *is_str = FALSE; - pp->value = (long)(72270.0 / (double)Vals->y + .5); - break; - case RAWASCENTPROP: - *is_str = FALSE; - pp->value = sAscent; - break; - case RAWDESCENTPROP: - *is_str = FALSE; - pp->value = sDescent; - break; - case RAWWIDTHPROP: - *is_str = FALSE; - pp->value = sWidth; - break; - } - } -} -#endif -#endif - -static void -ComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, - char *Filename, char *Fontname, - long sAscent, long sDescent, long sWidth) -{ - FontPropPtr pp; - int i, - nprops; - fontProp *fpt; - char *is_str; - char *ptr1 = NULL, - *ptr2; - char *ptr3; - char *infostrP; - int rc; - char scaledName[MAXFONTNAMELEN]; - - strcpy (scaledName, Fontname); - /* Fill in our copy of the fontname from the Vals structure */ - FontParseXLFDName (scaledName, Vals, FONT_XLFD_REPLACE_VALUE); - - /* This form of the properties is used by the X-client; the X-server - doesn't care what they are. */ - nprops = pInfo->nprops = NPROPS; - pInfo->isStringProp = (char *) xalloc(sizeof(char) * nprops); - pInfo->props = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops); - if (!pInfo->isStringProp || !pInfo->props) { - xfree(pInfo->isStringProp); - pInfo->isStringProp = (char *) 0; - xfree(pInfo->props); - pInfo->props = (FontPropPtr) 0; - return; - } - bzero(pInfo->isStringProp, (sizeof(char) * nprops)); - - ptr2 = scaledName; - for (i = NNAMEPROPS, pp = pInfo->props, fpt = fontNamePropTable, is_str = pInfo->isStringProp; - i; - i--, pp++, fpt++, is_str++) { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - pp->name = fpt->atom; - switch (fpt->type) { - case atom: /* Just copy info from scaledName */ - *is_str = TRUE; - pp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - break; - case truncate_atom: - *is_str = TRUE; - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - pp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - break; - case pixel_size: - pp->value = (int)(fabs(Vals->pixel_matrix[3]) + .5); - break; - case point_size: - pp->value = (int)(fabs(Vals->point_matrix[3]) * 10.0 + .5); - break; - case resolution_x: - pp->value = Vals->x; - break; - case resolution_y: - pp->value = Vals->y; - break; - case average_width: - pp->value = Vals->width; - break; - } - } - - for (i = 0, fpt = extraProps; - i < NEXTRAPROPS; - i++, is_str++, pp++, fpt++) { - pp->name = fpt->atom; - switch (i) { - case FONTPROP: - *is_str = TRUE; - pp->value = MakeAtom(scaledName, strlen(scaledName), TRUE); - break; - case COPYRIGHTPROP: - *is_str = TRUE; - QueryFontLib(Filename, "Notice", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "Copyright Notice not available"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FACE_NAMEPROP: - *is_str = TRUE; - QueryFontLib(Filename, "FontName", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "(unknown)"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FONT_TYPEPROP: - *is_str = TRUE; - infostrP = "Type 1"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RASTERIZER_NAMEPROP: - *is_str = TRUE; - infostrP = "X Consortium Type 1 Rasterizer"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RAWPIXELPROP: - *is_str = FALSE; - pp->value = 1000; - break; - case RAWPOINTPROP: - *is_str = FALSE; - pp->value = (long)(72270.0 / (double)Vals->y + .5); - break; - case RAWASCENTPROP: - *is_str = FALSE; - pp->value = sAscent; - break; - case RAWDESCENTPROP: - *is_str = FALSE; - pp->value = sDescent; - break; - case RAWWIDTHPROP: - *is_str = FALSE; - pp->value = sWidth; - break; - } - } -} - -#if XFONT_CID -/*ARGSUSED*/ -int -CIDGetInfoScalable(FontPathElementPtr fpe, - FontInfoPtr pInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr Vals) -{ - FontPtr pfont; - int flags = 0; - long format = 0; /* It doesn't matter what format for just info */ - long fmask = 0; - int ret; - - ret = CIDOpenScalable(fpe, &pfont, flags, entry, fileName, Vals, - format, fmask, NULL); - if (ret != Successful) - return ret; - *pInfo = pfont->info; - - /* XXX - Set pointers in pfont->info to NULL so they are not freed. */ - pfont->info.props = NULL; - pfont->info.isStringProp = NULL; - - CIDCloseFont(pfont); - return Successful; -} -#endif - -/*ARGSUSED*/ -int -Type1GetInfoScalable(FontPathElementPtr fpe, - FontInfoPtr pInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr Vals) -{ - FontPtr pfont; - int flags = 0; - long format = 0; /* It doesn't matter what format for just info */ - long fmask = 0; - int ret; - - ret = Type1OpenScalable(fpe, &pfont, flags, entry, fileName, Vals, - format, fmask , NULL); - if (ret != Successful) - return ret; - *pInfo = pfont->info; - - /* XXX - Set pointers in pfont->info to NULL so they are not freed. */ - pfont->info.props = NULL; - pfont->info.isStringProp = NULL; - - Type1CloseFont(pfont); - return Successful; -} - -#if XFONT_CID -#ifndef CID_ALL_CHARS -void -CIDFillFontInfo(FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, char *Cmapname, -#ifdef HAVE_CFM - char *cfmfilename, -#endif - long sAscent, long sDescent, double sxmult) -{ -#ifdef HAVE_CFM - FILE *cfm; - cfmrec *cfmp; - int gotcfm = 0; - CARD32 magic; -#endif - long sWidth = 0; - FontInfoPtr pInfo = &pFont->info; - - FillHeader(pInfo, Vals); - -#ifdef HAVE_CFM - if ((cfm = fopen(cfmfilename,"r"))) { - fread(&magic,sizeof(CARD32),1,cfm); - if(magic == CFMMAGIC) { - if ((cfmp = (cfmrec *)xalloc(sizeof(cfmrec))) != NULL) { - fread(cfmp,sizeof(cfmrec),1,cfm); - sWidth = (long)cfmp->totalrw; - pInfo->allExist = cfmp->alle; - if (sxmult != 0) { - pInfo->maxbounds.leftSideBearing = - floor((double)cfmp->maxbounds.leftSideBearing / - sxmult + 0.5); - pInfo->maxbounds.rightSideBearing = - floor((double)cfmp->maxbounds.rightSideBearing / - sxmult + 0.5); - pInfo->maxbounds.characterWidth = - floor((double)cfmp->maxbounds.characterWidth / - sxmult + 0.5); - pInfo->maxbounds.ascent = - floor((double)cfmp->maxbounds.ascent / - sxmult + 0.5); - pInfo->maxbounds.descent = - floor((double)cfmp->maxbounds.descent / - sxmult + 0.5); - pInfo->maxbounds.attributes = - cfmp->maxbounds.attributes; - - pInfo->minbounds.leftSideBearing = - cfmp->minbounds.leftSideBearing / sxmult; - pInfo->minbounds.rightSideBearing = - cfmp->minbounds.rightSideBearing / sxmult; - pInfo->minbounds.characterWidth = - cfmp->minbounds.characterWidth / sxmult; - pInfo->minbounds.ascent = - cfmp->minbounds.ascent / sxmult; - pInfo->minbounds.descent = - cfmp->minbounds.descent / sxmult; - pInfo->minbounds.attributes = cfmp->minbounds.attributes; - - pInfo->ink_maxbounds.leftSideBearing = - cfmp->ink_maxbounds.leftSideBearing / sxmult; - pInfo->ink_maxbounds.rightSideBearing = - cfmp->ink_maxbounds.rightSideBearing / sxmult; - pInfo->ink_maxbounds.characterWidth = - cfmp->ink_maxbounds.characterWidth / sxmult; - pInfo->ink_maxbounds.ascent = - cfmp->ink_maxbounds.ascent / sxmult; - pInfo->ink_maxbounds.descent = - cfmp->ink_maxbounds.descent / sxmult; - pInfo->ink_maxbounds.attributes = - cfmp->ink_maxbounds.attributes; - - pInfo->ink_minbounds.leftSideBearing = - cfmp->ink_minbounds.leftSideBearing / sxmult; - pInfo->ink_minbounds.rightSideBearing = - cfmp->ink_minbounds.rightSideBearing / sxmult; - pInfo->ink_minbounds.characterWidth = - cfmp->ink_minbounds.characterWidth / sxmult; - pInfo->ink_minbounds.ascent = - cfmp->ink_minbounds.ascent / sxmult; - pInfo->ink_minbounds.descent = - cfmp->ink_minbounds.descent / sxmult; - pInfo->ink_minbounds.attributes = - cfmp->ink_minbounds.attributes; - pInfo->ink_minbounds.attributes = - cfmp->ink_minbounds.attributes; - - pInfo->maxOverlap = (short)cfmp->maxo; - - gotcfm = 1; - } - xfree(cfmp); - } - } - fclose(cfm); - } - - if (!gotcfm) -#endif - sWidth = ComputeBoundsAll(pFont); - - FontComputeInfoAccelerators(pInfo); - - CIDComputeStdProps(pInfo, Vals, Filename, Cmapname, Fontname, sAscent, - sDescent, sWidth); -} -#endif /* CID_ALL_CHARS */ -#endif /* BUILDCID */ - -void -T1FillFontInfo(FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, long sWidth) -{ - FontInfoPtr pInfo = &pFont->info; - struct type1font *p = (struct type1font *)pFont->fontPrivate; - long sAscent, sDescent; /* Scalable 1000-pixel values */ - - FillHeader(pInfo, Vals); - - ComputeBounds(pInfo, p->glyphs, Vals); - - ComputeProps(pInfo, Vals, Filename, &sAscent, &sDescent); - ComputeStdProps(pInfo, Vals, Filename, Fontname, sAscent, sDescent, sWidth); -} - -/* Called once, at renderer registration time */ -void -#if XFONT_CID -Type1InitStdProps(void) -#else -T1InitStdProps(void) -#endif -{ - int i; - fontProp *t; - -#if XFONT_CID - if (!stdpropsinit) { - stdpropsinit = 1; - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - i = sizeof(extraProps) / sizeof(fontProp); - for (t = extraProps; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - } -#else - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - i = sizeof(extraProps) / sizeof(fontProp); - for (t = extraProps; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); -#endif -} diff --git a/nx-X11/lib/font/Type1/t1intf.h b/nx-X11/lib/font/Type1/t1intf.h deleted file mode 100644 index 831acc55d..000000000 --- a/nx-X11/lib/font/Type1/t1intf.h +++ /dev/null @@ -1,143 +0,0 @@ -/* $Xorg: t1intf.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.6 2001/01/17 19:43:23 dawes Exp $ */ - -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#include "AFM.h" -#endif - -struct type1font { - CharInfoPtr pDefault; - CharInfoRec glyphs[256]; -}; - -#if XFONT_CID -typedef struct cid_glyphs { - char *CIDFontName; - char *CMapName; - long dataoffset; - double pixel_matrix[4]; - CharInfoPtr pDefault; - CharInfoRec **glyphs; - FontInfo *AFMinfo; -#ifdef USE_MMAP - unsigned char *CIDdata; - long CIDsize; -#endif -} cidglyphs; -#endif - -/* - * Function prototypes - */ -/* t1funcs.c */ -#if XFONT_CID -extern int CIDOpenScalable ( FontPathElementPtr fpe, FontPtr *ppFont, - int flags, FontEntryPtr entry, char *fileName, - FontScalablePtr vals, fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font ); -#endif -extern int Type1OpenScalable ( FontPathElementPtr fpe, FontPtr *ppFont, - int flags, FontEntryPtr entry, char *fileName, - FontScalablePtr vals, fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font ); -#if XFONT_CID -extern unsigned int getCID ( FontPtr pFont, unsigned int charcode ); -extern int CIDGetGlyphs ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs ); -extern int CIDGetMetrics ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, xCharInfo **glyphs ); -extern void CIDCloseFont ( FontPtr pFont ); -#endif -extern void Type1CloseFont ( FontPtr pFont ); -extern int Type1ReturnCodeToXReturnCode ( int rc ); -#if XFONT_CID -extern CharInfoPtr CIDRenderGlyph ( FontPtr pFont, psobj *charstringP, - psobj *subarrayP, - struct blues_struct *bluesP, - CharInfoPtr pci, int *mode ); -#endif - -/* t1info.c */ -#ifdef CID_ALL_CHARS -extern void ComputeBoundsAllChars ( FontPtr pFont, char *cfmfilename, double sxmult ); -#endif -#if XFONT_CID -extern int CIDGetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, - FontEntryPtr entry, FontNamePtr fontName, - char *fileName, FontScalablePtr Vals ); -#endif -extern int Type1GetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, - FontEntryPtr entry, FontNamePtr fontName, - char *fileName, FontScalablePtr Vals ); -#if XFONT_CID -extern void CIDFillFontInfo ( FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, char *Cmapname, -#ifdef HAVE_CFM - char *cfmfilename, -#endif - long sAscent, long sDescent, double sxmult ); -#endif -extern void T1FillFontInfo ( FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, long sWidth ); -extern void Type1InitStdProps ( void ); - -/* cidchar.c */ -extern CharInfoPtr CIDGetGlyphInfo ( FontPtr pFont, unsigned int cidcode, - CharInfoPtr pci, int *rc ); -extern int CIDGetAFM ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs, - char *cidafmfile ); diff --git a/nx-X11/lib/font/Type1/t1io.c b/nx-X11/lib/font/Type1/t1io.c deleted file mode 100644 index 42b8bb6be..000000000 --- a/nx-X11/lib/font/Type1/t1io.c +++ /dev/null @@ -1,388 +0,0 @@ -/* $Xorg: t1io.c,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - * Author: Carol H. Thompson IBM Almaden Research Center - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ -/******************************************************************* -* I/O package for Type 1 font reading -********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef STATIC -#define STATIC static -#endif - -#ifndef FONTMODULE -#include -#include -#else -#include "Xdefs.h" -#include "Xmd.h" /* INT32 declaration */ -#include "xf86_ansic.h" -#endif -#include "t1stdio.h" -#include "t1hdigit.h" -#ifdef WIN32 -#include -#endif -#include - -/* Constants and variables used in the decryption */ -#define c1 ((unsigned short)52845) -#define c2 ((unsigned short)22719) -static unsigned short r; -static int asc, Decrypt; -static int extrach; -static int haveextrach; - -/* Our single FILE structure and buffer for this package */ -STATIC F_FILE TheFile; -STATIC unsigned char TheBuffer[F_BUFSIZ]; - -/* Our routines */ -static int T1Decrypt ( unsigned char *p, int len ); -static int T1Fill ( F_FILE *f ); - -#if XFONT_CID -void -resetDecrypt(void) -{ - Decrypt = 0; -} -#endif - -/* -------------------------------------------------------------- */ -/*ARGSUSED*/ -F_FILE * -T1Open(char *fn, /* Pointer to filename */ - char *mode) /* Pointer to open mode string */ -{ - F_FILE *of = &TheFile; - int oflags = O_RDONLY; /* We know we are only reading */ - - Decrypt = 0; - -#ifdef O_BINARY /* VMS or DOS */ - oflags |= O_BINARY; -#endif - of->fd = open(fn, oflags, 0); - if (of->fd < 0) - return NULL; - - /* Initialize the buffer information of our file descriptor */ - of->b_base = TheBuffer; - of->b_size = F_BUFSIZ; - of->b_ptr = NULL; - of->b_cnt = 0; - of->flags = 0; - of->error = 0; - haveextrach = 0; - return &TheFile; -} /* end Open */ - -/* -------------------------------------------------------------- */ -int /* Read one character */ -T1Getc(F_FILE *f) /* Stream descriptor */ -{ - if (f->b_base == NULL) return EOF; /* already closed */ - - if (f->flags & UNGOTTENC) { /* there is an ungotten c */ - f->flags &= ~UNGOTTENC; - return (int) f->ungotc; - } - - if (f->b_cnt == 0) /* Buffer needs to be (re)filled */ - f->b_cnt = T1Fill(f); - if (f->b_cnt > 0) return (f->b_cnt--, (int) *(f->b_ptr++)); - else { - f->flags |= FIOEOF; - return EOF; - } -} /* end Getc */ - -/* -------------------------------------------------------------- */ -int /* Put back one character */ -T1Ungetc(int c, - F_FILE *f) /* Stream descriptor */ -{ - if (c != EOF) { - f->ungotc = c; - f->flags |= UNGOTTENC; /* set flag */ - f->flags &= ~FIOEOF; /* reset EOF */ - } - return c; -} /* end Ungetc */ - -/* -------------------------------------------------------------- */ -int /* Read n items into caller's buffer */ -T1Read(char *buffP, /* Buffer to be filled */ - int size, /* Size of each item */ - int n, /* Number of items to read */ - F_FILE *f) /* Stream descriptor */ -{ - int bytelen, cnt, i; - F_char *p = (F_char *)buffP; - int icnt; /* Number of characters to read */ - - if (f->b_base == NULL) return 0; /* closed */ - icnt = (size!=1)?n*size:n; /* Number of bytes we want */ - - if (f->flags & UNGOTTENC) { /* there is an ungotten c */ - f->flags &= ~UNGOTTENC; - *(p++) = f->ungotc; - icnt--; bytelen = 1; - } - else bytelen = 0; - - while (icnt > 0) { - /* First use any bytes we have buffered in the stream buffer */ - if ((cnt=f->b_cnt) > 0) { - if (cnt > icnt) cnt = icnt; - for (i=0; ib_ptr++); - f->b_cnt -= cnt; - icnt -= cnt; - bytelen += cnt; - } - - if ((icnt == 0) || (f->flags & FIOEOF)) break; - - f->b_cnt = T1Fill(f); - } - return ((size!=1)?bytelen/size:bytelen); -} /* end Read */ - -/* -------------------------------------------------------------- */ -int /* Close the file */ -T1Close(F_FILE *f) /* Stream descriptor */ -{ - if (f->b_base == NULL) return 0; /* already closed */ - f->b_base = NULL; /* no valid stream */ - return close(f->fd); -} /* end Close */ - - -/* -------------------------------------------------------------- */ -F_FILE * /* Initialization */ -T1eexec(F_FILE *f) /* Stream descriptor */ -{ - int i, c; - int H; - unsigned char *p; - unsigned char randomP[8]; - - r = 55665; /* initial key */ - asc = 1; /* indicate ASCII form */ - - /* Consume the 4 random bytes, determining if we are also to - ASCIIDecodeHex as we process our input. (See pages 63-64 - of the Adobe Type 1 Font Format book.) */ - - /* Skip over any initial white space chars */ - while (HighHexP[c=_XT1getc(f)] == HWHITE_SPACE) ; - - /* If ASCII, the next 7 chars are guaranteed consecutive */ - randomP[0] = c; /* store first non white space char */ - T1Read((pointer)(randomP+1), 1, 3, f); /* read 3 more, for a total of 4 */ - /* store first four chars */ - for (i=0,p=randomP; i<4; i++) { /* Check 4 valid ASCIIEncode chars */ - if (HighHexP[*p++] > LAST_HDIGIT) { /* non-ASCII byte */ - asc = 0; - break; - } - } - if (asc) { /* ASCII form, convert first eight bytes to binary */ - T1Read((pointer)(randomP+4), 1, 4, f); /* Need four more */ - for (i=0,p=randomP; i<4; i++) { /* Convert */ - H = HighHexP[*p++]; - randomP[i] = H | LowHexP[*p++]; - } - } - - /* Adjust our key */ - for (i=0,p=randomP; i<4; i++) { - r = (*p++ + r) * c1 + c2; - } - - /* Decrypt the remaining buffered bytes */ - f->b_cnt = T1Decrypt(f->b_ptr, f->b_cnt); - Decrypt = 1; - return (T1Feof(f))?NULL:f; -} /* end eexec */ - -#if XFONT_CID -F_FILE * /* Initialization */ -CIDeexec(F_FILE *f) /* Stream descriptor */ -{ - int i, c; - int H; - unsigned char *p; - unsigned char randomP[8]; - - r = 55665; /* initial key */ - asc = 1; /* indicate ASCII form */ - - /* Consume the 4 random bytes, determining if we are also to - ASCIIDecodeHex as we process our input. (See pages 63-64 - of the Adobe Type 1 Font Format book.) */ - - /* Skip over any initial white space chars */ - while (HighHexP[c=_XT1getc(f)] == HWHITE_SPACE) ; - - /* If ASCII, the next 7 chars are guaranteed consecutive */ - randomP[0] = c; /* store first non white space char */ - T1Read((pointer)(randomP+1), 1, 3, f); /* read 3 more, for a total of 4 */ - /* store first four chars */ - for (i=0,p=randomP; i<4; i++) { /* Check 4 valid ASCIIEncode chars */ - if (HighHexP[*p++] > LAST_HDIGIT) { /* non-ASCII byte */ - asc = 0; - break; - } - } - if (asc) { /* ASCII form, convert first eight bytes to binary */ - T1Read((pointer)(randomP+4), 1, 4, f); /* Need four more */ - for (i=0,p=randomP; i<4; i++) { /* Convert */ - H = HighHexP[*p++]; - randomP[i] = H | LowHexP[*p++]; - } - } - - /* Adjust our key */ - for (i=0,p=randomP; i<4; i++) { - r = (*p++ + r) * c1 + c2; - } - - /* Decrypt up to, but not including, the first '%' sign */ - if (f->b_cnt > 0) { - for (i = 0; i < f->b_cnt; i++) - if (*(f->b_ptr + i) == '%') - break; - - if (i < f->b_cnt) { - if (i == 0) - f->b_cnt = 0; - else - f->b_cnt = T1Decrypt(f->b_ptr, i); - } else - f->b_cnt = T1Decrypt(f->b_ptr, f->b_cnt); - } - Decrypt = 1; - return (T1Feof(f))?NULL:f; -} /* end eexec */ -#endif - -/* -------------------------------------------------------------- */ -STATIC int -T1Decrypt(unsigned char *p, int len) -{ - int n; - int H = 0, L; - unsigned char *inp = p; - unsigned char *tblP; - - if (asc) { - if (haveextrach) { - H = extrach; - tblP = LowHexP; - } - else tblP = HighHexP; - for (n=0; len>0; len--) { - L = tblP[*inp++]; - if (L == HWHITE_SPACE) continue; - if (L > LAST_HDIGIT) break; - if (tblP == HighHexP) { /* Got first hexit value */ - H = L; - tblP = LowHexP; - } else { /* Got second hexit value; compute value and store it */ - n++; - tblP = HighHexP; - H |= L; - /* H is an int, 0 <= H <= 255, so all of this will work */ - *p++ = H ^ (r >> 8); - r = (H + r) * c1 + c2; - } - } - if (tblP != HighHexP) { /* We had an odd number of hexits */ - extrach = H; - haveextrach = 1; - } else haveextrach = 0; - return n; - } else { - for (n = len; n>0; n--) { - H = *inp++; - *p++ = H ^ (r >> 8); - r = (H + r) * c1 + c2; - } - return len; - } -} /* end Decrypt */ - -/* -------------------------------------------------------------- */ -STATIC int /* Refill stream buffer */ -T1Fill(F_FILE *f) /* Stream descriptor */ -{ - int rc; - - rc = read(f->fd, f->b_base, F_BUFSIZ); - /* propagate any error or eof to current file */ - if (rc <= 0) { - if (rc == 0) /* means EOF */ - f->flags |= FIOEOF; - else { - f->error = (short)-rc; - f->flags |= FIOERROR; - rc = 0; - } - } - f->b_ptr = f->b_base; - if (Decrypt) rc = T1Decrypt(f->b_base, rc); - return rc; -} /* end Fill */ diff --git a/nx-X11/lib/font/Type1/t1malloc.c b/nx-X11/lib/font/Type1/t1malloc.c deleted file mode 100644 index 20d4212cd..000000000 --- a/nx-X11/lib/font/Type1/t1malloc.c +++ /dev/null @@ -1,759 +0,0 @@ -/* $Xorg: t1malloc.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License 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 IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK 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. - */ -/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.11 2002/02/18 20:51:57 herrb Exp $ */ - /* MALLOC CWEB V0004 LOTS */ -/* -:h1.MALLOC - Fast Memory Allocation - -This module is meant to provide portable C-style memory allocation -routines (malloc/free). - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifndef FONTMODULE -#include -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "os.h" -#include "xf86_ansic.h" -#endif -#include "objects.h" /* get #define for Abort() */ - - -/* -:h3.Define NULL - -In the beginning, C compilers made no assumptions about NULL. It was -even theoretically possible that NULL would not be 0. ANSI has tied -this down a bit. The following definition seems to be the most -popular (in terms of reducing compiler complaints), however, if your -compiler is unhappy about it, you can redefine it on the command line: -*/ -#ifndef NULL -#include -#endif -/* -Of course, NULL is important because xiMalloc() is defined to return -NULL when out of memory. - -:h2.Data Structures Used to Manage Free Memory - -:h3.The "freeblock" Structure - -The list of available memory blocks is a doubly-linked list. Each -block begins with the following structure: -*/ - -struct freeblock { - long size; /* number of 'longs' in block, - including this header */ - struct freeblock *fore; /* forward in doubly-linked list */ - struct freeblock *back; /* backward in doubly-linked list */ -} ; -/* -In addition, each free block has a TRAILER that is simply the 'size' -repeated. Thus 'size' is found at the beginning of the block and at the -end of the block (size-1 longs away). 'size' includes both the header -and the trailer. - -When a block is allocated, its 'size' is turned negative (both at the -beginning and at the end). Thus, checking whether two blocks may be -combined is very simple. We merely examine both neighboring blocks' -size to see if they are positive (and hence available for combination). - -The memory address returned to the user is therefore one "long" below the -size, and one extra "long" is added to the end of the block (beyond what -the user requested) to store the trailing size. - -:h3."firstfree" and "lastfree", the Anchors to the Free List - -"firstfree" points to the first available free block; "lastfree" points -to the end of the chain of available blocks. These are linked together -by initialization code; see :hdref refid=addmem.. -*/ - -static struct freeblock firstfree = { 0L, NULL, NULL }; -static struct freeblock lastfree = { 0L, NULL, NULL }; - -/* -:h3."firstcombined" and "uncombined", Keeping Track of Uncombined Blocks - -This module is designed to make the combining of adjacent free memory -blocks be very fast. Nonetheless, combining blocks is naturally the -most expensive part of any memory system. In an X system, -it is worthwhile to defer the combination for a while, because -frequently we will end up asking for a block of exactly the same -size that we recently returned and we can save ourselves some work. - -"MAXUNCOMBINED" is the maximum number of uncombined blocks that we will -allow at any time: -*/ - -#define MAXUNCOMBINED 3 - -/* -"firstcombined" is a pointer into the free list. The uncombined blocks -are always at the front of the list. "firstcombined" points to the -first block that has been combined. -*/ -static struct freeblock *firstcombined = &lastfree; -static short uncombined = 0; /* current number of uncombined blocks */ - -/* -Uncombined blocks have a negative 'size'; in this they are like -allocated blocks. - -We store a distinctive hex pattern in 'size' when we combine a block -to help us debug: -*/ -#define COMBINED 0xBADBAD - -/* -:h3.DEBUGWORDS - Extra Memory Saved With Each Block for Debug - -We add 'DEBUGWORDS' words to each allocated block to put interesting -debug information: -*/ -#ifndef DEBUGWORDS -#define DEBUGWORDS 0 -#endif - -/* -:h3.MINEXCESS - Amount of "Excess" We Would be Willing to Ignore - -When we search the free list to find memory for a user request, we -frequently find an area that is bigger than what the user has asked for. -Normally we put the remaining words (the excess) back on the free list. -However, if the area is just slightly bigger than what the user needs, -it is counter-productive to do this, as the small amount recovered tends -to hurt by increasing memory fragmentation rather than help by providing -more available memory. "MINEXCESS" is the number of words that must be -recovered before we would bother to put the excess back on the free -list. If there is not enough excess, we just give the user more than he -asked for. -*/ - -#define MINEXCESS (7 + DEBUGWORDS) - -/* -:h3.Some Flags for Debug -*/ - -long AvailableWords = 0; /* number of words available in memory */ -char mallocdebug = 0; /* a flag that enables some chatty printf's */ - -/* -:h3.Prototypes of static functions -*/ - -static void combine ( void ); -static void freeuncombinable ( long *addr, long size ); -static void unhook ( struct freeblock *p ); -static void dumpchain ( void ); -#ifdef notused -static void reportarea ( long *area ); -#endif - -/* -:h3.whocalledme() - Debug for Memory Leaks - -This routine is 68000-specific; it copies the value of the application's -curOper variable (which is often a pointer to a character string), and -the first part of the stack at the time malloc was called into the -DEBUGWORDS area reserved with each block. -We use it to see who is malloc-ing memory without free-ing it. -*/ - -#if DEBUGWORDS - -static void -whocalledme(long *addr, /* address of memory block */ - long *stack) /* address of malloc's parameter on stack */ -{ - register long size; /* size of memory block */ - register int i; /* loop index */ - extern char *curOper; /* ptr to last operator (kept by appl.) */ - - stack--; - size = - *addr; - - addr += size - 1 - DEBUGWORDS; - *addr++ = (long) curOper; - for (i=0; i < DEBUGWORDS-1; i++) - *addr++ = *stack++; -} -#else - -#define whocalledme(addr, stack) - -#endif -/* -:h2.xiFree() - User-Callable "Return Memory" Routine - -The actual beginning of the block is one 'long' before the address we -gave to the user. The block begins and ends with '-size' in words. -*/ - -void -xiFree(long *addr) /* user's memory to be returned */ -{ - register long size; /* amount of memory in this block */ - register struct freeblock *p; /* identical to 'addr' */ - - if (addr == NULL) { /* common "mistake", so allow it (CHT) */ - printf("\nxiFree(NULL)?\n"); - return; - } - - size = *--addr; -/* -Make sure this address looks OK; 'size' must be less than zero (meaning -the block is allocated) and should be repeated at the end of the block. -*/ - if (size >= 0) - Abort("free: bad size"); - if (addr[-1 - size] != size) - Abort("free: mismatched size"); -/* -Now make this a 'freeblock' structure and tack it on the FRONT of the -free list (where uncombined blocks go): -*/ - AvailableWords -= size; /* actually INCREASES AvailableWords */ - p = (struct freeblock *) addr; - p->back = &firstfree; - (p->fore = firstfree.fore)->back = p; - firstfree.fore = p; -/* -If we have too many uncombined blocks, call combine() to combine one. -*/ - if (++uncombined > MAXUNCOMBINED) { - combine(); - if (mallocdebug) { - printf("xiFree(%p) with combine, ", (void *)addr); - dumpchain(); - } - } - else { - if (mallocdebug) { - printf("xiFree(%p), ", (void *)addr); - dumpchain(); - } - } - - return; -} - -/* -:h3.combine() - Subroutine of xiFree() to Combine Blocks - -This routine tries to combine the block just before 'firstcombined'. -In any event, that block will be moved to the end of the list (after -'firstcombined'). -*/ - -static void -combine(void) -{ - register struct freeblock *p; /* block we will try to combine */ - register long *addr; /* identical to 'p' for 'long' access */ - register long size; /* size of this block */ - register long size2; /* size of potential combinee */ - - p = firstcombined->back; - if (p == &firstfree) - Abort("why are we combining?"); - - addr = (long *) p; - size = - p->size; - if (--uncombined < 0) - Abort("too many combine()s"); - - if (addr[-1] < 0 && addr[size] < 0) { -/* -We special case the situation where no combining can be done. Then, we -just mark the chain "combined" (i.e., positive size), move the -'firstcombined' pointer back in the chain, and return. -*/ - addr[0] = addr[size - 1] = size; - firstcombined = (struct freeblock *) addr; - return; - } -/* -Otherwise, we unhook this pointer from the chain: -*/ - unhook(p); -/* -First we attempt to combine this with the block immediately above: -*/ - size2 = addr[-1]; - if (size2 > 0) { /* i.e., block above is free */ - *addr = COMBINED; /* might help debug */ - addr -= size2; - if (addr[0] != size2) - Abort("bad block above"); - unhook((struct freeblock *)addr); - size += size2; - } -/* -At this point 'addr' and 'size' may be the original block, or it may be -the newly combined block. Now we attempt to combine it with the block -below: -*/ - p = (struct freeblock *) (addr + size); - size2 = p->size; - - if (size2 > 0) { /* i.e., block below is free */ - p->size = COMBINED; - if (size2 != ((long *) p)[size2 - 1]) - Abort("bad block below"); - unhook(p); - size += size2; - } -/* -Finally we take the newly combined block and put it on the end of the -chain by calling the "freeuncombinable" subroutine: -*/ - freeuncombinable(addr, size); -} - -/* -:h3.freeuncombinable() - Free a Block That Need Not be Combined - -This block is "uncombinable" either because we have already combined -it with its eligible neighbors, or perhaps because we know it has -no neighbors. -*/ - -static void -freeuncombinable(long *addr, /* address of the block to be freed */ - long size) /* size of block in words */ -{ - register struct freeblock *p; /* a convenient synonym for 'addr' */ - -/* -Mark block allocated and combined by setting its 'size' positive: -*/ - addr[size - 1] = addr[0] = size; -/* -Now tack the block on the end of the doubly-linked free list: -*/ - p = (struct freeblock *) addr; - p->fore = &lastfree; - (p->back = lastfree.back)->fore = p; - lastfree.back = p; -/* -If we have previously had no combined blocks, we must update -'firstcombined' to point to this block: -*/ - if (firstcombined->fore == NULL) - firstcombined = p; -} - -/* -:h3.unhook() - Unhook a Block from the Doubly-linked List - -The only tricky thing here is to make sure that 'firstcombined' is -updated if this block happened to be the old 'firstcombined'. (We -would never be unhooking 'firstfree' or 'lastfree', so we do not -have to worry about the end cases.) -*/ - -static void -unhook(struct freeblock *p) /* block to unhook */ -{ - p->back->fore = p->fore; - p->fore->back = p->back; - - if (firstcombined == p) - firstcombined = p->fore; -} -/* -:h2.xiMalloc() - Main User Entry Point for Getting Memory - -We have two slightly different versions of xiMalloc(). In the case -where we have TYPE1IMAGER and a font cache, we are prepared, when nominally -out of memory, to loop calling TYPE1IMAGER's GimeSpace() to release font -cache. -*/ - -/* The following code put in by MDC on 11/10/90 */ - -#ifdef TYPE1IMAGER - -static char *malloc_local(unsigned size); - -char * -xiMalloc(unsigned size) -{ - char *memaddr; - - while ( (memaddr = malloc_local(size)) == NULL ) { - /* Ask TYPE1IMAGER to give us some of its cache back */ - if ( I_GimeSpace() == 0 ) break; /* We are really, really, out of memory */ - } - - return(memaddr); -} -#endif - -/* -Now begins the real workhorse xiMalloc() (called 'malloc_local' if -we are taking advantage of TYPE1IMAGER). Its argument is an unsigned; -at least that lets users with 16-bit integers get a 64K chunk of -memory, and it is also compatible with the definition of a "size_t" -in most systems. -*/ -#ifdef TYPE1IMAGER -static char * -malloc_local(unsigned Size) /* number of bytes the user requested */ -#else -char * -xiMalloc(unsigned Size) -#endif -{ - register long size = (long)Size; /* a working register for size */ - register struct freeblock *p; /* tentative block to be returned */ - register long excess; /* words in excess of user request */ - register long *area; /* a convenient synonym for 'p' */ - -/* -First, we increase 'size' to allow for the two size fields we will -save with the block, plus any information for debug purposes. -Then we ensure that the block will be large enough to hold our -'freeblock' information. Finally we convert it to be in words -(longs), not bytes, increased to span an integral number of double -words, so that all memory blocks dispensed with be properly aligned. -*/ - size += 2*sizeof(long) + DEBUGWORDS*sizeof(long); - if (size < sizeof(struct freeblock) + sizeof(long)) - size = sizeof(struct freeblock) + sizeof(long); - size = ((unsigned) (size + sizeof(double) - 1) / sizeof(double)) * (sizeof(double)/sizeof(long)); - -/* -For speed, we will try first to give the user back a very recently -returned block--one that is on the front of the chain before -'firstcombined'. These blocks still have negative sizes, and need -only to be "unhook"ed: -*/ - size = -size; - for (p=firstfree.fore; p != firstcombined; p=p->fore) { - if (p->size == size) { - unhook(p); - uncombined--; - if (mallocdebug) { - printf("fast xiMalloc(%ld) = %p, ", size, - (void *)p); - dumpchain(); - } - AvailableWords += size; /* decreases AvailableWords */ - whocalledme(p, &Size); - return((char *)&p->fore); - } - } -/* -Well, if we get here, there are no uncombined blocks matching the user's -request. So, we search the rest of the chain for a block that is big -enough. ('size' becomes positive again): -*/ - size = -size; - for (;; p = p->fore) { -/* -If we hit the end of the chain (p->size == 0), we are probably out of -memory. However, we should first try to combine any memory that has -not yet been combined before we give that pessimistic answer. If -we succeed in combining, we can call ourselves recursively to try to -allocate the requested amount: -*/ - if (p->size == 0) { - if (uncombined <= 0) - return(NULL); - while (firstfree.fore != firstcombined) - combine(); - return(xiMalloc(sizeof(long) * (size - 2 - DEBUGWORDS))); - } -/* -Otherwise, we keep searching until we find a big enough block: -*/ - if (p->size >= size) - break; - } -/* -At this point, 'p' contains a block at least as big as what the user -requested, so we take it off the free chain. If it is excessively big, -we return the excess to the free chain: -*/ - unhook(p); - excess = p->size - size; - area = (long *) p; - - if (excess > MINEXCESS) - freeuncombinable(area + size, excess); - else - size = p->size; - - AvailableWords -= size; -/* -Mark first and last word of block with the negative of the size, to -flag that this block is allocated: -*/ - area[size - 1] = area[0] = - size; - - if (mallocdebug) { - printf("slow xiMalloc(%ld) @ %p, ", size, (void *)area); - dumpchain(); - } - whocalledme(area, &Size); -/* -The address we return to the user is one 'long' BELOW the address of -the block. This protects our 'size' field, so we can tell the size -of the block when he returns it to us with xiFree(). Also, he better not -touch the 'size' field at the end of the block either. (That would be -nasty of him, as he would be touching memory outside of the bytes he -requested). -*/ - return((char *) (area + 1)); -} - -/* -:h2 id=addmem.addmemory() - Initialize Free Memory - -This routine should be called at initialization to initialize the -free chain. There is no standard way to do this in C. -We want the memory dispensed by malloc to be aligned on a double word -boundary (because some machines either require alignment, or are -more efficient if accesses are aligned). Since the total size of -any block created by malloc is an integral number of double words, -all we have to do to ensure alignment is to adjust each large block -added to the free chain to start on an odd long-word boundary. -(Malloc's size field will occupy the odd long and the user's memory -will then begin on an even boundary.) Since we fill in additional -size fields at the beginning and end of each of the large freeblocks, -we need only adjust the address passed to addmemory to a double word -boundary. -*/ - -#define MAXAREAS 10 /* there can be this many calls to addmemory() */ - -static long *freearea[MAXAREAS] = { NULL }; /* so we can report later */ - -void -addmemory(long *addr, /* beginning of free area */ - long size) /* number of bytes of free area */ -{ - register int i; /* loop index variable */ - register long *aaddr; /* aligned beginning of free area */ - -#if DEBUGWORDS - printf("malloc has DEBUGWORDS=%d\n", DEBUGWORDS); -#endif -/* -First link together firstfree and lastfree if necessary: -*/ - if (firstfree.fore == NULL) { - firstfree.fore = &lastfree; - lastfree.back = &firstfree; - } -/* -We'll record where the area was that was given to us for later reports: -*/ - for (i=0; i < MAXAREAS; i++) - if (freearea[i] == NULL) break; - if (i >= MAXAREAS) - Abort("too many addmemory()s"); - aaddr = (long *) ( ((long) addr + sizeof(double) - 1) & - (long)sizeof(double) ); - size -= (char *) aaddr - (char *) addr; - freearea[i] = aaddr; -/* -Convert 'size' to number of longs, and store '-size' guards at the -beginning and end of this area so we will not accidentally recombine the -first or last block: -*/ - size /= sizeof(long); - - AvailableWords += size - 2; - - aaddr[size - 1] = aaddr[0] = -size; -/* -Finally, call 'freeuncombinable' to put the remaining memory on the -free list: -*/ - freeuncombinable(aaddr + 1, size - 2); -} - -/* -:h3.delmemory() - Delete Memory Pool -*/ -void -delmemory(void) -{ - register int i; - - AvailableWords = 0; - firstfree.fore = &lastfree; - lastfree.back = &firstfree; - firstcombined = &lastfree; - uncombined = 0; - for (i=0; ifore) { - if (--i < 0) - Abort("too many uncombined areas"); - size = p->size; - printf(". . . area @ %p, size = %ld\n", (void *)p, -size); - if (size >= 0 || size != ((int *) p)[-1 - size]) - Abort("dumpchain: bad size"); - if (p->back != back) - Abort("dumpchain: bad back"); - back = p; - } - printf("DUMPING COMBINED FREE LIST:\n"); - for (; p != &lastfree; p = p->fore) { - size = p->size; - printf(". . . area @ %p, size = %ld\n", (void *)p, size); - if (size <= 0 || size != ((int *) p)[size - 1]) - Abort("dumpchain: bad size"); - if (p->back != back) - Abort("dumpchain: bad back"); - back = p; - } - if (back != lastfree.back) - Abort("dumpchain: bad lastfree"); -} - -#ifdef notused -/* -:h3.reportarea() - Display a Contiguous Set of Memory Blocks -*/ - -static void -reportarea(long *area) /* start of blocks (from addmemory) */ -{ - register long size; /* size of current block */ - register long wholesize; /* size of original area */ - register struct freeblock *p; /* pointer to block */ - - if (area == NULL) - return; - wholesize = - *area++; - wholesize -= 2; - - while (wholesize > 0) { - size = *area; - if (size < 0) { - register int i,j; - - size = -size; - printf("Allocated %5ld bytes at %p, first words=%08lx %08lx\n", - size * sizeof(long), area + 1, area[1], area[2]); -#if DEBUGWORDS - printf(" ...Last operator: %s\n", - (char *)area[size-DEBUGWORDS-1]); -#endif - for (i = size - DEBUGWORDS; i < size - 2; i += 8) { - printf(" ..."); - for (j=0; j<8; j++) - printf(" %08lx", area[i+j]); - printf("\n"); - } - - } - else { - printf("Free %ld bytes at %p\n", size * sizeof(long), - area); - if (size == 0) - Abort("zero sized memory block"); - - for (p = firstfree.fore; p != NULL; p = p->fore) - if ((long *) p == area) break; - if ((long *) p != area) - Abort("not found on forward chain"); - - for (p = lastfree.back; p != NULL; p = p->back) - if ((long *) p == area) break; - if ((long *) p != area) - Abort("not found on backward chain"); - } - if (area[0] != area[size - 1]) - Abort("unmatched check sizes"); - area += size; - wholesize -= size; - } -} - -/* -:h3.MemReport() - Display All of Memory -*/ - -void -MemReport(void) -{ - register int i; - - dumpchain(); - - for (i=0; i -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "pictures.h" - -/* -:h2.Handle Functions - -:h3.Phantom() - Returns a Move Segment Equivalent to Handles - -This is a user operator. Its new name is QueryHandle. -*/ - -struct segment * -t1_Phantom(struct segment *p) /* object to take the Phantom of */ -{ - struct fractpoint pt; /* handle size will built here */ - - if (p == NULL) - pt.x = pt.y = 0; - else - PathDelta(p, &pt); - - return(PathSegment(MOVETYPE, pt.x, pt.y)); -} - -/* -:h3.Snap() - Force Ending Handle of Object to Origin - -This is a user operator. -*/ - -struct segment * -t1_Snap(struct segment *p) /* path to snap */ -{ - struct fractpoint pt; /* for finding length of path */ - - if (p == NULL) - return(NULL); - p = UniquePath(p); - - PathDelta(p, &pt); - if (p->last->type == MOVETYPE) { - p->last->dest.x -= pt.x; - p->last->dest.y -= pt.y; - } - else - p = JoinSegment(p, MOVETYPE, -pt.x, -pt.y, NULL); - return(p); -} diff --git a/nx-X11/lib/font/Type1/t1stdio.h b/nx-X11/lib/font/Type1/t1stdio.h deleted file mode 100644 index 2ed083253..000000000 --- a/nx-X11/lib/font/Type1/t1stdio.h +++ /dev/null @@ -1,101 +0,0 @@ -/* $Xorg: t1stdio.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ -/* T1IO FILE structure and related stuff */ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifdef XFree86LOADER -#undef FILE -#endif -#define FILE F_FILE -typedef unsigned char F_char; - -typedef struct F_FILE { - F_char *b_base; /* Pointer to beginning of buffer */ - long b_size; /* Size of the buffer */ - F_char *b_ptr; /* Pointer to next char in buffer */ - long b_cnt; /* Number of chars remaining in buffer */ - F_char flags; /* other flags; != 0 means getc must call fgetc */ - F_char ungotc; /* Place for ungotten char; flag set if present */ - short error; /* error status */ - int fd; /* underlying file descriptor */ -} F_FILE; - - -/* defines for flags */ -#define UNGOTTENC (0x01) -#define FIOEOF (0x80) -#define FIOERROR (0x40) - -#ifndef NULL -#include -#endif - -#define EOF (-1) /* end of file */ -#define F_BUFSIZ (512) - -#define _XT1getc(f) \ - ( \ - ( ((f)->b_cnt > 0) && ((f)->flags == 0) ) ? \ - ( (f)->b_cnt--, (unsigned int)*( (f)->b_ptr++ ) ) : \ - T1Getc(f) \ - ) - -#define T1Feof(f) (((f)->flags & FIOEOF) && ((f)->b_cnt==0)) - -#if XFONT_CID -extern F_FILE *CIDeexec ( FILE *f ); -#endif - -extern FILE *T1Open ( char *fn, char *mode ); -extern int T1Getc ( FILE *f ); -extern int T1Ungetc ( int c, FILE *f ); -extern int T1Read ( char *buffP, int size, int n, FILE *f ); -extern int T1Close ( FILE *f ); -extern FILE *T1eexec ( FILE *f ); -extern void resetDecrypt ( void ); - -#undef fclose -#undef fopen -#undef ungetc -#undef fgetc -#undef fread -#undef feof -#undef ferror -#define fclose(f) T1Close(f) -#define fopen(name,mode) T1Open(name,mode) -#define ungetc(c,f) T1Ungetc(c,f) -#define fgetc(f) T1Getc(f) - -#define fread(bufP,size,n,f) T1Read(bufP,size,n,f) -#define feof(f) (((f)->flags & FIOEOF) && ((f)->b_cnt==0)) -#define ferror(f) (((f)->flags & FIOERROR)?(f)->error:0) diff --git a/nx-X11/lib/font/Type1/t1stub.c b/nx-X11/lib/font/Type1/t1stub.c deleted file mode 100644 index 2fb1d797f..000000000 --- a/nx-X11/lib/font/Type1/t1stub.c +++ /dev/null @@ -1,56 +0,0 @@ -/* $Xorg: t1stub.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/t1stub.c,v 1.8 2001/01/17 19:43:24 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef FONTMODULE -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "os.h" -#include "xf86_ansic.h" -#else -#include -#endif -#include "objects.h" /* get #define for Abort() */ - -static void -xiStub(void) -{ - printf("xiStub called\n"); - Abort("xiStub called"); -} - -void -t1_DumpText(void) -{ - xiStub(); -} diff --git a/nx-X11/lib/font/Type1/t1test.c b/nx-X11/lib/font/Type1/t1test.c deleted file mode 100644 index 1da74168f..000000000 --- a/nx-X11/lib/font/Type1/t1test.c +++ /dev/null @@ -1,246 +0,0 @@ -/* $Xorg: t1test.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ - -#include -#include - -#define DECIPOINTSPERINCH 722.7 -#define DEFAULTRES 75 -#define DEFAULTPOINTSIZE 120 - -FontScalableRec vals; -FontEntryRec entry; - -int main(argc, argv) - int argc; - char *argv[]; -{ - int h; - char temp[80]; - char file[80]; - char glyphcode[1]; - FontPtr fontptr; - CharInfoRec *glyphs[1]; - int count; - int code; - int rc = -1; - - T1FillVals(&vals); - Type1RegisterFontFileFunctions(); - entry.name.name = "-adobe-utopia-medium-r-normal--0-0-0-0-p-0-iso8859-1"; - - for (;;) { - printf("T1TEST: "); - gets(temp); - glyphcode[0] = '\0'; - - switch(temp[0]) { - - case 'c': - if (1 != sscanf(&temp[2], "%c", glyphcode)) - printf("glyph code?\n"); - break; - - case 'x': - if (1 != sscanf(&temp[2], "%x", &code)) - printf("glyph code?\n"); - else - glyphcode[0] = code; - break; - - case 'd': - if (1 != sscanf(&temp[2], "%d", &code)) - printf("glyph code?\n"); - else - glyphcode[0] = code; - break; - - case 'h': - if (1 != sscanf(&temp[2], "%d", &h)) - printf("height?\n"); - vals.pixel = h; - rc = Type1OpenScalable(NULL, &fontptr, 0, &entry, file, &vals, 0, 0); - break; - - case 'f': - if (1 != sscanf(&temp[2], "%s", file)) - printf("file name?\n"); - rc = Type1OpenScalable(NULL, &fontptr, 0, &entry, file, &vals, 0, 0); - break; - - case 't': - if (1 != sscanf(&temp[2], "%s", file)) - printf("file name?\n"); - vals.pixel = 8; - rc = Type1OpenScalable(NULL, &fontptr, 0, &entry, file, &vals, 0, 0); - if (rc != Successful) break; - vals.pixel = 20; - rc = Type1OpenScalable(NULL, &fontptr, 0, &entry, file, &vals, 0, 0); - if (rc != Successful) break; - vals.pixel = 50; - rc = Type1OpenScalable(NULL, &fontptr, 0, &entry, file, &vals, 0, 0); - glyphcode[0] = 'A'; - printf("From font '%s':\n", file); - break; - - case 'q': - return 0; - - default: - printf("unknown command '%c', must one of 'qfchdxt'\n", temp[0]); - - } - if (rc == Successful) { - if (glyphcode[0] != '\0') { - (*fontptr->get_glyphs)(fontptr, 1, glyphcode, 0, &count, glyphs); - if (count > 0) - Display(glyphs[0]); - else - printf("Code %x not valid in this font\n", glyphcode[0]); - } - } - else - printf("Bad font (rc = %d, file='%s')\n", rc, file); - } -} - -static void Display(glyph) - CharInfoRec *glyph; -{ - int h,w; - unsigned char *p; - int data; - int i; - - p = glyph->bits; - - printf("Metrics: left=%d, right=%d, w=%d, above=%d, below=%d\n", - glyph->metrics.leftSideBearing, - glyph->metrics.rightSideBearing, - glyph->metrics.characterWidth, - glyph->metrics.ascent, - glyph->metrics.descent); - - for (h=glyph->metrics.ascent + glyph->metrics.descent; --h >= 0;) { - w = glyph->metrics.rightSideBearing - glyph->metrics.leftSideBearing; - while (w > 0) { - data = *p++; - for (i=0; i<8; i++) { - if (--w < 0) - break; - if (data & 0x80) - printf("X"); - else - printf("."); - data <<= 1; - } - } - printf("\n"); - } -} - -T1FillVals(vals) - FontScalablePtr vals; -{ - FontResolutionPtr res; - int x_res = DEFAULTRES; - int y_res = DEFAULTRES; - int pointsize = DEFAULTPOINTSIZE; /* decipoints */ - int num_res; - - /* Must have x, y, and pixel */ - if (!vals->x || !vals->y || !vals->pixel) { - res = GetClientResolutions(&num_res); - if (num_res) { - if (res->x_resolution) - x_res = res->x_resolution; - if (res->y_resolution) - y_res = res->y_resolution; - if (res->point_size) - pointsize = res->point_size; - } - if (!vals->x) - vals->x = x_res; - if (!vals->y) - vals->y = y_res; - if (!vals->point) { - if (!vals->pixel) vals->point = pointsize; - else vals->point = (vals->pixel * DECIPOINTSPERINCH) / vals->y; - } - if (!vals->pixel) - vals->pixel = (vals->point * vals->y) / DECIPOINTSPERINCH; - /* Make sure above arithmetic is normally in range and will - round properly. +++ */ - } -} - -int CheckFSFormat(format, fmask, bit, byte, scan, glyph, image) - int format,fmask,*bit,*byte,*scan,*glyph,*image; -{ - *bit = *byte = 1; - *glyph = *scan = *image = 1; - return Successful; - -} - -char *MakeAtom(p) - char *p; -{ - return p; -} - - -FontResolutionPtr GetClientResolutions(resP) - int *resP; -{ - *resP = 0; -}; - -char *Xalloc(size) - int size; -{ - extern char *malloc(); - return(malloc(size)); -} - -void Xfree() -{ - free(); -} - -FontDefaultFormat() { ; } - -FontFileRegisterRenderer() { ; } - -GenericGetBitmaps() { ; } -GenericGetExtents() { ; } - -FontParseXLFDName() { ; } -FontComputeInfoAccelerators() { ; } diff --git a/nx-X11/lib/font/Type1/t1unicode.c b/nx-X11/lib/font/Type1/t1unicode.c deleted file mode 100644 index 136cc4441..000000000 --- a/nx-X11/lib/font/Type1/t1unicode.c +++ /dev/null @@ -1,251 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "t1unicode.h" - -static char* table_32[] = -{ "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", - "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", - "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", - "three", "four", "five", "six", "seven", "eight", "nine", "colon", - "semicolon", "less", "equal", "greater", "question", "at", "A", "B", - "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", - "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", - "backslash", "bracketright", "asciicircum", "underscore", "grave", - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", - "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", - "braceleft", "bar", "braceright", "asciitilde", 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, "space", "exclamdown", "cent", "sterling", "currency", "yen", - "brokenbar", "section", "dieresis", "copyright", "ordfeminine", - "guillemotleft", "logicalnot", "hyphen", "registered", "macron", - "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", - "paragraph", "periodcentered", "cedilla", "onesuperior", - "ordmasculine", "guillemotright", "onequarter", "onehalf", - "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", - "Atilde", "Adieresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", - "Ecircumflex", "Edieresis", "Igrave", "Iacute", "Icircumflex", - "Idieresis", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", - "Otilde", "Odieresis", "multiply", "Oslash", "Ugrave", "Uacute", - "Ucircumflex", "Udieresis", "Yacute", "Thorn", "germandbls", "agrave", - "aacute", "acircumflex", "atilde", "adieresis", "aring", "ae", - "ccedilla", "egrave", "eacute", "ecircumflex", "edieresis", "igrave", - "iacute", "icircumflex", "idieresis", "eth", "ntilde", "ograve", - "oacute", "ocircumflex", "otilde", "odieresis", "divide", "oslash", - "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", - "ydieresis", "Amacron", "amacron", "Abreve", "abreve", "Aogonek", - "aogonek", "Cacute", "cacute", "Ccircumflex", "ccircumflex", - "Cdotaccent", "cdotaccent", "Ccaron", "ccaron", "Dcaron", "dcaron", - "Dcroat", "dcroat", "Emacron", "emacron", "Ebreve", "ebreve", - "Edotaccent", "edotaccent", "Eogonek", "eogonek", "Ecaron", "ecaron", - "Gcircumflex", "gcircumflex", "Gbreve", "gbreve", "Gdotaccent", - "gdotaccent", "Gcommaaccent", "gcommaaccent", "Hcircumflex", - "hcircumflex", "Hbar", "hbar", "Itilde", "itilde", "Imacron", - "imacron", "Ibreve", "ibreve", "Iogonek", "iogonek", "Idotaccent", - "dotlessi", "IJ", "ij", "Jcircumflex", "jcircumflex", "Kcommaaccent", - "kcommaaccent", "kgreenlandic", "Lacute", "lacute", "Lcommaaccent", - "lcommaaccent", "Lcaron", "lcaron", "Ldot", "ldot", "Lslash", - "lslash", "Nacute", "nacute", "Ncommaaccent", "ncommaaccent", - "Ncaron", "ncaron", "napostrophe", "Eng", "eng", "Omacron", "omacron", - "Obreve", "obreve", "Ohungarumlaut", "ohungarumlaut", "OE", "oe", - "Racute", "racute", "Rcommaaccent", "rcommaaccent", "Rcaron", - "rcaron", "Sacute", "sacute", "Scircumflex", "scircumflex", - "Scommaaccent", "scommaaccent", "Scaron", "scaron", "Tcommaaccent", - "tcommaaccent", "Tcaron", "tcaron", "Tbar", "tbar", "Utilde", - "utilde", "Umacron", "umacron", "Ubreve", "ubreve", "Uring", "uring", - "Uhungarumlaut", "uhungarumlaut", "Uogonek", "uogonek", "Wcircumflex", - "wcircumflex", "Ycircumflex", "ycircumflex", "Ydieresis", "Zacute", - "zacute", "Zdotaccent", "zdotaccent", "Zcaron", "zcaron", "longs", 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "florin", 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Ohorn", "ohorn", 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, "Uhorn", "uhorn", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Gcaron", - "gcaron", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "Aringacute", "aringacute", "AEacute", "aeacute", "Oslashacute", - "oslashacute", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57929", "afii64937", 0, 0, 0, 0, 0, 0, - 0, 0, "circumflex", "caron", 0, "macron", 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, "breve", "dotaccent", "ring", "ogonek", "tilde", - "hungarumlaut", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "gravecomb", - "acutecomb", 0, "tildecomb", 0, 0, 0, 0, 0, "hookabovecomb", 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "dotbelowcomb", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, "tonos", "dieresistonos", "Alphatonos", - "anoteleia", "Epsilontonos", "Etatonos", "Iotatonos", 0, - "Omicrontonos", 0, "Upsilontonos", "Omegatonos", "iotadieresistonos", - "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", - "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", - 0, "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega", - "Iotadieresis", "Upsilondieresis", "alphatonos", "epsilontonos", - "etatonos", "iotatonos", "upsilondieresistonos", "alpha", "beta", - "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", - "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma1", "sigma", - "tau", "upsilon", "phi", "chi", "psi", "omega", "iotadieresis", - "upsilondieresis", "omicrontonos", "upsilontonos", "omegatonos", 0, 0, - "theta1", "Upsilon1", 0, 0, "phi1", "omega1", 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii10023", "afii10051", - "afii10052", "afii10053", "afii10054", "afii10055", "afii10056", - "afii10057", "afii10058", "afii10059", "afii10060", "afii10061", 0, - "afii10062", "afii10145", "afii10017", "afii10018", "afii10019", - "afii10020", "afii10021", "afii10022", "afii10024", "afii10025", - "afii10026", "afii10027", "afii10028", "afii10029", "afii10030", - "afii10031", "afii10032", "afii10033", "afii10034", "afii10035", - "afii10036", "afii10037", "afii10038", "afii10039", "afii10040", - "afii10041", "afii10042", "afii10043", "afii10044", "afii10045", - "afii10046", "afii10047", "afii10048", "afii10049", "afii10065", - "afii10066", "afii10067", "afii10068", "afii10069", "afii10070", - "afii10072", "afii10073", "afii10074", "afii10075", "afii10076", - "afii10077", "afii10078", "afii10079", "afii10080", "afii10081", - "afii10082", "afii10083", "afii10084", "afii10085", "afii10086", - "afii10087", "afii10088", "afii10089", "afii10090", "afii10091", - "afii10092", "afii10093", "afii10094", "afii10095", "afii10096", - "afii10097", 0, "afii10071", "afii10099", "afii10100", "afii10101", - "afii10102", "afii10103", "afii10104", "afii10105", "afii10106", - "afii10107", "afii10108", "afii10109", 0, "afii10110", "afii10193", 0, - 0, "afii10146", "afii10194", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii10147", "afii10195", "afii10148", "afii10196", 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii10050", "afii10098", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii10846", 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii57799", "afii57801", "afii57800", "afii57802", "afii57793", - "afii57794", "afii57795", "afii57798", "afii57797", "afii57806", 0, - "afii57796", "afii57807", "afii57839", "afii57645", "afii57841", - "afii57842", "afii57804", "afii57803", "afii57658", 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, "afii57664", "afii57665", "afii57666", "afii57667", - "afii57668", "afii57669", "afii57670", "afii57671", "afii57672", - "afii57673", "afii57674", "afii57675", "afii57676", "afii57677", - "afii57678", "afii57679", "afii57680", "afii57681", "afii57682", - "afii57683", "afii57684", "afii57685", "afii57686", "afii57687", - "afii57688", "afii57689", "afii57690", 0, 0, 0, 0, 0, "afii57716", - "afii57717", "afii57718", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57388", 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, "afii57403", 0, 0, 0, "afii57407", 0, "afii57409", - "afii57410", "afii57411", "afii57412", "afii57413", "afii57414", - "afii57415", "afii57416", "afii57417", "afii57418", "afii57419", - "afii57420", "afii57421", "afii57422", "afii57423", "afii57424", - "afii57425", "afii57426", "afii57427", "afii57428", "afii57429", - "afii57430", "afii57431", "afii57432", "afii57433", "afii57434", 0, 0, - 0, 0, 0, "afii57440", "afii57441", "afii57442", "afii57443", - "afii57444", "afii57445", "afii57446", "afii57470", "afii57448", - "afii57449", "afii57450", "afii57451", "afii57452", "afii57453", - "afii57454", "afii57455", "afii57456", "afii57457", "afii57458", 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57392", "afii57393", - "afii57394", "afii57395", "afii57396", "afii57397", "afii57398", - "afii57399", "afii57400", "afii57401", "afii57381", 0, 0, "afii63167", - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57511", 0, 0, 0, 0, "afii57506", - 0, 0, 0, 0, 0, 0, 0, "afii57507", 0, "afii57512", 0, 0, 0, 0, 0, 0, 0, - 0, "afii57513", 0, 0, 0, 0, 0, 0, "afii57508", 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, "afii57505", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57509", 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, "afii57514", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57519", 0, 0, "afii57534", 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_2000[] = /* general punctuation, s*scripts, currency */ -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii61664", "afii301", "afii299", - "afii300", 0, 0, "figuredash", "endash", "emdash", "afii00208", 0, - "underscoredbl", "quoteleft", "quoteright", "quotesinglbase", - "quotereversed", "quotedblleft", "quotedblright", "quotedblbase", 0, - "dagger", "daggerdbl", "bullet", 0, "onedotenleader", - "twodotenleader", "ellipsis", 0, 0, 0, 0, 0, "afii61573", "afii61574", - "afii61575", 0, "perthousand", 0, "minute", "second", 0, 0, 0, 0, 0, - "guilsinglleft", "guilsinglright", 0, "exclamdbl", 0, 0, 0, 0, 0, 0, - 0, "fraction", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "zerosuperior", 0, 0, 0, "foursuperior", "fivesuperior", - "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", 0, 0, - 0, "parenleftsuperior", "parenrightsuperior", "nsuperior", - "zeroinferior", "oneinferior", "twoinferior", "threeinferior", - "fourinferior", "fiveinferior", "sixinferior", "seveninferior", - "eightinferior", "nineinferior", 0, 0, 0, "parenleftinferior", - "parenrightinferior", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "colonmonetary", 0, "franc", "lira", 0, 0, "peseta", 0, 0, - "afii57636", "dong", "Euro", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_2500[]= /* line and box drawing */ -{ "SF100000", 0, "SF110000", 0, 0, 0, 0, 0, 0, 0, 0, 0, "SF010000", 0, - 0, 0, "SF030000", 0, 0, 0, "SF020000", 0, 0, 0, "SF040000", 0, 0, 0, - "SF080000", 0, 0, 0, 0, 0, 0, 0, "SF090000", 0, 0, 0, 0, 0, 0, 0, - "SF060000", 0, 0, 0, 0, 0, 0, 0, "SF070000", 0, 0, 0, 0, 0, 0, 0, - "SF050000", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "SF430000", "SF240000", "SF510000", "SF520000", "SF390000", - "SF220000", "SF210000", "SF250000", "SF500000", "SF490000", - "SF380000", "SF280000", "SF270000", "SF260000", "SF360000", - "SF370000", "SF420000", "SF190000", "SF200000", "SF230000", - "SF470000", "SF480000", "SF410000", "SF450000", "SF460000", - "SF400000", "SF540000", "SF530000", "SF440000", 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "upblock", 0, 0, 0, "dnblock", 0, - 0, 0, "block", 0, 0, 0, "lfblock", 0, 0, 0, "rtblock", "ltshade", - "shade", "dkshade", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_FB00[] = /* alphabetic presentation forms */ -{ "ff", "fi", "fl", "ffi", "ffl", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57705", 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, "afii57694", "afii57695", 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii57723", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "afii57700", 0, 0, 0, 0 }; - -char* -unicodetoPSname(unsigned short code) -{ - if(code<32) return 0; - else if(code<0x6FF) return table_32[code-32]; - else if(code<0x2000) return 0; - else if(code<0x20D0) return table_2000[code-0x2000]; - else if(code==0x2116) return "afii61352"; /* numero sign, for Koi */ - else if(code==0x2122) return "trademark"; - else if(code<0x2500) return 0; - else if(code<0x25A0) return table_2500[code-0x2500]; - else if(code<0xFB00) return 0; - else if(code<0xFB50) return table_FB00[code-0xFB00]; - else return 0; -} diff --git a/nx-X11/lib/font/Type1/t1unicode.h b/nx-X11/lib/font/Type1/t1unicode.h deleted file mode 100644 index bad0274a0..000000000 --- a/nx-X11/lib/font/Type1/t1unicode.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XFree86$ */ - -char *unicodetoPSname(unsigned short code); diff --git a/nx-X11/lib/font/Type1/token.c b/nx-X11/lib/font/Type1/token.c deleted file mode 100644 index 71a968b30..000000000 --- a/nx-X11/lib/font/Type1/token.c +++ /dev/null @@ -1,1208 +0,0 @@ -/* $Xorg: token.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/token.c,v 1.5tsi Exp $ */ -/* Authors: Sig Nin & Carol Thompson IBM Almaden Research Laboratory */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "t1stdio.h" -#include "util.h" -#include "digit.h" -#include "token.h" -#include "tokst.h" -#include "hdigit.h" - -/* - * ------------------------------------------------------------------- - * Globals - * ------------------------------------------------------------------- - */ - -/* These variables are set by the caller */ -char *tokenStartP; /* Pointer to token buffer in VM */ -char *tokenMaxP; /* Pointer to last byte in buffer + 1 */ - -/* These variables are set by TOKEN */ -int tokenLength; /* Characters in token */ -boolean tokenTooLong; /* Token too long for buffer */ -int tokenType; /* Type of token identified */ -psvalue tokenValue; /* Token value */ - -/* - * ------------------------------------------------------------------- - * Private variables - * ------------------------------------------------------------------- - */ - -static FILE *inputFileP; /* Current input file */ - - -/* Token */ -static char *tokenCharP; /* Pointer to next character in token */ - -/* - * ------------------------------------------------------------------- - * Private routines for manipulating numbers - * ------------------------------------------------------------------- - */ - -#define Exp10(e) \ -((e) == 0\ - ? (double)(1.0)\ - : (-64 <= (e) && (e) <= 63\ - ? Exp10T[(e)+64]\ - : P10(e)\ - )\ -) - -static double Exp10T[128] = { - 1e-64, 1e-63, 1e-62, 1e-61, 1e-60, 1e-59, 1e-58, 1e-57, - 1e-56, 1e-55, 1e-54, 1e-53, 1e-52, 1e-51, 1e-50, 1e-49, - 1e-48, 1e-47, 1e-46, 1e-45, 1e-44, 1e-43, 1e-42, 1e-41, - 1e-40, 1e-39, 1e-38, 1e-37, 1e-36, 1e-35, 1e-34, 1e-33, - 1e-32, 1e-31, 1e-30, 1e-29, 1e-28, 1e-27, 1e-26, 1e-25, - 1e-24, 1e-23, 1e-22, 1e-21, 1e-20, 1e-19, 1e-18, 1e-17, - 1e-16, 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, 1e-9, - 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, - 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, - 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22, 1e23, - 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, 1e30, 1e31, - 1e32, 1e33, 1e34, 1e35, 1e36, 1e37, 1e38, 1e39, - 1e40, 1e41, 1e42, 1e43, 1e44, 1e45, 1e46, 1e47, - 1e48, 1e49, 1e50, 1e51, 1e52, 1e53, 1e54, 1e55, - 1e56, 1e57, 1e58, 1e59, 1e60, 1e61, 1e62, 1e63 -}; - -static double -P10(long exponent) -{ - double value, power; - - if (exponent < 0) { - power = 0.1; - value = (exponent & 1 ? power : 1.0); - exponent++; - exponent = -(exponent >> 1); /* portable C for -(exponent/2) */ - } - else { - power = 10.0; - value = (exponent & 1 ? power : 1.0); - exponent = exponent >> 1; - } - - while(exponent > 0) { - power *= power; - if (exponent & 1) - value *= power; - exponent >>= 1; - } - - return(value); -} - -/* - * ------------------------------------------------------------------- - * Private routines and macros for manipulating the input - * ------------------------------------------------------------------- - */ - -/* Get next character from the input -- - * - */ -#define next_ch() (_XT1getc(inputFileP)) - -/* Push a character back into the input -- - * - * Ungetc of EOF will fail, but that's ok: the next getc will - * return EOF. - * - * NOTE: These macros are presently written to return the character - * pushed, or EOF if none was pushed. However, they are not - * required to return anything in particular, and callers should - * not rely on the returned value. - */ -#define back_ch(ch) (T1Ungetc(ch, inputFileP)) - -/* Push a character back into the input if it was not white space. - * If it is a carriage return (\r) then check next char for - * linefeed and consume them both, otherwise put next char back. - * - */ -#define back_ch_not_white(ch) \ -(\ -isWHITE_SPACE(ch)\ - ? ((ch == '\r')\ - ? (((ch = next_ch()) == '\n')\ - ? EOF\ - : back_ch(ch)\ - )\ - : EOF\ - )\ - : back_ch(ch)\ -) - -/* - * ------------------------------------------------------------------- - * Private routines and macros for manipulating the token buffer - * ------------------------------------------------------------------- - */ - -/* Add a character to the token - * ---- use ONLY when you KNOW that this character will - * be stored within the token buffer. - */ -#define save_unsafe_ch(ch) (*tokenCharP++ = ch) - -/* Add a character to the token, if not too long to fit */ -#define save_ch(ch) \ -((tokenCharP < tokenMaxP)\ - ? save_unsafe_ch(ch)\ - : (tokenTooLong = TRUE)\ -) - -#define save_ch_no_inc(ch) \ -if (tokenCharP < tokenMaxP) *tokenCharP = ch - -/* - * ------------------------------------------------------------------- - * Action Routines - * - * These routines all - * -- take int ch as a parameter - * -- return int ch if no token was recognized, DONE otherwise - * -- leave the next character in the input, if returning DONE - * ------------------------------------------------------------------- - */ - -#define DONE (256) - -/* Get the next input character */ -static int -next_char(int ch) -{ - return(next_ch()); -} - -/* Add character to token */ -static int -add_char(int ch) -{ - save_ch(ch); - return(next_ch()); -} - - -/* ------------------------------------------------------------------- - * Skip white space and comments - */ - -/* Skip white space */ -static int -skip_space(int ch) -{ - do { - ch = next_ch(); - } while(isWHITE_SPACE(ch)); - return(ch); -} - -/* Skip comments */ -static int -skip_comment(int ch) -{ - do { - ch = next_ch(); - } while(isCOMMENT(ch)); - return(ch); -} - -/* ------------------------------------------------------------------- - * Collect value elements for a number - */ - -/* decimal integer or real number mantissa */ -static int m_sign; -static long m_value; -static long m_scale; - -/* real number exponent */ -static int e_sign; -static long e_value; - -/* radix number */ -static long r_base; -static long r_value; -static long r_scale; - -static int -add_sign(int ch) -{ - m_sign = ch; - save_unsafe_ch(ch); - return(next_ch()); -} - -static int -add_1st_digits(int ch) -{ - m_sign = '+'; - return(add_digits(ch)); -} - -static int -add_digits(int ch) -{ - long value, p_value, scale; - int digit; - - /* On entry, expect m_sign to be set to '+' or '-'; - * ch is a decimal digit. - * Expect at most one character saved at this point, - * a sign. This routine will save up to 10 more - * characters without checking the buffer boundary. - */ - - value = ch - '0'; - save_unsafe_ch(ch); - ch = next_ch(); - - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - value = (value << 3) + (value << 1) + (ch - '0'); - save_unsafe_ch(ch); - ch = next_ch(); - } - - /* Quick exit for small integers -- - * |x| <= 10*((MAX_INTEGER/10)-1)+9 - * |x| <= 2,147,483,639 for 32 bit integers - */ - if (isNUMBER_ENDER(ch)) { - back_ch_not_white(ch); - tokenValue.integer = (m_sign == '-' ? -value : value); - tokenType = TOKEN_INTEGER; - return(DONE); - } - - /* Handle additional digits. Beyond the boundary case, - * 10*(MAX_INTEGER/10) <= |number| <= MAX_INTEGER - * just count the digits: the number is too large to - * represent as an integer and will be returned as a real. - * The mantissa of a real holds fewer bits than an integer. - */ - p_value = value; - value = (m_sign == '-' ? -value : value); - scale = 0; - - if (isDECIMAL_DIGIT(ch)) { - - /* Handle the boundary case */ - if (p_value == (MAX_INTEGER/10)) { - digit = ch - '0'; - - /* Must handle positive and negative values separately */ - /* for 2's complement arithmetic */ - if (value > 0) { - if (digit <= MAX_INTEGER%10) - value = (value << 3) + (value << 1) + digit; - else - ++scale; /* Too big, just count it */ - } - else { - /* Use positive % operands for portability */ - if (digit <= -(MIN_INTEGER+10)%10) - value = (value << 3) + (value << 1) - digit; - else - ++scale; /* Too big, just count it */ - } - } - else - ++scale; /* Not boundary case, just count digit */ - - save_unsafe_ch(ch); - ch = next_ch(); - - /* Continue scanning digits, but can't store them */ - while(isDECIMAL_DIGIT(ch)) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - - /* Continue from here scanning radix integer or real */ - m_value = value; - m_scale = scale; - - /* Initialize for possible real */ - e_sign = '+'; - e_value = 0; - - return(ch); -} - -static int -add_1st_decpt(int ch) -{ - m_sign = '+'; - return(add_decpt(ch)); -} - -static int -add_decpt(int ch) -{ - /* On entry, expect m_sign to be set to '+' or '-' */ - m_value = 0; - m_scale = 0; - save_unsafe_ch(ch); - return(next_ch()); -} - -static int -add_fraction(int ch) -{ - long value, scale; - int digit; - - /* On entry, expect m_value and m_scale to be initialized, - * and m_sign to be set to '+' or '-'. Expect m_value and m_sign - * to be consistent (this is not checked). - */ - value = m_value; - scale = m_scale; - - /* Scan leading zeroes */ - if (value == 0) { - while(ch == '0') { - --scale; - save_ch(ch); - ch = next_ch(); - } - - /* Scan first significant digit */ - if (isDECIMAL_DIGIT(ch)) { - --scale; - value = ch - '0'; - value = (m_sign == '-' ? -value : value); - save_ch(ch); - ch = next_ch(); - } - else - /* no significant digits -- number is zero */ - scale = 0; - } - /* value != 0 || value == 0 && !isDECIMAL_DIGIT(ch) */ - - /* Scan additional significant digits */ - if (isDECIMAL_DIGIT(ch)) { - if (value > 0) { - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - --scale; - value = (value << 3) + (value << 1) + (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - /* Check boundary case */ - if (isDECIMAL_DIGIT(ch) && value == (MAX_INTEGER/10)) { - digit = ch - '0'; - if (digit <= MAX_INTEGER%10) { - --scale; - value = (value << 3) + (value << 1) + digit; - save_ch(ch); - ch = next_ch(); - } - } - } - else { - /* value < 0 */ - while(isDECIMAL_DIGIT(ch) && value > -(-(MIN_INTEGER+10)/10+1)) { - /* Use positive / operands for portability */ - --scale; - value = (value << 3) + (value << 1) - (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - /* Check boundary case */ - if (isDECIMAL_DIGIT(ch) - && value == -(-(MIN_INTEGER+10)/10+1)) { - digit = ch - '0'; - if (digit <= -(MIN_INTEGER+10)%10) { - /* Use positive % operands for portability */ - --scale; - value = (value << 3) + (value << 1) - digit; - save_ch(ch); - ch = next_ch(); - } - } - } - - /* Additional digits can be discarded */ - while(isDECIMAL_DIGIT(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - - /* Store results */ - m_value = value; - m_scale = scale; - - /* Initialize for possible real */ - e_sign = '+'; - e_value = 0; - - return(ch); -} - -static int -add_e_sign(int ch) -{ - e_sign = ch; - save_ch(ch); - return(next_ch()); -} - -static int -add_exponent(int ch) -{ - long value, p_value; - long scale = 0; - int digit; - - /* On entry, expect e_sign to be set to '+' or '-' */ - - value = ch - '0'; - save_ch(ch); - ch = next_ch(); - - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - value = (value << 3) + (value << 1) + (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - - p_value = value; - value = (e_sign == '-' ? -value : value); - - /* Handle additional digits. Beyond the boundary case, - * 10*(MAX_INTEGER/10) <= |number| <= MAX_INTEGER - * just count the digits: the number is too large to - * represent as an integer. - */ - if (isDECIMAL_DIGIT(ch)) { - - /* Examine boundary case */ - if (p_value == (MAX_INTEGER/10)) { - digit = ch - '0'; - - /* Must handle positive and negative values separately */ - /* for 2's complement arithmetic */ - if (value > 0) { - if (digit <= MAX_INTEGER%10) - value = (value << 3) + (value << 1) + digit; - else - ++scale; /* Too big, just count it */ - } - else { - /* Use positive % operands for portability */ - if (digit <= -(MIN_INTEGER+10)%10) - value = (value << 3) + (value << 1) - digit; - else - ++scale; /* Too big, just count it */ - } - } - else - ++scale; /* Not boundary case, just count digit */ - - save_ch(ch); - ch = next_ch(); - - /* Continue scanning digits, but can't store any more */ - while(isDECIMAL_DIGIT(ch)) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - - /* Store results */ - e_value = value; - - return(ch); -} - -static int -add_radix(int ch) -{ - if (2 <= m_value && m_value <= 36 && m_scale == 0) { - r_base = m_value; - save_ch(ch); - return(next_ch()); - } - else { - /* Radix invalid, complete a name token */ - return(AAH_NAME(ch)); - } -} - -static int -add_r_digits(int ch) -{ - unsigned long value; - long radix, scale; - int digit; - - /* NOTE: The syntax of a radix number allows only for - * values of zero or more. The value will be stored as - * a 32 bit integer, which PostScript then interprets - * as signed. This means, for example, that the numbers: - * - * 8#37777777777 - * 10#4294967295 - * 16#FFFFFFFF - * 36#1Z141Z3 - * - * are all interpreted as -1. This routine implements this - * idea explicitly: it accumulates the number's value - * as unsigned, then casts it to signed when done. - */ - - /* Expect r_base to be initialized */ - radix = r_base; - value = 0; - scale = 0; - - /* Scan leading zeroes */ - while(ch == '0') { - save_ch(ch); - ch = next_ch(); - } - - /* Handle first non-zero digit */ - if ((digit=digit_value[ch]) < radix) { - value = digit; - save_ch(ch); - ch = next_ch(); - - /* Add digits until boundary case reached */ - while((digit=digit_value[ch]) < radix - && value < (MAX_ULONG / radix)) { - value = value * radix + digit; - save_ch(ch); - ch = next_ch(); - }; - - /* Scan remaining digits */ - if ((digit=digit_value[ch]) < radix) { - - /* Examine boundary case --- - * radix*(MAX_ULONG/radix) <= number <= MAX_ULONG - */ - if (value == (MAX_ULONG/radix) && digit <= MAX_ULONG%radix) - value = value * radix + digit; - else - ++scale; - - /* Continue scanning digits, but can't store them */ - save_ch(ch); - ch = next_ch(); - while(digit_value[ch] < radix) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - } - - /* Store result */ - r_value = (long) value; /* result is signed */ - r_scale = scale; - - return(ch); -} - -/* ------------------------------------------------------------------- - * Complete a number; set token type and done flag. - * Put current input character back, if it is not white space. - */ - -/* Done: Radix Number */ -static int -RADIX_NUMBER(int ch) -{ - back_ch_not_white(ch); - if (r_scale == 0) { - tokenValue.integer = r_value; - tokenType = TOKEN_INTEGER; - } - else { - tokenType = TOKEN_NAME; - } - return(DONE); -} - -/* Done: Integer */ -static int -INTEGER(int ch) -{ - back_ch_not_white(ch); - if (m_scale == 0) { - tokenValue.integer = m_value; - tokenType = TOKEN_INTEGER; - } - else { - tokenValue.real = (double)(m_value) * Exp10(m_scale); - tokenType = TOKEN_REAL; - } - return(DONE); -} - -/* Done: Real */ -static int -REAL(int ch) -{ - double temp; - - back_ch_not_white(ch); - - /* HAZARD: exponent overflow of intermediate result - * (e.g., in 370 floating point); this should not be a problem - * with IEEE floating point. Reduce exponent overflow hazard by - * combining m_scale and e_value first, if they have different signs, - * or multiplying m_value and one of the other factors, if both - * m_scale and e_value are negative. - */ - if ((m_scale >= 0 && e_value <= 0) - || (m_scale <= 0 && e_value >= 0)) { - tokenValue.real = (double)(m_value) * Exp10(m_scale + e_value); - } - else { - temp = (double)(m_value) * Exp10(m_scale); - tokenValue.real = temp * Exp10(e_value); - } - - tokenType = TOKEN_REAL; - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Assemble a hex string; set token type and done flag. - */ - -/* Done: Hex String */ -static int -HEX_STRING(int ch) -{ - int value; - - while(TRUE) { - - /* Process odd digit */ - ch = next_ch(); - if (!isHEX_DIGIT(ch)) { - - /* Skip white space */ - while(isWHITE_SPACE(ch)) - ch = next_ch(); - - /* Check for terminator */ - if (!isHEX_DIGIT(ch)) { - break; - } - } - value = digit_value[ch] << 4; - - /* Process even digit */ - ch = next_ch(); - if (!isHEX_DIGIT(ch)) { - - /* Skip white space */ - while(isWHITE_SPACE(ch)) - ch = next_ch(); - - /* Check for terminator */ - if (!isHEX_DIGIT(ch)) { - save_ch(value); - break; - } - } - save_ch(value + digit_value[ch]); - } - - /* Classify result, based on why loop ended */ - if (ch == '>') - tokenType = TOKEN_HEX_STRING; - else { - /* save the invalid character for error reporting */ - save_ch(ch); - tokenType = TOKEN_INVALID; - } - - return(DONE); -} - -/* ------------------------------------------------------------------- - * Assemble a string; set token type and done flag - */ - -/* Save a backslash-coded character in a string -- - * - * Store the proper character for special cases - * "\b", "\f", "\n", "\r", and "\t". - * - * Decode and store octal-coded character, up to - * three octal digits, "\o", "\oo", and "\ooo". - * - * The sequence "\" is a line continuation, - * so consume both without storing anything. - * - * The sequence "\" is an error; exit without - * storing anything and let the caller handle it. - * - * For other characters, including the sequences - * "\\", "\(", and "\)", simply store the second - * character. - */ -static void -save_digraph(int ch) -{ - int value; - - switch (ch) { - - case 'b': /* backspace */ - ch = '\b'; - break; - - case 'f': /* formfeed */ - ch = '\f'; - break; - - case 'n': /* newline */ - ch = '\n'; - break; - - case 'r': /* carriage return */ - ch = '\r'; - break; - - case 't': /* horizontal tab */ - ch = '\t'; - break; - - case '\n': /* line continuation -- consume it */ - return; - - case '\r': /* carriage return -- consume it */ - ch = next_ch(); /* look at next character, is it \n? */ - if (ch == '\n') return; - back_ch(ch); /* if not a line feed, then return it */ - return; - - case EOF: /* end of file -- forget it */ - return; - - default: - /* scan up to three octal digits to get value */ - if (isOCTAL_DIGIT(ch)) { - value = digit_value[ch]; - ch = next_ch(); - if (isOCTAL_DIGIT(ch)) { - value = (value << 3) + digit_value[ch]; - ch = next_ch(); - if (isOCTAL_DIGIT(ch)) - value = (value << 3) + digit_value[ch]; - else - back_ch(ch); - } - else - back_ch(ch); - ch = value; - } - } - - /* Found a character to save */ - save_ch(ch); -} - -/* Done: String */ -static int -STRING(int ch) -{ - int nest_level = 1; - - tokenType = TOKEN_STRING; - - do { - - ch = next_ch(); - while(!isSTRING_SPECIAL(ch)) { - save_ch(ch); - ch = next_ch(); - }; - - switch (ch) { - - case '(': - ++nest_level; - save_ch(ch); - break; - - case ')': - if (--nest_level > 0) - save_ch(ch); - break; - - case '\\': - save_digraph(next_ch()); - break; - - case '\r': - /* All carriage returns (\r) are turned into linefeeds (\n)*/ - ch = next_ch(); /* get the next one, is it \n? */ - if (ch != '\n') { /* if not, then put it back. */ - back_ch(ch); - } - save_ch('\n'); /* in either case, save a linefeed */ - break; - - - case EOF: - tokenType = TOKEN_INVALID; /* Unterminated string */ - nest_level = 0; - break; - } - - } while(nest_level > 0); - - /* If there's room, add a 0-byte termination without increasing string - length. This fixes certain dependencies on 0-terminated strings */ - save_ch_no_inc(0); - - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Assemble a name; set token type and done flag. - * Put current input character back, if it is not white space. - */ - -/* Done: Name - * (Safe version used to complete name tokens that - * start out looking like something else). - */ - -static int -AAH_NAME(int ch) -{ - do { - save_ch(ch); - ch = next_ch(); - } while(isNAME(ch)); - - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - -/* Done: Name */ -static int -NAME(int ch) -{ - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - -/* Done: Literal Name */ -static int -LITERAL_NAME(int ch) -{ - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_LITERAL_NAME; - return(DONE); -} - -/* Done: immediate Name */ -static int -IMMED_NAME(int ch) -{ - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_IMMED_NAME; - return(DONE); -} - -/* Done: Name found while looking for something else */ -static int -OOPS_NAME(int ch) -{ - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Complete a miscellaneous token; set token type and done flag. - */ - -/* Done: Unmatched Right Angle-Bracket */ -static int -RIGHT_ANGLE(int ch) -{ - tokenType = TOKEN_RIGHT_ANGLE; - return(DONE); -} - -/* Done: Unmatched Right Parenthesis */ -static int -RIGHT_PAREN(int ch) -{ - tokenType = TOKEN_RIGHT_PAREN; - return(DONE); -} - -/* Done: Left Brace */ -static int -LEFT_BRACE(int ch) -{ - tokenType = TOKEN_LEFT_BRACE; - return(DONE); -} - -/* Done: Right Brace */ -static int -RIGHT_BRACE(int ch) -{ - tokenType = TOKEN_RIGHT_BRACE; - return(DONE); -} - -/* Done: Left Bracket */ -static int -LEFT_BRACKET(int ch) -{ - save_unsafe_ch(ch); - tokenType = TOKEN_LEFT_BRACKET; - return(DONE); -} - -/* Done: Right Bracket */ -static int -RIGHT_BRACKET(int ch) -{ - save_unsafe_ch(ch); - tokenType = TOKEN_RIGHT_BRACKET; - return(DONE); -} - -/* Done: Break */ -static int -BREAK_SIGNAL(int ch) -{ - tokenType = TOKEN_BREAK; - return(DONE); -} - -/* Done: No Token Found */ -static int -NO_TOKEN(int ch) -{ - tokenType = TOKEN_EOF; - return(DONE); -} - - -/* - * ------------------------------------------------------------------- - * scan_token -- scan one token from the input. It uses a simple - * finite state machine to recognize token classes. - * - * The input is from a file. - * - * On entry -- - * - * inputP -> input PostScript object, a file. - * tokenStartP -> buffer in VM for accumulating the token. - * tokenMaxP -> last character in the token buffer - * - * On exit -- - * - * tokenLength = number of characters in the token - * tokenTooLong = TRUE if the token did not fit in the buffer - * tokenType = code for the type of token parsed. - * tokenValue = converted value of a numeric token. - * - * - * ------------------------------------------------------------------- - */ -void -scan_token(psobj *inputP) -{ - int ch; - unsigned char *stateP = s0; - unsigned char entry; - int (*actionP)(int); - - /* Define input source */ - inputFileP = inputP->data.fileP; - if (inputFileP == NULL) { - tokenType = TOKEN_EOF; - return; - } - - /* Ensure enough space for most cases - * (so we don't have to keep checking) - * The length needs to cover the maximum number - * of save_unsafe_ch() calls that might be executed. - * That number is 11 (a sign and 10 decimal digits, e.g., - * when scanning -2147483648), but use MAX_NAME_LEN - * in case someone changes that without checking. - */ - tokenStartP = vm_next_byte(); - tokenMaxP = tokenStartP + MIN(vm_free_bytes(), MAX_STRING_LEN); - - if ((tokenMaxP-tokenStartP) < (MAX_NAME_LEN)) { - tokenLength = 0; - tokenTooLong = TRUE; - tokenType = TOKEN_NONE; - tokenValue.integer = 0; - return; - } - - /* Reset token */ - tokenCharP = tokenStartP; - tokenTooLong = FALSE; - - /* Scan one token */ - ch = next_ch(); - do { - entry = stateP[ch]; - stateP = classActionTable[entry].nextStateP; - actionP = classActionTable[entry].actionRoutineP; - ch = (*actionP)(ch); - } while(ch != DONE); - - - /* Return results */ - tokenLength = tokenCharP - tokenStartP; -} diff --git a/nx-X11/lib/font/Type1/token.h b/nx-X11/lib/font/Type1/token.h deleted file mode 100644 index 663982889..000000000 --- a/nx-X11/lib/font/Type1/token.h +++ /dev/null @@ -1,79 +0,0 @@ -/* $Xorg: token.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/token.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ - -#ifndef TOKEN_H -#define TOKEN_H - -/* Special characters */ -#define CONTROL_C (3) - -/* Token type codes */ -#define TOKEN_INVALID (-3) -#define TOKEN_BREAK (-2) -#define TOKEN_EOF (-1) -#define TOKEN_NONE (0) -#define TOKEN_LEFT_PAREN (1) -#define TOKEN_RIGHT_PAREN (2) -#define TOKEN_LEFT_ANGLE (3) -#define TOKEN_RIGHT_ANGLE (4) -#define TOKEN_LEFT_BRACE (5) -#define TOKEN_RIGHT_BRACE (6) -#define TOKEN_LEFT_BRACKET (7) -#define TOKEN_RIGHT_BRACKET (8) -#define TOKEN_NAME (9) -#define TOKEN_LITERAL_NAME (10) -#define TOKEN_INTEGER (11) -#define TOKEN_REAL (12) -#define TOKEN_RADIX_NUMBER (13) -#define TOKEN_HEX_STRING (14) -#define TOKEN_STRING (15) -#define TOKEN_IMMED_NAME (16) - -/* Token routines */ -extern void scan_token( psobj *inputP ); - -/* - * ------------------------------------------------------------------------- - * Globals shared -- (everyone else KEEP YOUR MITTS OFF THEM!) - * ------------------------------------------------------------------------- - */ - -/* These variables are set by the caller */ -extern char *tokenStartP; /* Pointer to token buffer in VM */ -extern char *tokenMaxP; /* Pointer to end of VM we may use + 1 */ - -/* These variables are set by P_TOKEN */ -extern int tokenLength; /* Characters in token */ -extern boolean tokenTooLong; /* Token too long for space available */ -extern int tokenType; /* Type of token identified */ -extern psvalue tokenValue; /* Token value */ - -#endif /* TOKEN_H */ diff --git a/nx-X11/lib/font/Type1/tokst.h b/nx-X11/lib/font/Type1/tokst.h deleted file mode 100644 index 02166afde..000000000 --- a/nx-X11/lib/font/Type1/tokst.h +++ /dev/null @@ -1,510 +0,0 @@ -/* $Xorg: tokst.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* $XFree86: xc/lib/font/Type1/tokst.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ - -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef TOKST -#define TOKST 1 - -/* - * State Index Tables -- - * - * These tables map the input character to the - * proper entry in the Class Action Table. - * There is one table for each state. - * - */ -#define s0 (si0+2) -static unsigned char si0[258] = { 0x10,0x11, - 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02,0x02,0x0F,0x0F,0x02,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x02,0x0F,0x0F,0x0F,0x0F,0x03,0x0F,0x0F,0x05,0x0B,0x0F,0x0D,0x0F,0x0D,0x0E,0x04, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0F,0x0F,0x08,0x0F,0x0C,0x0F, - 0x0F,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,0x00,0x07,0x0F,0x0A,0x0F,0x0F, - 0x0F,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,0x00,0x06,0x0F,0x09,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F -}; - -#define s1 (si1+2) -static unsigned char si1[258] = { 0x14,0x15, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x12, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13 -}; - -#define s2 (si2+2) -static unsigned char si2[258] = { 0x1B,0x1C, - 0x16,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x16,0x16,0x1A,0x1A,0x16,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x16,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x1A,0x17,0x17,0x1A,0x1A,0x1A,0x1A,0x19,0x17, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1A,0x1A,0x17,0x1A,0x17,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x17,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x17,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A -}; - -#define s3 (si3+2) -static unsigned char si3[258] = { 0x23,0x24, - 0x1D,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1D,0x1D,0x22,0x22,0x1D,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x1D,0x22,0x22,0x20,0x22,0x1E,0x22,0x22,0x1E,0x1E,0x22,0x22,0x22,0x22,0x1F,0x1E, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22, - 0x22,0x22,0x22,0x22,0x22,0x21,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x21,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22 -}; - -#define s4 (si4+2) -static unsigned char si4[258] = { 0x29,0x2A, - 0x25,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x25,0x25,0x28,0x28,0x25,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x25,0x28,0x28,0x28,0x28,0x26,0x28,0x28,0x26,0x26,0x28,0x28,0x28,0x28,0x28,0x26, - 0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x28,0x28,0x26,0x28,0x26,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x26,0x28,0x26,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x26,0x28,0x26,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 -}; - -#define s5 (si5+2) -static unsigned char si5[258] = { 0x30,0x31, - 0x2B,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2B,0x2B,0x2F,0x2F,0x2B,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2B,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2F,0x2C,0x2C,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C, - 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2D,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2D,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F -}; - -#define s6 (si6+2) -static unsigned char si6[258] = { 0x36,0x37, - 0x32,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x32,0x32,0x35,0x35,0x32,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x32,0x35,0x35,0x35,0x35,0x33,0x35,0x35,0x33,0x33,0x35,0x35,0x35,0x35,0x35,0x33, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35, - 0x35,0x35,0x35,0x35,0x35,0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35 -}; - -#define s7 (si7+2) -static unsigned char si7[258] = { 0x3D,0x3E, - 0x38,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x38,0x38,0x3C,0x3C,0x38,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x38,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x3C,0x39,0x39,0x3C,0x3A,0x3C,0x3A,0x3C,0x39, - 0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3C,0x3C,0x39,0x3C,0x39,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x39,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x39,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C -}; - -#define s8 (si8+2) -static unsigned char si8[258] = { 0x43,0x44, - 0x3F,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3F,0x3F,0x42,0x42,0x3F,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x3F,0x42,0x42,0x42,0x42,0x40,0x42,0x42,0x40,0x40,0x42,0x42,0x42,0x42,0x42,0x40, - 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x42,0x40,0x42,0x40,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x40,0x42,0x40,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x40,0x42,0x40,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42 -}; - -#define s9 (si9+2) -static unsigned char si9[258] = { 0x48,0x49, - 0x45,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x45,0x45,0x47,0x47,0x45,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x45,0x47,0x47,0x47,0x47,0x46,0x47,0x47,0x46,0x46,0x47,0x47,0x47,0x47,0x47,0x46, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47 -}; - -#define s10 (si10+2) -static unsigned char si10[258] = { 0x4E,0x4F, - 0x4A,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4A,0x4A,0x4D,0x4D,0x4A,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4A,0x4D,0x4D,0x4D,0x4D,0x4B,0x4D,0x4D,0x4B,0x4B,0x4D,0x4D,0x4D,0x4D,0x4D,0x4B, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4D,0x4D,0x4B,0x4D,0x4B,0x4D, - 0x4D,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4B,0x4D,0x4B,0x4D,0x4D, - 0x4D,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4B,0x4D,0x4B,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D -}; - -#define s11 (si11+2) -static unsigned char si11[258] = { 0x53,0x54, - 0x50,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x50,0x50,0x52,0x52,0x50,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x50,0x52,0x52,0x52,0x52,0x51,0x52,0x52,0x51,0x51,0x52,0x52,0x52,0x52,0x52,0x51, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52 -}; - -/* - * Class Action Table -- - * - * The entries in the Class Action Table indicate the - * action routine to be called, and the next state to - * enter, for each relevant character class in each. - * state. There are several entries for each state. - * - */ -static int AAH_NAME ( int ch ); -static int BREAK_SIGNAL ( int ch ); -static int HEX_STRING ( int ch ); -static int IMMED_NAME ( int ch ); -static int INTEGER ( int ch ); -static int LEFT_BRACE ( int ch ); -static int LEFT_BRACKET ( int ch ); -static int LITERAL_NAME ( int ch ); -static int NAME ( int ch ); -static int NO_TOKEN ( int ch ); -static int OOPS_NAME ( int ch ); -static int RADIX_NUMBER ( int ch ); -static int REAL ( int ch ); -static int RIGHT_ANGLE ( int ch ); -static int RIGHT_BRACE ( int ch ); -static int RIGHT_BRACKET ( int ch ); -static int RIGHT_PAREN ( int ch ); -static int STRING ( int ch ); -static int add_1st_decpt ( int ch ); -static int add_1st_digits ( int ch ); -static int add_char ( int ch ); -static int add_decpt ( int ch ); -static int add_digits ( int ch ); -static int add_exponent ( int ch ); -static int add_e_sign ( int ch ); -static int add_fraction ( int ch ); -static int add_radix ( int ch ); -static int add_r_digits ( int ch ); -static int add_sign ( int ch ); -static int next_char ( int ch ); -static int skip_comment ( int ch ); -static int skip_space ( int ch ); - -static struct cat { - int (*actionRoutineP)(int); - unsigned char *nextStateP; -} classActionTable[] = { - - /* s0: Classify initial character */ - /* 00 ALPHA */ {NAME, s0}, /* executable name */ - /* 01 DIGIT */ {add_1st_digits, s3}, /* number? */ - /* 02 WHITE_SPACE */ {skip_space, s0}, /* skip white space */ - /* 03 PERCENT */ {skip_comment, s0}, /* comment? */ - /* 04 SLASH */ {next_char, s1}, /* literal or imm name */ - /* 05 LEFT_PAREN */ {STRING, s0}, /* string */ - /* 06 LEFT_BRACE */ {LEFT_BRACE, s0}, /* begin procedure body */ - /* 07 LEFT_BRACKET */ {LEFT_BRACKET, s0}, /* begin array */ - /* 08 LEFT_ANGLE */ {HEX_STRING, s0}, /* hex string? */ - /* 09 RIGHT_BRACE */ {RIGHT_BRACE, s0}, /* end procedure body */ - /* 0A RIGHT_BRACKET */ {RIGHT_BRACKET, s0}, /* end array */ - /* 0B RIGHT_PAREN */ {RIGHT_PAREN, s0}, /* unmatched right paren */ - /* 0C RIGHT_ANGLE */ {RIGHT_ANGLE, s0}, /* unmatched right angle */ - /* 0D SIGN */ {add_sign, s2}, /* signed number? */ - /* 0E DECIMAL_POINT */ {add_1st_decpt, s4}, /* real number? */ - /* 0F ANY */ {NAME, s0}, /* executable name */ - /* 10 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 11 EOF */ {NO_TOKEN, s0}, /* no token found */ - - /* s1: Further classify a '/' */ - /* 12 SLASH */ {IMMED_NAME, s0}, /* immediate name */ - /* 13 ANY */ {LITERAL_NAME, s0}, /* literal name */ - /* 14 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 15 EOF */ {OOPS_NAME, s0}, /* isolated sign */ - - /* s2: sign */ - /* 16 WHITE_SPACE */ {OOPS_NAME, s0}, /* isolated sign */ - /* 17 SPECIAL */ {OOPS_NAME, s0}, /* isolated sign */ - /* 18 DIGIT */ {add_digits, s3}, /* number? */ - /* 19 DECIMAL_POINT */ {add_decpt, s4}, /* real number? */ - /* 1A ANY */ {NAME, s0}, /* executable name */ - /* 1B BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 1C EOF */ {OOPS_NAME, s0}, /* isolated sign */ - - /* s3: sign? digit+ */ - /* 1D WHITE_SPACE */ {INTEGER, s0}, /* n-digit integer */ - /* 1E SPECIAL */ {INTEGER, s0}, /* n-digit integer */ - /* 1F DECIMAL_POINT */ {add_char, s5}, /* real number? */ - /* 20 POUND */ {add_radix, s10}, /* radix number? */ - /* 21 eE */ {add_char, s7}, /* real with exponent? */ - /* 22 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 23 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 24 EOF */ {INTEGER, s0}, /* n-digit integer */ - - /* s4: sign? . */ - /* 25 WHITE_SPACE */ {OOPS_NAME, s0}, /* isolated +. or -. */ - /* 26 SPECIAL */ {OOPS_NAME, s0}, /* isolated +. or -. */ - /* 27 DIGIT */ {add_fraction, s6}, /* number? */ - /* 28 ANY */ {NAME, s0}, /* executable name */ - /* 29 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 2A EOF */ {OOPS_NAME, s0}, /* isolated +. or -. */ - - /* s5: sign? digit+ . */ - /* 2B WHITE_SPACE */ {REAL, s0}, /* real with fraction */ - /* 2C SPECIAL */ {REAL, s0}, /* real with fraction */ - /* 2D eE */ {add_char, s7}, /* real with exponent? */ - /* 2E DIGIT */ {add_fraction, s6}, /* number? */ - /* 2F ANY */ {AAH_NAME, s0}, /* executable name */ - /* 30 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 31 EOF */ {REAL, s0}, /* real with fraction */ - - /* s6: sign? (digit+ . digit+) | (. digit+) */ - /* 32 WHITE_SPACE */ {REAL, s0}, /* real with fraction */ - /* 33 SPECIAL */ {REAL, s0}, /* real with fraction */ - /* 34 eE */ {add_char, s7}, /* real with exponent? */ - /* 35 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 36 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 37 EOF */ {REAL, s0}, /* real with fraction */ - - /* s7: sign? ((digit+ (. digit*)?) | (. digit+)) Ee */ - /* 38 WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid real number */ - /* 39 SPECIAL */ {OOPS_NAME, s0}, /* invalid real number */ - /* 3A SIGN */ {add_e_sign, s8}, /* real w signed exponent? */ - /* 3B DIGIT */ {add_exponent, s9}, /* real w exponent ? */ - /* 3C ANY */ {AAH_NAME, s0}, /* executable name */ - /* 3D BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 3E EOF */ {OOPS_NAME, s0}, /* invalid real number */ - - /* s8: sign? (digit+ (. digit*)? | (digit* . digit+) Ee sign */ - /* 3F WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid real number */ - /* 40 SPECIAL */ {OOPS_NAME, s0}, /* invalid real number */ - /* 41 DIGIT */ {add_exponent, s9}, /* real w exponent? */ - /* 42 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 43 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 44 EOF */ {OOPS_NAME, s0}, /* invalid real number */ - - /* s9: sign? (digit+ (. digit*)? | (digit* . digit+) Ee sign? digit+ */ - /* 45 WHITE_SPACE */ {REAL, s0}, /* real w exponent */ - /* 46 SPECIAL */ {REAL, s0}, /* real w exponent */ - /* 47 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 48 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 49 EOF */ {REAL, s0}, /* real w exponent */ - - /* s10: digit+ # */ - /* 4A WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid radix number */ - /* 4B SPECIAL */ {OOPS_NAME, s0}, /* invalid radix number */ - /* 4C R_DIGIT */ {add_r_digits, s11}, /* radix number? */ - /* 4D ANY */ {AAH_NAME, s0}, /* executable name */ - /* 4E BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 4F EOF */ {OOPS_NAME, s0}, /* invalid radix number */ - - /* s11: digit+ # r_digit+ */ - /* 50 WHITE_SPACE */ {RADIX_NUMBER, s0}, /* radix number */ - /* 51 SPECIAL */ {RADIX_NUMBER, s0}, /* radix number */ - /* 52 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 53 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 54 EOF */ {RADIX_NUMBER, s0} /* radix number */ -}; - -/* - * Character Classification Tables -- - * - * The entries in the Character Classification Tables - * map character codes to character classes. The - * tables contains one entry per code. The bits in - * each entry indicate which classes the character - * code belongs to. - * - * The macros 'isInCLASS(ch)' generate code to test - * whether 'ch' is a character in 'CLASS'. - * - */ -/* Membership macros for classes defined in table 1 ... */ -#define isRADIX_DIGIT(c) ((isInP1[c] & 0x80) != 0) -#define isHEX_DIGIT(c) ((isInP1[c] & 0x40) != 0) -#define isDECIMAL_DIGIT(c) ((isInP1[c] & 0x10) != 0) -#define isOCTAL_DIGIT(c) ((isInP1[c] & 0x20) != 0) - -/* Membership macros for classes defined in table 2 ... */ -#define isWHITE_SPACE(c) ((isInP2[c] & 0x80) != 0) -#define isCOMMENT(c) ((isInP2[c] & 0x40) != 0) -#define isNAME(c) ((isInP2[c] & 0x20) != 0) -#define isSTRING_SPECIAL(c) ((isInP2[c] & 0x10) != 0) -#define isNUMBER_ENDER(c) ((isInP2[c] & 0x08) != 0) - -#define isInP1 (isInT1+2) -static unsigned char isInT1[258] = { 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,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, - 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xD0,0xD0,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00, - 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,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,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,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,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,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -#define isInP2 (isInT2+2) -static unsigned char isInT2[258] = { 0x18,0x18, - 0xC8,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC8,0x88,0x60,0x60,0x98,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0xC8,0x60,0x60,0x60,0x60,0x48,0x60,0x60,0x58,0x58,0x60,0x60,0x60,0x60,0x60,0x48, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x60,0x48,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x70,0x48,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x60,0x48,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60 -}; - -#endif diff --git a/nx-X11/lib/font/Type1/trig.h b/nx-X11/lib/font/Type1/trig.h deleted file mode 100644 index d569ed067..000000000 --- a/nx-X11/lib/font/Type1/trig.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Xorg: trig.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/*SHARED*/ - -/* $XFree86: xc/lib/font/Type1/trig.h,v 1.2 1998/07/25 06:57:00 dawes Exp $ */ - -#undef DegreeCos -#undef DegreeSin -#undef sqrt - -#define DegreeCos(d) xiStub() -#define DegreeSin(d) xiStub() -#define sqrt(d) xiStub() - diff --git a/nx-X11/lib/font/Type1/type1.c b/nx-X11/lib/font/Type1/type1.c deleted file mode 100644 index b3fa4965a..000000000 --- a/nx-X11/lib/font/Type1/type1.c +++ /dev/null @@ -1,1892 +0,0 @@ -/* $Xorg: type1.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * Portions Copyright (c) 1990 Adobe Systems Incorporated. - * All Rights Reserved - * - * License 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 IBM or Lexmark or Adobe - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * IBM, LEXMARK, AND ADOBE PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY - * WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE - * ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING - * ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY - * PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM, - * LEXMARK, OR ADOBE) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND - * CORRECTION. IN NO EVENT SHALL IBM, LEXMARK, OR ADOBE 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/type1.c,v 1.9tsi Exp $ */ - -/*********************************************************************/ -/* */ -/* Type 1 module - Converting fonts in Adobe Type 1 Font Format */ -/* to scaled and hinted paths for rasterization. */ -/* Files: type1.c, type1.h, and blues.h. */ -/* */ -/* Authors: Sten F. Andler, IBM Almaden Research Center */ -/* (Type 1 interpreter, stem & flex hints) */ -/* */ -/* Patrick A. Casey, Lexmark International, Inc. */ -/* (Font level hints & stem hints) */ -/* */ -/*********************************************************************/ - -/******************/ -/* Include Files: */ -/******************/ -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef FONTMODULE -#include /* a system-dependent include, usually */ -#include -#else -#include "Xdefs.h" -#include "Xmd.h" -#include "xf86_ansic.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "fonts.h" /* understands about TEXTTYPEs */ -#include "pictures.h" /* understands about handles */ -#include "range.h" - -typedef struct xobject xobject; -#include "util.h" /* PostScript objects */ -#include "fontfcn.h" -#include "blues.h" /* Blues structure for font-level hints */ - -/**********************************/ -/* Type1 Constants and Structures */ -/**********************************/ -#define MAXSTACK 24 /* Adobe Type1 limit */ -#define MAXCALLSTACK 10 /* Adobe Type1 limit */ -#define MAXPSFAKESTACK 32 /* Max depth of fake PostScript stack (local) */ -#define MAXSTRLEN 512 /* Max length of a Type 1 string (local) */ -#define MAXLABEL 256 /* Maximum number of new hints */ -#if XFONT_CID -#define MAXSTEMS 500 /* Maximum number of VSTEM and HSTEM hints */ -#else -#define MAXSTEMS 128 /* Maximum number of VSTEM and HSTEM hints */ -#endif -#define EPS 0.001 /* Small number for comparisons */ - -/************************************/ -/* Adobe Type 1 CharString commands */ -/************************************/ -#define HSTEM 1 -#define VSTEM 3 -#define VMOVETO 4 -#define RLINETO 5 -#define HLINETO 6 -#define VLINETO 7 -#define RRCURVETO 8 -#define CLOSEPATH 9 -#define CALLSUBR 10 -#define RETURN 11 -#define ESCAPE 12 -#define HSBW 13 -#define ENDCHAR 14 -#define RMOVETO 21 -#define HMOVETO 22 -#define VHCURVETO 30 -#define HVCURVETO 31 - -/*******************************************/ -/* Adobe Type 1 CharString Escape commands */ -/*******************************************/ -#define DOTSECTION 0 -#define VSTEM3 1 -#define HSTEM3 2 -#define SEAC 6 -#define SBW 7 -#define DIV 12 -#define CALLOTHERSUBR 16 -#define POP 17 -#define SETCURRENTPOINT 33 - -/*****************/ -/* Useful macros */ -/*****************/ - -#define FABS(x) fabs(x) - -#define CEIL(x) ceil(x) - -#define FLOOR(x) floor(x) - -#define ROUND(x) FLOOR((x) + 0.5) - -#define ODD(x) (((int)(x)) & 01) - -#define Error {errflag = TRUE; return;} -#define ErrorRet(ret) {errflag = TRUE; return (ret);} - -/********************/ -/* global variables */ -/********************/ -struct stem { /* representation of a STEM hint */ - int vertical; /* TRUE if vertical, FALSE otherwise */ - double x, dx; /* interval of vertical stem */ - double y, dy; /* interval of horizontal stem */ - struct segment *lbhint, *lbrevhint; /* left or bottom hint adjustment */ - struct segment *rthint, *rtrevhint; /* right or top hint adjustment */ -}; - -struct xobject *Type1Char(char *env, struct XYspace *S, - psobj *charstrP, psobj *subrsP, psobj *osubrsP, - struct blues_struct *bluesP, int *modeP); -#if XFONT_CID -struct xobject *CIDChar(char *env, struct XYspace *S, - psobj *charstrP, psobj *subrsP, psobj *osubrsP, - struct blues_struct *bluesP, int *modeP); -#endif - -static double escapementX, escapementY; -static double sidebearingX, sidebearingY; -static double accentoffsetX, accentoffsetY; - -static struct segment *path; -static int errflag; - -/*************************************************/ -/* Global variables to hold Type1Char parameters */ -/*************************************************/ -static char *Environment; -static struct XYspace *CharSpace; -static psobj *CharStringP, *SubrsP; - -/************************/ -/* Forward declarations */ -/************************/ -static struct segment *Applyhint ( struct segment *p, int stemnumber, - int half ); -static struct segment *Applyrevhint ( struct segment *p, int stemnumber, - int half ); -static void CallOtherSubr ( int othersubrno ); -static void CallSubr ( int subrno ); -static struct segment *CenterStem ( double edge1, double edge2 ); -static void ClearCallStack ( void ); -static void ClearPSFakeStack ( void ); -static void ClearStack ( void ); -static void ComputeAlignmentZones ( void ); -static void ComputeStem ( int stemno ); -static void Decode ( int Code ); -static unsigned char Decrypt ( unsigned char cipher ); -static double Div ( double num1, double num2 ); -static void DoClosePath ( void ); -static void DoCommand ( int Code ); -static int DoRead ( int *CodeP ); -static void DotSection ( void ); -static void EndChar ( void ); -static void Escape ( int Code ); -static struct segment *FindStems ( double x, double y, double dx, double dy ); -static void FinitStems ( void ); -static void FlxProc ( double c1x2, double c1y2, double c3x0, double c3y0, - double c3x1, double c3y1, double c3x2, double c3y2, - double c4x0, double c4y0, double c4x1, double c4y1, - double c4x2, double c4y2, double epY, double epX, - int idmin ); -static void FlxProc1 ( void ); -static void FlxProc2 ( void ); -static void HintReplace ( void ); -static void HStem ( double y, double dy ); -static void InitStems ( void ); -static void PopCall ( psobj **CurrStrPP, int *CurrIndexP, - unsigned short *CurrKeyP ); -static double PSFakePop ( void ); -static void PSFakePush ( double Num ); -static void Push ( double Num ); -static void PushCall ( psobj *CurrStrP, int CurrIndex, - unsigned short CurrKey ); -static void Return ( void ); -static void RLineTo ( double dx, double dy ); -static void RMoveTo ( double dx, double dy ); -static void RRCurveTo ( double dx1, double dy1, double dx2, double dy2, - double dx3, double dy3 ); -static void Sbw ( double sbx, double sby, double wx, double wy ); -static void Seac ( double asb, double adx, double ady, unsigned char bchar, - unsigned char achar ); -static void SetCurrentPoint ( double x, double y ); -static void StartDecrypt ( void ); -static void VStem ( double x, double dx ); - -/*****************************************/ -/* statics for Flex procedures (FlxProc) */ -/*****************************************/ -static struct segment *FlxOldPath; /* save path before Flex feature */ - -/******************************************************/ -/* statics for Font level hints (Blues) (see blues.h) */ -/******************************************************/ -static struct blues_struct *blues; /* the blues structure */ -static struct alignmentzone alignmentzones[MAXALIGNMENTZONES]; -static int numalignmentzones; /* total number of alignment zones */ - -/****************************************************************/ -/* Subroutines for the Font level hints (Alignment zones, etc.) */ -/****************************************************************/ - -/******************************************/ -/* Fill in the alignment zone structures. */ -/******************************************/ -static void -ComputeAlignmentZones(void) -{ - int i; - double dummy, bluezonepixels, familyzonepixels; - struct segment *p; - - numalignmentzones = 0; /* initialize total # of zones */ - - /* do the BlueValues zones */ - for (i = 0; i < blues->numBlueValues; i +=2, ++numalignmentzones) { - /* the 0th & 1st numbers in BlueValues are for a bottom zone */ - /* the rest are topzones */ - if (i == 0) /* bottom zone */ - alignmentzones[numalignmentzones].topzone = FALSE; - else /* top zone */ - alignmentzones[numalignmentzones].topzone = TRUE; - if (i < blues->numFamilyBlues) { /* we must consider FamilyBlues */ - p = ILoc(CharSpace,0,blues->BlueValues[i] - blues->BlueValues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &bluezonepixels); - Destroy(p); - p = ILoc(CharSpace,0,blues->FamilyBlues[i]-blues->FamilyBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &familyzonepixels); - Destroy(p); - /* is the difference in size of the zones less than 1 pixel? */ - if (FABS(bluezonepixels - familyzonepixels) < 1.0) { - /* use the Family zones */ - alignmentzones[numalignmentzones].bottomy = - blues->FamilyBlues[i]; - alignmentzones[numalignmentzones].topy = - blues->FamilyBlues[i+1]; - continue; - } - } - /* use this font's Blue zones */ - alignmentzones[numalignmentzones].bottomy = blues->BlueValues[i]; - alignmentzones[numalignmentzones].topy = blues->BlueValues[i+1]; - } - - /* do the OtherBlues zones */ - for (i = 0; i < blues->numOtherBlues; i +=2, ++numalignmentzones) { - /* all of the OtherBlues zones are bottom zones */ - alignmentzones[numalignmentzones].topzone = FALSE; - if (i < blues->numFamilyOtherBlues) {/* consider FamilyOtherBlues */ - p = ILoc(CharSpace,0,blues->OtherBlues[i] - blues->OtherBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &bluezonepixels); - Destroy(p); - p = ILoc(CharSpace,0,blues->FamilyOtherBlues[i] - - blues->FamilyOtherBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &familyzonepixels); - Destroy(p); - /* is the difference in size of the zones less than 1 pixel? */ - if (FABS(bluezonepixels - familyzonepixels) < 1.0) { - /* use the Family zones */ - alignmentzones[numalignmentzones].bottomy = - blues->FamilyOtherBlues[i]; - alignmentzones[numalignmentzones].topy = - blues->FamilyOtherBlues[i+1]; - continue; - } - } - /* use this font's Blue zones (as opposed to the Family Blues */ - alignmentzones[numalignmentzones].bottomy = blues->OtherBlues[i]; - alignmentzones[numalignmentzones].topy = blues->OtherBlues[i+1]; - } -} - -/**********************************************************************/ -/* Subroutines and statics for handling of the VSTEM and HSTEM hints. */ -/**********************************************************************/ -static int InDotSection; /* DotSection flag */ -static struct stem stems[MAXSTEMS]; /* All STEM hints */ -static int numstems; /* Number of STEM hints */ -static int currstartstem; /* The current starting stem. */ -static int oldvert, oldhor; /* Remember hint in effect */ -static int oldhorhalf, oldverthalf; /* Remember which half of the stem */ -static double wsoffsetX, wsoffsetY; /* White space offset - for VSTEM3,HSTEM3 */ -static int wsset; /* Flag for whether we've set wsoffsetX,Y */ - -static void -InitStems(void) /* Initialize the STEM hint data structures */ -{ - InDotSection = FALSE; - currstartstem = numstems = 0; - oldvert = oldhor = -1; -} - -static void -FinitStems(void) /* Terminate the STEM hint data structures */ -{ - int i; - - for (i = 0; i < numstems; i++) { - Destroy(stems[i].lbhint); - Destroy(stems[i].lbrevhint); - Destroy(stems[i].rthint); - Destroy(stems[i].rtrevhint); - } -} - -/*******************************************************************/ -/* Compute the dislocation that a stemhint should cause for points */ -/* inside the stem. */ -/*******************************************************************/ -static void -ComputeStem(int stemno) -{ - int verticalondevice, idealwidth; - double stemstart, stemwidth; - struct segment *p; - int i; - double stembottom, stemtop, flatposition; - double Xpixels, Ypixels; - double unitpixels, onepixel; - int suppressovershoot, enforceovershoot; - double stemshift, flatpospixels, overshoot; - double widthdiff; /* Number of character space units to adjust width */ - double lbhintvalue, rthintvalue; - double cxx, cyx, cxy, cyy; /* Transformation matrix */ - int rotated; /* TRUE if character is on the side, FALSE if upright */ - - /************************************************/ - /* DETERMINE ORIENTATION OF CHARACTER ON DEVICE */ - /************************************************/ - - QuerySpace(CharSpace, &cxx, &cyx, &cxy, &cyy); /* Transformation matrix */ - - if (FABS(cxx) < 0.00001 || FABS(cyy) < 0.00001) - rotated = TRUE; /* Char is on side (90 or 270 degrees), possibly oblique. */ - else if (FABS(cyx) < 0.00001 || FABS(cxy) < 0.00001) - rotated = FALSE; /* Char is upright (0 or 180 degrees), possibly oblique. */ - else { - stems[stemno].lbhint = NULL; /* Char is at non-axial angle, ignore hints. */ - stems[stemno].lbrevhint = NULL; - stems[stemno].rthint = NULL; - stems[stemno].rtrevhint = NULL; - return; - } - - /* Determine orientation of stem */ - - if (stems[stemno].vertical) { - verticalondevice = !rotated; - stemstart = stems[stemno].x; - stemwidth = stems[stemno].dx; - } else { - verticalondevice = rotated; - stemstart = stems[stemno].y; - stemwidth = stems[stemno].dy; - } - - /* Determine how many pixels (non-negative) correspond to 1 character space - unit (unitpixels), and how many character space units (non-negative) - correspond to one pixel (onepixel). */ - - if (stems[stemno].vertical) - p = ILoc(CharSpace, 1, 0); - else - p = ILoc(CharSpace, 0, 1); - QueryLoc(p, IDENTITY, &Xpixels, &Ypixels); - Destroy(p); - if (verticalondevice) - unitpixels = FABS(Xpixels); - else - unitpixels = FABS(Ypixels); - - onepixel = 1.0 / unitpixels; - - /**********************/ - /* ADJUST STEM WIDTHS */ - /**********************/ - - widthdiff = 0.0; - - /* Find standard stem with smallest width difference from this stem */ - if (stems[stemno].vertical) { /* vertical stem */ - if (blues->StdVW != 0) /* there is an entry for StdVW */ - widthdiff = blues->StdVW - stemwidth; - for (i = 0; i < blues->numStemSnapV; ++i) { /* now look at StemSnapV */ - if (blues->StemSnapV[i] - stemwidth < widthdiff) - /* this standard width is the best match so far for this stem */ - widthdiff = blues->StemSnapV[i] - stemwidth; - } - } else { /* horizontal stem */ - if (blues->StdHW != 0) /* there is an entry for StdHW */ - widthdiff = blues->StdHW - stemwidth; - for (i = 0; i < blues->numStemSnapH; ++i) { /* now look at StemSnapH */ - if (blues->StemSnapH[i] - stemwidth < widthdiff) - /* this standard width is the best match so far for this stem */ - widthdiff = blues->StemSnapH[i] - stemwidth; - } - } - - /* Only expand or contract stems if they differ by less than 1 pixel from - the closest standard width, otherwise make the width difference = 0. */ - if (FABS(widthdiff) > onepixel) - widthdiff = 0.0; - - /* Expand or contract stem to the nearest integral number of pixels. */ - idealwidth = ROUND((stemwidth + widthdiff) * unitpixels); - /* Ensure that all stems are at least one pixel wide. */ - if (idealwidth == 0) - idealwidth = 1; - /* Apply ForceBold to vertical stems. */ - if (blues->ForceBold && stems[stemno].vertical) - /* Force this vertical stem to be at least DEFAULTBOLDSTEMWIDTH wide. */ - if (idealwidth < DEFAULTBOLDSTEMWIDTH) - idealwidth = DEFAULTBOLDSTEMWIDTH; - /* Now compute the number of character space units necessary */ - widthdiff = idealwidth * onepixel - stemwidth; - - /*********************************************************************/ - /* ALIGNMENT ZONES AND OVERSHOOT SUPPRESSION - HORIZONTAL STEMS ONLY */ - /*********************************************************************/ - - stemshift = 0.0; - - if (!stems[stemno].vertical) { - - /* Get bottom and top boundaries of the stem. */ - stembottom = stemstart; - stemtop = stemstart + stemwidth; - - /* Find out if this stem intersects an alignment zone (the BlueFuzz */ - /* entry in the Private dictionary specifies the number of character */ - /* units to extend (in both directions) the effect of an alignment */ - /* zone on a horizontal stem. The default value of BlueFuzz is 1. */ - for (i = 0; i < numalignmentzones; ++i) { - if (alignmentzones[i].topzone) { - if (stemtop >= alignmentzones[i].bottomy && - stemtop <= alignmentzones[i].topy + blues->BlueFuzz) { - break; /* We found a top-zone */ - } - } else { - if (stembottom <= alignmentzones[i].topy && - stembottom >= alignmentzones[i].bottomy - blues->BlueFuzz) { - break; /* We found a bottom-zone */ - } - } - } - - if (i < numalignmentzones) { /* We found an intersecting zone (number i). */ - suppressovershoot = FALSE; - enforceovershoot = FALSE; - - /* When 1 character space unit is rendered smaller than BlueScale - device units (pixels), we must SUPPRESS overshoots. Otherwise, - if the top (or bottom) of this stem is more than BlueShift character - space units away from the flat position, we must ENFORCE overshoot. */ - - if (unitpixels < blues->BlueScale) - suppressovershoot = TRUE; - else - if (alignmentzones[i].topzone) { - if (stemtop >= alignmentzones[i].bottomy + blues->BlueShift) - enforceovershoot = TRUE; - } else - if (stembottom <= alignmentzones[i].topy - blues->BlueShift) - enforceovershoot = TRUE; - - /*************************************************/ - /* ALIGN THE FLAT POSITION OF THE ALIGNMENT ZONE */ - /*************************************************/ - - /* Compute the position of the alignment zone's flat position in - device space and the amount of shift needed to align it on a - pixel boundary. Move all stems this amount. */ - - if (alignmentzones[i].topzone) - flatposition = alignmentzones[i].bottomy; - else - flatposition = alignmentzones[i].topy; - - /* Find the flat position in pixels */ - flatpospixels = flatposition * unitpixels; - - /* Find the stem shift necessary to align the flat - position on a pixel boundary, and use this shift for all stems */ - stemshift = (ROUND(flatpospixels) - flatpospixels) * onepixel; - - /************************************************/ - /* HANDLE OVERSHOOT ENFORCEMENT AND SUPPRESSION */ - /************************************************/ - - /* Compute overshoot amount (non-negative) */ - if (alignmentzones[i].topzone) - overshoot = stemtop - flatposition; - else - overshoot = flatposition - stembottom; - - if (overshoot > 0.0) { - /* ENFORCE overshoot by shifting the entire stem (if necessary) so that - it falls at least one pixel beyond the flat position. */ - - if (enforceovershoot) - if (overshoot < onepixel) { - if (alignmentzones[i].topzone) - stemshift += onepixel - overshoot; - else - stemshift -= onepixel - overshoot; - } - /* SUPPRESS overshoot by aligning the stem to the alignment zone's - flat position. */ - - if (suppressovershoot) { - if (alignmentzones[i].topzone) - stemshift -= overshoot; - else - stemshift += overshoot; - } - } - - /************************************************************/ - /* COMPUTE HINT VALUES FOR EACH SIDE OF THE HORIZONTAL STEM */ - /************************************************************/ - - /* If the stem was aligned by a topzone, we expand or contract the stem - only at the bottom - since the stem top was aligned by the zone. - If the stem was aligned by a bottomzone, we expand or contract the stem - only at the top - since the stem bottom was aligned by the zone. */ - if (alignmentzones[i].topzone) { - lbhintvalue = stemshift - widthdiff; /* bottom */ - rthintvalue = stemshift; /* top */ - } else { - lbhintvalue = stemshift; /* bottom */ - rthintvalue = stemshift + widthdiff; /* top */ - } - - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, lbhintvalue)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -lbhintvalue)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, 0.0, rthintvalue)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -rthintvalue)); - - return; - - } /* endif (i < numalignmentzones) */ - - /* We didn't find any alignment zones intersecting this stem, so - proceed with normal stem alignment below. */ - - } /* endif (!stems[stemno].vertical) */ - - /* Align stem with pixel boundaries on device */ - stemstart = stemstart - widthdiff / 2; - stemshift = ROUND(stemstart * unitpixels) * onepixel - stemstart; - - /* Adjust the boundaries of the stem */ - lbhintvalue = stemshift - widthdiff / 2; /* left or bottom */ - rthintvalue = stemshift + widthdiff / 2; /* right or top */ - - if (stems[stemno].vertical) { - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, lbhintvalue, 0.0)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, -lbhintvalue, 0.0)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, rthintvalue, 0.0)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, -rthintvalue, 0.0)); - } else { - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, lbhintvalue)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -lbhintvalue)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, 0.0, rthintvalue)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -rthintvalue)); - } -} - -#define LEFT 1 -#define RIGHT 2 -#define BOTTOM 3 -#define TOP 4 - -/*********************************************************************/ -/* Adjust a point using the given stem hint. Use the left/bottom */ -/* hint value or the right/top hint value depending on where the */ -/* point lies in the stem. */ -/*********************************************************************/ -static struct segment * -Applyhint(struct segment *p, int stemnumber, int half) -{ - if (half == LEFT || half == BOTTOM) - return Join(p, stems[stemnumber].lbhint); /* left or bottom hint */ - else - return Join(p, stems[stemnumber].rthint); /* right or top hint */ -} - -/*********************************************************************/ -/* Adjust a point using the given reverse hint. Use the left/bottom */ -/* hint value or the right/top hint value depending on where the */ -/* point lies in the stem. */ -/*********************************************************************/ -static struct segment * -Applyrevhint(struct segment *p, int stemnumber, int half) -{ - if (half == LEFT || half == BOTTOM) - return Join(p, stems[stemnumber].lbrevhint); /* left or bottom hint */ - else - return Join(p, stems[stemnumber].rtrevhint); /* right or top hint */ -} - -/***********************************************************************/ -/* Find the vertical and horizontal stems that the current point */ -/* (x, y) may be involved in. At most one horizontal and one vertical */ -/* stem can apply to a single point, since there are no overlaps */ -/* allowed. */ -/* The actual hintvalue is returned as a location. */ -/* Hints are ignored inside a DotSection. */ -/***********************************************************************/ -static struct segment * -FindStems(double x, double y, double dx, double dy) -{ - int i; - int newvert, newhor; - struct segment *p; - int newhorhalf, newverthalf; - - if (InDotSection) return(NULL); - - newvert = newhor = -1; - newhorhalf = newverthalf = -1; - - for (i = currstartstem; i < numstems; i++) { - if (stems[i].vertical) { /* VSTEM hint */ - if ((x >= stems[i].x - EPS) && - (x <= stems[i].x+stems[i].dx + EPS)) { - newvert = i; - if (dy != 0.0) { - if (dy < 0) newverthalf = LEFT; - else newverthalf = RIGHT; - } else { - if (x < stems[i].x+stems[i].dx / 2) newverthalf = LEFT; - else newverthalf = RIGHT; - } - } - } else { /* HSTEM hint */ - if ((y >= stems[i].y - EPS) && - (y <= stems[i].y+stems[i].dy + EPS)) { - newhor = i; - if (dx != 0.0) { - if (dx < 0) newhorhalf = TOP; - else newhorhalf = BOTTOM; - } else { - if (y < stems[i].y+stems[i].dy / 2) newhorhalf = BOTTOM; - else newhorhalf = TOP; - } - } - } - } - - p = NULL; - - if (newvert == -1 && oldvert == -1) ; /* Outside of any hints */ - else if (newvert == oldvert && - newverthalf == oldverthalf); /* No hint change */ - else if (oldvert == -1) { /* New vertical hint in effect */ - p = Applyhint(p, newvert, newverthalf); - } else if (newvert == -1) { /* Old vertical hint no longer in effect */ - p = Applyrevhint(p, oldvert, oldverthalf); - } else { /* New vertical hint in effect, old hint no longer in effect */ - p = Applyrevhint(p, oldvert, oldverthalf); - p = Applyhint(p, newvert, newverthalf); - } - - if (newhor == -1 && oldhor == -1) ; /* Outside of any hints */ - else if (newhor == oldhor && - newhorhalf == oldhorhalf) ; /* No hint change */ - else if (oldhor == -1) { /* New horizontal hint in effect */ - p = Applyhint(p, newhor, newhorhalf); - } else if (newhor == -1) { /* Old horizontal hint no longer in effect */ - p = Applyrevhint(p, oldhor, oldhorhalf); - } - else { /* New horizontal hint in effect, old hint no longer in effect */ - p = Applyrevhint(p, oldhor, oldhorhalf); - p = Applyhint(p, newhor, newhorhalf); - } - - oldvert = newvert; oldverthalf = newverthalf; - oldhor = newhor; oldhorhalf = newhorhalf; - - return p; -} - -/******************************************************/ -/* Subroutines and statics for the Type1Char routines */ -/******************************************************/ - -static int strindex; /* index into PostScript string being interpreted */ -static double currx, curry; /* accumulated x and y values for hints */ - -struct callstackentry { - psobj *currstrP; /* current CharStringP */ - int currindex; /* current strindex */ - unsigned short currkey; /* current decryption key */ - }; - -static double Stack[MAXSTACK]; -static int Top; -static struct callstackentry CallStack[MAXCALLSTACK]; -static int CallTop; -static double PSFakeStack[MAXPSFAKESTACK]; -static int PSFakeTop; - -static void -ClearStack(void) -{ - Top = -1; -} - -static void -Push(double Num) -{ - if (++Top < MAXSTACK) Stack[Top] = Num; - else Error; -} - -static void -ClearCallStack(void) -{ - CallTop = -1; -} - -static void -PushCall(psobj *CurrStrP, int CurrIndex, unsigned short CurrKey) -{ - if (++CallTop < MAXCALLSTACK) { - CallStack[CallTop].currstrP = CurrStrP; /* save CharString pointer */ - CallStack[CallTop].currindex = CurrIndex; /* save CharString index */ - CallStack[CallTop].currkey = CurrKey; /* save decryption key */ - } - else Error; -} - -static void -PopCall(psobj **CurrStrPP, int *CurrIndexP, unsigned short *CurrKeyP) -{ - if (CallTop >= 0) { - *CurrStrPP = CallStack[CallTop].currstrP; /* restore CharString pointer */ - *CurrIndexP = CallStack[CallTop].currindex; /* restore CharString index */ - *CurrKeyP = CallStack[CallTop--].currkey; /* restore decryption key */ - } - else Error; -} - -static void -ClearPSFakeStack(void) -{ - PSFakeTop = -1; -} - -/* PSFakePush: Pushes a number onto the fake PostScript stack */ -static void -PSFakePush(double Num) -{ - if (++PSFakeTop < MAXPSFAKESTACK) PSFakeStack[PSFakeTop] = Num; - else Error; -} - -/* PSFakePop: Removes a number from the top of the fake PostScript stack */ -static double -PSFakePop (void) -{ - if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]); - else ErrorRet(0.0); - /*NOTREACHED*/ -} - -/***********************************************************************/ -/* Center a stem on the pixel grid -- used by HStem3 and VStem3 */ -/***********************************************************************/ -static struct segment * -CenterStem(double edge1, double edge2) -{ - int idealwidth, verticalondevice; - double leftx, lefty, rightx, righty, center, width; - double widthx, widthy; - double shift, shiftx, shifty; - double Xpixels, Ypixels; - struct segment *p; - - p = Loc(CharSpace, edge1, 0.0); - QueryLoc(p, IDENTITY, &leftx, &lefty); - - p = Join(p, Loc(CharSpace, edge2, 0.0)); - QueryLoc(p, IDENTITY, &rightx, &righty); - Destroy(p); - - widthx = FABS(rightx - leftx); - widthy = FABS(righty - lefty); - - if (widthy <= EPS) { /* verticalondevice hint */ - verticalondevice = TRUE; - center = (rightx + leftx) / 2.0; - width = widthx; - } - else if (widthx <= EPS) { /* horizontal hint */ - verticalondevice = FALSE; - center = (righty + lefty) / 2.0; - width = widthy; - } - else { /* neither horizontal nor verticalondevice and not oblique */ - return (NULL); - } - - idealwidth = ROUND(width); - if (idealwidth == 0) idealwidth = 1; - if (ODD(idealwidth)) { /* is ideal width odd? */ - /* center stem over pixel */ - shift = FLOOR(center) + 0.5 - center; - } - else { - /* align stem on pixel boundary */ - shift = ROUND(center) - center; - } - - if (verticalondevice) { - shiftx = shift; - shifty = 0.0; - } else { - shifty = shift; - shiftx = 0.0; - } - - p = Loc(IDENTITY, shiftx, shifty); - QueryLoc(p, CharSpace, &Xpixels, &Ypixels); - wsoffsetX = Xpixels; wsoffsetY = Ypixels; - currx += wsoffsetX; curry += wsoffsetY; - - return (p); -} - -/*----------------------------------------------------------------------- - Decrypt - From Adobe Type 1 book page 63, with some modifications ------------------------------------------------------------------------*/ -#define KEY 4330 /* Initial key (seed) for CharStrings decryption */ -#define C1 52845 /* Multiplier for pseudo-random number generator */ -#define C2 22719 /* Constant for pseudo-random number generator */ - -static unsigned short r; /* Pseudo-random sequence of keys */ - -static unsigned char -Decrypt(unsigned char cipher) -{ - unsigned char plain; - - plain = cipher ^ (r >> 8); - r = (cipher + r) * C1 + C2; - return plain; -} - -/* Get the next byte from the codestring being interpreted */ -static int -DoRead(int *CodeP) -{ - if (strindex >= CharStringP->len) return(FALSE); /* end of string */ - *CodeP = Decrypt((unsigned char) CharStringP->data.stringP[strindex++]); - return(TRUE); -} - -/* Strip blues->lenIV bytes from CharString and update encryption key */ -/* (the lenIV entry in the Private dictionary specifies the number of */ -/* random bytes at the beginning of each CharString; default is 4) */ -static void -StartDecrypt(void) -{ - int Code; - - r = KEY; /* Initial key (seed) for CharStrings decryption */ - for (strindex = 0; strindex < blues->lenIV;) - if (!DoRead(&Code)) /* Read a byte and update decryption key */ - Error; -} - -static void -Decode(int Code) -{ - int Code1, Code2, Code3, Code4; - - if (Code <= 31) /* Code is [0,31] */ - DoCommand(Code); - else if (Code <= 246) /* Code is [32,246] */ - Push((double)(Code - 139)); - else if (Code <= 250) { /* Code is [247,250] */ - if (!DoRead(&Code2)) goto ended; - Push((double)(((Code - 247) << 8) + Code2 + 108)); - } - else if (Code <= 254) { /* Code is [251,254] */ - if (!DoRead(&Code2)) goto ended; - Push((double)( -((Code - 251) << 8) - Code2 - 108)); - } - else { /* Code is 255 */ - if (!DoRead(&Code1)) goto ended; - if (!DoRead(&Code2)) goto ended; - if (!DoRead(&Code3)) goto ended; - if (!DoRead(&Code4)) goto ended; - Push((double)((((((Code1<<8) + Code2)<<8) + Code3)<<8) + Code4)); - } - return; - -ended: Error; -} - -/* Interpret a command code */ -static void -DoCommand(int Code) -{ - switch(Code) { - case HSTEM: /* |- y dy HSTEM |- */ - /* Vertical range of a horizontal stem zone */ - if (Top < 1) Error; - HStem(Stack[0], Stack[1]); - ClearStack(); - break; - case VSTEM: /* |- x dx VSTEM |- */ - /* Horizontal range of a vertical stem zone */ - if (Top < 1) Error; - VStem(Stack[0], Stack[1]); - ClearStack(); - break; - case VMOVETO: /* |- dy VMOVETO |- */ - /* Vertical MOVETO, equivalent to 0 dy RMOVETO */ - if (Top < 0) Error; - RMoveTo(0.0, Stack[0]); - ClearStack(); - break; - case RLINETO: /* |- dx dy RLINETO |- */ - /* Like RLINETO in PostScript */ - if (Top < 1) Error; - RLineTo(Stack[0], Stack[1]); - ClearStack(); - break; - case HLINETO: /* |- dx HLINETO |- */ - /* Horizontal LINETO, equivalent to dx 0 RLINETO */ - if (Top < 0) Error; - RLineTo(Stack[0], 0.0); - ClearStack(); - break; - case VLINETO: /* |- dy VLINETO |- */ - /* Vertical LINETO, equivalent to 0 dy RLINETO */ - if (Top < 0) Error; - RLineTo(0.0, Stack[0]); - ClearStack(); - break; - case RRCURVETO: - /* |- dx1 dy1 dx2 dy2 dx3 dy3 RRCURVETO |- */ - /* Relative RCURVETO, equivalent to dx1 dy1 */ - /* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ - /* (dy1+dy2+dy3) RCURVETO in PostScript */ - if (Top < 5) Error; - RRCurveTo(Stack[0], Stack[1], Stack[2], Stack[3], - Stack[4], Stack[5]); - ClearStack(); - break; - case CLOSEPATH: /* - CLOSEPATH |- */ - /* Closes a subpath without repositioning the */ - /* current point */ - DoClosePath(); - ClearStack(); - break; - case CALLSUBR: /* subr# CALLSUBR - */ - /* Calls a CharString subroutine with index */ - /* subr# from the Subrs array */ - if (Top < 0) Error; - CallSubr((int)Stack[Top--]); - break; - case RETURN: /* - RETURN - */ - /* Returns from a Subrs array CharString */ - /* subroutine called with CALLSUBR */ - Return(); - break; - case ESCAPE: /* ESCAPE to two-byte command code */ - if (!DoRead(&Code)) Error; - Escape(Code); - break; - case HSBW: /* |- sbx wx HSBW |- */ - /* Set the left sidebearing point to (sbx,0), */ - /* set the character width vector to (wx,0). */ - /* Equivalent to sbx 0 wx 0 SBW. Space */ - /* character should have sbx = 0 */ - if (Top < 1) Error; - Sbw(Stack[0], 0.0, Stack[1], 0.0); - ClearStack(); - break; - case ENDCHAR: /* - ENDCHAR |- */ - /* Finishes a CharString outline */ - EndChar(); - ClearStack(); - break; - case RMOVETO: /* |- dx dy RMOVETO |- */ - /* Behaves like RMOVETO in PostScript */ - if (Top < 1) Error; - RMoveTo(Stack[0], Stack[1]); - ClearStack(); - break; - case HMOVETO: /* |- dx HMOVETO |- */ - /* Horizontal MOVETO. Equivalent to dx 0 RMOVETO */ - if (Top < 0) Error; - RMoveTo(Stack[0], 0.0); - ClearStack(); - break; - case VHCURVETO: /* |- dy1 dx2 dy2 dx3 VHCURVETO |- */ - /* Vertical-Horizontal CURVETO, equivalent to */ - /* 0 dy1 dx2 dy2 dx3 0 RRCURVETO */ - if (Top < 3) Error; - RRCurveTo(0.0, Stack[0], Stack[1], Stack[2], - Stack[3], 0.0); - ClearStack(); - break; - case HVCURVETO: /* |- dx1 dx2 dy2 dy3 HVCURVETO |- */ - /* Horizontal-Vertical CURVETO, equivalent to */ - /* dx1 0 dx2 dy2 0 dy3 RRCURVETO */ - if (Top < 3) Error; - RRCurveTo(Stack[0], 0.0, Stack[1], Stack[2], 0.0, Stack[3]); - ClearStack(); - break; - default: /* Unassigned command code */ - ClearStack(); - Error; - } -} - -static void -Escape(int Code) -{ - int i, Num; - struct segment *p; - - switch(Code) { - case DOTSECTION: /* - DOTSECTION |- */ - /* Brackets an outline section for the dots in */ - /* letters such as "i", "j", and "!". */ - DotSection(); - ClearStack(); - break; - case VSTEM3: /* |- x0 dx0 x1 dx1 x2 dx2 VSTEM3 |- */ - /* Declares the horizontal ranges of three */ - /* vertical stem zones between x0 and x0+dx0, */ - /* x1 and x1+dx1, and x2 and x2+dx2. */ - if (Top < 5) Error; - if (!wsset && ProcessHints) { - /* Shift the whole character so that the middle stem is centered. */ - p = CenterStem(Stack[2] + sidebearingX, Stack[3]); - path = Join(path, p); - wsset = 1; - } - - VStem(Stack[0], Stack[1]); - VStem(Stack[2], Stack[3]); - VStem(Stack[4], Stack[5]); - ClearStack(); - break; - case HSTEM3: /* |- y0 dy0 y1 dy1 y2 dy2 HSTEM3 |- */ - /* Declares the vertical ranges of three hori- */ - /* zontal stem zones between y0 and y0+dy0, */ - /* y1 and y1+dy1, and y2 and y2+dy2. */ - if (Top < 5) Error; - HStem(Stack[0], Stack[1]); - HStem(Stack[2], Stack[3]); - HStem(Stack[4], Stack[5]); - ClearStack(); - break; - case SEAC: /* |- asb adx ady bchar achar SEAC |- */ - /* Standard Encoding Accented Character. */ - if (Top < 4) Error; - Seac(Stack[0], Stack[1], Stack[2], - (unsigned char) Stack[3], - (unsigned char) Stack[4]); - ClearStack(); - break; - case SBW: /* |- sbx sby wx wy SBW |- */ - /* Set the left sidebearing point to (sbx,sby), */ - /* set the character width vector to (wx,wy). */ - if (Top < 3) Error; - Sbw(Stack[0], Stack[1], Stack[2], Stack[3]); - ClearStack(); - break; - case DIV: /* num1 num2 DIV quotient */ - /* Behaves like DIV in the PostScript language */ - if (Top < 1) Error; - Stack[Top-1] = Div(Stack[Top-1], Stack[Top]); - Top--; - break; - case CALLOTHERSUBR: - /* arg1 ... argn n othersubr# CALLOTHERSUBR - */ - /* Make calls on the PostScript interpreter */ - if (Top < 1) Error; - Num = Stack[Top-1]; - if (Top < Num+1) Error; - for (i = 0; i < Num; i++) PSFakePush(Stack[Top - i - 2]); - Top -= Num + 2; -#if XFONT_CID - if ((int)Stack[Top + Num + 2] > 3) - ClearPSFakeStack(); - else - CallOtherSubr((int)Stack[Top + Num + 2]); -#else - CallOtherSubr((int)Stack[Top + Num + 2]); -#endif - break; - case POP: /* - POP number */ - /* Removes a number from the top of the */ - /* PostScript interpreter stack and pushes it */ - /* onto the Type 1 BuildChar operand stack */ - Push(PSFakePop()); - break; - case SETCURRENTPOINT: /* |- x y SETCURRENTPOINT |- */ - /* Sets the current point to (x,y) in absolute */ - /* character space coordinates without per- */ - /* forming a CharString MOVETO command */ - if (Top < 1) Error; - SetCurrentPoint(Stack[0], Stack[1]); - ClearStack(); - break; - default: /* Unassigned escape code command */ - ClearStack(); - Error; - } -} - -/* |- y dy HSTEM |- */ -/* Declares the vertical range of a horizontal stem zone */ -/* between coordinates y and y + dy */ -/* y is relative to the left sidebearing point */ -static void -HStem(double y, double dy) -{ - if (ProcessHints) { - if (numstems >= MAXSTEMS) Error; - if (dy < 0.0) {y += dy; dy = -dy;} - stems[numstems].vertical = FALSE; - stems[numstems].x = 0.0; - stems[numstems].y = sidebearingY + y + wsoffsetY; - stems[numstems].dx = 0.0; - stems[numstems].dy = dy; - ComputeStem(numstems); - numstems++; - } -} - -/* |- x dx VSTEM |- */ -/* Declares the horizontal range of a vertical stem zone */ -/* between coordinates x and x + dx */ -/* x is relative to the left sidebearing point */ - -static void -VStem(double x, double dx) -{ - if (ProcessHints) { - if (numstems >= MAXSTEMS) Error; - if (dx < 0.0) {x += dx; dx = -dx;} - stems[numstems].vertical = TRUE; - stems[numstems].x = sidebearingX + x + wsoffsetX; - stems[numstems].y = 0.0; - stems[numstems].dx = dx; - stems[numstems].dy = 0.0; - ComputeStem(numstems); - numstems++; - } -} - -/* |- dx dy RLINETO |- */ -/* Behaves like RLINETO in PostScript */ -static void -RLineTo(double dx, double dy) -{ - struct segment *B; - - B = Loc(CharSpace, dx, dy); - - if (ProcessHints) { - currx += dx; - curry += dy; - /* B = Join(B, FindStems(currx, curry)); */ - B = Join(B, FindStems(currx, curry, dx, dy)); - } - - path = Join(path, Line(B)); -} - -/* |- dx1 dy1 dx2 dy2 dx3 dy3 RRCURVETO |- */ -/* Relative RCURVETO, equivalent to dx1 dy1 */ -/* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ -/* (dy1+dy2+dy3) RCURVETO in PostScript */ -static void -RRCurveTo(double dx1, double dy1, double dx2, double dy2, - double dx3, double dy3) -{ - struct segment *B, *C, *D; - - B = Loc(CharSpace, dx1, dy1); - C = Loc(CharSpace, dx2, dy2); - D = Loc(CharSpace, dx3, dy3); - - if (ProcessHints) { - /* For a Bezier curve, we apply the full hint value to - the Bezier C point (and thereby D point). */ - currx += dx1 + dx2 + dx3; - curry += dy1 + dy2 + dy3; - /* C = Join(C, FindStems(currx, curry)); */ - C = Join(C, FindStems(currx, curry, dx3, dy3)); - } - - /* Since XIMAGER is not completely relative, */ - /* we need to add up the delta values */ - - C = Join(C, (struct segment *)Dup(B)); - D = Join(D, (struct segment *)Dup(C)); - - path = Join(path, (struct segment *)Bezier(B, C, D)); -} - -/* - CLOSEPATH |- */ -/* Closes a subpath WITHOUT repositioning the */ -/* current point */ -static void -DoClosePath(void) -{ - struct segment *CurrentPoint; - - CurrentPoint = Phantom(path); - path = ClosePath(path); - path = Join(Snap(path), CurrentPoint); -} - -/* subr# CALLSUBR - */ -/* Calls a CharString subroutine with index */ -/* subr# from the Subrs array */ -static void -CallSubr(int subrno) -{ - if ((subrno < 0) || (subrno >= SubrsP->len)) - Error; - PushCall(CharStringP, strindex, r); - CharStringP = &SubrsP->data.arrayP[subrno]; - StartDecrypt(); -} - -/* - RETURN - */ -/* Returns from a Subrs array CharString */ -/* subroutine called with CALLSUBR */ -static void -Return(void) -{ - PopCall(&CharStringP, &strindex, &r); -} - -/* - ENDCHAR |- */ -/* Finishes a CharString outline */ -/* Executes SETCHACHEDEVICE using a bounding box */ -/* it computes directly from the character outline */ -/* and using the width information acquired from a previous */ -/* HSBW or SBW. It then calls a special version of FILL */ -/* or STROKE depending on the value of PaintType in the */ -/* font dictionary */ -static void -EndChar(void) -{ - /* There is no need to compute and set bounding box for - the cache, since XIMAGER does that on the fly. */ - - /* Perform a Closepath just in case the command was left out */ - path = ClosePath(path); - - /* Set character width */ - path = Join(Snap(path), Loc(CharSpace, escapementX, escapementY)); - -} - -/* |- dx dy RMOVETO |- */ -/* Behaves like RMOVETO in PostScript */ -static void -RMoveTo(double dx, double dy) -{ - struct segment *B; - - B = Loc(CharSpace, dx, dy); - - if (ProcessHints) { - currx += dx; - curry += dy; - /* B = Join(B, FindStems(currx, curry)); */ - B = Join(B, FindStems(currx, curry, 0.0, 0.0)); - } - - path = Join(path, B); -} - -/* - DOTSECTION |- */ -/* Brackets an outline section for the dots in */ -/* letters such as "i", "j", and "!". */ -static void -DotSection(void) -{ - InDotSection = !InDotSection; -} - -/* |- asb adx ady bchar achar SEAC |- */ -/* Standard Encoding Accented Character. */ -static void -Seac(double asb, double adx, double ady, - unsigned char bchar, unsigned char achar) -{ - int Code; - struct segment *mypath; - - /* Move adx - asb, ady over and up from base char's sbpoint. */ - /* (We use adx - asb to counteract the accents sb shift.) */ - /* The variables accentoffsetX/Y modify sidebearingX/Y in Sbw(). */ - /* Note that these incorporate the base character's sidebearing shift by */ - /* using the current sidebearingX, Y values. */ - accentoffsetX = sidebearingX + adx - asb; - accentoffsetY = sidebearingY + ady; - - /* Set path = NULL to avoid complaints from Sbw(). */ - path = NULL; - - /* Go find the CharString for the accent's code via an upcall */ - CharStringP = GetType1CharString((psfont *)Environment, achar); - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) return; - } - /* Copy snapped path to mypath and set path to NULL as above. */ - mypath = Snap(path); - path = NULL; - - /* We must reset these to null now. */ - accentoffsetX = accentoffsetY = 0; - - /* go find the CharString for the base char's code via an upcall */ - CharStringP = GetType1CharString((psfont *)Environment, bchar); - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - FinitStems(); - InitStems(); - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) return; - } - path = Join(mypath, path); -} - - -/* |- sbx sby wx wy SBW |- */ -/* Set the left sidebearing point to (sbx,sby), */ -/* set the character width vector to (wx,wy). */ -static void -Sbw(double sbx, double sby, double wx, double wy) -{ - escapementX = wx; /* Character width vector */ - escapementY = wy; - - /* Sidebearing values are sbx, sby args, plus accent offset from Seac(). */ - sidebearingX = sbx + accentoffsetX; - sidebearingY = sby + accentoffsetY; - - path = Join(path, Loc(CharSpace, sidebearingX, sidebearingY)); - if (ProcessHints) {currx = sidebearingX; curry = sidebearingY;} -} - - /* num1 num2 DIV quotient */ -/* Behaves like DIV in the PostScript language */ -static double -Div(double num1, double num2) -{ - return(num1 / num2); -} - -/* - The following four subroutines (FlxProc, FlxProc1, FlxProc2, and - HintReplace) are C versions of the OtherSubrs Programs, which were - were published in the Adobe Type 1 Font Format book. - - The Flex outline fragment is described by - c1: (x0, y0) = c3: (x0, yshrink(y0)) or (xshrink(x0), y0) - " (x1, y1) = " (x1, yshrink(y1)) or (xshrink(x1), y1) - " (x2, y2) - reference point - c2: (x0, y0) = c4: (x0, yshrink(y0)) or (xshrink(x0), y0) - " (x1, y1) = " (x1, yshrink(y1)) or (xshrink(x1), y1) - " (x2, y2) = " (x2, y2), rightmost endpoint - c3: (x0, y0) - control point, 1st Bezier curve - " (x1, y1) - control point, -"- - " (x2, y2) - end point, -"- - c4: (x0, y0) - control point, 2nd Bezier curve - " (x1, y1) - control point, -"- - " (x2, y2) - end point, -"- - ep: (epY, epX) - final endpoint (should be same as c4: (x2, y2)) - idmin - minimum Flex height (1/100 pixel) at which to render curves -*/ - -#define dtransform(dxusr,dyusr,dxdev,dydev) { \ - register struct segment *point = Loc(CharSpace, dxusr, dyusr); \ - QueryLoc(point, IDENTITY, dxdev, dydev); \ - Destroy(point); \ -} - -#define itransform(xdev,ydev,xusr,yusr) { \ - register struct segment *point = Loc(IDENTITY, xdev, ydev); \ - QueryLoc(point, CharSpace, xusr, yusr); \ - Destroy(point); \ -} - -#define transform(xusr,yusr,xdev,ydev) dtransform(xusr,yusr,xdev,ydev) - -#define PaintType (0) - -#define lineto(x,y) { \ - struct segment *CurrentPoint; \ - double CurrentX, CurrentY; \ - CurrentPoint = Phantom(path); \ - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); \ - Destroy(CurrentPoint); \ - RLineTo(x - CurrentX, y - CurrentY); \ -} - -#define curveto(x0,y0,x1,y1,x2,y2) { \ - struct segment *CurrentPoint; \ - double CurrentX, CurrentY; \ - CurrentPoint = Phantom(path); \ - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); \ - Destroy(CurrentPoint); \ - RRCurveTo(x0 - CurrentX, y0 - CurrentY, x1 - x0, y1 - y0, x2 - x1, y2 - y1); \ -} - -#define xshrink(x) ((x - c4x2) * shrink +c4x2) -#define yshrink(y) ((y - c4y2) * shrink +c4y2) - -#define PickCoords(flag) \ - if (flag) { /* Pick "shrunk" coordinates */ \ - x0 = c1x0; y0 = c1y0; \ - x1 = c1x1; y1 = c1y1; \ - x2 = c1x2; y2 = c1y2; \ - x3 = c2x0; y3 = c2y0; \ - x4 = c2x1; y4 = c2y1; \ - x5 = c2x2; y5 = c2y2; \ - } else { /* Pick original coordinates */ \ - x0 = c3x0; y0 = c3y0; \ - x1 = c3x1; y1 = c3y1; \ - x2 = c3x2; y2 = c3y2; \ - x3 = c4x0; y3 = c4y0; \ - x4 = c4x1; y4 = c4y1; \ - x5 = c4x2; y5 = c4y2; \ - } - -/* FlxProc() = OtherSubrs[0]; Main part of Flex */ -/* Calling sequence: 'idmin epX epY 3 0 callothersubr' */ -/* Computes Flex values, and renders the Flex path, */ -/* and returns (leaves) ending coordinates on stack */ -static void -FlxProc(double c1x2, double c1y2, double c3x0, double c3y0, - double c3x1, double c3y1, double c3x2, double c3y2, - double c4x0, double c4y0, double c4x1, double c4y1, - double c4x2, double c4y2, double epY, double epX, int idmin) -{ - double dmin; - double c1x0, c1y0, c1x1, c1y1; - double c2x0, c2y0, c2x1, c2y1, c2x2, c2y2; - char yflag; - double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; - double cxx, cyx, cxy, cyy; /* Transformation matrix */ - int flipXY; - double x, y; - double erosion = 1; /* Device parameter */ - /* Erosion may have different value specified in 'internaldict' */ - double shrink; - double dX, dY; - char erode; - double eShift; - double cx, cy; - double ex, ey; - - c1x0 = c1y0 = c1x1 = c1y1 = c2x0 = c2y0 = c2x1 = c2y1 = c2x2 = c2y2 = 0.0; - - Destroy(path); - path = FlxOldPath; /* Restore previous path (stored in FlxProc1) */ - - if (ProcessHints) { - dmin = ABS(idmin) / 100.0; /* Minimum Flex height in pixels */ - - c2x2 = c4x2; c2y2 = c4y2; /* Point c2 = c4 */ - - yflag = FABS(c1y2 - c3y2) > FABS(c1x2 - c3x2); /* Flex horizontal? */ - - QuerySpace(CharSpace, &cxx, &cyx, &cxy, &cyy); /* Transformation matrix */ - - if (FABS(cxx) < 0.00001 || FABS(cyy) < 0.00001) - flipXY = -1; /* Char on side */ - else if (FABS(cyx) < 0.00001 || FABS(cxy) < 0.00001) - flipXY = 1; /* Char upright */ - else - flipXY = 0; /* Char at angle */ - - if (yflag) { /* Flex horizontal */ - if (flipXY == 0 || c3y2 == c4y2) { /* Char at angle or Flex height = 0 */ - PickCoords(FALSE); /* Pick original control points */ - } else { - shrink = FABS((c1y2 - c4y2) / (c3y2 - c4y2)); /* Slope */ - - c1x0 = c3x0; c1y0 = yshrink(c3y0); - c1x1 = c3x1; c1y1 = yshrink(c3y1); - c2x0 = c4x0; c2y0 = yshrink(c4y0); - c2x1 = c4x1; c2y1 = yshrink(c4y1); - - dtransform(0.0, ROUND(c3y2-c1y2), &x, &y); /* Flex height in pixels */ - dY = FABS((flipXY == 1) ? y : x); - PickCoords(dY < dmin); /* If Flex small, pick 'shrunk' control points */ - - if (FABS(y2 - c1y2) > 0.001) { /* Flex 'non-zero'? */ - transform(c1x2, c1y2, &x, &y); - - if (flipXY == 1) { - cx = x; cy = y; - } else { - cx = y; cy = x; - } - - dtransform(0.0, ROUND(y2-c1y2), &x, &y); - dY = (flipXY == 1) ? y : x; - if (ROUND(dY) != 0) - dY = ROUND(dY); - else - dY = (dY < 0) ? -1 : 1; - - erode = PaintType != 2 && erosion >= 0.5; - if (erode) - cy -= 0.5; - ey = cy + dY; - ey = CEIL(ey) - ey; - ey = ey + FLOOR(cy + dY); - if (erode) - ey += 0.5; - - if (flipXY == 1) { - itransform(cx, ey, &x, &y); - } else { - itransform(ey, cx, &x, &y); - } - - eShift = y - y2; - y1 += eShift; - y2 += eShift; - y3 += eShift; - } - } - } else { /* Flex vertical */ - if (flipXY == 0 || c3x2 == c4x2) { /* Char at angle or Flex height = 0 */ - PickCoords(FALSE); /* Pick original control points */ - } else { - shrink = FABS((c1x2 - c4x2) / (c3x2 - c4x2)); /* Slope */ - - c1x0 = xshrink(c3x0); c1y0 = c3y0; - c1x1 = xshrink(c3x1); c1y1 = c3y1; - c2x0 = xshrink(c4x0); c2y0 = c4y0; - c2x1 = xshrink(c4x1); c2y1 = c4y1; - - dtransform(ROUND(c3x2 - c1x2), 0.0, &x, &y); /* Flex height in pixels */ - dX = FABS((flipXY == -1) ? y : x); - PickCoords(dX < dmin); /* If Flex small, pick 'shrunk' control points */ - - if (FABS(x2 - c1x2) > 0.001) { - transform(c1x2, c1y2, &x, &y); - if (flipXY == -1) { - cx = y; cy = x; - } else { - cx = x; cy = y; - } - - dtransform(ROUND(x2-c1x2), 0.0, &x, &y); - dX = (flipXY == -1) ? y : x; - if (ROUND(dX) != 0) - dX = ROUND(dX); - else - dX = (dX < 0) ? -1 : 1; - - erode = PaintType != 2 && erosion >= 0.5; - if (erode) - cx -= 0.5; - ex = cx + dX; - ex = CEIL(ex) - ex; - ex = ex + FLOOR(cx + dX); - if (erode) - ex += 0.5; - - if (flipXY == -1) { - itransform(cy, ex, &x, &y); - } else { - itransform(ex, cy, &x, &y); - } - - eShift = x - x2; - x1 += eShift; - x2 += eShift; - x3 += eShift; - } - } - } - - if (x2 == x5 || y2 == y5) { - lineto(x5, y5); - } else { - curveto(x0, y0, x1, y1, x2, y2); - curveto(x3, y3, x4, y4, x5, y5); - } - } else { /* ProcessHints is off */ - PickCoords(FALSE); /* Pick original control points */ - curveto(x0, y0, x1, y1, x2, y2); - curveto(x3, y3, x4, y4, x5, y5); - } - - PSFakePush(epY); - PSFakePush(epX); -} - -/* FlxProc1() = OtherSubrs[1]; Part of Flex */ -/* Calling sequence: '0 1 callothersubr' */ -/* Saves and clears path, then restores currentpoint */ -static void -FlxProc1(void) -{ - struct segment *CurrentPoint; - - CurrentPoint = Phantom(path); - - FlxOldPath = path; - path = CurrentPoint; -} - -/* FlxProc2() = OtherSubrs[2]; Part of Flex */ -/* Calling sequence: '0 2 callothersubr' */ -/* Returns currentpoint on stack */ -static void -FlxProc2(void) -{ - struct segment *CurrentPoint; - double CurrentX, CurrentY; - - CurrentPoint = Phantom(path); - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); - Destroy(CurrentPoint); - - /* Push CurrentPoint on fake PostScript stack */ - PSFakePush(CurrentX); - PSFakePush(CurrentY); -} - -/* HintReplace() = OtherSubrs[3]; Hint Replacement */ -/* Calling sequence: 'subr# 1 3 callothersubr pop callsubr' */ -/* Reinitializes stem hint structure */ -static void -HintReplace(void) -{ - /* Effectively retire the current stems, but keep them around for */ - /* revhint use in case we are in a stem when we replace hints. */ - currstartstem = numstems; - - /* 'subr#' is left on PostScript stack (for 'pop callsubr') */ -} - -/* arg1 ... argn n othersubr# CALLOTHERSUBR - */ -/* Make calls on the PostScript interpreter (or call equivalent C code) */ -/* NOTE: The n arguments have been pushed on the fake PostScript stack */ -static void -CallOtherSubr(int othersubrno) -{ - switch(othersubrno) { - case 0: /* OtherSubrs[0]; Main part of Flex */ - if (PSFakeTop < 16) Error; - ClearPSFakeStack(); - FlxProc( - PSFakeStack[0], PSFakeStack[1], PSFakeStack[2], PSFakeStack[3], - PSFakeStack[4], PSFakeStack[5], PSFakeStack[6], PSFakeStack[7], - PSFakeStack[8], PSFakeStack[9], PSFakeStack[10], PSFakeStack[11], - PSFakeStack[12], PSFakeStack[13], PSFakeStack[14], PSFakeStack[15], - (int) PSFakeStack[16] - ); - break; - case 1: /* OtherSubrs[1]; Part of Flex */ - FlxProc1(); - break; - case 2: /* OtherSubrs[2]; Part of Flex */ - FlxProc2(); - break; - case 3: /* OtherSubrs[3]; Hint Replacement */ - HintReplace(); - break; - default: { /* call OtherSubrs[4] or higher if PostScript is present */ - } - } -} - -/* |- x y SETCURRENTPOINT |- */ -/* Sets the current point to (x,y) in absolute */ -/* character space coordinates without per- */ -/* forming a CharString MOVETO command */ -static void -SetCurrentPoint(double x, double y) -{ - currx = x; - curry = y; -} - -/* The Type1Char routine for use by PostScript. */ -/************************************************/ -struct xobject * -Type1Char(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, - psobj *osubrsP, - struct blues_struct *bluesP, /* FontID's ptr to the blues struct */ - int *modeP) -{ - int Code; - - path = NULL; - errflag = FALSE; - - /* Make parameters available to all Type1 routines */ - Environment = env; - CharSpace = S; /* used when creating path elements */ - CharStringP = charstrP; - SubrsP = subrsP; - - blues = bluesP; - - /* compute the alignment zones */ - ComputeAlignmentZones(); - - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - InitStems(); - - currx = curry = 0; - escapementX = escapementY = 0; - sidebearingX = sidebearingY = 0; - accentoffsetX = accentoffsetY = 0; - wsoffsetX = wsoffsetY = 0; /* No shift to preserve whitspace. */ - wsset = 0; /* wsoffsetX,Y haven't been set yet. */ - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) break; - } - - FinitStems(); - - - /* Clean up if an error has occurred */ - if (errflag) { - if (path != NULL) { - Destroy(path); /* Reclaim storage */ - path = NULL; /* Indicate that character could not be built */ - } - } - - return((struct xobject *) path); -} - -#if XFONT_CID -struct xobject * -CIDChar(char *env, struct XYspace *S, - psobj *charstrP, psobj *subrsP, psobj *osubrsP, - struct blues_struct *bluesP, /* FontID's ptr to the blues struct */ - int *modeP) -{ - int Code; - - path = NULL; - errflag = FALSE; - - /* Make parameters available to all CID routines */ - Environment = env; - CharSpace = S; /* used when creating path elements */ - CharStringP = charstrP; - SubrsP = subrsP; - - blues = bluesP; - - /* compute the alignment zones */ - ComputeAlignmentZones(); - - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - InitStems(); - - currx = curry = 0; - escapementX = escapementY = 0; - sidebearingX = sidebearingY = 0; - accentoffsetX = accentoffsetY = 0; - wsoffsetX = wsoffsetY = 0; /* No shift to preserve whitspace. */ - wsset = 0; /* wsoffsetX,Y haven't been set yet. */ - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) break; - } - - FinitStems(); - - /* Clean up if an error has occurred */ - if (errflag) { - if (path != NULL) { - Destroy(path); /* Reclaim storage */ - path = NULL; /* Indicate that character could not be built */ - } - } - - return((struct xobject *) path); -} -#endif diff --git a/nx-X11/lib/font/Type1/util.c b/nx-X11/lib/font/Type1/util.c deleted file mode 100644 index 7c5a81dee..000000000 --- a/nx-X11/lib/font/Type1/util.c +++ /dev/null @@ -1,222 +0,0 @@ -/* $Xorg: util.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/util.c,v 1.5 1999/08/21 13:47:53 dawes Exp $ */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef FONTMODULE -#include -#else -#include "Xdefs.h" -#include "Xmd.h" -#include "xf86_ansic.h" -#endif -#include "util.h" -#include /* for xalloc/xfree */ - -static char *vm_base = NULL; /* Start of virtual memory area */ - char *vm_next = NULL; /* Pointer to first free byte */ - long vm_free = 0; /* Count of free bytes */ - long vm_size = 0; /* Total size of memory */ - -/* - * Initialize memory. - */ -boolean -vm_init(int cnt) -{ -#if XFONT_CID - if (vm_base == NULL || (vm_base != NULL && vm_size != cnt)) { - if (vm_base != NULL) xfree(vm_base); - vm_next = vm_base = (char *)xalloc (cnt); - } else - vm_next = vm_base; -#else - vm_next = vm_base = (char *)xalloc (cnt); -#endif - - if (vm_base != NULL) { - vm_free = cnt; - vm_size = cnt; - return(TRUE); - } - else - return(FALSE); - -} - -char * -vm_alloc(int bytes) -{ - char *answer; - - /* Round to next word multiple */ - bytes = (bytes + 7) & ~7; - - /* Allocate the space, if it is available */ - if (bytes > 0 && bytes <= vm_free) { - answer = vm_next; - vm_free -= bytes; - vm_next += bytes; - } - else - answer = NULL; - - return(answer); -} - -/* - * Format an Integer object - */ -void -objFormatInteger(psobj *objP, int value) -{ - if (objP != NULL) { - objP->type = OBJ_INTEGER; - objP->len = 0; - objP->data.integer = value; - } -} - -/* - * Format a Real object - */ -void -objFormatReal(psobj *objP, float value) -{ - if (objP != NULL) { - objP->type = OBJ_REAL; - objP->len = 0; - objP->data.real = value; - } -} - -/* - * Format a Boolean object - */ -void -objFormatBoolean(psobj *objP, boolean value) -{ - if (objP != NULL) { - objP->type = OBJ_BOOLEAN; - objP->len = 0; - objP->data.boolean = value; - } -} - -/* - * Format an Encoding object - */ -void -objFormatEncoding(psobj *objP, int length, psobj *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_ENCODING; - objP->len = length; - objP->data.arrayP = valueP; - } -} - -/* - * Format an Array object - */ -void -objFormatArray(psobj *objP, int length, psobj *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_ARRAY; - objP->len = length; - objP->data.arrayP = valueP; - } -} - - -/* - * Format a String object - */ -void -objFormatString(psobj *objP, int length, char *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_STRING; - objP->len = length; - objP->data.valueP = valueP; - } -} - -/* - * Format a Name object - */ -void -objFormatName(psobj *objP, int length, char *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_NAME; - objP->len = length; - objP->data.nameP = valueP; - } -} - -/* - * Format a File object - */ -void -objFormatFile(psobj *objP, FILE *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_FILE; - objP->len = 0; - objP->data.fileP = valueP; - } -} - diff --git a/nx-X11/lib/font/Type1/util.h b/nx-X11/lib/font/Type1/util.h deleted file mode 100644 index a1a8b3e6b..000000000 --- a/nx-X11/lib/font/Type1/util.h +++ /dev/null @@ -1,217 +0,0 @@ -/* $Xorg: util.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License 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 IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM 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. - */ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/util.h,v 1.4 1999/08/22 08:58:55 dawes Exp $ */ - -#ifndef UTIL_H -#define UTIL_H - -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifndef boolean -typedef int boolean; -#endif - -#ifndef TRUE -#define TRUE (1) -#endif - -#ifndef FALSE -#define FALSE (0) -#endif - -/***================================================================***/ -/* Portable definitions for 2's complement machines. - * NOTE: These really should be based on PostScript types, - * for example, sizeof(ps_integer), or sizeof(ps_unsigned) - */ -#define MAX_ULONG (~(unsigned long)(0)) -/* This code is portable, assuming K&R C and 2's complement arithmetic */ -#define MAX_INTEGER \ - ((long)((((unsigned long) 1)<<(sizeof(unsigned long)*8-1))-1)) -#define MIN_INTEGER ((-MAX_INTEGER)-1) - -#define MAX_ARRAY_CNT (65535) -#define MAX_DICT_CNT (65535) -#define MAX_STRING_LEN (65535) -#define MAX_NAME_LEN (128) - -/* this is the size of memory allocated for reading fonts */ - -#if XFONT_CID -#define VM_SIZE (100*1024) -#else -#define VM_SIZE (50*1024) -#endif -/***================================================================***/ - -#ifndef MIN -#define MIN(a,b) (((a)<(b)) ? a : b ) -#endif - -/***================================================================***/ -/* Routines for managing virtual memory */ -/***================================================================***/ - -extern boolean vm_init ( int cnt ); -extern long vm_free; -extern long vm_size; -extern char *vm_next; -extern char *vm_alloc ( int bytes ); - -/***================================================================***/ -/* Macros for managing virtual memory */ -/***================================================================***/ -#define vm_next_byte() (vm_next) -#define vm_free_bytes() (vm_free) -#define vm_avail(B) (B <= vm_free) - - - -/***================================================================***/ -/* Types of PostScript objects */ -/***================================================================***/ -#define OBJ_INTEGER (0) -#define OBJ_REAL (1) -#define OBJ_BOOLEAN (2) -#define OBJ_ARRAY (3) -#define OBJ_STRING (4) -#define OBJ_NAME (5) -#define OBJ_FILE (6) -#define OBJ_ENCODING (7) - -/***================================================================***/ -/* Value of PostScript objects */ -/***================================================================***/ -typedef union ps_value { - char *valueP; /* value pointer for unspecified type */ - int value; /* value for unspecified type */ - int integer; /* when type is OBJ_INTEGER */ - float real; /* when type is OBJ_REAL */ - int boolean; /* when type is OBJ_BOOLEAN */ - struct ps_obj *arrayP; /* when type is OBJ_ARRAY */ - unsigned char *stringP; /* when type is OBJ_STRING */ - char *nameP; /* when type is OBJ_NAME */ - FILE *fileP; /* when type is OBJ_FILE */ -} psvalue; - -/***================================================================***/ -/* Definition of a PostScript object */ -/***================================================================***/ -typedef struct ps_obj { - char type; - char unused; - unsigned short len; - union ps_value data; -} psobj; - -/***================================================================***/ -/* Definition of a PostScript Dictionary Entry */ -/***================================================================***/ -typedef struct ps_dict { - psobj key; - psobj value; -} psdict; - -/***================================================================***/ -/* Macros for testing type of PostScript objects */ -/***================================================================***/ -#define objIsInteger(o) ((o).type == OBJ_INTEGER) -#define objIsReal(o) ((o).type == OBJ_REAL) -#define objIsBoolean(o) ((o).type == OBJ_BOOLEAN) -#define objIsArray(o) ((o).type == OBJ_ARRAY) -#define objIsString(o) ((o).type == OBJ_STRING) -#define objIsName(o) ((o).type == OBJ_NAME) -#define objIsFile(o) ((o).type == OBJ_FILE) - -/***================================================================***/ -/* Macros for setting type of PostScript objects */ -/***================================================================***/ -#define objSetInteger(o) ((o).type = OBJ_INTEGER) -#define objSetReal(o) ((o).type = OBJ_REAL) -#define objSetBoolean(o) ((o).type = OBJ_BOOLEAN) -#define objSetArray(o) ((o).type = OBJ_ARRAY) -#define objSetString(o) ((o).type = OBJ_STRING) -#define objSetName(o) ((o).type = OBJ_NAME) -#define objSetFile(o) ((o).type = OBJ_FILE) - -/***================================================================***/ -/* Macros for testing type of PostScript objects (pointer access) */ -/***================================================================***/ -#define objPIsInteger(o) ((o)->type == OBJ_INTEGER) -#define objPIsReal(o) ((o)->type == OBJ_REAL) -#define objPIsBoolean(o) ((o)->type == OBJ_BOOLEAN) -#define objPIsArray(o) ((o)->type == OBJ_ARRAY) -#define objPIsString(o) ((o)->type == OBJ_STRING) -#define objPIsName(o) ((o)->type == OBJ_NAME) -#define objPIsFile(o) ((o)->type == OBJ_FILE) - -/***================================================================***/ -/* Macros for setting type of PostScript objects (pointer access) */ -/***================================================================***/ -#define objPSetInteger(o) ((o)->type = OBJ_INTEGER) -#define objPSetReal(o) ((o)->type = OBJ_REAL) -#define objPSetBoolean(o) ((o)->type = OBJ_BOOLEAN) -#define objPSetArray(o) ((o)->type = OBJ_ARRAY) -#define objPSetString(o) ((o)->type = OBJ_STRING) -#define objPSetName(o) ((o)->type = OBJ_NAME) -#define objPSetFile(o) ((o)->type = OBJ_FILE) - -/***================================================================***/ -/* Prototypes of object formatting functions */ -/***================================================================***/ -extern void objFormatInteger ( psobj *objP, int value ); -extern void objFormatReal ( psobj *objP, float value ); -extern void objFormatBoolean ( psobj *objP, boolean value ); -extern void objFormatEncoding ( psobj *objP, int length, psobj *valueP ); -extern void objFormatArray ( psobj *objP, int length, psobj *valueP ); -extern void objFormatString ( psobj *objP, int length, char *valueP ); -extern void objFormatName ( psobj *objP, int length, char *valueP ); -extern void objFormatFile ( psobj *objP, FILE *valueP ); - -#endif diff --git a/nx-X11/lib/font/bitmap/Imakefile b/nx-X11/lib/font/bitmap/Imakefile deleted file mode 100644 index 9acbe7796..000000000 --- a/nx-X11/lib/font/bitmap/Imakefile +++ /dev/null @@ -1,71 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/bitmap/Imakefile,v 1.11 2001/04/03 17:51:59 paulo Exp $ - -#if BuildServer && DoLoadableServer -#define IHaveSubdirs -#define NoLibSubdirs -#define PassCDebugFlags -SUBDIRS = module -#endif - -BDFSRCS=bdfread.c bdfutils.c -BDFOBJS=bdfread.o bdfutils.o -#ifndef KDriveXServer -BDFDEFS=-DBDFFORMAT - -SNFSRCS=snfread.c -SNFOBJS=snfread.o -SNFDEFS=-DSNFFORMAT -#endif - -PCFSRCS=pcfread.c pcfwrite.c -PCFOBJS=pcfread.o pcfwrite.o -PCFDEFS=-DPCFFORMAT - - - INCLUDES = -I$(FONTINCSRC) -I../include - HEADERS = bdfint.h pcf.h -#ifdef FontFormatDefines - FORMAT_DEFS = FontFormatDefines -#endif -#if GzipFontCompression - GZIP_DEFS = -DX_GZIP_FONT_COMPRESSION -#endif - DEFINES = $(BDFDEFS) $(PCFDEFS) $(SNFDEFS) - - SRCS = $(BDFSRCS) bitmap.c bitmaputil.c bitscale.c \ - bitmapfunc.c $(PCFSRCS) $(SNFSRCS) \ - fontink.c - - OBJS = $(BDFOBJS) bitmap.o bitmaputil.o bitscale.o \ - bitmapfunc.o $(PCFOBJS) $(SNFOBJS) \ - fontink.o - -#if BuildFontLib -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SpecialCLibObjectRule(bitmapfunc,$(ICONFIGFILES),$(GZIP_DEFS)) -SpecialCLibObjectRule(bitscale,$(ICONFIGFILES),$(GZIP_DEFS)) - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) -#endif - -#if BuildServer && DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -BuildIncludes($(HEADERS),X11/fonts,../..) -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS)) - -DependTarget() diff --git a/nx-X11/lib/font/bitmap/bdfint.h b/nx-X11/lib/font/bitmap/bdfint.h deleted file mode 100644 index d41c4a556..000000000 --- a/nx-X11/lib/font/bitmap/bdfint.h +++ /dev/null @@ -1,90 +0,0 @@ -/* $Xorg: bdfint.h,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.4 2001/01/17 19:43:26 dawes Exp $ */ - -#ifndef BDFINT_H -#define BDFINT_H - -#define bdfIsPrefix(buf,str) (!strncmp((char *)buf,str,strlen(str))) -#define bdfStrEqual(s1,s2) (!strcmp(s1,s2)) - -#define BDF_GENPROPS 6 -#define NullProperty ((FontPropPtr)0) - -/* - * This structure holds some properties we need to generate if they aren't - * specified in the BDF file and some other values read from the file - * that we'll need to calculate them. We need to keep track of whether - * or not we've read them. - */ -typedef struct BDFSTAT { - int linenum; - char *fileName; - char fontName[MAXFONTNAMELEN]; - float pointSize; - int resolution_x; - int resolution_y; - int digitCount; - int digitWidths; - int exHeight; - - FontPropPtr fontProp; - FontPropPtr pointSizeProp; - FontPropPtr resolutionXProp; - FontPropPtr resolutionYProp; - FontPropPtr resolutionProp; - FontPropPtr xHeightProp; - FontPropPtr weightProp; - FontPropPtr quadWidthProp; - BOOL haveFontAscent; - BOOL haveFontDescent; - BOOL haveDefaultCh; -} bdfFileState; - -extern void bdfError ( char * message, ... ); -extern void bdfWarning ( char *message, ... ); -extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf, - int len ); -extern Atom bdfForceMakeAtom ( char *str, int *size ); -extern Atom bdfGetPropertyValue ( char *s ); -extern int bdfIsInteger ( char *str ); -extern unsigned char bdfHexByte ( unsigned char *s ); -extern Bool bdfSpecialProperty ( FontPtr pFont, FontPropPtr prop, - char isString, bdfFileState *bdfState ); -extern int bdfReadFont( FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan ); -extern int bdfReadFontInfo( FontInfoPtr pFontInfo, FontFilePtr file ); - -extern void FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI, - xCharInfo *pInk ); -extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc, - CharInfoPtr pDst ); - -#endif /* BDFINT_H */ diff --git a/nx-X11/lib/font/bitmap/bdfread.c b/nx-X11/lib/font/bitmap/bdfread.c deleted file mode 100644 index bccabd7df..000000000 --- a/nx-X11/lib/font/bitmap/bdfread.c +++ /dev/null @@ -1,967 +0,0 @@ -/* $Xorg: bdfread.c,v 1.5 2001/02/09 02:04:01 xorgcvs Exp $ */ - -/************************************************************************ -Copyright 1989 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. - -************************************************************************/ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.12tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifndef FONTMODULE -#include -#endif -#include -#include -/* use bitmap structure */ -#include -#include - -#if HAVE_STDINT_H -#include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fffffff -#endif - -#define INDICES 256 -#define MAXENCODING 0xFFFF -#define BDFLINELEN 1024 - -static Bool bdfPadToTerminal(FontPtr pFont); -extern int bdfFileLineNum; - -/***====================================================================***/ - -static Bool -bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, - int glyph, int scan, CARD32 *sizes) -{ - int widthBits, - widthBytes, - widthHexChars; - int height, - row; - int i, - inLineLen, - nextByte; - unsigned char *pInBits, - *picture, - *line = NULL; - unsigned char lineBuf[BDFLINELEN]; - - widthBits = GLYPHWIDTHPIXELS(pCI); - height = GLYPHHEIGHTPIXELS(pCI); - - widthBytes = BYTES_PER_ROW(widthBits, glyph); - if (widthBytes * height > 0) { - picture = (unsigned char *) xalloc(widthBytes * height); - if (!picture) { - bdfError("Couldn't allocate picture (%d*%d)\n", widthBytes, height); - goto BAILOUT; - } - } else - picture = NULL; - pCI->bits = (char *) picture; - - if (sizes) { - for (i = 0; i < GLYPHPADOPTIONS; i++) - sizes[i] += BYTES_PER_ROW(widthBits, (1 << i)) * height; - } - nextByte = 0; - widthHexChars = BYTES_PER_ROW(widthBits, 1); - -/* 5/31/89 (ef) -- hack, hack, hack. what *am* I supposed to do with */ -/* 0 width characters? */ - - for (row = 0; row < height; row++) { - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line) - break; - - if (widthBits == 0) { - if ((!line) || (bdfIsPrefix(line, "ENDCHAR"))) - break; - else - continue; - } - pInBits = line; - inLineLen = strlen((char *) pInBits); - - if (inLineLen & 1) { - bdfError("odd number of characters in hex encoding\n"); - line[inLineLen++] = '0'; - line[inLineLen] = '\0'; - } - inLineLen >>= 1; - i = inLineLen; - if (i > widthHexChars) - i = widthHexChars; - for (; i > 0; i--, pInBits += 2) - picture[nextByte++] = bdfHexByte(pInBits); - - /* pad if line is too short */ - if (inLineLen < widthHexChars) { - for (i = widthHexChars - inLineLen; i > 0; i--) - picture[nextByte++] = 0; - } else { - unsigned char mask; - - mask = 0xff << (8 - (widthBits & 0x7)); - if (mask && picture[nextByte - 1] & ~mask) { - picture[nextByte - 1] &= mask; - } - } - - if (widthBytes > widthHexChars) { - i = widthBytes - widthHexChars; - while (i-- > 0) - picture[nextByte++] = 0; - } - } - - if ((line && (!bdfIsPrefix(line, "ENDCHAR"))) || (height == 0)) - line = bdfGetLine(file, lineBuf, BDFLINELEN); - - if ((!line) || (!bdfIsPrefix(line, "ENDCHAR"))) { - bdfError("missing 'ENDCHAR'\n"); - goto BAILOUT; - } - if (nextByte != height * widthBytes) { - bdfError("bytes != rows * bytes_per_row (%d != %d * %d)\n", - nextByte, height, widthBytes); - goto BAILOUT; - } - if (picture != NULL) { - if (bit == LSBFirst) - BitOrderInvert(picture, nextByte); - if (bit != byte) { - if (scan == 2) - TwoByteSwap(picture, nextByte); - else if (scan == 4) - FourByteSwap(picture, nextByte); - } - } - return (TRUE); -BAILOUT: - if (picture) - xfree(picture); - pCI->bits = NULL; - return (FALSE); -} - -/***====================================================================***/ - -static Bool -bdfSkipBitmap(FontFilePtr file, int height) -{ - unsigned char *line; - int i = 0; - unsigned char lineBuf[BDFLINELEN]; - - do { - line = bdfGetLine(file, lineBuf, BDFLINELEN); - i++; - } while (line && !bdfIsPrefix(line, "ENDCHAR") && i <= height); - - if (i > 1 && line && !bdfIsPrefix(line, "ENDCHAR")) { - bdfError("Error in bitmap, missing 'ENDCHAR'\n"); - return (FALSE); - } - return (TRUE); -} - -/***====================================================================***/ - -static void -bdfFreeFontBits(FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - BitmapExtraPtr bitmapExtra; - int i, nencoding; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - bitmapExtra = (BitmapExtraPtr) bitmapFont->bitmapExtra; - xfree(bitmapFont->ink_metrics); - if(bitmapFont->encoding) { - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - for(i=0; iencoding[i]); - } - xfree(bitmapFont->encoding); - for (i = 0; i < bitmapFont->num_chars; i++) - xfree(bitmapFont->metrics[i].bits); - xfree(bitmapFont->metrics); - if (bitmapExtra) - { - xfree (bitmapExtra->glyphNames); - xfree (bitmapExtra->sWidths); - xfree (bitmapExtra); - } - xfree(pFont->info.props); - xfree(bitmapFont); -} - - -static Bool -bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, - int bit, int byte, int glyph, int scan) -{ - unsigned char *line; - register CharInfoPtr ci; - int i, - ndx, - nchars, - nignored; - unsigned int char_row, char_col; - int numEncodedGlyphs = 0; - CharInfoPtr *bdfEncoding[256]; - BitmapFontPtr bitmapFont; - BitmapExtraPtr bitmapExtra; - CARD32 *bitmapsSizes; - unsigned char lineBuf[BDFLINELEN]; - int nencoding; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - bitmapExtra = (BitmapExtraPtr) bitmapFont->bitmapExtra; - - if (bitmapExtra) { - bitmapsSizes = bitmapExtra->bitmapsSizes; - for (i = 0; i < GLYPHPADOPTIONS; i++) - bitmapsSizes[i] = 0; - } else - bitmapsSizes = NULL; - - bzero(bdfEncoding, sizeof(bdfEncoding)); - bitmapFont->metrics = NULL; - ndx = 0; - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - - if ((!line) || (sscanf((char *) line, "CHARS %d", &nchars) != 1)) { - bdfError("bad 'CHARS' in bdf file\n"); - return (FALSE); - } - if (nchars < 1) { - bdfError("invalid number of CHARS in BDF file\n"); - return (FALSE); - } - if (nchars > INT32_MAX / sizeof(CharInfoRec)) { - bdfError("Couldn't allocate pCI (%d*%d)\n", nchars, - sizeof(CharInfoRec)); - goto BAILOUT; - } - ci = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); - if (!ci) { - bdfError("Couldn't allocate pCI (%d*%d)\n", nchars, - sizeof(CharInfoRec)); - goto BAILOUT; - } - bzero((char *)ci, nchars * sizeof(CharInfoRec)); - bitmapFont->metrics = ci; - - if (bitmapExtra) { - bitmapExtra->glyphNames = (Atom *) xalloc(nchars * sizeof(Atom)); - if (!bitmapExtra->glyphNames) { - bdfError("Couldn't allocate glyphNames (%d*%d)\n", - nchars, sizeof(Atom)); - goto BAILOUT; - } - } - if (bitmapExtra) { - bitmapExtra->sWidths = (int *) xalloc(nchars * sizeof(int)); - if (!bitmapExtra->sWidths) { - bdfError("Couldn't allocate sWidth (%d *%d)\n", - nchars, sizeof(int)); - return FALSE; - } - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - pFont->info.firstRow = 256; - pFont->info.lastRow = 0; - pFont->info.firstCol = 256; - pFont->info.lastCol = 0; - nignored = 0; - for (ndx = 0; (ndx < nchars) && (line) && (bdfIsPrefix(line, "STARTCHAR"));) { - int t; - int wx; /* x component of width */ - int wy; /* y component of width */ - int bw; /* bounding-box width */ - int bh; /* bounding-box height */ - int bl; /* bounding-box left */ - int bb; /* bounding-box bottom */ - int enc, - enc2; /* encoding */ - unsigned char *p; /* temp pointer into line */ - char charName[100]; - int ignore; - - if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) { - bdfError("bad character name in BDF file\n"); - goto BAILOUT; /* bottom of function, free and return error */ - } - if (bitmapExtra) - bitmapExtra->glyphNames[ndx] = bdfForceMakeAtom(charName, NULL); - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || (t = sscanf((char *) line, "ENCODING %d %d", &enc, &enc2)) < 1) { - bdfError("bad 'ENCODING' in BDF file\n"); - goto BAILOUT; - } - if (enc < -1 || (t == 2 && enc2 < -1)) { - bdfError("bad ENCODING value"); - goto BAILOUT; - } - if (t == 2 && enc == -1) - enc = enc2; - ignore = 0; - if (enc == -1) { - if (!bitmapExtra) { - nignored++; - ignore = 1; - } - } else if (enc > MAXENCODING) { - bdfError("char '%s' has encoding too large (%d)\n", - charName, enc); - } else { - char_row = (enc >> 8) & 0xFF; - char_col = enc & 0xFF; - if (char_row < pFont->info.firstRow) - pFont->info.firstRow = char_row; - if (char_row > pFont->info.lastRow) - pFont->info.lastRow = char_row; - if (char_col < pFont->info.firstCol) - pFont->info.firstCol = char_col; - if (char_col > pFont->info.lastCol) - pFont->info.lastCol = char_col; - if (bdfEncoding[char_row] == (CharInfoPtr *) NULL) { - bdfEncoding[char_row] = - (CharInfoPtr *) xalloc(256 * sizeof(CharInfoPtr)); - if (!bdfEncoding[char_row]) { - bdfError("Couldn't allocate row %d of encoding (%d*%d)\n", - char_row, INDICES, sizeof(CharInfoPtr)); - goto BAILOUT; - } - for (i = 0; i < 256; i++) - bdfEncoding[char_row][i] = (CharInfoPtr) NULL; - } - if (bdfEncoding[char_row] != NULL) { - bdfEncoding[char_row][char_col] = ci; - numEncodedGlyphs++; - } - } - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if ((!line) || (sscanf((char *) line, "SWIDTH %d %d", &wx, &wy) != 2)) { - bdfError("bad 'SWIDTH'\n"); - goto BAILOUT; - } - if (wy != 0) { - bdfError("SWIDTH y value must be zero\n"); - goto BAILOUT; - } - if (bitmapExtra) - bitmapExtra->sWidths[ndx] = wx; - -/* 5/31/89 (ef) -- we should be able to ditch the character and recover */ -/* from all of these. */ - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if ((!line) || (sscanf((char *) line, "DWIDTH %d %d", &wx, &wy) != 2)) { - bdfError("bad 'DWIDTH'\n"); - goto BAILOUT; - } - if (wy != 0) { - bdfError("DWIDTH y value must be zero\n"); - goto BAILOUT; - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { - bdfError("bad 'BBX'\n"); - goto BAILOUT; - } - if ((bh < 0) || (bw < 0)) { - bdfError("character '%s' has a negative sized bitmap, %dx%d\n", - charName, bw, bh); - goto BAILOUT; - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { - for (p = line + strlen("ATTRIBUTES "); - (*p == ' ') || (*p == '\t'); - p++) - /* empty for loop */ ; - ci->metrics.attributes = (bdfHexByte(p) << 8) + bdfHexByte(p + 2); - line = bdfGetLine(file, lineBuf, BDFLINELEN); - } else - ci->metrics.attributes = 0; - - if (!line || !bdfIsPrefix(line, "BITMAP")) { - bdfError("missing 'BITMAP'\n"); - goto BAILOUT; - } - /* collect data for generated properties */ - if ((strlen(charName) == 1)) { - if ((charName[0] >= '0') && (charName[0] <= '9')) { - pState->digitWidths += wx; - pState->digitCount++; - } else if (charName[0] == 'x') { - pState->exHeight = (bh + bb) <= 0 ? bh : bh + bb; - } - } - if (!ignore) { - ci->metrics.leftSideBearing = bl; - ci->metrics.rightSideBearing = bl + bw; - ci->metrics.ascent = bh + bb; - ci->metrics.descent = -bb; - ci->metrics.characterWidth = wx; - ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); - ci++; - ndx++; - } else - bdfSkipBitmap(file, bh); - - line = bdfGetLine(file, lineBuf, BDFLINELEN); /* get STARTCHAR or - * ENDFONT */ - } - - if (ndx + nignored != nchars) { - bdfError("%d too few characters\n", nchars - (ndx + nignored)); - goto BAILOUT; - } - nchars = ndx; - bitmapFont->num_chars = nchars; - if ((line) && (bdfIsPrefix(line, "STARTCHAR"))) { - bdfError("more characters than specified\n"); - goto BAILOUT; - } - if ((!line) || (!bdfIsPrefix(line, "ENDFONT"))) { - bdfError("missing 'ENDFONT'\n"); - goto BAILOUT; - } - if (numEncodedGlyphs == 0) - bdfWarning("No characters with valid encodings\n"); - - nencoding = (pFont->info.lastRow - pFont->info.firstRow + 1) * - (pFont->info.lastCol - pFont->info.firstCol + 1); - bitmapFont->encoding = - (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); - if (!bitmapFont->encoding) { - bdfError("Couldn't allocate ppCI (%d,%d)\n", - NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); - goto BAILOUT; - } - pFont->info.allExist = TRUE; - i = 0; - for (char_row = pFont->info.firstRow; - char_row <= pFont->info.lastRow; - char_row++) { - if (bdfEncoding[char_row] == (CharInfoPtr *) NULL) { - pFont->info.allExist = FALSE; - i += pFont->info.lastCol - pFont->info.firstCol + 1; - } else { - for (char_col = pFont->info.firstCol; - char_col <= pFont->info.lastCol; - char_col++) { - if (!bdfEncoding[char_row][char_col]) - pFont->info.allExist = FALSE; - else { - if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { - bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) - goto BAILOUT; - } - ACCESSENCODINGL(bitmapFont->encoding,i) = - bdfEncoding[char_row][char_col]; - } - i++; - } - } - } - for (i = 0; i < 256; i++) - if (bdfEncoding[i]) - xfree(bdfEncoding[i]); - return (TRUE); -BAILOUT: - for (i = 0; i < 256; i++) - if (bdfEncoding[i]) - xfree(bdfEncoding[i]); - /* bdfFreeFontBits will clean up the rest */ - return (FALSE); -} - -/***====================================================================***/ - -static Bool -bdfReadHeader(FontFilePtr file, bdfFileState *pState) -{ - unsigned char *line; - char namebuf[BDFLINELEN]; - unsigned char lineBuf[BDFLINELEN]; - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || sscanf((char *) line, "STARTFONT %s", namebuf) != 1 || - !bdfStrEqual(namebuf, "2.1")) { - bdfError("bad 'STARTFONT'\n"); - return (FALSE); - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || sscanf((char *) line, "FONT %[^\n]", pState->fontName) != 1) { - bdfError("bad 'FONT'\n"); - return (FALSE); - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || !bdfIsPrefix(line, "SIZE")) { - bdfError("missing 'SIZE'\n"); - return (FALSE); - } - if (sscanf((char *) line, "SIZE %f%d%d", &pState->pointSize, - &pState->resolution_x, &pState->resolution_y) != 3) { - bdfError("bad 'SIZE'\n"); - return (FALSE); - } - if (pState->pointSize < 1 || - pState->resolution_x < 1 || pState->resolution_y < 1) { - bdfError("SIZE values must be > 0\n"); - return (FALSE); - } - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || !bdfIsPrefix(line, "FONTBOUNDINGBOX")) { - bdfError("missing 'FONTBOUNDINGBOX'\n"); - return (FALSE); - } - return (TRUE); -} - -/***====================================================================***/ - -static Bool -bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) -{ - int nProps, props_left, - nextProp; - char *stringProps; - FontPropPtr props; - char namebuf[BDFLINELEN], - secondbuf[BDFLINELEN], - thirdbuf[BDFLINELEN]; - unsigned char *line; - unsigned char lineBuf[BDFLINELEN]; - BitmapFontPtr bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || !bdfIsPrefix(line, "STARTPROPERTIES")) { - bdfError("missing 'STARTPROPERTIES'\n"); - return (FALSE); - } - if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { - bdfError("bad 'STARTPROPERTIES'\n"); - return (FALSE); - } - pFont->info.isStringProp = NULL; - pFont->info.props = NULL; - pFont->info.nprops = 0; - - stringProps = (char *) xalloc((nProps + BDF_GENPROPS) * sizeof(char)); - pFont->info.isStringProp = stringProps; - if (stringProps == NULL) { - bdfError("Couldn't allocate stringProps (%d*%d)\n", - (nProps + BDF_GENPROPS), sizeof(Bool)); - goto BAILOUT; - } - pFont->info.props = props = (FontPropPtr) xalloc((nProps + BDF_GENPROPS) * - sizeof(FontPropRec)); - if (props == NULL) { - bdfError("Couldn't allocate props (%d*%d)\n", nProps + BDF_GENPROPS, - sizeof(FontPropRec)); - goto BAILOUT; - } - bzero((char *)props, (nProps + BDF_GENPROPS) * sizeof(FontPropRec)); - - nextProp = 0; - props_left = nProps; - while (props_left-- > 0) { - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (line == NULL || bdfIsPrefix(line, "ENDPROPERTIES")) { - bdfError("\"STARTPROPERTIES %d\" followed by only %d properties\n", - nProps, nProps - props_left - 1); - goto BAILOUT; - } - while (*line && isspace(*line)) - line++; - - switch (sscanf((char *) line, "%s%s%s", namebuf, secondbuf, thirdbuf)) { - default: - bdfError("missing '%s' parameter value\n", namebuf); - goto BAILOUT; - - case 2: - /* - * Possibilites include: valid quoted string with no white space - * valid integer value invalid value - */ - if (secondbuf[0] == '"') { - stringProps[nextProp] = TRUE; - props[nextProp].value = - bdfGetPropertyValue((char *)line + strlen(namebuf) + 1); - if (!props[nextProp].value) - goto BAILOUT; - break; - } else if (bdfIsInteger(secondbuf)) { - stringProps[nextProp] = FALSE; - props[nextProp].value = atoi(secondbuf); - break; - } else { - bdfError("invalid '%s' parameter value\n", namebuf); - goto BAILOUT; - } - - case 3: - /* - * Possibilites include: valid quoted string with some white space - * invalid value (reject even if second string is integer) - */ - if (secondbuf[0] == '"') { - stringProps[nextProp] = TRUE; - props[nextProp].value = - bdfGetPropertyValue((char *)line + strlen(namebuf) + 1); - if (!props[nextProp].value) - goto BAILOUT; - break; - } else { - bdfError("invalid '%s' parameter value\n", namebuf); - goto BAILOUT; - } - } - props[nextProp].name = bdfForceMakeAtom(namebuf, NULL); - if (props[nextProp].name == None) { - bdfError("Empty property name.\n"); - goto BAILOUT; - } - if (!bdfSpecialProperty(pFont, &props[nextProp], - stringProps[nextProp], pState)) - nextProp++; - } - - line = bdfGetLine(file, lineBuf, BDFLINELEN); - if (!line || !bdfIsPrefix(line, "ENDPROPERTIES")) { - bdfError("missing 'ENDPROPERTIES'\n"); - goto BAILOUT; - } - if (!pState->haveFontAscent || !pState->haveFontDescent) { - bdfError("missing 'FONT_ASCENT' or 'FONT_DESCENT' properties\n"); - goto BAILOUT; - } - if (bitmapFont->bitmapExtra) { - bitmapFont->bitmapExtra->info.fontAscent = pFont->info.fontAscent; - bitmapFont->bitmapExtra->info.fontDescent = pFont->info.fontDescent; - } - if (!pState->pointSizeProp) { - props[nextProp].name = bdfForceMakeAtom("POINT_SIZE", NULL); - props[nextProp].value = (INT32) (pState->pointSize * 10.0); - stringProps[nextProp] = FALSE; - pState->pointSizeProp = &props[nextProp]; - nextProp++; - } - if (!pState->fontProp) { - props[nextProp].name = bdfForceMakeAtom("FONT", NULL); - props[nextProp].value = (INT32) bdfForceMakeAtom(pState->fontName, NULL); - stringProps[nextProp] = TRUE; - pState->fontProp = &props[nextProp]; - nextProp++; - } - if (!pState->weightProp) { - props[nextProp].name = bdfForceMakeAtom("WEIGHT", NULL); - props[nextProp].value = -1; /* computed later */ - stringProps[nextProp] = FALSE; - pState->weightProp = &props[nextProp]; - nextProp++; - } - if (!pState->resolutionProp && - pState->resolution_x == pState->resolution_y) { - props[nextProp].name = bdfForceMakeAtom("RESOLUTION", NULL); - props[nextProp].value = (INT32) ((pState->resolution_x * 100.0) / 72.27); - stringProps[nextProp] = FALSE; - pState->resolutionProp = &props[nextProp]; - nextProp++; - } - if (!pState->resolutionXProp) { - props[nextProp].name = bdfForceMakeAtom("RESOLUTION_X", NULL); - props[nextProp].value = (INT32) pState->resolution_x; - stringProps[nextProp] = FALSE; - pState->resolutionProp = &props[nextProp]; - nextProp++; - } - if (!pState->resolutionYProp) { - props[nextProp].name = bdfForceMakeAtom("RESOLUTION_Y", NULL); - props[nextProp].value = (INT32) pState->resolution_y; - stringProps[nextProp] = FALSE; - pState->resolutionProp = &props[nextProp]; - nextProp++; - } - if (!pState->xHeightProp) { - props[nextProp].name = bdfForceMakeAtom("X_HEIGHT", NULL); - props[nextProp].value = -1; /* computed later */ - stringProps[nextProp] = FALSE; - pState->xHeightProp = &props[nextProp]; - nextProp++; - } - if (!pState->quadWidthProp) { - props[nextProp].name = bdfForceMakeAtom("QUAD_WIDTH", NULL); - props[nextProp].value = -1; /* computed later */ - stringProps[nextProp] = FALSE; - pState->quadWidthProp = &props[nextProp]; - nextProp++; - } - pFont->info.nprops = nextProp; - return (TRUE); -BAILOUT: - if (pFont->info.isStringProp) { - xfree(pFont->info.isStringProp); - pFont->info.isStringProp = NULL; - } - if (pFont->info.props) { - xfree(pFont->info.props); - pFont->info.props = NULL; - } - while (line && bdfIsPrefix(line, "ENDPROPERTIES")) - line = bdfGetLine(file, lineBuf, BDFLINELEN); - return (FALSE); -} - -/***====================================================================***/ - -static void -bdfUnloadFont(FontPtr pFont) -{ - bdfFreeFontBits (pFont); - DestroyFontRec(pFont); -} - -int -bdfReadFont(FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan) -{ - bdfFileState state; - xCharInfo *min, - *max; - BitmapFontPtr bitmapFont; - - pFont->fontPrivate = 0; - - bzero(&state, sizeof(bdfFileState)); - bdfFileLineNum = 0; - - if (!bdfReadHeader(file, &state)) - goto BAILOUT; - - bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); - if (!bitmapFont) { - bdfError("Couldn't allocate bitmapFontRec (%d)\n", sizeof(BitmapFontRec)); - goto BAILOUT; - } - bzero((char *)bitmapFont, sizeof(BitmapFontRec)); - - pFont->fontPrivate = (pointer) bitmapFont; - bitmapFont->metrics = 0; - bitmapFont->ink_metrics = 0; - bitmapFont->bitmaps = 0; - bitmapFont->encoding = 0; - bitmapFont->pDefault = NULL; - - bitmapFont->bitmapExtra = (BitmapExtraPtr) xalloc(sizeof(BitmapExtraRec)); - if (!bitmapFont->bitmapExtra) { - bdfError("Couldn't allocate bitmapExtra (%d)\n", sizeof(BitmapExtraRec)); - goto BAILOUT; - } - bzero((char *)bitmapFont->bitmapExtra, sizeof(BitmapExtraRec)); - - bitmapFont->bitmapExtra->glyphNames = 0; - bitmapFont->bitmapExtra->sWidths = 0; - - if (!bdfReadProperties(file, pFont, &state)) - goto BAILOUT; - - if (!bdfReadCharacters(file, pFont, &state, bit, byte, glyph, scan)) - goto BAILOUT; - - if (state.haveDefaultCh) { - unsigned int r, c, cols; - - r = pFont->info.defaultCh >> 8; - c = pFont->info.defaultCh & 0xFF; - if (pFont->info.firstRow <= r && r <= pFont->info.lastRow && - pFont->info.firstCol <= c && c <= pFont->info.lastCol) { - cols = pFont->info.lastCol - pFont->info.firstCol + 1; - r = r - pFont->info.firstRow; - c = c - pFont->info.firstCol; - bitmapFont->pDefault = ACCESSENCODING(bitmapFont->encoding, - r * cols + c); - } - } - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - pFont->info.anamorphic = FALSE; - pFont->info.cachable = TRUE; - bitmapComputeFontBounds(pFont); - if (FontCouldBeTerminal(&pFont->info)) { - bdfPadToTerminal(pFont); - bitmapComputeFontBounds(pFont); - } - FontComputeInfoAccelerators(&pFont->info); - if (bitmapFont->bitmapExtra) - FontComputeInfoAccelerators(&bitmapFont->bitmapExtra->info); - if (pFont->info.constantMetrics) { - if (!bitmapAddInkMetrics(pFont)) { - bdfError("Failed to add bitmap ink metrics\n"); - goto BAILOUT; - } - } - if (bitmapFont->bitmapExtra) - bitmapFont->bitmapExtra->info.inkMetrics = pFont->info.inkMetrics; - - bitmapComputeFontInkBounds(pFont); -/* ComputeFontAccelerators (pFont); */ - - /* generate properties */ - min = &pFont->info.ink_minbounds; - max = &pFont->info.ink_maxbounds; - if (state.xHeightProp && (state.xHeightProp->value == -1)) - state.xHeightProp->value = state.exHeight ? - state.exHeight : min->ascent; - - if (state.quadWidthProp && (state.quadWidthProp->value == -1)) - state.quadWidthProp->value = state.digitCount ? - (INT32) (state.digitWidths / state.digitCount) : - (min->characterWidth + max->characterWidth) / 2; - - if (state.weightProp && (state.weightProp->value == -1)) - state.weightProp->value = bitmapComputeWeight(pFont); - - pFont->get_glyphs = bitmapGetGlyphs; - pFont->get_metrics = bitmapGetMetrics; - pFont->unload_font = bdfUnloadFont; - pFont->unload_glyphs = NULL; - return Successful; -BAILOUT: - if (pFont->fontPrivate) - bdfFreeFontBits (pFont); - return AllocError; -} - -int -bdfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) -{ - FontRec font; - int ret; - - bzero(&font, sizeof (FontRec)); - - ret = bdfReadFont(&font, file, MSBFirst, LSBFirst, 1, 1); - if (ret == Successful) { - *pFontInfo = font.info; - font.info.props = 0; - font.info.isStringProp = 0; - font.info.nprops = 0; - bdfFreeFontBits (&font); - } - return ret; -} - -static Bool -bdfPadToTerminal(FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - BitmapExtraPtr bitmapExtra; - int i; - int new_size; - CharInfoRec new; - int w, - h; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - - bzero(&new, sizeof(CharInfoRec)); - new.metrics.ascent = pFont->info.fontAscent; - new.metrics.descent = pFont->info.fontDescent; - new.metrics.leftSideBearing = 0; - new.metrics.rightSideBearing = pFont->info.minbounds.characterWidth; - new.metrics.characterWidth = new.metrics.rightSideBearing; - new_size = BYTES_FOR_GLYPH(&new, pFont->glyph); - - for (i = 0; i < bitmapFont->num_chars; i++) { - new.bits = (char *) xalloc(new_size); - if (!new.bits) { - bdfError("Couldn't allocate bits (%d)\n", new_size); - return FALSE; - } - FontCharReshape(pFont, &bitmapFont->metrics[i], &new); - new.metrics.attributes = bitmapFont->metrics[i].metrics.attributes; - xfree(bitmapFont->metrics[i].bits); - bitmapFont->metrics[i] = new; - } - bitmapExtra = bitmapFont->bitmapExtra; - if (bitmapExtra) { - w = GLYPHWIDTHPIXELS(&new); - h = GLYPHHEIGHTPIXELS(&new); - for (i = 0; i < GLYPHPADOPTIONS; i++) - bitmapExtra->bitmapsSizes[i] = bitmapFont->num_chars * - (BYTES_PER_ROW(w, 1 << i) * h); - } - return TRUE; -} diff --git a/nx-X11/lib/font/bitmap/bdfutils.c b/nx-X11/lib/font/bitmap/bdfutils.c deleted file mode 100644 index a0c5ae949..000000000 --- a/nx-X11/lib/font/bitmap/bdfutils.c +++ /dev/null @@ -1,340 +0,0 @@ -/* $Xorg: bdfutils.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ -/************************************************************************ -Copyright 1989 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. - -************************************************************************/ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.10 2001/12/14 19:56:45 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifndef FONTMODULE -#include -#include -#include -#endif - -#include -#include -/* use bitmap structure */ -#include -#include - -int bdfFileLineNum; - -/***====================================================================***/ - -void -bdfError(char* message, ...) -{ - va_list args; - - va_start (args, message); - fprintf(stderr, "BDF Error on line %d: ", bdfFileLineNum); - vfprintf(stderr, message, args); - va_end (args); -} - -/***====================================================================***/ - -void -bdfWarning(char *message, ...) -{ - va_list args; - - va_start (args, message); - fprintf(stderr, "BDF Warning on line %d: ", bdfFileLineNum); - vfprintf(stderr, message, args); - va_end (args); -} - -/* - * read the next (non-comment) line and keep a count for error messages. - * Returns buf, or NULL if EOF. - */ - -unsigned char * -bdfGetLine(FontFilePtr file, unsigned char *buf, int len) -{ - int c; - unsigned char *b; - - for (;;) { - b = buf; - while ((c = FontFileGetc(file)) != FontFileEOF) { - if (c == '\r') - continue; - if (c == '\n') { - bdfFileLineNum++; - break; - } - if (b - buf >= (len - 1)) - break; - *b++ = c; - } - *b = '\0'; - if (c == FontFileEOF) - return NULL; - if (b != buf && !bdfIsPrefix(buf, "COMMENT")) - break; - } - return buf; -} - -/***====================================================================***/ - -Atom -bdfForceMakeAtom(char *str, int *size) -{ - register int len = strlen(str); - Atom the_atom; - - if (size != NULL) - *size += len + 1; - the_atom = MakeAtom(str, len, TRUE); - if (the_atom == None) - bdfError("Atom allocation failed\n"); - return the_atom; -} - -/***====================================================================***/ - -/* - * Handle quoted strings. - */ - -Atom -bdfGetPropertyValue(char *s) -{ - register char *p, - *pp; - char *orig_s = s; - Atom atom; - - /* strip leading white space */ - while (*s && (*s == ' ' || *s == '\t')) - s++; - if (*s == 0) { - return bdfForceMakeAtom(s, NULL); - } - if (*s != '"') { - pp = s; - /* no white space in value */ - for (pp = s; *pp; pp++) - if (*pp == ' ' || *pp == '\t' || *pp == '\015' || *pp == '\n') { - *pp = 0; - break; - } - return bdfForceMakeAtom(s, NULL); - } - /* quoted string: strip outer quotes and undouble inner quotes */ - s++; - pp = p = (char *) xalloc((unsigned) strlen(s) + 1); - if (pp == NULL) { - bdfError("Couldn't allocate property value string (%d)\n", strlen(s) + 1); - return None; - } - while (*s) { - if (*s == '"') { - if (*(s + 1) != '"') { - *p++ = 0; - atom = bdfForceMakeAtom(pp, NULL); - xfree(pp); - return atom; - } else { - s++; - } - } - *p++ = *s++; - } - xfree (pp); - bdfError("unterminated quoted string property: %s\n", (pointer) orig_s); - return None; -} - -/***====================================================================***/ - -/* - * return TRUE if string is a valid integer - */ -int -bdfIsInteger(char *str) -{ - char c; - - c = *str++; - if (!(isdigit(c) || c == '-' || c == '+')) - return (FALSE); - - while ((c = *str++)) - if (!isdigit(c)) - return (FALSE); - - return (TRUE); -} - -/***====================================================================***/ - -/* - * make a byte from the first two hex characters in glyph picture - */ - -unsigned char -bdfHexByte(unsigned char *s) -{ - unsigned char b = 0; - register char c; - int i; - - for (i = 2; i; i--) { - c = *s++; - if ((c >= '0') && (c <= '9')) - b = (b << 4) + (c - '0'); - else if ((c >= 'A') && (c <= 'F')) - b = (b << 4) + 10 + (c - 'A'); - else if ((c >= 'a') && (c <= 'f')) - b = (b << 4) + 10 + (c - 'a'); - else - bdfError("bad hex char '%c'", c); - } - return b; -} - -/***====================================================================***/ - -/* - * check for known special property values - */ - -static char *SpecialAtoms[] = { - "FONT_ASCENT", -#define BDF_FONT_ASCENT 0 - "FONT_DESCENT", -#define BDF_FONT_DESCENT 1 - "DEFAULT_CHAR", -#define BDF_DEFAULT_CHAR 2 - "POINT_SIZE", -#define BDF_POINT_SIZE 3 - "RESOLUTION", -#define BDF_RESOLUTION 4 - "X_HEIGHT", -#define BDF_X_HEIGHT 5 - "WEIGHT", -#define BDF_WEIGHT 6 - "QUAD_WIDTH", -#define BDF_QUAD_WIDTH 7 - "FONT", -#define BDF_FONT 8 - "RESOLUTION_X", -#define BDF_RESOLUTION_X 9 - "RESOLUTION_Y", -#define BDF_RESOLUTION_Y 10 - 0, -}; - -Bool -bdfSpecialProperty(FontPtr pFont, FontPropPtr prop, - char isString, bdfFileState *bdfState) -{ - char **special; - char *name; - - name = NameForAtom(prop->name); - for (special = SpecialAtoms; *special; special++) - if (!strcmp(name, *special)) - break; - - switch (special - SpecialAtoms) { - case BDF_FONT_ASCENT: - if (!isString) { - pFont->info.fontAscent = prop->value; - bdfState->haveFontAscent = TRUE; - } - return TRUE; - case BDF_FONT_DESCENT: - if (!isString) { - pFont->info.fontDescent = prop->value; - bdfState->haveFontDescent = TRUE; - } - return TRUE; - case BDF_DEFAULT_CHAR: - if (!isString) { - pFont->info.defaultCh = prop->value; - bdfState->haveDefaultCh = TRUE; - } - return TRUE; - case BDF_POINT_SIZE: - bdfState->pointSizeProp = prop; - return FALSE; - case BDF_RESOLUTION: - bdfState->resolutionProp = prop; - return FALSE; - case BDF_X_HEIGHT: - bdfState->xHeightProp = prop; - return FALSE; - case BDF_WEIGHT: - bdfState->weightProp = prop; - return FALSE; - case BDF_QUAD_WIDTH: - bdfState->quadWidthProp = prop; - return FALSE; - case BDF_FONT: - bdfState->fontProp = prop; - return FALSE; - case BDF_RESOLUTION_X: - bdfState->resolutionXProp = prop; - return FALSE; - case BDF_RESOLUTION_Y: - bdfState->resolutionYProp = prop; - return FALSE; - default: - return FALSE; - } -} diff --git a/nx-X11/lib/font/bitmap/bitmap.c b/nx-X11/lib/font/bitmap/bitmap.c deleted file mode 100644 index d238f4d30..000000000 --- a/nx-X11/lib/font/bitmap/bitmap.c +++ /dev/null @@ -1,160 +0,0 @@ -/* $Xorg: bitmap.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bitmap.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -int -bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - BitmapFontPtr bitmapFont; - unsigned int firstCol; - register unsigned int numCols; - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr **encoding; - CharInfoPtr pDefault; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - encoding = bitmapFont->encoding; - pDefault = bitmapFont->pDefault; - firstCol = pFont->info.firstCol; - numCols = pFont->info.lastCol - firstCol + 1; - glyphsBase = glyphs; - switch (charEncoding) { - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - if (pFont->info.allExist && pDefault) { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = ACCESSENCODING(encoding,c); - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols && (pci = ACCESSENCODING(encoding,c))) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - case Linear16Bit: - if (pFont->info.allExist && pDefault) { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = ACCESSENCODING(encoding,c); - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols && (pci = ACCESSENCODING(encoding,c))) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++) - firstCol; - if (r < numRows && c < numCols && - (pci = ACCESSENCODING(encoding, r * numCols + c))) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; -} - -static CharInfoRec nonExistantChar; - -int -bitmapGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - int ret; - xCharInfo *ink_metrics; - CharInfoPtr metrics; - BitmapFontPtr bitmapFont; - CharInfoPtr oldDefault; - int i; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - oldDefault = bitmapFont->pDefault; - bitmapFont->pDefault = &nonExistantChar; - ret = bitmapGetGlyphs(pFont, count, chars, charEncoding, glyphCount, (CharInfoPtr *) glyphs); - if (ret == Successful) { - if (bitmapFont->ink_metrics) { - metrics = bitmapFont->metrics; - ink_metrics = bitmapFont->ink_metrics; - for (i = 0; i < *glyphCount; i++) { - if (glyphs[i] != (xCharInfo *) & nonExistantChar) - glyphs[i] = ink_metrics + (((CharInfoPtr) glyphs[i]) - metrics); - } - } - } - bitmapFont->pDefault = oldDefault; - return ret; -} diff --git a/nx-X11/lib/font/bitmap/bitmapfunc.c b/nx-X11/lib/font/bitmap/bitmapfunc.c deleted file mode 100644 index e6187e5ee..000000000 --- a/nx-X11/lib/font/bitmap/bitmapfunc.c +++ /dev/null @@ -1,240 +0,0 @@ -/* $Xorg: bitmapfunc.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.17 2002/09/19 13:21:58 tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* - * Translate monolithic #defines to modular definitions - */ - -#ifdef PCFFORMAT -#define XFONT_PCFFORMAT 1 -#endif - -#ifdef SNFFORMAT -#define XFONT_SNFFORMAT 1 -#endif - -#ifdef BDFFORMAT -#define XFONT_BDFFORMAT 1 -#endif - -#include -#include -#include -#include -#include -#include "snfstr.h" - -typedef struct _BitmapFileFunctions { - int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */, - int /* bit */, int /* byte */, - int /* glyph */, int /* scan */); - int (*ReadInfo) ( FontInfoPtr /* pFontInfo */, - FontFilePtr /* file */ ); -} BitmapFileFunctionsRec, *BitmapFileFunctionsPtr; - - -/* - * the readers[] and renderers[] arrays must be in the same order, - * and also in the same order as scale[] and find_scale[] in bitscale.c - * - */ -static BitmapFileFunctionsRec readers[] = { -#if XFONT_PCFFORMAT - { pcfReadFont, pcfReadFontInfo} , - { pcfReadFont, pcfReadFontInfo} , -#ifdef X_GZIP_FONT_COMPRESSION - { pcfReadFont, pcfReadFontInfo} , -#endif -#endif -#if XFONT_SNFFORMAT - { snfReadFont, snfReadFontInfo}, - { snfReadFont, snfReadFontInfo}, -#ifdef X_GZIP_FONT_COMPRESSION - { snfReadFont, snfReadFontInfo} , -#endif -#endif -#if XFONT_BDFFORMAT - { bdfReadFont, bdfReadFontInfo} , - { bdfReadFont, bdfReadFontInfo} , -#ifdef X_GZIP_FONT_COMPRESSION - { bdfReadFont, bdfReadFontInfo} , -#endif -#endif -#if XFONT_PCFFORMAT - { pmfReadFont, pcfReadFontInfo} , -#endif -}; - - -#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING) - -static FontRendererRec renderers[] = { -#if XFONT_PCFFORMAT - { ".pcf", 4, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, - { ".pcf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#ifdef X_GZIP_FONT_COMPRESSION - { ".pcf.gz", 7, - BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#endif -#endif -#if XFONT_SNFFORMAT - { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, - { ".snf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#ifdef X_GZIP_FONT_COMPRESSION - { ".snf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#endif -#endif -#if XFONT_BDFFORMAT - { ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, - { ".bdf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#ifdef X_GZIP_FONT_COMPRESSION - { ".bdf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#endif -#endif -#if XFONT_PCFFORMAT - { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES } -#endif -}; - -int -BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, - FontEntryPtr entry, char *fileName, - fsBitmapFormat format, fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - FontFilePtr file; - FontPtr pFont; - int i; - int ret; - int bit, - byte, - glyph, - scan, - image; - - i = BitmapGetRenderIndex(entry->u.bitmap.renderer); - file = FontFileOpen (fileName); - if (!file) - return BadFontName; - if (!(pFont = CreateFontRec())) { - fprintf(stderr, "Error: Couldn't allocate pFont (%ld)\n", - (unsigned long)sizeof(FontRec)); - FontFileClose (file); - return AllocError; - } - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - ret = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - - /* Fill in font record. Data format filled in by reader. */ - pFont->refcnt = 0; - - ret = (*readers[i].ReadFont) (pFont, file, bit, byte, glyph, scan); - - FontFileClose (file); - if (ret != Successful) { - xfree(pFont); - } else { - *ppFont = pFont; - } - return ret; -} - -int -BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, - FontEntryPtr entry, char *fileName) -{ - FontFilePtr file; - int i; - int ret; - FontRendererPtr renderer; - - renderer = FontFileMatchRenderer (fileName); - if (!renderer) - return BadFontName; - i = BitmapGetRenderIndex(renderer); - file = FontFileOpen (fileName); - if (!file) - return BadFontName; - ret = (*readers[i].ReadInfo) (pFontInfo, file); - FontFileClose (file); - return ret; -} - -#define numRenderers (sizeof renderers / sizeof renderers[0]) - -void -BitmapRegisterFontFileFunctions (void) -{ - int i; - - for (i = 0; i < numRenderers; i++) - FontFileRegisterRenderer (&renderers[i]); -} - -/* - * compute offset into renderers array - used to find the font reader, - * the font info reader, and the bitmap scaling routine. All users - * of this routine must be kept in step with the renderer array. - */ -int -BitmapGetRenderIndex(FontRendererPtr renderer) -{ - return renderer - renderers; -} diff --git a/nx-X11/lib/font/bitmap/bitmaputil.c b/nx-X11/lib/font/bitmap/bitmaputil.c deleted file mode 100644 index 3487f7f92..000000000 --- a/nx-X11/lib/font/bitmap/bitmaputil.c +++ /dev/null @@ -1,232 +0,0 @@ -/* $Xorg: bitmaputil.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.10 2002/09/24 20:52:48 tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#ifndef MAXSHORT -#define MAXSHORT 32767 -#endif - -#ifndef MINSHORT -#define MINSHORT -32768 -#endif - -static xCharInfo initMinMetrics = { -MAXSHORT, MAXSHORT, MAXSHORT, MAXSHORT, MAXSHORT, 0xFFFF}; -static xCharInfo initMaxMetrics = { -MINSHORT, MINSHORT, MINSHORT, MINSHORT, MINSHORT, 0x0000}; - -#define MINMAX(field,ci) \ - if (minbounds->field > (ci)->field) \ - minbounds->field = (ci)->field; \ - if (maxbounds->field < (ci)->field) \ - maxbounds->field = (ci)->field; - -#define COMPUTE_MINMAX(ci) \ - if ((ci)->ascent || (ci)->descent || \ - (ci)->leftSideBearing || (ci)->rightSideBearing || \ - (ci)->characterWidth) \ - { \ - MINMAX(ascent, (ci)); \ - MINMAX(descent, (ci)); \ - MINMAX(leftSideBearing, (ci)); \ - MINMAX(rightSideBearing, (ci)); \ - MINMAX(characterWidth, (ci)); \ - } - -void -bitmapComputeFontBounds(FontPtr pFont) -{ - BitmapFontPtr bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - int nchars; - int r, - c; - CharInfoPtr ci; - int maxOverlap; - int overlap; - xCharInfo *minbounds, - *maxbounds; - int i; - int numneg = 0, numpos = 0; - - if (bitmapFont->bitmapExtra) { - minbounds = &bitmapFont->bitmapExtra->info.minbounds; - maxbounds = &bitmapFont->bitmapExtra->info.maxbounds; - } else { - minbounds = &pFont->info.minbounds; - maxbounds = &pFont->info.maxbounds; - } - *minbounds = initMinMetrics; - *maxbounds = initMaxMetrics; - maxOverlap = MINSHORT; - nchars = bitmapFont->num_chars; - for (i = 0, ci = bitmapFont->metrics; i < nchars; i++, ci++) { - COMPUTE_MINMAX(&ci->metrics); - if (ci->metrics.characterWidth < 0) - numneg++; - else - numpos++; - minbounds->attributes &= ci->metrics.attributes; - maxbounds->attributes |= ci->metrics.attributes; - overlap = ci->metrics.rightSideBearing - ci->metrics.characterWidth; - if (maxOverlap < overlap) - maxOverlap = overlap; - } - if (bitmapFont->bitmapExtra) { - if (numneg > numpos) - bitmapFont->bitmapExtra->info.drawDirection = RightToLeft; - else - bitmapFont->bitmapExtra->info.drawDirection = LeftToRight; - bitmapFont->bitmapExtra->info.maxOverlap = maxOverlap; - minbounds = &pFont->info.minbounds; - maxbounds = &pFont->info.maxbounds; - *minbounds = initMinMetrics; - *maxbounds = initMaxMetrics; - i = 0; - maxOverlap = MINSHORT; - for (r = pFont->info.firstRow; r <= pFont->info.lastRow; r++) { - for (c = pFont->info.firstCol; c <= pFont->info.lastCol; c++) { - ci = ACCESSENCODING(bitmapFont->encoding, i); - if (ci) { - COMPUTE_MINMAX(&ci->metrics); - if (ci->metrics.characterWidth < 0) - numneg++; - else - numpos++; - minbounds->attributes &= ci->metrics.attributes; - maxbounds->attributes |= ci->metrics.attributes; - overlap = ci->metrics.rightSideBearing - - ci->metrics.characterWidth; - if (maxOverlap < overlap) - maxOverlap = overlap; - } - i++; - } - } - } - if (numneg > numpos) - pFont->info.drawDirection = RightToLeft; - else - pFont->info.drawDirection = LeftToRight; - pFont->info.maxOverlap = maxOverlap; -} - -void -bitmapComputeFontInkBounds(FontPtr pFont) -{ - BitmapFontPtr bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - int nchars; - int r, - c; - CharInfoPtr cit; - xCharInfo *ci; - int offset; - xCharInfo *minbounds, - *maxbounds; - int i; - - if (!bitmapFont->ink_metrics) { - if (bitmapFont->bitmapExtra) { - bitmapFont->bitmapExtra->info.ink_minbounds = bitmapFont->bitmapExtra->info.minbounds; - bitmapFont->bitmapExtra->info.ink_maxbounds = bitmapFont->bitmapExtra->info.maxbounds; - } - pFont->info.ink_minbounds = pFont->info.minbounds; - pFont->info.ink_maxbounds = pFont->info.maxbounds; - } else { - if (bitmapFont->bitmapExtra) { - minbounds = &bitmapFont->bitmapExtra->info.ink_minbounds; - maxbounds = &bitmapFont->bitmapExtra->info.ink_maxbounds; - } else { - minbounds = &pFont->info.ink_minbounds; - maxbounds = &pFont->info.ink_maxbounds; - } - *minbounds = initMinMetrics; - *maxbounds = initMaxMetrics; - nchars = bitmapFont->num_chars; - for (i = 0, ci = bitmapFont->ink_metrics; i < nchars; i++, ci++) { - COMPUTE_MINMAX(ci); - minbounds->attributes &= ci->attributes; - maxbounds->attributes |= ci->attributes; - } - if (bitmapFont->bitmapExtra) { - minbounds = &pFont->info.ink_minbounds; - maxbounds = &pFont->info.ink_maxbounds; - *minbounds = initMinMetrics; - *maxbounds = initMaxMetrics; - i=0; - for (r = pFont->info.firstRow; r <= pFont->info.lastRow; r++) { - for (c = pFont->info.firstCol; c <= pFont->info.lastCol; c++) { - cit = ACCESSENCODING(bitmapFont->encoding, i); - if (cit) { - offset = cit - bitmapFont->metrics; - ci = &bitmapFont->ink_metrics[offset]; - COMPUTE_MINMAX(ci); - minbounds->attributes &= ci->attributes; - maxbounds->attributes |= ci->attributes; - } - i++; - } - } - } - } -} - -Bool -bitmapAddInkMetrics(FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - int i; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - bitmapFont->ink_metrics = (xCharInfo *) xalloc(bitmapFont->num_chars * sizeof(xCharInfo)); - if (!bitmapFont->ink_metrics) { - fprintf(stderr, "Error: Couldn't allocate ink_metrics (%d*%ld)\n", - bitmapFont->num_chars, (unsigned long)sizeof(xCharInfo)); - return FALSE; - } - for (i = 0; i < bitmapFont->num_chars; i++) - FontCharInkMetrics(pFont, &bitmapFont->metrics[i], &bitmapFont->ink_metrics[i]); - pFont->info.inkMetrics = TRUE; - return TRUE; -} - -/* ARGSUSED */ -int -bitmapComputeWeight(FontPtr pFont) -{ - return 10; -} diff --git a/nx-X11/lib/font/bitmap/bitscale.c b/nx-X11/lib/font/bitmap/bitscale.c deleted file mode 100644 index 8f7247eaf..000000000 --- a/nx-X11/lib/font/bitmap/bitscale.c +++ /dev/null @@ -1,1978 +0,0 @@ -/* $Xorg: bitscale.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ -/* - -Copyright 1991, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.29tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* - * Translate monolithic #defines to modular definitions - */ - -#ifdef PCFFORMAT -#define XFONT_PCFFORMAT 1 -#endif - -#ifdef SNFFORMAT -#define XFONT_SNFFORMAT 1 -#endif - -#ifdef BDFFORMAT -#define XFONT_BDFFORMAT 1 -#endif - -#include -#include -#include -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include -#undef _XOPEN_SOURCE -#endif -#endif - -#ifndef MAX -#define MAX(a,b) (((a)>(b)) ? a : b) -#endif - -/* Should get this from elsewhere */ -extern unsigned long serverGeneration; - -static void bitmapUnloadScalable (FontPtr pFont); -static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci, - CharInfoPtr pci, double *inv_xform, - double widthMult, double heightMult ); -static FontPtr BitmapScaleBitmaps(FontPtr pf, FontPtr opf, - double widthMult, double heightMult, - FontScalablePtr vals); -static FontPtr PrinterScaleBitmaps(FontPtr pf, FontPtr opf, - double widthMult, double heightMult, - FontScalablePtr vals); - -enum scaleType { - atom, truncate_atom, pixel_size, point_size, resolution_x, - resolution_y, average_width, scaledX, scaledY, unscaled, fontname, - raw_ascent, raw_descent, raw_pixelsize, raw_pointsize, - raw_average_width, uncomputed -}; - -typedef struct _fontProp { - char *name; - Atom atom; - enum scaleType type; -} fontProp; - -typedef FontPtr (*ScaleFunc) ( FontPtr /* pf */, - FontPtr /* opf */, - double /* widthMult */, - double /* heightMult */, - FontScalablePtr /* vals */); - -/* These next two arrays must be kept in step with the renderer array */ -ScaleFunc scale[] = -{ -#if XFONT_PCFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -#ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -#endif -#endif -#if XFONT_SNFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -#ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -#endif -#endif -#if XFONT_BDFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -#ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -#endif -#endif -#if XFONT_PCFFORMAT - PrinterScaleBitmaps, -#endif -}; - -static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, - FontEntryPtr entry, - FontScalablePtr vals, - FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep ); -static FontEntryPtr FindPmfToScale ( FontPathElementPtr fpe, - FontEntryPtr entry, - FontScalablePtr vals, - FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep ); - -typedef FontEntryPtr (*FindToScale) (FontPathElementPtr fpe, - FontEntryPtr entry, - FontScalablePtr vals, - FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep); -FindToScale find_scale[] = -{ -#if XFONT_PCFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_SNFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_BDFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_PCFFORMAT - FindPmfToScale, -#endif -}; - -static unsigned long bitscaleGeneration = 0; /* initialization flag */ - -static fontProp fontNamePropTable[] = { - { "FOUNDRY", 0, atom }, - { "FAMILY_NAME", 0, atom }, - { "WEIGHT_NAME", 0, atom }, - { "SLANT", 0, atom }, - { "SETWIDTH_NAME", 0, atom }, - { "ADD_STYLE_NAME", 0, atom }, - { "PIXEL_SIZE", 0, pixel_size }, - { "POINT_SIZE", 0, point_size }, - { "RESOLUTION_X", 0, resolution_x }, - { "RESOLUTION_Y", 0, resolution_y }, - { "SPACING", 0, atom }, - { "AVERAGE_WIDTH", 0, average_width }, - { "CHARSET_REGISTRY", 0, atom }, - { "CHARSET_ENCODING", 0, truncate_atom }, - { "FONT", 0, fontname }, - { "RAW_ASCENT", 0, raw_ascent }, - { "RAW_DESCENT", 0, raw_descent }, - { "RAW_PIXEL_SIZE", 0, raw_pixelsize }, - { "RAW_POINT_SIZE", 0, raw_pointsize }, - { "RAW_AVERAGE_WIDTH", 0, raw_average_width } -}; - -#define TRANSFORM_POINT(matrix, x, y, dest) \ - ((dest)[0] = (matrix)[0] * (x) + (matrix)[2] * (y), \ - (dest)[1] = (matrix)[1] * (x) + (matrix)[3] * (y)) - -#define CHECK_EXTENT(lsb, rsb, desc, asc, data) \ - ((lsb) > (data)[0] ? (lsb) = (data)[0] : 0 , \ - (rsb) < (data)[0] ? (rsb) = (data)[0] : 0, \ - (-desc) > (data)[1] ? (desc) = -(data)[1] : 0 , \ - (asc) < (data)[1] ? (asc) = (data)[1] : 0) - -#define NPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) - -/* Warning: order of the next two tables is critically interdependent. - Location of "unscaled" properties at the end of fontPropTable[] - is important. */ - -static fontProp fontPropTable[] = { - { "MIN_SPACE", 0, scaledX }, - { "NORM_SPACE", 0, scaledX }, - { "MAX_SPACE", 0, scaledX }, - { "END_SPACE", 0, scaledX }, - { "AVG_CAPITAL_WIDTH", 0, scaledX }, - { "AVG_LOWERCASE_WIDTH", 0, scaledX }, - { "QUAD_WIDTH", 0, scaledX }, - { "FIGURE_WIDTH", 0, scaledX }, - { "SUPERSCRIPT_X", 0, scaledX }, - { "SUPERSCRIPT_Y", 0, scaledY }, - { "SUBSCRIPT_X", 0, scaledX }, - { "SUBSCRIPT_Y", 0, scaledY }, - { "SUPERSCRIPT_SIZE", 0, scaledY }, - { "SUBSCRIPT_SIZE", 0, scaledY }, - { "SMALL_CAP_SIZE", 0, scaledY }, - { "UNDERLINE_POSITION", 0, scaledY }, - { "UNDERLINE_THICKNESS", 0, scaledY }, - { "STRIKEOUT_ASCENT", 0, scaledY }, - { "STRIKEOUT_DESCENT", 0, scaledY }, - { "CAP_HEIGHT", 0, scaledY }, - { "X_HEIGHT", 0, scaledY }, - { "ITALIC_ANGLE", 0, unscaled }, - { "RELATIVE_SETWIDTH", 0, unscaled }, - { "RELATIVE_WEIGHT", 0, unscaled }, - { "WEIGHT", 0, unscaled }, - { "DESTINATION", 0, unscaled }, - { "PCL_FONT_NAME", 0, unscaled }, - { "_ADOBE_POSTSCRIPT_FONTNAME", 0, unscaled } -}; - -/* sleazy way to shut up the compiler */ -#define zerohack (enum scaleType)0 - -static fontProp rawFontPropTable[] = { - { "RAW_MIN_SPACE", 0, }, - { "RAW_NORM_SPACE", 0, }, - { "RAW_MAX_SPACE", 0, }, - { "RAW_END_SPACE", 0, }, - { "RAW_AVG_CAPITAL_WIDTH", 0, }, - { "RAW_AVG_LOWERCASE_WIDTH", 0, }, - { "RAW_QUAD_WIDTH", 0, }, - { "RAW_FIGURE_WIDTH", 0, }, - { "RAW_SUPERSCRIPT_X", 0, }, - { "RAW_SUPERSCRIPT_Y", 0, }, - { "RAW_SUBSCRIPT_X", 0, }, - { "RAW_SUBSCRIPT_Y", 0, }, - { "RAW_SUPERSCRIPT_SIZE", 0, }, - { "RAW_SUBSCRIPT_SIZE", 0, }, - { "RAW_SMALL_CAP_SIZE", 0, }, - { "RAW_UNDERLINE_POSITION", 0, }, - { "RAW_UNDERLINE_THICKNESS", 0, }, - { "RAW_STRIKEOUT_ASCENT", 0, }, - { "RAW_STRIKEOUT_DESCENT", 0, }, - { "RAW_CAP_HEIGHT", 0, }, - { "RAW_X_HEIGHT", 0, } -}; - -static void -initFontPropTable(void) -{ - int i; - fontProp *t; - - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - - i = sizeof(fontPropTable) / sizeof(fontProp); - for (t = fontPropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - - i = sizeof(rawFontPropTable) / sizeof(fontProp); - for (t = rawFontPropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); -} - -#if 0 -static FontEntryPtr -GetScalableEntry (FontPathElementPtr fpe, FontNamePtr name) -{ - FontDirectoryPtr dir; - - dir = (FontDirectoryPtr) fpe->private; - return FontFileFindNameInDir (&dir->scalable, name); -} -#endif - -static double -get_matrix_horizontal_component(double *matrix) -{ - return hypot(matrix[0], matrix[1]); -} - -static double -get_matrix_vertical_component(double *matrix) -{ - return hypot(matrix[2], matrix[3]); -} - - -static Bool -ComputeScaleFactors(FontScalablePtr from, FontScalablePtr to, - double *dx, double *dy, double *sdx, double *sdy, - double *rescale_x) -{ - double srcpixelset, destpixelset, srcpixel, destpixel; - - srcpixelset = get_matrix_horizontal_component(from->pixel_matrix); - destpixelset = get_matrix_horizontal_component(to->pixel_matrix); - srcpixel = get_matrix_vertical_component(from->pixel_matrix); - destpixel = get_matrix_vertical_component(to->pixel_matrix); - - if (srcpixelset >= EPS) - { - *dx = destpixelset / srcpixelset; - *sdx = 1000.0 / srcpixelset; - } - else - *sdx = *dx = 0; - - *rescale_x = 1.0; - - /* If client specified a width, it overrides setsize; in this - context, we interpret width as applying to the font before any - rotation, even though that's not what is ultimately returned in - the width field. */ - if (from->width > 0 && to->width > 0 && fabs(*dx) > EPS) - { - double rescale = (double)to->width / (double)from->width; - - /* If the client specified a transformation matrix, the rescaling - for width does *not* override the setsize. Instead, just check - for consistency between the setsize from the matrix and the - setsize that would result from rescaling according to the width. - This assumes (perhaps naively) that the width is correctly - reported in the name. As an interesting side effect, this test - may result in choosing a different source bitmap (one that - scales consistently between the setsize *and* the width) than it - would choose if a width were not specified. Sort of a hidden - multiple-master functionality. */ - if ((to->values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY || - (to->values_supplied & POINTSIZE_MASK) == POINTSIZE_ARRAY) - { - /* Reject if resulting width difference is >= 1 pixel */ - if (fabs(rescale * from->width - *dx * from->width) >= 10) - return FALSE; - } - else - { - *rescale_x = rescale/(*dx); - *dx = rescale; - } - } - - if (srcpixel >= EPS) - { - *dy = destpixel / srcpixel; - *sdy = 1000.0 / srcpixel; - } - else - *sdy = *dy = 0; - - return TRUE; -} - -/* favor enlargement over reduction because of aliasing resulting - from reduction */ -#define SCORE(m,s) \ -if (m >= 1.0) { \ - if (m == 1.0) \ - score += (16 * s); \ - else if (m == 2.0) \ - score += (4 * s); \ - else \ - score += (int)(((double)(3 * s)) / m); \ -} else { \ - score += (int)(((double)(2 * s)) * m); \ -} - -/* don't need to favor enlargement when looking for bitmap that can - be used unscalable */ -#define SCORE2(m,s) \ -if (m >= 1.0) \ - score += (int)(((double)(8 * s)) / m); \ -else \ - score += (int)(((double)(8 * s)) * m); - -static FontEntryPtr -FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry, - FontScalablePtr vals, FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep) -{ - FontScalableRec temp; - int source, i; - int best_score, best_unscaled_score, - score; - double dx = 0.0, sdx = 0.0, dx_amount = 0.0, - dy = 0.0, sdy = 0.0, dy_amount = 0.0, - best_dx = 0.0, best_sdx = 0.0, best_dx_amount = 0.0, - best_dy = 0.0, best_sdy = 0.0, best_dy_amount = 0.0, - best_unscaled_sdx = 0.0, best_unscaled_sdy = 0.0, - rescale_x = 0.0, best_rescale_x = 0.0, - best_unscaled_rescale_x = 0.0; - FontEntryPtr zero; - FontNameRec zeroName; - char zeroChars[MAXFONTNAMELEN]; - FontDirectoryPtr dir; - FontScaledPtr scaled; - FontScalableExtraPtr extra; - FontScaledPtr best_scaled, best_unscaled; - FontPathElementPtr best_fpe = NULL, best_unscaled_fpe = NULL; - FontEntryPtr bitmap = NULL; - FontEntryPtr result; - int aliascount = 20; - FontPathElementPtr bitmap_fpe = NULL; - FontNameRec xlfdName; - - /* find the best match */ - rescale_x = 1.0; - best_scaled = 0; - best_score = 0; - best_unscaled = 0; - best_unscaled_score = -1; - best_dx_amount = best_dy_amount = HUGE_VAL; - memcpy (zeroChars, entry->name.name, entry->name.length); - zeroChars[entry->name.length] = '\0'; - zeroName.name = zeroChars; - FontParseXLFDName (zeroChars, &temp, FONT_XLFD_REPLACE_ZERO); - zeroName.length = strlen (zeroChars); - zeroName.ndashes = entry->name.ndashes; - xlfdName.name = vals->xlfdName; - xlfdName.length = strlen(xlfdName.name); - xlfdName.ndashes = FontFileCountDashes(xlfdName.name, xlfdName.length); - restart_bestscale_loop: ; - /* - * Look through all the registered bitmap sources for - * the same zero name as ours; entries along that one - * can be scaled as desired. - */ - for (source = 0; source < FontFileBitmapSources.count; source++) - { - /* There might already be a bitmap that satisfies the request - but didn't have a zero name that was found by the scalable - font matching logic. Keep track if there is. */ - if (bitmap == NULL && vals->xlfdName != NULL) - { - bitmap_fpe = FontFileBitmapSources.fpe[source]; - dir = (FontDirectoryPtr) bitmap_fpe->private; - bitmap = FontFileFindNameInDir (&dir->nonScalable, &xlfdName); - if (bitmap && bitmap->type != FONT_ENTRY_BITMAP) - { - if (bitmap->type == FONT_ENTRY_ALIAS && aliascount > 0) - { - aliascount--; - xlfdName.name = bitmap->u.alias.resolved; - xlfdName.length = strlen(xlfdName.name); - xlfdName.ndashes = FontFileCountDashes(xlfdName.name, - xlfdName.length); - bitmap = NULL; - goto restart_bestscale_loop; - } - else - bitmap = NULL; - } - } - - if (FontFileBitmapSources.fpe[source] == fpe) - zero = entry; - else - { - dir = (FontDirectoryPtr) FontFileBitmapSources.fpe[source]->private; - zero = FontFileFindNameInDir (&dir->scalable, &zeroName); - if (!zero) - continue; - } - extra = zero->u.scalable.extra; - for (i = 0; i < extra->numScaled; i++) - { - scaled = &extra->scaled[i]; - if (!scaled->bitmap) - continue; - if (!ComputeScaleFactors(&scaled->vals, vals, &dx, &dy, &sdx, &sdy, - &rescale_x)) - continue; - score = 0; - dx_amount = dx; - dy_amount = dy; - SCORE(dy_amount, 10); - SCORE(dx_amount, 1); - if ((score > best_score) || - ((score == best_score) && - ((dy_amount < best_dy_amount) || - ((dy_amount == best_dy_amount) && - (dx_amount < best_dx_amount))))) - { - best_fpe = FontFileBitmapSources.fpe[source]; - best_scaled = scaled; - best_score = score; - best_dx = dx; - best_dy = dy; - best_sdx = sdx; - best_sdy = sdy; - best_dx_amount = dx_amount; - best_dy_amount = dy_amount; - best_rescale_x = rescale_x; - } - /* Is this font a candidate for use without ugly rescaling? */ - if (fabs(dx) > EPS && fabs(dy) > EPS && - fabs(vals->pixel_matrix[0] * rescale_x - - scaled->vals.pixel_matrix[0]) < 1 && - fabs(vals->pixel_matrix[1] * rescale_x - - scaled->vals.pixel_matrix[1]) < EPS && - fabs(vals->pixel_matrix[2] - - scaled->vals.pixel_matrix[2]) < EPS && - fabs(vals->pixel_matrix[3] - - scaled->vals.pixel_matrix[3]) < 1) - { - /* Yes. The pixel sizes are close on the diagonal and - extremely close off the diagonal. */ - score = 0; - SCORE2(vals->pixel_matrix[3] / - scaled->vals.pixel_matrix[3], 10); - SCORE2(vals->pixel_matrix[0] * rescale_x / - scaled->vals.pixel_matrix[0], 1); - if (score > best_unscaled_score) - { - best_unscaled_fpe = FontFileBitmapSources.fpe[source]; - best_unscaled = scaled; - best_unscaled_sdx = sdx / dx; - best_unscaled_sdy = sdy / dy; - best_unscaled_score = score; - best_unscaled_rescale_x = rescale_x; - } - } - } - } - if (best_unscaled) - { - *best = best_unscaled->vals; - *fpep = best_unscaled_fpe; - *dxp = 1.0; - *dyp = 1.0; - *sdxp = best_unscaled_sdx; - *sdyp = best_unscaled_sdy; - rescale_x = best_unscaled_rescale_x; - result = best_unscaled->bitmap; - } - else if (best_scaled) - { - *best = best_scaled->vals; - *fpep = best_fpe; - *dxp = best_dx; - *dyp = best_dy; - *sdxp = best_sdx; - *sdyp = best_sdy; - rescale_x = best_rescale_x; - result = best_scaled->bitmap; - } - else - result = NULL; - - if (bitmap != NULL && (result == NULL || *dxp != 1.0 || *dyp != 1.0)) - { - *fpep = bitmap_fpe; - FontParseXLFDName (bitmap->name.name, best, FONT_XLFD_REPLACE_NONE); - if (ComputeScaleFactors(best, best, dxp, dyp, sdxp, sdyp, &rescale_x)) - result = bitmap; - else - result = NULL; - } - - if (result && rescale_x != 1.0) - { - /* We have rescaled horizontally due to an XLFD width field. Change - the matrix appropriately */ - vals->pixel_matrix[0] *= rescale_x; - vals->pixel_matrix[1] *= rescale_x; -#ifdef NOTDEF - /* This would force the pointsize and pixelsize fields in the - FONT property to display as matrices to more accurately - report the font being supplied. It might also break existing - applications that expect a single number in that field. */ - vals->values_supplied = - vals->values_supplied & ~(PIXELSIZE_MASK | POINTSIZE_MASK) | - PIXELSIZE_ARRAY; -#else /* NOTDEF */ - vals->values_supplied = vals->values_supplied & ~POINTSIZE_MASK; -#endif /* NOTDEF */ - /* Recompute and reround the FontScalablePtr values after - rescaling for the new width. */ - FontFileCompleteXLFD(vals, vals); - } - - return result; -} - -static FontEntryPtr -FindPmfToScale(FontPathElementPtr fpe, FontEntryPtr entry, - FontScalablePtr vals, FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep) -{ - FontEntryPtr result = NULL; - FontScaledPtr scaled; - FontScalableExtraPtr extra; - int i; - - extra = entry->u.scalable.extra; - for (i = 0; i < extra->numScaled; i++) - { - double rescale_x; - - scaled = &extra->scaled[i]; - if (!scaled->bitmap) - continue; - if (!ComputeScaleFactors(&scaled->vals, vals, dxp, dyp, sdxp, sdyp, - &rescale_x)) - continue; - *best = scaled->vals; - *fpep = fpe; - result = scaled->bitmap; - if (rescale_x != 1.0) - { - /* We have rescaled horizontally due to an XLFD width field. Change - the matrix appropriately */ - vals->pixel_matrix[0] *= rescale_x; - vals->pixel_matrix[1] *= rescale_x; -#ifdef NOTDEF - /* This would force the pointsize and pixelsize fields in the - FONT property to display as matrices to more accurately - report the font being supplied. It might also break existing - applications that expect a single number in that field. */ - vals->values_supplied = - vals->values_supplied & ~(PIXELSIZE_MASK | POINTSIZE_MASK) | - PIXELSIZE_ARRAY; -#else /* NOTDEF */ - vals->values_supplied = vals->values_supplied & ~POINTSIZE_MASK; -#endif /* NOTDEF */ - /* Recompute and reround the FontScalablePtr values after - rescaling for the new width. */ - FontFileCompleteXLFD(vals, vals); - } - break; - } - return result; -} - -static long -doround(double x) -{ - return (x >= 0) ? (long)(x + .5) : (long)(x - .5); -} - -static int -computeProps(FontPropPtr pf, char *wasStringProp, - FontPropPtr npf, char *isStringProp, - unsigned int nprops, double xfactor, double yfactor, - double sXfactor, double sYfactor) -{ - int n; - int count; - fontProp *t; - double rawfactor = 0.0; - - for (count = 0; nprops > 0; nprops--, pf++, wasStringProp++) { - n = sizeof(fontPropTable) / sizeof(fontProp); - for (t = fontPropTable; n && (t->atom != pf->name); n--, t++); - if (!n) - continue; - - switch (t->type) { - case scaledX: - npf->value = doround(xfactor * (double)pf->value); - rawfactor = sXfactor; - break; - case scaledY: - npf->value = doround(yfactor * (double)pf->value); - rawfactor = sYfactor; - break; - case unscaled: - npf->value = pf->value; - npf->name = pf->name; - npf++; - count++; - *isStringProp++ = *wasStringProp; - break; - default: - break; - } - if (t->type != unscaled) - { - npf->name = pf->name; - npf++; - count++; - npf->value = doround(rawfactor * (double)pf->value); - npf->name = rawFontPropTable[t - fontPropTable].atom; - npf++; - count++; - *isStringProp++ = *wasStringProp; - *isStringProp++ = *wasStringProp; - } - } - return count; -} - - -static int -ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */ - char *name, /* name of resulting font */ - FontScalablePtr vals, - double dx, double dy, /* scale factors in x and y */ - double sdx, double sdy, /* directions */ - long sWidth, /* 1000-pixel average width */ - FontPropPtr *pProps, /* returns properties; - preallocated */ - char **pIsStringProp) /* return booleans; - preallocated */ -{ - int n; - char *ptr1 = NULL, *ptr2 = NULL; - char *ptr3; - FontPropPtr fp; - fontProp *fpt; - char *isStringProp; - int nProps; - - if (bitscaleGeneration != serverGeneration) { - initFontPropTable(); - bitscaleGeneration = serverGeneration; - } - nProps = NPROPS + 1 + sizeof(fontPropTable) / sizeof(fontProp) + - sizeof(rawFontPropTable) / sizeof(fontProp); - fp = (FontPropPtr) xalloc(sizeof(FontPropRec) * nProps); - *pProps = fp; - if (!fp) { - fprintf(stderr, "Error: Couldn't allocate font properties (%ld*%d)\n", - (unsigned long)sizeof(FontPropRec), nProps); - return 1; - } - isStringProp = (char *) xalloc (nProps); - *pIsStringProp = isStringProp; - if (!isStringProp) - { - fprintf(stderr, "Error: Couldn't allocate isStringProp (%d)\n", nProps); - xfree (fp); - return 1; - } - ptr2 = name; - for (fpt = fontNamePropTable, n = NPROPS; - n; - fp++, fpt++, n--, isStringProp++) - { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - *isStringProp = 0; - switch (fpt->type) { - case atom: - fp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - *isStringProp = 1; - break; - case truncate_atom: - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - if (!*ptr3) ptr3 = ptr2; - fp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - *isStringProp = 1; - break; - case pixel_size: - fp->value = doround(vals->pixel_matrix[3]); - break; - case point_size: - fp->value = doround(vals->point_matrix[3] * 10.0); - break; - case resolution_x: - fp->value = vals->x; - break; - case resolution_y: - fp->value = vals->y; - break; - case average_width: - fp->value = vals->width; - break; - case fontname: - fp->value = MakeAtom(name, strlen(name), TRUE); - *isStringProp = 1; - break; - case raw_ascent: - fp->value = sourceFontInfo->fontAscent * sdy; - break; - case raw_descent: - fp->value = sourceFontInfo->fontDescent * sdy; - break; - case raw_pointsize: - fp->value = (long)(72270.0 / (double)vals->y + .5); - break; - case raw_pixelsize: - fp->value = 1000; - break; - case raw_average_width: - fp->value = sWidth; - break; - default: - break; - } - fp->name = fpt->atom; - } - n = NPROPS; - n += computeProps(sourceFontInfo->props, sourceFontInfo->isStringProp, - fp, isStringProp, sourceFontInfo->nprops, dx, dy, - sdx, sdy); - return n; -} - - -static int -compute_xform_matrix(FontScalablePtr vals, double dx, double dy, - double *xform, double *inv_xform, - double *xmult, double *ymult) -{ - double det; - double pixel = get_matrix_vertical_component(vals->pixel_matrix); - double pixelset = get_matrix_horizontal_component(vals->pixel_matrix); - - if (pixel < EPS || pixelset < EPS) return 0; - - /* Initialize the transformation matrix to the scaling factors */ - xform[0] = dx / pixelset; - xform[1] = xform[2] = 0.0; - xform[3] = dy / pixel; - -/* Inline matrix multiply -- somewhat ugly to minimize register usage */ -#define MULTIPLY_XFORM(a,b,c,d) \ -{ \ - register double aa = (a), bb = (b), cc = (c), dd = (d); \ - register double temp; \ - temp = aa * xform[0] + cc * xform[1]; \ - aa = aa * xform[2] + cc * xform[3]; \ - xform[1] = bb * xform[0] + dd * xform[1]; \ - xform[3] = bb * xform[2] + dd * xform[3]; \ - xform[0] = temp; \ - xform[2] = aa; \ -} - - /* Rescale the transformation matrix for size of source font */ - MULTIPLY_XFORM(vals->pixel_matrix[0], - vals->pixel_matrix[1], - vals->pixel_matrix[2], - vals->pixel_matrix[3]); - - *xmult = xform[0]; - *ymult = xform[3]; - - - if (inv_xform == NULL) return 1; - - /* Compute the determinant for use in inverting the matrix. */ - det = xform[0] * xform[3] - xform[1] * xform[2]; - - /* If the determinant is tiny or zero, give up */ - if (fabs(det) < EPS) return 0; - - /* Compute the inverse */ - inv_xform[0] = xform[3] / det; - inv_xform[1] = -xform[1] / det; - inv_xform[2] = -xform[2] / det; - inv_xform[3] = xform[0] / det; - - return 1; -} - -/* - * ScaleFont - * returns a pointer to the new scaled font, or NULL (due to AllocError). - */ -static FontPtr -ScaleFont(FontPtr opf, /* originating font */ - double widthMult, /* glyphs width scale factor */ - double heightMult, /* glyphs height scale factor */ - double sWidthMult, /* scalable glyphs width scale factor */ - double sHeightMult, /* scalable glyphs height scale factor */ - FontScalablePtr vals, - double *newWidthMult, /* return: X component of glyphs width - scale factor */ - double *newHeightMult, /* return: Y component of glyphs height - scale factor */ - long *sWidth) /* return: average 1000-pixel width */ -{ - FontPtr pf; - FontInfoPtr pfi, - opfi; - BitmapFontPtr bitmapFont, - obitmapFont; - CharInfoPtr pci, - opci; - int nchars = 0; /* how many characters in the font */ - int i; - int firstCol, lastCol, firstRow, lastRow; - double xform[4], inv_xform[4]; - double xmult, ymult; - int totalwidth = 0, totalchars = 0; -#define OLDINDEX(i) (((i)/(lastCol - firstCol + 1) + \ - firstRow - opf->info.firstRow) * \ - (opf->info.lastCol - opf->info.firstCol + 1) + \ - (i)%(lastCol - firstCol + 1) + \ - firstCol - opf->info.firstCol) - - *sWidth = 0; - - opfi = &opf->info; - obitmapFont = (BitmapFontPtr) opf->fontPrivate; - - bitmapFont = 0; - if (!(pf = CreateFontRec())) { - fprintf(stderr, "Error: Couldn't allocate FontRec (%ld)\n", - (unsigned long)sizeof(FontRec)); - goto bail; - } - pf->refcnt = 0; - pf->bit = opf->bit; - pf->byte = opf->byte; - pf->glyph = opf->glyph; - pf->scan = opf->scan; - - pf->get_glyphs = bitmapGetGlyphs; - pf->get_metrics = bitmapGetMetrics; - pf->unload_font = bitmapUnloadScalable; - pf->unload_glyphs = NULL; - - pfi = &pf->info; - *pfi = *opfi; - /* If charset subsetting specified in vals, determine what our range - needs to be for the output font */ - if (vals->nranges) - { - int i; - - pfi->allExist = 0; - firstCol = 255; - lastCol = 0; - firstRow = 255; - lastRow = 0; - - for (i = 0; i < vals->nranges; i++) - { - if (vals->ranges[i].min_char_high != vals->ranges[i].max_char_high) - { - firstCol = opfi->firstCol; - lastCol = opfi->lastCol; - } - if (firstCol > vals->ranges[i].min_char_low) - firstCol = vals->ranges[i].min_char_low; - if (lastCol < vals->ranges[i].max_char_low) - lastCol = vals->ranges[i].max_char_low; - if (firstRow > vals->ranges[i].min_char_high) - firstRow = vals->ranges[i].min_char_high; - if (lastRow < vals->ranges[i].max_char_high) - lastRow = vals->ranges[i].max_char_high; - } - - if (firstCol > lastCol || firstRow > lastRow) - goto bail; - - if (firstCol < opfi->firstCol) - firstCol = opfi->firstCol; - if (lastCol > opfi->lastCol) - lastCol = opfi->lastCol; - if (firstRow < opfi->firstRow) - firstRow = opfi->firstRow; - if (lastRow > opfi->lastRow) - lastRow = opfi->lastRow; - } - else - { - firstCol = opfi->firstCol; - lastCol = opfi->lastCol; - firstRow = opfi->firstRow; - lastRow = opfi->lastRow; - } - - bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); - if (!bitmapFont) { - fprintf(stderr, "Error: Couldn't allocate bitmapFont (%ld)\n", - (unsigned long)sizeof(BitmapFontRec)); - goto bail; - } - nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); - pfi->firstRow = firstRow; - pfi->lastRow = lastRow; - pfi->firstCol = firstCol; - pfi->lastCol = lastCol; - pf->fontPrivate = (pointer) bitmapFont; - bitmapFont->version_num = obitmapFont->version_num; - bitmapFont->num_chars = nchars; - bitmapFont->num_tables = obitmapFont->num_tables; - bitmapFont->metrics = 0; - bitmapFont->ink_metrics = 0; - bitmapFont->bitmaps = 0; - bitmapFont->encoding = 0; - bitmapFont->bitmapExtra = 0; - bitmapFont->pDefault = 0; - bitmapFont->metrics = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); - if (!bitmapFont->metrics) { - fprintf(stderr, "Error: Couldn't allocate metrics (%d*%ld)\n", - nchars, (unsigned long)sizeof(CharInfoRec)); - goto bail; - } - bitmapFont->encoding = - (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nchars), - sizeof(CharInfoPtr*)); - if (!bitmapFont->encoding) { - fprintf(stderr, "Error: Couldn't allocate encoding (%d*%ld)\n", - nchars, (unsigned long)sizeof(CharInfoPtr)); - goto bail; - } - -#undef MAXSHORT -#define MAXSHORT 32767 -#undef MINSHORT -#define MINSHORT -32768 - - pfi->anamorphic = FALSE; - if (heightMult != widthMult) - pfi->anamorphic = TRUE; - pfi->cachable = TRUE; - - if (!compute_xform_matrix(vals, widthMult, heightMult, xform, - inv_xform, &xmult, &ymult)) - goto bail; - - pfi->fontAscent = opfi->fontAscent * ymult; - pfi->fontDescent = opfi->fontDescent * ymult; - - pfi->minbounds.leftSideBearing = MAXSHORT; - pfi->minbounds.rightSideBearing = MAXSHORT; - pfi->minbounds.ascent = MAXSHORT; - pfi->minbounds.descent = MAXSHORT; - pfi->minbounds.characterWidth = MAXSHORT; - pfi->minbounds.attributes = MAXSHORT; - - pfi->maxbounds.leftSideBearing = MINSHORT; - pfi->maxbounds.rightSideBearing = MINSHORT; - pfi->maxbounds.ascent = MINSHORT; - pfi->maxbounds.descent = MINSHORT; - pfi->maxbounds.characterWidth = MINSHORT; - pfi->maxbounds.attributes = MINSHORT; - - /* Compute the transformation and inverse transformation matrices. - Can fail if the determinant is zero. */ - - pci = bitmapFont->metrics; - for (i = 0; i < nchars; i++) - { - if ((opci = ACCESSENCODING(obitmapFont->encoding,OLDINDEX(i)))) - { - double newlsb, newrsb, newdesc, newasc, point[2]; - -#define minchar(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxchar(p) ((p).max_char_low + ((p).max_char_high << 8)) - - if (vals->nranges) - { - int row = i / (lastCol - firstCol + 1) + firstRow; - int col = i % (lastCol - firstCol + 1) + firstCol; - int ch = (row << 8) + col; - int j; - for (j = 0; j < vals->nranges; j++) - if (ch >= minchar(vals->ranges[j]) && - ch <= maxchar(vals->ranges[j])) - break; - if (j == vals->nranges) - { - continue; - } - } - - if (opci->metrics.leftSideBearing == 0 && - opci->metrics.rightSideBearing == 0 && - opci->metrics.ascent == 0 && - opci->metrics.descent == 0 && - opci->metrics.characterWidth == 0) - { - continue; - } - - if(!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { - bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if(!bitmapFont->encoding[SEGMENT_MAJOR(i)]) - goto bail; - } - ACCESSENCODINGL(bitmapFont->encoding, i) = pci; - - /* Compute new extents for this glyph */ - TRANSFORM_POINT(xform, - opci->metrics.leftSideBearing, - -opci->metrics.descent, - point); - newlsb = point[0]; - newrsb = newlsb; - newdesc = -point[1]; - newasc = -newdesc; - TRANSFORM_POINT(xform, - opci->metrics.leftSideBearing, - opci->metrics.ascent, - point); - CHECK_EXTENT(newlsb, newrsb, newdesc, newasc, point); - TRANSFORM_POINT(xform, - opci->metrics.rightSideBearing, - -opci->metrics.descent, - point); - CHECK_EXTENT(newlsb, newrsb, newdesc, newasc, point); - TRANSFORM_POINT(xform, - opci->metrics.rightSideBearing, - opci->metrics.ascent, - point); - CHECK_EXTENT(newlsb, newrsb, newdesc, newasc, point); - - pci->metrics.leftSideBearing = (int)floor(newlsb); - pci->metrics.rightSideBearing = (int)floor(newrsb + .5); - pci->metrics.descent = (int)ceil(newdesc); - pci->metrics.ascent = (int)floor(newasc + .5); - /* Accumulate total width of characters before transformation, - to ascertain predominant direction of font. */ - totalwidth += opci->metrics.characterWidth; - pci->metrics.characterWidth = - doround((double)opci->metrics.characterWidth * xmult); - pci->metrics.attributes = - doround((double)opci->metrics.characterWidth * sWidthMult); - if (!pci->metrics.characterWidth) - { - /* Since transformation may shrink width, height, and - escapement to zero, make sure existing characters - are not mistaken for undefined characters. */ - - if (pci->metrics.rightSideBearing == - pci->metrics.leftSideBearing) - pci->metrics.rightSideBearing++; - if (pci->metrics.ascent == -pci->metrics.descent) - pci->metrics.ascent++; - } - - pci++; - } - } - - - /* - * For each character, set the per-character metrics, scale the glyph, and - * check per-font minbounds and maxbounds character information. - */ - - pci = bitmapFont->metrics; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding,i)) && - (opci = ACCESSENCODING(obitmapFont->encoding,OLDINDEX(i)))) - { - totalchars++; - *sWidth += abs((int)(INT16)pci->metrics.attributes); -#define MINMAX(field) \ - if (pfi->minbounds.field > pci->metrics.field) \ - pfi->minbounds.field = pci->metrics.field; \ - if (pfi->maxbounds.field < pci->metrics.field) \ - pfi->maxbounds.field = pci->metrics.field - - MINMAX(leftSideBearing); - MINMAX(rightSideBearing); - MINMAX(ascent); - MINMAX(descent); - MINMAX(characterWidth); - - /* Hack: Cast attributes into a signed quantity. Tread lightly - for now and don't go changing the global Xproto.h file */ - if ((INT16)pfi->minbounds.attributes > - (INT16)pci->metrics.attributes) - pfi->minbounds.attributes = pci->metrics.attributes; - if ((INT16)pfi->maxbounds.attributes < - (INT16)pci->metrics.attributes) - pfi->maxbounds.attributes = pci->metrics.attributes; -#undef MINMAX - } - } - pfi->ink_minbounds = pfi->minbounds; - pfi->ink_maxbounds = pfi->maxbounds; - if (totalchars) - { - *sWidth = (*sWidth * 10 + totalchars / 2) / totalchars; - if (totalwidth < 0) - { - /* Dominant direction is R->L */ - *sWidth = -*sWidth; - } - - if (pfi->minbounds.characterWidth == pfi->maxbounds.characterWidth) - vals->width = pfi->minbounds.characterWidth * 10; - else - vals->width = doround((double)*sWidth * vals->pixel_matrix[0] / - 1000.0); - } - else - { - vals->width = 0; - *sWidth = 0; - } - FontComputeInfoAccelerators (pfi); - - if (pfi->defaultCh != (unsigned short) NO_SUCH_CHAR) { - unsigned int r, - c, - cols; - - r = pfi->defaultCh >> 8; - c = pfi->defaultCh & 0xFF; - if (pfi->firstRow <= r && r <= pfi->lastRow && - pfi->firstCol <= c && c <= pfi->lastCol) { - cols = pfi->lastCol - pfi->firstCol + 1; - r = r - pfi->firstRow; - c = c - pfi->firstCol; - bitmapFont->pDefault = - ACCESSENCODING(bitmapFont->encoding, r * cols + c); - } - } - - *newWidthMult = xmult; - *newHeightMult = ymult; - return pf; -bail: - if (pf) - xfree(pf); - if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); - if(bitmapFont->encoding) - for(i=0; iencoding[i]); - xfree(bitmapFont->encoding); - } - return NULL; -} - -static void -ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci, - double *inv_xform, double widthMult, double heightMult) -{ - register char *bitmap, /* The bits */ - *newBitmap; - register int bpr, /* Padding information */ - newBpr; - int width, /* Extents information */ - height, - newWidth, - newHeight; - register int row, /* Loop variables */ - col; - INT32 deltaX, /* Increments for resampling loop */ - deltaY; - INT32 xValue, /* Subscripts for resampling loop */ - yValue; - double point[2]; - unsigned char *char_grayscale = 0; - INT32 *diffusion_workspace = NULL, *thisrow = NULL, - *nextrow = NULL, pixmult = 0; - int box_x = 0, box_y = 0; - - static unsigned char masklsb[] = - { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 }; - static unsigned char maskmsb[] = - { 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1 }; - unsigned char *mask = (pFont->bit == LSBFirst ? masklsb : maskmsb); - - - bitmap = opci->bits; - newBitmap = pci->bits; - width = GLYPHWIDTHPIXELS(opci); - height = GLYPHHEIGHTPIXELS(opci); - newWidth = GLYPHWIDTHPIXELS(pci); - newHeight = GLYPHHEIGHTPIXELS(pci); - if (!newWidth || !newHeight || !width || !height) - return; - - bpr = BYTES_PER_ROW(width, pFont->glyph); - newBpr = BYTES_PER_ROW(newWidth, pFont->glyph); - - if (widthMult > 0.0 && heightMult > 0.0 && - (widthMult < 1.0 || heightMult < 1.0)) - { - /* We are reducing in one or both dimensions. In an attempt to - reduce aliasing, we'll antialias by passing the original - glyph through a low-pass box filter (which results in a - grayscale image), then use error diffusion to create bitonal - output in the resampling loop. */ - - /* First compute the sizes of the box filter */ - widthMult = ceil(1.0 / widthMult); - heightMult = ceil(1.0 / heightMult); - box_x = width / 2; - box_y = height / 2; - if (widthMult < (double)box_x) box_x = (int)widthMult; - if (heightMult < (double)box_y) box_y = (int)heightMult; - /* The pixmult value (below) is used to darken the image before - we perform error diffusion: a necessary concession to the - fact that it's very difficult to generate readable halftoned - glyphs. The degree of darkening is proportional to the size - of the blurring filter, hence inversely proportional to the - darkness of the lightest gray that results from antialiasing. - The result is that characters that exercise this logic (those - generated by reducing from a larger source font) tend to err - on the side of being too bold instead of being too light to - be readable. */ - pixmult = box_x * box_y * 192; - - if (box_x > 1 || box_y > 1) - { - /* Looks like we need to anti-alias. Create a workspace to - contain the grayscale character plus an additional row and - column for scratch */ - char_grayscale = - (unsigned char *)xalloc((width + 1) * (height + 1)); - if (char_grayscale) - { - diffusion_workspace = - (INT32 *)xalloc((newWidth + 2) * 2 * sizeof(int)); - if (!diffusion_workspace) - { - fprintf(stderr, "Warning: Couldn't allocate diffusion" - " workspace (%ld)\n", - (newWidth + 2) * 2 * (unsigned long)sizeof(int)); - xfree(char_grayscale); - char_grayscale = (unsigned char *)0; - } - /* Initialize our error diffusion workspace for later use */ - bzero((char *)diffusion_workspace + sizeof(INT32), - (newWidth + 3) * sizeof(int)); - thisrow = diffusion_workspace + 1; - nextrow = diffusion_workspace + newWidth + 3; - } else { - fprintf(stderr, "Warning: Couldn't allocate character grayscale (%d)\n", (width + 1) * (height + 1)); - } - } - } - - if (char_grayscale) - { - /* We will be doing antialiasing. First copy the bitmap into - our buffer, mapping input range [0,1] to output range - [0,255]. */ - register unsigned char *srcptr, *dstptr; - srcptr = (unsigned char *)bitmap; - dstptr = char_grayscale; - for (row = 0; row < height; row++) - { - for (col = 0; col < width; col++) - *dstptr++ = (srcptr[col >> 3] & mask[col & 0x7]) ? 255 : 0; - srcptr += bpr; /* On to next row of source */ - dstptr++; /* Skip scratch column in dest */ - } - if (box_x > 1) - { - /* Our box filter has a width > 1... let's filter the rows */ - - int right_width = box_x / 2; - int left_width = box_x - right_width - 1; - - for (row = 0; row < height; row++) - { - int sum = 0; - int left_size = 0, right_size = 0; - - srcptr = char_grayscale + (width + 1) * row; - dstptr = char_grayscale + (width + 1) * height; /* scratch */ - - /* We've computed the shape of our full box filter. Now - compute the right-hand part of the moving sum */ - for (right_size = 0; right_size < right_width; right_size++) - sum += srcptr[right_size]; - - /* Now start moving the sum, growing the box filter, and - dropping averages into our scratch buffer */ - for (left_size = 0; left_size < left_width; left_size++) - { - sum += srcptr[right_width]; - *dstptr++ = sum / (left_size + right_width + 1); - srcptr++; - } - - /* The box filter has reached full width... continue - computation of moving average until the right side - hits the wall. */ - for (col = left_size; col + right_size < width; col++) - { - sum += srcptr[right_width]; - *dstptr++ = sum / box_x; - sum -= srcptr[-left_width]; - srcptr++; - } - - /* Collapse the right side of the box filter */ - for (; right_size > 0; right_size--) - { - *dstptr++ = sum / (left_width + right_size); - sum -= srcptr[-left_width]; - srcptr++; - } - - /* Done with the row... copy dest back over source */ - memmove(char_grayscale + (width + 1) * row, - char_grayscale + (width + 1) * height, - width); - } - } - if (box_y > 1) - { - /* Our box filter has a height > 1... let's filter the columns */ - - int bottom_height = box_y / 2; - int top_height = box_y - bottom_height - 1; - - for (col = 0; col < width; col++) - { - int sum = 0; - int top_size = 0, bottom_size = 0; - - srcptr = char_grayscale + col; - dstptr = char_grayscale + width; /* scratch */ - - /* We've computed the shape of our full box filter. Now - compute the bottom part of the moving sum */ - for (bottom_size = 0; - bottom_size < bottom_height; - bottom_size++) - sum += srcptr[bottom_size * (width + 1)]; - - /* Now start moving the sum, growing the box filter, and - dropping averages into our scratch buffer */ - for (top_size = 0; top_size < top_height; top_size++) - { - sum += srcptr[bottom_height * (width + 1)]; - *dstptr = sum / (top_size + bottom_height + 1); - dstptr += width + 1; - srcptr += width + 1; - } - - /* The box filter has reached full height... continue - computation of moving average until the bottom - hits the wall. */ - for (row = top_size; row + bottom_size < height; row++) - { - sum += srcptr[bottom_height * (width + 1)]; - *dstptr = sum / box_y; - dstptr += width + 1; - sum -= srcptr[-top_height * (width + 1)]; - srcptr += width + 1; - } - - /* Collapse the bottom of the box filter */ - for (; bottom_size > 0; bottom_size--) - { - *dstptr = sum / (top_height + bottom_size); - dstptr += width + 1; - sum -= srcptr[-top_height * (width + 1)]; - srcptr += width + 1; - } - - /* Done with the column... copy dest back over source */ - - dstptr = char_grayscale + col; - srcptr = char_grayscale + width; /* scratch */ - for (row = 0; row < height; row++) - { - *dstptr = *srcptr; - dstptr += width + 1; - srcptr += width + 1; - } - } - } - - /* Increase the grayvalue to increase ink a bit */ - srcptr = char_grayscale; - for (row = 0; row < height; row++) - { - for (col = 0; col < width; col++) - { - register int pixvalue = (int)*srcptr * pixmult / 256; - if (pixvalue > 255) pixvalue = 255; - *srcptr = pixvalue; - srcptr++; - } - srcptr++; - } - } - - /* Compute the increment values for the resampling loop */ - TRANSFORM_POINT(inv_xform, 1, 0, point); - deltaX = (INT32)(point[0] * 65536.0); - deltaY = (INT32)(-point[1] * 65536.0); - - /* Resampling loop: resamples original glyph for generation of new - glyph in transformed coordinate system. */ - - for (row = 0; row < newHeight; row++) - { - /* Compute inverse transformation for start of this row */ - TRANSFORM_POINT(inv_xform, - (double)(pci->metrics.leftSideBearing) + .5, - (double)(pci->metrics.ascent - row) - .5, - point); - - /* Adjust for coordinate system to get resampling point */ - point[0] -= opci->metrics.leftSideBearing; - point[1] = opci->metrics.ascent - point[1]; - - /* Convert to integer coordinates */ - xValue = (INT32)(point[0] * 65536.0); - yValue = (INT32)(point[1] * 65536.0); - - if (char_grayscale) - { - INT32 *temp; - for (col = 0; col < newWidth; col++) - { - register int x = xValue >> 16, y = yValue >> 16; - int pixvalue, error; - - pixvalue = ((x >= 0 && x < width && y >= 0 && y < height) ? - char_grayscale[x + y * (width + 1)] : 0) + - thisrow[col] / 16; - if (pixvalue > 255) pixvalue = 255; - else if (pixvalue < 0) pixvalue = 0; - - /* Choose the bit value and set resulting error value */ - if (pixvalue >= 128) - { - newBitmap[(col >> 3) + row * newBpr] |= mask[col & 0x7]; - error = pixvalue - 255; - } - else - error = -pixvalue; - - /* Diffuse the error */ - thisrow[col + 1] += error * 7; - nextrow[col - 1] += error * 3; - nextrow[col] += error * 5; - nextrow[col + 1] = error; - - xValue += deltaX; - yValue += deltaY; - } - - /* Add in error values that fell off either end */ - nextrow[0] += nextrow[-1]; - nextrow[newWidth - 2] += thisrow[newWidth]; - nextrow[newWidth - 1] += nextrow[newWidth]; - nextrow[newWidth] = 0; - - temp = nextrow; - nextrow = thisrow; - thisrow = temp; - nextrow[-1] = nextrow[0] = 0; - } - else - { - for (col = 0; col < newWidth; col++) - { - register int x = xValue >> 16, y = yValue >> 16; - - if (x >= 0 && x < width && y >= 0 && y < height) - { - /* Use point-sampling for rescaling. */ - - if (bitmap[(x >> 3) + y * bpr] & mask[x & 0x7]) - newBitmap[(col >> 3) + row * newBpr] |= mask[col & 0x7]; - } - - xValue += deltaX; - yValue += deltaY; - } - } - } - - - if (char_grayscale) - { - xfree(char_grayscale); - xfree(diffusion_workspace); - } -} - -static FontPtr -BitmapScaleBitmaps(FontPtr pf, /* scaled font */ - FontPtr opf, /* originating font */ - double widthMult, /* glyphs width scale factor */ - double heightMult, /* glyphs height scale factor */ - FontScalablePtr vals) -{ - register int i; - int nchars = 0; - char *glyphBytes; - BitmapFontPtr bitmapFont, - obitmapFont; - CharInfoPtr pci, - opci; - FontInfoPtr pfi; - int glyph; - unsigned bytestoalloc = 0; - int firstCol, lastCol, firstRow, lastRow; - - double xform[4], inv_xform[4]; - double xmult, ymult; - - bitmapFont = (BitmapFontPtr) pf->fontPrivate; - obitmapFont = (BitmapFontPtr) opf->fontPrivate; - - if (!compute_xform_matrix(vals, widthMult, heightMult, xform, - inv_xform, &xmult, &ymult)) - goto bail; - - pfi = &pf->info; - firstCol = pfi->firstCol; - lastCol = pfi->lastCol; - firstRow = pfi->firstRow; - lastRow = pfi->lastRow; - - nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); - glyph = pf->glyph; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i))) - bytestoalloc += BYTES_FOR_GLYPH(pci, glyph); - } - - /* Do we add the font malloc stuff for VALUE ADDED ? */ - /* Will need to remember to free in the Unload routine */ - - - bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); - if (!bitmapFont->bitmaps) { - fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); - goto bail; - } - bzero(bitmapFont->bitmaps, bytestoalloc); - - glyphBytes = bitmapFont->bitmaps; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i)) && - (opci = ACCESSENCODING(obitmapFont->encoding, OLDINDEX(i)))) - { - pci->bits = glyphBytes; - ScaleBitmap (pf, opci, pci, inv_xform, - widthMult, heightMult); - glyphBytes += BYTES_FOR_GLYPH(pci, glyph); - } - } - return pf; - -bail: - if (pf) - xfree(pf); - if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); - if(bitmapFont->encoding) - for(i=0; iencoding[i]); - xfree(bitmapFont->encoding); - } - return NULL; -} - -static FontPtr -PrinterScaleBitmaps(FontPtr pf, /* scaled font */ - FontPtr opf, /* originating font */ - double widthMult, /* glyphs width scale factor */ - double heightMult, /* glyphs height scale factor */ - FontScalablePtr vals) -{ - register int i; - int nchars = 0; - char *glyphBytes; - BitmapFontPtr bitmapFont, - obitmapFont; - CharInfoPtr pci; - FontInfoPtr pfi; - int glyph; - unsigned bytestoalloc = 0; - int firstCol, lastCol, firstRow, lastRow; - - double xform[4], inv_xform[4]; - double xmult, ymult; - - bitmapFont = (BitmapFontPtr) pf->fontPrivate; - obitmapFont = (BitmapFontPtr) opf->fontPrivate; - - if (!compute_xform_matrix(vals, widthMult, heightMult, xform, - inv_xform, &xmult, &ymult)) - goto bail; - - pfi = &pf->info; - firstCol = pfi->firstCol; - lastCol = pfi->lastCol; - firstRow = pfi->firstRow; - lastRow = pfi->lastRow; - - nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); - glyph = pf->glyph; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i))) - bytestoalloc = MAX(bytestoalloc,BYTES_FOR_GLYPH(pci, glyph)); - } - - /* Do we add the font malloc stuff for VALUE ADDED ? */ - /* Will need to remember to free in the Unload routine */ - - - bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); - if (!bitmapFont->bitmaps) { - fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); - goto bail; - } - bzero(bitmapFont->bitmaps, bytestoalloc); - - glyphBytes = bitmapFont->bitmaps; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i)) && - (ACCESSENCODING(obitmapFont->encoding, OLDINDEX(i)))) - { - pci->bits = glyphBytes; - } - } - return pf; - -bail: - if (pf) - xfree(pf); - if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); - if(bitmapFont->encoding) - for(i=0; iencoding[i]); - xfree(bitmapFont->encoding); - } - return NULL; -} - -#ifdef NOTDEF -/* - * exported interfaces - */ - -FontFileLoadName(FontFileDirPtr *dirs, int ndirs, char *name, FontPtr *pfont, - fsBitmapFormat format, fsBitmapFormatMask fmask) -{ - FontFileNamePtr fname; - char full_name[1024]; - int ret = BadFontName; - int i; - - i = 0; - while (i < ndirs) { - if (fname = FontFileFindNameInDir(dirs[i], name)) { - if (!fname->alias) { - if (!fname->font) { - strcpy(full_name, dirs[i]->dir); - strcat(full_name, fname->file); - ret = FontFileLoad(pfont, full_name, format, fmask); - if (ret == Successful) { - fname->font = *pfont; - (*pfont)->fpePrivate = (pointer) fname; - } - return ret; - } - *pfont = fname->font; - return Successful; - } - name = fname->file; - i = 0; - } else - i++; - } - return BadFontName; -} -#endif - -/* ARGSUSED */ -int -BitmapOpenScalable (FontPathElementPtr fpe, - FontPtr *pFont, - int flags, - FontEntryPtr entry, - char *fileName, /* unused */ - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - FontScalableRec best; - FontPtr font = NullFont; - double dx, sdx, - dy, sdy, - savedX, savedY; - FontPropPtr props; - char *isStringProp; - int propCount; - int status; - long sWidth; - - FontEntryPtr scaleFrom; - FontPathElementPtr scaleFPE; - FontPtr sourceFont; - char fontName[MAXFONTNAMELEN]; - - /* Can't deal with mix-endian fonts yet */ - -#ifdef NOTDEF /* XXX need better test */ - if ((format & BitmapFormatByteOrderMask) != - (format & BitmapFormatBitOrderMask)) - return NullFontFileName; -#endif - - /* Reject outrageously small font sizes to keep the math from - blowing up. */ - if (get_matrix_vertical_component(vals->pixel_matrix) < 1.0 || - get_matrix_horizontal_component(vals->pixel_matrix) < 1.0) - return BadFontName; - - scaleFrom = (*find_scale[BitmapGetRenderIndex(entry->u.bitmap.renderer)]) - (fpe, entry, vals, &best, &dx, &dy, &sdx, &sdy, &scaleFPE); - - if (!scaleFrom) - return BadFontName; - - status = FontFileOpenBitmap(scaleFPE, &sourceFont, LoadAll, scaleFrom, - format, fmask); - - if (status != Successful) - return BadFontName; - - if (!vals->width) - vals->width = best.width * dx; - - /* Compute the scaled font */ - - savedX = dx; - savedY = dy; - font = ScaleFont(sourceFont, dx, dy, sdx, sdy, vals, &dx, &dy, &sWidth); - if (font) - font = (*scale[ BitmapGetRenderIndex(entry->u.bitmap.renderer) ]) - (font, sourceFont, savedX, savedY, vals); - - if (!font) - { - if (!sourceFont->refcnt) - FontFileCloseFont((FontPathElementPtr) 0, sourceFont); - return AllocError; - } - - /* Prepare font properties for the new font */ - - strcpy (fontName, scaleFrom->name.name); - FontParseXLFDName (fontName, vals, FONT_XLFD_REPLACE_VALUE); - - propCount = ComputeScaledProperties(&sourceFont->info, fontName, vals, - dx, dy, sdx, sdy, sWidth, &props, - &isStringProp); - - if (!sourceFont->refcnt) - FontFileCloseFont((FontPathElementPtr) 0, sourceFont); - - if (propCount && (!props || !isStringProp)) - { - font->info.nprops = 0; - font->info.props = (FontPropPtr)0; - font->info.isStringProp = (char *)0; - bitmapUnloadScalable(font); - return AllocError; - } - - font->info.props = props; - font->info.nprops = propCount; - font->info.isStringProp = isStringProp; - - *pFont = font; - return Successful; -} - -int -BitmapGetInfoScalable (FontPathElementPtr fpe, - FontInfoPtr pFontInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr vals) -{ - FontPtr pfont; - int flags = 0; - long format = 0; /* It doesn't matter what format for just info */ - long fmask = 0; - int ret; - - ret = BitmapOpenScalable(fpe, &pfont, flags, entry, fileName, vals, - format, fmask, NULL); - if (ret != Successful) - return ret; - *pFontInfo = pfont->info; - - pfont->info.nprops = 0; - pfont->info.props = NULL; - pfont->info.isStringProp = NULL; - - (*pfont->unload_font)(pfont); - return Successful; -} - -static void -bitmapUnloadScalable (FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - FontInfoPtr pfi; - int i, nencoding; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - pfi = &pFont->info; - xfree (pfi->props); - xfree (pfi->isStringProp); - if(bitmapFont->encoding) { - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - for(i=0; iencoding[i]); - } - xfree (bitmapFont->encoding); - xfree (bitmapFont->bitmaps); - xfree (bitmapFont->ink_metrics); - xfree (bitmapFont->metrics); - xfree (pFont->fontPrivate); - DestroyFontRec (pFont); -} diff --git a/nx-X11/lib/font/bitmap/fontink.c b/nx-X11/lib/font/bitmap/fontink.c deleted file mode 100644 index a9606f039..000000000 --- a/nx-X11/lib/font/bitmap/fontink.c +++ /dev/null @@ -1,219 +0,0 @@ -/* $Xorg: fontink.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/fontink.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -static unsigned char ink_mask_msb[8] = { - 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, -}; - -static unsigned char ink_mask_lsb[8] = { - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, -}; - -void -FontCharInkMetrics(FontPtr pFont, CharInfoPtr pCI, xCharInfo *pInk) -{ - int leftBearing, - ascent, - descent; - register int vpos, - hpos, - bpos = 0; - int bitmapByteWidth, - bitmapByteWidthPadded; - int bitmapBitWidth; - int span; - register unsigned char *p; - unsigned char *ink_mask = 0; - register int bmax; - register unsigned char charbits; - - if (pFont->bit == MSBFirst) - ink_mask = ink_mask_msb; - else if (pFont->bit == LSBFirst) - ink_mask = ink_mask_lsb; - pInk->characterWidth = pCI->metrics.characterWidth; - pInk->attributes = pCI->metrics.attributes; - - leftBearing = pCI->metrics.leftSideBearing; - ascent = pCI->metrics.ascent; - descent = pCI->metrics.descent; - bitmapBitWidth = GLYPHWIDTHPIXELS(pCI); - bitmapByteWidth = GLYPHWIDTHBYTES(pCI); - bitmapByteWidthPadded = BYTES_PER_ROW(bitmapBitWidth, pFont->glyph); - span = bitmapByteWidthPadded - bitmapByteWidth; - - p = (unsigned char *) pCI->bits; - for (vpos = descent + ascent; --vpos >= 0;) { - for (hpos = bitmapByteWidth; --hpos >= 0;) { - if (*p++ != 0) - goto found_ascent; - } - p += span; - } - /* - * special case -- font with no bits gets all zeros - */ - pInk->leftSideBearing = leftBearing; - pInk->rightSideBearing = leftBearing; - pInk->ascent = 0; - pInk->descent = 0; - return; -found_ascent: - pInk->ascent = vpos - descent + 1; - - p = ((unsigned char *) pCI->bits) + bitmapByteWidthPadded * - (descent + ascent - 1) + bitmapByteWidth; - - for (vpos = descent + ascent; --vpos >= 0;) { - for (hpos = bitmapByteWidth; --hpos >= 0;) { - if (*--p != 0) - goto found_descent; - } - p -= span; - } -found_descent: - pInk->descent = vpos - ascent + 1; - - bmax = 8; - for (hpos = 0; hpos < bitmapByteWidth; hpos++) { - charbits = 0; - p = (unsigned char *) pCI->bits + hpos; - for (vpos = descent + ascent; --vpos >= 0; p += bitmapByteWidthPadded) - charbits |= *p; - if (charbits) { - if (hpos == bitmapByteWidth - 1) - bmax = bitmapBitWidth - (hpos << 3); - p = ink_mask; - for (bpos = bmax; --bpos >= 0;) { - if (charbits & *p++) - goto found_left; - } - } - } -found_left: - pInk->leftSideBearing = leftBearing + (hpos << 3) + bmax - bpos - 1; - - bmax = bitmapBitWidth - ((bitmapByteWidth - 1) << 3); - for (hpos = bitmapByteWidth; --hpos >= 0;) { - charbits = 0; - p = (unsigned char *) pCI->bits + hpos; - for (vpos = descent + ascent; --vpos >= 0; p += bitmapByteWidthPadded) - charbits |= *p; - if (charbits) { - p = ink_mask + bmax; - for (bpos = bmax; --bpos >= 0;) { - if (charbits & *--p) - goto found_right; - } - } - bmax = 8; - } -found_right: - pInk->rightSideBearing = leftBearing + (hpos << 3) + bpos + 1; -} - -#define ISBITONMSB(x, line) ((line)[(x)/8] & (1 << (7-((x)%8)))) -#define SETBITMSB(x, line) ((line)[(x)/8] |= (1 << (7-((x)%8)))) -#define ISBITONLSB(x, line) ((line)[(x)/8] & (1 << ((x)%8))) -#define SETBITLSB(x, line) ((line)[(x)/8] |= (1 << ((x)%8))) - -#define Min(a,b) ((a)<(b)?(a):(b)) -#define Max(a,b) ((a)>(b)?(a):(b)) - -void -FontCharReshape(FontPtr pFont, CharInfoPtr pSrc, CharInfoPtr pDst) -{ - int x, - y; - unsigned char *in_line, - *out_line; - unsigned char *oldglyph, - *newglyph; - int inwidth; - int outwidth, - outheight; - int out_bytes, - in_bytes; - int y_min, - y_max, - x_min, - x_max; - - newglyph = (unsigned char *) pDst->bits; - outwidth = pDst->metrics.rightSideBearing - pDst->metrics.leftSideBearing; - outheight = pDst->metrics.descent + pDst->metrics.ascent; - out_bytes = BYTES_PER_ROW(outwidth, pFont->glyph); - - oldglyph = (unsigned char *) pSrc->bits; - inwidth = pSrc->metrics.rightSideBearing - pSrc->metrics.leftSideBearing; - in_bytes = BYTES_PER_ROW(inwidth, pFont->glyph); - - bzero(newglyph, out_bytes * outheight); - in_line = oldglyph; - out_line = newglyph; - y_min = Max(-pSrc->metrics.ascent, -pDst->metrics.ascent); - y_max = Min(pSrc->metrics.descent, pDst->metrics.descent); - x_min = Max(pSrc->metrics.leftSideBearing, pDst->metrics.leftSideBearing); - x_max = Min(pSrc->metrics.rightSideBearing, pDst->metrics.rightSideBearing); - in_line += (y_min + pSrc->metrics.ascent) * in_bytes; - out_line += (y_min + pDst->metrics.ascent) * out_bytes; - if (pFont->bit == MSBFirst) { - for (y = y_min; y < y_max; y++) { - for (x = x_min; x < x_max; x++) { - if (ISBITONMSB(x - pSrc->metrics.leftSideBearing, in_line)) - SETBITMSB(x - pDst->metrics.leftSideBearing, out_line); - } - in_line += in_bytes; - out_line += out_bytes; - } - } else { - for (y = y_min; y < y_max; y++) { - for (x = x_min; x < x_max; x++) { - if (ISBITONLSB(x - pSrc->metrics.leftSideBearing, in_line)) - SETBITLSB(x - pDst->metrics.leftSideBearing, out_line); - } - in_line += in_bytes; - out_line += out_bytes; - } - } -} diff --git a/nx-X11/lib/font/bitmap/module/Imakefile b/nx-X11/lib/font/bitmap/module/Imakefile deleted file mode 100644 index 29a49c644..000000000 --- a/nx-X11/lib/font/bitmap/module/Imakefile +++ /dev/null @@ -1,45 +0,0 @@ -XCOMM $XFree86: xc/lib/font/bitmap/module/Imakefile,v 1.5 1999/12/03 19:17:18 eich Exp $ - -#define IHaveModules -#include - - INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XINCLUDESRC) -I../ - HEADERS = - DEFINES = -DFONTMODULE -DBDFFORMAT -DSNFFORMAT -DPCFFORMAT - -#ifdef FontFormatDefines - FORMAT_DEFS = FontFormatDefines -#endif -#if GzipFontCompression - GZIP_DEFS = -DX_GZIP_FONT_COMPRESSION -#endif - - SRCS = bdfread.c bdfutils.c bitmap.c bitmaputil.c bitscale.c \ - bitmapfunc.c pcfread.c pcfwrite.c snfread.c \ - fontink.c bitmapmod.c - - OBJS = bdfread.o bdfutils.o bitmap.o bitmaputil.o bitscale.o \ - bitmapfunc.o pcfread.o pcfwrite.o snfread.o \ - fontink.o bitmapmod.o - -SpecialCObjectRule(bitmapfunc,$(ICONFIGFILES),$(GZIP_DEFS)) - -LinkSourceFile(bdfread.c,..) -LinkSourceFile(bdfutils.c,..) -LinkSourceFile(bitmap.c,..) -LinkSourceFile(bitmaputil.c,..) -LinkSourceFile(bitscale.c,..) -LinkSourceFile(bitmapfunc.c,..) -LinkSourceFile(pcfread.c,..) -LinkSourceFile(pcfwrite.c,..) -LinkSourceFile(snfread.c,..) -LinkSourceFile(fontink.c,..) - -ModuleObjectRule() -LibraryModuleTarget(bitmap,$(OBJS)) -InstallLibraryModule(bitmap,$(MODULEDIR),fonts) - -DependTarget() - -InstallDriverSDKLibraryModule(bitmap,$(DRIVERSDKMODULEDIR),fonts) diff --git a/nx-X11/lib/font/bitmap/module/bitmapmod.c b/nx-X11/lib/font/bitmap/module/bitmapmod.c deleted file mode 100644 index 0ae9ff7ad..000000000 --- a/nx-X11/lib/font/bitmap/module/bitmapmod.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), 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 - * XFREE86 PROJECT 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 XFree86 Project 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 - * XFree86 Project. - */ -/* $XFree86: xc/lib/font/bitmap/module/bitmapmod.c,v 1.7 1999/01/26 05:53:47 dawes Exp $ */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include -#include "xf86Module.h" - -static MODULESETUPPROTO(bitmapSetup); - - /* - * This is the module data function that is accessed when loading - * libbitmap as a module. - */ - -static XF86ModuleVersionInfo VersRec = -{ - "bitmap", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_FONT, /* Font module */ - ABI_FONT_VERSION, - MOD_CLASS_FONT, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -XF86ModuleData bitmapModuleData = { &VersRec, bitmapSetup, NULL }; - -extern void BitmapRegisterFontFileFunctions(void); - -FontModule bitmapModule = { - BitmapRegisterFontFileFunctions, - "Bitmap", - NULL -}; - -static pointer -bitmapSetup(pointer mod, pointer opts, int *errmaj, int *errmin) -{ - bitmapModule.module = mod; - LoadFont(&bitmapModule); - - /* Need a non-NULL return */ - return (pointer)1; -} diff --git a/nx-X11/lib/font/bitmap/pcf.h b/nx-X11/lib/font/bitmap/pcf.h deleted file mode 100644 index 33b0ceff1..000000000 --- a/nx-X11/lib/font/bitmap/pcf.h +++ /dev/null @@ -1,100 +0,0 @@ -/* $Xorg: pcf.h,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.4 2001/12/14 19:56:47 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _PCF_H_ -#define _PCF_H_ - -/* - * Information used to read/write PCF fonts - */ - -typedef struct _PCFTable { - CARD32 type; - CARD32 format; - CARD32 size; - CARD32 offset; -} PCFTableRec, *PCFTablePtr; - -#define PCF_FILE_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1) -#define PCF_FORMAT_MASK 0xffffff00 - -#define PCF_DEFAULT_FORMAT 0x00000000 -#define PCF_INKBOUNDS 0x00000200 -#define PCF_ACCEL_W_INKBOUNDS 0x00000100 -#define PCF_COMPRESSED_METRICS 0x00000100 - -#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK)) - -#define PCF_GLYPH_PAD_MASK (3<<0) -#define PCF_BYTE_MASK (1<<2) -#define PCF_BIT_MASK (1<<3) -#define PCF_SCAN_UNIT_MASK (3<<4) - -#define PCF_BYTE_ORDER(f) (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst) -#define PCF_BIT_ORDER(f) (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst) -#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK) -#define PCF_GLYPH_PAD(f) (1<> 4) -#define PCF_SCAN_UNIT(f) (1< -#endif - -#include -#include -#include - -#ifndef MAX -#define MAX(a,b) (((a)>(b)) ? a : b) -#endif - -#include - -void -pcfError(const char* message, ...) -{ - va_list args; - - va_start(args, message); - - fprintf(stderr, "PCF Error: "); - vfprintf(stderr, message, args); - va_end(args); -} - -/* Read PCF font files */ - -static void pcfUnloadFont ( FontPtr pFont ); -static int position; - - -#define IS_EOF(file) ((file)->eof == BUFFILEEOF) - -#define FONT_FILE_GETC_ERR(f) (tmp = FontFileGetc(f), BAIL_ON_EOF) - -static int -pcfGetLSB32(FontFilePtr file) -{ - int c; - - c = FontFileGetc(file); - c |= FontFileGetc(file) << 8; - c |= FontFileGetc(file) << 16; - c |= FontFileGetc(file) << 24; - position += 4; - return c; -} - -static int -pcfGetINT32(FontFilePtr file, CARD32 format) -{ - int c; - - if (PCF_BYTE_ORDER(format) == MSBFirst) { - c = FontFileGetc(file) << 24; - c |= FontFileGetc(file) << 16; - c |= FontFileGetc(file) << 8; - c |= FontFileGetc(file); - } else { - c = FontFileGetc(file); - c |= FontFileGetc(file) << 8; - c |= FontFileGetc(file) << 16; - c |= FontFileGetc(file) << 24; - } - position += 4; - return c; -} - -static int -pcfGetINT16(FontFilePtr file, CARD32 format) -{ - int c; - - if (PCF_BYTE_ORDER(format) == MSBFirst) { - c = FontFileGetc(file) << 8; - c |= FontFileGetc(file); - } else { - c = FontFileGetc(file); - c |= FontFileGetc(file) << 8; - } - position += 2; - return c; -} - -#define pcfGetINT8(file, format) (position++, FontFileGetc(file)) - -static PCFTablePtr -pcfReadTOC(FontFilePtr file, int *countp) -{ - CARD32 version; - PCFTablePtr tables; - int count; - int i; - - position = 0; - version = pcfGetLSB32(file); - if (version != PCF_FILE_VERSION) - return (PCFTablePtr) NULL; - count = pcfGetLSB32(file); - if (IS_EOF(file)) return (PCFTablePtr) NULL; - tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); - if (!tables) { - pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); - return (PCFTablePtr) NULL; - } - for (i = 0; i < count; i++) { - tables[i].type = pcfGetLSB32(file); - tables[i].format = pcfGetLSB32(file); - tables[i].size = pcfGetLSB32(file); - tables[i].offset = pcfGetLSB32(file); - if (IS_EOF(file)) goto Bail; - } - - *countp = count; - return tables; - - Bail: - xfree(tables); - return (PCFTablePtr) NULL; -} - -/* - * PCF supports two formats for metrics, both the regular - * jumbo size, and 'lite' metrics, which are useful - * for most fonts which have even vaguely reasonable - * metrics - */ - -static Bool -pcfGetMetric(FontFilePtr file, CARD32 format, xCharInfo *metric) -{ - metric->leftSideBearing = pcfGetINT16(file, format); - metric->rightSideBearing = pcfGetINT16(file, format); - metric->characterWidth = pcfGetINT16(file, format); - metric->ascent = pcfGetINT16(file, format); - metric->descent = pcfGetINT16(file, format); - metric->attributes = pcfGetINT16(file, format); - if (IS_EOF(file)) return FALSE; - - return TRUE; -} - -static Bool -pcfGetCompressedMetric(FontFilePtr file, CARD32 format, xCharInfo *metric) -{ - metric->leftSideBearing = pcfGetINT8(file, format) - 0x80; - metric->rightSideBearing = pcfGetINT8(file, format) - 0x80; - metric->characterWidth = pcfGetINT8(file, format) - 0x80; - metric->ascent = pcfGetINT8(file, format) - 0x80; - metric->descent = pcfGetINT8(file, format) - 0x80; - metric->attributes = 0; - if (IS_EOF(file)) return FALSE; - - return TRUE; -} - -/* - * Position the file to the begining of the specified table - * in the font file - */ -static Bool -pcfSeekToType(FontFilePtr file, PCFTablePtr tables, int ntables, - CARD32 type, CARD32 *formatp, CARD32 *sizep) -{ - int i; - - for (i = 0; i < ntables; i++) - if (tables[i].type == type) { - if (position > tables[i].offset) - return FALSE; - if (!FontFileSkip(file, tables[i].offset - position)) - return FALSE; - position = tables[i].offset; - *sizep = tables[i].size; - *formatp = tables[i].format; - return TRUE; - } - return FALSE; -} - -static Bool -pcfHasType (PCFTablePtr tables, int ntables, CARD32 type) -{ - int i; - - for (i = 0; i < ntables; i++) - if (tables[i].type == type) - return TRUE; - return FALSE; -} - -/* - * pcfGetProperties - * - * Reads the font properties from the font file, filling in the FontInfo rec - * supplied. Used by by both ReadFont and ReadFontInfo routines. - */ - -static Bool -pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, - PCFTablePtr tables, int ntables) -{ - FontPropPtr props = 0; - int nprops; - char *isStringProp = 0; - CARD32 format; - int i; - CARD32 size; - int string_size; - char *strings; - - /* font properties */ - - if (!pcfSeekToType(file, tables, ntables, PCF_PROPERTIES, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - nprops = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); - if (!props) { - pcfError("pcfGetProperties(): Couldn't allocate props (%d*%d)\n", nprops, sizeof(FontPropRec)); - goto Bail; - } - isStringProp = (char *) xalloc(nprops * sizeof(char)); - if (!isStringProp) { - pcfError("pcfGetProperties(): Couldn't allocate isStringProp (%d*%d)\n", nprops, sizeof(char)); - goto Bail; - } - for (i = 0; i < nprops; i++) { - props[i].name = pcfGetINT32(file, format); - isStringProp[i] = pcfGetINT8(file, format); - props[i].value = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - } - /* pad the property array */ - /* - * clever here - nprops is the same as the number of odd-units read, as - * only isStringProp are odd length - */ - if (nprops & 3) - { - i = 4 - (nprops & 3); - (void)FontFileSkip(file, i); - position += i; - } - if (IS_EOF(file)) goto Bail; - string_size = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - strings = (char *) xalloc(string_size); - if (!strings) { - pcfError("pcfGetProperties(): Couldn't allocate strings (%d)\n", string_size); - goto Bail; - } - FontFileRead(file, strings, string_size); - if (IS_EOF(file)) goto Bail; - position += string_size; - for (i = 0; i < nprops; i++) { - props[i].name = MakeAtom(strings + props[i].name, - strlen(strings + props[i].name), TRUE); - if (isStringProp[i]) { - props[i].value = MakeAtom(strings + props[i].value, - strlen(strings + props[i].value), TRUE); - } - } - xfree(strings); - pFontInfo->isStringProp = isStringProp; - pFontInfo->props = props; - pFontInfo->nprops = nprops; - return TRUE; -Bail: - xfree(isStringProp); - xfree(props); - return FALSE; -} - - -/* - * pcfReadAccel - * - * Fill in the accelerator information from the font file; used - * to read both BDF_ACCELERATORS and old style ACCELERATORS - */ - -static Bool -pcfGetAccel(FontInfoPtr pFontInfo, FontFilePtr file, - PCFTablePtr tables, int ntables, CARD32 type) -{ - CARD32 format; - CARD32 size; - - if (!pcfSeekToType(file, tables, ntables, type, &format, &size) || - IS_EOF(file)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) - { - goto Bail; - } - pFontInfo->noOverlap = pcfGetINT8(file, format); - pFontInfo->constantMetrics = pcfGetINT8(file, format); - pFontInfo->terminalFont = pcfGetINT8(file, format); - pFontInfo->constantWidth = pcfGetINT8(file, format); - pFontInfo->inkInside = pcfGetINT8(file, format); - pFontInfo->inkMetrics = pcfGetINT8(file, format); - pFontInfo->drawDirection = pcfGetINT8(file, format); - pFontInfo->anamorphic = FALSE; - pFontInfo->cachable = TRUE; - /* natural alignment */ pcfGetINT8(file, format); - pFontInfo->fontAscent = pcfGetINT32(file, format); - pFontInfo->fontDescent = pcfGetINT32(file, format); - pFontInfo->maxOverlap = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - if (!pcfGetMetric(file, format, &pFontInfo->minbounds)) - goto Bail; - if (!pcfGetMetric(file, format, &pFontInfo->maxbounds)) - goto Bail; - if (PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) { - if (!pcfGetMetric(file, format, &pFontInfo->ink_minbounds)) - goto Bail; - if (!pcfGetMetric(file, format, &pFontInfo->ink_maxbounds)) - goto Bail; - } else { - pFontInfo->ink_minbounds = pFontInfo->minbounds; - pFontInfo->ink_maxbounds = pFontInfo->maxbounds; - } - return TRUE; -Bail: - return FALSE; -} - -int -pcfReadFont(FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan) -{ - CARD32 format; - CARD32 size; - BitmapFontPtr bitmapFont = 0; - int i; - PCFTablePtr tables = 0; - int ntables; - int nmetrics; - int nbitmaps; - int sizebitmaps; - int nink_metrics; - CharInfoPtr metrics = 0; - xCharInfo *ink_metrics = 0; - char *bitmaps = 0; - CharInfoPtr **encoding = 0; - int nencoding = 0; - int encodingOffset; - CARD32 bitmapSizes[GLYPHPADOPTIONS]; - CARD32 *offsets = 0; - Bool hasBDFAccelerators; - - pFont->info.nprops = 0; - pFont->info.props = 0; - if (!(tables = pcfReadTOC(file, &ntables))) - goto Bail; - - /* properties */ - - if (!pcfGetProperties(&pFont->info, file, tables, ntables)) - goto Bail; - - /* Use the old accelerators if no BDF accelerators are in the file */ - - hasBDFAccelerators = pcfHasType (tables, ntables, PCF_BDF_ACCELERATORS); - if (!hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_ACCELERATORS)) - goto Bail; - - /* metrics */ - - if (!pcfSeekToType(file, tables, ntables, PCF_METRICS, &format, &size)) { - goto Bail; - } - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nmetrics = pcfGetINT32(file, format); - else - nmetrics = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); - if (!metrics) { - pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); - goto Bail; - } - for (i = 0; i < nmetrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } - - /* bitmaps */ - - if (!pcfSeekToType(file, tables, ntables, PCF_BITMAPS, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - - nbitmaps = pcfGetINT32(file, format); - if (nbitmaps != nmetrics || IS_EOF(file)) - goto Bail; - - offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); - if (!offsets) { - pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); - goto Bail; - } - for (i = 0; i < nbitmaps; i++) { - offsets[i] = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - } - - for (i = 0; i < GLYPHPADOPTIONS; i++) { - bitmapSizes[i] = pcfGetINT32(file, format); - if (IS_EOF(file)) goto Bail; - } - - sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; - /* guard against completely empty font */ - bitmaps = xalloc(sizebitmaps ? sizebitmaps : 1); - if (!bitmaps) { - pcfError("pcfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps ? sizebitmaps : 1); - goto Bail; - } - FontFileRead(file, bitmaps, sizebitmaps); - if (IS_EOF(file)) goto Bail; - position += sizebitmaps; - - if (PCF_BIT_ORDER(format) != bit) - BitOrderInvert((unsigned char *)bitmaps, sizebitmaps); - if ((PCF_BYTE_ORDER(format) == PCF_BIT_ORDER(format)) != (bit == byte)) { - switch (bit == byte ? PCF_SCAN_UNIT(format) : scan) { - case 1: - break; - case 2: - TwoByteSwap((unsigned char *)bitmaps, sizebitmaps); - break; - case 4: - FourByteSwap((unsigned char *)bitmaps, sizebitmaps); - break; - } - } - if (PCF_GLYPH_PAD(format) != glyph) { - char *padbitmaps; - int sizepadbitmaps; - int old, - new; - xCharInfo *metric; - - sizepadbitmaps = bitmapSizes[PCF_SIZE_TO_INDEX(glyph)]; - padbitmaps = (char *) xalloc(sizepadbitmaps); - if (!padbitmaps) { - pcfError("pcfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); - goto Bail; - } - new = 0; - for (i = 0; i < nbitmaps; i++) { - old = offsets[i]; - metric = &metrics[i].metrics; - offsets[i] = new; - new += RepadBitmap(bitmaps + old, padbitmaps + new, - PCF_GLYPH_PAD(format), glyph, - metric->rightSideBearing - metric->leftSideBearing, - metric->ascent + metric->descent); - } - xfree(bitmaps); - bitmaps = padbitmaps; - } - for (i = 0; i < nbitmaps; i++) - metrics[i].bits = bitmaps + offsets[i]; - - xfree(offsets); - offsets = NULL; - - /* ink metrics ? */ - - ink_metrics = NULL; - if (pcfSeekToType(file, tables, ntables, PCF_INK_METRICS, &format, &size)) { - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nink_metrics = pcfGetINT32(file, format); - else - nink_metrics = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (nink_metrics != nmetrics) - goto Bail; - ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); - if (!ink_metrics) { - pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); - goto Bail; - } - for (i = 0; i < nink_metrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, ink_metrics + i)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, ink_metrics + i)) - goto Bail; - } - } - - /* encoding */ - - if (!pcfSeekToType(file, tables, ntables, PCF_BDF_ENCODINGS, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - - pFont->info.firstCol = pcfGetINT16(file, format); - pFont->info.lastCol = pcfGetINT16(file, format); - pFont->info.firstRow = pcfGetINT16(file, format); - pFont->info.lastRow = pcfGetINT16(file, format); - pFont->info.defaultCh = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (pFont->info.firstCol > pFont->info.lastCol || - pFont->info.firstRow > pFont->info.lastRow || - pFont->info.lastCol-pFont->info.firstCol > 255) goto Bail; - - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - - encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); - if (!encoding) { - pcfError("pcfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); - goto Bail; - } - - pFont->info.allExist = TRUE; - for (i = 0; i < nencoding; i++) { - encodingOffset = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (encodingOffset == 0xFFFF) { - pFont->info.allExist = FALSE; - } else { - if(!encoding[SEGMENT_MAJOR(i)]) { - encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if(!encoding[SEGMENT_MAJOR(i)]) - goto Bail; - } - ACCESSENCODINGL(encoding, i) = metrics + encodingOffset; - } - } - - /* BDF style accelerators (i.e. bounds based on encoded glyphs) */ - - if (hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_BDF_ACCELERATORS)) - goto Bail; - - bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); - if (!bitmapFont) { - pcfError("pcfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); - goto Bail; - } - - bitmapFont->version_num = PCF_FILE_VERSION; - bitmapFont->num_chars = nmetrics; - bitmapFont->num_tables = ntables; - bitmapFont->metrics = metrics; - bitmapFont->ink_metrics = ink_metrics; - bitmapFont->bitmaps = bitmaps; - bitmapFont->encoding = encoding; - bitmapFont->pDefault = (CharInfoPtr) 0; - if (pFont->info.defaultCh != (unsigned short) NO_SUCH_CHAR) { - unsigned int r, - c, - cols; - - r = pFont->info.defaultCh >> 8; - c = pFont->info.defaultCh & 0xFF; - if (pFont->info.firstRow <= r && r <= pFont->info.lastRow && - pFont->info.firstCol <= c && c <= pFont->info.lastCol) { - cols = pFont->info.lastCol - pFont->info.firstCol + 1; - r = r - pFont->info.firstRow; - c = c - pFont->info.firstCol; - bitmapFont->pDefault = ACCESSENCODING(encoding, r * cols + c); - } - } - bitmapFont->bitmapExtra = (BitmapExtraPtr) 0; - pFont->fontPrivate = (pointer) bitmapFont; - pFont->get_glyphs = bitmapGetGlyphs; - pFont->get_metrics = bitmapGetMetrics; - pFont->unload_font = pcfUnloadFont; - pFont->unload_glyphs = NULL; - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - xfree(tables); - return Successful; -Bail: - xfree(ink_metrics); - if(encoding) { - for(i=0; iinfo.props); - pFont->info.nprops = 0; - pFont->info.props = 0; - xfree (pFont->info.isStringProp); - xfree(bitmapFont); - xfree(tables); - xfree(offsets); - return AllocError; -} - -int -pcfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) -{ - PCFTablePtr tables; - int ntables; - CARD32 format; - CARD32 size; - int nencoding; - Bool hasBDFAccelerators; - - pFontInfo->isStringProp = NULL; - pFontInfo->props = NULL; - pFontInfo->nprops = 0; - - if (!(tables = pcfReadTOC(file, &ntables))) - goto Bail; - - /* properties */ - - if (!pcfGetProperties(pFontInfo, file, tables, ntables)) - goto Bail; - - /* Use the old accelerators if no BDF accelerators are in the file */ - - hasBDFAccelerators = pcfHasType (tables, ntables, PCF_BDF_ACCELERATORS); - if (!hasBDFAccelerators) - if (!pcfGetAccel (pFontInfo, file, tables, ntables, PCF_ACCELERATORS)) - goto Bail; - - /* encoding */ - - if (!pcfSeekToType(file, tables, ntables, PCF_BDF_ENCODINGS, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - - pFontInfo->firstCol = pcfGetINT16(file, format); - pFontInfo->lastCol = pcfGetINT16(file, format); - pFontInfo->firstRow = pcfGetINT16(file, format); - pFontInfo->lastRow = pcfGetINT16(file, format); - pFontInfo->defaultCh = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (pFontInfo->firstCol > pFontInfo->lastCol || - pFontInfo->firstRow > pFontInfo->lastRow || - pFontInfo->lastCol-pFontInfo->firstCol > 255) goto Bail; - - nencoding = (pFontInfo->lastCol - pFontInfo->firstCol + 1) * - (pFontInfo->lastRow - pFontInfo->firstRow + 1); - - pFontInfo->allExist = TRUE; - while (nencoding--) { - if (pcfGetINT16(file, format) == 0xFFFF) - pFontInfo->allExist = FALSE; - if (IS_EOF(file)) goto Bail; - } - if (IS_EOF(file)) goto Bail; - - /* BDF style accelerators (i.e. bounds based on encoded glyphs) */ - - if (hasBDFAccelerators) - if (!pcfGetAccel (pFontInfo, file, tables, ntables, PCF_BDF_ACCELERATORS)) - goto Bail; - - xfree(tables); - return Successful; -Bail: - pFontInfo->nprops = 0; - xfree (pFontInfo->props); - xfree (pFontInfo->isStringProp); - xfree(tables); - return AllocError; -} - -static void -pcfUnloadFont(FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - int i,nencoding; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - xfree(bitmapFont->ink_metrics); - if(bitmapFont->encoding) { - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - for(i=0; iencoding[i]); - } - xfree(bitmapFont->encoding); - xfree(bitmapFont->bitmaps); - xfree(bitmapFont->metrics); - xfree(pFont->info.isStringProp); - xfree(pFont->info.props); - xfree(bitmapFont); - DestroyFontRec(pFont); -} - -int -pmfReadFont(FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan) -{ - CARD32 format; - CARD32 size; - BitmapFontPtr bitmapFont = 0; - int i; - PCFTablePtr tables = 0; - int ntables; - int nmetrics; - int sizebitmaps; - int nink_metrics; - CharInfoPtr metrics = 0; - xCharInfo *ink_metrics = 0; - char *bitmaps = 0; - CharInfoPtr **encoding = 0; - int nencoding = 0; - int encodingOffset; - Bool hasBDFAccelerators; - CharInfoPtr pci; - - pFont->info.nprops = 0; - pFont->info.props = 0; - - if (!(tables = pcfReadTOC(file, &ntables))) - goto Bail; - - /* properties */ - - if (!pcfGetProperties(&pFont->info, file, tables, ntables)) - goto Bail; - - /* Use the old accelerators if no BDF accelerators are in the file */ - - hasBDFAccelerators = pcfHasType (tables, ntables, PCF_BDF_ACCELERATORS); - if (!hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_ACCELERATORS)) - goto Bail; - - /* metrics */ - - if (!pcfSeekToType(file, tables, ntables, PCF_METRICS, &format, &size)) { - goto Bail; - } - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nmetrics = pcfGetINT32(file, format); - else - nmetrics = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); - if (!metrics) { - pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); - goto Bail; - } - for (i = 0; i < nmetrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } - - /* Set the bitmaps to all point to the same zero filled array - * that is the size of the largest bitmap. - */ - - pci = metrics; - sizebitmaps = 0; - for (i = 0; i < nmetrics; i++) - { - sizebitmaps = MAX(sizebitmaps,BYTES_FOR_GLYPH(pci, glyph)); - pci++; - } - -#ifdef FONTMODULE - sizebitmaps = 1024; /* Default - we xalloc the size anyway */ -#else - sizebitmaps = BUFSIZ; -#endif - /* guard against completely empty font */ - bitmaps = (char *) xalloc(sizebitmaps); - if (!bitmaps) { - pcfError("pmfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps); - goto Bail; - } - - memset(bitmaps,0,sizebitmaps); - for (i = 0; i < nmetrics; i++) - metrics[i].bits = bitmaps; - - /* ink metrics ? */ - - ink_metrics = NULL; - if (pcfSeekToType(file, tables, ntables, PCF_INK_METRICS, &format, &size)) { - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nink_metrics = pcfGetINT32(file, format); - else - nink_metrics = pcfGetINT16(file, format); - if (nink_metrics != nmetrics) - goto Bail; - if (IS_EOF(file)) goto Bail; - ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); - if (!ink_metrics) { - pcfError("pmfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); - goto Bail; - } - for (i = 0; i < nink_metrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, ink_metrics + i)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, ink_metrics + i)) - goto Bail; - } - } - - /* encoding */ - - if (!pcfSeekToType(file, tables, ntables, PCF_BDF_ENCODINGS, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - - pFont->info.firstCol = pcfGetINT16(file, format); - pFont->info.lastCol = pcfGetINT16(file, format); - pFont->info.firstRow = pcfGetINT16(file, format); - pFont->info.lastRow = pcfGetINT16(file, format); - pFont->info.defaultCh = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - - encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); - if (!encoding) { - pcfError("pmfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); - goto Bail; - } - pFont->info.allExist = TRUE; - for (i = 0; i < nencoding; i++) { - encodingOffset = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (encodingOffset == 0xFFFF) { - pFont->info.allExist = FALSE; - } else { - if(!encoding[SEGMENT_MAJOR(i)]) { - encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if(!encoding[SEGMENT_MAJOR(i)]) - goto Bail; - } - ACCESSENCODINGL(encoding, i) = metrics + encodingOffset; - } - } - if (IS_EOF(file)) goto Bail; - - /* BDF style accelerators (i.e. bounds based on encoded glyphs) */ - - if (hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_BDF_ACCELERATORS)) - goto Bail; - - bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); - if (!bitmapFont) { - pcfError("pmfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); - goto Bail; - } - - bitmapFont->version_num = PCF_FILE_VERSION; - bitmapFont->num_chars = nmetrics; - bitmapFont->num_tables = ntables; - bitmapFont->metrics = metrics; - bitmapFont->ink_metrics = ink_metrics; - bitmapFont->bitmaps = bitmaps; - bitmapFont->encoding = encoding; - bitmapFont->pDefault = (CharInfoPtr) 0; - if (pFont->info.defaultCh != (unsigned short) NO_SUCH_CHAR) { - unsigned int r, - c, - cols; - - r = pFont->info.defaultCh >> 8; - c = pFont->info.defaultCh & 0xFF; - if (pFont->info.firstRow <= r && r <= pFont->info.lastRow && - pFont->info.firstCol <= c && c <= pFont->info.lastCol) { - cols = pFont->info.lastCol - pFont->info.firstCol + 1; - r = r - pFont->info.firstRow; - c = c - pFont->info.firstCol; - bitmapFont->pDefault = ACCESSENCODING(encoding, r * cols + c); - } - } - bitmapFont->bitmapExtra = (BitmapExtraPtr) 0; - pFont->fontPrivate = (pointer) bitmapFont; - pFont->get_glyphs = bitmapGetGlyphs; - pFont->get_metrics = bitmapGetMetrics; - pFont->unload_font = pcfUnloadFont; - pFont->unload_glyphs = NULL; - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - xfree(tables); - return Successful; -Bail: - xfree(ink_metrics); - if(encoding) { - for(i=0; iinfo.props); - pFont->info.nprops = 0; - pFont->info.props = 0; - xfree (pFont->info.isStringProp); - xfree(bitmapFont); - xfree(tables); - return AllocError; -} diff --git a/nx-X11/lib/font/bitmap/pcfwrite.c b/nx-X11/lib/font/bitmap/pcfwrite.c deleted file mode 100644 index 8d5e9425f..000000000 --- a/nx-X11/lib/font/bitmap/pcfwrite.c +++ /dev/null @@ -1,468 +0,0 @@ -/* $Xorg: pcfwrite.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ -/* - -Copyright 1990, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.11 2003/11/17 22:20:22 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -/* Write PCF font files */ - -static CARD32 current_position; - -static int -pcfWrite(FontFilePtr file, char *b, int c) -{ - current_position += c; - return FontFileWrite(file, b, c); -} - -static int -pcfPutLSB32(FontFilePtr file, int c) -{ - current_position += 4; - (void) FontFilePutc(c, file); - (void) FontFilePutc(c >> 8, file); - (void) FontFilePutc(c >> 16, file); - return FontFilePutc(c >> 24, file); -} - -static int -pcfPutINT32(FontFilePtr file, CARD32 format, int c) -{ - current_position += 4; - if (PCF_BYTE_ORDER(format) == MSBFirst) { - (void) FontFilePutc(c >> 24, file); - (void) FontFilePutc(c >> 16, file); - (void) FontFilePutc(c >> 8, file); - return FontFilePutc(c, file); - } else { - (void) FontFilePutc(c, file); - (void) FontFilePutc(c >> 8, file); - (void) FontFilePutc(c >> 16, file); - return FontFilePutc(c >> 24, file); - } -} - -static int -pcfPutINT16(FontFilePtr file, CARD32 format, int c) -{ - current_position += 2; - if (PCF_BYTE_ORDER(format) == MSBFirst) { - (void) FontFilePutc(c >> 8, file); - return FontFilePutc(c, file); - } else { - (void) FontFilePutc(c, file); - return FontFilePutc(c >> 8, file); - } -} - -/*ARGSUSED*/ -static int -pcfPutINT8(FontFilePtr file, CARD32 format, int c) -{ - current_position += 1; - return FontFilePutc(c, file); -} - -static void -pcfWriteTOC(FontFilePtr file, PCFTablePtr table, int count) -{ - CARD32 version; - int i; - - version = PCF_FILE_VERSION; - pcfPutLSB32(file, version); - pcfPutLSB32(file, count); - for (i = 0; i < count; i++) { - pcfPutLSB32(file, table->type); - pcfPutLSB32(file, table->format); - pcfPutLSB32(file, table->size); - pcfPutLSB32(file, table->offset); - table++; - } -} - -static void -pcfPutCompressedMetric(FontFilePtr file, CARD32 format, xCharInfo *metric) -{ - pcfPutINT8(file, format, metric->leftSideBearing + 0x80); - pcfPutINT8(file, format, metric->rightSideBearing + 0x80); - pcfPutINT8(file, format, metric->characterWidth + 0x80); - pcfPutINT8(file, format, metric->ascent + 0x80); - pcfPutINT8(file, format, metric->descent + 0x80); -} - -static void -pcfPutMetric(FontFilePtr file, CARD32 format, xCharInfo *metric) -{ - pcfPutINT16(file, format, metric->leftSideBearing); - pcfPutINT16(file, format, metric->rightSideBearing); - pcfPutINT16(file, format, metric->characterWidth); - pcfPutINT16(file, format, metric->ascent); - pcfPutINT16(file, format, metric->descent); - pcfPutINT16(file, format, metric->attributes); -} - -static void -pcfPutBitmap(FontFilePtr file, CARD32 format, CharInfoPtr pCI) -{ - int count; - unsigned char *bits; - - count = BYTES_FOR_GLYPH(pCI, PCF_GLYPH_PAD(format)); - bits = (unsigned char *) pCI->bits; - current_position += count; - while (count--) - FontFilePutc(*bits++, file); -} - -static void -pcfPutAccel(FontFilePtr file, CARD32 format, FontInfoPtr pFontInfo) -{ - pcfPutINT8(file, format, pFontInfo->noOverlap); - pcfPutINT8(file, format, pFontInfo->constantMetrics); - pcfPutINT8(file, format, pFontInfo->terminalFont); - pcfPutINT8(file, format, pFontInfo->constantWidth); - pcfPutINT8(file, format, pFontInfo->inkInside); - pcfPutINT8(file, format, pFontInfo->inkMetrics); - pcfPutINT8(file, format, pFontInfo->drawDirection); - pcfPutINT8(file, format, 0); - pcfPutINT32(file, format, pFontInfo->fontAscent); - pcfPutINT32(file, format, pFontInfo->fontDescent); - pcfPutINT32(file, format, pFontInfo->maxOverlap); - pcfPutMetric(file, format, &pFontInfo->minbounds); - pcfPutMetric(file, format, &pFontInfo->maxbounds); - if (PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) { - pcfPutMetric(file, format, &pFontInfo->ink_minbounds); - pcfPutMetric(file, format, &pFontInfo->ink_maxbounds); - } -} - -#define S32 4 -#define S16 2 -#define S8 1 - -#define Pad(s) (RoundUp(s) - (s)) -#define RoundUp(s) (((s) + 3) & ~3) - -#define Compressable(i) (-128 <= (i) && (i) <= 127) - -#define CanCompressMetric(m) (Compressable((m)->leftSideBearing) && \ - Compressable((m)->rightSideBearing) && \ - Compressable((m)->characterWidth) && \ - Compressable((m)->ascent) && \ - Compressable((m)->descent) && \ - (m)->attributes == 0) - -#define CanCompressMetrics(min,max) (CanCompressMetric(min) && CanCompressMetric(max)) - -static char * -pcfNameForAtom(Atom a) -{ - return NameForAtom(a); -} - -int -pcfWriteFont(FontPtr pFont, FontFilePtr file) -{ - PCFTableRec tables[32], - *table; - CARD32 mask, - bit; - int ntables; - int size; - CARD32 format; - int i; - int cur_table; - int prop_string_size; - int glyph_string_size; - xCharInfo *minbounds, - *maxbounds; - xCharInfo *ink_minbounds, - *ink_maxbounds; - BitmapFontPtr bitmapFont; - int nencodings = 0; - int header_size; - FontPropPtr offsetProps; - int prop_pad = 0; - char *atom_name; - int glyph; - CARD32 offset; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - if (bitmapFont->bitmapExtra) { - minbounds = &bitmapFont->bitmapExtra->info.minbounds; - maxbounds = &bitmapFont->bitmapExtra->info.maxbounds; - ink_minbounds = &bitmapFont->bitmapExtra->info.ink_minbounds; - ink_maxbounds = &bitmapFont->bitmapExtra->info.ink_maxbounds; - } else { - minbounds = &pFont->info.minbounds; - maxbounds = &pFont->info.maxbounds; - ink_minbounds = &pFont->info.ink_minbounds; - ink_maxbounds = &pFont->info.ink_maxbounds; - } - offsetProps = (FontPropPtr) xalloc(pFont->info.nprops * sizeof(FontPropRec)); - if (!offsetProps) { - pcfError("pcfWriteFont(): Couldn't allocate offsetProps (%d*%d)", pFont->info.nprops, sizeof(FontPropRec)); - return AllocError; - } - prop_string_size = 0; - for (i = 0; i < pFont->info.nprops; i++) { - offsetProps[i].name = prop_string_size; - prop_string_size += strlen(pcfNameForAtom(pFont->info.props[i].name)) + 1; - if (pFont->info.isStringProp[i]) { - offsetProps[i].value = prop_string_size; - prop_string_size += strlen(pcfNameForAtom(pFont->info.props[i].value)) + 1; - } else - offsetProps[i].value = pFont->info.props[i].value; - } - format = PCF_FORMAT(pFont->bit, pFont->byte, pFont->glyph, pFont->scan); - mask = 0xFFFFFFF; - ntables = 0; - table = tables; - while (mask) { - bit = lowbit(mask); - mask &= ~bit; - table->type = bit; - switch (bit) { - case PCF_PROPERTIES: - table->format = PCF_DEFAULT_FORMAT | format; - size = S32 + S32 + (S32 + S8 + S32) * pFont->info.nprops; - prop_pad = Pad(size); - table->size = RoundUp(size) + S32 + - RoundUp(prop_string_size); - table++; - break; - case PCF_ACCELERATORS: - if (bitmapFont->bitmapExtra->info.inkMetrics) - table->format = PCF_ACCEL_W_INKBOUNDS | format; - else - table->format = PCF_DEFAULT_FORMAT | format; - table->size = 100; - table++; - break; - case PCF_METRICS: - if (CanCompressMetrics(minbounds, maxbounds)) { - table->format = PCF_COMPRESSED_METRICS | format; - size = S32 + S16 + bitmapFont->num_chars * (5 * S8); - table->size = RoundUp(size); - } else { - table->format = PCF_DEFAULT_FORMAT | format; - table->size = S32 + S32 + bitmapFont->num_chars * (6 * S16); - } - table++; - break; - case PCF_BITMAPS: - table->format = PCF_DEFAULT_FORMAT | format; - size = S32 + S32 + bitmapFont->num_chars * S32 + - GLYPHPADOPTIONS * S32 + - bitmapFont->bitmapExtra->bitmapsSizes[PCF_GLYPH_PAD_INDEX(format)]; - table->size = RoundUp(size); - table++; - break; - case PCF_INK_METRICS: - if (bitmapFont->ink_metrics) { - if (CanCompressMetrics(ink_minbounds, ink_maxbounds)) { - table->format = PCF_COMPRESSED_METRICS | format; - size = S32 + S16 + bitmapFont->num_chars * (5 * S8); - table->size = RoundUp(size); - } else { - table->format = PCF_DEFAULT_FORMAT | format; - table->size = S32 + S32 + bitmapFont->num_chars * (6 * S16); - } - table++; - } - break; - case PCF_BDF_ENCODINGS: - table->format = PCF_DEFAULT_FORMAT | format; - nencodings = (pFont->info.lastRow - pFont->info.firstRow + 1) * - (pFont->info.lastCol - pFont->info.firstCol + 1); - size = S32 + 5 * S16 + nencodings * S16; - table->size = RoundUp(size); - table++; - break; - case PCF_SWIDTHS: - table->format = PCF_DEFAULT_FORMAT | format; - table->size = S32 + S32 + bitmapFont->num_chars * S32; - table++; - break; - case PCF_GLYPH_NAMES: - table->format = PCF_DEFAULT_FORMAT | format; - glyph_string_size = 0; - for (i = 0; i < bitmapFont->num_chars; i++) - glyph_string_size += strlen(pcfNameForAtom(bitmapFont->bitmapExtra->glyphNames[i])) + 1; - table->size = S32 + S32 + bitmapFont->num_chars * S32 + - S32 + RoundUp(glyph_string_size); - table++; - break; - case PCF_BDF_ACCELERATORS: - if (pFont->info.inkMetrics) - table->format = PCF_ACCEL_W_INKBOUNDS | format; - else - table->format = PCF_DEFAULT_FORMAT | format; - table->size = 100; - table++; - break; - } - } - ntables = table - tables; - offset = 0; - header_size = S32 + S32 + ntables * (4 * S32); - offset = header_size; - for (cur_table = 0, table = tables; - cur_table < ntables; - cur_table++, table++) { - table->offset = offset; - offset += table->size; - } - current_position = 0; - pcfWriteTOC(file, tables, ntables); - for (cur_table = 0, table = tables; - cur_table < ntables; - cur_table++, table++) { - if (current_position > table->offset) { - printf("can't go backwards... %d > %d\n", - (int)current_position, (int)table->offset); - xfree(offsetProps); - return BadFontName; - } - while (current_position < table->offset) - pcfPutINT8(file, format, '\0'); - pcfPutLSB32(file, table->format); - switch (table->type) { - case PCF_PROPERTIES: - pcfPutINT32(file, format, pFont->info.nprops); - for (i = 0; i < pFont->info.nprops; i++) { - pcfPutINT32(file, format, offsetProps[i].name); - pcfPutINT8(file, format, pFont->info.isStringProp[i]); - pcfPutINT32(file, format, offsetProps[i].value); - } - for (i = 0; i < prop_pad; i++) - pcfPutINT8(file, format, 0); - pcfPutINT32(file, format, prop_string_size); - for (i = 0; i < pFont->info.nprops; i++) { - atom_name = pcfNameForAtom(pFont->info.props[i].name); - pcfWrite(file, atom_name, strlen(atom_name) + 1); - if (pFont->info.isStringProp[i]) { - atom_name = pcfNameForAtom(pFont->info.props[i].value); - pcfWrite(file, atom_name, strlen(atom_name) + 1); - } - } - break; - case PCF_ACCELERATORS: - pcfPutAccel(file, table->format, &bitmapFont->bitmapExtra->info); - break; - case PCF_METRICS: - if (PCF_FORMAT_MATCH(table->format, PCF_COMPRESSED_METRICS)) { - pcfPutINT16(file, format, bitmapFont->num_chars); - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutCompressedMetric(file, format, &bitmapFont->metrics[i].metrics); - } else { - pcfPutINT32(file, format, bitmapFont->num_chars); - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutMetric(file, format, &bitmapFont->metrics[i].metrics); - } - break; - case PCF_BITMAPS: - pcfPutINT32(file, format, bitmapFont->num_chars); - glyph = PCF_GLYPH_PAD(format); - offset = 0; - for (i = 0; i < bitmapFont->num_chars; i++) { - pcfPutINT32(file, format, offset); - offset += BYTES_FOR_GLYPH(&bitmapFont->metrics[i], glyph); - } - for (i = 0; i < GLYPHPADOPTIONS; i++) { - pcfPutINT32(file, format, - bitmapFont->bitmapExtra->bitmapsSizes[i]); - } - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutBitmap(file, format, &bitmapFont->metrics[i]); - break; - case PCF_INK_METRICS: - if (PCF_FORMAT_MATCH(table->format, PCF_COMPRESSED_METRICS)) { - pcfPutINT16(file, format, bitmapFont->num_chars); - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutCompressedMetric(file, format, &bitmapFont->ink_metrics[i]); - } else { - pcfPutINT32(file, format, bitmapFont->num_chars); - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutMetric(file, format, &bitmapFont->ink_metrics[i]); - } - break; - case PCF_BDF_ENCODINGS: - pcfPutINT16(file, format, pFont->info.firstCol); - pcfPutINT16(file, format, pFont->info.lastCol); - pcfPutINT16(file, format, pFont->info.firstRow); - pcfPutINT16(file, format, pFont->info.lastRow); - pcfPutINT16(file, format, pFont->info.defaultCh); - for (i = 0; i < nencodings; i++) { - if (ACCESSENCODING(bitmapFont->encoding,i)) - pcfPutINT16(file, format, - ACCESSENCODING(bitmapFont->encoding, i) - - bitmapFont->metrics); - else - pcfPutINT16(file, format, 0xFFFF); - } - break; - case PCF_SWIDTHS: - pcfPutINT32(file, format, bitmapFont->num_chars); - for (i = 0; i < bitmapFont->num_chars; i++) - pcfPutINT32(file, format, bitmapFont->bitmapExtra->sWidths[i]); - break; - case PCF_GLYPH_NAMES: - pcfPutINT32(file, format, bitmapFont->num_chars); - offset = 0; - for (i = 0; i < bitmapFont->num_chars; i++) { - pcfPutINT32(file, format, offset); - offset += strlen(pcfNameForAtom(bitmapFont->bitmapExtra->glyphNames[i])) + 1; - } - pcfPutINT32(file, format, offset); - for (i = 0; i < bitmapFont->num_chars; i++) { - atom_name = pcfNameForAtom(bitmapFont->bitmapExtra->glyphNames[i]); - pcfWrite(file, atom_name, strlen(atom_name) + 1); - } - break; - case PCF_BDF_ACCELERATORS: - pcfPutAccel(file, table->format, &pFont->info); - break; - } - } - - xfree(offsetProps); - return Successful; -} diff --git a/nx-X11/lib/font/bitmap/snfread.c b/nx-X11/lib/font/bitmap/snfread.c deleted file mode 100644 index 01b6bf382..000000000 --- a/nx-X11/lib/font/bitmap/snfread.c +++ /dev/null @@ -1,514 +0,0 @@ -/* $Xorg: snfread.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ -/************************************************************************ -Copyright 1989 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. - -************************************************************************/ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.12 2003/11/17 22:20:22 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifndef FONTMODULE -#include -#endif - -#include -#include -#include "snfstr.h" - -#include - -void -snfError(const char* message, ...) -{ - va_list args; - - va_start(args, message); - - fprintf(stderr, "SNF Error: "); - vfprintf(stderr, message, args); - va_end(args); -} - -static void snfUnloadFont(FontPtr pFont); - -static int -snfReadCharInfo(FontFilePtr file, CharInfoPtr charInfo, char *base) -{ - snfCharInfoRec snfCharInfo; - -#define Width(m) ((m).rightSideBearing - (m).leftSideBearing) -#define Height(m) ((m).ascent + (m).descent) - - if (FontFileRead(file, (char *) &snfCharInfo, sizeof snfCharInfo) != - sizeof(snfCharInfo)) { - return BadFontName; - } - charInfo->metrics = snfCharInfo.metrics; - if (snfCharInfo.exists) - charInfo->bits = base + snfCharInfo.byteOffset; - else - charInfo->bits = 0; - return Successful; -} - -static int -snfReadxCharInfo(FontFilePtr file, xCharInfo *charInfo) -{ - snfCharInfoRec snfCharInfo; - - if (FontFileRead(file, (char *) &snfCharInfo, sizeof snfCharInfo) != - sizeof(snfCharInfo)) { - return BadFontName; - } - *charInfo = snfCharInfo.metrics; - return Successful; -} - -static void -snfCopyInfo(snfFontInfoPtr snfInfo, FontInfoPtr pFontInfo) -{ - pFontInfo->firstCol = snfInfo->firstCol; - pFontInfo->lastCol = snfInfo->lastCol; - pFontInfo->firstRow = snfInfo->firstRow; - pFontInfo->lastRow = snfInfo->lastRow; - pFontInfo->defaultCh = snfInfo->chDefault; - pFontInfo->noOverlap = snfInfo->noOverlap; - pFontInfo->terminalFont = snfInfo->terminalFont; - pFontInfo->constantMetrics = snfInfo->constantMetrics; - pFontInfo->constantWidth = snfInfo->constantWidth; - pFontInfo->inkInside = snfInfo->inkInside; - pFontInfo->inkMetrics = snfInfo->inkMetrics; - pFontInfo->allExist = snfInfo->allExist; - pFontInfo->drawDirection = snfInfo->drawDirection; - pFontInfo->anamorphic = FALSE; - pFontInfo->cachable = TRUE; - pFontInfo->maxOverlap = 0; - pFontInfo->minbounds = snfInfo->minbounds.metrics; - pFontInfo->maxbounds = snfInfo->maxbounds.metrics; - pFontInfo->fontAscent = snfInfo->fontAscent; - pFontInfo->fontDescent = snfInfo->fontDescent; - pFontInfo->nprops = snfInfo->nProps; -} - -static int -snfReadProps(snfFontInfoPtr snfInfo, FontInfoPtr pFontInfo, FontFilePtr file) -{ - char *strings; - FontPropPtr pfp; - snfFontPropPtr psnfp; - char *propspace; - int bytestoalloc; - int i; - - bytestoalloc = snfInfo->nProps * sizeof(snfFontPropRec) + - BYTESOFSTRINGINFO(snfInfo); - propspace = (char *) xalloc(bytestoalloc); - if (!propspace) { - snfError("snfReadProps(): Couldn't allocate propspace (%d)\n", bytestoalloc); - return AllocError; - } - - if (FontFileRead(file, propspace, bytestoalloc) != bytestoalloc) { - xfree(propspace); - return BadFontName; - } - psnfp = (snfFontPropPtr) propspace; - - strings = propspace + BYTESOFPROPINFO(snfInfo); - - for (i = 0, pfp = pFontInfo->props; i < snfInfo->nProps; i++, pfp++, psnfp++) { - pfp->name = MakeAtom(&strings[psnfp->name], - (unsigned) strlen(&strings[psnfp->name]), 1); - pFontInfo->isStringProp[i] = psnfp->indirect; - if (psnfp->indirect) - pfp->value = (INT32) MakeAtom(&strings[psnfp->value], - (unsigned) strlen(&strings[psnfp->value]), 1); - else - pfp->value = psnfp->value; - } - - xfree(propspace); - return Successful; -} - -static int -snfReadHeader(snfFontInfoPtr snfInfo, FontFilePtr file) -{ - if (FontFileRead(file, (char *) snfInfo, sizeof *snfInfo) != sizeof *snfInfo) - return BadFontName; - - if (snfInfo->version1 != FONT_FILE_VERSION || - snfInfo->version2 != FONT_FILE_VERSION) - return BadFontName; - return Successful; -} - -static int snf_set; -static int snf_bit, snf_byte, snf_glyph, snf_scan; - -void -SnfSetFormat (int bit, int byte, int glyph, int scan) -{ - snf_bit = bit; - snf_byte = byte; - snf_glyph = glyph; - snf_scan = scan; - snf_set = 1; -} - -static void -SnfGetFormat (int *bit, int *byte, int *glyph, int *scan) -{ - if (!snf_set) - FontDefaultFormat (&snf_bit, &snf_byte, &snf_glyph, &snf_scan); - *bit = snf_bit; - *byte = snf_byte; - *glyph = snf_glyph; - *scan = snf_scan; -} - -int -snfReadFont(FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan) -{ - snfFontInfoRec fi; - unsigned bytestoalloc; - int i, j; - char *fontspace; - BitmapFontPtr bitmapFont; - int num_chars; - int bitmapsSize; - int ret; - int metrics_off; - int encoding_off; - int props_off; - int isStringProp_off; - int ink_off; - char *bitmaps; - int def_bit, def_byte, def_glyph, def_scan; - - ret = snfReadHeader(&fi, file); - if (ret != Successful) - return ret; - - SnfGetFormat (&def_bit, &def_byte, &def_glyph, &def_scan); - - /* - * we'll allocate one chunk of memory and split it among the various parts - * of the font: - * - * BitmapFontRec CharInfoRec's Glyphs Encoding DIX Properties Ink CharInfoRec's - * - * If the glyphpad is not the same as the font file, then the glyphs - * are allocated separately, to be later realloc'ed when we know - * how big to make them. - */ - - bitmapsSize = BYTESOFGLYPHINFO(&fi); - num_chars = n2dChars(&fi); - bytestoalloc = sizeof(BitmapFontRec); /* bitmapFont */ - metrics_off = bytestoalloc; - bytestoalloc += num_chars * sizeof(CharInfoRec); /* metrics */ - encoding_off = bytestoalloc; - bytestoalloc += NUM_SEGMENTS(num_chars) * sizeof(CharInfoPtr**); - /* encoding */ - props_off = bytestoalloc; - bytestoalloc += fi.nProps * sizeof(FontPropRec); /* props */ - isStringProp_off = bytestoalloc; - bytestoalloc += fi.nProps * sizeof(char); /* isStringProp */ - bytestoalloc = (bytestoalloc + 3) & ~3; - ink_off = bytestoalloc; - if (fi.inkMetrics) - bytestoalloc += num_chars * sizeof(xCharInfo); /* ink_metrics */ - - fontspace = (char *) xalloc(bytestoalloc); - if (!fontspace) { - snfError("snfReadFont(): Couldn't allocate fontspace (%d)\n", bytestoalloc); - return AllocError; - } - bitmaps = (char *) xalloc (bitmapsSize); - if (!bitmaps) - { - snfError("snfReadFont(): Couldn't allocate bitmaps (%d)\n", bitmapsSize); - xfree (fontspace); - return AllocError; - } - /* - * now fix up pointers - */ - - bitmapFont = (BitmapFontPtr) fontspace; - bitmapFont->num_chars = num_chars; - bitmapFont->metrics = (CharInfoPtr) (fontspace + metrics_off); - bitmapFont->encoding = (CharInfoPtr **) (fontspace + encoding_off); - bitmapFont->bitmaps = bitmaps; - bitmapFont->pDefault = NULL; - bitmapFont->bitmapExtra = NULL; - pFont->info.props = (FontPropPtr) (fontspace + props_off); - pFont->info.isStringProp = (char *) (fontspace + isStringProp_off); - if (fi.inkMetrics) - bitmapFont->ink_metrics = (xCharInfo *) (fontspace + ink_off); - else - bitmapFont->ink_metrics = 0; - - /* - * read the CharInfo - */ - - ret = Successful; - memset(bitmapFont->encoding, 0, - NUM_SEGMENTS(num_chars)*sizeof(CharInfoPtr*)); - for (i = 0; ret == Successful && i < num_chars; i++) { - ret = snfReadCharInfo(file, &bitmapFont->metrics[i], bitmaps); - if (bitmapFont->metrics[i].bits) { - if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { - bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { - ret = AllocError; - break; - } - } - ACCESSENCODINGL(bitmapFont->encoding,i) = &bitmapFont->metrics[i]; - } - } - - if (ret != Successful) { - xfree(bitmaps); - if(bitmapFont->encoding) { - for(j=0; jencoding[i]); - } - xfree(fontspace); - return ret; - } - /* - * read the glyphs - */ - - if (FontFileRead(file, bitmaps, bitmapsSize) != bitmapsSize) { - xfree(bitmaps); - xfree(fontspace); - return BadFontName; - } - - if (def_bit != bit) - BitOrderInvert((unsigned char *)bitmaps, bitmapsSize); - if ((def_byte == def_bit) != (bit == byte)) { - switch (bit == byte ? def_scan : scan) { - case 1: - break; - case 2: - TwoByteSwap((unsigned char *)bitmaps, bitmapsSize); - break; - case 4: - FourByteSwap((unsigned char *)bitmaps, bitmapsSize); - break; - } - } - if (def_glyph != glyph) { - char *padbitmaps; - int sizepadbitmaps; - int sizechar; - CharInfoPtr metric; - - sizepadbitmaps = 0; - metric = bitmapFont->metrics; - for (i = 0; i < num_chars; i++) - { - if (metric->bits) - sizepadbitmaps += BYTES_FOR_GLYPH(metric,glyph); - metric++; - } - padbitmaps = (char *) xalloc(sizepadbitmaps); - if (!padbitmaps) { - snfError("snfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); - xfree (bitmaps); - xfree (fontspace); - return AllocError; - } - metric = bitmapFont->metrics; - bitmapFont->bitmaps = padbitmaps; - for (i = 0; i < num_chars; i++) { - sizechar = RepadBitmap(metric->bits, padbitmaps, - def_glyph, glyph, - metric->metrics.rightSideBearing - - metric->metrics.leftSideBearing, - metric->metrics.ascent + metric->metrics.descent); - metric->bits = padbitmaps; - padbitmaps += sizechar; - metric++; - } - xfree(bitmaps); - } - - /* now read and atom'ize properties */ - - ret = snfReadProps(&fi, &pFont->info, file); - if (ret != Successful) { - xfree(fontspace); - return ret; - } - snfCopyInfo(&fi, &pFont->info); - - /* finally, read the ink metrics if the exist */ - - if (fi.inkMetrics) { - ret = Successful; - ret = snfReadxCharInfo(file, &pFont->info.ink_minbounds); - ret = snfReadxCharInfo(file, &pFont->info.ink_maxbounds); - for (i = 0; ret == Successful && i < num_chars; i++) - ret = snfReadxCharInfo(file, &bitmapFont->ink_metrics[i]); - if (ret != Successful) { - xfree(fontspace); - return ret; - } - } else { - pFont->info.ink_minbounds = pFont->info.minbounds; - pFont->info.ink_maxbounds = pFont->info.maxbounds; - } - - if (pFont->info.defaultCh != (unsigned short) NO_SUCH_CHAR) { - unsigned int r, - c, - cols; - - r = pFont->info.defaultCh >> 8; - c = pFont->info.defaultCh & 0xFF; - if (pFont->info.firstRow <= r && r <= pFont->info.lastRow && - pFont->info.firstCol <= c && c <= pFont->info.lastCol) { - cols = pFont->info.lastCol - pFont->info.firstCol + 1; - r = r - pFont->info.firstRow; - c = c - pFont->info.firstCol; - bitmapFont->pDefault = &bitmapFont->metrics[r * cols + c]; - } - } - bitmapFont->bitmapExtra = (BitmapExtraPtr) 0; - pFont->fontPrivate = (pointer) bitmapFont; - pFont->get_glyphs = bitmapGetGlyphs; - pFont->get_metrics = bitmapGetMetrics; - pFont->unload_font = snfUnloadFont; - pFont->unload_glyphs = NULL; - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - return Successful; -} - -int -snfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) -{ - int ret; - snfFontInfoRec fi; - int bytestoskip; - int num_chars; - - ret = snfReadHeader(&fi, file); - if (ret != Successful) - return ret; - snfCopyInfo(&fi, pFontInfo); - - pFontInfo->props = (FontPropPtr) xalloc(fi.nProps * sizeof(FontPropRec)); - if (!pFontInfo->props) { - snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n", fi.nProps, sizeof(FontPropRec)); - return AllocError; - } - pFontInfo->isStringProp = (char *) xalloc(fi.nProps * sizeof(char)); - if (!pFontInfo->isStringProp) { - snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n", fi.nProps, sizeof(char)); - xfree(pFontInfo->props); - return AllocError; - } - num_chars = n2dChars(&fi); - bytestoskip = num_chars * sizeof(snfCharInfoRec); /* charinfos */ - bytestoskip += BYTESOFGLYPHINFO(&fi); - (void)FontFileSkip(file, bytestoskip); - - ret = snfReadProps(&fi, pFontInfo, file); - if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); - return ret; - } - if (fi.inkMetrics) { - ret = snfReadxCharInfo(file, &pFontInfo->ink_minbounds); - if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); - return ret; - } - ret = snfReadxCharInfo(file, &pFontInfo->ink_maxbounds); - if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); - return ret; - } - } else { - pFontInfo->ink_minbounds = pFontInfo->minbounds; - pFontInfo->ink_maxbounds = pFontInfo->maxbounds; - } - return Successful; - -} - -static void -snfUnloadFont(FontPtr pFont) -{ - BitmapFontPtr bitmapFont; - - bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - xfree (bitmapFont->bitmaps); - xfree (bitmapFont); - DestroyFontRec (pFont); -} - diff --git a/nx-X11/lib/font/bitmap/snfstr.h b/nx-X11/lib/font/bitmap/snfstr.h deleted file mode 100644 index 8158089bf..000000000 --- a/nx-X11/lib/font/bitmap/snfstr.h +++ /dev/null @@ -1,185 +0,0 @@ -/* $Xorg: snfstr.h,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ -/*********************************************************** -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. - -******************************************************************/ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.5 2001/12/14 19:56:47 dawes Exp $ */ - -#ifndef SNFSTR_H -#define SNFSTR_H 1 - -#include - -/*- - * This file describes the Server Natural Font format. - * SNF fonts are both CPU-dependent and frame buffer bit order dependent. - * This file is used by: - * 1) the server, to hold font information read out of font files. - * 2) font converters - * - * Each font file contains the following - * data structures, with no padding in-between. - * - * 1) The XFONTINFO structure - * hand-padded to a two-short boundary. - * maxbounds.byteoffset is the total number of bytes in the - * glpyh array - * maxbounds.bitOffset is thetotal width of the unpadded font - * - * 2) The XCHARINFO array - * indexed directly with character codes, both on disk - * and in memory. - * - * 3) Character glyphs - * padded in the server-natural way, and - * ordered in the device-natural way. - * End of glyphs padded to 32-bit boundary. - * - * 4) nProps font properties - * - * 5) a sequence of null-terminated strings, for font properties - */ - -#define FONT_FILE_VERSION 4 - -typedef struct _snfFontProp { - CARD32 name; /* offset of string */ - INT32 value; /* number or offset of string */ - Bool indirect; /* value is a string offset */ -} snfFontPropRec; - -/* - * the following macro definitions describe a font file image in memory - */ -#define ADDRCharInfoRec( pfi) \ - ((snfCharInfoRec *) &(pfi)[1]) - -#define ADDRCHARGLYPHS( pfi) \ - (((char *) &(pfi)[1]) + BYTESOFCHARINFO(pfi)) - -/* - * pad out glyphs to a CARD32 boundary - */ -#define ADDRXFONTPROPS( pfi) \ - ((snfFontPropRec *) ((char *)ADDRCHARGLYPHS( pfi) + BYTESOFGLYPHINFO(pfi))) - -#define ADDRSTRINGTAB( pfi) \ - ((char *)ADDRXFONTPROPS( pfi) + BYTESOFPROPINFO(pfi)) - -#define n2dChars(pfi) (((pfi)->lastRow - (pfi)->firstRow + 1) * \ - ((pfi)->lastCol - (pfi)->firstCol + 1)) -#define BYTESOFFONTINFO(pfi) (sizeof(snfFontInfoRec)) -#define BYTESOFCHARINFO(pfi) (sizeof(snfCharInfoRec) * n2dChars(pfi)) -#define BYTESOFPROPINFO(pfi) (sizeof(snfFontPropRec) * (pfi)->nProps) -#define BYTESOFSTRINGINFO(pfi) ((pfi)->lenStrings) -#define BYTESOFGLYPHINFO(pfi) (((pfi)->maxbounds.byteOffset+3) & ~0x3) -#define BYTESOFINKINFO(pfi) (sizeof(snfCharInfoRec) * n2dChars(pfi)) - -typedef struct _snfFontProp *snfFontPropPtr; -typedef struct _snfCharInfo *snfCharInfoPtr; -typedef struct _snfFontInfo *snfFontInfoPtr; - -typedef struct _snfCharInfo { - xCharInfo metrics; /* info preformatted for Queries */ - unsigned byteOffset:24; /* byte offset of the raster from pGlyphs */ - unsigned exists:1; /* true iff glyph exists for this char */ - unsigned pad:7; /* must be zero for now */ -} snfCharInfoRec; - -typedef struct _snfFontInfo { - unsigned int version1; /* version stamp */ - unsigned int allExist; - unsigned int drawDirection; - unsigned int noOverlap; /* true if: - * max(rightSideBearing-characterWidth) <= - * minbounds->metrics.leftSideBearing */ - unsigned int constantMetrics; - unsigned int terminalFont; /* Should be deprecated! true if: constant - * metrics && leftSideBearing == 0 && - * rightSideBearing == characterWidth && - * ascent == fontAscent && descent == - * fontDescent */ - unsigned int linear:1; /* true if firstRow == lastRow */ - unsigned int constantWidth:1; /* true if - * minbounds->metrics.characterWidth - * == - * maxbounds->metrics.characterWidth */ - unsigned int inkInside:1; /* true if for all defined glyphs: - * leftSideBearing >= 0 && rightSideBearing <= - * characterWidth && -fontDescent <= ascent <= - * fontAscent && -fontAscent <= descent <= - * fontDescent */ - unsigned int inkMetrics:1; /* ink metrics != bitmap metrics */ - /* used with terminalFont */ - /* see font's pInk{CI,Min,Max} */ - unsigned int padding:28; - unsigned int firstCol; - unsigned int lastCol; - unsigned int firstRow; - unsigned int lastRow; - unsigned int nProps; - unsigned int lenStrings; /* length in bytes of string table */ - unsigned int chDefault; /* default character */ - int fontDescent; /* minimum for quality typography */ - int fontAscent; /* minimum for quality typography */ - snfCharInfoRec minbounds; /* MIN of glyph metrics over all chars */ - snfCharInfoRec maxbounds; /* MAX of glyph metrics over all chars */ - unsigned int pixDepth; /* intensity bits per pixel */ - unsigned int glyphSets; /* number of sets of glyphs, for sub-pixel - * positioning */ - unsigned int version2; /* version stamp double-check */ -} snfFontInfoRec; - -extern void SnfSetFormat ( int bit, int byte, int glyph, int scan ); -extern int snfReadFont ( FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan ); -extern int snfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file ); -extern void snfError( const char* message, ... ); - -#endif /* SNFSTR_H */ diff --git a/nx-X11/lib/font/builtins/Imakefile b/nx-X11/lib/font/builtins/Imakefile deleted file mode 100644 index f70434865..000000000 --- a/nx-X11/lib/font/builtins/Imakefile +++ /dev/null @@ -1,17 +0,0 @@ -XCOMM $XFree86: xc/lib/font/builtins/Imakefile,v 1.2 1999/11/19 14:59:08 hohndel Exp $ -XCOMM -XCOMM -XCOMM $XConsortium: Imakefile /main/14 1996/11/03 19:58:41 kaleb $ -#include - - INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include - HEADERS = - - SRCS = dir.c file.c fonts.c fpe.c render.c - OBJS = dir.o file.o fonts.o fpe.o render.o - -SubdirLibraryRule($(OBJS)) -NormalLibraryObjectRule() -NormalLintTarget($(SRCS)) - -DependTarget() diff --git a/nx-X11/lib/font/builtins/buildfont b/nx-X11/lib/font/builtins/buildfont deleted file mode 100644 index aa4602ff8..000000000 --- a/nx-X11/lib/font/builtins/buildfont +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# Convert a bdf file into C-code suitable for inclusion in -# builtin fonts -# -FONT=$1 -NAME=$2 -echo 'static const char file_'$NAME'[] = {' -bdftopcf -p1 -u1 $1 | - compress -b 12 | - od -b -v -w8 | - sed 's/^[0-9]*\( *\)/\1\1\1\1/' | - sed 's/\([0-9][0-9]*\)/'"'"'\\\1'"'"',/g' -echo '};' diff --git a/nx-X11/lib/font/builtins/builtin.h b/nx-X11/lib/font/builtins/builtin.h deleted file mode 100644 index ea98407eb..000000000 --- a/nx-X11/lib/font/builtins/builtin.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Id: builtin.h,v 1.2 1999/11/02 06:16:47 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/builtin.h,v 1.3 1999/12/30 02:29:49 robin Exp $ */ - -#include -#include -#include -#include -#include -#include - -typedef struct _BuiltinFile { - const char *name; - int len; - const char *bits; -} BuiltinFileRec, *BuiltinFilePtr; - -typedef struct _BuiltinDir { - char *file_name; - char *font_name; -} BuiltinDirRec, *BuiltinDirPtr; - -typedef struct _BuiltinAlias { - char *alias_name; - char *font_name; -} BuiltinAliasRec, *BuiltinAliasPtr; - -extern const BuiltinFileRec builtin_files[]; -extern const int builtin_files_count; - -extern const BuiltinDirRec builtin_dir[]; -extern const int builtin_dir_count; - -extern const BuiltinAliasRec builtin_alias[]; -extern const int builtin_alias_count; - -extern FontFilePtr BuiltinFileOpen (); -extern int BuiltinFileClose (); diff --git a/nx-X11/lib/font/builtins/dir.c b/nx-X11/lib/font/builtins/dir.c deleted file mode 100644 index fb2f82c41..000000000 --- a/nx-X11/lib/font/builtins/dir.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Id: dir.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/dir.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "builtin.h" - -int -BuiltinReadDirectory (directory, pdir) - char *directory; - FontDirectoryPtr *pdir; -{ - FontDirectoryPtr dir; - int i; - - dir = FontFileMakeDir ("", builtin_dir_count); - for (i = 0; i < builtin_dir_count; i++) - { - if (!FontFileAddFontFile (dir, - (char *) builtin_dir[i].font_name, - (char *) builtin_dir[i].file_name)) - { - FontFileFreeDir (dir); - return BadFontPath; - } - } - for (i = 0; i < builtin_alias_count; i++) - { - if (!FontFileAddFontAlias (dir, - (char *) builtin_alias[i].alias_name, - (char *) builtin_alias[i].font_name)) - { - FontFileFreeDir (dir); - return BadFontPath; - } - } - FontFileSortDir (dir); - *pdir = dir; - return Successful; -} diff --git a/nx-X11/lib/font/builtins/file.c b/nx-X11/lib/font/builtins/file.c deleted file mode 100644 index 024c35343..000000000 --- a/nx-X11/lib/font/builtins/file.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Id: file.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/file.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "builtin.h" - -typedef struct _BuiltinIO { - int offset; - BuiltinFilePtr file; -} BuiltinIORec, *BuiltinIOPtr; - -static int -BuiltinFill (f) - BufFilePtr f; -{ - int left, len; - BuiltinIOPtr io = ((BuiltinIOPtr) f->private); - - left = io->file->len - io->offset; - if (left <= 0) - { - f->left = 0; - return BUFFILEEOF; - } - len = BUFFILESIZE; - if (len > left) - len = left; - bcopy (io->file->bits + io->offset, f->buffer, len); - io->offset += len; - f->left = len - 1; - f->bufp = f->buffer + 1; - return f->buffer[0]; -} - -static int -BuiltinSkip (f, count) - BufFilePtr f; - int count; -{ - BuiltinIOPtr io = ((BuiltinIOPtr) f->private); - int curoff; - int fileoff; - int todo; - int left; - - curoff = f->bufp - f->buffer; - fileoff = curoff + f->left; - if (curoff + count <= fileoff) { - f->bufp += count; - f->left -= count; - } else { - todo = count - (fileoff - curoff); - io->offset += todo; - if (io->offset > io->file->len) - io->offset = io->file->len; - if (io->offset < 0) - io->offset = 0; - f->left = 0; - } - return count; -} - -static int -BuiltinClose (f, doClose) - BufFilePtr f; -{ - BuiltinIOPtr io = ((BuiltinIOPtr) f->private); - - xfree (io); - return 1; -} - - -FontFilePtr -BuiltinFileOpen (name) - char *name; -{ - int i; - BuiltinIOPtr io; - BufFilePtr raw, cooked; - - if (*name == '/') name++; - for (i = 0; i < builtin_files_count; i++) - if (!strcmp (name, builtin_files[i].name)) - break; - if (i == builtin_files_count) - return NULL; - io = (BuiltinIOPtr) xalloc (sizeof (BuiltinIORec)); - if (!io) - return NULL; - io->offset = 0; - io->file = (void *) &builtin_files[i]; - raw = BufFileCreate ((char *) io, BuiltinFill, 0, BuiltinSkip, BuiltinClose); - if (!raw) - { - xfree (io); - return NULL; - } - if (cooked = BufFilePushCompressed (raw)) - raw = cooked; - else - { - raw->left += raw->bufp - raw->buffer; - raw->bufp = raw->buffer; - } - return (FontFilePtr) raw; -} - -int -BuiltinFileClose (f) - FontFilePtr f; -{ - return BufFileClose ((BufFilePtr) f, TRUE); -} diff --git a/nx-X11/lib/font/builtins/fonts.c b/nx-X11/lib/font/builtins/fonts.c deleted file mode 100644 index 30c762f7f..000000000 --- a/nx-X11/lib/font/builtins/fonts.c +++ /dev/null @@ -1,2438 +0,0 @@ -/* - * Id: fonts.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/fonts.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "builtin.h" - -static const char file_6x13[] = { - '\037', '\235', '\214', '\001', '\314', '\214', '\201', '\223', - '\000', '\200', '\301', '\000', '\006', '\023', '\032', '\244', - '\042', '\300', '\040', '\246', '\204', '\015', '\023', '\042', - '\004', '\100', '\046', '\041', '\273', '\210', '\004', '\024', - '\116', '\104', '\223', '\021', '\000', '\224', '\001', '\006', - '\021', '\050', '\114', '\210', '\317', '\201', '\101', '\134', - '\007', '\014', '\102', '\320', '\150', '\220', '\243', '\101', - '\130', '\026', '\014', '\202', '\030', '\251', '\062', '\042', - '\206', '\015', '\006', '\201', '\320', '\004', '\200', '\010', - '\044', '\000', '\024', '\035', '\014', '\002', '\332', '\211', - '\104', '\044', '\000', '\130', '\063', '\017', '\112', '\064', - '\130', '\321', '\040', '\076', '\024', '\064', '\053', '\354', - '\014', '\040', '\041', '\341', '\004', '\211', '\070', '\145', - '\112', '\144', '\221', '\120', '\206', '\104', '\037', '\011', - '\213', '\110', '\134', '\222', '\260', '\211', '\304', '\055', - '\011', '\323', '\110', '\304', '\223', '\060', '\217', '\302', - '\006', '\011', '\011', '\051', '\144', '\153', '\360', '\221', - '\102', '\262', '\006', '\071', '\335', '\115', '\230', '\112', - '\142', '\254', '\204', '\263', '\024', '\362', '\110', '\030', - '\114', '\242', '\264', '\204', '\332', '\044', '\256', '\113', - '\330', '\116', '\342', '\275', '\204', '\035', '\046', '\006', - '\020', '\061', '\121', '\314', '\104', '\000', '\012', '\322', - '\136', '\136', '\223', '\220', '\316', '\345', '\005', '\011', - '\373', '\134', '\066', '\100', '\023', '\321', '\104', '\043', - '\117', '\234', '\120', '\161', '\022', '\244', '\111', '\221', - '\057', '\122', '\212', '\034', '\111', '\062', '\205', '\212', - '\224', '\054', '\006', '\121', '\127', '\161', '\102', '\344', - '\066', '\200', '\046', '\151', '\346', '\214', '\001', '\140', - '\244', '\165', '\022', '\046', '\131', '\276', '\260', '\166', - '\115', '\074', '\015', '\236', '\062', '\025', '\257', '\024', - '\111', '\162', '\004', '\011', '\025', '\345', '\255', '\305', - '\066', '\201', '\236', '\246', '\116', '\033', '\000', '\123', - '\230', '\004', '\121', '\015', '\100', '\012', '\370', '\042', - '\124', '\256', '\044', '\041', '\102', '\005', '\011', '\166', - '\346', '\123', '\312', '\264', '\111', '\063', '\344', '\215', - '\033', '\062', '\145', '\334', '\314', '\201', '\016', '\040', - '\010', '\021', '\042', '\137', '\324', '\226', '\005', '\023', - '\257', '\055', '\047', '\226', '\107', '\111', '\140', '\121', - '\004', '\023', '\001', '\046', '\241', '\205', '\130', '\120', - '\074', '\221', '\204', '\152', '\015', '\076', '\130', '\136', - '\021', '\123', '\074', '\301', '\104', '\025', '\124', '\044', - '\221', '\332', '\027', '\130', '\134', '\230', '\341', '\206', - '\035', '\176', '\210', '\333', '\024', '\120', '\004', '\061', - '\304', '\204', '\107', '\000', '\060', '\104', '\177', '\126', - '\024', '\041', '\105', '\020', '\107', '\274', '\246', '\036', - '\173', '\110', '\270', '\210', '\104', '\020', '\122', '\114', - '\201', '\036', '\154', '\262', '\321', '\146', '\033', '\156', - '\264', '\075', '\201', '\003', '\016', '\065', '\344', '\240', - '\043', '\217', '\076', '\136', '\127', '\204', '\023', '\103', - '\074', '\101', '\004', '\213', '\000', '\304', '\340', '\342', - '\023', '\120', '\144', '\041', '\005', '\165', '\326', '\171', - '\124', '\207', '\030', '\154', '\244', '\061', '\006', '\010', - '\144', '\274', '\321', '\106', '\030', '\151', '\270', '\001', - '\202', '\031', '\366', '\321', '\341', '\002', '\010', '\040', - '\114', '\201', '\106', '\030', '\162', '\224', '\001', '\102', - '\030', '\367', '\201', '\220', '\237', '\032', '\157', '\344', - '\341', '\002', '\161', '\251', '\121', '\001', '\100', '\013', - '\300', '\011', '\327', '\202', '\021', '\316', '\101', '\107', - '\050', '\167', '\336', '\265', '\040', '\105', '\013', '\361', - '\315', '\127', '\337', '\175', '\371', '\355', '\107', '\106', - '\013', '\055', '\304', '\060', '\103', '\246', '\062', '\300', - '\320', '\302', '\015', '\065', '\174', '\032', '\352', '\020', - '\055', '\330', '\340', '\151', '\221', '\107', '\046', '\231', - '\051', '\000', '\322', '\161', '\051', '\150', '\154', '\043', - '\162', '\350', '\241', '\023', '\000', '\140', '\361', '\005', - '\022', '\323', '\125', '\047', '\150', '\024', '\125', '\370', - '\367', '\305', '\215', '\355', '\051', '\005', '\100', '\000', - '\304', '\026', '\153', '\020', '\150', '\006', '\105', '\264', - '\023', '\151', '\244', '\201', '\246', '\254', '\101', '\314', - '\002', '\340', '\354', '\262', '\044', '\375', '\223', '\054', - '\000', '\321', '\116', '\273', '\323', '\266', '\334', '\116', - '\145', '\020', '\070', '\000', '\000', '\142', '\210', '\041', - '\213', '\010', '\042', '\056', '\271', '\346', '\216', '\133', - '\356', '\271', '\353', '\252', '\233', '\056', '\272', '\354', - '\276', '\333', '\056', '\274', '\356', '\306', '\153', '\157', - '\275', '\370', '\322', '\253', '\357', '\274', '\374', '\312', - '\353', '\357', '\275', '\373', '\376', '\233', '\157', '\277', - '\000', '\023', '\074', '\260', '\300', '\001', '\027', '\214', - '\260', '\301', '\011', '\037', '\254', '\360', '\303', '\016', - '\107', '\334', '\360', '\304', '\014', '\127', '\274', '\360', - '\305', '\020', '\123', '\214', '\261', '\304', '\026', '\147', - '\334', '\061', '\307', '\033', '\153', '\354', '\161', '\310', - '\037', '\213', '\014', '\362', '\310', '\050', '\237', '\254', - '\262', '\311', '\054', '\227', '\354', '\062', '\311', '\060', - '\247', '\334', '\162', '\314', '\053', '\277', '\054', '\263', - '\315', '\065', '\323', '\074', '\363', '\315', '\072', '\343', - '\274', '\163', '\316', '\074', '\007', '\015', '\364', '\320', - '\077', '\027', '\355', '\363', '\321', '\376', '\322', '\004', - '\056', '\115', '\160', '\031', '\244', '\101', '\102', '\047', - '\044', '\104', '\103', '\102', '\101', '\044', '\104', '\253', - '\101', '\150', '\265', '\224', '\120', '\035', '\011', '\011', - '\222', '\220', '\135', '\171', '\361', '\225', '\220', '\055', - '\011', '\015', '\223', '\020', '\064', '\011', '\165', '\223', - '\220', '\072', '\011', '\075', '\146', '\020', '\001', '\023', - '\105', '\060', '\221', '\007', '\023', '\255', '\060', '\021', - '\016', '\023', '\025', '\061', '\221', '\024', '\023', '\175', - '\061', '\021', '\033', '\023', '\345', '\061', '\221', '\041', - '\023', '\115', '\062', '\021', '\050', '\023', '\265', '\062', - '\221', '\056', '\023', '\035', '\063', '\021', '\065', '\023', - '\205', '\063', '\221', '\073', '\023', '\355', '\063', '\021', - '\002', '\021', '\125', '\020', '\221', '\010', '\021', '\275', - '\020', '\021', '\017', '\021', '\045', '\021', '\221', '\025', - '\021', '\215', '\021', '\021', '\034', '\021', '\365', '\021', - '\221', '\042', '\021', '\135', '\022', '\021', '\051', '\021', - '\305', '\022', '\221', '\057', '\021', '\055', '\023', '\021', - '\066', '\021', '\225', '\023', '\221', '\074', '\021', '\375', - '\023', '\021', '\003', '\076', '\145', '\340', '\223', '\011', - '\076', '\315', '\340', '\023', '\020', '\076', '\065', '\341', - '\223', '\026', '\076', '\235', '\341', '\023', '\035', '\076', - '\005', '\342', '\223', '\043', '\076', '\155', '\342', '\023', - '\052', '\076', '\325', '\342', '\223', '\060', '\076', '\075', - '\343', '\023', '\067', '\076', '\245', '\343', '\223', '\075', - '\076', '\015', '\320', '\021', '\004', '\035', '\165', '\320', - '\221', '\012', '\035', '\335', '\320', '\021', '\021', '\035', - '\105', '\321', '\221', '\027', '\035', '\255', '\321', '\021', - '\036', '\035', '\025', '\322', '\221', '\044', '\035', '\175', - '\322', '\021', '\053', '\035', '\311', '\105', '\107', '\214', - '\321', '\221', '\151', '\164', '\004', '\034', '\035', '\151', - '\107', '\107', '\364', '\321', '\221', '\003', '\024', '\300', - '\040', '\024', '\170', '\040', '\000', '\102', '\040', '\101', - '\027', '\110', '\160', '\007', '\022', '\104', '\202', '\004', - '\253', '\040', '\101', '\061', '\110', '\360', '\015', '\022', - '\344', '\203', '\004', '\023', '\041', '\101', '\113', '\110', - '\160', '\024', '\022', '\204', '\205', '\004', '\173', '\041', - '\101', '\145', '\110', '\360', '\032', '\022', '\044', '\207', - '\004', '\343', '\041', '\101', '\177', '\110', '\160', '\001', - '\244', '\001', '\000', '\006', '\162', '\130', '\202', '\034', - '\312', '\040', '\207', '\077', '\310', '\041', '\023', '\162', - '\230', '\205', '\034', '\232', '\041', '\207', '\163', '\310', - '\041', '\040', '\162', '\330', '\210', '\034', '\152', '\042', - '\207', '\247', '\310', '\041', '\055', '\162', '\030', '\214', - '\034', '\072', '\043', '\207', '\333', '\310', '\041', '\072', - '\162', '\130', '\217', '\034', '\012', '\040', '\045', '\000', - '\170', '\000', '\030', '\071', '\000', '\306', '\024', '\200', - '\321', '\006', '\140', '\034', '\002', '\030', '\241', '\000', - '\306', '\056', '\200', '\121', '\015', '\140', '\274', '\003', - '\030', '\011', '\001', '\306', '\110', '\200', '\321', '\023', - '\140', '\134', '\005', '\030', '\121', '\142', '\220', '\142', - '\200', '\121', '\032', '\140', '\374', '\006', '\030', '\331', - '\001', '\306', '\174', '\200', '\321', '\000', '\106', '\231', - '\200', '\121', '\100', '\140', '\224', '\026', '\030', '\105', - '\007', '\106', '\071', '\202', '\121', '\250', '\140', '\224', - '\060', '\030', '\305', '\015', '\106', '\331', '\203', '\121', - '\020', '\141', '\224', '\112', '\030', '\105', '\024', '\106', - '\171', '\205', '\121', '\170', '\141', '\224', '\144', '\030', - '\305', '\032', '\106', '\031', '\207', '\121', '\340', '\141', - '\224', '\176', '\030', '\105', '\001', '\005', '\001', '\300', - '\005', '\142', '\111', '\202', '\130', '\306', '\040', '\226', - '\076', '\210', '\345', '\022', '\142', '\211', '\205', '\130', - '\226', '\041', '\226', '\162', '\210', '\345', '\037', '\142', - '\311', '\210', '\130', '\146', '\042', '\226', '\246', '\210', - '\345', '\054', '\142', '\011', '\214', '\130', '\066', '\043', - '\226', '\332', '\210', '\345', '\071', '\142', '\111', '\217', - '\130', '\006', '\040', '\063', '\000', '\160', '\000', '\066', - '\067', '\200', '\115', '\024', '\140', '\263', '\006', '\330', - '\024', '\002', '\066', '\237', '\200', '\115', '\056', '\140', - '\063', '\015', '\330', '\264', '\003', '\066', '\007', '\201', - '\115', '\110', '\140', '\263', '\023', '\330', '\124', '\005', - '\066', '\157', '\201', '\115', '\142', '\140', '\063', '\032', - '\330', '\364', '\006', '\066', '\327', '\201', '\115', '\174', - '\140', '\263', '\000', '\310', '\222', '\000', '\262', '\076', - '\200', '\054', '\026', '\040', '\053', '\007', '\310', '\062', - '\002', '\262', '\246', '\200', '\054', '\060', '\040', '\013', - '\030', '\061', '\011', '\127', '\013', '\022', '\222', '\065', - '\000', '\170', '\340', '\242', '\030', '\315', '\250', '\007', - '\150', '\102', '\000', '\007', '\174', '\300', '\001', '\035', - '\061', '\210', '\012', '\052', '\060', '\322', '\222', '\222', - '\364', '\244', '\012', '\051', '\100', '\001', '\034', '\130', - '\000', '\220', '\022', '\040', '\244', '\000', '\070', '\100', - '\000', '\006', '\020', '\200', '\007', '\010', '\300', '\000', - '\002', '\170', '\226', '\003', '\210', '\345', '\000', '\007', - '\110', '\100', '\233', '\125', '\221', '\010', '\261', '\016', - '\340', '\200', '\233', '\346', '\024', '\132', '\011', '\110', - '\100', '\016', '\271', '\365', '\322', '\017', '\274', '\024', - '\000', '\037', '\240', '\111', '\004', '\046', '\120', '\201', - '\014', '\104', '\040', '\247', '\002', '\330', '\150', '\102', - '\042', '\020', '\001', '\005', '\144', '\304', '\251', '\057', - '\015', '\253', '\130', '\301', '\330', '\255', '\003', '\210', - '\025', '\246', '\011', '\341', '\301', '\131', '\327', '\112', - '\200', '\301', '\050', '\204', '\255', '\077', '\070', '\153', - '\102', '\176', '\320', '\055', '\205', '\320', '\265', '\256', - '\006', '\271', '\053', '\136', '\365', '\132', '\127', '\272', - '\262', '\125', '\255', '\154', '\035', '\153', '\140', '\305', - '\312', '\327', '\155', '\305', '\165', '\260', '\201', '\115', - '\010', '\004', '\020', '\100', '\000', '\001', '\020', '\000', - '\001', '\020', '\210', '\252', '\106', '\034', '\313', '\130', - '\001', '\004', '\100', '\262', '\043', '\371', '\200', '\002', - '\066', '\013', '\313', '\235', '\104', '\226', '\000', '\037', - '\270', '\214', '\101', '\030', '\040', '\201', '\234', '\036', - '\040', '\247', '\022', '\150', '\332', '\266', '\320', '\212', - '\327', '\267', '\255', '\025', '\000', '\060', '\345', '\154', - '\135', '\067', '\253', '\131', '\315', '\142', '\063', '\041', - '\004', '\360', '\200', '\112', '\035', '\100', '\001', '\012', - '\074', '\000', '\246', '\022', '\250', '\200', '\002', '\052', - '\253', '\200', '\012', '\304', '\062', '\131', '\052', '\025', - '\100', '\001', '\062', '\220', '\200', '\210', '\046', '\204', - '\001', '\215', '\355', '\026', '\143', '\033', '\233', '\323', - '\227', '\032', '\045', '\131', '\326', '\105', '\300', '\164', - '\237', '\005', '\333', '\012', '\174', '\364', '\003', '\025', - '\140', '\055', '\154', '\101', '\373', '\124', '\274', '\102', - '\227', '\273', '\006', '\301', '\054', '\136', '\073', '\032', - '\122', '\010', '\054', '\266', '\262', '\226', '\025', '\055', - '\001', '\024', '\300', '\325', '\372', '\172', '\365', '\255', - '\006', '\050', '\300', '\131', '\325', '\353', '\000', '\256', - '\056', '\266', '\261', '\227', '\125', '\310', '\007', '\376', - '\353', '\000', '\367', '\106', '\300', '\044', '\011', '\321', - '\056', '\003', '\066', '\233', '\200', '\017', '\150', '\127', - '\300', '\304', '\152', '\300', '\004', '\014', '\214', '\140', - '\203', '\364', '\227', '\130', '\017', '\250', '\157', '\205', - '\241', '\372', '\336', '\227', '\142', '\125', '\041', '\375', - '\345', '\152', '\210', '\017', '\014', '\342', '\372', '\172', - '\200', '\302', '\034', '\005', '\351', '\333', '\124', '\374', - '\126', '\026', '\237', '\127', '\261', '\225', '\015', '\000', - '\145', '\127', '\102', '\023', '\311', '\252', '\367', '\040', - '\063', '\216', '\161', '\211', '\043', '\360', '\337', '\214', - '\300', '\064', '\304', '\031', '\250', '\100', '\005', '\032', - '\020', '\000', '\255', '\276', '\215', '\276', '\134', '\375', - '\100', '\175', '\025', '\362', '\000', '\011', '\070', '\331', - '\247', '\116', '\176', '\100', '\211', '\213', '\105', '\054', - '\022', '\047', '\244', '\311', '\116', '\316', '\262', '\004', - '\244', '\234', '\220', '\320', '\142', '\270', '\130', '\352', - '\365', '\162', '\115', '\251', '\074', '\145', '\142', '\131', - '\325', '\312', '\006', '\251', '\157', '\004', '\224', '\274', - '\344', '\204', '\270', '\364', '\254', '\033', '\346', '\200', - '\166', '\347', '\214', '\000', '\245', '\052', '\204', '\253', - '\011', '\050', '\300', '\000', '\012', '\220', '\000', '\256', - '\152', '\204', '\312', '\140', '\276', '\163', '\004', '\066', - '\040', '\144', '\065', '\337', '\171', '\002', '\124', '\255', - '\352', '\231', '\167', '\254', '\146', '\064', '\207', '\261', - '\276', '\017', '\040', '\263', '\233', '\033', '\035', '\201', - '\012', '\024', '\370', '\312', '\220', '\346', '\263', '\237', - '\047', '\315', '\123', '\024', '\167', '\071', '\261', '\133', - '\245', '\264', '\243', '\325', '\314', '\331', '\362', '\246', - '\271', '\276', '\102', '\256', '\300', '\006', '\042', '\040', - '\350', '\315', '\316', '\027', '\311', '\255', '\366', '\252', - '\130', '\005', '\334', '\341', '\234', '\006', '\330', '\315', - '\130', '\315', '\365', '\206', '\211', '\125', '\135', '\355', - '\272', '\027', '\304', '\164', '\236', '\363', '\206', '\347', - '\313', '\352', '\326', '\146', '\366', '\271', '\220', '\155', - '\155', '\201', '\075', '\300', '\125', '\043', '\017', '\013', - '\303', '\152', '\346', '\362', '\110', '\056', '\034', '\000', - '\107', '\273', '\027', '\002', '\314', '\066', '\361', '\116', - '\372', '\033', '\132', '\107', '\223', '\066', '\247', '\066', - '\375', '\060', '\115', '\106', '\174', '\142', '\053', '\027', - '\113', '\302', '\206', '\176', '\053', '\266', '\304', '\272', - '\141', '\000', '\210', '\204', '\001', '\164', '\116', '\152', - '\016', '\213', '\225', '\347', '\075', '\367', '\131', '\041', - '\006', '\140', '\153', '\273', '\217', '\225', '\352', '\012', - '\024', '\173', '\044', '\350', '\156', '\363', '\264', '\325', - '\274', '\357', '\107', '\163', '\065', '\322', '\304', '\032', - '\111', '\266', '\043', '\160', '\342', '\137', '\277', '\145', - '\002', '\222', '\036', '\070', '\042', '\035', '\015', '\000', - '\160', '\143', '\125', '\002', '\014', '\330', '\211', '\232', - '\063', '\340', '\134', '\101', '\167', '\365', '\276', '\122', - '\255', '\264', '\220', '\157', '\173', '\147', '\131', '\323', - '\127', '\343', '\134', '\345', '\070', '\004', '\050', '\356', - '\140', '\000', '\253', '\027', '\003', '\141', '\065', '\337', - '\113', '\061', '\360', '\126', '\120', '\033', '\104', '\346', - '\004', '\200', '\371', '\113', '\175', '\142', '\220', '\340', - '\036', '\327', '\330', '\100', '\127', '\067', '\133', '\133', - '\134', '\001', '\225', '\132', '\032', '\255', '\337', '\376', - '\042', '\152', '\125', '\273', '\125', '\155', '\052', '\240', - '\277', '\043', '\341', '\052', '\155', '\311', '\013', '\323', - '\131', '\317', '\172', '\264', '\245', '\045', '\055', '\306', - '\041', '\200', '\161', '\205', '\144', '\205', '\133', '\375', - '\125', '\365', '\004', '\010', '\115', '\361', '\145', '\063', - '\034', '\252', '\333', '\242', '\200', '\002', '\124', '\252', - '\000', '\012', '\160', '\153', '\300', '\064', '\336', '\326', - '\215', '\055', '\034', '\201', '\013', '\154', '\140', '\003', - '\166', '\147', '\271', '\171', '\235', '\234', '\161', '\246', - '\122', '\035', '\355', '\020', '\321', '\357', '\027', '\267', - '\245', '\134', '\307', '\362', '\174', '\044', '\214', '\005', - '\372', '\306', '\057', '\160', '\031', '\017', '\134', '\340', - '\361', '\027', '\260', '\100', '\157', '\335', '\276', '\223', - '\276', '\003', '\075', '\361', '\002', '\030', '\200', '\151', - '\271', '\245', '\365', '\214', '\073', '\173', '\044', '\005', - '\150', '\273', '\332', '\045', '\230', '\054', '\315', '\177', - '\021', '\002', '\030', '\240', '\000', '\007', '\342', '\236', - '\171', '\323', '\042', '\200', '\002', '\213', '\345', '\100', - '\340', '\035', '\133', '\000', '\011', '\244', '\176', '\365', - '\102', '\007', '\260', '\210', '\161', '\053', '\022', '\142', - '\257', '\171', '\323', '\356', '\366', '\061', '\222', '\331', - '\374', '\334', '\252', '\370', '\236', '\370', '\020', '\314', - '\314', '\361', '\201', '\277', '\131', '\330', '\016', '\037', - '\370', '\363', '\175', '\351', '\363', '\377', '\015', '\000', - '\015', '\250', '\264', '\000', '\015', '\140', '\151', '\120', - '\070', '\115', '\345', '\003', '\107', '\367', '\261', '\120', - '\375', '\362', '\255', '\203', '\037', '\376', '\061', '\217', - '\337', '\000', '\005', '\361', '\062', '\302', '\061', '\333', - '\174', '\365', '\023', '\013', '\263', '\340', '\007', '\153', - '\130', '\061', '\233', '\170', '\371', '\067', '\265', '\370', - '\120', '\335', '\157', '\102', '\332', '\257', '\377', '\053', - '\147', '\371', '\002', '\131', '\046', '\155', '\152', '\007', - '\000', '\134', '\105', '\125', '\213', '\366', '\066', '\042', - '\061', '\142', '\273', '\027', '\022', '\031', '\241', '\200', - '\150', '\106', '\132', '\331', '\324', '\150', '\025', '\066', - '\200', '\016', '\130', '\141', '\315', '\127', '\201', '\032', - '\347', '\125', '\047', '\247', '\130', '\016', '\220', '\001', - '\101', '\046', '\144', '\210', '\266', '\123', '\010', '\110', - '\200', '\022', '\230', '\140', '\031', '\101', '\151', '\025', - '\006', '\201', '\050', '\270', '\177', '\231', '\261', '\202', - '\014', '\110', '\202', '\262', '\146', '\152', '\303', '\222', - '\141', '\007', '\147', '\054', '\073', '\106', '\203', '\023', - '\100', '\144', '\043', '\230', '\115', '\330', '\026', '\001', - '\034', '\147', '\202', '\026', '\326', '\203', '\077', '\210', - '\165', '\101', '\310', '\154', '\103', '\010', '\000', '\003', - '\310', '\203', '\106', '\350', '\134', '\315', '\247', '\204', - '\076', '\350', '\134', '\244', '\225', '\161', '\146', '\167', - '\204', '\040', '\106', '\001', '\016', '\120', '\000', '\302', - '\265', '\155', '\162', '\123', '\155', '\040', '\325', '\020', - '\340', '\027', '\201', '\335', '\126', '\141', '\211', '\007', - '\206', '\134', '\210', '\177', '\144', '\210', '\146', '\115', - '\310', '\155', '\145', '\270', '\203', '\371', '\066', '\177', - '\100', '\270', '\156', '\156', '\110', '\204', '\160', '\170', - '\177', '\006', '\321', '\204', '\155', '\110', '\207', '\230', - '\101', '\000', '\210', '\244', '\200', '\023', '\210', '\115', - '\001', '\007', '\175', '\106', '\301', '\207', '\157', '\050', - '\210', '\162', '\110', '\210', '\110', '\210', '\115', '\206', - '\230', '\206', '\004', '\067', '\022', '\117', '\025', '\125', - '\062', '\310', '\201', '\037', '\070', '\001', '\042', '\010', - '\133', '\106', '\321', '\150', '\106', '\066', '\206', '\226', - '\150', '\206', '\231', '\130', '\207', '\330', '\264', '\211', - '\344', '\107', '\202', '\117', '\270', '\162', '\025', '\026', - '\141', '\023', '\120', '\200', '\104', '\206', '\020', '\115', - '\130', '\137', '\052', '\107', '\142', '\023', '\001', '\056', - '\201', '\120', '\010', '\206', '\240', '\010', '\201', '\000', - '\010', '\260', '\150', '\010', '\177', '\160', '\056', '\212', - '\140', '\056', '\204', '\140', '\010', '\207', '\240', '\213', - '\274', '\150', '\056', '\260', '\330', '\213', '\200', '\260', - '\213', '\302', '\270', '\213', '\211', '\260', '\007', '\264', - '\310', '\213', '\200', '\220', '\214', '\302', '\030', '\214', - '\346', '\062', '\010', '\344', '\322', '\007', '\200', '\000', - '\215', '\204', '\040', '\010', '\202', '\060', '\056', '\325', - '\170', '\215', '\321', '\010', '\060', '\210', '\220', '\007', - '\347', '\142', '\010', '\310', '\210', '\215', '\322', '\070', - '\056', '\202', '\160', '\213', '\343', '\002', '\010', '\201', - '\240', '\215', '\353', '\002', '\215', '\374', '\062', '\216', - '\206', '\220', '\215', '\354', '\010', '\214', '\206', '\200', - '\010', '\313', '\010', '\213', '\364', '\230', '\214', '\206', - '\120', '\217', '\343', '\162', '\213', '\260', '\230', '\010', - '\200', '\040', '\010', '\320', '\070', '\010', '\176', '\260', - '\214', '\371', '\370', '\217', '\320', '\350', '\217', '\201', - '\140', '\214', '\172', '\220', '\214', '\210', '\300', '\217', - '\206', '\340', '\217', '\311', '\010', '\221', '\375', '\370', - '\007', '\011', '\371', '\220', '\172', '\120', '\221', '\010', - '\151', '\214', '\372', '\330', '\220', '\314', '\350', '\007', - '\025', '\051', '\010', '\263', '\010', '\213', '\205', '\300', - '\007', '\037', '\031', '\222', '\017', '\251', '\217', '\022', - '\171', '\222', '\021', '\211', '\222', '\054', '\271', '\222', - '\056', '\331', '\217', '\055', '\011', '\223', '\025', '\171', - '\010', '\201', '\060', '\223', '\046', '\231', '\222', '\206', - '\060', '\220', '\060', '\371', '\222', '\052', '\271', '\223', - '\076', '\331', '\223', '\100', '\231', '\222', '\102', '\311', - '\222', '\030', '\031', '\223', '\101', '\151', '\224', '\103', - '\311', '\223', '\211', '\160', '\223', '\110', '\331', '\224', - '\112', '\331', '\224', '\105', '\271', '\222', '\121', '\331', - '\217', '\013', '\011', '\213', '\350', '\050', '\010', '\124', - '\211', '\217', '\106', '\131', '\220', '\077', '\311', '\225', - '\100', '\151', '\010', '\362', '\230', '\221', '\363', '\270', - '\214', '\273', '\210', '\010', '\141', '\211', '\216', '\032', - '\251', '\225', '\152', '\131', '\213', '\372', '\010', '\226', - '\370', '\050', '\217', '\136', '\351', '\225', '\367', '\310', - '\226', '\153', '\171', '\216', '\165', '\351', '\226', '\164', - '\011', '\223', '\000', '\171', '\224', '\021', '\271', '\220', - '\342', '\262', '\214', '\004', '\271', '\214', '\173', '\051', - '\224', '\016', '\231', '\222', '\207', '\120', '\230', '\006', - '\171', '\222', '\257', '\030', '\213', '\050', '\211', '\007', - '\311', '\250', '\010', '\205', '\251', '\223', '\274', '\350', - '\220', '\205', '\040', '\231', '\043', '\371', '\230', '\205', - '\211', '\007', '\213', '\171', '\214', '\014', '\171', '\213', - '\320', '\250', '\010', '\310', '\370', '\231', '\173', '\040', - '\010', '\273', '\250', '\010', '\216', '\131', '\213', '\114', - '\111', '\232', '\206', '\060', '\222', '\252', '\371', '\217', - '\323', '\030', '\213', '\173', '\260', '\231', '\322', '\030', - '\214', '\016', '\251', '\010', '\372', '\150', '\233', '\217', - '\151', '\224', '\270', '\011', '\213', '\273', '\311', '\230', - '\271', '\371', '\233', '\274', '\211', '\224', '\362', '\330', - '\233', '\304', '\171', '\233', '\306', '\011', '\234', '\276', - '\031', '\234', '\074', '\131', '\234', '\310', '\311', '\234', - '\312', '\131', '\213', '\265', '\151', '\222', '\316', '\231', - '\234', '\324', '\331', '\233', '\051', '\211', '\010', '\322', - '\171', '\234', '\317', '\131', '\235', '\332', '\151', '\227', - '\265', '\070', '\234', '\335', '\071', '\235', '\342', '\031', - '\236', '\344', '\331', '\234', '\345', '\151', '\217', '\016', - '\111', '\223', '\346', '\271', '\236', '\274', '\051', '\217', - '\146', '\371', '\230', '\136', '\263', '\023', '\326', '\262', - '\055', '\010', '\321', '\020', '\040', '\221', '\021', '\017', - '\104', '\032', '\051', '\041', '\022', '\005', '\221', '\031', - '\240', '\221', '\161', '\160', '\141', '\022', '\122', '\266', - '\022', '\254', '\126', '\025', '\127', '\341', '\166', '\122', - '\021', '\023', '\027', '\240', '\103', '\000', '\220', '\001', - '\325', '\007', '\000', '\070', '\041', '\173', '\101', '\261', - '\121', '\121', '\065', '\023', '\041', '\000', '\000', '\042', - '\000', '\000', '\043', '\000', '\000', '\044', '\000', '\000', - '\045', '\000', '\000', '\046', '\000', '\000', '\121', '\003', - '\025', '\051', '\000', '\000', '\052', '\000', '\000', '\053', - '\000', '\000', '\134', '\061', '\121', '\177', '\362', '\002', - '\000', '\000', '\003', '\125', '\002', '\000', '\136', '\061', - '\003', '\000', '\060', '\065', '\065', '\000', '\000', '\066', - '\000', '\000', '\067', '\000', '\000', '\070', '\000', '\000', - '\112', '\242', '\003', '\000', '\260', '\003', '\000', '\060', - '\030', '\075', '\000', '\000', '\140', '\101', '\127', '\072', - '\121', '\065', '\102', '\340', '\042', '\000', '\100', '\004', - '\000', '\040', '\026', '\106', '\000', '\000', '\055', '\222', - '\043', '\111', '\000', '\000', '\112', '\000', '\000', '\144', - '\301', '\004', '\277', '\001', '\000', '\264', '\362', '\004', - '\036', '\001', '\000', '\121', '\120', '\036', '\340', '\001', - '\000', '\202', '\122', '\005', '\000', '\140', '\005', '\254', - '\122', '\053', '\000', '\200', '\033', '\132', '\000', '\000', - '\150', '\301', '\005', '\000', '\320', '\005', '\000', '\340', - '\005', '\000', '\360', '\005', '\000', '\000', '\006', '\000', - '\020', '\006', '\000', '\040', '\006', '\000', '\060', '\034', - '\025', '\121', '\006', '\000', '\140', '\006', '\000', '\160', - '\006', '\000', '\200', '\006', '\000', '\240', '\026', '\152', - '\000', '\000', '\234', '\301', '\006', '\000', '\360', '\035', - '\156', '\000', '\000', '\157', '\000', '\000', '\160', '\000', - '\000', '\161', '\000', '\000', '\162', '\000', '\000', '\163', - '\000', '\000', '\164', '\000', '\000', '\134', '\143', '\007', - '\000', '\160', '\007', '\000', '\300', '\026', '\156', '\241', - '\007', '\000', '\260', '\007', '\000', '\300', '\007', '\000', - '\320', '\007', '\000', '\340', '\007', '\000', '\360', '\007', - '\000', '\360', '\017', '\260', '\032', '\253', '\262', '\072', - '\253', '\264', '\132', '\253', '\266', '\172', '\253', '\270', - '\172', '\253', '\103', '\021', '\010', '\000', '\340', '\065', - '\203', '\000', '\000', '\162', '\121', '\010', '\000', '\140', - '\010', '\000', '\160', '\010', '\074', '\001', '\000', '\211', - '\000', '\000', '\212', '\000', '\000', '\213', '\000', '\000', - '\214', '\000', '\000', '\215', '\000', '\000', '\216', '\000', - '\000', '\166', '\001', '\011', '\000', '\020', '\011', '\000', - '\040', '\011', '\000', '\060', '\011', '\000', '\100', '\011', - '\000', '\120', '\011', '\000', '\140', '\011', '\000', '\160', - '\011', '\000', '\360', '\020', '\231', '\000', '\000', '\232', - '\000', '\000', '\233', '\000', '\000', '\172', '\321', '\011', - '\000', '\340', '\011', '\000', '\360', '\011', '\000', '\000', - '\012', '\000', '\020', '\012', '\000', '\040', '\012', '\000', - '\060', '\012', '\000', '\100', '\012', '\000', '\120', '\012', - '\000', '\140', '\012', '\000', '\160', '\012', '\000', '\200', - '\012', '\000', '\320', '\027', '\252', '\000', '\000', '\253', - '\000', '\000', '\254', '\000', '\000', '\255', '\000', '\000', - '\256', '\000', '\000', '\257', '\160', '\024', '\000', '\360', - '\027', '\262', '\000', '\000', '\201', '\101', '\013', '\000', - '\120', '\013', '\000', '\100', '\066', '\267', '\000', '\000', - '\270', '\000', '\000', '\271', '\000', '\000', '\272', '\000', - '\000', '\273', '\000', '\000', '\274', '\000', '\000', '\275', - '\000', '\000', '\276', '\000', '\000', '\277', '\000', '\000', - '\300', '\000', '\000', '\205', '\041', '\014', '\000', '\140', - '\066', '\304', '\000', '\000', '\305', '\000', '\000', '\306', - '\000', '\000', '\307', '\000', '\000', '\310', '\000', '\000', - '\311', '\000', '\000', '\312', '\000', '\000', '\313', '\000', - '\000', '\314', '\000', '\000', '\315', '\000', '\000', '\316', - '\000', '\000', '\317', '\000', '\000', '\150', '\023', '\015', - '\000', '\160', '\030', '\323', '\000', '\000', '\324', '\000', - '\000', '\325', '\000', '\000', '\326', '\000', '\000', '\327', - '\000', '\000', '\330', '\000', '\000', '\331', '\000', '\000', - '\211', '\261', '\015', '\000', '\300', '\015', '\000', '\240', - '\066', '\336', '\000', '\000', '\337', '\260', '\023', '\113', - '\143', '\264', '\023', '\321', '\014', '\153', '\333', '\266', - '\006', '\301', '\266', '\157', '\353', '\266', '\152', '\033', - '\267', '\164', '\073', '\267', '\166', '\013', '\267', '\167', - '\053', '\267', '\170', '\273', '\267', '\172', '\333', '\267', - '\165', '\313', '\267', '\177', '\353', '\267', '\171', '\033', - '\270', '\204', '\073', '\270', '\206', '\013', '\270', '\207', - '\053', '\270', '\210', '\273', '\270', '\212', '\333', '\270', - '\205', '\313', '\270', '\217', '\353', '\270', '\211', '\033', - '\271', '\224', '\073', '\271', '\226', '\013', '\271', '\227', - '\053', '\271', '\230', '\273', '\271', '\232', '\333', '\271', - '\225', '\313', '\271', '\237', '\353', '\271', '\231', '\033', - '\272', '\244', '\073', '\272', '\246', '\013', '\272', '\247', - '\053', '\272', '\250', '\273', '\272', '\252', '\333', '\272', - '\245', '\313', '\272', '\257', '\353', '\272', '\251', '\033', - '\273', '\264', '\073', '\273', '\266', '\213', '\272', '\012', - '\221', '\266', '\012', '\161', '\134', '\101', '\005', '\241', - '\011', '\321', '\241', '\006', '\061', '\121', '\006', '\221', - '\243', '\171', '\225', '\020', '\071', '\142', '\020', '\141', - '\152', '\020', '\155', '\152', '\020', '\303', '\141', '\020', - '\214', '\152', '\020', '\134', '\143', '\020', '\254', '\152', - '\020', '\306', '\152', '\020', '\326', '\152', '\020', '\347', - '\152', '\020', '\370', '\152', '\020', '\011', '\153', '\020', - '\030', '\153', '\020', '\051', '\153', '\020', '\071', '\153', - '\020', '\113', '\153', '\020', '\133', '\153', '\020', '\341', - '\260', '\066', '\011', '\061', '\017', '\011', '\301', '\017', - '\011', '\121', '\000', '\023', '\061', '\211', '\214', '\047', - '\023', '\023', '\141', '\002', '\023', '\321', '\002', '\023', - '\141', '\003', '\023', '\021', '\004', '\023', '\201', '\004', - '\023', '\001', '\005', '\023', '\241', '\005', '\023', '\121', - '\006', '\023', '\361', '\006', '\023', '\241', '\007', '\023', - '\061', '\010', '\023', '\141', '\032', '\006', '\341', '\010', - '\023', '\121', '\011', '\023', '\301', '\011', '\023', '\041', - '\012', '\023', '\161', '\012', '\023', '\261', '\012', '\023', - '\361', '\012', '\023', '\121', '\013', '\213', '\063', '\021', - '\277', '\060', '\021', '\303', '\060', '\021', '\311', '\060', - '\021', '\317', '\360', '\070', '\023', '\241', '\015', '\023', - '\101', '\016', '\023', '\221', '\016', '\023', '\361', '\016', - '\023', '\161', '\017', '\227', '\021', '\021', '\232', '\147', - '\020', '\005', '\020', '\021', '\247', '\145', '\020', '\011', - '\020', '\021', '\013', '\020', '\021', '\015', '\020', '\021', - '\066', '\225', '\146', '\021', '\061', '\001', '\231', '\023', - '\021', '\027', '\020', '\021', '\031', '\020', '\021', '\033', - '\020', '\021', '\035', '\020', '\021', '\037', '\020', '\021', - '\041', '\020', '\021', '\043', '\020', '\021', '\045', '\020', - '\021', '\047', '\020', '\021', '\051', '\020', '\021', '\053', - '\020', '\021', '\055', '\320', '\071', '\021', '\021', '\003', - '\021', '\061', '\003', '\021', '\121', '\003', '\021', '\161', - '\003', '\021', '\041', '\004', '\021', '\301', '\004', '\021', - '\221', '\005', '\021', '\121', '\006', '\247', '\023', '\021', - '\172', '\020', '\021', '\174', '\020', '\021', '\176', '\020', - '\021', '\200', '\020', '\021', '\202', '\020', '\021', '\204', - '\020', '\021', '\206', '\020', '\021', '\210', '\260', '\072', - '\021', '\301', '\010', '\021', '\341', '\010', '\021', '\001', - '\011', '\021', '\041', '\011', '\021', '\101', '\011', '\021', - '\141', '\011', '\021', '\201', '\011', '\021', '\241', '\011', - '\021', '\301', '\011', '\021', '\341', '\011', '\021', '\001', - '\012', '\021', '\041', '\012', '\257', '\023', '\021', '\246', - '\020', '\021', '\250', '\020', '\021', '\252', '\020', '\021', - '\254', '\020', '\021', '\256', '\020', '\021', '\270', '\020', - '\021', '\274', '\020', '\021', '\307', '\020', '\021', '\322', - '\020', '\021', '\333', '\020', '\021', '\340', '\220', '\073', - '\021', '\241', '\016', '\021', '\361', '\016', '\021', '\101', - '\017', '\021', '\221', '\017', '\021', '\341', '\017', '\062', - '\354', '\023', '\010', '\340', '\023', '\015', '\340', '\023', - '\022', '\340', '\023', '\027', '\340', '\023', '\034', '\340', - '\023', '\041', '\060', '\074', '\076', '\261', '\002', '\076', - '\001', '\003', '\076', '\121', '\003', '\076', '\241', '\003', - '\076', '\361', '\003', '\076', '\101', '\004', '\076', '\221', - '\004', '\076', '\341', '\004', '\076', '\061', '\005', '\076', - '\201', '\005', '\076', '\321', '\005', '\076', '\041', '\006', - '\315', '\343', '\023', '\154', '\340', '\023', '\161', '\340', - '\023', '\166', '\340', '\023', '\173', '\340', '\023', '\200', - '\340', '\023', '\205', '\340', '\023', '\212', '\340', '\023', - '\217', '\340', '\023', '\224', '\340', '\023', '\231', '\340', - '\023', '\236', '\340', '\023', '\243', '\160', '\075', '\076', - '\321', '\012', '\076', '\041', '\013', '\076', '\161', '\013', - '\076', '\301', '\013', '\076', '\021', '\014', '\076', '\141', - '\014', '\076', '\261', '\014', '\076', '\001', '\015', '\076', - '\121', '\015', '\076', '\241', '\015', '\076', '\361', '\015', - '\076', '\101', '\016', '\341', '\343', '\023', '\356', '\340', - '\023', '\363', '\340', '\023', '\370', '\340', '\023', '\375', - '\340', '\023', '\216', '\145', '\020', '\146', '\065', '\132', - '\035', '\021', '\001', '\035', '\141', '\001', '\035', '\261', - '\001', '\035', '\001', '\002', '\035', '\121', '\002', '\353', - '\323', '\021', '\057', '\320', '\021', '\064', '\320', '\021', - '\071', '\320', '\021', '\076', '\320', '\021', '\103', '\320', - '\021', '\110', '\320', '\021', '\115', '\320', '\021', '\122', - '\320', '\021', '\127', '\320', '\021', '\134', '\320', '\021', - '\141', '\320', '\021', '\146', '\120', '\077', '\035', '\001', - '\007', '\035', '\121', '\007', '\035', '\241', '\007', '\035', - '\361', '\007', '\035', '\101', '\010', '\035', '\221', '\010', - '\035', '\341', '\010', '\035', '\061', '\011', '\035', '\201', - '\011', '\035', '\321', '\011', '\035', '\041', '\012', '\035', - '\161', '\012', '\377', '\323', '\021', '\261', '\320', '\021', - '\266', '\320', '\021', '\273', '\340', '\323', '\302', '\221', - '\006', '\151', '\000', '\003', '\146', '\235', '\247', '\143', - '\135', '\326', '\060', '\140', '\045', '\141', '\220', '\326', - '\146', '\355', '\025', '\155', '\075', '\006', '\144', '\155', - '\326', '\064', '\032', '\327', '\163', '\015', '\003', '\123', - '\143', '\327', '\152', '\175', '\243', '\172', '\155', '\326', - '\071', '\332', '\327', '\060', '\260', '\243', '\175', '\035', - '\003', '\060', '\072', '\330', '\154', '\355', '\326', '\061', - '\000', '\327', '\210', '\135', '\327', '\210', '\235', '\327', - '\210', '\315', '\327', '\210', '\375', '\327', '\210', '\055', - '\330', '\156', '\335', '\051', '\150', '\055', '\327', '\145', - '\055', '\003', '\207', '\215', '\331', '\060', '\040', '\003', - '\212', '\315', '\331', '\062', '\300', '\330', '\240', '\355', - '\330', '\240', '\015', '\331', '\240', '\055', '\331', '\240', - '\115', '\331', '\234', '\075', '\003', '\205', '\355', '\326', - '\063', '\260', '\331', '\163', '\075', '\003', '\237', '\035', - '\333', '\242', '\035', '\333', '\244', '\035', '\333', '\246', - '\035', '\333', '\250', '\035', '\333', '\073', '\072', '\007', - '\160', '\020', '\006', '\143', '\000', '\250', '\145', '\200', - '\007', '\143', '\300', '\006', '\141', '\360', '\035', '\161', - '\120', '\007', '\157', '\100', '\007', '\320', '\001', '\046', - '\000', '\340', '\006', '\336', '\041', '\006', '\145', '\040', - '\007', '\163', '\220', '\006', '\147', '\360', '\250', '\145', - '\302', '\006', '\306', '\175', '\251', '\160', '\060', '\335', - '\301', '\355', '\006', '\233', '\172', '\334', '\335', '\115', - '\335', '\170', '\122', '\021', '\311', '\275', '\334', '\323', - '\155', '\335', '\150', '\260', '\251', '\277', '\135', '\047', - '\156', '\300', '\006', '\145', '\140', '\006', '\354', '\115', - '\047', '\371', '\041', '\007', '\352', '\035', '\336', '\163', - '\300', '\334', '\366', '\075', '\007', '\234', '\001', '\007', - '\154', '\120', '\007', '\231', '\072', '\006', '\146', '\162', - '\046', '\205', '\232', '\007', '\160', '\200', '\006', '\371', - '\041', '\251', '\351', '\375', '\006', '\025', '\061', '\007', - '\306', '\075', '\007', '\206', '\252', '\007', '\323', '\035', - '\251', '\366', '\001', '\250', '\164', '\160', '\007', '\221', - '\112', '\007', '\150', '\120', '\047', '\200', '\312', '\046', - '\165', '\160', '\251', '\146', '\220', '\006', '\166', '\000', - '\250', '\325', '\315', '\026', '\373', '\061', '\342', '\217', - '\132', '\006', '\367', '\375', '\334', '\151', '\002', '\250', - '\002', '\316', '\006', '\366', '\201', '\251', '\362', '\041', - '\046', '\157', '\000', '\343', '\217', '\012', '\337', '\163', - '\220', '\251', '\145', '\220', '\334', '\141', '\300', '\250', - '\147', '\120', '\047', '\141', '\240', '\337', '\224', '\132', - '\007', '\145', '\220', '\337', '\151', '\020', '\343', '\101', - '\336', '\037', '\000', '\260', '\244', '\057', '\342', '\244', - '\120', '\052', '\245', '\000', '\100', '\245', '\126', '\212', - '\245', '\000', '\240', '\245', '\146', '\321', '\245', '\137', - '\032', '\246', '\346', '\061', '\005', '\144', '\012', '\000', - '\146', '\212', '\246', '\127', '\240', '\246', '\154', '\272', - '\247', '\162', '\020', '\006', '\153', '\120', '\006', '\164', - '\000', '\337', '\362', '\275', '\247', '\300', '\275', '\006', - '\016', '\336', '\326', '\206', '\052', '\006', '\145', '\076', - '\006', '\147', '\116', '\007', '\366', '\175', '\006', '\353', - '\175', '\331', '\144', '\055', '\327', '\162', '\060', '\006', - '\336', '\301', '\251', '\224', '\102', '\335', '\002', '\136', - '\047', '\103', '\216', '\336', '\152', '\036', '\336', '\173', - '\332', '\247', '\024', '\001', '\000', '\035', '\076', '\250', - '\205', '\172', '\250', '\000', '\220', '\250', '\213', '\332', - '\250', '\317', '\015', '\251', '\222', '\112', '\251', '\226', - '\212', '\251', '\232', '\312', '\251', '\000', '\340', '\251', - '\240', '\052', '\252', '\000', '\100', '\252', '\162', '\016', - '\334', '\145', '\160', '\350', '\154', '\176', '\251', '\243', - '\036', '\334', '\167', '\236', '\347', '\172', '\115', '\007', - '\151', '\300', '\006', '\370', '\241', '\347', '\151', '\020', - '\003', '\067', '\260', '\243', '\146', '\035', '\006', '\060', - '\172', '\353', '\126', '\162', '\353', '\136', '\161', '\353', - '\064', '\172', '\353', '\123', '\163', '\353', '\067', '\172', - '\353', '\071', '\172', '\353', '\266', '\016', '\003', '\141', - '\320', '\243', '\267', '\256', '\044', '\267', '\256', '\247', - '\267', '\316', '\247', '\267', '\076', '\034', '\267', '\136', - '\021', '\267', '\016', '\250', '\267', '\056', '\250', '\146', - '\055', '\006', '\271', '\016', '\003', '\142', '\260', '\353', - '\334', '\336', '\353', '\334', '\376', '\353', '\334', '\036', - '\354', '\334', '\076', '\354', '\334', '\136', '\354', '\334', - '\176', '\354', '\142', '\240', '\354', '\334', '\316', '\354', - '\334', '\356', '\354', '\334', '\016', '\355', '\334', '\056', - '\355', '\334', '\116', '\355', '\334', '\156', '\355', '\334', - '\216', '\355', '\060', '\060', '\006', '\333', '\076', '\006', - '\336', '\076', '\006', '\340', '\076', '\006', '\342', '\076', - '\006', '\344', '\076', '\006', '\346', '\076', '\006', '\350', - '\076', '\006', '\307', '\076', '\006', '\354', '\076', '\006', - '\356', '\076', '\006', '\360', '\076', '\006', '\362', '\076', - '\006', '\364', '\076', '\006', '\366', '\036', '\334', '\057', - '\272', '\357', '\372', '\116', '\006', '\333', '\116', '\006', - '\336', '\116', '\006', '\340', '\116', '\006', '\342', '\116', - '\006', '\344', '\116', '\006', '\346', '\116', '\006', '\350', - '\116', '\006', '\307', '\116', '\006', '\354', '\116', '\006', - '\356', '\116', '\006', '\360', '\116', '\006', '\362', '\116', - '\006', '\364', '\116', '\006', '\366', '\036', '\353', '\146', - '\115', '\006', '\372', '\136', '\006', '\333', '\136', '\006', - '\336', '\136', '\006', '\340', '\136', '\006', '\342', '\136', - '\006', '\344', '\136', '\006', '\346', '\136', '\006', '\350', - '\136', '\006', '\307', '\136', '\006', '\354', '\136', '\006', - '\356', '\136', '\006', '\360', '\136', '\006', '\362', '\136', - '\006', '\364', '\316', '\037', '\146', '\135', '\006', '\370', - '\036', '\337', '\031', '\157', '\006', '\333', '\156', '\006', - '\336', '\156', '\006', '\340', '\156', '\006', '\342', '\156', - '\006', '\344', '\156', '\006', '\346', '\156', '\006', '\350', - '\156', '\006', '\307', '\156', '\006', '\354', '\156', '\006', - '\356', '\156', '\006', '\360', '\156', '\006', '\362', '\056', - '\020', '\133', '\157', '\357', '\146', '\200', '\357', '\146', - '\040', '\250', '\302', '\002', '\150', '\023', '\201', '\054', - '\025', '\307', '\055', '\331', '\362', '\367', '\370', '\206', - '\055', '\322', '\042', '\370', '\043', '\261', '\124', '\370', - '\060', '\237', '\015', '\021', '\370', '\312', '\002', - -}; - -static const char file_cursor[] = { - '\037', '\235', '\214', '\001', '\314', '\214', '\201', '\203', - '\000', '\200', '\301', '\000', '\006', '\023', '\032', '\044', - '\227', '\020', '\121', '\102', '\001', '\012', '\023', '\222', - '\111', '\310', '\006', '\041', '\000', '\002', '\012', '\055', - '\042', '\030', '\140', '\020', '\232', '\306', '\210', '\006', - '\151', '\114', '\060', '\210', '\015', '\043', '\000', '\020', - '\040', '\001', '\020', '\261', '\310', '\000', '\203', '\101', - '\040', '\051', '\341', '\100', '\004', '\000', '\045', '\203', - '\101', '\100', '\051', '\321', '\045', '\060', '\010', '\154', - '\103', '\102', '\213', '\012', '\047', '\032', '\104', '\125', - '\002', '\344', '\116', '\220', '\001', '\024', '\044', '\124', - '\241', '\320', '\206', '\305', '\032', '\077', '\165', '\044', - '\014', '\242', '\120', '\251', '\101', '\044', '\012', '\327', - '\044', '\234', '\242', '\320', '\111', '\102', '\060', '\135', - '\023', '\266', '\121', '\370', '\257', '\354', '\077', '\073', - '\012', '\033', '\200', '\014', '\224', '\160', '\310', '\023', - '\050', '\131', '\244', '\044', '\071', '\202', '\204', '\012', - '\000', '\052', '\150', '\312', '\314', '\051', '\003', '\102', - '\304', '\031', '\066', '\171', '\340', '\240', '\231', '\043', - '\002', '\104', '\030', '\071', '\174', '\353', '\270', '\051', - '\343', '\146', '\114', '\235', '\066', '\142', '\312', '\040', - '\236', '\010', '\345', '\111', '\022', '\047', '\124', '\276', - '\114', '\111', '\242', '\245', '\010', '\000', '\043', '\117', - '\060', '\003', '\160', '\054', '\147', '\316', '\033', '\071', - '\000', '\256', '\024', '\231', '\133', '\027', '\200', '\224', - '\042', '\123', '\236', '\060', '\251', '\102', '\045', '\111', - '\150', '\327', '\260', '\145', '\323', '\266', '\355', '\344', - '\013', '\026', '\334', '\261', '\147', '\327', '\016', '\375', - '\045', '\013', '\000', '\054', '\137', '\220', '\254', '\246', - '\153', '\067', '\112', '\225', '\040', '\104', '\276', '\134', - '\111', '\102', '\204', '\012', '\326', '\224', '\330', '\041', - '\044', '\214', '\220', '\320', '\354', '\277', '\170', '\377', - '\014', '\052', '\055', '\233', '\021', '\200', '\166', '\356', - '\017', '\314', '\143', '\137', '\317', '\276', '\275', '\173', - '\244', '\006', '\065', '\001', '\320', '\203', '\050', '\222', - '\041', '\104', '\171', '\022', '\105', '\072', '\224', '\150', - '\116', '\240', '\110', '\200', '\070', '\042', '\207', '\040', - '\221', '\004', '\362', '\110', '\037', '\205', '\104', '\222', - '\110', '\040', '\174', '\030', '\022', '\211', '\042', '\202', - '\040', '\250', '\040', '\203', '\016', '\102', '\070', '\140', - '\044', '\203', '\024', '\162', '\041', '\041', '\205', '\350', - '\161', '\210', '\175', '\370', '\325', '\307', '\137', '\200', - '\221', '\064', '\022', '\310', '\037', '\217', '\104', '\342', - '\210', '\040', '\376', '\225', '\030', '\310', '\205', '\053', - '\172', '\350', '\142', '\036', '\365', '\255', '\230', '\307', - '\207', '\013', '\342', '\121', '\037', '\204', '\170', '\174', - '\210', '\010', '\042', '\072', '\106', '\362', '\143', '\203', - '\000', '\072', '\262', '\307', '\207', '\006', '\336', '\270', - '\337', '\041', '\101', '\376', '\110', '\037', '\206', '\215', - '\350', '\241', '\337', '\040', '\215', '\320', '\250', '\340', - '\041', '\371', '\135', '\231', '\345', '\041', '\370', '\351', - '\307', '\337', '\226', '\135', '\356', '\027', '\046', '\227', - '\133', '\046', '\142', '\045', '\231', '\136', '\046', '\262', - '\107', '\202', '\205', '\164', '\350', '\240', '\041', '\206', - '\350', '\341', '\140', '\041', '\130', '\176', '\170', '\337', - '\232', '\113', '\312', '\051', '\044', '\042', '\162', '\374', - '\007', '\310', '\043', '\175', '\002', '\010', '\111', '\240', - '\177', '\022', '\372', '\210', '\236', '\164', '\052', '\171', - '\337', '\223', '\367', '\225', '\251', '\344', '\041', '\114', - '\326', '\367', '\343', '\205', '\202', '\064', '\162', '\041', - '\225', '\176', '\070', '\042', '\150', '\246', '\202', '\322', - '\341', '\047', '\044', '\236', '\012', '\372', '\147', '\221', - '\200', '\100', '\122', '\340', '\241', '\372', '\041', '\022', - '\147', '\252', '\206', '\064', '\011', '\244', '\244', '\370', - '\331', '\371', '\352', '\176', '\211', '\000', '\122', '\137', - '\200', '\177', '\350', '\147', '\040', '\211', '\206', '\034', - '\202', '\242', '\230', '\200', '\050', '\262', '\344', '\037', - '\213', '\354', '\351', '\152', '\217', '\173', '\006', '\073', - '\041', '\261', '\017', '\012', '\162', '\307', '\177', '\013', - '\332', '\101', '\240', '\205', '\004', '\026', '\262', '\310', - '\205', '\326', '\036', '\353', '\043', '\042', '\174', '\024', - '\033', '\110', '\043', '\174', '\060', '\162', '\252', '\035', - '\377', '\075', '\022', '\110', '\035', '\004', '\232', '\153', - '\045', '\043', '\204', '\144', '\311', '\056', '\221', '\155', - '\036', '\151', '\237', '\041', '\174', '\044', '\310', '\345', - '\036', '\016', '\376', '\230', '\207', '\237', '\216', '\340', - '\101', '\240', '\201', '\055', '\366', '\172', '\041', '\227', - '\317', '\056', '\051', '\255', '\261', '\260', '\042', '\353', - '\144', '\175', '\215', '\246', '\251', '\347', '\037', '\375', - '\336', '\012', '\111', '\037', '\204', '\104', '\362', '\010', - '\040', '\365', '\132', '\034', '\210', '\225', '\203', '\264', - '\133', '\037', '\207', '\201', '\230', '\332', '\161', '\251', - '\221', '\160', '\030', '\007', '\040', '\030', '\022', '\022', - '\307', '\177', '\034', '\122', '\034', '\311', '\037', '\220', - '\144', '\134', '\252', '\313', '\134', '\146', '\314', '\245', - '\035', '\011', '\226', '\132', '\107', '\316', '\220', '\074', - '\032', '\351', '\236', '\172', '\010', '\313', '\137', '\320', - '\264', '\336', '\101', '\240', '\040', '\216', '\034', '\214', - '\364', '\231', '\146', '\246', '\151', '\145', '\257', '\133', - '\036', '\342', '\041', '\044', '\120', '\043', '\002', '\011', - '\227', '\044', '\342', '\232', '\342', '\256', '\232', '\152', - '\175', '\152', '\213', '\001', '\136', '\150', '\240', '\214', - '\001', '\132', '\231', '\344', '\207', '\301', '\006', '\031', - '\310', '\042', '\056', '\227', '\052', '\063', '\044', '\312', - '\006', '\313', '\354', '\332', '\112', '\012', '\302', '\110', - '\220', '\110', '\027', '\034', '\354', '\301', '\153', '\257', - '\174', '\245', '\337', '\211', '\034', '\102', '\261', '\042', - '\220', '\326', '\253', '\310', '\217', '\012', '\311', '\007', - '\022', '\007', '\011', '\361', '\220', '\320', '\157', '\006', - '\341', '\221', '\220', '\040', '\011', '\051', '\016', '\000', - '\051', '\011', '\361', '\222', '\020', '\063', '\011', '\171', - '\223', '\220', '\076', '\011', '\151', '\140', '\221', '\123', - '\006', '\131', '\141', '\221', '\034', '\026', '\111', '\142', - '\221', '\053', '\026', '\071', '\143', '\221', '\070', '\026', - '\351', '\143', '\221', '\006', '\063', '\351', '\060', '\223', - '\025', '\063', '\331', '\061', '\223', '\044', '\063', '\311', - '\062', '\223', '\064', '\063', '\311', '\063', '\223', '\004', - '\034', '\001', '\040', '\103', '\361', '\120', '\024', '\017', - '\107', '\361', '\216', '\024', '\317', '\112', '\361', '\312', - '\024', '\257', '\116', '\361', '\010', '\230', '\204', '\202', - '\111', '\074', '\230', '\104', '\205', '\111', '\154', '\230', - '\204', '\210', '\111', '\244', '\230', '\104', '\214', '\111', - '\342', '\230', '\044', '\100', '\001', '\006', '\201', '\200', - '\076', '\000', '\076', '\254', '\157', '\305', '\372', '\162', - '\254', '\357', '\310', '\372', '\256', '\254', '\257', '\314', - '\372', '\352', '\254', '\217', '\200', '\001', '\006', '\241', - '\300', '\077', '\000', '\110', '\370', '\037', '\032', '\376', - '\207', '\210', '\377', '\241', '\342', '\177', '\304', '\370', - '\037', '\071', '\376', '\007', '\200', '\003', '\030', '\204', - '\003', '\016', '\004', '\000', '\017', '\042', '\310', '\205', - '\010', '\342', '\041', '\202', '\230', '\210', '\240', '\051', - '\042', '\150', '\214', '\010', '\202', '\043', '\202', '\376', - '\210', '\240', '\006', '\012', '\002', '\000', '\035', '\220', - '\120', '\013', '\044', '\324', '\003', '\011', '\035', '\101', - '\102', '\123', '\220', '\120', '\027', '\044', '\224', '\006', - '\011', '\345', '\101', '\102', '\011', '\034', '\105', '\006', - '\107', '\221', '\302', '\121', '\334', '\160', '\024', '\107', - '\034', '\305', '\025', '\107', '\161', '\306', '\121', '\334', - '\161', '\024', '\007', '\130', '\105', '\004', '\126', '\321', - '\201', '\125', '\260', '\140', '\025', '\074', '\130', '\305', - '\020', '\126', '\061', '\205', '\125', '\200', '\141', '\025', - '\157', '\130', '\105', '\037', '\126', '\321', '\300', '\002', - '\014', '\242', '\203', '\055', '\002', '\100', '\013', '\136', - '\264', '\203', '\027', '\055', '\341', '\105', '\130', '\170', - '\021', '\032', '\136', '\374', '\206', '\027', '\377', '\341', - '\305', '\006', '\060', '\300', '\040', '\037', '\170', '\043', - '\000', '\132', '\040', '\307', '\037', '\310', '\261', '\011', - '\162', '\374', '\202', '\034', '\335', '\040', '\107', '\107', - '\310', '\261', '\023', '\162', '\334', '\205', '\034', '\267', - '\041', '\307', '\175', '\310', '\361', '\002', '\152', '\001', - '\300', '\015', '\022', '\171', '\205', '\104', '\336', '\041', - '\221', '\227', '\110', '\344', '\055', '\022', '\171', '\215', - '\104', '\336', '\043', '\221', '\021', '\160', '\200', '\101', - '\132', '\240', '\111', '\000', '\034', '\241', '\223', '\145', - '\350', '\144', '\040', '\072', '\031', '\212', '\116', '\366', - '\242', '\223', '\335', '\350', '\144', '\076', '\072', '\231', - '\201', '\364', '\000', '\240', '\006', '\256', '\254', '\202', - '\053', '\323', '\340', '\312', '\100', '\270', '\062', '\022', - '\256', '\214', '\205', '\053', '\213', '\341', '\312', '\156', - '\270', '\062', '\037', '\256', '\314', '\200', '\166', '\346', - '\070', '\314', '\042', '\014', '\263', '\014', '\303', '\054', - '\304', '\060', '\047', '\061', '\314', '\131', '\014', '\323', - '\005', '\334', '\001', '\000', '\027', '\104', '\140', '\020', - '\134', '\020', '\301', '\040', '\007', '\300', '\301', '\003', - '\170', '\360', '\001', '\037', '\370', '\340', '\003', '\374', - '\170', '\000', '\076', '\016', '\000', '\217', '\001', '\224', - '\163', '\234', '\341', '\374', '\146', '\067', '\267', '\231', - '\315', '\007', '\300', '\343', '\003', '\370', '\370', '\001', - '\077', '\376', '\340', '\017', '\177', '\374', '\201', '\037', - '\077', '\300', '\307', '\007', '\340', '\341', '\116', '\161', - '\202', '\363', '\007', '\366', '\244', '\247', '\074', '\341', - '\351', '\116', '\000', '\300', '\100', '\202', '\000', '\370', - '\000', '\060', '\366', '\371', '\200', '\160', '\002', '\343', - '\000', '\037', '\134', '\036', '\016', '\006', '\300', '\201', - '\000', '\070', '\040', '\000', '\016', '\234', '\011', '\070', - '\000', '\200', '\017', '\000', '\370', '\003', '\020', '\177', - '\000', '\307', '\037', '\342', '\211', '\117', '\176', '\174', - '\000', '\034', '\014', '\305', '\307', '\003', '\370', '\160', - '\000', '\037', '\034', '\340', '\003', '\002', '\320', '\044', - '\106', '\302', '\363', '\017', '\014', '\330', '\024', '\003', - '\132', '\340', '\001', '\006', '\376', '\061', '\000', '\236', - '\372', '\264', '\247', '\003', '\220', '\234', '\344', '\374', - '\021', '\000', '\242', '\022', '\225', '\037', '\000', '\220', - '\034', '\006', '\170', '\240', '\205', '\233', '\356', '\024', - '\000', '\377', '\070', '\350', '\120', '\213', '\112', '\125', - '\241', '\102', '\025', '\250', '\077', '\345', '\051', '\116', - '\300', '\061', '\200', '\010', '\030', '\200', '\074', '\056', - '\301', '\210', '\000', '\170', '\272', '\321', '\162', '\346', - '\343', '\000', '\336', '\061', '\313', '\007', '\376', '\201', - '\326', '\001', '\034', '\201', '\003', '\104', '\040', '\100', - '\134', '\343', '\372', '\217', '\017', '\024', '\201', '\002', - '\167', '\315', '\053', '\005', '\352', '\072', '\127', '\271', - '\022', '\340', '\255', '\337', '\350', '\103', '\140', '\003', - '\313', '\215', '\016', '\374', '\343', '\017', '\207', '\075', - '\354', '\140', '\373', '\220', '\130', '\304', '\376', '\241', - '\260', '\213', '\015', '\054', '\107', '\070', '\062', '\002', - '\004', '\214', '\200', '\000', '\043', '\020', '\300', '\010', - '\002', '\060', '\212', '\321', '\000', '\140', '\034', '\017', - '\230', '\054', '\000', '\070', '\362', '\217', '\037', '\224', - '\066', '\075', '\351', '\171', '\007', '\014', '\336', '\201', - '\203', '\167', '\160', '\340', '\035', '\016', '\170', '\307', - '\001', '\336', '\061', '\200', '\167', '\374', '\300', '\266', - '\266', '\115', '\117', '\132', '\315', '\142', '\120', '\203', - '\022', '\040', '\006', '\010', '\210', '\001', '\004', '\142', - '\000', '\202', '\030', '\000', '\041', '\006', '\200', '\210', - '\001', '\077', '\142', '\320', '\333', '\203', '\302', '\240', - '\264', '\245', '\005', '\000', '\074', '\244', '\313', '\200', - '\173', '\160', '\340', '\036', '\070', '\270', '\007', '\034', - '\356', '\001', '\216', '\173', '\000', '\343', '\036', '\374', - '\000', '\257', '\170', '\245', '\273', '\333', '\262', '\300', - '\344', '\274', '\000', '\100', '\057', '\114', '\342', '\212', - '\004', '\001', '\100', '\041', '\000', '\033', '\205', '\211', - '\101', '\352', '\132', '\127', '\140', '\004', '\300', '\276', - '\370', '\275', '\257', '\176', '\231', '\221', '\201', '\302', - '\252', '\024', '\036', '\020', '\035', '\200', '\175', '\033', - '\333', '\130', '\140', '\000', '\300', '\300', '\010', '\076', - '\260', '\202', '\023', '\014', '\335', '\037', '\000', '\103', - '\300', '\020', '\176', '\260', '\204', '\043', '\334', '\323', - '\362', '\036', '\026', '\041', '\375', '\370', '\103', '\001', - '\200', '\120', '\217', '\057', '\124', '\000', '\012', '\325', - '\270', '\002', '\155', '\252', '\120', '\205', '\152', '\124', - '\241', '\002', '\124', '\250', '\307', '\025', '\012', '\000', - '\205', '\176', '\174', '\041', '\000', '\100', '\110', '\254', - '\205', '\147', '\114', '\143', '\357', '\070', '\067', '\251', - '\070', '\106', '\052', '\122', '\215', '\032', '\200', '\031', - '\014', '\040', '\006', '\002', '\270', '\361', '\215', '\247', - '\073', '\135', '\174', '\004', '\300', '\310', '\374', '\030', - '\100', '\222', '\103', '\030', '\302', '\177', '\074', '\300', - '\311', '\116', '\276', '\207', '\003', '\210', '\054', '\335', - '\052', '\203', '\343', '\310', '\007', '\010', '\247', '\007', - '\074', '\340', '\000', '\010', '\342', '\040', '\233', '\140', - '\306', '\101', '\227', '\267', '\034', '\316', '\161', '\136', - '\371', '\203', '\372', '\304', '\247', '\075', '\355', '\071', - '\120', '\175', '\272', '\031', '\236', '\362', '\134', '\363', - '\075', '\363', '\171', '\322', '\054', '\077', '\300', '\034', - '\031', '\230', '\300', '\014', '\222', '\101', '\202', '\074', - '\220', '\040', '\002', '\042', '\030', '\107', '\014', '\374', - '\361', '\001', '\145', '\120', '\300', '\320', '\206', '\126', - '\107', '\005', '\226', '\101', '\203', '\155', '\066', '\230', - '\320', '\367', '\310', '\301', '\066', '\356', '\320', '\216', - '\066', '\364', '\343', '\015', '\371', '\060', '\303', '\074', - '\346', '\120', '\332', '\165', '\324', '\300', '\323', '\236', - '\336', '\307', '\015', '\326', '\121', '\207', '\147', '\360', - '\241', '\261', '\052', '\045', '\000', '\004', '\014', '\000', - '\006', '\005', '\140', '\101', '\036', '\107', '\030', '\000', - '\020', '\144', '\055', '\000', '\040', '\324', '\132', '\023', - '\130', '\260', '\102', '\025', '\256', '\121', '\205', '\055', - '\144', '\241', '\326', '\265', '\306', '\247', '\112', '\115', - '\352', '\217', '\177', '\024', '\333', '\302', '\305', '\076', - '\166', '\171', '\213', '\215', '\117', '\040', '\300', '\370', - '\331', '\316', '\216', '\166', '\000', '\020', '\153', '\020', - '\304', '\112', '\373', '\332', '\317', '\346', '\252', '\266', - '\007', '\260', '\155', '\032', '\157', '\373', '\333', '\334', - '\036', '\200', '\020', '\102', '\120', '\204', '\050', '\050', - '\041', '\005', '\124', '\250', '\000', '\032', '\026', '\000', - '\205', '\002', '\374', '\302', '\037', '\316', '\176', '\167', - '\273', '\327', '\235', '\356', '\163', '\227', '\173', '\334', - '\146', '\230', '\101', '\033', '\266', '\261', '\207', '\067', - '\330', '\341', '\006', '\154', '\330', '\300', '\027', '\372', - '\001', '\120', '\234', '\000', '\164', '\340', '\001', '\377', - '\167', '\277', '\367', '\235', '\157', '\234', '\070', '\034', - '\000', '\017', '\177', '\070', '\142', '\043', '\016', '\361', - '\212', '\077', '\074', '\277', '\030', '\327', '\357', '\156', - '\063', '\316', '\361', '\147', '\203', '\141', '\000', '\355', - '\106', '\102', '\002', '\210', '\020', '\201', '\161', '\377', - '\341', '\017', '\325', '\376', '\303', '\270', '\111', '\056', - '\362', '\166', '\177', '\334', '\331', '\134', '\005', '\260', - '\112', '\013', '\353', '\214', '\034', '\034', '\043', '\016', - '\145', '\101', '\154', '\131', '\156', '\136', '\163', '\377', - '\272', '\063', '\300', '\366', '\235', '\052', '\121', '\263', - '\012', '\124', '\036', '\113', '\316', '\310', '\114', '\106', - '\353', '\223', '\227', '\016', '\345', '\245', '\047', '\335', - '\310', '\116', '\016', '\000', '\002', '\244', '\116', '\165', - '\004', '\204', '\301', '\352', '\123', '\317', '\172', '\325', - '\241', '\154', '\332', '\256', '\207', '\371', '\034', '\071', - '\000', '\273', '\330', '\163', '\020', '\346', '\006', '\227', - '\126', '\252', '\000', '\100', '\252', '\055', '\172', '\074', - '\000', '\041', '\367', '\326', '\307', '\153', '\107', '\252', - '\344', '\016', '\132', '\344', '\000', '\054', '\131', '\351', - '\115', '\247', '\162', '\323', '\235', '\034', '\302', '\044', - '\033', '\171', '\272', '\351', '\355', '\255', '\343', '\024', - '\312', '\320', '\160', '\002', '\342', '\000', '\100', '\070', - '\000', '\010', '\006', '\000', '\201', '\001', '\114', '\235', - '\000', '\001', '\200', '\210', '\105', '\300', '\042', '\071', - '\077', '\000', '\342', '\007', '\050', '\325', '\247', '\077', - '\036', '\260', '\371', '\017', '\002', '\030', '\027', '\003', - '\340', '\304', '\000', '\034', '\021', '\200', '\103', '\004', - '\200', '\043', '\026', '\201', '\311', '\101', '\007', '\277', - '\120', '\000', '\150', '\262', '\001', '\200', '\040', '\000', - '\020', '\010', '\200', '\022', '\355', '\024', '\104', '\254', - '\000', '\230', '\074', '\216', '\175', '\160', '\171', '\224', - '\242', '\024', '\020', '\017', '\000', '\306', '\003', '\300', - '\141', '\000', '\231', '\340', '\000', '\000', '\214', '\323', - '\244', '\003', '\111', '\373', '\200', '\110', '\040', '\040', - '\023', '\011', '\150', '\300', '\002', '\016', '\340', '\200', - '\253', '\137', '\235', '\372', '\322', '\207', '\276', '\363', - '\271', '\136', '\332', '\171', '\314', '\100', '\324', '\077', - '\370', '\301', '\067', '\174', '\360', '\216', '\036', '\224', - '\177', '\374', '\341', '\027', '\265', '\367', '\033', '\034', - '\217', '\001', '\354', '\343', '\245', '\014', '\110', '\000', - '\002', '\154', '\362', '\003', '\220', '\324', '\337', '\004', - '\004', '\040', '\001', '\003', '\174', '\200', '\217', '\033', - '\300', '\143', '\004', '\343', '\160', '\000', '\367', '\360', - '\144', '\153', '\025', '\176', '\070', '\020', '\125', '\064', - '\065', '\137', '\120', '\305', '\000', '\376', '\300', '\001', - '\374', '\300', '\017', '\377', '\200', '\017', '\377', '\000', - '\017', '\357', '\000', '\016', '\307', '\140', '\140', '\127', - '\126', '\116', '\006', '\106', '\014', '\010', '\140', '\014', - '\073', '\325', '\165', '\036', '\310', '\201', '\006', '\126', - '\116', '\127', '\206', '\140', '\002', '\006', '\121', '\344', - '\364', '\000', '\350', '\160', '\001', '\334', '\260', '\003', - '\026', '\326', '\202', '\053', '\310', '\117', '\037', '\064', - '\141', '\000', '\340', '\001', '\256', '\027', '\000', '\314', - '\220', '\017', '\015', '\340', '\144', '\177', '\300', '\000', - '\166', '\144', '\000', '\214', '\043', '\116', '\007', '\240', - '\035', '\104', '\250', '\036', '\222', '\003', '\000', '\365', - '\367', '\003', '\025', '\346', '\035', '\135', '\147', '\166', - '\000', '\105', '\120', '\307', '\167', '\174', '\072', '\226', - '\166', '\000', '\060', '\165', '\023', '\040', '\000', '\053', - '\066', '\001', '\004', '\060', '\015', '\005', '\360', '\001', - '\074', '\340', '\200', '\020', '\100', '\016', '\141', '\010', - '\011', '\364', '\000', '\011', '\344', '\000', '\011', '\004', - '\200', '\010', '\010', '\100', '\010', '\020', '\300', '\007', - '\340', '\004', '\000', '\373', '\020', '\000', '\367', '\320', - '\123', '\002', '\050', '\200', '\246', '\245', '\163', '\341', - '\005', '\017', '\367', '\000', '\017', '\023', '\270', '\207', - '\347', '\060', '\154', '\037', '\340', '\206', '\000', '\340', - '\022', '\036', '\160', '\170', '\017', '\226', '\201', '\003', - '\060', '\116', '\372', '\100', '\207', '\375', '\100', '\116', - '\346', '\024', '\000', '\051', '\000', '\000', '\043', '\000', - '\000', '\026', '\000', '\000', '\162', '\304', '\070', '\012', - '\065', '\174', '\216', '\070', '\116', '\233', '\267', '\167', - '\117', '\326', '\126', '\377', '\060', '\155', '\110', '\130', - '\203', '\036', '\025', '\000', '\221', '\347', '\007', '\004', - '\200', '\000', '\010', '\100', '\020', '\252', '\010', '\007', - '\024', '\200', '\000', '\042', '\000', '\003', '\101', '\000', - '\014', '\040', '\000', '\004', '\022', '\000', '\010', '\005', - '\201', '\076', '\002', '\060', '\164', '\164', '\310', '\167', - '\360', '\004', '\116', '\160', '\066', '\117', '\022', '\010', - '\017', '\041', '\345', '\140', '\037', '\000', '\174', '\015', - '\004', '\000', '\002', '\340', '\206', '\306', '\020', '\003', - '\203', '\000', '\006', '\320', '\006', '\155', '\003', '\000', - '\006', '\006', '\000', '\003', '\055', '\201', '\001', '\014', - '\000', '\003', '\254', '\046', '\140', '\001', '\340', '\206', - '\376', '\360', '\003', '\067', '\367', '\214', '\323', '\070', - '\215', '\103', '\020', '\006', '\207', '\000', '\007', '\016', - '\200', '\003', '\034', '\300', '\001', '\142', '\006', '\140', - '\134', '\065', '\140', '\377', '\260', '\012', '\252', '\120', - '\142', '\362', '\130', '\000', '\150', '\004', '\012', '\366', - '\270', '\000', '\370', '\170', '\217', '\371', '\010', '\012', - '\364', '\070', '\217', '\325', '\120', '\143', '\002', '\131', - '\143', '\204', '\026', '\116', '\371', '\160', '\002', '\336', - '\007', '\166', '\317', '\300', '\003', '\015', '\266', '\220', - '\140', '\347', '\175', '\007', '\031', '\116', '\005', '\011', - '\120', '\364', '\244', '\163', '\003', '\231', '\126', '\162', - '\206', '\117', '\247', '\167', '\000', '\017', '\360', '\001', - '\077', '\200', '\130', '\037', '\260', '\001', '\061', '\000', - '\003', '\140', '\360', '\161', '\311', '\230', '\036', '\037', - '\060', '\212', '\050', '\107', '\123', '\001', '\360', '\123', - '\050', '\167', '\017', '\000', '\060', '\017', '\000', '\160', - '\146', '\367', '\065', '\132', '\066', '\071', '\010', '\000', - '\060', '\004', '\222', '\010', '\000', '\043', '\261', '\017', - '\077', '\060', '\022', '\223', '\250', '\223', '\070', '\051', - '\132', '\250', '\005', '\000', '\241', '\365', '\010', '\003', - '\360', '\014', '\001', '\360', '\016', '\120', '\225', '\126', - '\114', '\251', '\224', '\110', '\031', '\132', '\105', '\051', - '\132', '\124', '\151', '\223', '\077', '\125', '\225', '\125', - '\131', '\224', '\132', '\151', '\224', '\120', '\305', '\164', - '\113', '\267', '\225', '\133', '\171', '\137', '\376', '\360', - '\156', '\277', '\040', '\002', '\242', '\040', '\012', '\252', - '\200', '\226', '\152', '\251', '\012', '\146', '\071', '\226', - '\156', '\111', '\226', '\157', '\051', '\226', '\167', '\110', - '\140', '\216', '\105', '\227', '\166', '\131', '\227', '\002', - '\205', '\225', '\066', '\131', '\225', '\077', '\005', '\226', - '\134', '\271', '\225', '\236', '\350', '\144', '\173', '\071', - '\230', '\130', '\371', '\123', '\177', '\171', '\230', '\140', - '\031', '\230', '\301', '\027', '\000', '\170', '\360', '\000', - '\316', '\306', '\026', '\302', '\020', '\016', '\044', '\040', - '\015', '\270', '\340', '\000', '\240', '\040', '\000', '\040', - '\120', '\153', '\001', '\220', '\231', '\150', '\050', '\162', - '\050', '\240', '\000', '\036', '\300', '\115', '\374', '\200', - '\116', '\015', '\365', '\001', '\303', '\020', '\004', '\347', - '\060', '\016', '\314', '\366', '\015', '\052', '\365', '\101', - '\061', '\167', '\000', '\200', '\350', '\007', '\341', '\367', - '\215', '\104', '\005', '\014', '\157', '\151', '\226', '\052', - '\240', '\012', '\271', '\271', '\233', '\154', '\051', '\012', - '\157', '\371', '\233', '\144', '\051', '\227', '\167', '\071', - '\234', '\170', '\111', '\227', '\337', '\270', '\121', '\007', - '\005', '\026', '\006', '\106', '\150', '\233', '\331', '\014', - '\154', '\340', '\234', '\316', '\031', '\000', '\320', '\110', - '\215', '\070', '\200', '\001', '\006', '\220', '\201', '\214', - '\151', '\145', '\036', '\125', '\200', '\002', '\311', '\017', - '\357', '\060', '\116', '\044', '\150', '\121', '\000', '\300', - '\035', '\314', '\045', '\005', '\000', '\340', '\005', '\000', - '\100', '\010', '\000', '\340', '\020', '\123', '\007', '\001', - '\001', '\000', '\003', '\230', '\131', '\153', '\004', '\160', - '\170', '\311', '\310', '\077', '\004', '\120', '\177', '\053', - '\351', '\121', '\151', '\147', '\167', '\107', '\146', '\116', - '\346', '\204', '\202', '\340', '\020', '\174', '\307', '\230', - '\222', '\051', '\151', '\203', '\034', '\200', '\210', '\343', - '\304', '\014', '\014', '\240', '\240', '\340', '\311', '\155', - '\001', '\020', '\016', '\041', '\020', '\016', '\141', '\040', - '\014', '\020', '\300', '\001', '\016', '\160', '\145', '\370', - '\160', '\004', '\053', '\265', '\231', '\347', '\144', '\147', - '\204', '\126', '\220', '\102', '\030', '\017', '\203', '\020', - '\017', '\343', '\060', '\017', '\363', '\360', '\016', '\071', - '\260', '\145', '\127', '\346', '\017', '\307', '\120', '\026', - '\053', '\345', '\166', '\007', '\365', '\123', '\060', '\132', - '\145', '\124', '\066', '\135', '\212', '\131', '\243', '\125', - '\306', '\007', '\372', '\171', '\014', '\001', '\060', '\010', - '\245', '\027', '\000', '\306', '\000', '\137', '\070', '\166', - '\174', '\050', '\000', '\000', '\105', '\352', '\016', '\000', - '\300', '\006', '\000', '\160', '\174', '\332', '\321', '\121', - '\374', '\120', '\124', '\164', '\370', '\010', '\007', '\360', - '\011', '\007', '\340', '\015', '\131', '\226', '\210', '\107', - '\306', '\121', '\373', '\351', '\017', '\112', '\226', '\245', - '\160', '\000', '\161', '\300', '\000', '\016', '\360', '\200', - '\017', '\374', '\120', '\154', '\370', '\200', '\015', '\214', - '\300', '\000', '\006', '\300', '\077', '\003', '\000', '\010', - '\020', '\026', '\163', '\211', '\250', '\144', '\003', '\300', - '\245', '\077', '\205', '\017', '\003', '\300', '\013', '\003', - '\300', '\003', '\003', '\140', '\203', '\066', '\050', '\107', - '\316', '\005', '\004', '\060', '\000', '\010', '\007', '\305', - '\134', '\062', '\360', '\017', '\067', '\140', '\074', '\000', - '\200', '\134', '\060', '\000', '\250', '\315', '\105', '\243', - '\300', '\000', '\017', '\300', '\020', '\017', '\200', '\040', - '\223', '\367', '\260', '\133', '\000', '\160', '\017', '\223', - '\032', '\251', '\217', '\112', '\243', '\204', '\111', '\230', - '\206', '\251', '\227', '\104', '\211', '\230', '\177', '\251', - '\230', '\242', '\252', '\225', '\142', '\111', '\226', '\146', - '\231', '\226', '\252', '\252', '\226', '\155', '\011', '\227', - '\256', '\072', '\226', '\302', '\131', '\234', '\262', '\112', - '\234', '\215', '\365', '\215', '\245', '\025', '\000', '\042', - '\200', '\253', '\270', '\372', '\017', '\043', '\000', '\150', - '\276', '\052', '\002', '\200', '\026', '\017', '\077', '\020', - '\001', '\040', '\100', '\254', '\304', '\012', '\135', '\151', - '\165', '\000', '\356', '\360', '\017', '\357', '\300', '\254', - '\314', '\172', '\007', '\356', '\000', '\255', '\225', '\072', - '\255', '\377', '\160', '\007', '\340', '\260', '\133', '\017', - '\007', '\012', '\001', '\240', '\255', '\260', '\020', '\000', - '\260', '\060', '\000', '\240', '\007', '\172', '\274', '\160', - '\000', '\343', '\352', '\013', '\007', '\340', '\013', '\035', - '\271', '\174', '\015', '\144', '\210', '\301', '\067', '\174', - '\303', '\267', '\117', '\360', '\032', '\117', '\044', '\045', - '\117', '\306', '\126', '\026', '\037', '\020', '\102', '\024', - '\220', '\257', '\372', '\272', '\257', '\024', '\360', '\007', - '\076', '\300', '\001', '\010', '\240', '\243', '\002', '\013', - '\000', '\003', '\133', '\260', '\004', '\173', '\260', '\241', - '\030', '\212', '\376', '\160', '\260', '\114', '\132', '\205', - '\010', '\320', '\022', '\337', '\370', '\000', '\170', '\360', - '\215', '\055', '\241', '\212', '\330', '\270', '\216', '\266', - '\212', '\227', '\337', '\270', '\216', '\330', '\130', '\020', - '\157', '\144', '\117', '\351', '\141', '\117', '\157', '\124', - '\020', '\007', '\045', '\205', '\365', '\132', '\026', '\314', - '\366', '\017', '\307', '\167', '\120', '\125', '\070', '\210', - '\321', '\205', '\007', '\321', '\345', '\022', '\036', '\213', - '\174', '\320', '\145', '\221', '\210', '\125', '\177', '\214', - '\303', '\000', '\010', '\300', '\001', '\076', '\360', '\007', - '\374', '\372', '\263', '\332', '\161', '\174', '\072', '\272', - '\260', '\011', '\333', '\215', '\007', '\153', '\260', '\110', - '\173', '\260', '\073', '\333', '\263', '\077', '\333', '\257', - '\377', '\212', '\000', '\102', '\253', '\237', '\105', '\233', - '\264', '\072', '\132', '\264', '\013', '\253', '\243', '\307', - '\167', '\021', '\256', '\227', '\120', '\200', '\260', '\007', - '\240', '\260', '\007', '\220', '\260', '\007', '\210', '\040', - '\266', '\144', '\073', '\266', '\214', '\260', '\007', '\106', - '\362', '\013', '\173', '\200', '\001', '\334', '\321', '\247', - '\310', '\307', '\076', '\000', '\260', '\222', '\140', '\360', - '\017', '\160', '\360', '\017', '\060', '\173', '\267', '\166', - '\373', '\017', '\247', '\346', '\007', '\211', '\345', '\007', - '\177', '\000', '\003', '\176', '\040', '\101', '\341', '\201', - '\020', '\204', '\013', '\000', '\355', '\027', '\001', '\002', - '\360', '\253', '\020', '\040', '\002', '\377', '\007', '\000', - '\044', '\140', '\244', '\006', '\005', '\014', '\246', '\205', - '\125', '\003', '\340', '\100', '\003', '\170', '\271', '\357', - '\000', '\255', '\322', '\372', '\016', '\024', '\310', '\207', - '\034', '\005', '\014', '\377', '\000', '\272', '\240', '\233', - '\212', '\325', '\123', '\075', '\020', '\040', '\000', '\247', - '\033', '\016', '\341', '\200', '\147', '\343', '\064', '\116', - '\170', '\246', '\272', '\247', '\173', '\272', '\245', '\113', - '\000', '\251', '\150', '\000', '\330', '\250', '\263', '\004', - '\140', '\235', '\042', '\152', '\242', '\366', '\260', '\003', - '\341', '\304', '\017', '\007', '\140', '\017', '\037', '\140', - '\242', '\042', '\212', '\001', '\002', '\140', '\235', '\014', - '\240', '\246', '\056', '\141', '\000', '\070', '\301', '\002', - '\006', '\340', '\011', '\224', '\150', '\000', '\365', '\027', - '\002', '\000', '\160', '\002', '\000', '\120', '\024', '\326', - '\213', '\275', '\325', '\013', '\000', '\324', '\113', '\275', - '\365', '\147', '\211', '\030', '\320', '\000', '\174', '\040', - '\276', '\015', '\340', '\007', '\073', '\010', '\125', '\350', - '\233', '\200', '\352', '\233', '\276', '\350', '\213', '\023', - '\330', '\226', '\231', '\360', '\053', '\000', '\234', '\300', - '\001', '\323', '\270', '\216', '\235', '\231', '\000', '\044', - '\040', '\001', '\371', '\332', '\022', '\252', '\206', '\023', - '\371', '\365', '\161', '\037', '\247', '\215', '\070', '\340', - '\001', '\237', '\300', '\007', '\334', '\026', '\210', '\363', - '\313', '\137', '\371', '\146', '\003', '\066', '\020', '\232', - '\351', '\150', '\137', '\000', '\046', '\146', '\055', '\121', - '\215', '\317', '\130', '\216', '\317', '\130', '\215', '\055', - '\321', '\216', '\007', '\140', '\137', '\257', '\251', '\122', - '\074', '\300', '\145', '\070', '\160', '\216', '\303', '\020', - '\016', '\143', '\060', '\016', '\043', '\174', '\216', '\351', - '\370', '\301', '\255', '\051', '\153', '\201', '\247', '\136', - '\201', '\127', '\127', '\056', '\354', '\302', '\035', '\227', - '\137', '\164', '\071', '\303', '\372', '\305', '\021', '\351', - '\341', '\003', '\372', '\231', '\144', '\145', '\246', '\245', - '\060', '\360', '\236', '\230', '\111', '\173', '\005', '\241', - '\035', '\040', '\340', '\100', '\051', '\211', '\162', '\106', - '\225', '\145', '\362', '\224', '\117', '\371', '\364', '\237', - '\360', '\160', '\241', '\007', '\212', '\003', '\340', '\360', - '\245', '\033', '\005', '\272', '\135', '\127', '\225', '\240', - '\065', '\006', '\000', '\320', '\131', '\233', '\225', '\131', - '\227', '\125', '\131', '\242', '\145', '\141', '\251', '\165', - '\133', '\144', '\114', '\133', '\262', '\005', '\133', '\256', - '\305', '\132', '\252', '\125', '\224', '\015', '\326', '\250', - '\060', '\260', '\134', '\311', '\165', '\134', '\305', '\065', - '\134', '\301', '\365', '\133', '\315', '\145', '\141', '\322', - '\025', '\136', '\172', '\354', '\135', '\334', '\245', '\135', - '\330', '\145', '\135', '\367', '\120', '\135', '\064', '\112', - '\137', '\051', '\031', '\170', '\033', '\365', '\136', '\355', - '\025', '\127', '\061', '\334', '\302', '\120', '\045', '\253', - '\034', '\374', '\237', '\063', '\327', '\001', '\374', '\145', - '\303', '\003', '\326', '\165', '\011', '\166', '\311', '\013', - '\246', '\140', '\026', '\066', '\141', '\234', '\114', '\141', - '\017', '\126', '\020', '\074', '\373', '\007', '\167', '\340', - '\257', '\000', '\333', '\005', '\153', '\220', '\004', '\101', - '\220', '\312', '\121', '\170', '\260', '\104', '\333', '\222', - '\256', '\174', '\265', '\000', '\240', '\013', '\120', '\345', - '\312', '\241', '\170', '\015', '\001', '\140', '\313', '\074', - '\172', '\225', '\235', '\252', '\227', '\212', '\351', '\227', - '\176', '\371', '\075', '\040', '\240', '\000', '\311', '\040', - '\003', '\362', '\220', '\000', '\114', '\140', '\000', '\103', - '\200', '\001', '\213', '\174', '\136', '\317', '\206', '\023', - '\350', '\140', '\007', '\373', '\360', '\015', '\004', '\167', - '\154', '\246', '\365', '\017', '\317', '\220', '\007', '\063', - '\274', '\301', '\332', '\374', '\120', '\156', '\372', '\251', - '\273', '\354', '\251', '\136', '\051', '\230', '\276', '\214', - '\230', '\255', '\013', '\233', '\166', '\146', '\010', '\030', - '\060', '\010', '\060', '\020', '\010', '\340', '\020', '\014', - '\341', '\340', '\316', '\041', '\000', '\016', '\023', '\240', - '\215', '\030', '\120', '\146', '\346', '\114', '\232', '\277', - '\313', '\171', '\334', '\051', '\220', '\117', '\230', '\317', - '\341', '\164', '\007', '\000', '\253', '\212', '\002', '\075', - '\320', '\034', '\160', '\007', '\357', '\100', '\313', '\106', - '\273', '\312', '\012', '\275', '\244', '\014', '\035', '\265', - '\105', '\173', '\320', '\051', '\221', '\011', '\021', '\001', - '\004', '\216', '\160', '\020', '\312', '\150', '\223', '\030', - '\201', '\076', '\374', '\343', '\100', '\005', '\261', '\023', - '\112', '\261', '\105', '\157', '\244', '\026', '\232', '\224', - '\036', '\347', '\001', '\000', '\022', '\300', '\223', '\000', - '\100', '\001', '\000', '\120', '\001', '\224', '\010', '\000', - '\027', '\060', '\210', '\000', '\140', '\023', '\032', '\000', - '\000', '\076', '\301', '\070', '\035', '\100', '\212', '\051', - '\211', '\022', '\324', '\113', '\115', '\223', '\370', '\270', - '\105', '\141', '\002', '\333', '\133', '\244', '\221', '\310', - '\024', '\053', '\000', '\000', '\054', '\060', '\107', '\000', - '\340', '\002', '\000', '\360', '\002', '\275', '\105', '\250', - '\000', '\060', '\003', '\000', '\100', '\003', '\257', '\004', - '\000', '\066', '\240', '\110', '\014', '\235', '\003', '\045', - '\004', '\000', '\073', '\200', '\120', '\075', '\000', '\267', - '\365', '\007', '\023', '\124', '\041', '\004', '\071', '\251', - '\022', '\000', '\340', '\031', '\106', '\340', '\111', '\000', - '\004', '\000', '\111', '\000', '\000', '\112', '\000', '\000', - '\113', '\000', '\000', '\114', '\000', '\000', '\115', '\000', - '\000', '\136', '\361', '\004', '\064', '\001', '\000', '\121', - '\340', '\032', '\000', '\300', '\025', '\166', '\121', '\005', - '\000', '\140', '\005', '\251', '\161', '\034', '\000', '\140', - '\034', '\132', '\000', '\000', '\133', '\040', '\115', '\000', - '\320', '\005', '\347', '\011', '\000', '\137', '\000', '\000', - '\140', '\021', '\006', '\000', '\040', '\006', '\236', '\065', - '\021', '\145', '\000', '\000', '\146', '\000', '\000', '\147', - '\000', '\000', '\150', '\000', '\000', '\151', '\000', '\000', - '\152', '\000', '\000', '\132', '\241', '\244', '\143', '\341', - '\006', '\000', '\360', '\006', '\000', '\360', '\245', '\161', - '\000', '\000', '\250', '\061', '\007', '\000', '\100', '\007', - '\000', '\120', '\007', '\000', '\200', '\026', '\167', '\200', - '\143', '\171', '\060', '\037', '\000', '\260', '\007', '\007', - '\333', '\007', '\000', '\020', '\270', '\050', '\207', '\023', - '\154', '\101', '\071', '\070', '\251', '\236', '\205', '\000', - '\000', '\206', '\000', '\000', '\207', '\260', '\236', '\000', - '\220', '\010', '\000', '\240', '\010', '\000', '\260', '\010', - '\000', '\300', '\010', '\000', '\320', '\010', '\000', '\120', - '\321', '\217', '\000', '\000', '\220', '\000', '\000', '\221', - '\000', '\000', '\222', '\000', '\000', '\223', '\000', '\000', - '\224', '\000', '\000', '\225', '\000', '\000', '\226', '\000', - '\000', '\227', '\000', '\000', '\230', '\000', '\000', '\022', - '\015', '\022', '\226', '\103', '\002', '\063', '\301', '\336', - '\006', '\341', '\336', '\216', '\333', '\336', '\362', '\375', - '\336', '\363', '\035', '\337', '\364', '\175', '\337', '\366', - '\235', '\337', '\360', '\275', '\337', '\365', '\315', '\337', - '\370', '\355', '\337', '\372', '\335', '\337', '\002', '\376', - '\337', '\003', '\036', '\340', '\004', '\176', '\340', '\006', - '\236', '\340', '\000', '\276', '\340', '\005', '\316', '\340', - '\010', '\356', '\340', '\012', '\336', '\340', '\022', '\376', - '\340', '\023', '\036', '\341', '\024', '\176', '\341', '\026', - '\236', '\341', '\020', '\276', '\341', '\025', '\316', '\341', - '\030', '\356', '\341', '\032', '\336', '\341', '\042', '\376', - '\341', '\043', '\236', '\340', '\004', '\060', '\023', '\047', - '\116', '\342', '\052', '\036', '\342', '\053', '\016', '\342', - '\102', '\140', '\021', '\057', '\256', '\336', '\051', '\161', - '\024', '\056', '\235', '\020', '\067', '\335', '\077', '\011', - '\201', '\325', '\006', '\141', '\327', '\006', '\201', '\236', - '\006', '\201', '\032', '\006', '\061', '\333', '\006', '\301', - '\026', '\006', '\301', '\334', '\006', '\161', '\336', '\006', - '\261', '\012', '\011', '\061', '\014', '\011', '\161', '\015', - '\011', '\001', '\170', '\124', '\150', '\020', '\015', '\140', - '\021', '\030', '\140', '\021', '\050', '\140', '\021', '\063', - '\140', '\021', '\103', '\140', '\021', '\116', '\140', '\021', - '\136', '\140', '\021', '\145', '\140', '\021', '\161', '\140', - '\021', '\167', '\140', '\021', '\202', '\140', '\021', '\215', - '\140', '\021', '\235', '\140', '\021', '\243', '\260', '\072', - '\026', '\301', '\013', '\026', '\241', '\224', '\006', '\221', - '\015', '\026', '\201', '\016', '\026', '\141', '\017', '\026', - '\221', '\000', '\063', '\321', '\000', '\063', '\141', '\001', - '\063', '\321', '\001', '\063', '\221', '\002', '\063', '\141', - '\003', '\063', '\321', '\136', '\006', '\101', '\005', '\063', - '\121', '\006', '\063', '\021', '\007', '\063', '\041', '\010', - '\063', '\321', '\010', '\063', '\321', '\011', '\063', '\141', - '\012', '\063', '\101', '\013', '\063', '\241', '\013', '\063', - '\121', '\014', '\063', '\321', '\014', '\063', '\241', '\015', - '\032', '\065', '\023', '\353', '\060', '\023', '\361', '\060', - '\023', '\374', '\060', '\023', '\002', '\120', '\074', '\015', - '\120', '\074', '\023', '\120', '\074', '\036', '\120', '\074', - '\043', '\120', '\074', '\055', '\120', '\074', '\023', '\165', - '\025', '\305', '\023', '\005', '\305', '\363', '\005', '\305', - '\223', '\006', '\305', '\203', '\007', '\305', '\023', '\010', - '\305', '\203', '\224', '\361', '\121', '\074', '\252', '\120', - '\074', '\263', '\120', '\074', '\301', '\000', '\075', '\305', - '\203', '\015', '\305', '\303', '\015', '\305', '\123', '\016', - '\305', '\043', '\017', '\305', '\103', '\273', '\342', '\141', - '\022', '\025', '\140', '\022', '\034', '\140', '\075', '\046', - '\361', '\002', '\046', '\261', '\003', '\046', '\061', '\173', - '\006', '\241', '\004', '\046', '\221', '\005', '\046', '\321', - '\006', '\046', '\161', '\007', '\046', '\141', '\010', '\046', - '\021', '\011', '\046', '\021', '\012', '\046', '\261', '\012', - '\046', '\241', '\013', '\046', '\141', '\014', '\046', '\161', - '\015', '\046', '\001', '\016', '\046', '\341', '\016', '\046', - '\161', '\017', '\046', '\121', '\000', '\353', '\063', '\001', - '\353', '\143', '\002', '\353', '\203', '\003', '\353', '\363', - '\004', '\353', '\323', '\005', '\353', '\003', '\007', '\353', - '\243', '\141', '\006', '\061', '\011', '\353', '\363', '\011', - '\353', '\003', '\013', '\353', '\043', '\014', '\353', '\223', - '\015', '\353', '\023', '\016', '\353', '\343', '\016', '\353', - '\123', '\017', '\353', '\023', '\000', '\377', '\263', '\077', - '\006', '\101', '\001', '\377', '\323', '\001', '\377', '\263', - '\002', '\377', '\243', '\215', '\134', '\364', '\077', '\101', - '\360', '\077', '\115', '\360', '\077', '\124', '\360', '\077', - '\324', '\150', '\020', '\157', '\360', '\077', '\203', '\360', - '\077', '\223', '\140', '\100', '\377', '\223', '\013', '\377', - '\363', '\014', '\377', '\203', '\015', '\377', '\143', '\016', - '\377', '\343', '\016', '\377', '\263', '\017', '\014', '\024', - '\101', '\012', '\020', '\101', '\023', '\020', '\101', '\041', - '\020', '\101', '\052', '\020', '\101', '\137', '\146', '\020', - '\101', '\020', '\101', '\117', '\020', '\101', '\125', '\020', - '\101', '\140', '\020', '\101', '\146', '\020', '\101', '\161', - '\020', '\101', '\310', '\101', '\032', '\246', '\201', '\032', - '\133', '\137', '\007', '\245', '\161', '\032', '\137', '\320', - '\006', '\141', '\060', '\007', '\132', '\161', '\030', '\162', - '\360', '\006', '\263', '\215', '\366', '\152', '\077', '\366', - '\145', '\257', '\025', '\142', '\120', '\366', '\145', '\100', - '\006', '\137', '\300', '\366', '\167', '\360', '\005', '\144', - '\240', '\366', '\244', '\035', '\367', '\173', '\101', '\367', - '\166', '\217', '\367', '\172', '\357', '\366', '\146', '\037', - '\331', '\162', '\357', '\367', '\162', '\220', '\366', '\167', - '\137', '\007', '\137', '\312', '\367', '\163', '\137', '\367', - '\207', '\337', '\366', '\212', '\057', '\370', '\160', '\377', - '\006', '\141', '\340', '\332', '\142', '\100', '\371', '\164', - '\040', '\371', '\221', '\375', '\006', '\147', '\360', '\006', - '\163', '\220', '\006', '\164', '\120', '\333', '\227', '\337', - '\371', '\237', '\037', '\372', '\232', '\177', '\371', '\164', - '\100', '\007', '\157', '\320', '\006', '\137', '\300', '\006', - '\145', '\140', '\006', '\231', '\077', '\006', '\247', '\261', - '\030', '\250', '\201', '\372', '\252', '\317', '\372', '\256', - '\017', '\373', '\137', '\040', '\373', '\162', '\100', '\373', - '\247', '\377', '\006', '\251', '\277', '\372', '\137', '\040', - '\007', '\151', '\160', '\006', '\150', '\020', '\373', '\263', - '\057', '\031', '\233', '\037', '\374', '\254', '\117', '\374', - '\306', '\217', '\374', '\275', '\057', '\031', '\277', '\317', - '\374', '\137', '\360', '\371', '\144', '\120', '\331', '\266', - '\057', '\374', '\326', '\137', '\006', '\323', '\177', '\373', - '\137', '\100', '\007', '\145', '\200', '\375', '\300', '\357', - '\375', '\340', '\317', '\375', '\144', '\077', '\370', '\227', - '\217', '\007', '\325', '\017', '\007', '\151', '\040', '\007', - '\141', '\240', '\244', '\351', '\277', '\376', '\355', '\377', - '\376', '\232', '\077', '\006', '\214', '\001', '\376', '\162', - '\360', '\005', '\160', '\100', '\007', '\250', '\141', '\377', - '\156', '\200', '\377', '\372', '\317', '\377', '\365', '\337', - '\376', '\143', '\340', '\372', '\243', '\321', '\376', '\143', - '\340', '\372', '\365', '\317', '\006', '\157', '\060', '\006', - '\132', '\061', '\006', '\154', '\360', '\006', '\143', '\260', - '\006', '\365', '\377', '\006', '\146', '\140', '\006', '\341', - '\077', '\366', '\165', '\220', '\331', '\262', '\157', '\006', - '\146', '\020', '\376', '\143', '\137', '\007', '\147', '\120', - '\377', '\151', '\077', '\007', '\254', '\075', '\006', '\151', - '\077', '\007', '\163', '\120', '\377', '\151', '\077', '\007', - '\163', '\060', '\374', '\145', '\140', '\007', '\222', '\261', - '\027', '\243', '\221', '\366', '\163', '\060', '\007', '\303', - '\137', '\006', '\166', '\040', '\031', '\173', '\121', '\377', - '\151', '\077', '\007', '\163', '\200', '\006', '\141', '\320', - '\376', '\243', '\221', '\366', '\163', '\060', '\007', '\150', - '\020', '\006', '\355', '\257', '\371', '\144', '\220', '\006', - '\141', '\320', '\006', '\157', '\340', '\006', '\164', '\077', - '\006', '\151', '\077', '\007', '\254', '\115', '\006', '\151', - '\020', '\006', '\155', '\360', '\006', '\156', '\100', '\367', - '\143', '\220', '\366', '\163', '\060', '\007', '\232', '\237', - '\367', '\256', '\235', '\367', '\231', '\177', '\376', '\132', - '\221', '\367', '\164', '\220', '\376', '\000', '\220', '\367', - '\164', '\020', '\377', '\347', '\257', '\025', '\171', '\137', - '\007', '\142', '\340', '\372', '\216', '\217', '\370', '\000', - '\220', '\367', '\165', '\040', '\006', '\256', '\357', '\370', - '\210', '\257', '\371', '\144', '\340', '\376', '\272', '\317', - '\006', '\207', '\161', '\006', '\225', '\115', '\006', '\356', - '\257', '\373', '\154', '\160', '\030', '\147', '\140', '\376', - '\157', '\017', '\000', '\144', '\340', '\376', '\272', '\077', - '\007', '\144', '\317', '\006', '\112', '\112', '\006', '\356', - '\257', '\373', '\163', '\100', '\366', '\154', '\300', '\006', - '\232', '\117', '\006', '\356', '\017', '\007', '\215', '\237', - '\376', '\000', '\100', '\006', '\356', '\017', '\007', '\215', - '\037', '\377', '\347', '\257', '\025', '\145', '\200', '\007', - '\143', '\200', '\006', '\141', '\340', '\006', '\147', '\120', - '\331', '\145', '\200', '\007', '\143', '\200', '\006', '\141', - '\340', '\006', '\147', '\140', '\376', '\157', '\157', '\331', - '\256', '\017', '\366', '\226', '\355', '\372', '\140', '\257', - '\371', '\235', '\057', '\006', '\142', '\340', '\372', '\250', - '\321', '\371', '\142', '\040', '\006', '\256', '\237', '\377', - '\347', '\257', '\025', '\147', '\360', '\030', '\142', '\120', - '\333', '\147', '\360', '\030', '\142', '\220', '\007', '\232', - '\217', '\006', '\141', '\340', '\006', '\144', '\300', '\134', - '\150', '\020', '\006', '\156', '\100', '\006', '\061', '\240', - '\371', '\150', '\020', '\006', '\156', '\100', '\006', '\062', - '\240', '\331', '\141', '\340', '\006', '\144', '\040', '\003', - '\232', '\237', '\027', '\207', '\341', '\332', '\171', '\161', - '\030', '\231', '\177', '\376', '\132', '\221', '\006', '\262', - '\117', '\332', '\151', '\040', '\373', '\156', '\240', '\371', - '\355', '\377', '\006', '\156', '\260', '\373', '\151', '\077', - '\007', '\254', '\335', '\376', '\157', '\340', '\006', '\273', - '\237', '\366', '\163', '\060', '\007', '\232', '\237', '\373', - '\231', '\277', '\377', '\250', '\221', '\373', '\231', '\277', - '\377', '\371', '\177', '\376', '\241', '\375', '\372', '\231', - '\277', '\375', '\111', '\372', '\372', '\231', '\277', '\375', - '\232', '\237', '\373', '\231', '\137', '\376', '\111', '\372', - '\372', '\231', '\137', '\376', '\232', '\237', '\373', '\164', - '\040', '\006', '\165', '\020', '\374', '\244', '\235', '\373', - '\164', '\040', '\006', '\165', '\020', '\374', '\156', '\240', - '\371', '\154', '\300', '\006', '\165', '\357', '\006', '\177', - '\121', '\331', '\154', '\300', '\006', '\165', '\357', '\006', - '\177', '\141', '\376', '\157', '\237', '\244', '\371', '\037', - '\006', '\156', '\360', '\027', '\225', '\315', '\006', '\371', - '\037', '\006', '\156', '\360', '\027', '\346', '\377', '\366', - '\000', '\100', '\366', '\244', '\115', '\366', '\156', '\240', - '\371', '\155', '\220', '\006', '\144', '\100', '\006', '\256', - '\057', '\006', '\165', '\020', '\374', '\244', '\335', '\006', - '\151', '\100', '\006', '\144', '\340', '\372', '\142', '\120', - '\007', '\301', '\357', '\006', '\232', '\337', '\006', '\157', - '\120', '\007', '\173', '\001', '\000', '\155', '\360', '\006', - '\165', '\260', '\027', '\232', '\017', '\007', '\214', '\061', - '\006', '\151', '\240', '\244', '\160', '\300', '\030', '\143', - '\220', '\006', '\154', '\240', '\371', '\354', '\357', '\376', - '\340', '\177', '\332', '\363', '\017', '\376', '\232', '\017', - '\007', '\154', '\120', '\007', '\254', '\015', '\007', '\154', - '\120', '\007', '\163', '\240', '\371', '\161', '\120', '\007', - '\172', '\101', '\007', '\151', '\360', '\006', '\156', '\340', - '\370', '\210', '\017', '\000', '\161', '\120', '\007', '\172', - '\101', '\007', '\151', '\360', '\006', '\156', '\340', '\370', - '\210', '\257', '\371', '\316', '\177', '\374', '\372', '\317', - '\377', '\252', '\135', '\374', '\307', '\257', '\377', '\374', - '\257', '\371', '\316', '\177', '\374', '\325', '\237', '\006', - '\327', '\257', '\332', '\305', '\177', '\374', '\325', '\237', - '\006', '\327', '\257', '\371', '\316', '\177', '\374', '\337', - '\037', '\376', '\252', '\135', '\374', '\307', '\377', '\375', - '\341', '\257', '\371', '\316', '\177', '\374', '\142', '\120', - '\007', '\301', '\117', '\332', '\316', '\177', '\374', '\142', - '\120', '\007', '\301', '\357', '\006', '\232', '\057', '\007', - '\164', '\300', '\006', '\255', '\317', '\371', '\246', '\055', - '\007', '\164', '\300', '\006', '\255', '\317', '\371', '\157', - '\240', '\371', '\163', '\020', '\006', '\151', '\300', '\006', - '\227', '\137', '\371', '\000', '\060', '\007', '\141', '\220', - '\006', '\154', '\160', '\371', '\225', '\257', '\371', '\163', - '\040', '\006', '\200', '\177', '\007', '\156', '\340', '\370', - '\210', '\017', '\000', '\163', '\040', '\006', '\200', '\177', - '\007', '\156', '\340', '\370', '\210', '\257', '\371', '\163', - '\040', '\006', '\137', '\200', '\006', '\200', '\137', '\007', - '\142', '\340', '\372', '\216', '\217', '\370', '\000', '\060', - '\007', '\142', '\360', '\005', '\150', '\000', '\370', '\165', - '\040', '\006', '\256', '\357', '\370', '\210', '\257', '\371', - '\163', '\040', '\006', '\255', '\377', '\372', '\231', '\157', - '\367', '\000', '\060', '\007', '\142', '\320', '\372', '\257', - '\237', '\371', '\177', '\177', '\376', '\132', '\061', '\007', - '\142', '\060', '\374', '\305', '\177', '\374', '\216', '\217', - '\370', '\000', '\060', '\007', '\142', '\060', '\374', '\305', - '\177', '\374', '\216', '\217', '\370', '\232', '\077', '\007', - '\142', '\360', '\005', '\221', '\157', '\367', '\000', '\060', - '\007', '\142', '\360', '\005', '\221', '\377', '\367', '\347', - '\257', '\025', '\163', '\040', '\006', '\137', '\140', '\007', - '\200', '\137', '\007', '\142', '\340', '\372', '\216', '\217', - '\370', '\000', '\060', '\007', '\142', '\360', '\005', '\166', - '\000', '\370', '\165', '\040', '\006', '\256', '\357', '\370', - '\210', '\257', '\371', '\163', '\200', '\006', '\165', '\220', - '\372', '\256', '\017', '\000', '\163', '\200', '\006', '\165', - '\220', '\372', '\256', '\257', '\371', '\237', '\257', '\007', - '\151', '\340', '\006', '\231', '\375', '\371', '\172', '\220', - '\006', '\156', '\160', '\006', '\232', '\077', '\007', '\354', - '\177', '\375', '\253', '\315', '\376', '\327', '\237', '\377', - '\347', '\257', '\025', '\163', '\000', '\007', '\356', '\237', - '\007', '\143', '\020', '\006', '\244', '\075', '\007', '\160', - '\340', '\376', '\171', '\060', '\006', '\141', '\340', '\006', - '\232', '\077', '\007', '\164', '\160', '\030', '\000', '\060', - '\007', '\164', '\160', '\030', '\232', '\117', '\007', '\207', - '\161', '\006', '\145', '\340', '\332', '\164', '\160', '\030', - '\147', '\120', '\006', '\231', '\177', '\376', '\132', '\101', - '\007', '\143', '\220', '\366', '\163', '\300', '\332', '\164', - '\060', '\006', '\151', '\077', '\007', '\163', '\240', '\371', - '\252', '\017', '\007', '\255', '\377', '\372', '\231', '\157', - '\367', '\255', '\375', '\006', '\160', '\320', '\372', '\257', - '\237', '\371', '\177', '\177', '\376', '\132', '\241', '\372', - '\160', '\320', '\372', '\257', '\017', '\375', '\264', '\337', - '\332', '\157', '\000', '\007', '\255', '\377', '\372', '\320', - '\357', '\373', '\347', '\257', '\025', '\252', '\017', '\007', - '\303', '\137', '\374', '\307', '\277', '\373', '\311', '\217', - '\032', '\252', '\017', '\007', '\303', '\137', '\374', '\307', - '\277', '\373', '\311', '\237', '\377', '\347', '\257', '\025', - '\252', '\017', '\007', '\325', '\237', '\006', '\327', '\337', - '\332', '\157', '\000', '\007', '\325', '\237', '\006', '\327', - '\257', '\371', '\252', '\017', '\007', '\337', '\037', '\376', - '\255', '\375', '\006', '\160', '\360', '\375', '\341', '\257', - '\371', '\374', '\137', '\006', '\132', '\301', '\377', '\145', - '\260', '\006', '\232', '\137', '\007', '\154', '\120', '\367', - '\156', '\360', '\027', '\225', '\135', '\007', '\154', '\120', - '\367', '\156', '\360', '\027', '\346', '\377', '\366', '\257', - '\015', '\031', '\210', '\301', '\006', '\154', '\000', '\331', - '\217', '\041', '\006', '\210', '\301', '\006', '\154', '\020', - '\006', '\232', '\017', '\366', '\165', '\357', '\006', '\177', - '\121', '\331', '\140', '\137', '\367', '\156', '\360', '\027', - '\346', '\377', '\366', '\000', '\160', '\007', '\225', '\077', - '\006', '\233', '\175', '\007', '\225', '\077', '\006', '\150', - '\240', '\371', '\170', '\200', '\377', '\143', '\201', '\007', - '\370', '\317', '\372', '\347', '\257', '\025', '\357', '\141', - '\020', '\303', '\064', '\236', '\335', '\141', '\026', '\340', - '\041', '\036', '\115', '\131', '\036', '\045', '\115', '\322', - '\011', '\001', - -}; - -static const char file_5x7[] = { - '\037', '\235', '\214', '\001', '\314', '\214', '\201', '\203', - '\000', '\200', '\301', '\000', '\006', '\023', '\032', '\244', - '\043', '\300', '\040', '\242', '\204', '\015', '\025', '\032', - '\044', '\223', '\220', '\137', '\104', '\002', '\012', '\021', - '\002', '\100', '\203', '\021', '\000', '\230', '\001', '\006', - '\013', '\112', '\004', '\200', '\053', '\201', '\101', '\144', - '\007', '\014', '\202', '\030', '\011', '\000', '\102', '\104', - '\100', '\021', '\014', '\002', '\141', '\211', '\010', '\044', - '\000', '\110', '\023', '\014', '\002', '\142', '\111', '\316', - '\200', '\101', '\014', '\027', '\022', '\152', '\124', '\110', - '\321', '\040', '\277', '\016', '\043', '\203', '\216', '\014', - '\040', '\041', '\141', '\316', '\203', '\033', '\022', '\256', - '\074', '\310', '\042', '\241', '\014', '\241', '\076', '\022', - '\026', '\021', '\272', '\044', '\141', '\023', '\241', '\133', - '\022', '\212', '\021', '\032', '\047', '\241', '\034', '\205', - '\051', '\015', '\366', '\121', '\150', '\044', '\341', '\303', - '\204', '\135', '\015', '\126', '\122', '\030', '\027', '\200', - '\050', '\241', '\252', '\022', '\262', '\122', '\170', '\325', - '\240', '\056', '\241', '\313', '\022', '\116', '\023', '\112', - '\056', '\241', '\071', '\226', '\000', '\362', '\145', '\114', - '\130', '\100', '\143', '\200', '\007', '\032', '\147', '\070', - '\306', '\241', '\361', '\315', '\120', '\005', '\011', '\355', - '\014', '\075', '\223', '\060', '\320', '\120', '\237', '\006', - '\025', '\015', '\055', '\240', '\260', '\222', '\106', '\043', - '\117', '\234', '\120', '\161', '\022', '\244', '\111', '\221', - '\057', '\122', '\212', '\034', '\111', '\062', '\205', '\212', - '\224', '\054', '\006', '\121', '\127', '\161', '\102', '\344', - '\066', '\200', '\046', '\151', '\346', '\214', '\001', '\140', - '\244', '\165', '\022', '\046', '\131', '\276', '\260', '\166', - '\115', '\074', '\015', '\236', '\062', '\024', '\257', '\024', - '\111', '\162', '\004', '\011', '\025', '\345', '\255', '\267', - '\066', '\201', '\236', '\246', '\116', '\033', '\000', '\123', - '\230', '\004', '\121', '\015', '\100', '\012', '\370', '\042', - '\124', '\256', '\044', '\041', '\102', '\005', '\011', '\166', - '\346', '\116', '\336', '\310', '\151', '\023', '\206', '\015', - '\200', '\040', '\104', '\210', '\174', '\251', '\235', '\205', - '\311', '\353', '\345', '\133', '\001', '\000', '\105', '\022', - '\130', '\024', '\301', '\304', '\176', '\111', '\150', '\261', - '\025', '\024', '\117', '\044', '\241', '\032', '\202', '\012', - '\226', '\127', '\304', '\024', '\117', '\060', '\121', '\005', - '\025', '\111', '\244', '\366', '\005', '\026', '\022', '\122', - '\150', '\041', '\206', '\032', '\342', '\066', '\005', '\024', - '\101', '\014', '\341', '\340', '\021', '\000', '\014', '\161', - '\237', '\025', '\105', '\110', '\021', '\304', '\021', '\257', - '\251', '\307', '\036', '\022', '\051', '\042', '\021', '\204', - '\024', '\123', '\240', '\007', '\233', '\154', '\264', '\331', - '\206', '\033', '\155', '\117', '\340', '\200', '\103', '\015', - '\071', '\324', '\170', '\143', '\216', '\327', '\025', '\341', - '\304', '\020', '\117', '\020', '\161', '\042', '\000', '\061', - '\000', '\260', '\033', '\021', '\055', '\062', '\341', '\340', - '\153', '\014', '\116', '\221', '\004', '\210', '\116', '\000', - '\100', '\145', '\155', '\016', '\006', '\301', '\145', '\212', - '\117', '\100', '\221', '\205', '\024', '\324', '\131', '\227', - '\342', '\033', '\160', '\344', '\041', '\107', '\032', '\147', - '\240', '\101', '\007', '\010', '\061', '\344', '\220', '\103', - '\014', '\054', '\320', '\151', '\047', '\016', '\040', '\120', - '\201', '\106', '\031', '\040', '\074', '\001', '\107', '\031', - '\156', '\200', '\160', '\204', '\034', '\157', '\324', '\001', - '\007', '\161', '\251', '\121', '\001', '\100', '\013', '\300', - '\011', '\327', '\202', '\021', '\316', '\101', '\007', '\051', - '\167', '\336', '\265', '\040', '\105', '\013', '\361', '\315', - '\127', '\137', '\013', '\055', '\334', '\020', '\052', '\014', - '\241', '\326', '\120', '\152', '\013', '\103', '\264', '\120', - '\003', '\251', '\100', '\012', '\111', '\144', '\013', '\121', - '\112', '\227', '\246', '\243', '\261', '\171', '\170', '\141', - '\206', '\135', '\142', '\361', '\005', '\022', '\323', '\125', - '\347', '\150', '\024', '\125', '\340', '\367', '\205', '\214', - '\355', '\041', '\046', '\224', '\102', '\240', '\001', '\060', - '\324', '\120', '\006', '\221', '\106', '\232', '\117', '\314', - '\002', '\340', '\323', '\263', '\312', '\032', '\153', '\355', - '\265', '\330', '\146', '\133', '\055', '\000', '\340', '\000', - '\000', '\110', '\041', '\205', '\030', '\022', '\310', '\267', - '\341', '\216', '\013', '\256', '\270', '\344', '\242', '\173', - '\256', '\271', '\345', '\246', '\313', '\256', '\272', '\355', - '\256', '\353', '\356', '\274', '\362', '\326', '\033', '\357', - '\275', '\350', '\032', '\202', '\357', '\273', '\374', '\322', - '\333', '\256', '\276', '\360', '\006', '\334', '\257', '\275', - '\002', '\373', '\133', '\060', '\301', '\003', '\357', '\153', - '\160', '\302', '\007', '\053', '\214', '\360', '\302', '\020', - '\077', '\054', '\261', '\303', '\024', '\067', '\154', '\061', - '\303', '\030', '\107', '\134', '\161', '\306', '\023', '\137', - '\254', '\261', '\307', '\035', '\163', '\274', '\361', '\307', - '\042', '\203', '\074', '\162', '\310', '\044', '\247', '\374', - '\060', '\300', '\045', '\267', '\234', '\062', '\313', '\052', - '\237', '\054', '\263', '\311', '\064', '\273', '\214', '\362', - '\315', '\063', '\333', '\234', '\163', '\314', '\065', '\363', - '\254', '\163', '\317', '\070', '\003', '\275', '\163', '\320', - '\077', '\027', '\355', '\363', '\321', '\104', '\043', '\075', - '\164', '\271', '\043', '\165', '\073', '\122', '\132', '\000', - '\070', '\220', '\120', '\005', '\011', '\161', '\220', '\320', - '\010', '\011', '\251', '\220', '\120', '\224', '\006', '\341', - '\220', '\320', '\017', '\011', '\265', '\145', '\320', '\127', - '\006', '\071', '\152', '\120', '\130', '\006', '\215', '\145', - '\120', '\032', '\011', '\055', '\152', '\320', '\035', '\011', - '\371', '\221', '\120', '\041', '\011', '\061', '\222', '\320', - '\044', '\011', '\151', '\222', '\120', '\050', '\011', '\241', - '\222', '\320', '\053', '\011', '\331', '\222', '\120', '\057', - '\011', '\021', '\223', '\120', '\140', '\006', '\111', '\223', - '\120', '\066', '\011', '\071', '\015', '\300', '\071', '\011', - '\271', '\223', '\120', '\075', '\025', '\045', '\064', '\200', - '\106', '\012', '\150', '\024', '\201', '\106', '\030', '\150', - '\364', '\201', '\106', '\046', '\150', '\324', '\202', '\106', - '\064', '\150', '\264', '\203', '\106', '\102', '\150', '\224', - '\204', '\106', '\120', '\150', '\164', '\205', '\106', '\136', - '\150', '\124', '\206', '\106', '\154', '\150', '\064', '\207', - '\106', '\172', '\150', '\344', '\231', '\103', '\032', '\075', - '\242', '\221', '\045', '\032', '\165', '\242', '\021', '\051', - '\032', '\255', '\242', '\221', '\054', '\032', '\345', '\242', - '\021', '\060', '\032', '\035', '\243', '\221', '\063', '\032', - '\125', '\243', '\021', '\067', '\032', '\215', '\243', '\221', - '\072', '\032', '\305', '\243', '\021', '\076', '\032', '\375', - '\243', '\221', '\001', '\021', '\065', '\020', '\021', '\005', - '\021', '\155', '\020', '\221', '\010', '\021', '\245', '\020', - '\021', '\014', '\021', '\335', '\020', '\221', '\017', '\021', - '\025', '\021', '\021', '\023', '\021', '\115', '\021', '\221', - '\026', '\021', '\205', '\021', '\021', '\032', '\021', '\275', - '\021', '\221', '\035', '\021', '\351', '\103', '\104', '\010', - '\021', '\221', '\105', '\104', '\104', '\022', '\021', '\311', - '\104', '\104', '\100', '\021', '\221', '\123', '\104', '\304', - '\025', '\021', '\251', '\105', '\104', '\170', '\021', '\221', - '\141', '\104', '\104', '\031', '\021', '\211', '\106', '\104', - '\260', '\021', '\221', '\157', '\104', '\304', '\034', '\021', - '\151', '\107', '\104', '\350', '\021', '\221', '\175', '\104', - '\104', '\000', '\066', '\111', '\200', '\115', '\040', '\140', - '\223', '\013', '\330', '\304', '\003', '\066', '\051', '\201', - '\115', '\130', '\140', '\223', '\031', '\330', '\104', '\007', - '\066', '\011', '\202', '\115', '\220', '\140', '\223', '\047', - '\330', '\304', '\012', '\066', '\351', '\202', '\115', '\310', - '\140', '\223', '\065', '\330', '\104', '\016', '\066', '\311', - '\203', '\115', '\000', '\141', '\223', '\103', '\330', '\304', - '\021', '\066', '\251', '\204', '\115', '\070', '\141', '\223', - '\121', '\330', '\104', '\025', '\066', '\211', '\205', '\115', - '\160', '\141', '\223', '\137', '\330', '\304', '\030', '\066', - '\151', '\206', '\115', '\250', '\141', '\223', '\155', '\330', - '\104', '\034', '\066', '\111', '\207', '\115', '\340', '\141', - '\223', '\173', '\330', '\304', '\037', '\066', '\051', '\100', - '\107', '\030', '\320', '\221', '\011', '\164', '\104', '\003', - '\035', '\011', '\101', '\107', '\120', '\320', '\221', '\027', - '\164', '\304', '\006', '\035', '\351', '\101', '\107', '\210', - '\320', '\221', '\045', '\164', '\104', '\012', '\035', '\311', - '\102', '\107', '\300', '\320', '\221', '\063', '\164', '\304', - '\015', '\035', '\251', '\103', '\107', '\370', '\320', '\221', - '\101', '\164', '\104', '\021', '\035', '\211', '\104', '\107', - '\060', '\321', '\221', '\117', '\164', '\304', '\024', '\035', - '\151', '\105', '\107', '\150', '\321', '\221', '\135', '\164', - '\104', '\030', '\035', '\111', '\106', '\107', '\240', '\321', - '\221', '\153', '\164', '\304', '\033', '\035', '\051', '\107', - '\107', '\330', '\321', '\221', '\171', '\164', '\104', '\037', - '\035', '\011', '\000', '\151', '\000', '\200', '\200', '\135', - '\076', '\140', '\227', '\026', '\330', '\145', '\007', '\166', - '\111', '\202', '\135', '\256', '\140', '\227', '\062', '\330', - '\145', '\016', '\166', '\011', '\204', '\135', '\036', '\141', - '\227', '\116', '\330', '\145', '\025', '\166', '\311', '\205', - '\135', '\216', '\141', '\227', '\152', '\330', '\145', '\034', - '\166', '\211', '\207', '\135', '\376', '\141', '\227', '\206', - '\330', '\145', '\043', '\166', '\111', '\211', '\135', '\156', - '\142', '\227', '\242', '\330', '\145', '\052', '\166', '\011', - '\213', '\135', '\336', '\142', '\227', '\276', '\330', '\145', - '\061', '\166', '\311', '\214', '\135', '\116', '\143', '\227', - '\332', '\330', '\145', '\070', '\166', '\211', '\216', '\135', - '\276', '\143', '\227', '\366', '\330', '\145', '\077', '\166', - '\111', '\000', '\320', '\054', '\000', '\064', '\022', '\000', - '\115', '\006', '\100', '\003', '\002', '\320', '\000', '\201', - '\001', '\072', '\301', '\300', '\326', '\014', '\362', '\200', - '\212', '\132', '\324', '\040', '\004', '\160', '\300', '\007', - '\034', '\200', '\021', '\005', '\024', '\300', '\243', '\036', - '\005', '\100', '\001', '\016', '\120', '\200', '\002', '\160', - '\224', '\000', '\227', '\033', '\100', '\003', '\010', '\100', - '\307', '\224', '\032', '\100', '\001', '\057', '\015', '\100', - '\000', '\006', '\100', '\107', '\072', '\022', '\100', '\001', - '\035', '\301', '\050', '\107', '\243', '\146', '\220', '\004', - '\054', '\240', '\001', '\011', '\040', '\000', '\113', '\113', - '\132', '\000', '\001', '\234', '\124', '\250', '\004', '\200', - '\132', '\102', '\016', '\200', '\324', '\252', '\041', '\025', - '\251', '\126', '\303', '\250', '\120', '\077', '\320', '\324', - '\017', '\260', '\304', '\252', '\043', '\301', '\252', '\104', - '\264', '\252', '\020', '\253', '\102', '\365', '\251', '\102', - '\145', '\052', '\130', '\271', '\152', '\020', '\252', '\202', - '\365', '\251', '\010', '\040', '\200', '\000', '\010', '\200', - '\000', '\251', '\255', '\065', '\255', '\106', '\115', '\210', - '\003', '\024', '\100', '\327', '\220', '\160', '\324', '\001', - '\021', '\141', '\200', '\000', '\016', '\040', '\200', '\006', - '\050', '\044', '\247', '\054', '\171', '\052', '\000', '\072', - '\132', '\127', '\205', '\050', '\340', '\003', '\207', '\305', - '\114', '\324', '\114', '\112', '\001', '\251', '\005', '\040', - '\250', '\002', '\110', '\200', '\110', '\004', '\120', '\324', - '\217', '\112', '\113', '\000', '\314', '\122', '\253', '\000', - '\066', '\213', '\221', '\265', '\042', '\065', '\042', '\105', - '\345', '\053', '\101', '\011', '\140', '\126', '\211', '\200', - '\157', '\050', '\017', '\140', '\211', '\001', '\100', '\003', - '\127', '\215', '\120', '\226', '\250', '\015', '\101', '\341', - '\146', '\367', '\052', '\055', '\311', '\252', '\065', '\265', - '\017', '\100', '\200', '\001', '\020', '\220', '\000', '\237', - '\024', '\264', '\000', '\017', '\020', '\052', '\000', '\040', - '\163', '\000', '\336', '\372', '\304', '\000', '\001', '\070', - '\100', '\002', '\172', '\073', '\334', '\264', '\152', '\266', - '\266', '\006', '\130', '\356', '\161', '\227', '\353', '\000', - '\335', '\032', '\144', '\265', '\322', '\002', '\015', '\166', - '\117', '\073', '\130', '\314', '\256', '\065', '\041', '\270', - '\025', '\312', '\132', '\061', '\013', '\000', '\312', '\252', - '\265', '\274', '\265', '\155', '\100', '\003', '\002', '\060', - '\335', '\004', '\074', '\140', '\271', '\000', '\120', '\256', - '\162', '\023', '\220', '\222', '\350', '\312', '\224', '\271', - '\363', '\135', '\156', '\112', '\210', '\053', '\123', '\334', - '\046', '\127', '\246', '\010', '\261', '\057', '\120', '\245', - '\266', '\334', '\367', '\302', '\227', '\257', '\263', '\115', - '\011', '\002', '\026', '\154', '\134', '\000', '\044', '\240', - '\000', '\003', '\030', '\100', '\001', '\114', '\002', '\340', - '\376', '\072', '\270', '\242', '\313', '\065', '\211', '\117', - '\177', '\012', '\324', '\332', '\146', '\330', '\047', '\363', - '\075', '\200', '\114', '\075', '\354', '\323', '\335', '\206', - '\170', '\302', '\265', '\135', '\053', '\176', '\147', '\273', - '\131', '\007', '\147', '\230', '\271', '\057', '\306', '\156', - '\206', '\061', '\354', '\342', '\325', '\302', '\027', '\266', - '\055', '\316', '\255', '\132', '\037', '\023', '\337', '\012', - '\247', '\045', '\000', '\157', '\065', '\210', '\130', '\303', - '\132', '\336', '\135', '\042', '\046', '\265', '\003', '\370', - '\256', '\104', '\034', '\220', '\200', '\006', '\140', '\106', - '\246', '\041', '\116', '\010', '\162', '\331', '\313', '\313', - '\266', '\122', '\127', '\312', '\015', '\030', '\200', '\157', - '\025', '\260', '\327', '\026', '\033', '\204', '\311', '\310', - '\165', '\000', '\224', '\063', '\214', '\336', '\044', '\323', - '\026', '\043', '\110', '\055', '\252', '\114', '\041', '\214', - '\142', '\063', '\157', '\026', '\152', '\300', '\205', '\257', - '\220', '\311', '\174', '\135', '\351', '\056', '\125', '\277', - '\032', '\141', '\162', '\002', '\252', '\073', '\347', '\021', - '\177', '\231', '\246', '\051', '\171', '\363', '\146', '\041', - '\332', '\323', '\053', '\067', '\253', '\244', '\021', '\161', - '\161', '\105', '\023', '\322', '\333', '\350', '\062', '\072', - '\001', '\070', '\215', '\110', '\160', '\005', '\220', '\132', - '\265', '\232', '\271', '\263', '\054', '\156', '\010', '\220', - '\301', '\107', '\336', '\220', '\152', '\353', '\257', '\203', - '\155', '\352', '\140', '\035', '\120', '\322', '\235', '\352', - '\225', '\257', '\176', '\005', '\100', '\004', '\346', '\352', - '\200', '\230', '\040', '\032', '\301', '\122', '\015', '\065', - '\000', '\364', '\372', '\122', '\006', '\350', '\126', '\261', - '\012', '\151', '\165', '\005', '\046', '\120', '\201', '\125', - '\033', '\240', '\000', '\311', '\112', '\210', '\004', '\022', - '\320', '\024', '\360', '\212', '\104', '\041', '\251', '\375', - '\162', '\004', '\056', '\060', '\201', '\011', '\254', '\072', - '\331', '\177', '\305', '\351', '\137', '\111', '\073', '\125', - '\151', '\251', '\065', '\131', '\253', '\055', '\150', '\102', - '\316', '\073', '\222', '\014', '\213', '\330', '\001', '\013', - '\130', '\000', '\135', '\025', '\213', '\135', '\304', '\250', - '\265', '\240', '\031', '\205', '\110', '\121', '\273', '\075', - '\354', '\203', '\334', '\227', '\001', '\325', '\005', '\160', - '\003', '\322', '\312', '\200', '\010', '\013', '\140', '\001', - '\360', '\106', '\100', '\154', '\165', '\331', '\220', '\350', - '\272', '\027', '\276', '\376', '\066', '\260', '\207', '\005', - '\036', '\160', '\200', '\027', '\330', '\340', '\377', '\066', - '\011', '\251', '\033', '\100', '\122', '\277', '\332', '\367', - '\261', '\340', '\343', '\057', '\217', '\045', '\356', '\137', - '\021', '\117', '\374', '\277', '\074', '\106', '\360', '\233', - '\343', '\313', '\342', '\224', '\150', '\234', '\266', '\037', - '\367', '\270', '\002', '\304', '\255', '\200', '\224', '\000', - '\225', '\303', '\046', '\361', '\267', '\235', '\125', '\316', - '\134', '\226', '\267', '\167', '\345', '\061', '\146', '\264', - '\215', '\243', '\246', '\336', '\160', '\247', '\344', '\305', - '\060', '\216', '\071', '\316', '\175', '\262', '\163', '\221', - '\042', '\272', '\305', '\311', '\245', '\357', '\210', '\243', - '\253', '\334', '\005', '\064', '\146', '\255', '\114', '\166', - '\162', '\167', '\223', '\216', '\231', '\233', '\062', '\035', - '\000', '\036', '\175', '\072', '\146', '\236', '\276', '\332', - '\247', '\177', '\271', '\001', '\046', '\225', '\262', '\114', - '\071', '\135', '\320', '\054', '\373', '\126', '\000', '\006', - '\360', '\172', '\221', '\303', '\256', '\145', '\221', '\112', - '\113', '\354', '\100', '\066', '\163', '\240', '\147', '\272', - '\161', '\312', '\252', '\335', '\354', '\157', '\027', '\000', - '\003', '\374', '\355', '\023', '\217', '\346', '\267', '\274', - '\005', '\265', '\363', '\265', '\127', '\356', '\341', '\272', - '\003', '\333', '\316', '\317', '\262', '\263', '\264', '\206', - '\073', '\370', '\253', '\057', '\040', '\320', '\004', '\310', - '\260', '\324', '\324', '\252', '\370', '\301', '\067', '\036', - '\063', '\215', '\147', '\074', '\244', '\317', '\033', '\164', - '\241', '\103', '\176', '\362', '\211', '\116', '\310', '\077', - '\214', '\205', '\220', '\206', '\200', '\004', '\043', '\324', - '\122', '\260', '\203', '\241', '\016', '\200', '\005', '\314', - '\032', '\000', '\176', '\225', '\132', '\152', '\041', '\240', - '\152', '\000', '\064', '\045', '\047', '\024', '\000', '\000', - '\325', '\054', '\000', '\200', '\240', '\110', '\064', '\003', - '\000', '\320', '\000', '\000', '\242', '\142', '\065', '\244', - '\170', '\000', '\000', '\126', '\135', '\111', '\010', '\000', - '\040', '\002', '\000', '\140', '\215', '\004', '\000', '\050', - '\001', '\000', '\114', '\000', '\200', '\023', '\000', '\000', - '\005', '\000', '\110', '\001', '\000', '\264', '\266', '\002', - '\000', '\124', '\245', '\005', '\000', '\160', '\001', '\000', - '\136', '\000', '\000', '\030', '\100', '\011', '\000', '\127', - '\231', '\001', '\000', '\150', '\000', '\200', '\032', '\000', - '\300', '\006', '\000', '\270', '\001', '\000', '\274', '\126', - '\044', '\035', '\000', '\140', '\007', '\000', '\340', '\001', - '\000', '\172', '\000', '\200', '\254', '\200', '\155', '\046', - '\101', '\000', '\200', '\020', '\122', '\344', '\045', '\000', - '\154', '\245', '\055', '\050', '\102', '\043', '\111', '\000', - '\000', '\112', '\000', '\000', '\135', '\301', '\004', '\277', - '\001', '\000', '\135', '\362', '\004', '\002', '\002', '\000', - '\121', '\120', '\036', '\340', '\001', '\000', '\216', '\122', - '\005', '\000', '\140', '\005', '\000', '\160', '\005', '\000', - '\300', '\041', '\270', '\241', '\005', '\000', '\020', '\026', - '\134', '\000', '\000', '\135', '\000', '\000', '\136', '\000', - '\000', '\137', '\340', '\021', '\000', '\020', '\006', '\000', - '\060', '\026', '\303', '\101', '\021', '\145', '\000', '\000', - '\146', '\000', '\000', '\234', '\201', '\006', '\000', '\300', - '\066', '\152', '\000', '\000', '\153', '\000', '\000', '\366', - '\361', '\035', '\156', '\000', '\000', '\157', '\000', '\000', - '\213', '\122', '\026', '\147', '\061', '\007', '\000', '\100', - '\007', '\000', '\120', '\007', '\000', '\140', '\007', '\000', - '\000', '\067', '\170', '\000', '\000', '\171', '\000', '\000', - '\172', '\000', '\000', '\173', '\000', '\000', '\174', '\000', - '\000', '\153', '\041', '\067', '\177', '\000', '\000', '\377', - '\220', '\205', '\132', '\270', '\205', '\134', '\330', '\205', - '\136', '\370', '\205', '\140', '\030', '\206', '\140', '\270', - '\023', '\201', '\000', '\000', '\202', '\000', '\000', '\203', - '\000', '\000', '\204', '\000', '\000', '\164', '\143', '\010', - '\000', '\160', '\010', '\000', '\360', '\020', '\211', '\000', - '\000', '\212', '\000', '\000', '\213', '\000', '\000', '\166', - '\323', '\010', '\000', '\340', '\010', '\000', '\360', '\010', - '\067', '\001', '\000', '\221', '\000', '\000', '\222', '\000', - '\000', '\170', '\103', '\011', '\000', '\060', '\027', '\226', - '\000', '\000', '\227', '\000', '\000', '\230', '\000', '\000', - '\231', '\000', '\000', '\172', '\263', '\011', '\000', '\300', - '\011', '\000', '\320', '\011', '\000', '\340', '\011', '\000', - '\360', '\011', '\000', '\000', '\012', '\000', '\300', '\067', - '\167', '\061', '\012', '\000', '\100', '\012', '\000', '\120', - '\012', '\000', '\140', '\012', '\000', '\160', '\012', '\000', - '\340', '\067', '\251', '\000', '\000', '\171', '\261', '\012', - '\000', '\260', '\027', '\255', '\000', '\000', '\256', '\000', - '\000', '\200', '\003', '\013', '\000', '\020', '\013', '\000', - '\040', '\013', '\000', '\060', '\013', '\000', '\100', '\013', - '\000', '\120', '\013', '\000', '\040', '\070', '\267', '\100', - '\022', '\000', '\220', '\013', '\000', '\360', '\027', '\273', - '\000', '\000', '\274', '\000', '\000', '\204', '\343', '\013', - '\000', '\360', '\013', '\000', '\000', '\014', '\000', '\020', - '\014', '\000', '\040', '\014', '\000', '\060', '\014', '\000', - '\140', '\070', '\305', '\000', '\000', '\306', '\000', '\000', - '\307', '\000', '\000', '\310', '\000', '\000', '\311', '\000', - '\000', '\312', '\000', '\000', '\201', '\301', '\014', '\000', - '\320', '\014', '\000', '\340', '\014', '\000', '\360', '\014', - '\000', '\000', '\015', '\000', '\020', '\015', '\000', '\240', - '\070', '\203', '\101', '\015', '\000', '\120', '\015', '\000', - '\140', '\015', '\000', '\160', '\015', '\000', '\200', '\015', - '\000', '\300', '\070', '\332', '\000', '\000', '\333', '\000', - '\000', '\334', '\000', '\000', '\335', '\000', '\000', '\336', - '\000', '\000', '\337', '\300', '\022', '\216', '\003', '\101', - '\006', '\341', '\220', '\262', '\370', '\100', '\022', '\371', - '\220', '\023', '\031', '\221', '\024', '\171', '\221', '\026', - '\231', '\221', '\020', '\271', '\221', '\025', '\311', '\221', - '\030', '\351', '\221', '\032', '\331', '\221', '\042', '\371', - '\221', '\043', '\031', '\222', '\044', '\171', '\222', '\046', - '\231', '\222', '\040', '\271', '\222', '\045', '\311', '\222', - '\050', '\351', '\222', '\052', '\331', '\222', '\062', '\371', - '\222', '\063', '\031', '\223', '\064', '\171', '\223', '\066', - '\231', '\223', '\060', '\271', '\223', '\065', '\311', '\223', - '\070', '\351', '\223', '\072', '\331', '\223', '\102', '\371', - '\223', '\103', '\031', '\224', '\104', '\171', '\224', '\106', - '\231', '\224', '\100', '\271', '\224', '\105', '\311', '\224', - '\110', '\351', '\224', '\112', '\331', '\224', '\122', '\371', - '\224', '\123', '\031', '\225', '\124', '\171', '\225', '\126', - '\231', '\225', '\012', '\341', '\070', '\012', '\141', '\144', - '\270', '\006', '\155', '\261', '\147', '\020', '\270', '\147', - '\020', '\277', '\147', '\020', '\130', '\143', '\020', '\320', - '\147', '\020', '\330', '\147', '\020', '\175', '\221', '\176', - '\011', '\041', '\177', '\006', '\221', '\177', '\271', '\001', - '\027', '\011', '\001', '\005', '\011', '\101', '\201', '\006', - '\301', '\201', '\006', '\121', '\202', '\023', '\221', '\020', - '\154', '\143', '\020', '\073', '\150', '\020', '\102', '\150', - '\020', '\113', '\250', '\026', '\011', '\161', '\206', '\006', - '\001', '\207', '\006', '\141', '\067', '\006', '\021', '\210', - '\006', '\221', '\210', '\006', '\041', '\211', '\006', '\301', - '\211', '\006', '\101', '\212', '\006', '\201', '\212', '\006', - '\261', '\212', '\006', '\341', '\212', '\006', '\021', '\213', - '\006', '\001', '\070', '\006', '\201', '\213', '\006', '\301', - '\213', '\006', '\001', '\214', '\006', '\061', '\214', '\006', - '\141', '\214', '\006', '\221', '\214', '\006', '\101', '\070', - '\006', '\001', '\215', '\006', '\101', '\215', '\006', '\201', - '\215', '\006', '\261', '\215', '\006', '\361', '\215', '\006', - '\061', '\216', '\006', '\201', '\070', '\351', '\230', '\020', - '\356', '\150', '\020', '\362', '\150', '\020', '\203', '\141', - '\020', '\370', '\150', '\020', '\374', '\150', '\020', '\214', - '\143', '\020', '\003', '\151', '\020', '\007', '\151', '\020', - '\013', '\151', '\020', '\341', '\220', '\020', '\343', '\220', - '\020', '\345', '\220', '\020', '\220', '\143', '\020', '\351', - '\220', '\020', '\353', '\220', '\020', '\355', '\220', '\020', - '\357', '\220', '\020', '\361', '\220', '\020', '\363', '\060', - '\071', '\011', '\161', '\017', '\011', '\241', '\030', '\006', - '\261', '\017', '\011', '\321', '\017', '\232', '\047', '\024', - '\032', '\161', '\071', '\315', '\242', '\021', '\042', '\326', - '\123', '\032', '\261', '\000', '\032', '\261', '\136', '\024', - '\245', '\071', '\032', '\061', '\001', '\032', '\121', '\001', - '\032', '\161', '\001', '\032', '\221', '\001', '\032', '\261', - '\001', '\032', '\321', '\001', '\236', '\243', '\021', '\041', - '\240', '\021', '\043', '\240', '\021', '\045', '\240', '\021', - '\047', '\240', '\021', '\051', '\240', '\021', '\053', '\040', - '\072', '\032', '\361', '\002', '\032', '\021', '\003', '\221', - '\241', '\021', '\065', '\240', '\021', '\067', '\240', '\021', - '\071', '\140', '\072', '\032', '\321', '\003', '\032', '\361', - '\003', '\032', '\021', '\004', '\032', '\061', '\004', '\032', - '\121', '\004', '\032', '\161', '\004', '\252', '\243', '\021', - '\113', '\240', '\021', '\115', '\240', '\021', '\117', '\240', - '\021', '\121', '\240', '\021', '\123', '\240', '\021', '\125', - '\340', '\072', '\032', '\221', '\005', '\032', '\261', '\005', - '\032', '\321', '\005', '\032', '\361', '\005', '\032', '\021', - '\006', '\032', '\161', '\006', '\264', '\243', '\021', '\161', - '\240', '\021', '\232', '\141', '\020', '\173', '\240', '\021', - '\200', '\240', '\021', '\205', '\240', '\021', '\242', '\141', - '\020', '\276', '\143', '\020', '\224', '\240', '\021', '\231', - '\240', '\021', '\236', '\240', '\021', '\243', '\240', '\021', - '\250', '\240', '\021', '\255', '\160', '\074', '\032', '\161', - '\013', '\032', '\301', '\013', '\032', '\021', '\014', '\032', - '\141', '\014', '\032', '\261', '\014', '\032', '\001', '\015', - '\321', '\243', '\021', '\332', '\240', '\021', '\337', '\240', - '\021', '\344', '\240', '\021', '\351', '\240', '\021', '\356', - '\240', '\021', '\363', '\260', '\075', '\032', '\321', '\017', - '\256', '\025', '\021', '\174', '\365', '\145', '\021', '\061', - '\001', '\021', '\201', '\001', '\021', '\321', '\001', '\347', - '\023', '\021', '\047', '\020', '\021', '\054', '\020', '\021', - '\061', '\020', '\021', '\070', '\020', '\021', '\075', '\020', - '\021', '\102', '\020', '\021', '\107', '\060', '\077', '\021', - '\021', '\005', '\021', '\141', '\005', '\021', '\261', '\005', - '\021', '\001', '\006', '\021', '\121', '\006', '\021', '\301', - '\006', '\021', '\021', '\007', '\377', '\023', '\021', '\173', - '\360', '\022', '\021', '\121', '\010', '\021', '\241', '\010', - '\021', '\021', '\011', '\021', '\141', '\011', '\021', '\261', - '\011', '\013', '\024', '\021', '\245', '\020', '\021', '\252', - '\020', '\021', '\257', '\020', '\021', '\267', '\060', '\101', - '\021', '\021', '\014', '\021', '\141', '\014', '\021', '\261', - '\014', '\021', '\001', '\015', '\021', '\121', '\015', '\021', - '\241', '\015', '\021', '\041', '\016', '\021', '\161', '\016', - '\021', '\301', '\016', '\021', '\021', '\017', '\021', '\141', - '\017', '\045', '\224', '\150', '\161', '\144', '\023', '\012', - '\140', '\023', '\017', '\140', '\023', '\024', '\140', '\023', - '\031', '\360', '\102', '\066', '\061', '\002', '\066', '\201', - '\002', '\066', '\321', '\002', '\066', '\041', '\003', '\066', - '\161', '\003', '\066', '\301', '\003', '\071', '\144', '\023', - '\106', '\140', '\023', '\113', '\140', '\023', '\120', '\140', - '\023', '\125', '\140', '\023', '\103', '\000', '\003', '\370', - '\232', '\042', '\370', '\032', '\045', '\367', '\012', '\003', - '\127', '\321', '\257', '\342', '\327', '\257', '\344', '\327', - '\257', '\346', '\327', '\257', '\350', '\327', '\257', '\352', - '\167', '\257', '\061', '\340', '\175', '\012', '\313', '\257', - '\060', '\020', '\003', '\377', '\372', '\260', '\001', '\373', - '\260', '\003', '\373', '\260', '\005', '\373', '\260', '\007', - '\373', '\260', '\011', '\353', '\257', '\014', '\353', '\257', - '\016', '\053', '\003', '\021', '\053', '\003', '\023', '\053', - '\003', '\025', '\053', '\003', '\027', '\053', '\003', '\031', - '\053', '\003', '\033', '\073', '\003', '\035', '\073', '\003', - '\016', '\073', '\003', '\021', '\073', '\003', '\023', '\073', - '\003', '\025', '\073', '\003', '\027', '\073', '\003', '\031', - '\073', '\003', '\033', '\113', '\003', '\336', '\067', '\174', - '\305', '\167', '\174', '\311', '\267', '\174', '\315', '\367', - '\174', '\321', '\067', '\175', '\000', '\120', '\175', '\327', - '\227', '\175', '\333', '\327', '\175', '\337', '\027', '\176', - '\343', '\127', '\176', '\347', '\347', '\226', '\354', '\007', - '\000', '\356', '\007', '\177', '\362', '\107', '\177', '\366', - '\007', '\000', '\370', '\247', '\177', '\374', '\107', '\004', - '\376', '\107', '\034', '\000', '\020', '\200', '\000', '\060', - '\200', '\005', '\170', '\200', '\011', '\270', '\200', '\015', - '\370', '\200', '\346', '\061', '\005', '\022', '\050', '\045', - '\025', '\170', '\201', '\031', '\010', '\000', '\033', '\330', - '\201', '\000', '\360', '\201', '\041', '\070', '\202', '\045', - '\010', '\006', '\047', '\230', '\202', '\000', '\260', '\202', - '\000', '\320', '\202', '\057', '\030', '\203', '\063', '\010', - '\000', '\065', '\170', '\203', '\071', '\010', '\000', '\073', - '\330', '\203', '\077', '\010', '\000', '\101', '\070', '\204', - '\105', '\170', '\204', '\111', '\010', '\000', '\113', '\330', - '\204', '\117', '\030', '\205', '\123', '\130', '\205', '\372', - '\307', '\006', '\141', '\340', '\006', '\067', '\070', '\004', - '\061', '\140', '\003', '\014', '\373', '\271', '\374', '\372', - '\271', '\377', '\372', '\271', '\001', '\373', '\271', '\003', - '\373', '\271', '\005', '\373', '\271', '\007', '\373', '\271', - '\011', '\373', '\271', '\136', '\343', '\271', '\066', '\120', - '\044', '\236', '\173', '\003', '\241', '\173', '\003', '\243', - '\173', '\003', '\245', '\173', '\003', '\247', '\173', '\003', - '\251', '\173', '\003', '\253', '\173', '\003', '\255', '\173', - '\003', '\257', '\173', '\003', '\261', '\033', '\003', '\067', - '\100', '\273', '\061', '\200', '\003', '\241', '\213', '\003', - '\243', '\213', '\003', '\245', '\213', '\003', '\247', '\213', - '\003', '\251', '\073', '\044', '\051', '\262', '\274', '\255', - '\213', '\003', '\257', '\053', '\044', '\327', '\213', '\003', - '\312', '\233', '\003', '\241', '\173', '\047', '\367', '\161', - '\006', '\162', '\020', '\006', '\166', '\320', '\202', '\236', - '\233', '\003', '\247', '\233', '\003', '\251', '\233', '\003', - '\253', '\233', '\003', '\255', '\233', '\003', '\257', '\233', - '\003', '\307', '\153', '\047', '\376', '\107', '\276', '\346', - '\213', '\276', '\062', '\360', '\260', '\051', '\262', '\277', - '\377', '\272', '\277', '\001', '\273', '\277', '\003', '\273', - '\277', '\005', '\273', '\277', '\007', '\273', '\277', '\011', - '\273', '\277', '\261', '\273', '\277', '\105', '\362', '\004', - '\370', '\173', '\276', '\375', '\033', '\003', '\374', '\052', - '\003', '\020', '\033', '\301', '\001', '\034', '\003', '\003', - '\034', '\003', '\005', '\374', '\271', '\122', '\362', '\300', - '\372', '\273', '\274', '\021', '\114', '\273', '\040', '\313', - '\260', '\040', '\073', '\301', '\040', '\333', '\277', '\042', - '\173', '\202', '\055', '\340', '\301', '\050', '\134', '\300', - '\050', '\213', '\302', '\011', '\054', '\003', '\013', '\054', - '\003', '\042', '\314', '\262', '\375', '\353', '\262', '\177', - '\273', '\302', '\345', '\013', '\301', '\103', '\040', '\262', - '\001', '\114', '\263', '\067', '\134', '\300', '\070', '\173', - '\303', '\011', '\074', '\003', '\013', '\074', '\003', '\042', - '\314', '\263', '\375', '\113', '\003', '\023', '\114', '\003', - '\377', '\113', '\003', '\001', '\114', '\003', '\003', '\114', - '\003', '\005', '\114', '\003', '\007', '\114', '\003', '\011', - '\114', '\003', '\013', '\114', '\003', '\042', '\274', '\052', - '\375', '\133', '\003', '\023', '\134', '\003', '\377', '\133', - '\003', '\001', '\134', '\003', '\003', '\134', '\003', '\346', - '\147', '\055', '\314', '\222', '\054', '\313', '\042', '\021', - '\316', '\062', '\170', '\321', '\062', '\055', '\160', '\234', - '\020', - -}; - -static const char file_5x8[] = { - '\037', '\235', '\214', '\001', '\314', '\214', '\201', '\223', - '\000', '\200', '\301', '\000', '\006', '\023', '\032', '\144', - '\042', '\300', '\040', '\246', '\204', '\015', '\023', '\042', - '\004', '\100', '\046', '\041', '\271', '\210', '\004', '\024', - '\116', '\104', '\024', '\021', '\311', '\000', '\203', '\010', - '\024', '\046', '\304', '\140', '\300', '\040', '\264', '\002', - '\006', '\041', '\150', '\064', '\310', '\321', '\040', '\272', - '\005', '\006', '\101', '\210', '\114', '\071', '\021', '\216', - '\003', '\203', '\100', '\146', '\002', '\100', '\020', '\021', - '\320', '\003', '\203', '\200', '\164', '\322', '\371', '\010', - '\000', '\121', '\004', '\211', '\110', '\051', '\046', '\344', - '\107', '\141', '\146', '\005', '\235', '\001', '\044', '\044', - '\234', '\040', '\161', '\103', '\102', '\231', '\007', '\131', - '\044', '\224', '\041', '\321', '\107', '\302', '\042', '\022', - '\227', '\044', '\154', '\042', '\161', '\113', '\102', '\061', - '\022', '\343', '\044', '\224', '\243', '\060', '\244', '\301', - '\076', '\012', '\241', '\044', '\104', '\244', '\120', '\254', - '\301', '\112', '\165', '\023', '\212', '\222', '\250', '\052', - '\041', '\053', '\205', '\134', '\015', '\352', '\222', '\270', - '\054', '\341', '\065', '\211', '\350', '\022', '\262', '\223', - '\150', '\157', '\344', '\304', '\000', '\035', '\046', '\152', - '\231', '\010', '\100', '\101', '\302', '\060', '\224', '\317', - '\044', '\144', '\103', '\371', '\100', '\302', '\072', '\224', - '\121', '\212', '\004', '\064', '\321', '\310', '\023', '\047', - '\124', '\234', '\004', '\151', '\122', '\344', '\213', '\224', - '\042', '\107', '\222', '\114', '\241', '\042', '\045', '\213', - '\101', '\323', '\125', '\234', '\020', '\251', '\015', '\240', - '\111', '\232', '\071', '\143', '\000', '\030', '\131', '\235', - '\204', '\111', '\226', '\057', '\252', '\131', '\013', '\117', - '\203', '\247', '\114', '\305', '\053', '\105', '\222', '\034', - '\101', '\102', '\005', '\371', '\152', '\260', '\115', '\234', - '\247', '\251', '\323', '\006', '\300', '\024', '\046', '\101', - '\120', '\003', '\220', '\342', '\275', '\010', '\225', '\053', - '\111', '\210', '\120', '\101', '\142', '\135', '\271', '\223', - '\067', '\162', '\332', '\204', '\141', '\003', '\040', '\010', - '\021', '\042', '\137', '\146', '\147', '\141', '\322', '\072', - '\071', '\130', '\000', '\120', '\044', '\201', '\105', '\021', - '\114', '\344', '\227', '\204', '\026', '\140', '\101', '\361', - '\104', '\022', '\250', '\031', '\210', '\340', '\170', '\105', - '\114', '\361', '\004', '\023', '\125', '\120', '\221', '\304', - '\151', '\137', '\140', '\001', '\241', '\204', '\024', '\132', - '\210', '\241', '\155', '\123', '\100', '\021', '\304', '\020', - '\014', '\036', '\001', '\300', '\020', '\365', '\131', '\121', - '\204', '\024', '\101', '\034', '\321', '\032', '\172', '\352', - '\041', '\161', '\042', '\022', '\101', '\110', '\061', '\205', - '\171', '\256', '\301', '\046', '\033', '\155', '\266', '\311', - '\366', '\204', '\015', '\064', '\330', '\340', '\102', '\014', - '\071', '\344', '\020', '\303', '\214', '\065', '\336', '\130', - '\135', '\021', '\116', '\014', '\361', '\004', '\021', '\045', - '\002', '\220', '\204', '\024', '\126', '\234', '\370', '\004', - '\024', '\131', '\110', '\041', '\035', '\165', '\047', '\276', - '\001', '\107', '\036', '\162', '\244', '\161', '\006', '\032', - '\164', '\200', '\100', '\044', '\016', '\071', '\200', '\040', - '\106', '\036', '\040', '\014', '\361', '\306', '\031', '\156', - '\244', '\101', '\107', '\032', '\157', '\270', '\321', '\046', - '\174', '\160', '\270', '\040', '\334', '\151', '\124', '\000', - '\320', '\202', '\157', '\300', '\265', '\140', '\004', '\163', - '\316', '\375', '\251', '\035', '\167', '\055', '\110', '\321', - '\302', '\173', '\361', '\315', '\327', '\102', '\013', '\070', - '\100', '\012', '\103', '\013', '\067', '\324', '\100', '\251', - '\245', '\103', '\264', '\120', '\303', '\244', '\076', '\002', - '\051', '\044', '\221', '\106', '\266', '\060', '\145', '\225', - '\320', '\155', '\331', '\347', '\153', '\034', '\126', '\170', - '\241', '\023', '\000', '\140', '\361', '\005', '\022', '\321', - '\115', '\327', '\147', '\024', '\125', '\330', '\367', '\005', - '\214', '\353', '\035', '\164', '\120', '\000', '\274', '\362', - '\152', '\220', '\147', '\272', '\352', '\004', '\000', '\112', - '\050', '\171', '\106', '\231', '\101', '\304', '\002', '\140', - '\254', '\116', '\242', '\001', '\260', '\317', '\077', '\006', - '\065', '\224', '\354', '\262', '\302', '\126', '\153', '\355', - '\112', '\000', '\004', '\005', '\110', '\041', '\205', '\034', - '\022', '\310', '\266', '\335', '\176', '\313', '\255', '\267', - '\340', '\222', '\073', '\256', '\270', '\341', '\226', '\213', - '\256', '\271', '\351', '\236', '\253', '\356', '\273', '\356', - '\306', '\333', '\356', '\274', '\354', '\326', '\273', '\356', - '\275', '\360', '\322', '\213', '\257', '\274', '\366', '\346', - '\333', '\057', '\277', '\373', '\352', '\353', '\157', '\300', - '\377', '\012', '\014', '\360', '\300', '\010', '\037', '\254', - '\260', '\301', '\014', '\027', '\354', '\060', '\301', '\020', - '\047', '\334', '\160', '\304', '\013', '\077', '\054', '\261', - '\305', '\025', '\123', '\074', '\361', '\305', '\032', '\143', - '\274', '\161', '\306', '\034', '\207', '\014', '\362', '\310', - '\037', '\227', '\354', '\261', '\275', '\063', '\005', '\065', - '\223', '\133', '\000', '\250', '\144', '\020', '\006', '\127', - '\045', '\204', '\102', '\102', '\060', '\044', '\204', '\103', - '\102', '\071', '\031', '\044', '\243', '\101', '\162', '\031', - '\244', '\241', '\101', '\140', '\044', '\204', '\106', '\102', - '\160', '\044', '\204', '\107', '\102', '\052', '\027', '\225', - '\020', '\044', '\011', '\075', '\144', '\020', '\050', '\011', - '\241', '\222', '\020', '\054', '\011', '\341', '\222', '\020', - '\060', '\011', '\041', '\223', '\020', '\064', '\011', '\141', - '\223', '\020', '\070', '\011', '\045', '\146', '\020', '\074', - '\011', '\341', '\203', '\055', '\002', '\023', '\101', '\060', - '\021', '\006', '\023', '\201', '\060', '\021', '\012', '\023', - '\301', '\060', '\021', '\016', '\023', '\001', '\061', '\021', - '\022', '\023', '\101', '\061', '\021', '\026', '\023', '\201', - '\061', '\021', '\032', '\065', '\115', '\204', '\307', '\104', - '\244', '\261', '\064', '\021', '\044', '\023', '\141', '\062', - '\021', '\050', '\023', '\241', '\062', '\021', '\054', '\023', - '\341', '\062', '\021', '\060', '\023', '\041', '\063', '\021', - '\064', '\023', '\141', '\063', '\021', '\070', '\023', '\241', - '\063', '\021', '\074', '\023', '\341', '\103', '\131', '\104', - '\074', '\245', '\024', '\021', '\006', '\021', '\201', '\020', - '\021', '\012', '\021', '\301', '\020', '\021', '\016', '\021', - '\001', '\321', '\121', '\104', '\120', '\104', '\204', '\105', - '\104', '\140', '\104', '\204', '\106', '\104', '\160', '\104', - '\204', '\107', '\117', '\021', '\265', '\004', '\000', '\044', - '\021', '\141', '\022', '\021', '\050', '\021', '\241', '\022', - '\021', '\054', '\021', '\341', '\022', '\021', '\060', '\021', - '\041', '\023', '\021', '\064', '\021', '\141', '\023', '\021', - '\070', '\021', '\241', '\023', '\021', '\074', '\021', '\341', - '\023', '\021', '\000', '\104', '\041', '\100', '\024', '\004', - '\104', '\141', '\100', '\024', '\010', '\104', '\241', '\100', - '\024', '\014', '\104', '\341', '\100', '\024', '\020', '\104', - '\171', '\304', '\063', '\121', '\130', '\020', '\005', '\006', - '\121', '\150', '\020', '\005', '\007', '\121', '\170', '\020', - '\005', '\010', '\121', '\210', '\040', '\012', '\044', '\210', - '\202', '\011', '\242', '\200', '\202', '\050', '\250', '\040', - '\012', '\054', '\210', '\202', '\013', '\242', '\000', '\203', - '\050', '\310', '\040', '\012', '\064', '\210', '\202', '\015', - '\242', '\200', '\203', '\050', '\350', '\040', '\012', '\074', - '\210', '\202', '\017', '\242', '\000', '\040', '\043', '\040', - '\111', '\210', '\313', '\000', '\200', '\225', '\152', '\021', - '\300', '\001', '\037', '\160', '\000', '\010', '\001', '\100', - '\001', '\005', '\264', '\360', '\205', '\012', '\120', '\200', - '\003', '\142', '\310', '\001', '\004', '\040', '\340', '\000', - '\001', '\030', '\100', '\007', '\012', '\300', '\000', '\002', - '\020', '\300', '\000', '\001', '\050', '\011', '\003', '\050', - '\060', '\304', '\136', '\035', '\200', '\003', '\004', '\350', - '\341', '\007', '\025', '\260', '\102', '\203', '\234', '\060', - '\043', '\067', '\001', '\100', '\002', '\026', '\320', '\200', - '\004', '\370', '\220', '\000', '\034', '\050', '\200', '\026', - '\005', '\120', '\103', '\033', '\136', '\021', '\130', '\042', - '\071', '\300', '\025', '\127', '\210', '\304', '\061', '\372', - '\220', '\003', '\012', '\271', '\342', '\007', '\306', '\010', - '\200', '\017', '\010', '\313', '\215', '\072', '\201', '\343', - '\114', '\344', '\050', '\022', '\070', '\136', '\261', '\214', - '\146', '\024', '\243', '\031', '\011', '\100', '\307', '\204', - '\254', '\161', '\217', '\146', '\334', '\011', '\001', '\004', - '\100', '\000', '\004', '\104', '\221', '\220', '\010', '\030', - '\144', '\024', '\077', '\020', '\303', '\030', '\046', '\004', - '\001', '\153', '\374', '\300', '\367', '\030', '\040', '\201', - '\003', '\010', '\100', '\002', '\015', '\110', '\343', '\265', - '\234', '\170', '\305', '\017', '\032', '\244', '\221', '\012', - '\211', '\041', '\043', '\031', '\151', '\231', '\023', '\026', - '\300', '\001', '\024', '\120', '\141', '\264', '\230', '\250', - '\000', '\267', '\020', '\040', '\206', '\257', '\164', '\241', - '\101', '\172', '\370', '\075', '\220', '\134', '\221', '\145', - '\204', '\364', '\341', '\367', '\044', '\300', '\000', '\017', - '\120', '\062', '\041', '\076', '\374', '\343', '\114', '\150', - '\051', '\022', '\017', '\350', '\344', '\211', '\051', '\201', - '\100', '\042', '\005', '\200', '\221', '\106', '\062', '\321', - '\211', '\006', '\270', '\142', '\024', '\051', '\011', '\001', - '\006', '\010', '\300', '\230', '\000', '\240', '\044', '\002', - '\040', '\300', '\113', '\220', '\060', '\100', '\001', '\036', - '\260', '\241', '\101', '\074', '\040', '\000', '\007', '\160', - '\223', '\001', '\263', '\024', '\200', '\002', '\054', '\320', - '\115', '\000', '\170', '\100', '\231', '\211', '\004', '\041', - '\045', '\051', '\331', '\116', '\112', '\152', '\200', '\002', - '\325', '\234', '\045', '\072', '\031', '\200', '\116', '\175', - '\146', '\163', '\220', '\266', '\144', '\146', '\041', '\023', - '\162', '\223', '\050', '\106', '\253', '\220', '\313', '\164', - '\142', '\053', '\063', '\222', '\021', '\112', '\146', '\240', - '\002', '\025', '\110', '\200', '\000', '\366', '\051', '\001', - '\011', '\170', '\240', '\242', '\006', '\161', '\200', '\004', - '\064', '\272', '\321', '\131', '\112', '\200', '\231', '\355', - '\344', '\150', '\105', '\243', '\110', '\116', '\007', '\060', - '\023', '\233', '\045', '\145', '\146', '\104', '\050', '\051', - '\000', '\015', '\264', '\263', '\242', '\027', '\305', '\050', - '\000', '\124', '\050', '\115', '\203', '\160', '\000', '\002', - '\070', '\175', '\251', '\002', '\014', '\020', '\103', '\251', - '\000', '\100', '\245', '\314', '\214', '\242', '\105', '\143', - '\352', '\123', '\011', '\130', '\300', '\003', '\032', '\160', - '\251', '\107', '\053', '\032', '\322', '\221', '\062', '\163', - '\251', '\026', '\320', '\000', '\003', '\124', '\302', '\121', - '\007', '\050', '\065', '\233', '\022', '\050', '\144', '\073', - '\377', '\330', '\111', '\000', '\060', '\265', '\242', '\375', - '\374', '\052', '\077', '\015', '\302', '\124', '\017', '\134', - '\224', '\254', '\274', '\244', '\247', '\101', '\042', '\020', - '\001', '\046', '\372', '\160', '\234', '\312', '\034', '\044', - '\066', '\115', '\252', '\322', '\103', '\042', '\022', '\247', - '\031', '\265', '\241', '\015', '\243', '\030', '\313', '\153', - '\031', '\323', '\000', '\204', '\324', '\011', '\005', '\222', - '\332', '\224', '\237', '\226', '\163', '\244', '\012', '\261', - '\346', '\104', '\223', '\071', '\330', '\173', '\046', '\226', - '\234', '\375', '\104', '\000', '\005', '\236', '\330', '\104', - '\112', '\336', '\024', '\235', '\101', '\145', '\252', '\023', - '\001', '\020', '\315', '\023', '\206', '\120', '\257', '\317', - '\004', '\051', '\107', '\015', '\322', '\131', '\037', '\032', - '\264', '\062', '\020', '\075', '\012', '\101', '\065', '\233', - '\020', '\172', '\366', '\063', '\243', '\033', '\175', '\252', - '\115', '\045', '\160', '\323', '\021', '\256', '\123', '\266', - '\031', '\065', '\200', '\041', '\071', '\251', '\102', '\012', - '\260', '\314', '\253', '\025', '\105', '\143', '\102', '\032', - '\331', '\304', '\010', '\100', '\364', '\264', '\151', '\365', - '\051', '\132', '\071', '\320', '\116', '\167', '\046', '\322', - '\230', '\030', '\050', '\244', '\156', '\011', '\000', '\263', - '\017', '\006', '\162', '\272', '\321', '\105', '\100', '\111', - '\130', '\150', '\231', '\115', '\002', '\200', '\160', '\331', - '\332', '\026', '\040', '\306', '\313', '\055', '\103', '\374', - '\041', '\020', '\345', '\015', '\004', '\172', '\115', '\246', - '\136', '\102', '\024', '\302', '\020', '\175', '\010', '\204', - '\173', '\315', '\213', '\260', '\101', '\164', '\253', '\017', - '\200', '\260', '\057', '\041', '\002', '\041', '\010', '\156', - '\355', '\267', '\277', '\367', '\315', '\227', '\041', '\366', - '\000', '\256', '\102', '\360', '\001', '\134', '\204', '\300', - '\057', '\267', '\006', '\341', '\007', '\160', '\011', '\342', - '\017', '\000', '\046', '\227', '\175', '\353', '\245', '\340', - '\102', '\374', '\167', '\302', '\355', '\175', '\057', '\040', - '\344', '\253', '\141', '\160', '\321', '\267', '\274', '\177', - '\360', '\060', '\040', '\004', '\241', '\137', '\374', '\212', - '\167', '\304', '\366', '\065', '\304', '\206', '\347', '\133', - '\341', '\103', '\220', '\267', '\133', '\053', '\176', '\357', - '\171', '\307', '\025', '\143', '\370', '\012', '\142', '\276', - '\347', '\115', '\361', '\214', '\145', '\354', '\341', '\363', - '\272', '\167', '\020', '\033', '\136', '\260', '\037', '\070', - '\014', '\344', '\365', '\252', '\230', '\303', '\107', '\236', - '\157', '\220', '\065', '\154', '\344', '\045', '\037', '\271', - '\274', '\116', '\216', '\162', '\223', '\233', '\174', '\143', - '\031', '\043', '\271', '\306', '\061', '\056', '\304', '\220', - '\225', '\174', '\145', '\165', '\115', '\031', '\312', '\137', - '\146', '\062', '\230', '\307', '\054', '\146', '\046', '\163', - '\231', '\314', '\111', '\056', '\363', '\223', '\325', '\054', - '\345', '\364', '\206', '\131', '\305', '\042', '\176', '\163', - '\233', '\073', '\214', '\146', '\054', '\117', '\231', '\313', - '\054', '\136', '\357', '\206', '\003', '\221', '\342', '\370', - '\372', '\127', '\312', '\356', '\045', '\304', '\234', '\005', - '\035', '\346', '\375', '\336', '\331', '\314', '\357', '\125', - '\057', '\230', '\225', '\214', '\340', '\045', '\023', '\372', - '\317', '\353', '\065', '\264', '\177', '\025', '\155', '\341', - '\030', '\077', '\272', '\314', '\204', '\016', '\364', '\213', - '\057', '\315', '\151', '\112', '\137', '\332', '\305', '\044', - '\056', '\263', '\213', '\215', '\174', '\340', '\023', '\013', - '\353', '\017', '\325', '\102', '\110', '\103', '\076', '\222', - '\021', '\224', '\224', '\304', '\063', '\041', '\051', '\210', - '\145', '\140', '\202', '\316', '\114', '\336', '\344', '\047', - '\052', '\071', '\212', '\124', '\250', '\322', '\224', '\247', - '\130', '\000', '\000', '\027', '\000', '\000', '\314', '\062', - '\000', '\000', '\015', '\000', '\300', '\052', '\150', '\354', - '\200', '\073', '\333', '\110', '\102', '\000', '\204', '\000', - '\000', '\042', '\000', '\300', '\010', '\000', '\100', '\002', - '\000', '\224', '\000', '\000', '\046', '\000', '\300', '\011', - '\000', '\060', '\263', '\024', '\000', '\100', '\005', '\000', - '\130', '\001', '\000', '\264', '\322', '\002', '\000', '\350', - '\351', '\005', '\000', '\250', '\331', '\221', '\270', '\062', - '\003', '\000', '\320', '\000', '\000', '\065', '\000', '\200', - '\015', '\000', '\160', '\003', '\000', '\334', '\054', '\007', - '\000', '\320', '\001', '\000', '\166', '\000', '\000', '\036', - '\000', '\240', '\007', '\000', '\360', '\312', '\017', '\000', - '\220', '\223', '\040', '\000', '\100', '\010', '\047', '\002', - '\000', '\021', '\000', '\000', '\026', '\043', '\000', '\300', - '\104', '\062', '\112', '\002', '\000', '\224', '\000', '\000', - '\261', '\060', '\241', '\067', '\000', '\140', '\325', '\023', - '\000', '\004', '\200', '\050', '\214', '\307', '\073', '\000', - '\350', '\123', '\025', '\000', '\100', '\252', '\126', '\001', - '\300', '\066', '\132', '\000', '\200', '\131', '\270', '\000', - '\200', '\056', '\000', '\300', '\013', '\000', '\370', '\002', - '\000', '\202', '\026', '\006', '\000', '\240', '\045', '\070', - '\025', '\051', '\003', '\000', '\314', '\000', '\000', '\315', - '\014', '\055', '\015', '\000', '\120', '\003', '\000', '\326', - '\000', '\000', '\372', '\164', '\307', '\015', '\000', '\170', - '\003', '\000', '\212', '\246', '\026', '\266', '\314', '\001', - '\000', '\164', '\000', '\100', '\035', '\000', '\140', '\007', - '\000', '\334', '\001', '\000', '\107', '\313', '\003', '\000', - '\364', '\000', '\200', '\075', '\000', '\200', '\017', '\000', - '\200', '\213', '\037', '\000', '\200', '\352', '\224', '\045', - '\345', '\273', '\147', '\247', '\214', '\332', '\323', '\316', - '\366', '\140', '\241', '\335', '\355', '\153', '\207', '\173', - '\333', '\337', '\116', '\367', '\270', '\327', '\175', '\356', - '\166', '\317', '\073', '\336', '\367', '\056', '\367', '\276', - '\337', '\335', '\357', '\172', '\007', '\074', '\337', '\377', - '\116', '\370', '\300', '\027', '\176', '\360', '\206', '\117', - '\074', '\342', '\027', '\057', '\370', '\306', '\037', '\336', - '\361', '\212', '\207', '\074', '\343', '\037', '\117', '\371', - '\310', '\127', '\176', '\362', '\206', '\127', '\110', '\322', - '\024', '\322', '\254', '\356', '\002', '\340', '\047', '\006', - '\051', '\054', '\000', '\210', '\075', '\316', '\204', '\114', - '\333', '\040', '\063', '\063', '\110', '\271', '\015', '\022', - '\030', '\172', '\047', '\304', '\337', '\006', '\061', '\370', - '\155', '\022', '\142', '\027', '\216', '\033', '\144', '\344', - '\006', '\111', '\271', '\101', '\144', '\156', '\220', '\212', - '\030', '\004', '\350', '\006', '\101', '\272', '\101', '\236', - '\156', '\220', '\243', '\275', '\045', '\041', '\202', '\110', - '\310', '\041', '\022', '\302', '\210', '\204', '\104', '\042', - '\041', '\226', '\110', '\310', '\046', '\022', '\002', '\065', - '\203', '\224', '\042', '\041', '\247', '\110', '\110', '\052', - '\022', '\262', '\212', '\204', '\264', '\042', '\041', '\257', - '\110', '\110', '\054', '\022', '\062', '\213', '\204', '\324', - '\042', '\041', '\267', '\110', '\110', '\056', '\022', '\262', - '\213', '\204', '\364', '\042', '\041', '\277', '\110', '\110', - '\060', '\022', '\062', '\214', '\204', '\024', '\043', '\041', - '\307', '\110', '\110', '\062', '\022', '\122', '\030', '\203', - '\064', '\043', '\041', '\317', '\220', '\020', '\321', '\220', - '\020', '\323', '\220', '\020', '\325', '\140', '\030', '\011', - '\221', '\015', '\011', '\261', '\015', '\011', '\321', '\015', - '\011', '\361', '\015', '\011', '\021', '\016', '\011', '\061', - '\016', '\011', '\121', '\016', '\011', '\161', '\016', '\011', - '\221', '\016', '\011', '\261', '\016', '\011', '\321', '\016', - '\011', '\361', '\016', '\011', '\021', '\017', '\011', '\061', - '\017', '\011', '\121', '\017', '\011', '\161', '\017', '\011', - '\221', '\017', '\011', '\261', '\017', '\011', '\321', '\017', - '\011', '\001', '\055', '\273', '\142', '\020', '\003', '\060', - '\021', '\005', '\060', '\021', '\070', '\144', '\020', '\011', - '\060', '\021', '\013', '\060', '\021', '\015', '\060', '\021', - '\017', '\060', '\021', '\021', '\060', '\021', '\023', '\060', - '\021', '\025', '\060', '\021', '\027', '\060', '\021', '\031', - '\060', '\021', '\033', '\060', '\021', '\221', '\141', '\020', - '\037', '\060', '\021', '\041', '\060', '\021', '\043', '\060', - '\021', '\045', '\060', '\021', '\047', '\060', '\021', '\051', - '\060', '\021', '\053', '\060', '\021', '\055', '\060', '\021', - '\057', '\060', '\021', '\061', '\060', '\021', '\063', '\060', - '\021', '\065', '\060', '\021', '\067', '\060', '\021', '\071', - '\060', '\021', '\073', '\060', '\021', '\075', '\060', '\021', - '\077', '\060', '\021', '\101', '\060', '\021', '\103', '\060', - '\021', '\105', '\060', '\021', '\107', '\060', '\021', '\111', - '\060', '\021', '\113', '\060', '\021', '\115', '\060', '\021', - '\117', '\060', '\021', '\121', '\060', '\021', '\123', '\060', - '\021', '\125', '\060', '\021', '\127', '\060', '\021', '\131', - '\060', '\021', '\133', '\060', '\021', '\135', '\060', '\021', - '\137', '\060', '\021', '\230', '\141', '\020', '\146', '\040', - '\207', '\060', '\120', '\211', '\047', '\122', '\211', '\107', - '\062', '\004', '\225', '\310', '\025', '\232', '\010', '\003', - '\355', '\326', '\211', '\357', '\326', '\211', '\361', '\326', - '\211', '\363', '\326', '\211', '\365', '\246', '\211', '\061', - '\120', '\063', '\250', '\230', '\211', '\060', '\020', '\003', - '\234', '\330', '\212', '\237', '\330', '\212', '\241', '\330', - '\212', '\243', '\330', '\212', '\245', '\330', '\212', '\247', - '\010', '\003', '\062', '\240', '\212', '\272', '\310', '\212', - '\062', '\360', '\212', '\062', '\020', '\213', '\062', '\060', - '\213', '\062', '\120', '\213', '\062', '\160', '\213', '\062', - '\220', '\213', '\063', '\300', '\213', '\063', '\300', '\212', - '\063', '\360', '\212', '\063', '\020', '\213', '\063', '\060', - '\213', '\063', '\120', '\213', '\063', '\160', '\213', '\063', - '\220', '\213', '\064', '\120', '\063', '\317', '\026', '\155', - '\323', '\126', '\155', '\327', '\226', '\155', '\333', '\326', - '\155', '\337', '\026', '\156', '\343', '\346', '\047', '\346', - '\006', '\000', '\350', '\246', '\156', '\000', '\300', '\156', - '\356', '\006', '\157', '\362', '\346', '\172', '\367', '\226', - '\157', '\373', '\326', '\157', '\377', '\026', '\160', '\000', - '\060', '\160', '\005', '\167', '\160', '\011', '\267', '\160', - '\015', '\367', '\160', '\000', '\020', '\161', '\023', '\127', - '\161', '\000', '\160', '\161', '\144', '\241', '\161', '\034', - '\347', '\161', '\344', '\061', '\005', '\041', '\007', '\000', - '\043', '\127', '\162', '\032', '\202', '\162', '\052', '\007', - '\000', '\054', '\347', '\162', '\060', '\047', '\163', '\064', - '\147', '\163', '\000', '\200', '\163', '\000', '\240', '\163', - '\074', '\347', '\163', '\000', '\000', '\164', '\102', '\107', - '\164', '\106', '\007', '\000', '\110', '\247', '\164', '\114', - '\007', '\000', '\116', '\007', '\165', '\122', '\107', '\165', - '\126', '\207', '\165', '\000', '\240', '\165', '\134', '\347', - '\165', '\140', '\047', '\166', '\047', '\022', '\003', '\067', - '\120', '\157', '\111', '\321', '\053', '\275', '\362', '\053', - '\147', '\067', '\023', '\323', '\102', '\167', '\310', '\062', - '\054', '\312', '\042', '\224', '\011', '\321', '\054', '\317', - '\022', '\055', '\104', '\131', '\054', '\164', '\007', - -}; - -static char name_6x13[] = "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"; -static char name_cursor[] = "cursor"; -static char name_5x7[] = "-misc-fixed-medium-r-normal--7-70-75-75-c-50-iso8859-1"; -static char name_5x8[] = "-misc-fixed-medium-r-normal--8-80-75-75-c-50-iso646.1991-irv"; - -const BuiltinFileRec builtin_files[] = { -"6x13.builtin", sizeof file_6x13, file_6x13, -"cursor.builtin", sizeof file_cursor, file_cursor, -"5x7.builtin", sizeof file_5x7, file_5x7, -"5x8.builtin", sizeof file_5x8, file_5x8, -}; - -const int builtin_files_count = sizeof (builtin_files) / sizeof (builtin_files[0]); - -const BuiltinDirRec builtin_dir[] = { -"6x13.builtin", name_6x13, -"cursor.builtin", name_cursor, -"5x7.builtin", name_5x7, -"5x8.builtin", name_5x8, -}; - -const int builtin_dir_count = sizeof (builtin_dir) / sizeof (builtin_dir[0]); - -static char alias_fixed[] = "fixed"; -static char alias_6x13[] = "6x13"; -static char alias_6x13_100[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1"; -static char alias_5x7[] = "5x7"; -static char alias_5x7_100[] = "-misc-fixed-medium-r-normal--7-50-100-100-c-50-iso8859-1"; -static char alias_5x8[] = "5x8"; -static char alias_5x8_75[] = "-misc-fixed-medium-r-normal--8-80-75-75-c-50-iso8859-1"; -static char alias_5x8_100[] = "-misc-fixed-medium-r-normal--8-60-100-100-c-50-iso8859-1"; - -const BuiltinAliasRec builtin_alias[] = { -alias_fixed, name_6x13, -alias_6x13, name_6x13, -alias_6x13_100, name_6x13, -alias_5x7, name_5x7, -alias_5x7_100, name_5x7, -alias_5x8, name_5x8, -alias_5x8_75, name_5x8, -alias_5x8_100, name_5x8, -}; - -const int builtin_alias_count = sizeof (builtin_alias) / sizeof (builtin_alias[0]); diff --git a/nx-X11/lib/font/builtins/fpe.c b/nx-X11/lib/font/builtins/fpe.c deleted file mode 100644 index 7f78fabbd..000000000 --- a/nx-X11/lib/font/builtins/fpe.c +++ /dev/null @@ -1,98 +0,0 @@ -/* $XdotOrg: xc/lib/font/builtins/fpe.c,v 1.5 2005/07/30 18:56:32 alanc Exp $ */ -/* - * Id: fpe.c,v 1.2 1999/11/02 06:16:48 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/fpe.c,v 1.3 1999/12/30 02:29:51 robin Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -static int font_file_type; - -const char builtin_fonts[] = "built-ins"; - -int -BuiltinNameCheck (name) - char *name; -{ - return (strcmp (name, builtin_fonts) == 0); -} - -int -BuiltinInitFPE (fpe) - FontPathElementPtr fpe; -{ - int status; - FontDirectoryPtr dir; - - status = BuiltinReadDirectory (fpe->name, &dir); - - if (status == Successful) - fpe->private = (pointer) dir; - return status; -} - -/* ARGSUSED */ -int -BuiltinResetFPE (fpe) - FontPathElementPtr fpe; -{ - FontDirectoryPtr dir; - - dir = (FontDirectoryPtr) fpe->private; - /* builtins can't change! */ - return Successful; -} - -int -BuiltinFreeFPE (fpe) - FontPathElementPtr fpe; -{ - FontFileFreeDir ((FontDirectoryPtr) fpe->private); - return Successful; -} - -void -BuiltinRegisterFpeFunctions(void) -{ - BuiltinRegisterFontFileFunctions (); - - font_file_type = RegisterFPEFunctions(BuiltinNameCheck, - BuiltinInitFPE, - BuiltinFreeFPE, - BuiltinResetFPE, - FontFileOpenFont, - FontFileCloseFont, - FontFileListFonts, - FontFileStartListFontsWithInfo, - FontFileListNextFontWithInfo, - (WakeupFpeFunc) 0, - (ClientDiedFunc) 0, - (LoadGlyphsFunc) 0, - (StartLaFunc) 0, - (NextLaFunc) 0, - (SetPathFunc) 0); -} diff --git a/nx-X11/lib/font/builtins/render.c b/nx-X11/lib/font/builtins/render.c deleted file mode 100644 index 520d873f4..000000000 --- a/nx-X11/lib/font/builtins/render.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $XdotOrg: xc/lib/font/builtins/render.c,v 1.5 2005/07/30 18:56:32 alanc Exp $ */ -/* - * Id: render.c,v 1.2 1999/11/02 06:16:48 keithp Exp $ - * - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ -/* $XFree86: xc/lib/font/builtins/render.c,v 1.3 1999/12/30 02:29:51 robin Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include "builtin.h" - -BuiltinOpenBitmap (fpe, ppFont, flags, entry, fileName, format, fmask) - FontPathElementPtr fpe; - FontPtr *ppFont; - int flags; - FontEntryPtr entry; - char *fileName; - fsBitmapFormat format; - fsBitmapFormatMask fmask; -{ - FontFilePtr file; - FontPtr pFont; - int i; - int ret; - int bit, - byte, - glyph, - scan, - image; - - file = BuiltinFileOpen (fileName); - if (!file) - return BadFontName; - pFont = (FontPtr) xalloc(sizeof(FontRec)); - if (!pFont) { - BuiltinFileClose (file); - return AllocError; - } - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - ret = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - - /* Fill in font record. Data format filled in by reader. */ - pFont->refcnt = 0; - pFont->maxPrivate = -1; - pFont->devPrivates = (pointer *) 0; - - ret = pcfReadFont (pFont, file, bit, byte, glyph, scan); - - BuiltinFileClose (file); - if (ret != Successful) - xfree(pFont); - else - *ppFont = pFont; - return ret; -} - -BuiltinGetInfoBitmap (fpe, pFontInfo, entry, fileName) - FontPathElementPtr fpe; - FontInfoPtr pFontInfo; - FontEntryPtr entry; - char *fileName; -{ - FontFilePtr file; - int i; - int ret; - FontRendererPtr renderer; - - file = BuiltinFileOpen (fileName); - if (!file) - return BadFontName; - ret = pcfReadFontInfo (pFontInfo, file); - BuiltinFileClose (file); - return ret; -} - -static FontRendererRec renderers[] = { - ".builtin", 8, - BuiltinOpenBitmap, 0, BuiltinGetInfoBitmap, 0, 0 -}; - -#define numRenderers (sizeof renderers / sizeof renderers[0]) - -void -BuiltinRegisterFontFileFunctions(void) -{ - int i; - for (i = 0; i < numRenderers; i++) - FontFileRegisterRenderer ((FontRendererRec *) &renderers[i]); -} - diff --git a/nx-X11/lib/font/fc/Imakefile b/nx-X11/lib/font/fc/Imakefile deleted file mode 100644 index d51151348..000000000 --- a/nx-X11/lib/font/fc/Imakefile +++ /dev/null @@ -1,31 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ -XCOMM -XCOMM Make file for font handling routines -XCOMM -XCOMM $XFree86: xc/lib/font/fc/Imakefile,v 1.4 1999/12/13 02:52:50 robin Exp $ -#include - - INCLUDES = -I$(FONTINCSRC) -I../include $(TRANS_INCLUDES) - HEADERS = - SRCS = fsconvert.c fserve.c fsio.c transport.c - OBJS = fsconvert.o fserve.o fsio.o transport.o - CONN_DEFINES = $(CONNECTION_FLAGS) -DFONT_t -DTRANS_CLIENT -DTRANS_SERVER -DTRANS_REOPEN -#if HasBSD44Sockets - SOCK_DEFINES = -DBSD44SOCKETS -#endif - DEFINES = $(SIGNAL_DEFINES) $(CONN_DEFINES) $(SOCK_DEFINES) - - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -LinkSourceFile(transport.c,$(TRANSCOMMSRC)) - -NormalLintTarget($(SRCS)) - -DependTarget() diff --git a/nx-X11/lib/font/fc/fsconvert.c b/nx-X11/lib/font/fc/fsconvert.c deleted file mode 100644 index afa2c3284..000000000 --- a/nx-X11/lib/font/fc/fsconvert.c +++ /dev/null @@ -1,774 +0,0 @@ -/* $Xorg: fsconvert.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be used - * in advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. Network Computing Devices - * makes no representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fsconvert.c,v 1.14 2003/08/30 18:06:29 dawes Exp $ */ -/* - * FS data conversion - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include "fservestr.h" -#include -#include "fslibos.h" - -extern char _fs_glyph_undefined; -extern char _fs_glyph_requested; -extern char _fs_glyph_zero_length; - - -/* - * converts data from font server form to X server form - */ - -void -_fs_convert_char_info(fsXCharInfo *src, xCharInfo *dst) -{ - dst->ascent = src->ascent; - dst->descent = src->descent; - dst->leftSideBearing = src->left; - dst->rightSideBearing = src->right; - dst->characterWidth = src->width; - dst->attributes = src->attributes; -} - -void -_fs_init_fontinfo(FSFpePtr conn, FontInfoPtr pfi) -{ - if (conn->fsMajorVersion == 1) { - unsigned short n; - n = pfi->firstCol; - pfi->firstCol = pfi->firstRow; - pfi->firstRow = n; - n = pfi->lastCol; - pfi->lastCol = pfi->lastRow; - pfi->lastRow = n; - pfi->defaultCh = ((pfi->defaultCh >> 8) & 0xff) - + ((pfi->defaultCh & 0xff) << 8); - } - - if (FontCouldBeTerminal (pfi)) - { - pfi->terminalFont = TRUE; - pfi->minbounds.ascent = pfi->fontAscent; - pfi->minbounds.descent = pfi->fontDescent; - pfi->minbounds.leftSideBearing = 0; - pfi->minbounds.rightSideBearing = pfi->minbounds.characterWidth; - pfi->maxbounds = pfi->minbounds; - } - - FontComputeInfoAccelerators (pfi); -} - -int -_fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd, - FontInfoPtr pfi) -{ - FontPropPtr dprop; - int i, - nprops; - char *is_str; - fsPropOffset local_off; - char *off_adr; - char *pdc = pd; - -/* stolen from server/include/resource.h */ -#define BAD_RESOURCE 0xe0000000 - - nprops = pfi->nprops = pi->num_offsets; - - if (nprops < 0 - || nprops > SIZE_MAX/(sizeof(FontPropRec) + sizeof(char))) - return -1; - - dprop = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops + - sizeof (char) * nprops); - if (!dprop) - return -1; - - is_str = (char *) (dprop + nprops); - pfi->props = dprop; - pfi->isStringProp = is_str; - - off_adr = (char *)po; - for (i = 0; i < nprops; i++, dprop++, is_str++) - { - memcpy(&local_off, off_adr, SIZEOF(fsPropOffset)); - if ((local_off.name.position >= pi->data_len) || - (local_off.name.length > - (pi->data_len - local_off.name.position))) - goto bail; - dprop->name = MakeAtom(&pdc[local_off.name.position], - local_off.name.length, 1); - if (local_off.type != PropTypeString) { - *is_str = FALSE; - dprop->value = local_off.value.position; - } else { - *is_str = TRUE; - if ((local_off.value.position >= pi->data_len) || - (local_off.value.length > - (pi->data_len - local_off.value.position))) - goto bail; - dprop->value = (INT32) MakeAtom(&pdc[local_off.value.position], - local_off.value.length, 1); - if (dprop->value == BAD_RESOURCE) - { - bail: - xfree (pfi->props); - pfi->nprops = 0; - pfi->props = 0; - pfi->isStringProp = 0; - return -1; - } - } - off_adr += SIZEOF(fsPropOffset); - } - - return nprops; -} - -void -_fs_free_props (FontInfoPtr pfi) -{ - if (pfi->props) - { - xfree (pfi->props); - pfi->nprops = 0; - pfi->props = 0; - } -} - -int -_fs_convert_lfwi_reply(FSFpePtr conn, FontInfoPtr pfi, - fsListFontsWithXInfoReply *fsrep, - fsPropInfo *pi, fsPropOffset *po, pointer pd) -{ - fsUnpack_XFontInfoHeader(fsrep, pfi); - _fs_init_fontinfo(conn, pfi); - - if (_fs_convert_props(pi, po, pd, pfi) == -1) - return AllocError; - - return Successful; -} - - -#define ENCODING_UNDEFINED(enc) \ - ((enc)->bits == &_fs_glyph_undefined ? \ - TRUE : \ - (access_done = access_done && (enc)->bits != &_fs_glyph_requested, \ - FALSE)) - -#define GLYPH_UNDEFINED(loc) ENCODING_UNDEFINED(encoding + (loc)) - -/* - * figures out what glyphs to request - * - * Includes logic to attempt to reduce number of round trips to the font - * server: when a glyph is requested, fs_build_range() requests a - * 16-glyph range of glyphs that contains the requested glyph. This is - * predicated on the belief that using a glyph increases the chances - * that nearby glyphs will be used: a good assumption for phonetic - * alphabets, but a questionable one for ideographic/pictographic ones. - */ -/* ARGSUSED */ -int -fs_build_range(FontPtr pfont, Bool range_flag, unsigned int count, - int item_size, unsigned char *data, int *nranges, - fsRange **ranges) -{ - FSFontDataPtr fsd = (FSFontDataPtr) (pfont->fpePrivate); - FSFontPtr fsfont = (FSFontPtr) (pfont->fontPrivate); - register CharInfoPtr encoding = fsfont->encoding; - FontInfoPtr pfi = &(pfont->info); - fsRange range; - int access_done = TRUE; - int err; - register unsigned long firstrow, lastrow, firstcol, lastcol; - register unsigned long row; - register unsigned long col; - register unsigned long loc; - - if (!fsd->glyphs_to_get) - return AccessDone; - - firstrow = pfi->firstRow; - lastrow = pfi->lastRow; - firstcol = pfi->firstCol; - lastcol = pfi->lastCol; - - /* Make sure we have default char */ - if (fsfont->pDefault && ENCODING_UNDEFINED(fsfont->pDefault)) - { - loc = fsfont->pDefault - encoding; - row = loc / (lastcol - firstcol + 1) + firstrow; - col = loc % (lastcol - firstcol + 1) + firstcol; - - range.min_char_low = range.max_char_low = col; - range.min_char_high = range.max_char_high = row; - - if ((err = add_range(&range, nranges, ranges, FALSE)) != - Successful) return err; - encoding[loc].bits = &_fs_glyph_requested; - access_done = FALSE; - } - - if (!range_flag && item_size == 1) - { - if (firstrow != 0) return AccessDone; - while (count--) - { - col = *data++; - if (col >= firstcol && col <= lastcol && - GLYPH_UNDEFINED(col - firstcol)) - { - int col1, col2; - col1 = col & 0xf0; - col2 = col1 + 15; - if (col1 < firstcol) col1 = firstcol; - if (col2 > lastcol) col2 = lastcol; - /* Collect a 16-glyph neighborhood containing the requested - glyph... should in most cases reduce the number of round - trips to the font server. */ - for (col = col1; col <= col2; col++) - { - if (!GLYPH_UNDEFINED(col - firstcol)) continue; - range.min_char_low = range.max_char_low = col; - range.min_char_high = range.max_char_high = 0; - if ((err = add_range(&range, nranges, ranges, FALSE)) != - Successful) return err; - encoding[col - firstcol].bits = &_fs_glyph_requested; - access_done = FALSE; - } - } - } - } - else - { - fsRange fullrange[1]; - - if (range_flag && count == 0) - { - count = 2; - data = (unsigned char *)fullrange; - fullrange[0].min_char_high = firstrow; - fullrange[0].min_char_low = firstcol; - fullrange[0].max_char_high = lastrow; - fullrange[0].max_char_low = lastcol; - } - - while (count--) - { - int row1, col1, row2, col2; - row1 = row2 = *data++; - col1 = col2 = *data++; - if (range_flag) - { - if (count) - { - row2 = *data++; - col2 = *data++; - count--; - } - else - { - row2 = lastrow; - col2 = lastcol; - } - if (row1 < firstrow) row1 = firstrow; - if (row2 > lastrow) row2 = lastrow; - if (col1 < firstcol) col1 = firstcol; - if (col2 > lastcol) col2 = lastcol; - } - else - { - if (row1 < firstrow || row1 > lastrow || - col1 < firstcol || col1 > lastcol) - continue; - } - for (row = row1; row <= row2; row++) - { - expand_glyph_range: ; - loc = (row - firstrow) * (lastcol + 1 - firstcol) + - (col1 - firstcol); - for (col = col1; col <= col2; col++, loc++) - { - if (GLYPH_UNDEFINED(loc)) - { - if (row1 == row2 && - (((col1 & 0xf) && col1 > firstcol) || - (col2 & 0xf) != 0xf) && (col2 < lastcol)) - { - /* If we're loading from a single row, expand - range of glyphs loaded to a multiple of - a 16-glyph range -- attempt to reduce number - of round trips to the font server. */ - col1 &= 0xf0; - col2 = (col2 & 0xf0) + 15; - if (col1 < firstcol) col1 = firstcol; - if (col2 > lastcol) col2 = lastcol; - goto expand_glyph_range; - } - range.min_char_low = range.max_char_low = col; - range.min_char_high = range.max_char_high = row; - if ((err = add_range(&range, nranges, ranges, FALSE)) != - Successful) return err; - encoding[loc].bits = &_fs_glyph_requested; - access_done = FALSE; - } - } - } - } - } - - return access_done ? - AccessDone : - Successful; -} - -#undef GLYPH_UNDEFINED -#undef ENCODING_UNDEFINED - - -/* _fs_clean_aborted_loadglyphs(): Undoes the changes to the encoding array - performed by fs_build_range(); for use if the associated LoadGlyphs - requests needs to be cancelled. */ - -void -_fs_clean_aborted_loadglyphs(FontPtr pfont, int num_expected_ranges, - fsRange *expected_ranges) -{ - register FSFontPtr fsfont; - register int i; - - fsfont = (FSFontPtr) pfont->fontPrivate; - if (fsfont->encoding) - { - fsRange full_range[1]; - if (!num_expected_ranges) - { - full_range[0].min_char_low = pfont->info.firstCol; - full_range[0].min_char_high = pfont->info.firstRow; - full_range[0].max_char_low = pfont->info.lastCol; - full_range[0].max_char_high = pfont->info.lastRow; - num_expected_ranges = 1; - expected_ranges = full_range; - } - - for (i = 0; i < num_expected_ranges; i++) - { - int row, col; - for (row = expected_ranges[i].min_char_high; - row <= expected_ranges[i].max_char_high; - row++) - { - register CharInfoPtr encoding = fsfont->encoding + - ((row - pfont->info.firstRow) * - (pfont->info.lastCol - - pfont->info.firstCol + 1) + - expected_ranges[i].min_char_low - - pfont->info.firstCol); - for (col = expected_ranges[i].min_char_low; - col <= expected_ranges[i].max_char_low; - encoding++, col++) - { - if (encoding->bits == &_fs_glyph_requested) - encoding->bits = &_fs_glyph_undefined; - } - } - } - } -} - - -/* - * figures out what extents to request - * this is where lots of extra - * smarts wants to live - */ -/* ARGSUSED */ -int -_fs_check_extents(FontPtr pfont, Mask flags, int nranges, fsRange *range, - FSBlockDataPtr blockrec) -{ -/* XXX -- either fill in the requested info if we have it somewhere - * and return AccessDone, or else return Successful - */ - return Successful; -} - -/* - * figures out what glyphs to request - * this is where lots of extra - * smarts wants to live - */ -/* ARGSUSED */ -int -_fs_check_bitmaps(FontPtr pfont, fsBitmapFormat format, - Mask flags, int nranges, fsRange *range, - FSBlockDataPtr blockrec) -{ -/* XXX -- either fill in the requested info if we have it somewhere - * and return AccessDone, or else return Successful - */ - return Successful; -} - -int -_fs_get_glyphs(FontPtr pFont, unsigned long count, unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - FSFontPtr fsdata; - unsigned int firstCol; - register unsigned int numCols; - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr encoding; - CharInfoPtr pDefault; - FSFontDataPtr fsd = (FSFontDataPtr) pFont->fpePrivate; - int err = Successful; - - fsdata = (FSFontPtr) pFont->fontPrivate; - encoding = fsdata->encoding; - pDefault = fsdata->pDefault; - firstCol = pFont->info.firstCol; - numCols = pFont->info.lastCol - firstCol + 1; - glyphsBase = glyphs; - - /* In this age of glyph caching, any glyphs gotten through this - procedure should already be loaded. If they are not, we are - dealing with someone (perhaps a ddx driver optimizing a font) - that doesn't understand the finer points of glyph caching. The - CHECK_ENCODING macro checks for this condition... if found, it - calls fs_load_all_glyphs(), which corrects it. Since the caller - of this code will not know how to handle a return value of - Suspended, the fs_load_all_glyphs() procedure will block and - freeze the server until the load operation is done. Moral: the - glyphCachingMode flag really must indicate the capabilities of - the ddx drivers. */ - -#define CHECK_ENCODING(cnum) \ - ( pci = encoding + (cnum), \ - fsd->glyphs_to_get ? \ - ( pci->bits == &_fs_glyph_undefined || pci->bits == &_fs_glyph_requested ? \ - ((err = fs_load_all_glyphs(pFont)), pci) : \ - pci ) : \ - pci ) - - switch (charEncoding) { - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - if (pFont->info.allExist && pDefault) { - while (err == Successful && count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = CHECK_ENCODING(c); - else - *glyphs++ = pDefault; - } - } else { - while (err == Successful && count--) { - c = (*chars++) - firstCol; - if (c < numCols && CHECK_ENCODING(c)->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - case Linear16Bit: - if (pFont->info.allExist && pDefault) { - while (err == Successful && count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = CHECK_ENCODING(c); - else - *glyphs++ = pDefault; - } - } else { - while (err == Successful && count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols && CHECK_ENCODING(c)->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (err == Successful && count--) { - r = (*chars++) - firstRow; - c = (*chars++) - firstCol; - if (r < numRows && c < numCols && - CHECK_ENCODING(r * numCols + c)->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return err; -} - - -static int -_fs_get_metrics(FontPtr pFont, unsigned long count, unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - FSFontPtr fsdata; - unsigned int firstCol; - register unsigned int numCols; - unsigned int firstRow; - unsigned int numRows; - xCharInfo **glyphsBase; - register unsigned int c; - unsigned int r; - CharInfoPtr encoding; - CharInfoPtr pDefault; - - fsdata = (FSFontPtr) pFont->fontPrivate; - encoding = fsdata->inkMetrics; - pDefault = fsdata->pDefault; - /* convert default bitmap metric to default ink metric */ - if (pDefault) - pDefault = encoding + (pDefault - fsdata->encoding); - firstCol = pFont->info.firstCol; - numCols = pFont->info.lastCol - firstCol + 1; - glyphsBase = glyphs; - - - /* XXX - this should be much smarter */ - /* make sure the glyphs are there */ - switch (charEncoding) { - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - if (pFont->info.allExist && pDefault) { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = (xCharInfo *)&encoding[c]; - else - *glyphs++ = (xCharInfo *)pDefault; - } - } else { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = (xCharInfo *)(encoding + c); - else if (pDefault) - *glyphs++ = (xCharInfo *)pDefault; - } - } - break; - case Linear16Bit: - if (pFont->info.allExist && pDefault) { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = (xCharInfo *)(encoding + c); - else - *glyphs++ = (xCharInfo *)pDefault; - } - } else { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = (xCharInfo *)(encoding + c); - else if (pDefault) - *glyphs++ = (xCharInfo *)pDefault; - } - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++) - firstCol; - if (r < numRows && c < numCols) - *glyphs++ = (xCharInfo *)(encoding + (r * numCols + c)); - else if (pDefault) - *glyphs++ = (xCharInfo *)pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; -} - - -void -_fs_unload_font(FontPtr pfont) -{ - FSFontPtr fsdata = (FSFontPtr) pfont->fontPrivate; - FSFontDataPtr fsd = (FSFontDataPtr) pfont->fpePrivate; - CharInfoPtr encoding = fsdata->encoding; - FSGlyphPtr glyphs; - - /* - * fsdata points at FSFontRec, FSFontDataRec and name - */ - if (encoding) - xfree(encoding); - - while ((glyphs = fsdata->glyphs)) - { - fsdata->glyphs = glyphs->next; - xfree (glyphs); - } - - /* XXX we may get called after the resource DB has been cleaned out */ - if (find_old_font(fsd->fontid)) - DeleteFontClientID (fsd->fontid); - - _fs_free_props (&pfont->info); - - xfree(fsdata); - - DestroyFontRec(pfont); -} - -FontPtr -fs_create_font (FontPathElementPtr fpe, - char *name, - int namelen, - fsBitmapFormat format, - fsBitmapFormatMask fmask) -{ - FontPtr pfont; - FSFontPtr fsfont; - FSFontDataPtr fsd; - int bit, byte, scan, glyph; - - pfont = CreateFontRec (); - if (!pfont) - return 0; - fsfont = (FSFontPtr) xalloc (sizeof (FSFontRec) + - sizeof (FSFontDataRec) + - namelen + 1); - if (!fsfont) - { - DestroyFontRec (pfont); - return 0; - } - fsd = (FSFontDataPtr) (fsfont + 1); - bzero((char *) fsfont, sizeof(FSFontRec)); - bzero((char *) fsd, sizeof(FSFontDataRec)); - - pfont->fpe = fpe; - pfont->fontPrivate = (pointer) fsfont; - pfont->fpePrivate = (pointer) fsd; - - /* These font components will be needed in packGlyphs */ - CheckFSFormat(format, BitmapFormatMaskBit | - BitmapFormatMaskByte | - BitmapFormatMaskScanLineUnit | - BitmapFormatMaskScanLinePad, - &bit, - &byte, - &scan, - &glyph, - NULL); - pfont->format = format; - pfont->bit = bit; - pfont->byte = byte; - pfont->scan = scan; - pfont->glyph = glyph; - - pfont->info.nprops = 0; - pfont->info.props = 0; - pfont->info.isStringProp = 0; - - /* set font function pointers */ - pfont->get_glyphs = _fs_get_glyphs; - pfont->get_metrics = _fs_get_metrics; - pfont->unload_font = _fs_unload_font; - pfont->unload_glyphs = NULL; - - /* set the FPE private information */ - fsd->format = format; - fsd->fmask = fmask; - fsd->name = (char *) (fsd + 1); - memcpy (fsd->name, name, namelen); - fsd->name[namelen] = '\0'; - fsd->fontid = GetNewFontClientID (); - - /* save the ID */ - if (!StoreFontClientFont(pfont, fsd->fontid)) - { - xfree (fsfont); - DestroyFontRec (pfont); - return 0; - } - - return pfont; -} - -pointer -fs_alloc_glyphs (FontPtr pFont, int size) -{ - FSGlyphPtr glyphs; - FSFontPtr fsfont = (FSFontPtr) pFont->fontPrivate; - - if (size < (INT_MAX - sizeof (FSGlyphRec))) - glyphs = xalloc (sizeof (FSGlyphRec) + size); - else - glyphs = NULL; - if (glyphs == NULL) - return NULL; - glyphs->next = fsfont->glyphs; - fsfont->glyphs = glyphs; - return (pointer) (glyphs + 1); -} diff --git a/nx-X11/lib/font/fc/fserve.c b/nx-X11/lib/font/fc/fserve.c deleted file mode 100644 index 6bbb8c2a0..000000000 --- a/nx-X11/lib/font/fc/fserve.c +++ /dev/null @@ -1,3480 +0,0 @@ -/* $XdotOrg: xc/lib/font/fc/fserve.c,v 1.8 2005/07/09 06:36:12 keithp Exp $ */ -/* $Xorg: fserve.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fc/fserve.c,v 3.26tsi Exp $ */ - -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices, or Digital - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES, AND DIGITAL AND DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, - * OR 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* - * font server specific font access - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#define _WILLWINSOCK_ -#endif -#define FONT_t -#define TRANS_CLIENT -#include "X11/Xtrans/Xtrans.h" -#include "X11/Xpoll.h" -#include -#include -#include -#include -#include -#include -#include "fservestr.h" -#include -#include -#include - -#include -#define Time_t time_t - -#ifdef NCD -#include -#endif - -#include - -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif -#define TimeCmp(a,c,b) ((int) ((a) - (b)) c 0) - -#define NONZEROMETRICS(pci) ((pci)->leftSideBearing || \ - (pci)->rightSideBearing || \ - (pci)->ascent || \ - (pci)->descent || \ - (pci)->characterWidth) - -/* - * SIZEOF(r) is in bytes, length fields in the protocol are in 32-bit words, - * so this converts for doing size comparisons. - */ -#define LENGTHOF(r) (SIZEOF(r) >> 2) - -/* Somewhat arbitrary limit on maximum reply size we'll try to read. */ -#define MAX_REPLY_LENGTH ((64 * 1024 * 1024) >> 2) - -extern void ErrorF(const char *f, ...); - -static int fs_read_glyphs ( FontPathElementPtr fpe, FSBlockDataPtr blockrec ); -static int fs_read_list ( FontPathElementPtr fpe, FSBlockDataPtr blockrec ); -static int fs_read_list_info ( FontPathElementPtr fpe, - FSBlockDataPtr blockrec ); - -extern fd_set _fs_fd_mask; - -static void fs_block_handler ( pointer data, OSTimePtr wt, - pointer LastSelectMask ); -static int fs_wakeup ( FontPathElementPtr fpe, unsigned long *mask ); - -/* - * List of all FPEs - */ -static FSFpePtr fs_fpes; -/* - * Union of all FPE blockStates - */ -static CARD32 fs_blockState; - -static int _fs_restart_connection ( FSFpePtr conn ); -static void fs_send_query_bitmaps ( FontPathElementPtr fpe, - FSBlockDataPtr blockrec ); -static int fs_send_close_font ( FontPathElementPtr fpe, Font id ); -static void fs_client_died ( pointer client, FontPathElementPtr fpe ); -static void _fs_client_access ( FSFpePtr conn, pointer client, Bool sync ); -static void _fs_client_resolution ( FSFpePtr conn ); -static fsGenericReply *fs_get_reply (FSFpePtr conn, int *error); -static int fs_await_reply (FSFpePtr conn); -static void _fs_do_blocked (FSFpePtr conn); -static void fs_cleanup_bfont (FSBlockedFontPtr bfont); - -char _fs_glyph_undefined; -char _fs_glyph_requested; -char _fs_glyph_zero_length; - -static int generationCount; - -int FontServerRequestTimeout = 30 * 1000; - -static void -_fs_close_server (FSFpePtr conn); - -static FSFpePtr -_fs_init_conn (char *servername); - -static int -_fs_wait_connect (FSFpePtr conn); - -static int -_fs_send_init_packets (FSFpePtr conn); - -static void -_fs_check_reconnect (FSFpePtr conn); - -static void -_fs_start_reconnect (FSFpePtr conn); - -static void -_fs_free_conn (FSFpePtr conn); - -static int -fs_free_fpe(FontPathElementPtr fpe); - -/* - * Font server access - * - * the basic idea for the non-blocking access is to have the function - * called multiple times until the actual data is returned, instead - * of ClientBlocked. - * - * the first call to the function will cause the request to be sent to - * the font server, and a block record to be stored in the fpe's list - * of outstanding requests. the FS block handler also sticks the - * proper set of fd's into the select mask. when data is ready to be - * read in, the FS wakup handler will be hit. this will read the - * data off the wire into the proper block record, and then signal the - * client that caused the block so that it can restart. it will then - * call the access function again, which will realize that the data has - * arrived and return it. - */ - - -#ifdef DEBUG -static void -_fs_add_req_log(FSFpePtr conn, int opcode) -{ - conn->current_seq++; - fprintf (stderr, "\t\tRequest: %5d Opcode: %2d\n", - conn->current_seq, opcode); - conn->reqbuffer[conn->reqindex].opcode = opcode; - conn->reqbuffer[conn->reqindex].sequence = conn->current_seq; - conn->reqindex++; - if (conn->reqindex == REQUEST_LOG_SIZE) - conn->reqindex = 0; -} - -static void -_fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep) -{ - int i; - - for (i = 0; i < REQUEST_LOG_SIZE; i++) - if (conn->reqbuffer[i].sequence == rep->sequenceNumber) - break; - if (i == REQUEST_LOG_SIZE) - fprintf (stderr, "\t\t\t\t\tReply: %5d Opcode: unknown\n", - rep->sequenceNumber); - else - fprintf (stderr, "\t\t\t\t\tReply: %5d Opcode: %d\n", - rep->sequenceNumber, - conn->reqbuffer[i].opcode); -} - -#define _fs_reply_failed(rep, name, op) do { \ - if (rep) { \ - if (rep->type == FS_Error) \ - fprintf (stderr, "Error: %d Request: %s\n", \ - ((fsError *)rep)->request, #name); \ - else \ - fprintf (stderr, "Bad Length for %s Reply: %d %s %d\n", \ - #name, rep->length, op, LENGTHOF(name)); \ - } \ -} while (0) - -#else -#define _fs_add_req_log(conn,op) ((conn)->current_seq++) -#define _fs_add_rep_log(conn,rep) -#define _fs_reply_failed(rep,name,op) -#endif - -static Bool -fs_name_check(char *name) -{ -#ifdef __UNIXOS2__ - /* OS/2 uses D:/usr/X11R6/.... as fontfile pathnames, so check that - * there is not only a protocol/ prefix, but also that the first chars - * are not a drive letter - */ - if (name && isalpha(*name) && name[1] == ':') - return FALSE; -#endif - /* Just make sure there is a protocol/ prefix */ - return (name && *name != '/' && strchr(name, '/')); -} - -static void -_fs_client_resolution(FSFpePtr conn) -{ - fsSetResolutionReq srreq; - int num_res; - FontResolutionPtr res; - - res = GetClientResolutions(&num_res); - - if (num_res) { - srreq.reqType = FS_SetResolution; - srreq.num_resolutions = num_res; - srreq.length = (SIZEOF(fsSetResolutionReq) + - (num_res * SIZEOF(fsResolution)) + 3) >> 2; - - _fs_add_req_log(conn, FS_SetResolution); - if (_fs_write(conn, (char *) &srreq, SIZEOF(fsSetResolutionReq)) != -1) - (void)_fs_write_pad(conn, (char *) res, - (num_res * SIZEOF(fsResolution))); - } -} - -/* - * close font server and remove any state associated with - * this connection - this includes any client records. - */ - -static void -fs_close_conn(FSFpePtr conn) -{ - FSClientPtr client, nclient; - - _fs_close_server (conn); - - for (client = conn->clients; client; client = nclient) - { - nclient = client->next; - xfree (client); - } - conn->clients = NULL; -} - -/* - * the wakeup handlers have to be set when the FPE is open, and not - * removed until it is freed, in order to handle unexpected data, like - * events - */ -/* ARGSUSED */ -static int -fs_init_fpe(FontPathElementPtr fpe) -{ - FSFpePtr conn; - char *name; - int err; - int ret; - - /* open font server */ - /* create FS specific fpe info */ - name = fpe->name; - - /* hack for old style names */ - if (*name == ':') - name++; /* skip ':' */ - - conn = _fs_init_conn (name); - if (!conn) - err = AllocError; - else - { - err = init_fs_handlers (fpe, fs_block_handler); - if (err != Successful) - { - _fs_free_conn (conn); - err = AllocError; - } - else - { - fpe->private = conn; - conn->next = fs_fpes; - fs_fpes = conn; - ret = _fs_wait_connect (conn); - if (ret != FSIO_READY) - { - fs_free_fpe (fpe); - err = BadFontPath; - } - else - err = Successful; - } - } - - if (err == Successful) - { -#ifdef NCD - if (configData.ExtendedFontDiags) - printf("Connected to font server \"%s\"\n", name); -#endif -#ifdef DEBUG - fprintf (stderr, "connected to FS \"%s\"\n", name); -#endif - } - else - { -#ifdef DEBUG - fprintf(stderr, "failed to connect to FS \"%s\" %d\n", name, err); -#endif -#ifdef NCD - if (configData.ExtendedFontDiags) - printf("Failed to connect to font server \"%s\"\n", name); -#endif - ; - } - return err; -} - -static int -fs_reset_fpe(FontPathElementPtr fpe) -{ - (void) _fs_send_init_packets((FSFpePtr) fpe->private); - return Successful; -} - -/* - * this shouldn't be called till all refs to the FPE are gone - */ - -static int -fs_free_fpe(FontPathElementPtr fpe) -{ - FSFpePtr conn = (FSFpePtr) fpe->private, *prev; - - /* unhook from chain of all font servers */ - for (prev = &fs_fpes; *prev; prev = &(*prev)->next) - { - if (*prev == conn) - { - *prev = conn->next; - break; - } - } - _fs_unmark_block (conn, conn->blockState); - fs_close_conn(conn); - remove_fs_handlers(fpe, fs_block_handler, fs_fpes == 0); - _fs_free_conn (conn); - fpe->private = (pointer) 0; - -#ifdef NCD - if (configData.ExtendedFontDiags) - printf("Disconnected from font server \"%s\"\n", fpe->name); -#endif -#ifdef DEBUG - fprintf (stderr, "disconnect from FS \"%s\"\n", fpe->name); -#endif - - return Successful; -} - -static FSBlockDataPtr -fs_new_block_rec(FontPathElementPtr fpe, pointer client, int type) -{ - FSBlockDataPtr blockrec, - *prev; - FSFpePtr conn = (FSFpePtr) fpe->private; - int size; - - switch (type) { - case FS_OPEN_FONT: - size = sizeof(FSBlockedFontRec); - break; - case FS_LOAD_GLYPHS: - size = sizeof(FSBlockedGlyphRec); - break; - case FS_LIST_FONTS: - size = sizeof(FSBlockedListRec); - break; - case FS_LIST_WITH_INFO: - size = sizeof(FSBlockedListInfoRec); - break; - default: - size = 0; - break; - } - blockrec = (FSBlockDataPtr) xalloc(sizeof(FSBlockDataRec) + size); - if (!blockrec) - return (FSBlockDataPtr) 0; - blockrec->data = (pointer) (blockrec + 1); - blockrec->client = client; - blockrec->sequenceNumber = -1; - blockrec->errcode = StillWorking; - blockrec->type = type; - blockrec->depending = 0; - blockrec->next = (FSBlockDataPtr) 0; - - /* stick it on the end of the list (since its expected last) */ - for (prev = &conn->blockedRequests; *prev; prev = &(*prev)->next) - ; - *prev = blockrec; - - return blockrec; -} - -static void -_fs_set_pending_reply (FSFpePtr conn) -{ - FSBlockDataPtr blockrec; - - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - if (blockrec->errcode == StillWorking) - break; - if (blockrec) - { - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - _fs_mark_block (conn, FS_PENDING_REPLY); - } - else - _fs_unmark_block (conn, FS_PENDING_REPLY); -} - -static void -_fs_remove_block_rec(FSFpePtr conn, FSBlockDataPtr blockrec) -{ - FSBlockDataPtr *prev; - - for (prev = &conn->blockedRequests; *prev; prev = &(*prev)->next) - if (*prev == blockrec) - { - *prev = blockrec->next; - break; - } - if (blockrec->type == FS_LOAD_GLYPHS) - { - FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr)blockrec->data; - if (bglyph->num_expected_ranges) - xfree(bglyph->expected_ranges); - } - xfree(blockrec); - _fs_set_pending_reply (conn); -} - -static void -_fs_signal_clients_depending(FSClientsDependingPtr *clients_depending) -{ - FSClientsDependingPtr p; - - while ((p = *clients_depending)) - { - *clients_depending = p->next; - ClientSignal(p->client); - xfree(p); - } -} - -static int -_fs_add_clients_depending(FSClientsDependingPtr *clients_depending, pointer client) -{ - FSClientsDependingPtr new, cd; - - for (; (cd = *clients_depending); - clients_depending = &(*clients_depending)->next) - { - if (cd->client == client) - return Suspended; - } - - new = (FSClientsDependingPtr)xalloc (sizeof (FSClientsDependingRec)); - if (!new) - return BadAlloc; - - new->client = client; - new->next = 0; - *clients_depending = new; - return Suspended; -} - -/* - * When a request is aborted due to a font server failure, - * signal any depending clients to restart their dependant - * requests - */ -static void -_fs_clean_aborted_blockrec(FSFpePtr conn, FSBlockDataPtr blockrec) -{ - switch(blockrec->type) { - case FS_OPEN_FONT: { - FSBlockedFontPtr bfont = (FSBlockedFontPtr)blockrec->data; - - fs_cleanup_bfont (bfont); - _fs_signal_clients_depending(&bfont->clients_depending); - break; - } - case FS_LOAD_GLYPHS: { - FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr)blockrec->data; - - _fs_clean_aborted_loadglyphs(bglyph->pfont, - bglyph->num_expected_ranges, - bglyph->expected_ranges); - _fs_signal_clients_depending(&bglyph->clients_depending); - break; - } - case FS_LIST_FONTS: - break; - case FS_LIST_WITH_INFO: { - FSBlockedListInfoPtr binfo; - binfo = (FSBlockedListInfoPtr) blockrec->data; - if (binfo->status == FS_LFWI_REPLY) - FD_SET(conn->fs_fd, &_fs_fd_mask); - _fs_free_props (&binfo->info); - } - default: - break; - } -} - -static void -fs_abort_blockrec(FSFpePtr conn, FSBlockDataPtr blockrec) -{ - _fs_clean_aborted_blockrec (conn, blockrec); - _fs_remove_block_rec (conn, blockrec); -} - -/* - * Tell the font server we've failed to complete an open and - * then unload the partially created font - */ -static void -fs_cleanup_bfont (FSBlockedFontPtr bfont) -{ - FSFontDataRec *fsd; - - if (bfont->pfont) - { - fsd = (FSFontDataRec *) bfont->pfont->fpePrivate; - - /* make sure the FS knows we choked on it */ - fs_send_close_font(bfont->pfont->fpe, bfont->fontid); - - /* - * Either unload the font if it's being opened for - * the first time, or smash the generation field to - * mark this font as an orphan - */ - if (!(bfont->flags & FontReopen)) - { - if (bfont->freeFont) - (*bfont->pfont->unload_font) (bfont->pfont); -#ifdef DEBUG - else - fprintf (stderr, "Not freeing other font in cleanup_bfont\n"); -#endif - bfont->pfont = 0; - } - else - fsd->generation = -1; - } -} - -/* - * Check to see if a complete reply is waiting - */ -static fsGenericReply * -fs_get_reply (FSFpePtr conn, int *error) -{ - char *buf; - fsGenericReply *rep; - int ret; - - /* block if the connection is down or paused in lfwi */ - if (conn->fs_fd == -1 || !FD_ISSET (conn->fs_fd, &_fs_fd_mask)) - { - *error = FSIO_BLOCK; - return 0; - } - - ret = _fs_start_read (conn, sizeof (fsGenericReply), &buf); - if (ret != FSIO_READY) - { - *error = FSIO_BLOCK; - return 0; - } - - rep = (fsGenericReply *) buf; - - /* - * Refuse to accept replies longer than a maximum reasonable length, - * before we pass to _fs_start_read, since it will try to resize the - * incoming connection buffer to this size. Also avoids integer overflow - * on 32-bit systems. - */ - if (rep->length > MAX_REPLY_LENGTH) - { - ErrorF("fserve: reply length %d > MAX_REPLY_LENGTH, disconnecting" - " from font server\n", rep->length); - _fs_connection_died (conn); - *error = FSIO_ERROR; - return 0; - } - - ret = _fs_start_read (conn, rep->length << 2, &buf); - if (ret != FSIO_READY) - { - *error = FSIO_BLOCK; - return 0; - } - - *error = FSIO_READY; - - return (fsGenericReply *) buf; -} - -static Bool -fs_reply_ready (FSFpePtr conn) -{ - fsGenericReply *rep; - - if (conn->fs_fd == -1 || !FD_ISSET (conn->fs_fd, &_fs_fd_mask)) - return FALSE; - if (fs_data_read (conn) < sizeof (fsGenericReply)) - return FALSE; - rep = (fsGenericReply *) (conn->inBuf.buf + conn->inBuf.remove); - if (fs_data_read (conn) < rep->length << 2) - return FALSE; - return TRUE; -} - -static void -_fs_pending_reply (FSFpePtr conn) -{ - if (!(conn->blockState & FS_PENDING_REPLY)) - { - _fs_mark_block (conn, FS_PENDING_REPLY); - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - } -} - -static void -_fs_prepare_for_reply (FSFpePtr conn) -{ - _fs_pending_reply (conn); - _fs_flush (conn); -} - -/* - * Block (for a while) awaiting a complete reply - */ -static int -fs_await_reply (FSFpePtr conn) -{ - int ret; - - if (conn->blockState & FS_COMPLETE_REPLY) - return FSIO_READY; - - while (!fs_get_reply (conn, &ret)) - { - if (ret != FSIO_BLOCK) - return ret; - if (_fs_wait_for_readable (conn, FontServerRequestTimeout) != FSIO_READY) - { - _fs_connection_died (conn); - return FSIO_ERROR; - } - } - return FSIO_READY; -} - -/* - * Process the reply to an OpenBitmapFont request - */ -static int -fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - fsOpenBitmapFontReply *rep; - FSBlockDataPtr blockOrig; - FSBlockedFontPtr origBfont; - int ret; - - rep = (fsOpenBitmapFontReply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - (rep->length != LENGTHOF(fsOpenBitmapFontReply))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - if (rep) - _fs_done_read (conn, rep->length << 2); - fs_cleanup_bfont (bfont); - _fs_reply_failed (rep, fsOpenBitmapFontReply, "!="); - return BadFontName; - } - - /* If we're not reopening a font and FS detected a duplicate font - open request, replace our reference to the new font with a - reference to an existing font (possibly one not finished - opening). If this is a reopen, keep the new font reference... - it's got the metrics and extents we read when the font was opened - before. This also gives us the freedom to easily close the font - if we we decide (in fs_read_query_info()) that we don't like what - we got. */ - - if (rep->otherid && !(bfont->flags & FontReopen)) - { - fs_cleanup_bfont (bfont); - - /* Find old font if we're completely done getting it from server. */ - bfont->pfont = find_old_font(rep->otherid); - bfont->freeFont = FALSE; - bfont->fontid = rep->otherid; - bfont->state = FS_DONE_REPLY; - /* - * look for a blocked request to open the same font - */ - for (blockOrig = conn->blockedRequests; - blockOrig; - blockOrig = blockOrig->next) - { - if (blockOrig != blockrec && blockOrig->type == FS_OPEN_FONT) - { - origBfont = (FSBlockedFontPtr) blockOrig->data; - if (origBfont->fontid == rep->otherid) - { - blockrec->depending = blockOrig->depending; - blockOrig->depending = blockrec; - bfont->state = FS_DEPENDING; - bfont->pfont = origBfont->pfont; - break; - } - } - } - if (bfont->pfont == NULL) - { - /* XXX - something nasty happened */ - ret = BadFontName; - } - else - ret = AccessDone; - } - else - { - bfont->pfont->info.cachable = rep->cachable != 0; - bfont->state = FS_INFO_REPLY; - /* - * Reset the blockrec for the next reply - */ - blockrec->sequenceNumber = bfont->queryInfoSequence; - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - ret = StillWorking; - } - _fs_done_read (conn, rep->length << 2); - return ret; -} - -static Bool -fs_fonts_match (FontInfoPtr pInfo1, FontInfoPtr pInfo2) -{ - int i; - - if (pInfo1->firstCol != pInfo2->firstCol || - pInfo1->lastCol != pInfo2->lastCol || - pInfo1->firstRow != pInfo2->firstRow || - pInfo1->lastRow != pInfo2->lastRow || - pInfo1->defaultCh != pInfo2->defaultCh || - pInfo1->noOverlap != pInfo2->noOverlap || - pInfo1->terminalFont != pInfo2->terminalFont || - pInfo1->constantMetrics != pInfo2->constantMetrics || - pInfo1->constantWidth != pInfo2->constantWidth || - pInfo1->inkInside != pInfo2->inkInside || - pInfo1->inkMetrics != pInfo2->inkMetrics || - pInfo1->allExist != pInfo2->allExist || - pInfo1->drawDirection != pInfo2->drawDirection || - pInfo1->cachable != pInfo2->cachable || - pInfo1->anamorphic != pInfo2->anamorphic || - pInfo1->maxOverlap != pInfo2->maxOverlap || - pInfo1->fontAscent != pInfo2->fontAscent || - pInfo1->fontDescent != pInfo2->fontDescent || - pInfo1->nprops != pInfo2->nprops) - return FALSE; - -#define MATCH(xci1, xci2) \ - (((xci1).leftSideBearing == (xci2).leftSideBearing) && \ - ((xci1).rightSideBearing == (xci2).rightSideBearing) && \ - ((xci1).characterWidth == (xci2).characterWidth) && \ - ((xci1).ascent == (xci2).ascent) && \ - ((xci1).descent == (xci2).descent) && \ - ((xci1).attributes == (xci2).attributes)) - - if (!MATCH(pInfo1->maxbounds, pInfo2->maxbounds) || - !MATCH(pInfo1->minbounds, pInfo2->minbounds) || - !MATCH(pInfo1->ink_maxbounds, pInfo2->ink_maxbounds) || - !MATCH(pInfo1->ink_minbounds, pInfo2->ink_minbounds)) - return FALSE; - -#undef MATCH - - for (i = 0; i < pInfo1->nprops; i++) - if (pInfo1->isStringProp[i] != - pInfo2->isStringProp[i] || - pInfo1->props[i].name != - pInfo2->props[i].name || - pInfo1->props[i].value != - pInfo2->props[i].value) - { - return FALSE; - } - return TRUE; -} - -static int -fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - FSFpePtr conn = (FSFpePtr) fpe->private; - fsQueryXInfoReply *rep; - char *buf; - long bufleft = 0; /* length of reply left to use */ - fsPropInfo *pi; - fsPropOffset *po; - pointer pd; - FontInfoPtr pInfo; - FontInfoRec tempInfo; - int err; - int ret; - - rep = (fsQueryXInfoReply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - (rep->length < LENGTHOF(fsQueryXInfoReply))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - if (rep) - _fs_done_read (conn, rep->length << 2); - fs_cleanup_bfont (bfont); - _fs_reply_failed (rep, fsQueryXInfoReply, "<"); - return BadFontName; - } - - /* If this is a reopen, accumulate the query info into a dummy - font and compare to our original data. */ - if (bfont->flags & FontReopen) - pInfo = &tempInfo; - else - pInfo = &bfont->pfont->info; - - buf = (char *) rep; - buf += SIZEOF(fsQueryXInfoReply); - - bufleft = rep->length << 2; - bufleft -= SIZEOF(fsQueryXInfoReply); - - /* move the data over */ - fsUnpack_XFontInfoHeader(rep, pInfo); - - /* compute accelerators */ - _fs_init_fontinfo(conn, pInfo); - - /* Compute offsets into the reply */ - if (bufleft < SIZEOF(fsPropInfo)) - { - ret = -1; -#ifdef DEBUG - fprintf(stderr, "fsQueryXInfo: bufleft (%ld) < SIZEOF(fsPropInfo)\n", - bufleft); -#endif - goto bail; - } - pi = (fsPropInfo *) buf; - buf += SIZEOF (fsPropInfo); - bufleft -= SIZEOF (fsPropInfo); - - if ((bufleft / SIZEOF (fsPropOffset)) < pi->num_offsets) - { - ret = -1; -#ifdef DEBUG - fprintf(stderr, - "fsQueryXInfo: (bufleft / SIZEOF (fsPropOffset)) (%ld) < pi->num_offsets (%d)\n", - bufleft / SIZEOF (fsPropOffset), pi->num_offsets); -#endif - goto bail; - } - po = (fsPropOffset *) buf; - buf += pi->num_offsets * SIZEOF(fsPropOffset); - bufleft -= pi->num_offsets * SIZEOF(fsPropOffset); - - if (bufleft < pi->data_len) - { - ret = -1; -#ifdef DEBUG - fprintf(stderr, - "fsQueryXInfo: bufleft (%ld) < data_len (%d)\n", - bufleft, pi->data_len); -#endif - goto bail; - } - pd = (pointer) buf; - buf += pi->data_len; - bufleft -= pi->data_len; - - /* convert the properties and step over the reply */ - ret = _fs_convert_props(pi, po, pd, pInfo); - bail: - _fs_done_read (conn, rep->length << 2); - - if (ret == -1) - { - fs_cleanup_bfont (bfont); - return AllocError; - } - - if (bfont->flags & FontReopen) - { - /* We're reopening a font that we lost because of a downed - connection. In the interest of avoiding corruption from - opening a different font than the old one (we already have - its metrics, extents, and probably some of its glyphs), - verify that the metrics and properties all match. */ - - if (fs_fonts_match (pInfo, &bfont->pfont->info)) - { - err = Successful; - bfont->state = FS_DONE_REPLY; - } - else - { - fs_cleanup_bfont (bfont); - err = BadFontName; - } - _fs_free_props (pInfo); - - return err; - } - - /* - * Ask for terminal format fonts if possible - */ - if (bfont->pfont->info.terminalFont) - bfont->format = ((bfont->format & ~ (BitmapFormatImageRectMask)) | - BitmapFormatImageRectMax); - - /* - * Figure out if the whole font should get loaded right now. - */ - if (glyphCachingMode == CACHING_OFF || - (glyphCachingMode == CACHE_16_BIT_GLYPHS - && !bfont->pfont->info.lastRow)) - { - bfont->flags |= FontLoadAll; - } - - /* - * Ready to send the query bitmaps; the terminal font bit has - * been computed and glyphCaching has been considered - */ - if (bfont->flags & FontLoadBitmaps) - { - fs_send_query_bitmaps (fpe, blockrec); - _fs_flush (conn); - } - - bfont->state = FS_EXTENT_REPLY; - - /* - * Reset the blockrec for the next reply - */ - blockrec->sequenceNumber = bfont->queryExtentsSequence; - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - - return StillWorking; -} - -static int -fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - FSFontDataPtr fsd = (FSFontDataPtr) bfont->pfont->fpePrivate; - FSFontPtr fsfont = (FSFontPtr) bfont->pfont->fontPrivate; - fsQueryXExtents16Reply *rep; - char *buf; - int i; - int numExtents; - int numInfos; - int ret; - Bool haveInk = FALSE; /* need separate ink metrics? */ - CharInfoPtr ci, pCI; - char *fsci; - fsXCharInfo fscilocal; - FontInfoRec *fi = &bfont->pfont->info; - - rep = (fsQueryXExtents16Reply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - (rep->length < LENGTHOF(fsQueryXExtents16Reply))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - if (rep) - _fs_done_read (conn, rep->length << 2); - fs_cleanup_bfont (bfont); - _fs_reply_failed (rep, fsQueryXExtents16Reply, "<"); - return BadFontName; - } - - /* move the data over */ - /* need separate inkMetrics for fixed font server protocol version */ - numExtents = rep->num_extents; - numInfos = numExtents; - if (bfont->pfont->info.terminalFont && conn->fsMajorVersion > 1) - { - numInfos *= 2; - haveInk = TRUE; - } - if (numInfos >= (INT_MAX / sizeof(CharInfoRec))) { -#ifdef DEBUG - fprintf(stderr, - "fsQueryXExtents16: numInfos (%d) >= %ld\n", - numInfos, (INT_MAX / sizeof(CharInfoRec))); -#endif - pCI = NULL; - } - else if (numExtents > ((rep->length - LENGTHOF(fsQueryXExtents16Reply)) - / LENGTHOF(fsXCharInfo))) { -#ifdef DEBUG - fprintf(stderr, - "fsQueryXExtents16: numExtents (%d) > (%d - %d) / %d\n", - numExtents, rep->length, - LENGTHOF(fsQueryXExtents16Reply), LENGTHOF(fsXCharInfo)); -#endif - pCI = NULL; - } - else - pCI = malloc(sizeof(CharInfoRec) * numInfos); - - if (!pCI) - { - _fs_done_read (conn, rep->length << 2); - fs_cleanup_bfont(bfont); - return AllocError; - } - fsfont->encoding = pCI; - if (haveInk) - fsfont->inkMetrics = pCI + numExtents; - else - fsfont->inkMetrics = pCI; - - buf = (char *) rep; - buf += SIZEOF (fsQueryXExtents16Reply); - fsci = buf; - - fsd->glyphs_to_get = 0; - ci = fsfont->inkMetrics; - for (i = 0; i < numExtents; i++) - { - memcpy(&fscilocal, fsci, SIZEOF(fsXCharInfo)); /* align it */ - _fs_convert_char_info(&fscilocal, &ci->metrics); - /* Bounds check. */ - if (ci->metrics.ascent > fi->maxbounds.ascent) - { - ErrorF("fserve: warning: %s %s ascent (%d) > maxascent (%d)\n", - fpe->name, fsd->name, - ci->metrics.ascent, fi->maxbounds.ascent); - ci->metrics.ascent = fi->maxbounds.ascent; - } - if (ci->metrics.descent > fi->maxbounds.descent) - { - ErrorF("fserve: warning: %s %s descent (%d) > maxdescent (%d)\n", - fpe->name, fsd->name, - ci->metrics.descent, fi->maxbounds.descent); - ci->metrics.descent = fi->maxbounds.descent; - } - fsci = fsci + SIZEOF(fsXCharInfo); - /* Initialize the bits field for later glyph-caching use */ - if (NONZEROMETRICS(&ci->metrics)) - { - if (!haveInk && - (ci->metrics.leftSideBearing == ci->metrics.rightSideBearing || - ci->metrics.ascent == -ci->metrics.descent)) - pCI[i].bits = &_fs_glyph_zero_length; - else - { - pCI[i].bits = &_fs_glyph_undefined; - fsd->glyphs_to_get++; - } - } - else - pCI[i].bits = (char *)0; - ci++; - } - - /* Done with reply */ - _fs_done_read (conn, rep->length << 2); - - /* build bitmap metrics, ImageRectMax style */ - if (haveInk) - { - CharInfoPtr ii; - - ci = fsfont->encoding; - ii = fsfont->inkMetrics; - for (i = 0; i < numExtents; i++, ci++, ii++) - { - if (NONZEROMETRICS(&ii->metrics)) - { - ci->metrics.leftSideBearing = FONT_MIN_LEFT(fi); - ci->metrics.rightSideBearing = FONT_MAX_RIGHT(fi); - ci->metrics.ascent = FONT_MAX_ASCENT(fi); - ci->metrics.descent = FONT_MAX_DESCENT(fi); - ci->metrics.characterWidth = FONT_MAX_WIDTH(fi); - ci->metrics.attributes = ii->metrics.attributes; - } - else - { - ci->metrics = ii->metrics; - } - /* Bounds check. */ - if (ci->metrics.ascent > fi->maxbounds.ascent) - { - ErrorF("fserve: warning: %s %s ascent (%d) " - "> maxascent (%d)\n", - fpe->name, fsd->name, - ci->metrics.ascent, fi->maxbounds.ascent); - ci->metrics.ascent = fi->maxbounds.ascent; - } - if (ci->metrics.descent > fi->maxbounds.descent) - { - ErrorF("fserve: warning: %s %s descent (%d) " - "> maxdescent (%d)\n", - fpe->name, fsd->name, - ci->metrics.descent, fi->maxbounds.descent); - ci->metrics.descent = fi->maxbounds.descent; - } - } - } - { - unsigned int r, c, numCols, firstCol; - - firstCol = bfont->pfont->info.firstCol; - numCols = bfont->pfont->info.lastCol - firstCol + 1; - c = bfont->pfont->info.defaultCh; - fsfont->pDefault = 0; - if (bfont->pfont->info.lastRow) - { - r = c >> 8; - r -= bfont->pfont->info.firstRow; - c &= 0xff; - c -= firstCol; - if (r < bfont->pfont->info.lastRow-bfont->pfont->info.firstRow+1 && - c < numCols) - fsfont->pDefault = &pCI[r * numCols + c]; - } - else - { - c -= firstCol; - if (c < numCols) - fsfont->pDefault = &pCI[c]; - } - } - bfont->state = FS_GLYPHS_REPLY; - - if (bfont->flags & FontLoadBitmaps) - { - /* - * Reset the blockrec for the next reply - */ - blockrec->sequenceNumber = bfont->queryBitmapsSequence; - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - return StillWorking; - } - return Successful; -} - -#ifdef DEBUG -static char *fs_open_states[] = { - "OPEN_REPLY ", - "INFO_REPLY ", - "EXTENT_REPLY", - "GLYPHS_REPLY", - "DONE_REPLY ", - "DEPENDING ", -}; -#endif - -static int -fs_do_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - int err; - -#ifdef DEBUG - fprintf (stderr, "fs_do_open_font state %s %s\n", - fs_open_states[bfont->state], - ((FSFontDataPtr) (bfont->pfont->fpePrivate))->name); -#endif - err = BadFontName; - switch (bfont->state) { - case FS_OPEN_REPLY: - err = fs_read_open_font(fpe, blockrec); - if (err != StillWorking) { /* already loaded, or error */ - /* if font's already loaded, massage error code */ - switch (bfont->state) { - case FS_DONE_REPLY: - err = Successful; - break; - case FS_DEPENDING: - err = StillWorking; - break; - } - } - break; - case FS_INFO_REPLY: - err = fs_read_query_info(fpe, blockrec); - break; - case FS_EXTENT_REPLY: - err = fs_read_extent_info(fpe, blockrec); - break; - case FS_GLYPHS_REPLY: - if (bfont->flags & FontLoadBitmaps) - err = fs_read_glyphs(fpe, blockrec); - break; - case FS_DEPENDING: /* can't happen */ - default: - break; - } -#ifdef DEBUG - fprintf (stderr, "fs_do_open_font err %d\n", err); -#endif - if (err != StillWorking) - { - bfont->state = FS_DONE_REPLY; /* for _fs_load_glyphs() */ - while ((blockrec = blockrec->depending)) - { - bfont = (FSBlockedFontPtr) blockrec->data; - bfont->state = FS_DONE_REPLY; /* for _fs_load_glyphs() */ - } - } - return err; -} - -void -_fs_mark_block (FSFpePtr conn, CARD32 mask) -{ - conn->blockState |= mask; - fs_blockState |= mask; -} - -void -_fs_unmark_block (FSFpePtr conn, CARD32 mask) -{ - FSFpePtr c; - - if (conn->blockState & mask) - { - conn->blockState &= ~mask; - fs_blockState = 0; - for (c = fs_fpes; c; c = c->next) - fs_blockState |= c->blockState; - } -} - -/* ARGSUSED */ -static void -fs_block_handler(pointer data, OSTimePtr wt, pointer LastSelectMask) -{ - static struct timeval block_timeout; - CARD32 now, earliest, wakeup; - int soonest; - FSFpePtr conn; - - XFD_ORSET((fd_set *)LastSelectMask, (fd_set *)LastSelectMask, - &_fs_fd_mask); - /* - * Flush all pending output - */ - if (fs_blockState & FS_PENDING_WRITE) - for (conn = fs_fpes; conn; conn = conn->next) - if (conn->blockState & FS_PENDING_WRITE) - _fs_flush (conn); - /* - * Check for any fpe with a complete reply, set sleep time to zero - */ - if (fs_blockState & FS_COMPLETE_REPLY) - { - block_timeout.tv_sec = 0; - block_timeout.tv_usec = 0; - if (*wt == NULL) - *wt = &block_timeout; - else - **wt = block_timeout; - } - /* - * Walk through fpe list computing sleep time - */ - else if (fs_blockState & (FS_BROKEN_WRITE| - FS_BROKEN_CONNECTION| - FS_PENDING_REPLY| - FS_RECONNECTING)) - { - now = GetTimeInMillis (); - earliest = now + 10000000; - for (conn = fs_fpes; conn; conn = conn->next) - { - if (conn->blockState & FS_RECONNECTING) - { - wakeup = conn->blockedConnectTime; - if (TimeCmp (wakeup, <, earliest)) - earliest = wakeup; - } - if (conn->blockState & FS_BROKEN_CONNECTION) - { - wakeup = conn->brokenConnectionTime; - if (TimeCmp (wakeup, <, earliest)) - earliest = wakeup; - } - if (conn->blockState & FS_BROKEN_WRITE) - { - wakeup = conn->brokenWriteTime; - if (TimeCmp (wakeup, <, earliest)) - earliest = wakeup; - } - if (conn->blockState & FS_PENDING_REPLY) - { - wakeup = conn->blockedReplyTime; - if (TimeCmp (wakeup, <, earliest)) - earliest = wakeup; - } - } - soonest = earliest - now; - if (soonest < 0) - soonest = 0; - block_timeout.tv_sec = soonest / 1000; - block_timeout.tv_usec = (soonest % 1000) * 1000; - if (*wt == NULL) - *wt = &block_timeout; - else if (soonest < (*wt)->tv_sec * 1000 + (*wt)->tv_usec / 1000) - **wt = block_timeout; - } -} - -static void -fs_handle_unexpected(FSFpePtr conn, fsGenericReply *rep) -{ - if (rep->type == FS_Event && rep->data1 == KeepAlive) - { - fsNoopReq req; - - /* ping it back */ - req.reqType = FS_Noop; - req.length = SIZEOF(fsNoopReq) >> 2; - _fs_add_req_log(conn, FS_Noop); - _fs_write(conn, (char *) &req, SIZEOF(fsNoopReq)); - } - /* this should suck up unexpected replies and events */ - _fs_done_read (conn, rep->length << 2); -} - -static void -fs_read_reply (FontPathElementPtr fpe, pointer client) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - int ret; - int err; - fsGenericReply *rep; - - if ((rep = fs_get_reply (conn, &ret))) - { - _fs_add_rep_log (conn, rep); - for (blockrec = conn->blockedRequests; - blockrec; - blockrec = blockrec->next) - { - if (blockrec->sequenceNumber == rep->sequenceNumber) - break; - } - err = Successful; - if (!blockrec) - { - fs_handle_unexpected(conn, rep); - } - else - { - /* - * go read it, and if we're done, - * wake up the appropriate client - */ - switch (blockrec->type) { - case FS_OPEN_FONT: - blockrec->errcode = fs_do_open_font(fpe, blockrec); - break; - case FS_LOAD_GLYPHS: - blockrec->errcode = fs_read_glyphs(fpe, blockrec); - break; - case FS_LIST_FONTS: - blockrec->errcode = fs_read_list(fpe, blockrec); - break; - case FS_LIST_WITH_INFO: - blockrec->errcode = fs_read_list_info(fpe, blockrec); - break; - default: - break; - } - err = blockrec->errcode; - if (err != StillWorking) - { - while (blockrec) - { - blockrec->errcode = err; - if (client != blockrec->client) - ClientSignal(blockrec->client); - blockrec = blockrec->depending; - } - _fs_unmark_block (conn, FS_PENDING_REPLY); - } - } - if (fs_reply_ready (conn)) - _fs_mark_block (conn, FS_COMPLETE_REPLY); - else - _fs_unmark_block (conn, FS_COMPLETE_REPLY); - } -} - -static int -fs_wakeup(FontPathElementPtr fpe, unsigned long *mask) -{ - fd_set *LastSelectMask = (fd_set *) mask; - FSFpePtr conn = (FSFpePtr) fpe->private; - - /* - * Don't continue if the fd is -1 (which will be true when the - * font server terminates - */ - if ((conn->blockState & FS_RECONNECTING)) - _fs_check_reconnect (conn); - else if ((conn->blockState & FS_COMPLETE_REPLY) || - (conn->fs_fd != -1 && FD_ISSET(conn->fs_fd, LastSelectMask))) - fs_read_reply (fpe, 0); - if (conn->blockState & (FS_PENDING_REPLY|FS_BROKEN_CONNECTION|FS_BROKEN_WRITE)) - _fs_do_blocked (conn); -#ifdef DEBUG - { - FSBlockDataPtr blockrec; - FSBlockedFontPtr bfont; - FSBlockedListPtr blist; - static CARD32 lastState; - static FSBlockDataPtr lastBlock; - - if (conn->blockState || conn->blockedRequests || lastState || lastBlock) - { - fprintf (stderr, " Block State 0x%x\n", (int) conn->blockState); - lastState = conn->blockState; - lastBlock = conn->blockedRequests; - } - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - { - switch (blockrec->type) { - case FS_OPEN_FONT: - bfont = (FSBlockedFontPtr) blockrec->data; - fprintf (stderr, " Blocked font errcode %d sequence %d state %s %s\n", - blockrec->errcode, - blockrec->sequenceNumber, - fs_open_states[bfont->state], - bfont->pfont ? - ((FSFontDataPtr) (bfont->pfont->fpePrivate))->name : - ""); - break; - case FS_LIST_FONTS: - blist = (FSBlockedListPtr) blockrec->data; - fprintf (stderr, " Blocked list errcode %d sequence %d\n", - blockrec->errcode, blockrec->sequenceNumber); - break; - default: - fprintf (stderr, " Blocked type %d errcode %d sequence %d\n", - blockrec->type, - blockrec->errcode, - blockrec->sequenceNumber); - break; - } - } - } -#endif - return FALSE; -} - -/* - * Notice a dead connection and prepare for reconnect - */ - -void -_fs_connection_died(FSFpePtr conn) -{ - if (conn->blockState & FS_BROKEN_CONNECTION) - return; - fs_close_conn(conn); - conn->brokenConnectionTime = GetTimeInMillis (); - _fs_mark_block (conn, FS_BROKEN_CONNECTION); - _fs_unmark_block (conn, FS_BROKEN_WRITE|FS_PENDING_WRITE|FS_RECONNECTING); -} - -/* - * Signal clients that the connection has come back up - */ -static int -_fs_restart_connection(FSFpePtr conn) -{ - FSBlockDataPtr block; - - _fs_unmark_block (conn, FS_GIVE_UP); - while ((block = (FSBlockDataPtr) conn->blockedRequests)) - { - if (block->errcode == StillWorking) - { - ClientSignal(block->client); - fs_abort_blockrec(conn, block); - } - } - return TRUE; -} - -/* - * Declare this font server connection useless - */ -static void -_fs_giveup (FSFpePtr conn) -{ - FSBlockDataPtr block; - - if (conn->blockState & FS_GIVE_UP) - return; -#ifdef DEBUG - fprintf (stderr, "give up on FS \"%s\"\n", conn->servername); -#endif - _fs_mark_block (conn, FS_GIVE_UP); - while ((block = (FSBlockDataPtr) conn->blockedRequests)) - { - if (block->errcode == StillWorking) - { - ClientSignal (block->client); - fs_abort_blockrec (conn, block); - } - } - if (conn->fs_fd >= 0) - _fs_connection_died (conn); -} - -static void -_fs_do_blocked (FSFpePtr conn) -{ - CARD32 now; - - now = GetTimeInMillis (); - if ((conn->blockState & FS_PENDING_REPLY) && - TimeCmp (conn->blockedReplyTime, <=, now)) - { - _fs_giveup (conn); - } - else - { - if (conn->blockState & FS_BROKEN_CONNECTION) - { - /* Try to reconnect broken connections */ - if (TimeCmp (conn->brokenConnectionTime, <=, now)) - _fs_start_reconnect (conn); - } - else if (conn->blockState & FS_BROKEN_WRITE) - { - /* Try to flush blocked connections */ - if (TimeCmp (conn->brokenWriteTime, <=, now)) - _fs_flush (conn); - } - } -} - -/* - * sends the actual request out - */ -/* ARGSUSED */ -static int -fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *ppfont) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FontPtr font; - FSBlockDataPtr blockrec = NULL; - FSBlockedFontPtr bfont; - FSFontDataPtr fsd; - fsOpenBitmapFontReq openreq; - fsQueryXInfoReq inforeq; - fsQueryXExtents16Req extreq; - int err; - unsigned char buf[1024]; - - if (conn->blockState & FS_GIVE_UP) - return BadFontName; - - if (namelen <= 0 || namelen > sizeof (buf) - 1) - return BadFontName; - - /* - * Get the font structure put together, either by reusing - * the existing one or creating a new one - */ - if (flags & FontReopen) - { - Atom nameatom, fn = None; - int i; - - font = *ppfont; - fsd = (FSFontDataPtr)font->fpePrivate; - /* This is an attempt to reopen a font. Did the font have a - NAME property? */ - if ((nameatom = MakeAtom("FONT", 4, 0)) != None) - { - for (i = 0; i < font->info.nprops; i++) - if (font->info.props[i].name == nameatom && - font->info.isStringProp[i]) - { - fn = font->info.props[i].value; - break; - } - } - if (fn == None || !(name = NameForAtom(fn))) - { - name = fsd->name; - namelen = fsd->namelen; - } - else - namelen = strlen(name); - } - else - { - font = fs_create_font (fpe, name, namelen, format, fmask); - if (!font) - return AllocError; - - fsd = (FSFontDataPtr)font->fpePrivate; - } - - /* make a new block record, and add it to the end of the list */ - blockrec = fs_new_block_rec(font->fpe, client, FS_OPEN_FONT); - if (!blockrec) - { - if (!(flags & FontReopen)) - (*font->unload_font) (font); - return AllocError; - } - - /* - * Must check this before generating any protocol, otherwise we'll - * mess up a reconnect in progress - */ - if (conn->blockState & (FS_BROKEN_CONNECTION | FS_RECONNECTING)) - { - _fs_pending_reply (conn); - return Suspended; - } - - fsd->generation = conn->generation; - - bfont = (FSBlockedFontPtr) blockrec->data; - bfont->fontid = fsd->fontid; - bfont->pfont = font; - bfont->state = FS_OPEN_REPLY; - bfont->flags = flags; - bfont->format = fsd->format; - bfont->clients_depending = (FSClientsDependingPtr)0; - bfont->freeFont = (flags & FontReopen) == 0; - - _fs_client_access (conn, client, (flags & FontOpenSync) != 0); - _fs_client_resolution(conn); - - /* do an FS_OpenFont, FS_QueryXInfo and FS_QueryXExtents */ - buf[0] = (unsigned char) namelen; - memcpy(&buf[1], name, namelen); - openreq.reqType = FS_OpenBitmapFont; - openreq.fid = fsd->fontid; - openreq.format_hint = fsd->format; - openreq.format_mask = fsd->fmask; - openreq.length = (SIZEOF(fsOpenBitmapFontReq) + namelen + 4) >> 2; - - _fs_add_req_log(conn, FS_OpenBitmapFont); - _fs_write(conn, (char *) &openreq, SIZEOF(fsOpenBitmapFontReq)); - _fs_write_pad(conn, (char *) buf, namelen + 1); - - blockrec->sequenceNumber = conn->current_seq; - - inforeq.reqType = FS_QueryXInfo; - inforeq.id = fsd->fontid; - inforeq.length = SIZEOF(fsQueryXInfoReq) >> 2; - - bfont->queryInfoSequence = conn->current_seq + 1; - - _fs_add_req_log(conn, FS_QueryXInfo); - _fs_write(conn, (char *) &inforeq, SIZEOF(fsQueryXInfoReq)); - - if (!(bfont->flags & FontReopen)) - { - extreq.reqType = FS_QueryXExtents16; - extreq.range = fsTrue; - extreq.fid = fsd->fontid; - extreq.num_ranges = 0; - extreq.length = SIZEOF(fsQueryXExtents16Req) >> 2; - - bfont->queryExtentsSequence = conn->current_seq + 1; - - _fs_add_req_log(conn, FS_QueryXExtents16); - _fs_write(conn, (char *) &extreq, SIZEOF(fsQueryXExtents16Req)); - } - -#ifdef NCD - if (configData.ExtendedFontDiags) - { - memcpy(buf, name, MIN(256, namelen)); - buf[MIN(256, namelen)] = '\0'; - printf("Requesting font \"%s\" from font server \"%s\"\n", - buf, font->fpe->name); - } -#endif - _fs_prepare_for_reply (conn); - - err = blockrec->errcode; - if (bfont->flags & FontOpenSync) - { - while (blockrec->errcode == StillWorking) - { - if (fs_await_reply (conn) != FSIO_READY) - { - blockrec->errcode = BadFontName; - break; - } - fs_read_reply (font->fpe, client); - } - err = blockrec->errcode; - if (err == Successful) - *ppfont = bfont->pfont; - else - fs_cleanup_bfont (bfont); - bfont->freeFont = FALSE; - _fs_remove_block_rec (conn, blockrec); - } - return err == StillWorking ? Suspended : err; -} - -static void -fs_send_query_bitmaps(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - fsQueryXBitmaps16Req bitreq; - - /* send the request */ - bitreq.reqType = FS_QueryXBitmaps16; - bitreq.fid = bfont->fontid; - bitreq.format = bfont->format; - bitreq.range = TRUE; - bitreq.length = SIZEOF(fsQueryXBitmaps16Req) >> 2; - bitreq.num_ranges = 0; - - bfont->queryBitmapsSequence = conn->current_seq + 1; - - _fs_add_req_log(conn, FS_QueryXBitmaps16); - _fs_write(conn, (char *) &bitreq, SIZEOF(fsQueryXBitmaps16Req)); -} - -/* ARGSUSED */ -static int -fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *ppfont, - char **alias, FontPtr non_cachable_font) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - FSBlockedFontPtr bfont; - int err; - - /* libfont interface expects ImageRectMin glyphs */ - format = (format & ~BitmapFormatImageRectMask) | BitmapFormatImageRectMin; - - *alias = (char *) 0; - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - { - if (blockrec->type == FS_OPEN_FONT && blockrec->client == client) - { - err = blockrec->errcode; - if (err == StillWorking) - return Suspended; - - bfont = (FSBlockedFontPtr) blockrec->data; - if (err == Successful) - *ppfont = bfont->pfont; - else - fs_cleanup_bfont (bfont); - _fs_remove_block_rec (conn, blockrec); - return err; - } - } - return fs_send_open_font(client, fpe, flags, name, namelen, format, fmask, - id, ppfont); -} - -/* ARGSUSED */ -static int -fs_send_close_font(FontPathElementPtr fpe, Font id) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - fsCloseReq req; - - if (conn->blockState & FS_GIVE_UP) - return Successful; - /* tell the font server to close the font */ - req.reqType = FS_CloseFont; - req.length = SIZEOF(fsCloseReq) >> 2; - req.id = id; - _fs_add_req_log(conn, FS_CloseFont); - _fs_write(conn, (char *) &req, SIZEOF(fsCloseReq)); - - return Successful; -} - -/* ARGSUSED */ -static void -fs_close_font(FontPathElementPtr fpe, FontPtr pfont) -{ - FSFontDataPtr fsd = (FSFontDataPtr) pfont->fpePrivate; - FSFpePtr conn = (FSFpePtr) fpe->private; - - if (conn->generation == fsd->generation) - fs_send_close_font(fpe, fsd->fontid); - -#ifdef DEBUG - { - FSBlockDataPtr blockrec; - FSBlockedFontPtr bfont; - - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - { - if (blockrec->type == FS_OPEN_FONT) - { - bfont = (FSBlockedFontPtr) blockrec->data; - if (bfont->pfont == pfont) - fprintf (stderr, "closing font which hasn't been opened\n"); - } - } - } -#endif - (*pfont->unload_font) (pfont); -} - -static int -fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr) blockrec->data; - FSBlockedFontPtr bfont = (FSBlockedFontPtr) blockrec->data; - FSFpePtr conn = (FSFpePtr) fpe->private; - FontPtr pfont = bglyph->pfont; - /* works for either blocked font - or glyph rec... pfont is at - the very beginning of both - blockrec->data structures */ - FSFontDataPtr fsd = (FSFontDataPtr) (pfont->fpePrivate); - FSFontPtr fsdata = (FSFontPtr) pfont->fontPrivate; - FontInfoPtr pfi = &pfont->info; - fsQueryXBitmaps16Reply *rep; - char *buf; - long bufleft = 0; /* length of reply left to use */ - fsOffset32 *ppbits; - fsOffset32 local_off; - char *off_adr; - pointer pbitmaps; - char *bits, *allbits; -#ifdef DEBUG - char *origallbits; -#endif - int i, - err; - int nranges = 0; - int ret; - fsRange *nextrange = 0; - unsigned long minchar, maxchar; - - rep = (fsQueryXBitmaps16Reply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - (rep->length < LENGTHOF(fsQueryXBitmaps16Reply))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - if (rep) - _fs_done_read (conn, rep->length << 2); - err = AllocError; - _fs_reply_failed (rep, fsQueryXBitmaps16Reply, "<"); - goto bail; - } - - buf = (char *) rep; - buf += SIZEOF (fsQueryXBitmaps16Reply); - - bufleft = rep->length << 2; - bufleft -= SIZEOF (fsQueryXBitmaps16Reply); - - if ((bufleft / SIZEOF (fsOffset32)) < rep->num_chars) - { -#ifdef DEBUG - fprintf(stderr, - "fsQueryXBitmaps16: num_chars (%d) > bufleft (%ld) / %d\n", - rep->num_chars, bufleft, SIZEOF (fsOffset32)); -#endif - err = AllocError; - goto bail; - } - ppbits = (fsOffset32 *) buf; - buf += SIZEOF (fsOffset32) * (rep->num_chars); - bufleft -= SIZEOF (fsOffset32) * (rep->num_chars); - - if (bufleft < rep->nbytes) - { -#ifdef DEBUG - fprintf(stderr, - "fsQueryXBitmaps16: nbytes (%d) > bufleft (%ld)\n", - rep->nbytes, bufleft); -#endif - err = AllocError; - goto bail; - } - pbitmaps = (pointer ) buf; - - if (blockrec->type == FS_LOAD_GLYPHS) - { - nranges = bglyph->num_expected_ranges; - nextrange = bglyph->expected_ranges; - } - - /* place the incoming glyphs */ - if (nranges) - { - /* We're operating under the assumption that the ranges - requested in the LoadGlyphs call were all legal for this - font, and that individual ranges do not cover multiple - rows... fs_build_range() is designed to ensure this. */ - minchar = (nextrange->min_char_high - pfi->firstRow) * - (pfi->lastCol - pfi->firstCol + 1) + - nextrange->min_char_low - pfi->firstCol; - maxchar = (nextrange->max_char_high - pfi->firstRow) * - (pfi->lastCol - pfi->firstCol + 1) + - nextrange->max_char_low - pfi->firstCol; - nextrange++; - } - else - { - minchar = 0; - maxchar = rep->num_chars; - } - - off_adr = (char *)ppbits; - - allbits = fs_alloc_glyphs (pfont, rep->nbytes); - - if (!allbits) - { - err = AllocError; - goto bail; - } - -#ifdef DEBUG - origallbits = allbits; - fprintf (stderr, "Reading %d glyphs in %d bytes for %s\n", - (int) rep->num_chars, (int) rep->nbytes, fsd->name); -#endif - - for (i = 0; i < rep->num_chars; i++) - { - memcpy(&local_off, off_adr, SIZEOF(fsOffset32)); /* align it */ - if (blockrec->type == FS_OPEN_FONT || - fsdata->encoding[minchar].bits == &_fs_glyph_requested) - { - /* - * Broken X font server returns bits for missing characters - * when font is padded - */ - if (NONZEROMETRICS(&fsdata->encoding[minchar].metrics)) - { - if (local_off.length && - (local_off.position < rep->nbytes) && - (local_off.length <= (rep->nbytes - local_off.position))) - { - bits = allbits; - allbits += local_off.length; - memcpy(bits, (char *)pbitmaps + local_off.position, - local_off.length); - } - else - bits = &_fs_glyph_zero_length; - } - else - bits = 0; - if (fsdata->encoding[minchar].bits == &_fs_glyph_requested) - fsd->glyphs_to_get--; - fsdata->encoding[minchar].bits = bits; - } - if (minchar++ == maxchar) - { - if (!--nranges) break; - minchar = (nextrange->min_char_high - pfi->firstRow) * - (pfi->lastCol - pfi->firstCol + 1) + - nextrange->min_char_low - pfi->firstCol; - maxchar = (nextrange->max_char_high - pfi->firstRow) * - (pfi->lastCol - pfi->firstCol + 1) + - nextrange->max_char_low - pfi->firstCol; - nextrange++; - } - off_adr += SIZEOF(fsOffset32); - } -#ifdef DEBUG - fprintf (stderr, "Used %d bytes instead of %d\n", - (int) (allbits - origallbits), (int) rep->nbytes); -#endif - - if (blockrec->type == FS_OPEN_FONT) - { - fsd->glyphs_to_get = 0; - bfont->state = FS_DONE_REPLY; - } - err = Successful; - -bail: - _fs_done_read (conn, rep->length << 2); - return err; -} - -static int -fs_send_load_glyphs(pointer client, FontPtr pfont, - int nranges, fsRange *ranges) -{ - FontPathElementPtr fpe = pfont->fpe; - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockedGlyphPtr blockedglyph; - fsQueryXBitmaps16Req req; - FSBlockDataPtr blockrec; - - if (conn->blockState & FS_GIVE_UP) - return BadCharRange; - - /* make a new block record, and add it to the end of the list */ - blockrec = fs_new_block_rec(fpe, client, FS_LOAD_GLYPHS); - if (!blockrec) - return AllocError; - blockedglyph = (FSBlockedGlyphPtr) blockrec->data; - blockedglyph->pfont = pfont; - blockedglyph->num_expected_ranges = nranges; - /* Assumption: it's our job to free ranges */ - blockedglyph->expected_ranges = ranges; - blockedglyph->clients_depending = (FSClientsDependingPtr)0; - - if (conn->blockState & (FS_BROKEN_CONNECTION|FS_RECONNECTING)) - { - _fs_pending_reply (conn); - return Suspended; - } - - /* send the request */ - req.reqType = FS_QueryXBitmaps16; - req.fid = ((FSFontDataPtr) pfont->fpePrivate)->fontid; - req.format = pfont->format; - if (pfont->info.terminalFont) - req.format = (req.format & ~(BitmapFormatImageRectMask)) | - BitmapFormatImageRectMax; - req.range = TRUE; - /* each range takes up 4 bytes */ - req.length = (SIZEOF(fsQueryXBitmaps16Req) >> 2) + nranges; - req.num_ranges = nranges * 2; /* protocol wants count of fsChar2bs */ - _fs_add_req_log(conn, FS_QueryXBitmaps16); - _fs_write(conn, (char *) &req, SIZEOF(fsQueryXBitmaps16Req)); - - blockrec->sequenceNumber = conn->current_seq; - - /* Send ranges to the server... pack into a char array by hand - to avoid structure-packing portability problems and to - handle swapping for version1 protocol */ - if (nranges) - { -#define RANGE_BUFFER_SIZE 64 -#define RANGE_BUFFER_SIZE_MASK 63 - int i; - char range_buffer[RANGE_BUFFER_SIZE * 4]; - char *range_buffer_p; - - range_buffer_p = range_buffer; - for (i = 0; i < nranges;) - { - if (conn->fsMajorVersion > 1) - { - *range_buffer_p++ = ranges[i].min_char_high; - *range_buffer_p++ = ranges[i].min_char_low; - *range_buffer_p++ = ranges[i].max_char_high; - *range_buffer_p++ = ranges[i].max_char_low; - } - else - { - *range_buffer_p++ = ranges[i].min_char_low; - *range_buffer_p++ = ranges[i].min_char_high; - *range_buffer_p++ = ranges[i].max_char_low; - *range_buffer_p++ = ranges[i].max_char_high; - } - - if (!(++i & RANGE_BUFFER_SIZE_MASK)) - { - _fs_write(conn, range_buffer, RANGE_BUFFER_SIZE * 4); - range_buffer_p = range_buffer; - } - } - if (i &= RANGE_BUFFER_SIZE_MASK) - _fs_write(conn, range_buffer, i * 4); - } - - _fs_prepare_for_reply (conn); - return Suspended; -} - - -extern pointer serverClient; /* This could be any number that - doesn't conflict with existing - client values. */ - -int -fs_load_all_glyphs(FontPtr pfont) -{ - int err; - FSFpePtr conn = (FSFpePtr) pfont->fpe->private; - - /* - * The purpose of this procedure is to load all glyphs in the event - * that we're dealing with someone who doesn't understand the finer - * points of glyph caching... it is called from _fs_get_glyphs() if - * the latter is called to get glyphs that have not yet been loaded. - * We assume that the caller will not know how to handle a return - * value of Suspended (usually the case for a GetGlyphs() caller), - * so this procedure hangs around, freezing the server, for the - * request to complete. This is an unpleasant kluge called to - * perform an unpleasant job that, we hope, will never be required. - */ - - while ((err = _fs_load_glyphs(serverClient, pfont, TRUE, 0, 0, NULL)) == - Suspended) - { - if (fs_await_reply (conn) != FSIO_READY) - { - /* Get rid of blockrec */ - fs_client_died(serverClient, pfont->fpe); - err = BadCharRange; - break; - } - fs_read_reply (pfont->fpe, serverClient); - } - return err; -} - - -int -_fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag, - unsigned int nchars, int item_size, unsigned char *data) -{ - FSFpePtr conn = (FSFpePtr) pfont->fpe->private; - int nranges = 0; - fsRange *ranges = NULL; - int res; - FSBlockDataPtr blockrec; - FSBlockedGlyphPtr blockedglyph; - FSClientsDependingPtr *clients_depending = NULL; - int err; - - /* see if the result is already there */ - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - { - if (blockrec->type == FS_LOAD_GLYPHS) - { - blockedglyph = (FSBlockedGlyphPtr) blockrec->data; - if (blockedglyph->pfont == pfont) - { - /* Look for this request */ - if (blockrec->client == client) - { - err = blockrec->errcode; - if (err == StillWorking) - return Suspended; - _fs_signal_clients_depending(&blockedglyph->clients_depending); - _fs_remove_block_rec(conn, blockrec); - return err; - } - /* We've found an existing LoadGlyphs blockrec for this - font but for another client. Rather than build a - blockrec for it now (which entails some complex - maintenance), we'll add it to a queue of clients to - be signalled when the existing LoadGlyphs is - completed. */ - clients_depending = &blockedglyph->clients_depending; - break; - } - } - else if (blockrec->type == FS_OPEN_FONT) - { - FSBlockedFontPtr bfont; - bfont = (FSBlockedFontPtr) blockrec->data; - if (bfont->pfont == pfont) - { - /* - * An OpenFont is pending for this font, this must - * be from a reopen attempt, so finish the open - * attempt and retry the LoadGlyphs - */ - if (blockrec->client == client) - { - err = blockrec->errcode; - if (err == StillWorking) - return Suspended; - - _fs_signal_clients_depending(&bfont->clients_depending); - _fs_remove_block_rec(conn, blockrec); - if (err != Successful) - return err; - break; - } - /* We've found an existing OpenFont blockrec for this - font but for another client. Rather than build a - blockrec for it now (which entails some complex - maintenance), we'll add it to a queue of clients to - be signalled when the existing OpenFont is - completed. */ - if (blockrec->errcode == StillWorking) - { - clients_depending = &bfont->clients_depending; - break; - } - } - } - } - - /* - * see if the desired glyphs already exist, and return Successful if they - * do, otherwise build up character range/character string - */ - res = fs_build_range(pfont, range_flag, nchars, item_size, data, - &nranges, &ranges); - - switch (res) - { - case AccessDone: - return Successful; - - case Successful: - break; - - default: - return res; - } - - /* - * If clients_depending is not null, this request must wait for - * some prior request(s) to complete. - */ - if (clients_depending) - { - /* Since we're not ready to send the load_glyphs request yet, - clean up the damage (if any) caused by the fs_build_range() - call. */ - if (nranges) - { - _fs_clean_aborted_loadglyphs(pfont, nranges, ranges); - xfree(ranges); - } - return _fs_add_clients_depending(clients_depending, client); - } - - /* - * If fsd->generation != conn->generation, the font has been closed - * due to a lost connection. We will reopen it, which will result - * in one of three things happening: - * 1) The open will succeed and obtain the same font. Life - * is wonderful. - * 2) The open will fail. There is code above to recognize this - * and flunk the LoadGlyphs request. The client might not be - * thrilled. - * 3) Worst case: the open will succeed but the font we open will - * be different. The fs_read_query_info() procedure attempts - * to detect this by comparing the existing metrics and - * properties against those of the reopened font... if they - * don't match, we flunk the reopen, which eventually results - * in flunking the LoadGlyphs request. We could go a step - * further and compare the extents, but this should be - * sufficient. - */ - if (((FSFontDataPtr)pfont->fpePrivate)->generation != conn->generation) - { - /* Since we're not ready to send the load_glyphs request yet, - clean up the damage caused by the fs_build_range() call. */ - _fs_clean_aborted_loadglyphs(pfont, nranges, ranges); - xfree(ranges); - - /* Now try to reopen the font. */ - return fs_send_open_font(client, pfont->fpe, - (Mask)FontReopen, (char *)0, 0, - (fsBitmapFormat)0, (fsBitmapFormatMask)0, - (XID)0, &pfont); - } - - return fs_send_load_glyphs(client, pfont, nranges, ranges); -} - -static int -fs_read_list(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockedListPtr blist = (FSBlockedListPtr) blockrec->data; - fsListFontsReply *rep; - char *data; - long dataleft; /* length of reply left to use */ - int length, - i, - ret; - int err; - - rep = (fsListFontsReply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - (rep->length < LENGTHOF(fsListFontsReply))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - if (rep) - _fs_done_read (conn, rep->length << 2); - _fs_reply_failed (rep, fsListFontsReply, "<"); - return AllocError; - } - data = (char *) rep + SIZEOF (fsListFontsReply); - dataleft = (rep->length << 2) - SIZEOF (fsListFontsReply); - - err = Successful; - /* copy data into FontPathRecord */ - for (i = 0; i < rep->nFonts; i++) - { - if (dataleft < 1) - break; - length = *(unsigned char *)data++; - dataleft--; /* used length byte */ - if (length > dataleft) { -#ifdef DEBUG - fprintf(stderr, - "fsListFonts: name length (%d) > dataleft (%ld)\n", - length, dataleft); -#endif - err = BadFontName; - break; - } - err = AddFontNamesName(blist->names, data, length); - if (err != Successful) - break; - data += length; - dataleft -= length; - } - _fs_done_read (conn, rep->length << 2); - return err; -} - -static int -fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern, - int patlen, int maxnames, FontNamesPtr newnames) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - FSBlockedListPtr blockedlist; - fsListFontsReq req; - - if (conn->blockState & FS_GIVE_UP) - return BadFontName; - - /* make a new block record, and add it to the end of the list */ - blockrec = fs_new_block_rec(fpe, client, FS_LIST_FONTS); - if (!blockrec) - return AllocError; - blockedlist = (FSBlockedListPtr) blockrec->data; - blockedlist->names = newnames; - - if (conn->blockState & (FS_BROKEN_CONNECTION | FS_RECONNECTING)) - { - _fs_pending_reply (conn); - return Suspended; - } - - _fs_client_access (conn, client, FALSE); - _fs_client_resolution(conn); - - /* send the request */ - req.reqType = FS_ListFonts; - req.maxNames = maxnames; - req.nbytes = patlen; - req.length = (SIZEOF(fsListFontsReq) + patlen + 3) >> 2; - _fs_add_req_log(conn, FS_ListFonts); - _fs_write(conn, (char *) &req, SIZEOF(fsListFontsReq)); - _fs_write_pad(conn, (char *) pattern, patlen); - - blockrec->sequenceNumber = conn->current_seq; - -#ifdef NCD - if (configData.ExtendedFontDiags) { - char buf[256]; - - memcpy(buf, pattern, MIN(256, patlen)); - buf[MIN(256, patlen)] = '\0'; - printf("Listing fonts on pattern \"%s\" from font server \"%s\"\n", - buf, fpe->name); - } -#endif - - _fs_prepare_for_reply (conn); - return Suspended; -} - -static int -fs_list_fonts(pointer client, FontPathElementPtr fpe, - char *pattern, int patlen, int maxnames, FontNamesPtr newnames) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - int err; - - /* see if the result is already there */ - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - { - if (blockrec->type == FS_LIST_FONTS && blockrec->client == client) - { - err = blockrec->errcode; - if (err == StillWorking) - return Suspended; - _fs_remove_block_rec(conn, blockrec); - return err; - } - } - - /* didn't find waiting record, so send a new one */ - return fs_send_list_fonts(client, fpe, pattern, patlen, maxnames, newnames); -} - -/* - * Read a single list info reply and restart for the next reply - */ -static int -fs_read_list_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec) -{ - FSBlockedListInfoPtr binfo = (FSBlockedListInfoPtr) blockrec->data; - fsListFontsWithXInfoReply *rep; - char *buf; - long bufleft = 0; - FSFpePtr conn = (FSFpePtr) fpe->private; - fsPropInfo *pi; - fsPropOffset *po; - pointer pd; - int ret; - int err; - - /* clean up anything from the last trip */ - _fs_free_props (&binfo->info); - - rep = (fsListFontsWithXInfoReply *) fs_get_reply (conn, &ret); - if (!rep || rep->type == FS_Error || - ((rep->nameLength != 0) && - (rep->length < LENGTHOF(fsListFontsWithXInfoReply)))) - { - if (ret == FSIO_BLOCK) - return StillWorking; - binfo->status = FS_LFWI_FINISHED; - err = AllocError; - _fs_reply_failed (rep, fsListFontsWithXInfoReply, "<"); - goto done; - } - /* - * Normal termination -- the list ends with a name of length 0 - */ - if (rep->nameLength == 0) - { -#ifdef DEBUG - fprintf (stderr, "fs_read_list_info done\n"); -#endif - binfo->status = FS_LFWI_FINISHED; - err = BadFontName; - goto done; - } - - buf = (char *) rep + SIZEOF (fsListFontsWithXInfoReply); - bufleft = (rep->length << 2) - SIZEOF (fsListFontsWithXInfoReply); - - /* - * The original FS implementation didn't match - * the spec, version 1 was respecified to match the FS. - * Version 2 matches the original intent - */ - if (conn->fsMajorVersion <= 1) - { - if (rep->nameLength > bufleft) { -#ifdef DEBUG - fprintf(stderr, - "fsListFontsWithXInfo: name length (%d) > bufleft (%ld)\n", - (int) rep->nameLength, bufleft); -#endif - err = AllocError; - goto done; - } - /* binfo->name is a 256 char array, rep->nameLength is a CARD8 */ - memcpy (binfo->name, buf, rep->nameLength); - buf += _fs_pad_length (rep->nameLength); - bufleft -= _fs_pad_length (rep->nameLength); - } - pi = (fsPropInfo *) buf; - if (SIZEOF (fsPropInfo) > bufleft) { -#ifdef DEBUG - fprintf(stderr, - "fsListFontsWithXInfo: PropInfo length (%d) > bufleft (%ld)\n", - (int) SIZEOF (fsPropInfo), bufleft); -#endif - err = AllocError; - goto done; - } - bufleft -= SIZEOF (fsPropInfo); - buf += SIZEOF (fsPropInfo); - po = (fsPropOffset *) buf; - if (pi->num_offsets > (bufleft / SIZEOF (fsPropOffset))) { -#ifdef DEBUG - fprintf(stderr, - "fsListFontsWithXInfo: offset length (%d * %d) > bufleft (%ld)\n", - pi->num_offsets, (int) SIZEOF (fsPropOffset), bufleft); -#endif - err = AllocError; - goto done; - } - bufleft -= pi->num_offsets * SIZEOF (fsPropOffset); - buf += pi->num_offsets * SIZEOF (fsPropOffset); - pd = (pointer) buf; - if (pi->data_len > bufleft) { -#ifdef DEBUG - fprintf(stderr, - "fsListFontsWithXInfo: data length (%d) > bufleft (%ld)\n", - pi->data_len, bufleft); -#endif - err = AllocError; - goto done; - } - bufleft -= pi->data_len; - buf += pi->data_len; - if (conn->fsMajorVersion > 1) - { - if (rep->nameLength > bufleft) { -#ifdef DEBUG - fprintf(stderr, - "fsListFontsWithXInfo: name length (%d) > bufleft (%ld)\n", - (int) rep->nameLength, bufleft); -#endif - err = AllocError; - goto done; - } - /* binfo->name is a 256 char array, rep->nameLength is a CARD8 */ - memcpy (binfo->name, buf, rep->nameLength); - buf += _fs_pad_length (rep->nameLength); - bufleft -= _fs_pad_length (rep->nameLength); - } - -#ifdef DEBUG - binfo->name[rep->nameLength] = '\0'; - fprintf (stderr, "fs_read_list_info %s\n", binfo->name); -#endif - err = _fs_convert_lfwi_reply(conn, &binfo->info, rep, pi, po, pd); - if (err != Successful) - { - binfo->status = FS_LFWI_FINISHED; - goto done; - } - binfo->namelen = rep->nameLength; - binfo->remaining = rep->nReplies; - - binfo->status = FS_LFWI_REPLY; - - /* disable this font server until we've processed this response */ - _fs_unmark_block (conn, FS_COMPLETE_REPLY); - FD_CLR(conn->fs_fd, &_fs_fd_mask); -done: - _fs_done_read (conn, rep->length << 2); - return err; -} - -/* ARGSUSED */ -static int -fs_start_list_with_info(pointer client, FontPathElementPtr fpe, - char *pattern, int len, int maxnames, pointer *pdata) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - FSBlockedListInfoPtr binfo; - fsListFontsWithXInfoReq req; - - if (conn->blockState & FS_GIVE_UP) - return BadFontName; - - /* make a new block record, and add it to the end of the list */ - blockrec = fs_new_block_rec(fpe, client, FS_LIST_WITH_INFO); - if (!blockrec) - return AllocError; - - binfo = (FSBlockedListInfoPtr) blockrec->data; - bzero((char *) binfo, sizeof(FSBlockedListInfoRec)); - binfo->status = FS_LFWI_WAITING; - - if (conn->blockState & (FS_BROKEN_CONNECTION | FS_RECONNECTING)) - { - _fs_pending_reply (conn); - return Suspended; - } - - _fs_client_access (conn, client, FALSE); - _fs_client_resolution(conn); - - /* send the request */ - req.reqType = FS_ListFontsWithXInfo; - req.maxNames = maxnames; - req.nbytes = len; - req.length = (SIZEOF(fsListFontsWithXInfoReq) + len + 3) >> 2; - _fs_add_req_log(conn, FS_ListFontsWithXInfo); - (void) _fs_write(conn, (char *) &req, SIZEOF(fsListFontsWithXInfoReq)); - (void) _fs_write_pad(conn, pattern, len); - - blockrec->sequenceNumber = conn->current_seq; - -#ifdef NCD - if (configData.ExtendedFontDiags) { - char buf[256]; - - memcpy(buf, pattern, MIN(256, len)); - buf[MIN(256, len)] = '\0'; - printf("Listing fonts with info on pattern \"%s\" from font server \"%s\"\n", - buf, fpe->name); - } -#endif - - _fs_prepare_for_reply (conn); - return Successful; -} - -/* ARGSUSED */ -static int -fs_next_list_with_info(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, int *numFonts, - pointer private) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec; - FSBlockedListInfoPtr binfo; - int err; - - /* see if the result is already there */ - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - if (blockrec->type == FS_LIST_WITH_INFO && blockrec->client == client) - break; - - if (!blockrec) - { - /* The only good reason for not finding a blockrec would be if - disconnect/reconnect to the font server wiped it out and the - code that called us didn't do the right thing to create - another one. Under those circumstances, we need to return an - error to prevent that code from attempting to interpret the - information we don't return. */ - return BadFontName; - } - - binfo = (FSBlockedListInfoPtr) blockrec->data; - - if (binfo->status == FS_LFWI_WAITING) - return Suspended; - - *namep = binfo->name; - *namelenp = binfo->namelen; - *pFontInfo = &binfo->info; - *numFonts = binfo->remaining; - - /* Restart reply processing from this font server */ - FD_SET(conn->fs_fd, &_fs_fd_mask); - if (fs_reply_ready (conn)) - _fs_mark_block (conn, FS_COMPLETE_REPLY); - - err = blockrec->errcode; - switch (binfo->status) { - case FS_LFWI_FINISHED: - _fs_remove_block_rec(conn, blockrec); - break; - case FS_LFWI_REPLY: - binfo->status = FS_LFWI_WAITING; - blockrec->errcode = StillWorking; - conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout; - _fs_mark_block (conn, FS_PENDING_REPLY); - break; - } - - return err; -} - -/* - * Called when client exits - */ - -static void -fs_client_died(pointer client, FontPathElementPtr fpe) -{ - FSFpePtr conn = (FSFpePtr) fpe->private; - FSBlockDataPtr blockrec, - depending; - FSClientPtr *prev, cur; - fsFreeACReq freeac; - - for (prev = &conn->clients; (cur = *prev); prev = &cur->next) - { - if (cur->client == client) { - freeac.reqType = FS_FreeAC; - freeac.id = cur->acid; - freeac.length = sizeof (fsFreeACReq) >> 2; - _fs_add_req_log(conn, FS_FreeAC); - _fs_write (conn, (char *) &freeac, sizeof (fsFreeACReq)); - *prev = cur->next; - xfree (cur); - break; - } - } - /* find a pending requests */ - for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next) - if (blockrec->client == client) - break; - - if (!blockrec) - return; - - /* replace the client pointers in this block rec with the chained one */ - if ((depending = blockrec->depending)) - { - blockrec->client = depending->client; - blockrec->depending = depending->depending; - blockrec = depending; - } - fs_abort_blockrec(conn, blockrec); -} - -static void -_fs_client_access (FSFpePtr conn, pointer client, Bool sync) -{ - FSClientPtr *prev, cur; - fsCreateACReq crac; - fsSetAuthorizationReq setac; - char *authorizations; - int authlen; - Bool new_cur = FALSE; - -#ifdef DEBUG - if (conn->blockState & (FS_RECONNECTING|FS_BROKEN_CONNECTION)) - { - fprintf (stderr, "Sending requests without a connection\n"); - } -#endif - for (prev = &conn->clients; (cur = *prev); prev = &cur->next) - { - if (cur->client == client) - { - if (prev != &conn->clients) - { - *prev = cur->next; - cur->next = conn->clients; - conn->clients = cur; - } - break; - } - } - if (!cur) - { - cur = (FSClientPtr) xalloc (sizeof (FSClientRec)); - if (!cur) - return; - cur->client = client; - cur->next = conn->clients; - conn->clients = cur; - cur->acid = GetNewFontClientID (); - new_cur = TRUE; - } - if (new_cur || cur->auth_generation != client_auth_generation(client)) - { - if (!new_cur) - { - fsFreeACReq freeac; - freeac.reqType = FS_FreeAC; - freeac.id = cur->acid; - freeac.length = sizeof (fsFreeACReq) >> 2; - _fs_add_req_log(conn, FS_FreeAC); - _fs_write (conn, (char *) &freeac, sizeof (fsFreeACReq)); - } - crac.reqType = FS_CreateAC; - crac.num_auths = set_font_authorizations(&authorizations, &authlen, - client); - authlen = crac.num_auths ? (authlen + 3) & ~0x3 : 0; - crac.length = (sizeof (fsCreateACReq) + authlen) >> 2; - crac.acid = cur->acid; - _fs_add_req_log(conn, FS_CreateAC); - _fs_write(conn, (char *) &crac, sizeof (fsCreateACReq)); - _fs_write(conn, authorizations, authlen); - /* ignore reply; we don't even care about it */ - conn->curacid = 0; - cur->auth_generation = client_auth_generation(client); - } - if (conn->curacid != cur->acid) - { - setac.reqType = FS_SetAuthorization; - setac.length = sizeof (fsSetAuthorizationReq) >> 2; - setac.id = cur->acid; - _fs_add_req_log(conn, FS_SetAuthorization); - _fs_write(conn, (char *) &setac, sizeof (fsSetAuthorizationReq)); - conn->curacid = cur->acid; - } -} - -/* - * Poll a pending connect - */ - -static int -_fs_check_connect (FSFpePtr conn) -{ - int ret; - - ret = _fs_poll_connect (conn->trans_conn, 0); - switch (ret) { - case FSIO_READY: - conn->fs_fd = _FontTransGetConnectionNumber (conn->trans_conn); - FD_SET (conn->fs_fd, &_fs_fd_mask); - break; - case FSIO_BLOCK: - break; - } - return ret; -} - -/* - * Return an FSIO status while waiting for the completed connection - * reply to arrive - */ - -static fsConnSetup * -_fs_get_conn_setup (FSFpePtr conn, int *error, int *setup_len) -{ - int ret; - char *data; - int headlen; - int len; - fsConnSetup *setup; - fsConnSetupAccept *accept; - - ret = _fs_start_read (conn, SIZEOF (fsConnSetup), &data); - if (ret != FSIO_READY) - { - *error = ret; - return 0; - } - - setup = (fsConnSetup *) data; - if (setup->major_version > FS_PROTOCOL) - { - *error = FSIO_ERROR; - return 0; - } - - headlen = (SIZEOF (fsConnSetup) + - (setup->alternate_len << 2) + - (setup->auth_len << 2)); - /* On anything but Success, no extra data is sent */ - if (setup->status != AuthSuccess) - { - len = headlen; - } - else - { - ret = _fs_start_read (conn, headlen + SIZEOF (fsConnSetupAccept), &data); - if (ret != FSIO_READY) - { - *error = ret; - return 0; - } - setup = (fsConnSetup *) data; - accept = (fsConnSetupAccept *) (data + headlen); - len = headlen + (accept->length << 2); - } - ret = _fs_start_read (conn, len, &data); - if (ret != FSIO_READY) - { - *error = ret; - return 0; - } - *setup_len = len; - return (fsConnSetup *) data; -} - -static int -_fs_send_conn_client_prefix (FSFpePtr conn) -{ - fsConnClientPrefix req; - int endian; - int ret; - - /* send setup prefix */ - endian = 1; - if (*(char *) &endian) - req.byteOrder = 'l'; - else - req.byteOrder = 'B'; - - req.major_version = FS_PROTOCOL; - req.minor_version = FS_PROTOCOL_MINOR; - -/* XXX add some auth info here */ - req.num_auths = 0; - req.auth_len = 0; - ret = _fs_write (conn, (char *) &req, SIZEOF (fsConnClientPrefix)); - if (ret != FSIO_READY) - return FSIO_ERROR; - conn->blockedConnectTime = GetTimeInMillis () + FontServerRequestTimeout; - return ret; -} - -static int -_fs_recv_conn_setup (FSFpePtr conn) -{ - int ret; - fsConnSetup *setup; - FSFpeAltPtr alts; - unsigned int i, alt_len; - int setup_len; - char *alt_save, *alt_names; - - setup = _fs_get_conn_setup (conn, &ret, &setup_len); - if (!setup) - return ret; - conn->current_seq = 0; - conn->fsMajorVersion = setup->major_version; - /* - * Create an alternate list from the initial server, but - * don't chain looking for alternates. - */ - if (conn->alternate == 0) - { - /* - * free any existing alternates list, allowing the list to - * be updated - */ - if (conn->alts) - { - xfree (conn->alts); - conn->alts = 0; - conn->numAlts = 0; - } - if (setup->num_alternates) - { - size_t alt_name_len = setup->alternate_len << 2; - alts = (FSFpeAltPtr) xalloc (setup->num_alternates * - sizeof (FSFpeAltRec) + alt_name_len); - if (alts) - { - alt_names = (char *) (setup + 1); - alt_save = (char *) (alts + setup->num_alternates); - for (i = 0; i < setup->num_alternates; i++) - { - alts[i].subset = alt_names[0]; - alt_len = alt_names[1]; - if (alt_len >= alt_name_len) { - /* - * Length is longer than setup->alternate_len - * told us to allocate room for, assume entire - * alternate list is corrupted. - */ -#ifdef DEBUG - fprintf (stderr, - "invalid alt list (length %lx >= %lx)\n", - (long) alt_len, (long) alt_name_len); -#endif - xfree(alts); - return FSIO_ERROR; - } - alts[i].name = alt_save; - memcpy (alt_save, alt_names + 2, alt_len); - alt_save[alt_len] = '\0'; - alt_save += alt_len + 1; - alt_name_len -= alt_len + 1; - alt_names += _fs_pad_length (alt_len + 2); - } - conn->numAlts = setup->num_alternates; - conn->alts = alts; - } - } - } - _fs_done_read (conn, setup_len); - if (setup->status != AuthSuccess) - return FSIO_ERROR; - return FSIO_READY; -} - -static int -_fs_open_server (FSFpePtr conn) -{ - int ret; - char *servername; - - if (conn->alternate == 0) - servername = conn->servername; - else - servername = conn->alts[conn->alternate-1].name; - conn->trans_conn = _fs_connect (servername, &ret); - conn->blockedConnectTime = GetTimeInMillis () + FS_RECONNECT_WAIT; - return ret; -} - -static char * -_fs_catalog_name (char *servername) -{ - char *sp; - - sp = strchr (servername, '/'); - if (!sp) - return 0; - return strrchr (sp + 1, '/'); -} - -static int -_fs_send_init_packets (FSFpePtr conn) -{ - fsSetResolutionReq srreq; - fsSetCataloguesReq screq; - int num_cats, - clen; - char *catalogues; - char *cat; - char len; - char *end; - int num_res; - FontResolutionPtr res; - -#define CATALOGUE_SEP '+' - - res = GetClientResolutions(&num_res); - if (num_res) - { - srreq.reqType = FS_SetResolution; - srreq.num_resolutions = num_res; - srreq.length = (SIZEOF(fsSetResolutionReq) + - (num_res * SIZEOF(fsResolution)) + 3) >> 2; - - _fs_add_req_log(conn, FS_SetResolution); - if (_fs_write(conn, (char *) &srreq, SIZEOF(fsSetResolutionReq)) != FSIO_READY) - return FSIO_ERROR; - if (_fs_write_pad(conn, (char *) res, (num_res * SIZEOF(fsResolution))) != FSIO_READY) - return FSIO_ERROR; - } - - catalogues = 0; - if (conn->alternate != 0) - catalogues = _fs_catalog_name (conn->alts[conn->alternate-1].name); - if (!catalogues) - catalogues = _fs_catalog_name (conn->servername); - - if (!catalogues) - { - conn->has_catalogues = FALSE; - return FSIO_READY; - } - conn->has_catalogues = TRUE; - - /* turn cats into counted list */ - catalogues++; - - cat = catalogues; - num_cats = 0; - clen = 0; - while (*cat) - { - num_cats++; - end = strchr(cat, CATALOGUE_SEP); - if (!end) - end = cat + strlen (cat); - clen += (end - cat) + 1; /* length byte + string */ - cat = end; - } - - screq.reqType = FS_SetCatalogues; - screq.num_catalogues = num_cats; - screq.length = (SIZEOF(fsSetCataloguesReq) + clen + 3) >> 2; - - _fs_add_req_log(conn, FS_SetCatalogues); - if (_fs_write(conn, (char *) &screq, SIZEOF(fsSetCataloguesReq)) != FSIO_READY) - return FSIO_ERROR; - - while (*cat) - { - num_cats++; - end = strchr(cat, CATALOGUE_SEP); - if (!end) - end = cat + strlen (cat); - len = end - cat; - if (_fs_write (conn, &len, 1) != FSIO_READY) - return FSIO_ERROR; - if (_fs_write (conn, cat, (int) len) != FSIO_READY) - return FSIO_ERROR; - cat = end; - } - - if (_fs_write (conn, "....", _fs_pad_length (clen) - clen) != FSIO_READY) - return FSIO_ERROR; - - return FSIO_READY; -} - -static int -_fs_send_cat_sync (FSFpePtr conn) -{ - fsListCataloguesReq lcreq; - - /* - * now sync up with the font server, to see if an error was generated - * by a bogus catalogue - */ - lcreq.reqType = FS_ListCatalogues; - lcreq.length = (SIZEOF(fsListCataloguesReq)) >> 2; - lcreq.maxNames = 0; - lcreq.nbytes = 0; - _fs_add_req_log(conn, FS_SetCatalogues); - if (_fs_write(conn, (char *) &lcreq, SIZEOF(fsListCataloguesReq)) != FSIO_READY) - return FSIO_ERROR; - conn->blockedConnectTime = GetTimeInMillis () + FontServerRequestTimeout; - return FSIO_READY; -} - -static int -_fs_recv_cat_sync (FSFpePtr conn) -{ - fsGenericReply *reply; - fsError *error; - int err; - int ret; - - reply = fs_get_reply (conn, &err); - if (!reply) - return err; - - ret = FSIO_READY; - if (reply->type == FS_Error) - { - error = (fsError *) reply; - if (error->major_opcode == FS_SetCatalogues) - ret = FSIO_ERROR; - } - _fs_done_read (conn, reply->length << 2); - return ret; -} - -static void -_fs_close_server (FSFpePtr conn) -{ - _fs_unmark_block (conn, FS_PENDING_WRITE|FS_BROKEN_WRITE|FS_COMPLETE_REPLY|FS_BROKEN_CONNECTION); - if (conn->trans_conn) - { - _FontTransClose (conn->trans_conn); - conn->trans_conn = 0; - _fs_io_reinit (conn); - } - if (conn->fs_fd >= 0) - { - FD_CLR (conn->fs_fd, &_fs_fd_mask); - conn->fs_fd = -1; - } - conn->fs_conn_state = FS_CONN_UNCONNECTED; -} - -static int -_fs_do_setup_connection (FSFpePtr conn) -{ - int ret; - - do - { -#ifdef DEBUG - fprintf (stderr, "fs_do_setup_connection state %d\n", conn->fs_conn_state); -#endif - switch (conn->fs_conn_state) { - case FS_CONN_UNCONNECTED: - ret = _fs_open_server (conn); - if (ret == FSIO_BLOCK) - conn->fs_conn_state = FS_CONN_CONNECTING; - break; - case FS_CONN_CONNECTING: - ret = _fs_check_connect (conn); - break; - case FS_CONN_CONNECTED: - ret = _fs_send_conn_client_prefix (conn); - break; - case FS_CONN_SENT_PREFIX: - ret = _fs_recv_conn_setup (conn); - break; - case FS_CONN_RECV_INIT: - ret = _fs_send_init_packets (conn); - if (conn->has_catalogues) - ret = _fs_send_cat_sync (conn); - break; - case FS_CONN_SENT_CAT: - if (conn->has_catalogues) - ret = _fs_recv_cat_sync (conn); - else - ret = FSIO_READY; - break; - default: - ret = FSIO_READY; - break; - } - switch (ret) { - case FSIO_READY: - if (conn->fs_conn_state < FS_CONN_RUNNING) - conn->fs_conn_state++; - break; - case FSIO_BLOCK: - if (TimeCmp (GetTimeInMillis (), <, conn->blockedConnectTime)) - break; - ret = FSIO_ERROR; - /* fall through... */ - case FSIO_ERROR: - _fs_close_server (conn); - /* - * Try the next alternate - */ - if (conn->alternate < conn->numAlts) - { - conn->alternate++; - ret = FSIO_READY; - } - else - conn->alternate = 0; - break; - } - } while (conn->fs_conn_state != FS_CONN_RUNNING && ret == FSIO_READY); - if (ret == FSIO_READY) - conn->generation = ++generationCount; - return ret; -} - -static int -_fs_wait_connect (FSFpePtr conn) -{ - int ret; - - for (;;) - { - ret = _fs_do_setup_connection (conn); - if (ret != FSIO_BLOCK) - break; - if (conn->fs_conn_state <= FS_CONN_CONNECTING) - ret = _fs_poll_connect (conn->trans_conn, 1000); - else - ret = _fs_wait_for_readable (conn, 1000); - if (ret == FSIO_ERROR) - break; - } - return ret; -} - -/* - * Poll a connection in the process of reconnecting - */ -static void -_fs_check_reconnect (FSFpePtr conn) -{ - int ret; - - ret = _fs_do_setup_connection (conn); - switch (ret) { - case FSIO_READY: - _fs_unmark_block (conn, FS_RECONNECTING|FS_GIVE_UP); - _fs_restart_connection (conn); - break; - case FSIO_BLOCK: - break; - case FSIO_ERROR: - conn->brokenConnectionTime = GetTimeInMillis () + FS_RECONNECT_POLL; - break; - } -} - -/* - * Start the reconnection process - */ -static void -_fs_start_reconnect (FSFpePtr conn) -{ - if (conn->blockState & FS_RECONNECTING) - return; - conn->alternate = 0; - _fs_mark_block (conn, FS_RECONNECTING); - _fs_unmark_block (conn, FS_BROKEN_CONNECTION); - _fs_check_reconnect (conn); -} - - -static FSFpePtr -_fs_init_conn (char *servername) -{ - FSFpePtr conn; - - conn = xalloc (sizeof (FSFpeRec) + strlen (servername) + 1); - if (!conn) - return 0; - memset (conn, '\0', sizeof (FSFpeRec)); - if (!_fs_io_init (conn)) - { - xfree (conn); - return 0; - } - conn->servername = (char *) (conn + 1); - conn->fs_conn_state = FS_CONN_UNCONNECTED; - conn->fs_fd = -1; - strcpy (conn->servername, servername); - return conn; -} - -static void -_fs_free_conn (FSFpePtr conn) -{ - _fs_close_server (conn); - _fs_io_fini (conn); - if (conn->alts) - xfree (conn->alts); - xfree (conn); -} - -/* - * called at server init time - */ - -void -fs_register_fpe_functions(void) -{ - RegisterFPEFunctions(fs_name_check, - fs_init_fpe, - fs_free_fpe, - fs_reset_fpe, - fs_open_font, - fs_close_font, - fs_list_fonts, - fs_start_list_with_info, - fs_next_list_with_info, - fs_wakeup, - fs_client_died, - _fs_load_glyphs, - NULL, - NULL, - NULL); -} - -static int -check_fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *ppfont, - char **alias, FontPtr non_cachable_font) -{ - if (XpClientIsBitmapClient(client)) - return (fs_open_font(client, fpe, flags, name, namelen, format, - fmask, id, ppfont, alias, non_cachable_font) ); - return BadFontName; -} - -static int -check_fs_list_fonts(pointer client, FontPathElementPtr fpe, - char *pattern, int patlen, int maxnames, - FontNamesPtr newnames) -{ - if (XpClientIsBitmapClient(client)) - return (fs_list_fonts(client, fpe, pattern, patlen, maxnames, - newnames)); - return BadFontName; -} - -static int -check_fs_start_list_with_info(pointer client, FontPathElementPtr fpe, - char *pattern, int len, int maxnames, - pointer *pdata) -{ - if (XpClientIsBitmapClient(client)) - return (fs_start_list_with_info(client, fpe, pattern, len, maxnames, - pdata)); - return BadFontName; -} - -static int -check_fs_next_list_with_info(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, int *numFonts, - pointer private) -{ - if (XpClientIsBitmapClient(client)) - return (fs_next_list_with_info(client, fpe, namep, namelenp, pFontInfo, - numFonts,private)); - return BadFontName; -} - -void -check_fs_register_fpe_functions(void) -{ - RegisterFPEFunctions(fs_name_check, - fs_init_fpe, - fs_free_fpe, - fs_reset_fpe, - check_fs_open_font, - fs_close_font, - check_fs_list_fonts, - check_fs_start_list_with_info, - check_fs_next_list_with_info, - fs_wakeup, - fs_client_died, - _fs_load_glyphs, - NULL, - NULL, - NULL); -} diff --git a/nx-X11/lib/font/fc/fserve.h b/nx-X11/lib/font/fc/fserve.h deleted file mode 100644 index 3254f40fa..000000000 --- a/nx-X11/lib/font/fc/fserve.h +++ /dev/null @@ -1,96 +0,0 @@ -/* $Xorg: fserve.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - * - */ -/* $XFree86: xc/lib/font/fc/fserve.h,v 1.4 2001/01/17 19:43:29 dawes Exp $ */ - -#ifndef _FSERVE_H_ -#define _FSERVE_H_ -/* - * font server data structures - */ - -/* types of block records */ -#define FS_OPEN_FONT 1 -#define FS_LOAD_GLYPHS 2 -#define FS_LIST_FONTS 3 -#define FS_LIST_WITH_INFO 4 - -/* states of OpenFont */ -#define FS_OPEN_REPLY 0 -#define FS_INFO_REPLY 1 -#define FS_EXTENT_REPLY 2 -#define FS_GLYPHS_REPLY 3 -#define FS_DONE_REPLY 4 -#define FS_DEPENDING 5 - -/* status of ListFontsWithInfo */ -#define FS_LFWI_WAITING 0 -#define FS_LFWI_REPLY 1 -#define FS_LFWI_FINISHED 2 - -/* states of connection */ -#define FS_CONN_CLOSED 0 -#define FS_CONN_CONNECTING 1 -#define FS_CONN_READ_HEADER 2 -#define FS_CONN_READ_DATA 3 - -#define AccessDone 0x400 - -typedef struct _fs_font_data *FSFontDataPtr; -typedef struct _fs_blocked_font *FSBlockedFontPtr; -typedef struct _fs_blocked_glyphs *FSBlockedGlyphPtr; -typedef struct _fs_blocked_list *FSBlockedListPtr; -typedef struct _fs_blocked_list_info *FSBlockedListInfoPtr; -typedef struct _fs_block_data *FSBlockDataPtr; -typedef struct _fs_font_table *FSFontTablePtr; -typedef struct _fs_fpe_data *FSFpePtr; - -typedef struct _fs_blocked_bitmaps *FSBlockedBitmapPtr; -typedef struct _fs_blocked_extents *FSBlockedExtentPtr; - -extern void _fs_convert_char_info ( fsXCharInfo *src, xCharInfo *dst ); -extern void _fs_free_props (FontInfoPtr pfi); -extern FontPtr fs_create_font (FontPathElementPtr fpe, - char *name, - int namelen, - fsBitmapFormat format, - fsBitmapFormatMask fmask); - -extern int fs_load_all_glyphs ( FontPtr pfont ); -extern int _fs_load_glyphs ( pointer client, FontPtr pfont, Bool range_flag, - unsigned int nchars, int item_size, - unsigned char *data ); - -/* - * These should be declared elsewhere, but I'm concerned that moving them - * would cause problems building other pieces - */ -extern FontPtr find_old_font (Font id); -extern int set_font_authorizations (char **a, int *len, pointer client); -extern long GetTimeInMillis (void); - - -#endif /* _FSERVE_H_ */ diff --git a/nx-X11/lib/font/fc/fservestr.h b/nx-X11/lib/font/fc/fservestr.h deleted file mode 100644 index 0e4166642..000000000 --- a/nx-X11/lib/font/fc/fservestr.h +++ /dev/null @@ -1,211 +0,0 @@ -/* $Xorg: fservestr.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fservestr.h,v 3.3 2001/01/17 19:43:29 dawes Exp $ */ - -#ifndef _FSERVESTR_H_ -#define _FSERVESTR_H_ - -#include "fserve.h" -#include "fsio.h" - -/* - * font server data structures - */ -/* - * font server private storage - */ - -typedef struct _fs_glyph { - struct _fs_glyph *next; -} FSGlyphRec, *FSGlyphPtr; - -typedef struct _fs_font { - CharInfoPtr pDefault; - CharInfoPtr encoding; - CharInfoPtr inkMetrics; - FSGlyphPtr glyphs; -} FSFontRec, *FSFontPtr; - -/* FS special data for the font */ -typedef struct _fs_font_data { - long fontid; - int generation; /* FS generation when opened */ - unsigned long glyphs_to_get; /* # glyphs remaining to be gotten */ - - /* Following data needed in case font needs to be reopened. */ - int namelen; - char *name; - fsBitmapFormat format; - fsBitmapFormatMask fmask; -} FSFontDataRec; - -typedef struct fs_clients_depending { - pointer client; - struct fs_clients_depending *next; -} FSClientsDependingRec, *FSClientsDependingPtr; - -/* OpenFont specific data for blocked request */ -typedef struct _fs_blocked_font { - FontPtr pfont; /* must be first for fs_read_glyphs */ - long fontid; - int state; /* how many of the replies have landed */ - int flags; - Bool freeFont; /* free this font on failure */ - CARD16 queryInfoSequence; - CARD16 queryExtentsSequence; - CARD16 queryBitmapsSequence; - fsBitmapFormat format; - FSClientsDependingPtr clients_depending; -} FSBlockedFontRec; - -/* LoadGlyphs data for blocked request */ -typedef struct _fs_blocked_glyphs { - FontPtr pfont; /* must be first for fs_read_glyphs */ - int num_expected_ranges; - fsRange *expected_ranges; - FSClientsDependingPtr clients_depending; -} FSBlockedGlyphRec; - -/* LoadExtents data for blocked request */ -typedef struct _fs_blocked_extents { - FontPtr pfont; - fsRange *expected_ranges; - int nranges; - unsigned long nextents; - fsXCharInfo *extents; -} FSBlockedExtentRec; - -/* LoadBitmaps data for blocked request */ -typedef struct _fs_blocked_bitmaps { - FontPtr pfont; - fsRange *expected_ranges; - int nranges; - unsigned long size; - unsigned long nglyphs; - fsOffset32 *offsets; - pointer gdata; -} FSBlockedBitmapRec; - -/* state for blocked ListFonts */ -typedef struct _fs_blocked_list { - FontNamesPtr names; -} FSBlockedListRec; - -/* state for blocked ListFontsWithInfo */ -typedef struct _fs_blocked_list_info { - int status; - int namelen; - FontInfoRec info; - char name[256]; - int remaining; -} FSBlockedListInfoRec; - -/* state for blocked request */ -typedef struct _fs_block_data { - int type; /* Open Font, LoadGlyphs, ListFonts, - * ListWithInfo */ - pointer client; /* who wants it */ - CARD16 sequenceNumber; /* expected */ - pointer data; /* type specific data */ - int errcode; /* Suspended, et al. */ - struct _fs_block_data *depending; /* clients depending on this one */ - struct _fs_block_data *next; -} FSBlockDataRec; - -/* state for reconnected to dead font server */ -typedef struct _fs_reconnect { - int i; -} FSReconnectRec, *FSReconnectPtr; - - -#if !defined(UNIXCPP) || defined(ANSICPP) -#define fsCat(x,y) x##_##y -#else -#define fsCat(x,y) x/**/_/**/y -#endif - - -/* copy XCharInfo parts of a protocol reply into a xCharInfo */ - -#define fsUnpack_XCharInfo(packet, structure) \ - (structure)->leftSideBearing = fsCat(packet,left); \ - (structure)->rightSideBearing = fsCat(packet,right); \ - (structure)->characterWidth = fsCat(packet,width); \ - (structure)->ascent = fsCat(packet,ascent); \ - (structure)->descent = fsCat(packet,descent); \ - (structure)->attributes = fsCat(packet,attributes) - - -/* copy XFontInfoHeader parts of a protocol reply into a FontInfoRec */ - -#define fsUnpack_XFontInfoHeader(packet, structure) \ - (structure)->allExist = ((packet)->font_header_flags & FontInfoAllCharsExist) != 0; \ - (structure)->drawDirection = \ - ((packet)->font_header_draw_direction == LeftToRightDrawDirection) ? \ - LeftToRight : RightToLeft; \ - (structure)->inkInside = ((packet)->font_header_flags & FontInfoInkInside) != 0; \ - \ - (structure)->firstRow = (packet)->font_hdr_char_range_min_char_high; \ - (structure)->firstCol = (packet)->font_hdr_char_range_min_char_low; \ - (structure)->lastRow = (packet)->font_hdr_char_range_max_char_high; \ - (structure)->lastCol = (packet)->font_hdr_char_range_max_char_low; \ - (structure)->defaultCh = (packet)->font_header_default_char_low \ - + ((packet)->font_header_default_char_high << 8); \ - \ - (structure)->fontDescent = (packet)->font_header_font_descent; \ - (structure)->fontAscent = (packet)->font_header_font_ascent; \ - \ - fsUnpack_XCharInfo((packet)->font_header_min_bounds, &(structure)->minbounds); \ - fsUnpack_XCharInfo((packet)->font_header_min_bounds, &(structure)->ink_minbounds); \ - fsUnpack_XCharInfo((packet)->font_header_max_bounds, &(structure)->maxbounds); \ - fsUnpack_XCharInfo((packet)->font_header_max_bounds, &(structure)->ink_maxbounds) - -extern void _fs_init_fontinfo ( FSFpePtr conn, FontInfoPtr pfi ); -extern int _fs_convert_props ( fsPropInfo *pi, fsPropOffset *po, pointer pd, - FontInfoPtr pfi ); -extern int _fs_convert_lfwi_reply ( FSFpePtr conn, FontInfoPtr pfi, - fsListFontsWithXInfoReply *fsrep, - fsPropInfo *pi, fsPropOffset *po, - pointer pd ); -extern int fs_build_range ( FontPtr pfont, Bool range_flag, - unsigned int count, int item_size, - unsigned char *data, int *nranges, - fsRange **ranges ); -extern void _fs_clean_aborted_loadglyphs ( FontPtr pfont, - int num_expected_ranges, - fsRange *expected_ranges ); -extern int _fs_check_extents ( FontPtr pfont, Mask flags, int nranges, - fsRange *range, FSBlockDataPtr blockrec ); -extern int _fs_check_bitmaps ( FontPtr pfont, fsBitmapFormat format, - Mask flags, int nranges, fsRange *range, - FSBlockDataPtr blockrec ); -extern int _fs_get_glyphs ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs ); -extern void _fs_unload_font ( FontPtr pfont ); -extern void _fs_init_font ( FontPtr pfont ); -extern pointer fs_alloc_glyphs (FontPtr pFont, int size); -#endif /* _FSERVESTR_H_ */ diff --git a/nx-X11/lib/font/fc/fsio.c b/nx-X11/lib/font/fc/fsio.c deleted file mode 100644 index fbfb9dfed..000000000 --- a/nx-X11/lib/font/fc/fsio.c +++ /dev/null @@ -1,516 +0,0 @@ -/* $Xorg: fsio.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fsio.c,v 3.16tsi Exp $ */ -/* - * font server i/o routines - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#define _WILLWINSOCK_ -#include "X11/Xwindows.h" -#endif - -#define FONT_t -#define TRANS_CLIENT -#include "X11/Xtrans/Xtrans.h" -#include "X11/Xpoll.h" -#include -#include -#include -#include -#include "fservestr.h" - -#include -#include -#include -#if !defined(WIN32) -#ifndef Lynx -#include -#else -#include -#endif -#endif -#include -#ifdef WIN32 -#define EWOULDBLOCK WSAEWOULDBLOCK -#undef EINTR -#define EINTR WSAEINTR -#endif - -#ifdef __UNIXOS2__ -#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) -#endif - - -static int padlength[4] = {0, 3, 2, 1}; -fd_set _fs_fd_mask; - -static int -_fs_resize (FSBufPtr buf, long size); - -static void -_fs_downsize (FSBufPtr buf, long size); - -int -_fs_poll_connect (XtransConnInfo trans_conn, int timeout) -{ - fd_set w_mask; - struct timeval tv; - int fs_fd = _FontTransGetConnectionNumber (trans_conn); - int ret; - - do - { - tv.tv_usec = 0; - tv.tv_sec = timeout; - FD_ZERO (&w_mask); - FD_SET (fs_fd, &w_mask); - ret = Select (fs_fd + 1, NULL, &w_mask, NULL, &tv); - } while (ret < 0 && ECHECK(EINTR)); - if (ret == 0) - return FSIO_BLOCK; - if (ret < 0) - return FSIO_ERROR; - return FSIO_READY; -} - -XtransConnInfo -_fs_connect(char *servername, int *err) -{ - XtransConnInfo trans_conn; /* transport connection object */ - int ret; - int i = 0; - int retries = 5; - - /* - * Open the network connection. - */ - if( (trans_conn=_FontTransOpenCOTSClient(servername)) == NULL ) - { - *err = FSIO_ERROR; - return 0; - } - - /* - * Set the connection non-blocking since we use select() to block. - */ - - _FontTransSetOption(trans_conn, TRANS_NONBLOCKING, 1); - - do { - if (i == TRANS_TRY_CONNECT_AGAIN) - sleep(1); - i = _FontTransConnect(trans_conn,servername); - } while ((i == TRANS_TRY_CONNECT_AGAIN) && (retries-- > 0)); - - if (i < 0) - { - if (i == TRANS_IN_PROGRESS) - ret = FSIO_BLOCK; - else - ret = FSIO_ERROR; - } - else - ret = FSIO_READY; - - if (ret == FSIO_ERROR) - { - _FontTransClose(trans_conn); - trans_conn = 0; - } - - *err = ret; - return trans_conn; -} - -int -_fs_fill (FSFpePtr conn) -{ - long avail; - long bytes_read; - Bool waited = FALSE; - - if (_fs_flush (conn) < 0) - return FSIO_ERROR; - /* - * Don't go overboard here; stop reading when we've - * got enough to satisfy the pending request - */ - while ((conn->inNeed - (conn->inBuf.insert - conn->inBuf.remove)) > 0) - { - avail = conn->inBuf.size - conn->inBuf.insert; - /* - * For SVR4 with a unix-domain connection, ETEST() after selecting - * readable means the server has died. To do this here, we look for - * two consecutive reads returning ETEST(). - */ - ESET (0); - bytes_read =_FontTransRead(conn->trans_conn, - conn->inBuf.buf + conn->inBuf.insert, - avail); - if (bytes_read > 0) { - conn->inBuf.insert += bytes_read; - waited = FALSE; - } - else - { - if (bytes_read == 0 || ETEST ()) - { - if (!waited) - { - waited = TRUE; - if (_fs_wait_for_readable (conn, 0) == FSIO_BLOCK) - return FSIO_BLOCK; - continue; - } - } - _fs_connection_died (conn); - return FSIO_ERROR; - } - } - return FSIO_READY; -} - -/* - * Make space and return whether data have already arrived - */ - -int -_fs_start_read (FSFpePtr conn, long size, char **buf) -{ - int ret; - - conn->inNeed = size; - if (fs_inqueued(conn) < size) - { - if (_fs_resize (&conn->inBuf, size) != FSIO_READY) - { - _fs_connection_died (conn); - return FSIO_ERROR; - } - ret = _fs_fill (conn); - if (ret == FSIO_ERROR) - return ret; - if (ret == FSIO_BLOCK || fs_inqueued(conn) < size) - return FSIO_BLOCK; - } - if (buf) - *buf = conn->inBuf.buf + conn->inBuf.remove; - return FSIO_READY; -} - -void -_fs_done_read (FSFpePtr conn, long size) -{ - if (conn->inBuf.insert - conn->inBuf.remove < size) - { -#ifdef DEBUG - fprintf (stderr, "_fs_done_read skipping to many bytes\n"); -#endif - return; - } - conn->inBuf.remove += size; - conn->inNeed -= size; - _fs_downsize (&conn->inBuf, FS_BUF_MAX); -} - -long -_fs_pad_length (long len) -{ - return len + padlength[len&3]; -} - -int -_fs_flush (FSFpePtr conn) -{ - long bytes_written; - long remain; - - /* XXX - hack. The right fix is to remember that the font server - has gone away when we first discovered it. */ - if (conn->fs_fd < 0) - return FSIO_ERROR; - - while ((remain = conn->outBuf.insert - conn->outBuf.remove) > 0) - { - bytes_written = _FontTransWrite(conn->trans_conn, - conn->outBuf.buf + conn->outBuf.remove, - (int) remain); - if (bytes_written > 0) - { - conn->outBuf.remove += bytes_written; - } - else - { - if (bytes_written == 0 || ETEST ()) - { - conn->brokenWriteTime = GetTimeInMillis () + FS_FLUSH_POLL; - _fs_mark_block (conn, FS_BROKEN_WRITE); - break; - } - if (!ECHECK (EINTR)) - { - _fs_connection_died (conn); - return FSIO_ERROR; - } - } - } - if (conn->outBuf.remove == conn->outBuf.insert) - { - _fs_unmark_block (conn, FS_BROKEN_WRITE|FS_PENDING_WRITE); - if (conn->outBuf.size > FS_BUF_INC) - conn->outBuf.buf = xrealloc (conn->outBuf.buf, FS_BUF_INC); - conn->outBuf.remove = conn->outBuf.insert = 0; - } - return FSIO_READY; -} - -static int -_fs_resize (FSBufPtr buf, long size) -{ - char *new; - long new_size; - - if (buf->remove) - { - if (buf->remove != buf->insert) - { - memmove (buf->buf, - buf->buf + buf->remove, - buf->insert - buf->remove); - } - buf->insert -= buf->remove; - buf->remove = 0; - } - if (buf->size - buf->remove < size) - { - new_size = ((buf->remove + size + FS_BUF_INC) / FS_BUF_INC) * FS_BUF_INC; - new = xrealloc (buf->buf, new_size); - if (!new) - return FSIO_ERROR; - buf->buf = new; - buf->size = new_size; - } - return FSIO_READY; -} - -static void -_fs_downsize (FSBufPtr buf, long size) -{ - if (buf->insert == buf->remove) - { - buf->insert = buf->remove = 0; - if (buf->size > size) - { - buf->buf = xrealloc (buf->buf, size); - buf->size = size; - } - } -} - -void -_fs_io_reinit (FSFpePtr conn) -{ - conn->outBuf.insert = conn->outBuf.remove = 0; - _fs_downsize (&conn->outBuf, FS_BUF_INC); - conn->inBuf.insert = conn->inBuf.remove = 0; - _fs_downsize (&conn->inBuf, FS_BUF_MAX); -} - -Bool -_fs_io_init (FSFpePtr conn) -{ - conn->outBuf.insert = conn->outBuf.remove = 0; - conn->outBuf.buf = xalloc (FS_BUF_INC); - if (!conn->outBuf.buf) - return FALSE; - conn->outBuf.size = FS_BUF_INC; - - conn->inBuf.insert = conn->inBuf.remove = 0; - conn->inBuf.buf = xalloc (FS_BUF_INC); - if (!conn->inBuf.buf) - { - xfree (conn->outBuf.buf); - conn->outBuf.buf = 0; - return FALSE; - } - conn->inBuf.size = FS_BUF_INC; - - return TRUE; -} - -void -_fs_io_fini (FSFpePtr conn) -{ - if (conn->outBuf.buf) - xfree (conn->outBuf.buf); - if (conn->inBuf.buf) - xfree (conn->inBuf.buf); -} - -static int -_fs_do_write(FSFpePtr conn, char *data, long len, long size) -{ - if (size == 0) { -#ifdef DEBUG - fprintf(stderr, "tried to write 0 bytes \n"); -#endif - return FSIO_READY; - } - - if (conn->fs_fd == -1) - return FSIO_ERROR; - - while (conn->outBuf.insert + size > conn->outBuf.size) - { - if (_fs_flush (conn) < 0) - return FSIO_ERROR; - if (_fs_resize (&conn->outBuf, size) < 0) - { - _fs_connection_died (conn); - return FSIO_ERROR; - } - } - memcpy (conn->outBuf.buf + conn->outBuf.insert, data, len); - conn->outBuf.insert += size; - _fs_mark_block (conn, FS_PENDING_WRITE); - return FSIO_READY; -} - -/* - * Write the indicated bytes - */ -int -_fs_write (FSFpePtr conn, char *data, long len) -{ - return _fs_do_write (conn, data, len, len); -} - -/* - * Write the indicated bytes adding any appropriate pad - */ -int -_fs_write_pad(FSFpePtr conn, char *data, long len) -{ - return _fs_do_write (conn, data, len, len + padlength[len & 3]); -} - -/* - * returns the amount of data waiting to be read - */ -int -_fs_data_ready(FSFpePtr conn) -{ - BytesReadable_t readable; - - if (_FontTransBytesReadable(conn->trans_conn, &readable) < 0) - return -1; - return readable; -} - -int -_fs_wait_for_readable(FSFpePtr conn, int ms) -{ - fd_set r_mask; - fd_set e_mask; - int result; - struct timeval tv; - - for (;;) { - if (conn->fs_fd < 0) - return FSIO_ERROR; - FD_ZERO(&r_mask); - FD_ZERO(&e_mask); - tv.tv_sec = ms / 1000; - tv.tv_usec = (ms % 1000) * 1000; - FD_SET(conn->fs_fd, &r_mask); - FD_SET(conn->fs_fd, &e_mask); - result = Select(conn->fs_fd + 1, &r_mask, NULL, &e_mask, &tv); - if (result < 0) - { - if (ECHECK(EINTR) || ECHECK(EAGAIN)) - continue; - else - return FSIO_ERROR; - } - if (result == 0) - return FSIO_BLOCK; - if (FD_ISSET(conn->fs_fd, &r_mask)) - return FSIO_READY; - return FSIO_ERROR; - } -} - -int -_fs_set_bit(fd_set *mask, int fd) -{ - FD_SET(fd, mask); - return fd; -} - -int -_fs_is_bit_set(fd_set *mask, int fd) -{ - return FD_ISSET(fd, mask); -} - -void -_fs_bit_clear(fd_set *mask, int fd) -{ - FD_CLR(fd, mask); -} - -int -_fs_any_bit_set(fd_set *mask) -{ - return XFD_ANYSET(mask); -} - -void -_fs_or_bits(fd_set *dst, fd_set *m1, fd_set *m2) -{ -#ifdef WIN32 - int i; - if (dst != m1) { - for (i = m1->fd_count; --i >= 0; ) { - if (!FD_ISSET(m1->fd_array[i], dst)) - FD_SET(m1->fd_array[i], dst); - } - } - if (dst != m2) { - for (i = m2->fd_count; --i >= 0; ) { - if (!FD_ISSET(m2->fd_array[i], dst)) - FD_SET(m2->fd_array[i], dst); - } - } -#else - XFD_ORSET(dst, m1, m2); -#endif -} diff --git a/nx-X11/lib/font/fc/fsio.h b/nx-X11/lib/font/fc/fsio.h deleted file mode 100644 index 224143601..000000000 --- a/nx-X11/lib/font/fc/fsio.h +++ /dev/null @@ -1,187 +0,0 @@ -/* $Xorg: fsio.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fsio.h,v 1.5 1999/12/30 02:39:06 robin Exp $ */ - -#ifndef _FSIO_H_ -#define _FSIO_H_ - -#undef DEBUG -#define REQUEST_LOG_SIZE 100 - -typedef struct _fs_fpe_alternate { - char *name; - Bool subset; -} FSFpeAltRec, *FSFpeAltPtr; - - -/* Per client access contexts */ -typedef struct _fs_client_data { - pointer client; - struct _fs_client_data *next; - XID acid; - int auth_generation; -} FSClientRec, *FSClientPtr; - -#define FS_RECONNECT_POLL 1000 -#define FS_RECONNECT_WAIT 5000 -#define FS_GIVEUP_WAIT 20000 -#define FS_REQUEST_TIMEOUT 20000 -#define FS_OPEN_TIMEOUT 30000 -#define FS_REOPEN_TIMEOUT 10000 -#define FS_FLUSH_POLL 1000 - -typedef struct _fs_buf { - char *buf; /* data */ - long size; /* sizeof data */ - long insert; /* where to insert new data */ - long remove; /* where to remove old data */ -} FSBufRec, *FSBufPtr; - -#define FS_BUF_INC 1024 -#define FS_BUF_MAX 32768 - -#define FS_PENDING_WRITE 0x01 /* some write data is queued */ -#define FS_BROKEN_WRITE 0x02 /* writes are broken */ -#define FS_BROKEN_CONNECTION 0x04 /* connection is broken */ -#define FS_PENDING_REPLY 0x08 /* waiting for a reply */ -#define FS_GIVE_UP 0x10 /* font server declared useless */ -#define FS_COMPLETE_REPLY 0x20 /* complete reply ready */ -#define FS_RECONNECTING 0x40 - -#define FS_CONN_UNCONNECTED 0 -#define FS_CONN_CONNECTING 1 -#define FS_CONN_CONNECTED 2 -#define FS_CONN_SENT_PREFIX 3 -#define FS_CONN_RECV_INIT 4 -#define FS_CONN_SENT_CAT 5 -#define FS_CONN_RUNNING 6 - -/* FS specific font FontPathElement data */ -typedef struct _fs_fpe_data { - FSFpePtr next; /* list of all active fs fpes */ - int fs_fd; /* < 0 when not running */ - int fs_conn_state; /* connection state */ - int current_seq; - char *servername; - Bool has_catalogues; - - int generation; - int numAlts; - int alternate; /* which alternate is in use +1 */ - int fsMajorVersion; /* font server major version number */ - FSFpeAltPtr alts; - - FSClientPtr clients; - XID curacid; -#ifdef DEBUG - int reqindex; - struct { - int opcode; - int sequence; - } reqbuffer[REQUEST_LOG_SIZE]; -#endif - FSBufRec outBuf; /* request queue */ - FSBufRec inBuf; /* reply queue */ - long inNeed; /* amount needed for reply */ - - CARD32 blockState; - CARD32 blockedReplyTime; /* time to abort blocked read */ - CARD32 brokenWriteTime; /* time to retry broken write */ - CARD32 blockedConnectTime; /* time to abort blocked connect */ - CARD32 brokenConnectionTime; /* time to retry broken connection */ - - FSBlockDataPtr blockedRequests; - - struct _XtransConnInfo *trans_conn; /* transport connection object */ -} FSFpeRec; - -#define fs_outspace(conn) ((conn)->outBuf.size - (conn)->outBuf.insert) -#define fs_outqueued(conn) ((conn)->outBuf.insert - (conn)->outBuf.remove) -#define fs_inqueued(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) -#define fs_needsflush(conn) (fs_outqueued(conn) != 0) -#define fs_needsfill(conn) (fs_inqueued(conn) < (conn)->inNeed) -#define fs_needsconnect(conn) ((conn)->fs_fd < 0) -#define fs_data_read(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) - -#define FSIO_READY 1 -#define FSIO_BLOCK 0 -#define FSIO_ERROR -1 - -extern Bool _fs_reopen_server ( FSFpePtr conn ); -extern int _fs_write ( FSFpePtr conn, char *data, long size ); -extern int _fs_write_pad ( FSFpePtr conn, char *data, long len ); -extern int _fs_data_ready ( FSFpePtr conn ); -extern int _fs_wait_for_readable ( FSFpePtr conn, int ms ); -extern int _fs_set_bit ( fd_set * mask, int fd ); -extern int _fs_is_bit_set ( fd_set * mask, int fd ); -extern void _fs_bit_clear ( fd_set * mask, int fd ); -extern int _fs_any_bit_set ( fd_set * mask ); -extern void _fs_or_bits ( fd_set * dst, fd_set * m1, fd_set * m2 ); -extern long _fs_pad_length (long len); - -extern void _fs_connection_died ( FSFpePtr conn ); - -extern int _fs_fill (FSFpePtr conn); -extern int _fs_flush (FSFpePtr conn); -extern void _fs_mark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_unmark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_done_read (FSFpePtr conn, long size); -extern void _fs_io_reinit (FSFpePtr conn); -extern int _fs_start_read (FSFpePtr conn, long size, char **buf); -extern Bool _fs_io_init (FSFpePtr conn); -extern void _fs_io_fini (FSFpePtr conn); -extern int _fs_poll_connect (XtransConnInfo trans_conn, int timeout); -extern XtransConnInfo _fs_connect(char *servername, int *ret); - -/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX - * systems are broken and return EWOULDBLOCK when they should return EAGAIN - */ -#ifdef WIN32 -#define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) -#else -#if defined(EAGAIN) && defined(EWOULDBLOCK) -#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) -#else -#ifdef EAGAIN -#define ETEST() (errno == EAGAIN) -#else -#define ETEST() (errno == EWOULDBLOCK) -#endif -#endif -#endif -#ifdef WIN32 -#define ECHECK(err) (WSAGetLastError() == err) -#define ESET(val) WSASetLastError(val) -#else -#ifdef ISC -#define ECHECK(err) ((errno == err) || ETEST()) -#else -#define ECHECK(err) (errno == err) -#endif -#define ESET(val) errno = val -#endif - -#endif /* _FSIO_H_ */ diff --git a/nx-X11/lib/font/fc/fsio.h.NX.reference b/nx-X11/lib/font/fc/fsio.h.NX.reference deleted file mode 100644 index f79a17b90..000000000 --- a/nx-X11/lib/font/fc/fsio.h.NX.reference +++ /dev/null @@ -1,191 +0,0 @@ -/* $Xorg: fsio.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fsio.h,v 1.6 2001/01/17 19:43:29 dawes Exp $ */ - -#ifndef _FSIO_H_ -#define _FSIO_H_ - -#undef DEBUG -#define REQUEST_LOG_SIZE 100 - -typedef struct _fs_fpe_alternate { - char *name; - Bool subset; -} FSFpeAltRec, *FSFpeAltPtr; - - -/* Per client access contexts */ -typedef struct _fs_client_data { - pointer client; - struct _fs_client_data *next; - XID acid; - int auth_generation; -} FSClientRec, *FSClientPtr; - -#define FS_RECONNECT_POLL 1000 -#ifdef __CYGWIN__ -#define FS_RECONNECT_WAIT 800 -#else -#define FS_RECONNECT_WAIT 5000 -#endif -#define FS_GIVEUP_WAIT 20000 -#define FS_REQUEST_TIMEOUT 20000 -#define FS_OPEN_TIMEOUT 30000 -#define FS_REOPEN_TIMEOUT 10000 -#define FS_FLUSH_POLL 1000 - -typedef struct _fs_buf { - char *buf; /* data */ - long size; /* sizeof data */ - long insert; /* where to insert new data */ - long remove; /* where to remove old data */ -} FSBufRec, *FSBufPtr; - -#define FS_BUF_INC 1024 -#define FS_BUF_MAX 32768 - -#define FS_PENDING_WRITE 0x01 /* some write data is queued */ -#define FS_BROKEN_WRITE 0x02 /* writes are broken */ -#define FS_BROKEN_CONNECTION 0x04 /* connection is broken */ -#define FS_PENDING_REPLY 0x08 /* waiting for a reply */ -#define FS_GIVE_UP 0x10 /* font server declared useless */ -#define FS_COMPLETE_REPLY 0x20 /* complete reply ready */ -#define FS_RECONNECTING 0x40 - -#define FS_CONN_UNCONNECTED 0 -#define FS_CONN_CONNECTING 1 -#define FS_CONN_CONNECTED 2 -#define FS_CONN_SENT_PREFIX 3 -#define FS_CONN_RECV_INIT 4 -#define FS_CONN_SENT_CAT 5 -#define FS_CONN_RUNNING 6 - -/* FS specific font FontPathElement data */ -typedef struct _fs_fpe_data { - FSFpePtr next; /* list of all active fs fpes */ - int fs_fd; /* < 0 when not running */ - int fs_conn_state; /* connection state */ - int current_seq; - char *servername; - Bool has_catalogues; - - int generation; - int numAlts; - int alternate; /* which alternate is in use +1 */ - int fsMajorVersion; /* font server major version number */ - FSFpeAltPtr alts; - - FSClientPtr clients; - XID curacid; -#ifdef DEBUG - int reqindex; - struct { - int opcode; - int sequence; - } reqbuffer[REQUEST_LOG_SIZE]; -#endif - FSBufRec outBuf; /* request queue */ - FSBufRec inBuf; /* reply queue */ - long inNeed; /* amount needed for reply */ - - CARD32 blockState; - CARD32 blockedReplyTime; /* time to abort blocked read */ - CARD32 brokenWriteTime; /* time to retry broken write */ - CARD32 blockedConnectTime; /* time to abort blocked connect */ - CARD32 brokenConnectionTime; /* time to retry broken connection */ - - FSBlockDataPtr blockedRequests; - - struct _XtransConnInfo *trans_conn; /* transport connection object */ -} FSFpeRec; - -#define fs_outspace(conn) ((conn)->outBuf.size - (conn)->outBuf.insert) -#define fs_outqueued(conn) ((conn)->outBuf.insert - (conn)->outBuf.remove) -#define fs_inqueued(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) -#define fs_needsflush(conn) (fs_outqueued(conn) != 0) -#define fs_needsfill(conn) (fs_inqueued(conn) < (conn)->inNeed) -#define fs_needsconnect(conn) ((conn)->fs_fd < 0) -#define fs_data_read(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) - -#define FSIO_READY 1 -#define FSIO_BLOCK 0 -#define FSIO_ERROR -1 - -extern Bool _fs_reopen_server ( FSFpePtr conn ); -extern int _fs_write ( FSFpePtr conn, char *data, long size ); -extern int _fs_write_pad ( FSFpePtr conn, char *data, long len ); -extern int _fs_data_ready ( FSFpePtr conn ); -extern int _fs_wait_for_readable ( FSFpePtr conn, int ms ); -extern int _fs_set_bit ( fd_set * mask, int fd ); -extern int _fs_is_bit_set ( fd_set * mask, int fd ); -extern void _fs_bit_clear ( fd_set * mask, int fd ); -extern int _fs_any_bit_set ( fd_set * mask ); -extern void _fs_or_bits ( fd_set * dst, fd_set * m1, fd_set * m2 ); -extern long _fs_pad_length (long len); - -extern void _fs_connection_died ( FSFpePtr conn ); - -extern int _fs_fill (FSFpePtr conn); -extern int _fs_flush (FSFpePtr conn); -extern void _fs_mark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_unmark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_done_read (FSFpePtr conn, long size); -extern void _fs_io_reinit (FSFpePtr conn); -extern int _fs_start_read (FSFpePtr conn, long size, char **buf); -extern Bool _fs_io_init (FSFpePtr conn); -extern void _fs_io_fini (FSFpePtr conn); -extern int _fs_poll_connect (XtransConnInfo trans_conn, int timeout); -extern XtransConnInfo _fs_connect(char *servername, int *ret); - -/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX - * systems are broken and return EWOULDBLOCK when they should return EAGAIN - */ -#ifdef WIN32 -#define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) -#else -#if defined(EAGAIN) && defined(EWOULDBLOCK) -#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) -#else -#ifdef EAGAIN -#define ETEST() (errno == EAGAIN) -#else -#define ETEST() (errno == EWOULDBLOCK) -#endif -#endif -#endif -#ifdef WIN32 -#define ECHECK(err) (WSAGetLastError() == err) -#define ESET(val) WSASetLastError(val) -#else -#ifdef ISC -#define ECHECK(err) ((errno == err) || ETEST()) -#else -#define ECHECK(err) (errno == err) -#endif -#define ESET(val) errno = val -#endif - -#endif /* _FSIO_H_ */ diff --git a/nx-X11/lib/font/fc/fsio.h.XF86.reference b/nx-X11/lib/font/fc/fsio.h.XF86.reference deleted file mode 100644 index 974ef4a91..000000000 --- a/nx-X11/lib/font/fc/fsio.h.XF86.reference +++ /dev/null @@ -1,187 +0,0 @@ -/* $Xorg: fsio.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ -/* - * Copyright 1990 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Network Computing Devices not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ -/* $XFree86: xc/lib/font/fc/fsio.h,v 1.6 2001/01/17 19:43:29 dawes Exp $ */ - -#ifndef _FSIO_H_ -#define _FSIO_H_ - -#undef DEBUG -#define REQUEST_LOG_SIZE 100 - -typedef struct _fs_fpe_alternate { - char *name; - Bool subset; -} FSFpeAltRec, *FSFpeAltPtr; - - -/* Per client access contexts */ -typedef struct _fs_client_data { - pointer client; - struct _fs_client_data *next; - XID acid; - int auth_generation; -} FSClientRec, *FSClientPtr; - -#define FS_RECONNECT_POLL 1000 -#define FS_RECONNECT_WAIT 5000 -#define FS_GIVEUP_WAIT 20000 -#define FS_REQUEST_TIMEOUT 20000 -#define FS_OPEN_TIMEOUT 30000 -#define FS_REOPEN_TIMEOUT 10000 -#define FS_FLUSH_POLL 1000 - -typedef struct _fs_buf { - char *buf; /* data */ - long size; /* sizeof data */ - long insert; /* where to insert new data */ - long remove; /* where to remove old data */ -} FSBufRec, *FSBufPtr; - -#define FS_BUF_INC 1024 -#define FS_BUF_MAX 32768 - -#define FS_PENDING_WRITE 0x01 /* some write data is queued */ -#define FS_BROKEN_WRITE 0x02 /* writes are broken */ -#define FS_BROKEN_CONNECTION 0x04 /* connection is broken */ -#define FS_PENDING_REPLY 0x08 /* waiting for a reply */ -#define FS_GIVE_UP 0x10 /* font server declared useless */ -#define FS_COMPLETE_REPLY 0x20 /* complete reply ready */ -#define FS_RECONNECTING 0x40 - -#define FS_CONN_UNCONNECTED 0 -#define FS_CONN_CONNECTING 1 -#define FS_CONN_CONNECTED 2 -#define FS_CONN_SENT_PREFIX 3 -#define FS_CONN_RECV_INIT 4 -#define FS_CONN_SENT_CAT 5 -#define FS_CONN_RUNNING 6 - -/* FS specific font FontPathElement data */ -typedef struct _fs_fpe_data { - FSFpePtr next; /* list of all active fs fpes */ - int fs_fd; /* < 0 when not running */ - int fs_conn_state; /* connection state */ - int current_seq; - char *servername; - Bool has_catalogues; - - int generation; - int numAlts; - int alternate; /* which alternate is in use +1 */ - int fsMajorVersion; /* font server major version number */ - FSFpeAltPtr alts; - - FSClientPtr clients; - XID curacid; -#ifdef DEBUG - int reqindex; - struct { - int opcode; - int sequence; - } reqbuffer[REQUEST_LOG_SIZE]; -#endif - FSBufRec outBuf; /* request queue */ - FSBufRec inBuf; /* reply queue */ - long inNeed; /* amount needed for reply */ - - CARD32 blockState; - CARD32 blockedReplyTime; /* time to abort blocked read */ - CARD32 brokenWriteTime; /* time to retry broken write */ - CARD32 blockedConnectTime; /* time to abort blocked connect */ - CARD32 brokenConnectionTime; /* time to retry broken connection */ - - FSBlockDataPtr blockedRequests; - - struct _XtransConnInfo *trans_conn; /* transport connection object */ -} FSFpeRec; - -#define fs_outspace(conn) ((conn)->outBuf.size - (conn)->outBuf.insert) -#define fs_outqueued(conn) ((conn)->outBuf.insert - (conn)->outBuf.remove) -#define fs_inqueued(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) -#define fs_needsflush(conn) (fs_outqueued(conn) != 0) -#define fs_needsfill(conn) (fs_inqueued(conn) < (conn)->inNeed) -#define fs_needsconnect(conn) ((conn)->fs_fd < 0) -#define fs_data_read(conn) ((conn)->inBuf.insert - (conn)->inBuf.remove) - -#define FSIO_READY 1 -#define FSIO_BLOCK 0 -#define FSIO_ERROR -1 - -extern Bool _fs_reopen_server ( FSFpePtr conn ); -extern int _fs_write ( FSFpePtr conn, char *data, long size ); -extern int _fs_write_pad ( FSFpePtr conn, char *data, long len ); -extern int _fs_data_ready ( FSFpePtr conn ); -extern int _fs_wait_for_readable ( FSFpePtr conn, int ms ); -extern int _fs_set_bit ( fd_set * mask, int fd ); -extern int _fs_is_bit_set ( fd_set * mask, int fd ); -extern void _fs_bit_clear ( fd_set * mask, int fd ); -extern int _fs_any_bit_set ( fd_set * mask ); -extern void _fs_or_bits ( fd_set * dst, fd_set * m1, fd_set * m2 ); -extern long _fs_pad_length (long len); - -extern void _fs_connection_died ( FSFpePtr conn ); - -extern int _fs_fill (FSFpePtr conn); -extern int _fs_flush (FSFpePtr conn); -extern void _fs_mark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_unmark_block (FSFpePtr conn, CARD32 mask); -extern void _fs_done_read (FSFpePtr conn, long size); -extern void _fs_io_reinit (FSFpePtr conn); -extern int _fs_start_read (FSFpePtr conn, long size, char **buf); -extern Bool _fs_io_init (FSFpePtr conn); -extern void _fs_io_fini (FSFpePtr conn); -extern int _fs_poll_connect (XtransConnInfo trans_conn, int timeout); -extern XtransConnInfo _fs_connect(char *servername, int *ret); - -/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX - * systems are broken and return EWOULDBLOCK when they should return EAGAIN - */ -#ifdef WIN32 -#define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) -#else -#if defined(EAGAIN) && defined(EWOULDBLOCK) -#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) -#else -#ifdef EAGAIN -#define ETEST() (errno == EAGAIN) -#else -#define ETEST() (errno == EWOULDBLOCK) -#endif -#endif -#endif -#ifdef WIN32 -#define ECHECK(err) (WSAGetLastError() == err) -#define ESET(val) WSASetLastError(val) -#else -#ifdef ISC -#define ECHECK(err) ((errno == err) || ETEST()) -#else -#define ECHECK(err) (errno == err) -#endif -#define ESET(val) errno = val -#endif - -#endif /* _FSIO_H_ */ diff --git a/nx-X11/lib/font/fc/fslibos.h b/nx-X11/lib/font/fc/fslibos.h deleted file mode 100644 index dd266bdc4..000000000 --- a/nx-X11/lib/font/fc/fslibos.h +++ /dev/null @@ -1,216 +0,0 @@ -/* $Xorg: fslibos.h,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.8 2003/08/29 18:01:14 herrb Exp $ */ - -/* - * FSlib networking & os include file - */ - -#include - -#ifndef WIN32 - -/* - * makedepend screws up on #undef OPEN_MAX, so we define a new symbol - */ - -#ifndef FONT_OPEN_MAX - -#ifndef X_NOT_POSIX -# ifdef _POSIX_SOURCE -# include -# else -# define _POSIX_SOURCE -# include -# undef _POSIX_SOURCE -# endif -#endif -#ifndef SIZE_MAX -# ifdef ULONG_MAX -# define SIZE_MAX ULONG_MAX -# else -# define SIZE_MAX UINT_MAX -# endif -#endif -#ifndef OPEN_MAX -#if defined(SVR4) || defined(__UNIXOS2__) -#define OPEN_MAX 256 -#else -#include -#ifndef OPEN_MAX -#ifdef __OSF1__ -#define OPEN_MAX 256 -#else -#ifdef NOFILE -#define OPEN_MAX NOFILE -#else -#define OPEN_MAX NOFILES_MAX -#endif -#endif -#endif -#endif -#endif - -#if OPEN_MAX > 256 -#define FONT_OPEN_MAX 256 -#else -#define FONT_OPEN_MAX OPEN_MAX -#endif - -#endif /* FONT_OPEN_MAX */ - -#define NMSKBITS 32 - -#define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) - -typedef unsigned long FdSet[MSKCNT]; -typedef FdSet FdSetPtr; - -#if (MSKCNT==1) -#define BITMASK(i) (1 << (i)) -#define MASKIDX(i) 0 -#endif - -#if (MSKCNT>1) -#define BITMASK(i) (1 << ((i) & (NMSKBITS - 1))) -#define MASKIDX(i) ((i) / NMSKBITS) -#endif - -#define MASKWORD(buf, i) buf[MASKIDX(i)] -#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) -#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) -#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) - -#if (MSKCNT==1) -#define COPYBITS(src, dst) dst[0] = src[0] -#define CLEARBITS(buf) buf[0] = 0 -#define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0]) -#define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0]) -#define UNSETBITS(dst, b1) (dst[0] &= ~b1[0]) -#define ANYSET(src) (src[0]) -#endif - -#if (MSKCNT==2) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]); } -#define ORBITS(dst, b1, b2) {\ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]); } -#define UNSETBITS(dst, b1) {\ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; } -#define ANYSET(src) (src[0] || src[1]) -#endif - -#if (MSKCNT==3) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \ - dst[2] = src[2]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]);\ - dst[2] = (b1[2] & b2[2]); } -#define ORBITS(dst, b1, b2) {\ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]);\ - dst[2] = (b1[2] | b2[2]); } -#define UNSETBITS(dst, b1) {\ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; \ - dst[2] &= ~b1[2]; } -#define ANYSET(src) (src[0] || src[1] || src[2]) -#endif - -#if (MSKCNT==4) -#define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \ - dst[2] = src[2]; dst[3] = src[3] -#define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0 -#define MASKANDSETBITS(dst, b1, b2) \ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]);\ - dst[2] = (b1[2] & b2[2]);\ - dst[3] = (b1[3] & b2[3]) -#define ORBITS(dst, b1, b2) \ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]);\ - dst[2] = (b1[2] | b2[2]);\ - dst[3] = (b1[3] | b2[3]) -#define UNSETBITS(dst, b1) \ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; \ - dst[2] &= ~b1[2]; \ - dst[3] &= ~b1[3] -#define ANYSET(src) (src[0] || src[1] || src[2] || src[3]) -#endif - -#if (MSKCNT>4) -#define COPYBITS(src, dst) memmove((caddr_t) dst, (caddr_t) src,\ - MSKCNT*sizeof(long)) -#define CLEARBITS(buf) bzero((caddr_t) buf, MSKCNT*sizeof(long)) -#define MASKANDSETBITS(dst, b1, b2) \ - { int cri; \ - for (cri=MSKCNT; --cri>=0; ) \ - dst[cri] = (b1[cri] & b2[cri]); } -#define ORBITS(dst, b1, b2) \ - { int cri; \ - for (cri=MSKCNT; --cri>=0; ) \ - dst[cri] = (b1[cri] | b2[cri]); } -#define UNSETBITS(dst, b1) \ - { int cri; \ - for (cri=MSKCNT; --cri>=0; ) \ - dst[cri] &= ~b1[cri]; } -#if (MSKCNT==8) -#define ANYSET(src) (src[0] || src[1] || src[2] || src[3] || \ - src[4] || src[5] || src[6] || src[7]) -#endif -#endif - -#else /* not WIN32 */ - -#include -#include - -typedef fd_set FdSet; -typedef FdSet *FdSetPtr; - -#define CLEARBITS(set) FD_ZERO(&set) -#define BITSET(set,s) FD_SET(s,&set) -#define BITCLEAR(set,s) FD_CLR(s,&set) -#define GETBIT(set,s) FD_ISSET(s,&set) -#define ANYSET(set) set->fd_count - -#endif diff --git a/nx-X11/lib/font/fontcache/Imakefile b/nx-X11/lib/font/fontcache/Imakefile deleted file mode 100644 index 1c8526d6c..000000000 --- a/nx-X11/lib/font/fontcache/Imakefile +++ /dev/null @@ -1,29 +0,0 @@ -XCOMM Id: Imakefile,v 1.2 1999/01/31 13:02:46 akiyama Exp $ - - - -XCOMM $XFree86$ - -#include - -#if BuildFontCache -FONTCACHE_DEFINES = FontCacheExtensionDefines -#endif - INCLUDES = -I. -I$(FONTINCSRC) -I../include - HEADERS = - SRCS = fontcache.c - OBJS = fontcache.o - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SpecialCLibObjectRule(fontcache,$(ICONFIGFILES),$(FONTCACHE_DEFINES)) - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -DependTarget() diff --git a/nx-X11/lib/font/fontcache/fcqueue.h b/nx-X11/lib/font/fontcache/fcqueue.h deleted file mode 100644 index 58ba6dfa1..000000000 --- a/nx-X11/lib/font/fontcache/fcqueue.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $_Id_: queue.h,v 1.10.2.4 1998/05/12 16:35:25 bde Exp $ - * - * ---------------------------------------------------------------------- - * - * Note: - * This header file derived from FreeBSD-2.2.7 - * /usr/include/sys/queue.h, modified for X-TrueType Server by - * Shunsuke Akiyama . - * - * Id: fcqueue.h,v 1.1 1999/01/06 13:36:42 akiyama Exp $ - */ - -#ifndef _FCQUEUE_H_ -#define _FCQUEUE_H_ - -/* - * Tail queue definitions. - */ -#define TAILQ_HEAD(name, type) \ -struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ -} - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define TAILQ_ENTRY(type) \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ -} - -/* - * Tail queue functions. - */ -#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) - -#define TAILQ_FOREACH(var, head, field) \ - for (var = TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field)) - -#define TAILQ_FIRST(head) ((head)->tqh_first) - -#define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) - -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - -#define TAILQ_INIT(head) do { \ - (head)->tqh_first = NULL; \ - (head)->tqh_last = &(head)->tqh_first; \ -} while (0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (head)->tqh_first->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (head)->tqh_first = (elm); \ - (elm)->field.tqe_prev = &(head)->tqh_first; \ -} while (0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.tqe_next = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &(elm)->field.tqe_next; \ -} while (0) - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ - (elm)->field.tqe_next->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (listelm)->field.tqe_next = (elm); \ - (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -} while (0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -} while (0) - -#define TAILQ_REMOVE(head, elm, field) do { \ - if (((elm)->field.tqe_next) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ -} while (0) - -#endif /* _FCQUEUE_H_ */ diff --git a/nx-X11/lib/font/fontcache/fontcache.c b/nx-X11/lib/font/fontcache/fontcache.c deleted file mode 100644 index 40cfd63c2..000000000 --- a/nx-X11/lib/font/fontcache/fontcache.c +++ /dev/null @@ -1,1022 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcache.c,v 1.19 1999/01/31 13:06:00 akiyama Exp $ - */ -/* $XFree86: xc/lib/font/fontcache/fontcache.c,v 1.4 2001/04/05 17:42:28 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - -#include "fontcache.h" - -#define LOW_MARK 0 -#define HI_MARK 1 - -#define PURGE_ENTRY 1 -#define PURGE_BITMAP 2 - -typedef struct { - long hiMark; /* Cache hi water mark */ - long lowMark; /* Cache low water mark */ - long allocated; /* Cache allocated size */ - long used; /* Cache used size */ -} FontCacheSize_t; - -static int CacheInitialized = 0; - -static TAILQ_HEAD(FcInUseQueue, cache_entry) InUseQueueHead, *InUseQueue; -static TAILQ_HEAD(FcFreeQueue, cache_entry) FreeQueueHead, *FreeQueue; -static FCBCB FreeBitmapHead, *FreeBitmap; - -static long CacheHiMark; -static long CacheLowMark; -static int CacheBalance; -static FontCacheSize_t HashSize; -static FontCacheSize_t AllocSize; -static int NeedPurgeCache; -static FontCacheStatistics CacheStatistics; - -static void fc_assign_cache(void); -static int fc_assign_entry(void); -static void fc_flush_cache(void); -static int fc_get_bitmap_area(FontCacheEntryPtr, int); -static void fc_free_bitmap_area(FontCacheBitmapPtr); -static int fc_check_size(int); -static void fc_purge_cache(void); -static void fc_purge_bitmap(void); -static void fc_flush_cache_bitmap(void); -static void fc_flush_cache_inuse(void); -static void fc_flush_cache_free(void); -static void fc_purge_cache_entry(void); -static void fc_purge_cache_entry_pool(void); -static void fc_purge_bitmap_pool(void); - - -/* - * FontCacheInitialize() - * - * Initialize cache work area. - */ - -int -FontCacheInitialize() -{ -#ifdef FONTCACHE - int i; - - if (!CacheInitialized) { - /* - * first time initialization - */ -#if defined(HASH_DEBUG) || defined(DEBUG) - fprintf(stderr, "FontCacheInitialize: initializing cache\n"); -#endif - InUseQueue = &InUseQueueHead; - TAILQ_INIT(InUseQueue); - - FreeQueue = &FreeQueueHead; - TAILQ_INIT(FreeQueue); - - FreeBitmap = &FreeBitmapHead; - FreeBitmap->index = 0; - for (i = 0; i < FC_MEM_HASH_SIZE; i++) { - TAILQ_INIT(&FreeBitmap->head[i]); - } - - CacheHiMark = FC_DEFAULT_CACHE_SIZE * 1024; /* temporary */ - CacheLowMark = (CacheHiMark / 4) * 3; - CacheBalance = FC_CACHE_BALANCE; - - NeedPurgeCache = 0; - - HashSize.allocated = HashSize.used = 0; - AllocSize.allocated = AllocSize.used = 0; - fc_assign_cache(); - fc_assign_entry(); -#if defined(DEBUG) - fprintf(stderr, "FontCacheInitialize: hi=%ld, lo=%ld, bal=%d\n", - CacheHiMark, CacheLowMark, CacheBalance); -#endif - - CacheInitialized = 1; - } else { - /* - * second time or later case. - * flush and reassign cache. - */ -#if defined(HASH_DEBUG) || defined(DEBUG) - fprintf(stderr, "FontCacheInitialize: initializing cache, again\n"); -#endif - } - - memset(&CacheStatistics, 0, sizeof (CacheStatistics)); -#endif /* FONTCACHE */ - - return 0; /* make lint happy */ -} - -/* - * FontCacheChangeSettings() - * - * Change cache size and reinitialize work areas. - * - * Returns 0, if memory allocation failed. Otherwise 1. - */ - -int -FontCacheChangeSettings(FontCacheSettingsPtr cs) -{ - int result; - - if (!CacheInitialized) { - FontCacheInitialize(); - if (!CacheInitialized) - return 0; - } - -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, - "FontCahceChangeSettings: hi-mark=%ld, low-mark=%ld, balance=%ld\n", - cs->himark, cs->lowmark, cs->balance); -#endif - - fc_flush_cache(); - - CacheHiMark = cs->himark; - CacheLowMark = cs->lowmark; - CacheBalance = cs->balance; - - fc_assign_cache(); - result = fc_assign_entry(); - - return result; -} - -/* - * FontCacheGetSettings() - * - * Get current cache control parameters. - */ - -void -FontCacheGetSettings(FontCacheSettingsPtr cs) -{ - if (!CacheInitialized) { - FontCacheInitialize(); - if (!CacheInitialized) - return; - } - - cs->himark = CacheHiMark; - cs->lowmark = CacheLowMark; - cs->balance = CacheBalance; -} - -/* - * FontCacheGetStatistics() - * - * Get current cache statistics. - */ - -void -FontCacheGetStatistics(FontCacheStatisticsPtr cs) -{ - if (!CacheInitialized) { - FontCacheInitialize(); - if (!CacheInitialized) - return; - } - - CacheStatistics.purge_stat = NeedPurgeCache; - CacheStatistics.balance = CacheBalance; - CacheStatistics.f.usage = HashSize.used; - CacheStatistics.v.usage = AllocSize.used; - - memcpy(cs, &CacheStatistics, sizeof (CacheStatistics)); -} - -/* - * FontCacheOpenCache() - * - * Allocate font cache control block and initialize it. - * - * Returns pointer to font cache control block. Or returns NULL when - * detected illegal parameter or memory allocation failed. - */ - -FCCBPtr -FontCacheOpenCache(void *arg) -{ - int linesize; - FCCBPtr this; - int size = 0, mask = 0; - int i; - - static int sizes[] = { 16, 32, 64, 128, 0 }; - - if (!CacheInitialized) { - FontCacheInitialize(); - if (!CacheInitialized) - return NULL; - } - - linesize = (long)arg; -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "FontCacheOpenCache: line size=%d\n", linesize); -#endif - - for (i = 0; sizes[i] != 0; i++) { - if (sizes[i] == linesize) { - size = linesize; - mask = linesize - 1; - break; - } - } - if (sizes[i] == 0) { - return NULL; - } - - this = (FCCBPtr) malloc(sizeof (FCCB)); - if (this != NULL) { - memset(this, 0, sizeof (FCCB)); - this->head = (FontCacheHeadPtr) malloc(sizeof (FontCacheHead) * size); - if (this->head == NULL) { - free(this); - this = NULL; - } else { - this->size = size; - this->mask = mask; - for (i = 0; i < size; i++) { - TAILQ_INIT(&this->head[i]); - } - } - } - - return this; -} - -/* - * FontCacheCloseCache() - * - * Release font cache control block and all it's related entries. - */ - -void -FontCacheCloseCache(FCCBPtr this) -{ - FontCacheEntryPtr entry, next; - int i; - int size; - - if (!CacheInitialized) { - return; - } - - size = this->size; - for (i = 0; i < size; i++) { - entry = TAILQ_FIRST(&this->head[i]); - while (entry != NULL) { - /* remove entry from in-use queue, here */ - TAILQ_REMOVE(InUseQueue, entry, c_lru); - - /* remove entry from the hash */ - if (entry->bitmapsize > FC_SMALL_BITMAP_SIZE - && entry->charInfo.bits != NULL) { - fc_free_bitmap_area(entry->bmp); - } - entry->charInfo.bits = NULL; - entry->bitmapsize = 0; - - next = TAILQ_NEXT(entry, c_hash); - TAILQ_INSERT_HEAD(FreeQueue, entry, c_lru); - HashSize.used -= sizeof (FontCacheEntry); - entry = next; - } - } - - free(this->head); - free(this); -} - -/* - * FontCacheGetEntry() - * - * Allocate font cache entry and initialize it. - */ - -FontCacheEntryPtr -FontCacheGetEntry() -{ - FontCacheEntryPtr entry; - FontCacheEntryPtr p; - long size; - - /* scan in-use queue and purge if required */ - fc_purge_cache(); - - /* allocate hash entry */ - if (TAILQ_EMPTY(FreeQueue)) { - size = sizeof (FontCacheEntry); - p = (FontCacheEntryPtr) malloc(size); - if (p != NULL) { - TAILQ_INSERT_HEAD(FreeQueue, p, c_lru); - HashSize.allocated += size; -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "FontCachegetEntry: allocated new entry\n"); -#endif - } - } - - if (!TAILQ_EMPTY(FreeQueue)) { - entry = TAILQ_FIRST(FreeQueue); - TAILQ_REMOVE(FreeQueue, entry, c_lru); - memset(entry, 0, sizeof (FontCacheEntry)); - } else { - entry = NULL; - } - - return entry; -} - -/* - * FontCacheGetBitmap() - * - * Allocate font glyph bitmap area. - * - * Note: - * Allocated area should be cleared. - */ - -int -FontCacheGetBitmap(FontCacheEntryPtr entry, int size) -{ - int oldsize; - int result; - - /* XXX */ - if ((AllocSize.used > AllocSize.hiMark - size) && - (size > FC_SMALL_BITMAP_SIZE)) { - fc_purge_bitmap(); - } - - if (size < 0) /* wrong size */ - return 0; - - result = 0; - oldsize = entry->bitmapsize; - if (size <= FC_SMALL_BITMAP_SIZE) { - /* use coresponding bitmap area */ - if (oldsize > FC_SMALL_BITMAP_SIZE) { - /* We don't need allocated area anymore */ - fc_free_bitmap_area(entry->bmp); - } - entry->bitmapsize = size; - if (size > 0) { - entry->charInfo.bits = entry->bitmap; - memset(entry->charInfo.bits, 0, size); - } else - entry->charInfo.bits = NULL; - - result = 1; - } else { - /* need extra bitmap area */ - if (entry->charInfo.bits == NULL) { - /* no any extra bitmap area */ - if (fc_get_bitmap_area(entry, size)) { - entry->bitmapsize = size; - memset(entry->charInfo.bits, 0, size); - if (fc_check_size(HI_MARK)) { - fc_purge_cache(); - } - result = 1; - } - } else { - /* we already have extra bitmap area */ - if (oldsize == size) { - /* same size, reuse it */ - memset(entry->charInfo.bits, 0, size); - result = 1; - } else { - /* different size */ - fc_free_bitmap_area(entry->bmp); - if (fc_get_bitmap_area(entry, size)) { - entry->bitmapsize = size; - memset(entry->charInfo.bits, 0, size); - if (fc_check_size(HI_MARK)) { - fc_purge_cache(); - } - result = 1; - } - } - } - } - - return result; -} - -/* - * FontCacheSearchEntry() - * - * Search an entry matched with the key from the hash. - */ - -int -FontCacheSearchEntry(FCCBPtr this, int key, FontCacheEntryPtr *value) -{ - FontCacheHeadPtr head; - FontCacheEntryPtr entry; - int index; - - index = key & this->mask; - head = &this->head[index]; - - TAILQ_FOREACH(entry, head, c_hash) { - if (entry->key == key) { - /* found, change position */ - CacheStatistics.f.hits++; - - TAILQ_REMOVE(InUseQueue, entry, c_lru); - TAILQ_INSERT_HEAD(InUseQueue, entry, c_lru); - - TAILQ_REMOVE(head, entry, c_hash); - TAILQ_INSERT_HEAD(head, entry, c_hash); - - /* purge least recentrly used cache entirs */ - fc_purge_cache(); - - *value = entry; - return 1; - } - } - - /* purge least recentrly used cache entirs */ - fc_purge_cache(); - - /* not found */ - CacheStatistics.f.misshits++; - *value = NULL; - return 0; -} - -/* - * FontCacheInsertEntry() - * - * Insert an entry into the cache pool. - */ - -int -FontCacheInsertEntry(FCCBPtr this, int key, FontCacheEntryPtr entry) -{ - FontCacheHeadPtr head; - int index; - - index = key & this->mask; - head = &this->head[index]; - - entry->key = key; - entry->c_head = head; - TAILQ_INSERT_HEAD(head, entry, c_hash); - - /* insert entry into in-use queue */ - TAILQ_INSERT_HEAD(InUseQueue, entry, c_lru); - - /* adjust cache in-use size */ - HashSize.used += sizeof (FontCacheEntry); - if (fc_check_size(HI_MARK)) { - fc_purge_cache(); - } - - return 1; -} - -/* - * fc_assign_cache() - * - * Assign cache size considered with cache balance rate. - */ - -static void -fc_assign_cache() -{ - HashSize.hiMark = (CacheHiMark * CacheBalance) / 100; - HashSize.lowMark = (CacheLowMark * CacheBalance) / 100; - - AllocSize.hiMark = (CacheHiMark * (100 - CacheBalance)) / 100; - AllocSize.lowMark = (CacheLowMark * (100 - CacheBalance)) / 100; -} - -/* - * fc_assign_entry() - * - * Assign cache entry into free queue. - * - * Returns 0, when memory allocation failed. Otherwise 1. - */ - -static int -fc_assign_entry() -{ - FontCacheEntryPtr entry; - long used; - int result = 1; - - used = 0; - while ((used + sizeof (FontCacheEntry)) < HashSize.hiMark) { - entry = (FontCacheEntryPtr) malloc(sizeof (FontCacheEntry)); - if (entry == NULL) { - fprintf(stderr, "fc_assign_entry: can't allocate memory.\n"); - result = 0; - break; - } - TAILQ_INSERT_HEAD(FreeQueue, entry, c_lru); - used += sizeof (FontCacheEntry); - HashSize.allocated += sizeof (FontCacheEntry); - } - - return result; -} - -/* - * fc_get_bitmap_area() - * - * Search allocated memory area from free bitmap hash pool. If there - * is no entry, then allocate new bitmap area. - * - * Returns 0, when memory allocation failed, otherwise 1. And some - * sort of cache entry structure members were updated. - */ - -static int -fc_get_bitmap_area(FontCacheEntryPtr this, int size) -{ - FontCacheBitmapHeadPtr head; - FontCacheBitmapPtr bitmap; - int index; - int result = 0; - - index = size & FC_MEM_HASH_MASK; - head = &FreeBitmap->head[index]; - TAILQ_FOREACH(bitmap, head, b_hash) { - if (bitmap->key == size) { - TAILQ_REMOVE(head, bitmap, b_hash); - this->bmp = bitmap; - this->charInfo.bits = (char *) (bitmap + 1); - bitmap->b_entry = this; - result = 1; - CacheStatistics.v.hits++; - AllocSize.used += (size + sizeof (FontCacheBitmap)); -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_get_bitmap_area: bitmap entry found in pool\n"); -#endif - break; - } - } - - if (result == 0) { - CacheStatistics.v.misshits++; - bitmap = (FontCacheBitmapPtr) malloc(size + sizeof (FontCacheBitmap)); - if (bitmap != NULL) { - bitmap->b_entry = this; - bitmap->size = size + sizeof (FontCacheBitmap); - bitmap->key = size; - this->bmp = bitmap; - this->charInfo.bits = (char *) (bitmap + 1); - AllocSize.allocated += (size + sizeof (FontCacheBitmap)); - AllocSize.used += (size + sizeof (FontCacheBitmap)); - result = 1; -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_get_bitmap_area: bitmap entry allocated\n"); -#endif - } else { - this->bmp = NULL; - this->charInfo.bits = NULL; - } - } - - return result; -} - -/* - * fc_free_bitmap_area() - * - * Release allocated bitmap area into free hash pool. - */ - -static void -fc_free_bitmap_area(FontCacheBitmapPtr this) -{ - FontCacheBitmapHeadPtr head; - FontCacheEntryPtr entry; - int index; - -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_free_bitmap_area: bitmap entry returns into pool\n"); -#endif - - index = this->key & FC_MEM_HASH_MASK; - head = &FreeBitmap->head[index]; - TAILQ_INSERT_HEAD(head, this, b_hash); - - AllocSize.used -= this->size; - - entry = this->b_entry; - entry->bmp = NULL; - entry->bitmapsize = 0; -} - -/* - * fc_flush_cache_bitmap() - * - * Flush all allocated bitmap area from the free hash pool. - */ - -static void -fc_flush_cache_bitmap() -{ - FontCacheBitmapHeadPtr head; - FontCacheBitmapPtr bitmap; - int i; - - for (i = 0; i < FC_MEM_HASH_SIZE; i++) { - head = &FreeBitmap->head[i]; - while (!TAILQ_EMPTY(head)) { - bitmap = TAILQ_FIRST(head); - TAILQ_REMOVE(head, bitmap, b_hash); - - AllocSize.allocated -= bitmap->size; - free(bitmap); - } - } -} - -/* - * fc_flush_cache_inuse() - * - * Release all in-use cache entries. - */ - -static void -fc_flush_cache_inuse() -{ - FontCacheEntryPtr entry; - FontCacheHeadPtr head; - - while (!TAILQ_EMPTY(InUseQueue)) { - /* remove this entry from in-use queue */ - entry = TAILQ_FIRST(InUseQueue); - TAILQ_REMOVE(InUseQueue, entry, c_lru); - - /* remove this entry from hash */ - head = entry->c_head; - TAILQ_REMOVE(head, entry, c_hash); - - /* release bitmap area */ - if (entry->bitmapsize > FC_SMALL_BITMAP_SIZE - && entry->charInfo.bits != NULL) { - fc_free_bitmap_area(entry->bmp); - } - entry->charInfo.bits = NULL; - entry->bitmapsize = 0; - - /* release font-specific private area */ - if ( entry->vfuncs && entry->vfuncs->f_private_dispose ) - (*entry->vfuncs->f_private_dispose)(entry->f_private); - entry->f_private = NULL; - entry->vfuncs = NULL; - - /* add this entry to free queue */ - TAILQ_INSERT_HEAD(FreeQueue, entry, c_lru); - - /* adjust size */ - HashSize.used -= sizeof (FontCacheEntry); - } -} - -/* - * fc_flush_cache_free() - * - * Flush all free cache entries from the free cache queue. - */ - -static void -fc_flush_cache_free() -{ - FontCacheEntryPtr entry; - - /* release entire entries of the free queue */ - while (!TAILQ_EMPTY(FreeQueue)) { - entry = TAILQ_FIRST(FreeQueue); - TAILQ_REMOVE(FreeQueue, entry, c_lru); - free(entry); - HashSize.allocated -= sizeof (FontCacheEntry); - } -} - -/* - * fc_flush_cache() - * - * Flush all cache entries and allocated bitmap area from the pool. - */ - -static void -fc_flush_cache() -{ - fc_flush_cache_inuse(); - fc_flush_cache_bitmap(); - fc_flush_cache_free(); - - memset(&CacheStatistics, 0, sizeof (CacheStatistics)); -} - -/* - * fc_check_size() - * - * Check cache size, then return it's result. - */ - -static int -fc_check_size(int mark) -{ - int result = 0; - - if (mark == LOW_MARK) { - if (HashSize.used > HashSize.lowMark) { - result |= PURGE_ENTRY; - } - if (AllocSize.used > AllocSize.lowMark) { - result |= PURGE_BITMAP; - } - } else { - if (HashSize.used > HashSize.hiMark) { - result |= PURGE_ENTRY; - } - if (AllocSize.used > AllocSize.hiMark) { - result |= PURGE_BITMAP; - } - } - - return result; -} - -/* - * fc_purge_cache_entry() - * - * Purge least recently used cache entry. - */ - -static void -fc_purge_cache_entry() -{ - FontCacheHeadPtr head; - FontCacheEntryPtr entry; - int i; - - for (i = 0; i < FC_PURGE_PER_SCAN; i++) { - /* get least recently used entry */ - entry = TAILQ_LAST(InUseQueue, FcInUseQueue); - -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_cache_entry: purged: %p, %d\n", - entry, entry->key); -#endif - - /* remove this entry from in-use queue */ - TAILQ_REMOVE(InUseQueue, entry, c_lru); - - /* remove this entry from the hash */ - head = entry->c_head; - TAILQ_REMOVE(head, entry, c_hash); - - /* release bitmap area */ - if (entry->bitmapsize > FC_SMALL_BITMAP_SIZE - && entry->charInfo.bits != NULL) { - fc_free_bitmap_area(entry->bmp); - CacheStatistics.v.purged++; - } - entry->charInfo.bits = NULL; - entry->bitmapsize = 0; - - /* release font-specific private area */ - if ( entry->vfuncs && entry->vfuncs->f_private_dispose ) - (*entry->vfuncs->f_private_dispose)(entry->f_private); - entry->f_private = NULL; - entry->vfuncs = NULL; - - /* add this entry to free queue */ - TAILQ_INSERT_HEAD(FreeQueue, entry, c_lru); - - HashSize.used -= sizeof (FontCacheEntry); - CacheStatistics.f.purged++; - } -} - -/* - * fc_purge_cache_entry_pool() - * - * Purge free cache entries, to adjust cache size. - */ - -static void -fc_purge_cache_entry_pool() -{ - FontCacheEntryPtr entry; - - while (!TAILQ_EMPTY(FreeQueue)) { - entry = TAILQ_LAST(FreeQueue, FcFreeQueue); - TAILQ_REMOVE(FreeQueue, entry, c_lru); -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_cache_entry_pool: purged from free queue: %p\n", - entry); -#endif - HashSize.allocated -= sizeof (FontCacheEntry); - free(entry); - if (HashSize.allocated <= HashSize.hiMark) { - break; - } - } -} - -/* - * fc_purge_bitmap() - * - * Purge least recently used allocated bitmap area. - */ - -static void -fc_purge_bitmap() -{ - FontCacheEntryPtr entry, first; - int purged = 0; - - /* release used entry, if required */ - first = TAILQ_FIRST(InUseQueue); - if (first != NULL) { - entry = TAILQ_LAST(InUseQueue, FcInUseQueue); - while (purged < FC_PURGE_PER_SCAN) { - if (entry->bmp != NULL) { -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_bitmap: purged from live queue: %p, %d(%d)\n", - entry->bmp, entry->bmp->key, entry->bmp->size); -#endif - fc_free_bitmap_area(entry->bmp); - entry->charInfo.bits = NULL; - CacheStatistics.v.purged++; - purged++; - } - if (entry == first) { - break; - } - entry = TAILQ_PREV(entry, FcInUseQueue, c_lru); - } - } -} - -/* - * fc_purge_bitmap_pool() - * - * Purge free bitmap area from pool, to adjust cache size. - */ - -static void -fc_purge_bitmap_pool() -{ - int this, stop, quit; - FontCacheBitmapHeadPtr head; - FontCacheBitmapPtr bitmap; - - /* release free bitmap entry */ - this = FreeBitmap->index; - stop = this; - quit = 0; - - do { - head = &FreeBitmap->head[this]; - while (!TAILQ_EMPTY(head)) { - bitmap = TAILQ_LAST(head, fcmem_head); - TAILQ_REMOVE(head, bitmap, b_hash); -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_bitmap_pool: purged from pool: %p, %d(%d)\n", - bitmap, bitmap->key, bitmap->size); -#endif - AllocSize.allocated -= bitmap->size; - free(bitmap); - if (AllocSize.allocated <= AllocSize.hiMark) { - quit = 1; - break; - } - } - this++; - this &= FC_MEM_HASH_MASK; - } while (this != stop && quit == 0); - - FreeBitmap->index++; - FreeBitmap->index &= FC_MEM_HASH_MASK; -} - -/* - * fc_purge_cache() - * - * Purge font cache, if required. - */ - -static void -fc_purge_cache() -{ - int strategy; - - if (NeedPurgeCache) { - strategy = fc_check_size(LOW_MARK); - switch (strategy) { - case PURGE_ENTRY : - CacheStatistics.purge_runs++; - fc_purge_cache_entry(); - break; - case PURGE_BITMAP : - CacheStatistics.purge_runs++; - fc_purge_bitmap(); - break; - case (PURGE_ENTRY | PURGE_BITMAP) : - CacheStatistics.purge_runs++; - fc_purge_cache_entry(); - fc_purge_bitmap(); - break; - default : - NeedPurgeCache = 0; - break; - } - } else { - strategy = fc_check_size(HI_MARK); - switch (strategy) { - case PURGE_ENTRY : - if ((CacheBalance + FC_BALANCE_DIFFS) <= FC_BALANCE_HI) { - CacheBalance += FC_BALANCE_DIFFS; -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_cache: cache balance changed to %d\n", CacheBalance); -#endif - fc_assign_cache(); - fc_purge_bitmap_pool(); - } else { - CacheStatistics.purge_runs++; - NeedPurgeCache = 1; - while (fc_check_size(HI_MARK) & PURGE_ENTRY) { - fc_purge_cache_entry(); - } - } - break; - case PURGE_BITMAP : - if ((CacheBalance - FC_BALANCE_DIFFS) >= FC_BALANCE_LOW) { - CacheBalance -= FC_BALANCE_DIFFS; -#if defined(HASH_DEBUG) || defined(DEBUG) -fprintf(stderr, "fc_purge_cache: cache balance changed to %d\n", CacheBalance); -#endif - fc_assign_cache(); - fc_purge_cache_entry_pool(); - } else { - CacheStatistics.purge_runs++; - NeedPurgeCache = 1; - while (fc_check_size(HI_MARK) & PURGE_BITMAP) { - fc_purge_bitmap(); - } - } - break; - case (PURGE_ENTRY | PURGE_BITMAP) : - CacheStatistics.purge_runs++; - NeedPurgeCache = 1; - while (fc_check_size(HI_MARK)) { - fc_purge_cache_entry(); - fc_purge_bitmap(); - } - break; - default : - break; - } - } -} diff --git a/nx-X11/lib/font/fontcache/fontcache.h b/nx-X11/lib/font/fontcache/fontcache.h deleted file mode 100644 index c95de25eb..000000000 --- a/nx-X11/lib/font/fontcache/fontcache.h +++ /dev/null @@ -1,121 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcache.h,v 1.12 1999/01/09 06:24:30 akiyama Exp $ - */ -/* $XFree86: xc/lib/font/fontcache/fontcache.h,v 1.6 2002/11/08 00:46:27 alanh Exp $ */ - -#ifndef _FONTCACHE_H_ -#define _FONTCACHE_H_ - -#include -#include -#include "fcqueue.h" -#define _FONTCACHE_SERVER_ -#include - -/* constant declarations */ - -#ifndef FC_DEFAULT_CACHE_SIZE -#define FC_DEFAULT_CACHE_SIZE 5120 /* in KB */ -#endif - -#define FC_CACHE_BALANCE 70 /* in percentage */ -#define FC_BALANCE_LOW 10 /* in percentage */ -#define FC_BALANCE_HI 90 /* in percentage */ -#define FC_BALANCE_DIFFS 5 /* in percentage */ - -#define FC_SMALL_BITMAP_SIZE 128 - -#define FC_MEM_HASH_SIZE 256 -#define FC_MEM_HASH_MASK (FC_MEM_HASH_SIZE - 1) - -#define FC_PURGE_PER_SCAN 2 - -/* data type declarations */ - -struct cache_entry; -struct fcbitmap; - -TAILQ_HEAD(fchash_head, cache_entry); -TAILQ_HEAD(fcmem_head, fcbitmap); - -struct fcbitmap { - TAILQ_ENTRY(fcbitmap) b_hash; - struct cache_entry *b_entry; - int size; - int key; -}; - -struct fc_entry_vfuncs { - void (*f_private_dispose)(void *f_private); -}; - -struct cache_entry { - TAILQ_ENTRY(cache_entry) c_hash; /* Hash chain. */ - TAILQ_ENTRY(cache_entry) c_lru; /* Font cache LRU list chain. */ - struct fchash_head *c_head; /* Pointer to head. */ - int key; /* hash key */ - CharInfoRec charInfo; /* CharInfo record */ - struct fcbitmap *bmp; - void *f_private; /* Font-specific private data */ - struct fc_entry_vfuncs *vfuncs; /* virtual function table */ - int bitmapsize; /* Bitmap size */ - char bitmap[FC_SMALL_BITMAP_SIZE]; /* Small bitmap data area */ -}; - -struct fchash { - int size; - int mask; - struct fchash_head *head; -}; - -struct fcmemhash { - int index; - struct fcmem_head head[FC_MEM_HASH_SIZE]; -}; - -typedef struct fcbitmap FontCacheBitmap, *FontCacheBitmapPtr; -typedef struct cache_entry FontCacheEntry, *FontCacheEntryPtr; -typedef struct fchash_head FontCacheHead, *FontCacheHeadPtr; -typedef struct fcmem_head FontCacheBitmapHead, *FontCacheBitmapHeadPtr; -typedef struct fchash FCCB, *FCCBPtr; -typedef struct fcmemhash FCBCB, *FCBCBPtr; - -/* Function prototypes */ - -int FontCacheInitialize(void); -FCCBPtr FontCacheOpenCache(void * /* arg */); -void FontCacheCloseCache(FCCBPtr /* this */); -FontCacheEntryPtr FontCacheGetEntry(void); -int FontCacheSearchEntry(FCCBPtr /* this */, int /* key */, - FontCacheEntryPtr * /* value */); -int FontCacheInsertEntry(FCCBPtr /* this */, int /* key */, - FontCacheEntryPtr /* entry */); -int FontCacheGetBitmap(FontCacheEntryPtr /* entry */, - int /* size */); - -#endif /* _FONTCACHE_H_ */ diff --git a/nx-X11/lib/font/fontfile/Imakefile b/nx-X11/lib/font/fontfile/Imakefile deleted file mode 100644 index fa075a951..000000000 --- a/nx-X11/lib/font/fontfile/Imakefile +++ /dev/null @@ -1,81 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.20 2001/11/03 23:03:00 dawes Exp $ - -#include - -#if BuildServer && DoLoadableServer -#define IHaveSubdirs -#define NoLibSubdirs -SUBDIRS = module -#endif - - INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include \ - -I$(INCLUDESRC) - HEADERS = -#ifdef FontFormatDefines -FORMAT_DEFS = FontFormatDefines -#endif - -#if BuildSpeedo -SPEEDO_DEFINES = -DBUILD_SPEEDO -#endif -#if BuildType1 -TYPE1_DEFINES = -DBUILD_TYPE1 -#endif -#if BuildCID -CID_DEFINES = -DBUILD_CID -#endif -#if BuildFreeType -FREETYPE_DEFINES = -DBUILD_FREETYPE -#endif - -#if FontencCompatibility - COMPAT_SRC = fontencc.c - COMPAT_OBJ = fontencc.o -#endif - -#if GzipFontCompression - GUNZIP_SRC = gunzip.c - GUNZIP_OBJ = gunzip.o - GZIP_DEFS = -DX_GZIP_FONT_COMPRESSION -#endif - -FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(ENCODINGSDIR)/encodings.dir\" - - DEFINES = StrcasecmpDefines \ - $(SPEEDO_DEFINES) $(TYPE1_DEFINES) $(CID_DEFINES) \ - $(FREETYPE_DEFINES) $(FONTENCDEFS) \ - $(GZIP_DEFS) - - SRCS = dirfile.c fontdir.c fontfile.c fileio.c fontscale.c \ - defaults.c bitsource.c register.c renderers.c bufio.c \ - decompress.c filewr.c printerfont.c ffcheck.c \ - fontenc.c encparse.c $(COMPAT_SRC) $(GUNZIP_SRC) - OBJS = dirfile.o fontdir.o fontfile.o fileio.o fontscale.o \ - defaults.o bitsource.o register.o renderers.o bufio.o \ - decompress.o filewr.o printerfont.o ffcheck.o \ - fontenc.o encparse.o $(COMPAT_OBJ) $(GUNZIP_OBJ) - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SpecialCLibObjectRule(fileio,$(ICONFIGFILES),$(GZIP_DEFS)) - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -#if BuildServer && DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() - diff --git a/nx-X11/lib/font/fontfile/bitsource.c b/nx-X11/lib/font/fontfile/bitsource.c deleted file mode 100644 index ae27de8fe..000000000 --- a/nx-X11/lib/font/fontfile/bitsource.c +++ /dev/null @@ -1,174 +0,0 @@ -/* $Xorg: bitsource.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/bitsource.c,v 1.3 2001/01/17 19:43:29 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -BitmapSourcesRec FontFileBitmapSources; - -Bool -FontFileRegisterBitmapSource (FontPathElementPtr fpe) -{ - FontPathElementPtr *new; - int i; - int newsize; - - for (i = 0; i < FontFileBitmapSources.count; i++) - if (FontFileBitmapSources.fpe[i] == fpe) - return TRUE; - if (FontFileBitmapSources.count == FontFileBitmapSources.size) - { - newsize = FontFileBitmapSources.size + 4; - new = (FontPathElementPtr *) xrealloc (FontFileBitmapSources.fpe, newsize * sizeof *new); - if (!new) - return FALSE; - FontFileBitmapSources.size = newsize; - FontFileBitmapSources.fpe = new; - } - FontFileBitmapSources.fpe[FontFileBitmapSources.count++] = fpe; - return TRUE; -} - -void -FontFileUnregisterBitmapSource (FontPathElementPtr fpe) -{ - int i; - - for (i = 0; i < FontFileBitmapSources.count; i++) - if (FontFileBitmapSources.fpe[i] == fpe) - { - FontFileBitmapSources.count--; - if (FontFileBitmapSources.count == 0) - { - FontFileBitmapSources.size = 0; - xfree (FontFileBitmapSources.fpe); - FontFileBitmapSources.fpe = 0; - } - else - { - for (; i < FontFileBitmapSources.count; i++) - FontFileBitmapSources.fpe[i] = FontFileBitmapSources.fpe[i+1]; - } - break; - } -} - -/* - * Our set_path_hook: unregister all bitmap sources. - * This is necessary because already open fonts will keep their FPEs - * allocated, but they may not be on the new font path. - * The bitmap sources in the new path will be registered by the init_func. - */ -void -FontFileEmptyBitmapSource(void) -{ - if (FontFileBitmapSources.count == 0) - return; - - FontFileBitmapSources.count = 0; - FontFileBitmapSources.size = 0; - xfree (FontFileBitmapSources.fpe); - FontFileBitmapSources.fpe = 0; -} - -int -FontFileMatchBitmapSource (FontPathElementPtr fpe, - FontPtr *pFont, - int flags, - FontEntryPtr entry, - FontNamePtr zeroPat, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Bool noSpecificSize) -{ - int source; - FontEntryPtr zero; - FontBitmapEntryPtr bitmap; - int ret; - FontDirectoryPtr dir; - FontScaledPtr scaled; - - /* - * Look through all the registered bitmap sources for - * the same zero name as ours; entries along that one - * can be scaled as desired. - */ - ret = BadFontName; - for (source = 0; source < FontFileBitmapSources.count; source++) - { - if (FontFileBitmapSources.fpe[source] == fpe) - continue; - dir = (FontDirectoryPtr) FontFileBitmapSources.fpe[source]->private; - zero = FontFileFindNameInDir (&dir->scalable, zeroPat); - if (!zero) - continue; - scaled = FontFileFindScaledInstance (zero, vals, noSpecificSize); - if (scaled) - { - if (scaled->pFont) - { - *pFont = scaled->pFont; - (*pFont)->fpe = FontFileBitmapSources.fpe[source]; - ret = Successful; - } - else if (scaled->bitmap) - { - entry = scaled->bitmap; - bitmap = &entry->u.bitmap; - if (bitmap->pFont) - { - *pFont = bitmap->pFont; - (*pFont)->fpe = FontFileBitmapSources.fpe[source]; - ret = Successful; - } - else - { - ret = FontFileOpenBitmap ( - FontFileBitmapSources.fpe[source], - pFont, flags, entry, format, fmask); - if (ret == Successful && *pFont) - (*pFont)->fpe = FontFileBitmapSources.fpe[source]; - } - } - else /* "cannot" happen */ - { - ret = BadFontName; - } - break; - } - } - return ret; -} diff --git a/nx-X11/lib/font/fontfile/bufio.c b/nx-X11/lib/font/fontfile/bufio.c deleted file mode 100644 index 43c6a13a7..000000000 --- a/nx-X11/lib/font/fontfile/bufio.c +++ /dev/null @@ -1,212 +0,0 @@ -/* $Xorg: bufio.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.9 2001/12/14 19:56:50 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -BufFilePtr -BufFileCreate (char *private, - int (*input)(BufFilePtr), - int (*output)(int, BufFilePtr), - int (*skip)(BufFilePtr, int), - int (*close)(BufFilePtr, int)) -{ - BufFilePtr f; - - f = (BufFilePtr) xalloc (sizeof *f); - if (!f) - return 0; - f->private = private; - f->bufp = f->buffer; - f->left = 0; - f->input = input; - f->output = output; - f->skip = skip; - f->eof = 0; - f->close = close; - return f; -} - -#define FileDes(f) ((int)(long) (f)->private) - -static int -BufFileRawFill (BufFilePtr f) -{ - int left; - - left = read (FileDes(f), (char *)f->buffer, BUFFILESIZE); - if (left <= 0) { - f->left = 0; - return BUFFILEEOF; - } - f->left = left - 1; - f->bufp = f->buffer + 1; - return f->buffer[0]; -} - -static int -BufFileRawSkip (BufFilePtr f, int count) -{ - int curoff; - int fileoff; - int todo; - - curoff = f->bufp - f->buffer; - fileoff = curoff + f->left; - if (curoff + count <= fileoff) { - f->bufp += count; - f->left -= count; - } else { - todo = count - (fileoff - curoff); - if (lseek (FileDes(f), todo, 1) == -1) { - if (errno != ESPIPE) - return BUFFILEEOF; - while (todo) { - curoff = BUFFILESIZE; - if (curoff > todo) - curoff = todo; - fileoff = read (FileDes(f), (char *)f->buffer, curoff); - if (fileoff <= 0) - return BUFFILEEOF; - todo -= fileoff; - } - } - f->left = 0; - } - return count; -} - -static int -BufFileRawClose (BufFilePtr f, int doClose) -{ - if (doClose) - close (FileDes (f)); - return 1; -} - -BufFilePtr -BufFileOpenRead (int fd) -{ -#if defined(__UNIXOS2__) || defined (WIN32) - /* hv: I'd bet WIN32 has the same effect here */ - setmode(fd,O_BINARY); -#endif - return BufFileCreate ((char *)(long) fd, BufFileRawFill, 0, BufFileRawSkip, BufFileRawClose); -} - -static int -BufFileRawFlush (int c, BufFilePtr f) -{ - int cnt; - - if (c != BUFFILEEOF) - *f->bufp++ = c; - cnt = f->bufp - f->buffer; - f->bufp = f->buffer; - f->left = BUFFILESIZE; - if (write (FileDes(f), (char *)f->buffer, cnt) != cnt) - return BUFFILEEOF; - return c; -} - -BufFilePtr -BufFileOpenWrite (int fd) -{ - BufFilePtr f; - -#if defined(__UNIXOS2__) || defined(WIN32) - /* hv: I'd bet WIN32 has the same effect here */ - setmode(fd,O_BINARY); -#endif - f = BufFileCreate ((char *)(long) fd, 0, BufFileRawFlush, 0, BufFileFlush); - f->bufp = f->buffer; - f->left = BUFFILESIZE; - return f; -} - -int -BufFileRead (BufFilePtr f, char *b, int n) -{ - int c, cnt; - cnt = n; - while (cnt--) { - c = BufFileGet (f); - if (c == BUFFILEEOF) - break; - *b++ = c; - } - return n - cnt - 1; -} - -int -BufFileWrite (BufFilePtr f, char *b, int n) -{ - int cnt; - cnt = n; - while (cnt--) { - if (BufFilePut (*b++, f) == BUFFILEEOF) - return BUFFILEEOF; - } - return n; -} - -int -BufFileFlush (BufFilePtr f, int doClose) -{ - if (f->bufp != f->buffer) - return (*f->output) (BUFFILEEOF, f); - return 0; -} - -int -BufFileClose (BufFilePtr f, int doClose) -{ - int ret; - ret = (*f->close) (f, doClose); - xfree (f); - return ret; -} - -void -BufFileFree (BufFilePtr f) -{ - xfree (f); -} diff --git a/nx-X11/lib/font/fontfile/decompress.c b/nx-X11/lib/font/fontfile/decompress.c deleted file mode 100644 index c7e649f91..000000000 --- a/nx-X11/lib/font/fontfile/decompress.c +++ /dev/null @@ -1,415 +0,0 @@ -/* $Xorg: decompress.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ -/* - * Copyright 1985, 1986 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * James A. Woods, derived from original work by Spencer Thomas - * and Joseph Orost. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* - -Copyright 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/decompress.c,v 1.4 2001/01/17 19:43:29 dawes Exp $ */ -/* - * decompress - cat a compressed file - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -#define BITS 16 - -/* - * a code_int must be able to hold 2**BITS values of type int, and also -1 - */ -#if BITS > 15 -typedef long int code_int; -#else -typedef int code_int; -#endif - -typedef long int count_int; - -#ifdef NO_UCHAR - typedef char char_type; -#else - typedef unsigned char char_type; -#endif /* UCHAR */ - -static char_type magic_header[] = { "\037\235" }; /* 1F 9D */ - -/* Defines for third byte of header */ -#define BIT_MASK 0x1f -#define BLOCK_MASK 0x80 -/* Masks 0x40 and 0x20 are free. I think 0x20 should mean that there is - a fourth header byte (for expansion). -*/ - -#define INIT_BITS 9 /* initial number of bits/code */ - -#ifdef COMPATIBLE /* But wrong! */ -# define MAXCODE(n_bits) (1 << (n_bits) - 1) -#else -# define MAXCODE(n_bits) ((1 << (n_bits)) - 1) -#endif /* COMPATIBLE */ - -/* - * the next two codes should not be changed lightly, as they must not - * lie within the contiguous general code space. - */ -#define FIRST 257 /* first free entry */ -#define CLEAR 256 /* table clear output code */ - -#define STACK_SIZE 65300 - -typedef struct _compressedFILE { - BufFilePtr file; - - char_type *stackp; - code_int oldcode; - char_type finchar; - - int block_compress; - int maxbits; - code_int maxcode, maxmaxcode; - - code_int free_ent; - int clear_flg; - int n_bits; - - /* bit buffer */ - int offset, size; - char_type buf[BITS]; - - char_type de_stack[STACK_SIZE]; - char_type *tab_suffix; - unsigned short *tab_prefix; -} CompressedFile; - - -static int hsize_table[] = { - 5003, /* 12 bits - 80% occupancy */ - 9001, /* 13 bits - 91% occupancy */ - 18013, /* 14 bits - 91% occupancy */ - 35023, /* 15 bits - 94% occupancy */ - 69001 /* 16 bits - 95% occupancy */ -}; - -static int BufCompressedClose ( BufFilePtr f, int doClose ); -static int BufCompressedFill ( BufFilePtr f ); -static code_int getcode ( CompressedFile *file ); -static int BufCompressedSkip ( BufFilePtr f, int bytes ); - -BufFilePtr -BufFilePushCompressed (BufFilePtr f) -{ - int code; - int maxbits; - int hsize; - CompressedFile *file; - int extra; - - if ((BufFileGet(f) != (magic_header[0] & 0xFF)) || - (BufFileGet(f) != (magic_header[1] & 0xFF))) - { - return 0; - } - code = BufFileGet (f); - if (code == BUFFILEEOF) return 0; - - maxbits = code & BIT_MASK; - if (maxbits > BITS || maxbits < 12) - return 0; - hsize = hsize_table[maxbits - 12]; - extra = (1 << maxbits) * sizeof (char_type) + - hsize * sizeof (unsigned short); - file = (CompressedFile *) xalloc (sizeof (CompressedFile) + extra); - if (!file) - return 0; - file->file = f; - file->maxbits = maxbits; - file->block_compress = code & BLOCK_MASK; - file->maxmaxcode = 1 << file->maxbits; - file->tab_suffix = (char_type *) &file[1]; - file->tab_prefix = (unsigned short *) (file->tab_suffix + file->maxmaxcode); - /* - * As above, initialize the first 256 entries in the table. - */ - file->maxcode = MAXCODE(file->n_bits = INIT_BITS); - for ( code = 255; code >= 0; code-- ) { - file->tab_prefix[code] = 0; - file->tab_suffix[code] = (char_type) code; - } - file->free_ent = ((file->block_compress) ? FIRST : 256 ); - file->oldcode = -1; - file->clear_flg = 0; - file->offset = 0; - file->size = 0; - file->stackp = file->de_stack; - bzero(file->buf, BITS); - return BufFileCreate ((char *) file, - BufCompressedFill, - 0, - BufCompressedSkip, - BufCompressedClose); -} - -static int -BufCompressedClose (BufFilePtr f, int doClose) -{ - CompressedFile *file; - BufFilePtr raw; - - file = (CompressedFile *) f->private; - raw = file->file; - xfree (file); - BufFileClose (raw, doClose); - return 1; -} - -static int -BufCompressedFill (BufFilePtr f) -{ - CompressedFile *file; - register char_type *stackp, *de_stack; - register char_type finchar; - register code_int code, oldcode, incode; - BufChar *buf, *bufend; - - file = (CompressedFile *) f->private; - - buf = f->buffer; - bufend = buf + BUFFILESIZE; - stackp = file->stackp; - de_stack = file->de_stack; - finchar = file->finchar; - oldcode = file->oldcode; - while (buf < bufend) { - while (stackp > de_stack && buf < bufend) - *buf++ = *--stackp; - - if (buf == bufend) - break; - - code = getcode (file); - if (code == -1) - break; - - if ( (code == CLEAR) && file->block_compress ) { - for ( code = 255; code >= 0; code-- ) - file->tab_prefix[code] = 0; - file->clear_flg = 1; - file->free_ent = FIRST; - oldcode = -1; - continue; - } - incode = code; - /* - * Special case for KwKwK string. - */ - if ( code >= file->free_ent ) { - if ( code > file->free_ent || oldcode == -1 ) { - /* Bad stream. */ - return BUFFILEEOF; - } - *stackp++ = finchar; - code = oldcode; - } - /* - * The above condition ensures that code < free_ent. - * The construction of tab_prefixof in turn guarantees that - * each iteration decreases code and therefore stack usage is - * bound by 1 << BITS - 256. - */ - - /* - * Generate output characters in reverse order - */ - while ( code >= 256 ) - { - *stackp++ = file->tab_suffix[code]; - code = file->tab_prefix[code]; - } - finchar = file->tab_suffix[code]; - *stackp++ = finchar; - - /* - * Generate the new entry. - */ - if ( (code=file->free_ent) < file->maxmaxcode && oldcode != -1) { - file->tab_prefix[code] = (unsigned short)oldcode; - file->tab_suffix[code] = finchar; - file->free_ent = code+1; - } - /* - * Remember previous code. - */ - oldcode = incode; - } - file->oldcode = oldcode; - file->stackp = stackp; - file->finchar = finchar; - if (buf == f->buffer) { - f->left = 0; - return BUFFILEEOF; - } - f->bufp = f->buffer + 1; - f->left = (buf - f->buffer) - 1; - return f->buffer[0]; -} - -/***************************************************************** - * TAG( getcode ) - * - * Read one code from the standard input. If BUFFILEEOF, return -1. - * Inputs: - * stdin - * Outputs: - * code or -1 is returned. - */ - -static char_type rmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff}; - -static code_int -getcode(CompressedFile *file) -{ - register code_int code; - register int r_off, bits; - register char_type *bp = file->buf; - register BufFilePtr raw; - - if ( file->clear_flg > 0 || file->offset >= file->size || - file->free_ent > file->maxcode ) - { - /* - * If the next entry will be too big for the current code - * size, then we must increase the size. This implies reading - * a new buffer full, too. - */ - if ( file->free_ent > file->maxcode ) { - file->n_bits++; - if ( file->n_bits == file->maxbits ) - file->maxcode = file->maxmaxcode; /* won't get any bigger now */ - else - file->maxcode = MAXCODE(file->n_bits); - } - if ( file->clear_flg > 0) { - file->maxcode = MAXCODE (file->n_bits = INIT_BITS); - file->clear_flg = 0; - } - bits = file->n_bits; - raw = file->file; - while (bits > 0 && (code = BufFileGet (raw)) != BUFFILEEOF) - { - *bp++ = code; - --bits; - } - bp = file->buf; - if (bits == file->n_bits) - return -1; /* end of file */ - file->size = file->n_bits - bits; - file->offset = 0; - /* Round size down to integral number of codes */ - file->size = (file->size << 3) - (file->n_bits - 1); - } - r_off = file->offset; - bits = file->n_bits; - /* - * Get to the first byte. - */ - bp += (r_off >> 3); - r_off &= 7; - /* Get first part (low order bits) */ -#ifdef NO_UCHAR - code = ((*bp++ >> r_off) & rmask[8 - r_off]) & 0xff; -#else - code = (*bp++ >> r_off); -#endif /* NO_UCHAR */ - bits -= (8 - r_off); - r_off = 8 - r_off; /* now, offset into code word */ - /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */ - if ( bits >= 8 ) { -#ifdef NO_UCHAR - code |= (*bp++ & 0xff) << r_off; -#else - code |= *bp++ << r_off; -#endif /* NO_UCHAR */ - r_off += 8; - bits -= 8; - } - /* high order bits. */ - code |= (*bp & rmask[bits]) << r_off; - file->offset += file->n_bits; - - return code; -} - -static int -BufCompressedSkip (BufFilePtr f, int bytes) -{ - int c; - while (bytes--) - { - c = BufFileGet(f); - if (c == BUFFILEEOF) - return BUFFILEEOF; - } - return 0; -} - -#ifdef TEST -int -main (int argc, char *argv[]) -{ - BufFilePtr inputraw, input, output; - int c; - - inputraw = BufFileOpenRead (0); - input = BufFilePushCompressed (inputraw); - output = BufFileOpenWrite (1); - while ((c = BufFileGet (input)) != BUFFILEEOF) - BufFilePut (c, output); - BufFileClose (input, FALSE); - BufFileClose (output, FALSE); - return 0; -} -#endif diff --git a/nx-X11/lib/font/fontfile/defaults.c b/nx-X11/lib/font/fontfile/defaults.c deleted file mode 100644 index 7f20cab67..000000000 --- a/nx-X11/lib/font/fontfile/defaults.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Xorg: defaults.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/defaults.c,v 1.7 2001/01/17 19:43:29 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -#ifndef DEFAULT_BIT_ORDER -#ifdef BITMAP_BIT_ORDER -#define DEFAULT_BIT_ORDER BITMAP_BIT_ORDER -#else -#define DEFAULT_BIT_ORDER MSBFirst -#endif -#endif - -#ifndef DEFAULT_BYTE_ORDER -#ifdef IMAGE_BYTE_ORDER -#define DEFAULT_BYTE_ORDER IMAGE_BYTE_ORDER -#else -#define DEFAULT_BYTE_ORDER MSBFirst -#endif -#endif - -#ifndef DEFAULT_GLYPH_PAD -#ifdef GLYPHPADBYTES -#define DEFAULT_GLYPH_PAD GLYPHPADBYTES -#else -#define DEFAULT_GLYPH_PAD 4 -#endif -#endif - -#ifndef DEFAULT_SCAN_UNIT -#define DEFAULT_SCAN_UNIT 1 -#endif - -#include - -void -FontDefaultFormat (int *bit, int *byte, int *glyph, int *scan) -{ - *bit = DEFAULT_BIT_ORDER; - *byte = DEFAULT_BYTE_ORDER; - *glyph = DEFAULT_GLYPH_PAD; - *scan = DEFAULT_SCAN_UNIT; -} diff --git a/nx-X11/lib/font/fontfile/dirfile.c b/nx-X11/lib/font/fontfile/dirfile.c deleted file mode 100644 index 3a2fead81..000000000 --- a/nx-X11/lib/font/fontfile/dirfile.c +++ /dev/null @@ -1,495 +0,0 @@ -/* $Xorg: dirfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.17 2004/02/08 01:52:27 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -/* - * dirfile.c - * - * Read fonts.dir and fonts.alias files - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include - -static Bool AddFileNameAliases ( FontDirectoryPtr dir ); -static int ReadFontAlias ( char *directory, Bool isFile, - FontDirectoryPtr *pdir ); -static int lexAlias ( FILE *file, char **lexToken ); -static int lexc ( FILE *file ); - -int -FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir) -{ - char file_name[MAXFONTFILENAMELEN]; - char font_name[MAXFONTNAMELEN]; - char dir_file[MAXFONTFILENAMELEN]; - char dir_path[MAXFONTFILENAMELEN]; - char *ptr; - FILE *file; - int count, - i, - status; - struct stat statb; - static char format[24] = ""; - - FontDirectoryPtr dir = NullFontDirectory; - - if (strlen(directory) + 1 + sizeof(FontDirFile) > sizeof(dir_file)) - return BadFontPath; - - /* Check for font directory attributes */ -#if !defined(__UNIXOS2__) && !defined(WIN32) - if ((ptr = strchr(directory, ':'))) { -#else - /* OS/2 and WIN32 path might start with a drive letter, don't clip this */ - if ((ptr = strchr(directory+2, ':'))) { -#endif - strncpy(dir_path, directory, ptr - directory); - dir_path[ptr - directory] = '\0'; - } else { - strcpy(dir_path, directory); - } - strcpy(dir_file, dir_path); - if (dir_file[strlen(dir_file) - 1] != '/') - strcat(dir_file, "/"); - strcat(dir_file, FontDirFile); - file = fopen(dir_file, "rt"); - if (file) { - Bool found_font = FALSE; - -#ifndef WIN32 - if (fstat (fileno(file), &statb) == -1) -#else - if (stat (dir_file, &statb) == -1) -#endif - { - fclose(file); - return BadFontPath; - } - count = fscanf(file, "%d\n", &i); - if ((count == EOF) || (count != 1)) { - fclose(file); - return BadFontPath; - } - dir = FontFileMakeDir(directory, i); - if (dir == NULL) { - fclose(file); - return BadFontPath; - } - dir->dir_mtime = statb.st_mtime; - if (format[0] == '\0') - sprintf(format, "%%%ds %%%d[^\n]\n", - MAXFONTFILENAMELEN-1, MAXFONTNAMELEN-1); - - while ((count = fscanf(file, format, file_name, font_name)) != EOF) { -#if defined(__UNIXOS2__) || defined(WIN32) - /* strip any existing trailing CR */ - for (i=0; idirectory) + sizeof(FontDirFile) > sizeof(dir_file)) - return FALSE; - - strcpy (dir_file, dir->directory); - strcat (dir_file, FontDirFile); - if (stat (dir_file, &statb) == -1) - { - if (errno != ENOENT || dir->dir_mtime != 0) - return TRUE; - return FALSE; /* doesn't exist and never did: no change */ - } - if (dir->dir_mtime != statb.st_mtime) - return TRUE; - strcpy (dir_file, dir->directory); - strcat (dir_file, FontAliasFile); - if (stat (dir_file, &statb) == -1) - { - if (errno != ENOENT || dir->alias_mtime != 0) - return TRUE; - return FALSE; /* doesn't exist and never did: no change */ - } - if (dir->alias_mtime != statb.st_mtime) - return TRUE; - return FALSE; -} - -/* - * Make each of the file names an automatic alias for each of the files. - */ - -static Bool -AddFileNameAliases(FontDirectoryPtr dir) -{ - int i; - char copy[MAXFONTFILENAMELEN]; - char *fileName; - FontTablePtr table; - FontRendererPtr renderer; - int len; - FontNameRec name; - - table = &dir->nonScalable; - for (i = 0; i < table->used; i++) { - if (table->entries[i].type != FONT_ENTRY_BITMAP) - continue; - fileName = table->entries[i].u.bitmap.fileName; - renderer = FontFileMatchRenderer (fileName); - if (!renderer) - continue; - - len = strlen (fileName) - renderer->fileSuffixLen; - if (len >= sizeof(copy)) - continue; - CopyISOLatin1Lowered (copy, fileName, len); - copy[len] = '\0'; - name.name = copy; - name.length = len; - name.ndashes = FontFileCountDashes (copy, len); - - if (!FontFileFindNameInDir(table, &name)) { - if (!FontFileAddFontAlias (dir, copy, table->entries[i].name.name)) - return FALSE; - } - } - return TRUE; -} - -/* - * parse the font.alias file. Format is: - * - * alias font-name - * - * To imbed white-space in an alias name, enclose it like "font name" - * in double quotes. \ escapes and character, so - * "font name \"With Double Quotes\" \\ and \\ back-slashes" - * works just fine. - * - * A line beginning with a ! denotes a newline-terminated comment. - */ - -/* - * token types - */ - -#define NAME 0 -#define NEWLINE 1 -#define DONE 2 -#define EALLOC 3 - -static int -ReadFontAlias(char *directory, Bool isFile, FontDirectoryPtr *pdir) -{ - char alias[MAXFONTNAMELEN]; - char font_name[MAXFONTNAMELEN]; - char alias_file[MAXFONTFILENAMELEN]; - FILE *file; - FontDirectoryPtr dir; - int token; - char *lexToken; - int status = Successful; - struct stat statb; - - if (strlen(directory) >= sizeof(alias_file)) - return BadFontPath; - dir = *pdir; - strcpy(alias_file, directory); - if (!isFile) { - if (strlen(directory) + 1 + sizeof(FontAliasFile) > sizeof(alias_file)) - return BadFontPath; - if (directory[strlen(directory) - 1] != '/') - strcat(alias_file, "/"); - strcat(alias_file, FontAliasFile); - } - file = fopen(alias_file, "rt"); - if (!file) - return ((errno == ENOENT) ? Successful : BadFontPath); - if (!dir) - *pdir = dir = FontFileMakeDir(directory, 10); - if (!dir) - { - fclose (file); - return AllocError; - } -#ifndef WIN32 - if (fstat (fileno (file), &statb) == -1) -#else - if (stat (alias_file, &statb) == -1) -#endif - { - fclose (file); - return BadFontPath; - } - dir->alias_mtime = statb.st_mtime; - while (status == Successful) { - token = lexAlias(file, &lexToken); - switch (token) { - case NEWLINE: - break; - case DONE: - fclose(file); - return Successful; - case EALLOC: - status = AllocError; - break; - case NAME: - if (strlen(lexToken) >= sizeof(alias)) { - status = BadFontPath; - break; - } - strcpy(alias, lexToken); - token = lexAlias(file, &lexToken); - switch (token) { - case NEWLINE: - if (strcmp(alias, "FILE_NAMES_ALIASES")) - status = BadFontPath; - else if (!AddFileNameAliases(dir)) - status = AllocError; - break; - case DONE: - status = BadFontPath; - break; - case EALLOC: - status = AllocError; - break; - case NAME: - if (strlen(lexToken) >= sizeof(font_name)) { - status = BadFontPath; - break; - } - CopyISOLatin1Lowered(alias, alias, strlen(alias)); - CopyISOLatin1Lowered(font_name, lexToken, strlen(lexToken)); - if (!FontFileAddFontAlias (dir, alias, font_name)) - status = AllocError; - break; - } - } - } - fclose(file); - return status; -} - -#define QUOTE 0 -#define WHITE 1 -#define NORMAL 2 -#define END 3 -#define NL 4 -#define BANG 5 - -static int charClass; - -static int -lexAlias(FILE *file, char **lexToken) -{ - int c; - char *t; - enum state { - Begin, Normal, Quoted, Comment - } state; - int count; - - static char *tokenBuf = (char *) NULL; - static int tokenSize = 0; - - t = tokenBuf; - count = 0; - state = Begin; - for (;;) { - if (count == tokenSize) { - int nsize; - char *nbuf; - - if (tokenSize >= (INT_MAX >> 2)) - /* Stop before we overflow */ - return EALLOC; - nsize = tokenSize ? (tokenSize << 1) : 64; - nbuf = (char *) xrealloc(tokenBuf, nsize); - if (!nbuf) - return EALLOC; - tokenBuf = nbuf; - tokenSize = nsize; - t = tokenBuf + count; - } - c = lexc(file); - switch (charClass) { - case QUOTE: - switch (state) { - case Begin: - case Normal: - state = Quoted; - break; - case Quoted: - state = Normal; - break; - case Comment: - break; - } - break; - case WHITE: - switch (state) { - case Begin: - case Comment: - continue; - case Normal: - *t = '\0'; - *lexToken = tokenBuf; - return NAME; - case Quoted: - break; - } - /* fall through */ - case NORMAL: - switch (state) { - case Begin: - state = Normal; - break; - case Comment: - continue; - default: - break; - } - *t++ = c; - ++count; - break; - case END: - case NL: - switch (state) { - case Begin: - case Comment: - *lexToken = (char *) NULL; - return charClass == END ? DONE : NEWLINE; - default: - *t = '\0'; - *lexToken = tokenBuf; - ungetc(c, file); - return NAME; - } - break; - case BANG: - switch (state) { - case Begin: - state = Comment; - break; - case Comment: - break; - default: - *t++ = c; - ++count; - } - break; - } - } -} - -static int -lexc(FILE *file) -{ - int c; - - c = getc(file); - switch (c) { - case EOF: - charClass = END; - break; - case '\\': - c = getc(file); - if (c == EOF) - charClass = END; - else - charClass = NORMAL; - break; - case '"': - charClass = QUOTE; - break; - case ' ': - case '\t': - charClass = WHITE; - break; - case '\r': - case '\n': - charClass = NL; - break; - case '!': - charClass = BANG; - break; - default: - charClass = NORMAL; - break; - } - return c; -} diff --git a/nx-X11/lib/font/fontfile/encparse.c b/nx-X11/lib/font/fontfile/encparse.c deleted file mode 100644 index 6262aff07..000000000 --- a/nx-X11/lib/font/fontfile/encparse.c +++ /dev/null @@ -1,966 +0,0 @@ -/* -Copyright (c) 1998-2001 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.20tsi Exp $ */ - -/* Parser for encoding files */ - -/* This code assumes that we are using ASCII. We don't use the ctype - functions, as they depend on the current locale. On the other - hand, we do use strcasecmp, but only on strings that we've checked - to be pure ASCII. Bloody ``Code Set Independence''. */ - -#include -#include - -#if defined(__SCO__) || defined(__UNIXWARE__) -#include -#endif - -#ifndef FONTENC_NO_LIBFONT - -#include -#include - -#else - -#include -#define xalloc(n) malloc(n) -#define xrealloc(p, n) realloc(p, n) -#define xfree(p) free(p) - -#include "zlib.h" -typedef gzFile FontFilePtr; -#define FontFileGetc(f) gzgetc(f) -#define FontFileOpen(filename) gzopen(filename, "rb") -#define FontFileClose(f) gzclose(f) - -#define MAXFONTFILENAMELEN 1024 -#define MAXFONTNAMELEN 1024 - -#endif - -#include -#include "fontencI.h" - -#define MAXALIASES 20 - -#define EOF_TOKEN -1 -#define ERROR_TOKEN -2 -#define EOL_TOKEN 0 -#define NUMBER_TOKEN 1 -#define KEYWORD_TOKEN 2 - -#define EOF_LINE -1 -#define ERROR_LINE -2 -#define STARTENCODING_LINE 1 -#define STARTMAPPING_LINE 2 -#define ENDMAPPING_LINE 3 -#define CODE_LINE 4 -#define CODE_RANGE_LINE 5 -#define CODE_UNDEFINE_LINE 6 -#define NAME_LINE 7 -#define SIZE_LINE 8 -#define ALIAS_LINE 9 -#define FIRSTINDEX_LINE 10 - -/* Return from lexer */ -#define MAXKEYWORDLEN 100 - -static long number_value; -static char keyword_value[MAXKEYWORDLEN+1]; - -static long value1, value2, value3; - -/* Lexer code */ - -/* Skip to the beginning of new line */ -static void -skipEndOfLine(FontFilePtr f, int c) -{ - if(c == 0) - c = FontFileGetc(f); - - for(;;) - if(c <= 0 || c == '\n') - return; - else - c = FontFileGetc(f); -} - -/* Get a number; we're at the first digit. */ -static unsigned -getnum(FontFilePtr f, int c, int *cp) -{ - unsigned n = 0; - int base = 10; - - /* look for `0' or `0x' prefix */ - if(c == '0') { - c = FontFileGetc(f); - base = 8; - if(c == 'x' || c == 'X') { - base = 16; - c = FontFileGetc(f); - } - } - - /* accumulate digits */ - for(;;) { - if ('0' <= c && c <= '9') { - n *= base; n += c - '0'; - } else if('a' <= c && c <= 'f') { - n *= base; n += c - 'a' + 10; - } else if('A' <=c && c <= 'F') { - n *= base; n += c - 'A' + 10; - } else - break; - c = FontFileGetc(f); - } - - *cp = c; return n; -} - -/* Skip to beginning of new line; return 1 if only whitespace was found. */ -static int -endOfLine(FontFilePtr f, int c) -{ - if(c == 0) - c = FontFileGetc(f); - - for(;;) { - if(c <= 0 || c == '\n') - return 1; - else if(c == '#') { - skipEndOfLine(f,c); - return 1; - } - else if(c == ' ' || c == '\t') { - skipEndOfLine(f,c); - return 0; - } - c = FontFileGetc(f); - } -} - -/* Get a token; we're at first char */ -static int -gettoken(FontFilePtr f, int c, int *cp) -{ - char *p; - - if(c <= 0) - c = FontFileGetc(f); - - if(c <= 0) { - return EOF_TOKEN; - } - - while(c == ' ' || c == '\t') - c = FontFileGetc(f); - - if(c=='\n') { - return EOL_TOKEN; - } else if(c == '#') { - skipEndOfLine(f,c); - return EOL_TOKEN; - } else if(c >= '0' && c <= '9') { - number_value = getnum(f,c,cp); - return NUMBER_TOKEN; - } else if((c >= 'A' && c <= 'Z') || - (c >= 'a' && c <= 'z') || - c == '/' || c == '_' || c == '-' || c == '.') { - p = keyword_value; - *p++ = c; - while(p-keyword_value < MAXKEYWORDLEN) { - c = FontFileGetc(f); - if(c <= ' ' || c > '~' || c == '#') - break; - *p++ = c; - } - *cp = c; - *p = '\0'; - return KEYWORD_TOKEN; - } else { - *cp = c; - return ERROR_TOKEN; - } -} - -/* Parse a line. - * Always skips to the beginning of a new line, even if an error occurs */ -static int -getnextline(FontFilePtr f) -{ - int c, token; - c = FontFileGetc(f); - if(c <= 0) - return EOF_LINE; - - again: - token=gettoken(f,c,&c); - - switch(token) { - case EOF_TOKEN: - return EOF_LINE; - case EOL_TOKEN: - /* empty line */ - c = FontFileGetc(f); - goto again; - case NUMBER_TOKEN: - value1 = number_value; - token = gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value2 = number_value; - token = gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value3 = number_value; - return CODE_RANGE_LINE; - case EOL_TOKEN: - return CODE_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - case KEYWORD_TOKEN: - if(!endOfLine(f,c)) - return ERROR_LINE; - else - return NAME_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - case KEYWORD_TOKEN: - if(!strcasecmp(keyword_value, "STARTENCODING")) { - token = gettoken(f,c,&c); - if(token == KEYWORD_TOKEN) { - if(endOfLine(f,c)) - return STARTENCODING_LINE; - else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "ALIAS")) { - token = gettoken(f,c,&c); - if(token == KEYWORD_TOKEN) { - if(endOfLine(f,c)) - return ALIAS_LINE; - else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "SIZE")) { - token = gettoken(f,c,&c); - if(token == NUMBER_TOKEN) { - value1 = number_value; - token = gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value2 = number_value; - return SIZE_LINE; - case EOL_TOKEN: - value2=0; - return SIZE_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "FIRSTINDEX")) { - token = gettoken(f,c,&c); - if(token == NUMBER_TOKEN) { - value1 = number_value; - token = gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value2 = number_value; - return FIRSTINDEX_LINE; - case EOL_TOKEN: - value2 = 0; - return FIRSTINDEX_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "STARTMAPPING")) { - keyword_value[0] = 0; - value1 = 0; value1 = 0; - /* first a keyword */ - token = gettoken(f,c,&c); - if(token != KEYWORD_TOKEN) { - skipEndOfLine(f, c); - return ERROR_LINE; - } - - /* optional first integer */ - token = gettoken(f,c,&c); - if(token == NUMBER_TOKEN) { - value1 = number_value; - } else if(token == EOL_TOKEN) { - return STARTMAPPING_LINE; - } else { - skipEndOfLine(f, c); - return ERROR_LINE; - } - - /* optional second integer */ - token = gettoken(f,c,&c); - if(token == NUMBER_TOKEN) { - value2 = number_value; - } else if(token == EOL_TOKEN) { - return STARTMAPPING_LINE; - } else { - skipEndOfLine(f, c); - return ERROR_LINE; - } - - if(!endOfLine(f,c)) - return ERROR_LINE; - else { - return STARTMAPPING_LINE; - } - } else if(!strcasecmp(keyword_value, "UNDEFINE")) { - /* first integer */ - token = gettoken(f,c,&c); - if(token != NUMBER_TOKEN) { - skipEndOfLine(f,c); - return ERROR_LINE; - } - value1 = number_value; - /* optional second integer */ - token = gettoken(f,c,&c); - if(token == EOL_TOKEN) { - value2 = value1; - return CODE_UNDEFINE_LINE; - } else if(token == NUMBER_TOKEN) { - value2 = number_value; - if(endOfLine(f,c)) { - return CODE_UNDEFINE_LINE; - } else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "ENDENCODING")) { - if(endOfLine(f,c)) - return EOF_LINE; - else - return ERROR_LINE; - } else if(!strcasecmp(keyword_value, "ENDMAPPING")) { - if(endOfLine(f,c)) - return ENDMAPPING_LINE; - else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - default: - return ERROR_LINE; - } -} - -static void -install_mapping(FontEncPtr encoding, FontMapPtr mapping) -{ - FontMapPtr m; - - if(encoding->mappings == NULL) - encoding->mappings = mapping; - else { - m = encoding->mappings; - while(m->next != NULL) - m = m->next; - m->next = mapping; - } - mapping->next = NULL; - mapping->encoding = encoding; -} - -static int -setCode(unsigned from, unsigned to, unsigned row_size, - unsigned *first, unsigned *last, - unsigned *encsize, unsigned short **enc) -{ - unsigned index, i; - unsigned short *newenc; - - if(from>0xFFFF) - return 0; /* success */ - - if(row_size==0) - index=from; - else { - if((value1 & 0xFF) >= row_size) - return 0; /* ignore out of range mappings */ - index = (from>>8) * row_size + (from&0xFF); - } - - /* Optimize away useless identity mappings. This is only expected - to be useful with linear encodings. */ - if(index == to && (index < *first || index > *last)) - return 0; - if(*encsize == 0) { - *encsize = (index < 256) ? 256 : 0x10000; - *enc = (unsigned short*)xalloc((*encsize) * sizeof(unsigned short)); - if(*enc == NULL) { - *encsize = 0; - return 1; - } - } else if(*encsize <= index) { - *encsize = 0x10000; - if((newenc = (unsigned short*)xrealloc(enc, *encsize))==NULL) - return 1; - *enc = newenc; - } - if(*first > *last) { - *first = *last = index; - } - if(index < *first) { - for(i = index; i < *first; i++) - (*enc)[i] = i; - *first = index; - } - if(index > *last) { - for(i = *last + 1; i <= index; i++) - (*enc)[i] = i; - *last = index; - } - (*enc)[index] = to; - return 0; -} - -/* Parser. If headerOnly is true, we're only interested in the - data contained in the encoding file's header. */ - -/* As font encodings are currently never freed, the allocations done - by this function are mostly its private business. Note, however, - that FontEncIdentify needs to free the header fields -- so if you - change this function, you may need to change FontEncIdentify. */ - -/* I want a garbage collector. */ - -static FontEncPtr -parseEncodingFile(FontFilePtr f, int headerOnly) -{ - int line; - - unsigned short *enc=NULL; - char **nam = NULL, **newnam; - unsigned i, first = 0xFFFF, last=0, encsize=0, namsize=0; - FontEncPtr encoding = NULL; - FontMapPtr mapping = NULL; - FontEncSimpleMapPtr sm; - FontEncSimpleNamePtr sn; - char *aliases[MAXALIASES]; - int numaliases=0; - -#if 0 - /* GCC complains about unused labels. Please fix GCC rather than - obfuscating my code. */ - no_encoding: -#endif - line = getnextline(f); - switch(line) { - case EOF_LINE: - goto error; - case STARTENCODING_LINE: - encoding = (FontEncPtr)xalloc(sizeof(FontEncRec)); - if(encoding == NULL) - goto error; - encoding->name = (char*)xalloc(strlen(keyword_value)+1); - if(encoding->name == NULL) - goto error; - strcpy(encoding->name, keyword_value); - encoding->size = 256; - encoding->row_size = 0; - encoding->mappings = NULL; - encoding->next = NULL; - encoding->first = encoding->first_col=0; - goto no_mapping; - default: - goto error; - } - - no_mapping: - line = getnextline(f); - switch(line) { - case EOF_LINE: goto done; - case ALIAS_LINE: - if(numaliases < MAXALIASES) { - aliases[numaliases] = (char*)xalloc(strlen(keyword_value)+1); - if(aliases[numaliases] == NULL) - goto error; - strcpy(aliases[numaliases], keyword_value); - numaliases++; - } - goto no_mapping; - case SIZE_LINE: - encoding->size = value1; - encoding->row_size = value2; - goto no_mapping; - case FIRSTINDEX_LINE: - encoding->first = value1; - encoding->first_col = value2; - goto no_mapping; - case STARTMAPPING_LINE: - if(headerOnly) - goto done; - if(!strcasecmp(keyword_value, "unicode")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); - if(mapping == NULL) - goto error; - mapping->type = FONT_ENCODING_UNICODE; - mapping->pid = 0; - mapping->eid = 0; - mapping->recode = 0; - mapping->name = 0; - mapping->client_data = 0; - mapping->next = 0; - goto mapping; - } else if(!strcasecmp(keyword_value, "cmap")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); - if(mapping == NULL) - goto error; - mapping->type = FONT_ENCODING_TRUETYPE; - mapping->pid = value1; - mapping->eid = value2; - mapping->recode = 0; - mapping->name = 0; - mapping->client_data = 0; - mapping->next = 0; - goto mapping; - } else if(!strcasecmp(keyword_value, "postscript")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); - if(mapping == NULL) - goto error; - mapping->type = FONT_ENCODING_POSTSCRIPT; - mapping->pid = 0; - mapping->eid = 0; - mapping->recode = 0; - mapping->name = 0; - mapping->client_data = 0; - mapping->next = 0; - goto string_mapping; - } else { /* unknown mapping type -- ignore */ - goto skipmapping; - } - /* NOTREACHED */ - goto error; - default: goto no_mapping; /* ignore unknown lines */ - } - - skipmapping: - line = getnextline(f); - switch(line) { - case ENDMAPPING_LINE: - goto no_mapping; - case EOF_LINE: - goto error; - default: - goto skipmapping; - } - - mapping: - line = getnextline(f); - switch(line) { - case EOF_LINE: goto error; - case ENDMAPPING_LINE: - mapping->recode = FontEncSimpleRecode; - mapping->name = FontEncUndefinedName; - mapping->client_data = sm = - (FontEncSimpleMapPtr)xalloc(sizeof(FontEncSimpleMapRec)); - if(sm == NULL) - goto error; - sm->row_size = encoding->row_size; - if(first <= last) { - sm->first = first; - sm->len=last-first+1; - sm->map = - (unsigned short*)xalloc(sm->len * sizeof(unsigned short)); - if(sm->map == NULL) { - xfree(sm); - mapping->client_data = sm = NULL; - goto error; - } - } else { - sm->first = 0; - sm->len = 0; - sm->map = 0; - } - for(i=0; i < sm->len; i++) - sm -> map[i] = enc[first+i]; - install_mapping(encoding, mapping); - mapping = 0; - first = 0xFFFF; last=0; - goto no_mapping; - - case CODE_LINE: - if(setCode(value1, value2, encoding->row_size, - &first, &last, &encsize, &enc)) - goto error; - goto mapping; - - case CODE_RANGE_LINE: - if(value1 > 0x10000) - value1 = 0x10000; - if(value2 > 0x10000) - value2 = 0x10000; - if(value2 < value1) - goto mapping; - /* Do the last value first to avoid having to realloc() */ - if(setCode(value2, value3+(value2-value1), encoding->row_size, - &first, &last, &encsize, &enc)) - goto error; - for(i=value1; irow_size, - &first, &last, &encsize, &enc)) - goto error; - } - goto mapping; - - case CODE_UNDEFINE_LINE: - if(value1 > 0x10000) - value1 = 0x10000; - if(value2 > 0x10000) - value2 = 0x10000; - if(value2 < value1) - goto mapping; - /* Do the last value first to avoid having to realloc() */ - if(setCode(value2, 0, encoding->row_size, - &first, &last, &encsize, &enc)) - goto error; - for(i = value1; i < value2; i++) { - if(setCode(i, 0, encoding->row_size, - &first, &last, &encsize, &enc)) - goto error; - } - goto mapping; - - default: goto mapping; /* ignore unknown lines */ - } - - string_mapping: - line = getnextline(f); - switch(line) { - case EOF_LINE: goto error; - case ENDMAPPING_LINE: - mapping->recode = FontEncUndefinedRecode; - mapping->name = FontEncSimpleName; - mapping->client_data = sn = - (FontEncSimpleNamePtr)xalloc(sizeof(FontEncSimpleNameRec)); - if(sn == NULL) - goto error; - if(first > last) { - xfree(sn); - mapping->client_data = sn = NULL; - goto error; - } - sn->first = first; - sn->len = last - first + 1; - sn->map = (char**)xalloc(sn->len*sizeof(char*)); - if(sn->map == NULL) { - xfree(sn); - mapping->client_data = sn = NULL; - goto error; - } - for(i = 0; i < sn->len; i++) - sn->map[i] = nam[first+i]; - install_mapping(encoding,mapping); - mapping = 0; - first = 0xFFFF; last=0; - goto no_mapping; - case NAME_LINE: - if(value1 >= 0x10000) goto string_mapping; - if(namsize == 0) { - namsize = (value1) < 256 ? 256 : 0x10000; - nam = (char**)xalloc(namsize * sizeof(char*)); - if(nam == NULL) { - namsize=0; - goto error; - } - } else if(namsize <= value1) { - namsize = 0x10000; - if((newnam = (char**)xrealloc(nam, namsize)) == NULL) - goto error; - nam = newnam; - } - if(first > last) { - first = last = value1; - } - if(value1 < first) { - for(i = value1; i < first; i++) - nam[i] = NULL; - first = value1; - } - if(value1 > last) { - for(i=last+1; i <= value1; i++) - nam[i]=NULL; - last = value1; - } - nam[value1] = (char*)xalloc(strlen(keyword_value)+1); - if(nam[value1] == NULL) { - goto error; - } - strcpy(nam[value1], keyword_value); - goto string_mapping; - - default: goto string_mapping; /* ignore unknown lines */ - } - - done: - if(encsize) xfree(enc); encsize=0; enc = NULL; - if(namsize) xfree(nam); namsize=0; nam = NULL; /* don't free entries! */ - - encoding->aliases=NULL; - if(numaliases) { - encoding->aliases = (char**)xalloc((numaliases+1)*sizeof(char*)); - if(encoding->aliases == NULL) - goto error; - for(i=0; ialiases[i] = aliases[i]; - encoding->aliases[numaliases]=NULL; - } - - return encoding; - -error: - if(encsize) xfree(enc); encsize=0; - if(namsize) { - for(i = first; i <= last; i++) - if(nam[i]) - xfree(nam[i]); - xfree(nam); - namsize = 0; - } - if(mapping) { - if(mapping->client_data) xfree(mapping->client_data); - xfree(mapping); - } - if(encoding) { - if(encoding->name) xfree(encoding->name); - for(mapping = encoding->mappings; mapping; mapping = mapping->next) { - if(mapping->client_data) xfree(mapping->client_data); - xfree(mapping); - } - xfree(encoding); - } - for(i = 0; i < numaliases; i++) - xfree(aliases[i]); - /* We don't need to free sn and sm as they handled locally in the body.*/ - return 0; -} - -char* -FontEncDirectory() -{ - static char* dir = NULL; - - if(dir == NULL) { - char *c = getenv("FONT_ENCODINGS_DIRECTORY"); - if(c) { - dir = malloc(strlen(c) + 1); - if(!dir) - return NULL; - strcpy(dir, c); - } else { - dir = FONT_ENCODINGS_DIRECTORY; - } - } - return dir; -} - -static void -parseFontFileName(const char *fontFileName, char *buf, char *dir) -{ - const char *p; - char *q, *lastslash; - - for(p = fontFileName, q = dir, lastslash = NULL; *p; p++, q++) { - *q = *p; - if(*p == '/') - lastslash = q+1; - } - - if(!lastslash) - lastslash = dir; - - *lastslash = '\0'; - - if(buf && strlen(dir) + 14 < MAXFONTFILENAMELEN) { - strcpy(buf, dir); - strcat(buf, "encodings.dir"); - } -} - -static FontEncPtr -FontEncReallyReallyLoad(const char *charset, - const char *dirname, const char *dir) -{ - FontFilePtr f; - FILE *file; - FontEncPtr encoding; - char file_name[MAXFONTFILENAMELEN], encoding_name[MAXFONTNAMELEN], - buf[MAXFONTFILENAMELEN]; - int count, n; - static char format[24] = ""; - - /* As we don't really expect to open encodings that often, we don't - take the trouble of caching encodings directories. */ - - if((file = fopen(dirname, "r")) == NULL) { - return NULL; - } - - count = fscanf(file, "%d\n", &n); - if(count == EOF || count != 1) { - fclose(file); - return NULL; - } - - encoding = NULL; - if (!format[0]) { - sprintf(format, "%%%ds %%%d[^\n]\n", (int)sizeof(encoding_name) - 1, - (int)sizeof(file_name) - 1); - } - for(;;) { - count = fscanf(file, format, encoding_name, file_name); - if(count == EOF) - break; - if(count != 2) - break; - - if(!strcasecmp(encoding_name, charset)) { - /* Found it */ - if(file_name[0] != '/') { - if(strlen(dir) + strlen(file_name) >= MAXFONTFILENAMELEN) { - fclose(file); - return NULL; - } - strcpy(buf, dir); - strcat(buf, file_name); - } else { - strcpy(buf , file_name); - } - - f = FontFileOpen(buf); - if(f == NULL) { - fclose(file); - return NULL; - } - encoding = parseEncodingFile(f, 0); - FontFileClose(f); - break; - } - } - - fclose(file); - - return encoding; -} - -/* Parser ntrypoint -- used by FontEncLoad */ -FontEncPtr -FontEncReallyLoad(const char *charset, const char *fontFileName) -{ - FontEncPtr encoding; - char dir[MAXFONTFILENAMELEN], dirname[MAXFONTFILENAMELEN]; - char *d; - - if(fontFileName) { - parseFontFileName(fontFileName, dirname, dir); - encoding = FontEncReallyReallyLoad(charset, dirname, dir); - if(encoding) - return(encoding); - } - - d = FontEncDirectory(); - if(d) { - parseFontFileName(d, NULL, dir); - encoding = FontEncReallyReallyLoad(charset, d, dir); - return encoding; - } - - return NULL; -} - -/* Return a NULL-terminated array of encoding names. Note that this - * function has incestuous knowledge of the allocations done by - * parseEncodingFile. */ - -char ** -FontEncIdentify(const char *fileName) -{ - FontFilePtr f; - FontEncPtr encoding; - char **names, **name, **alias; - int numaliases; - - if((f = FontFileOpen(fileName))==NULL) { - return NULL; - } - encoding = parseEncodingFile(f, 1); - FontFileClose(f); - - if(!encoding) - return NULL; - - numaliases = 0; - if(encoding->aliases) - for(alias = encoding->aliases; *alias; alias++) - numaliases++; - - names = (char**)xalloc((numaliases+2)*sizeof(char*)); - if(names == NULL) { - if(encoding->aliases) - xfree(encoding->aliases); - xfree(encoding); - return NULL; - } - - name = names; - *(name++) = encoding->name; - if(numaliases > 0) - for(alias = encoding->aliases; *alias; alias++, name++) - *name = *alias; - - *name = 0; - xfree(encoding->aliases); - xfree(encoding); - - return names; -} diff --git a/nx-X11/lib/font/fontfile/ffcheck.c b/nx-X11/lib/font/fontfile/ffcheck.c deleted file mode 100644 index d3d121700..000000000 --- a/nx-X11/lib/font/fontfile/ffcheck.c +++ /dev/null @@ -1,171 +0,0 @@ -/* $Xorg: ffcheck.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.15tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ -/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#ifdef LOADABLEFONTS -#include -#endif - -/* - * Map FPE functions to renderer functions - */ - - -/* Here we must check the client to see if it has a context attached to - * it that allows us to access the printer fonts - */ - -static int -FontFileCheckOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font) -{ - if (XpClientIsBitmapClient(client)) - return (FontFileOpenFont (client, fpe, flags, name, namelen, format, - fmask, id, pFont, aliasName, non_cachable_font)); - return BadFontName; -} - -static int -FontFileCheckListFonts (pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, FontNamesPtr names) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListFonts (client, fpe, pat, len, max, names); - return BadFontName; -} - -static int -FontFileCheckStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsBitmapClient(client)) - return FontFileStartListFontsWithInfo(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -FontFileCheckListNextFontWithInfo(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListNextFontWithInfo(client, fpe, namep, namelenp, - pFontInfo, numFonts, private); - return BadFontName; -} - -static int -FontFileCheckStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsBitmapClient(client)) - return FontFileStartListFontsAndAliases(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -FontFileCheckListNextFontOrAlias(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - char **resolvedp, int *resolvedlenp, - pointer private) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListNextFontOrAlias(client, fpe, namep, namelenp, - resolvedp, resolvedlenp, private); - return BadFontName; -} - -void -FontFileCheckRegisterFpeFunctions (void) -{ -#ifndef LOADABLEFONTS - BitmapRegisterFontFileFunctions (); - - -#ifdef BUILD_SPEEDO - SpeedoRegisterFontFileFunctions (); -#endif -#ifdef BUILD_TYPE1 - Type1RegisterFontFileFunctions(); -#endif -#ifdef BUILD_CID - CIDRegisterFontFileFunctions(); -#endif -#ifdef BUILD_FREETYPE - FreeTypeRegisterFontFileFunctions(); -#endif - - -#else - - { - int i; - - if (FontModuleList) { - for (i = 0; FontModuleList[i].name; i++) { - if (FontModuleList[i].initFunc) - FontModuleList[i].initFunc(); - } - } - } -#endif - - RegisterFPEFunctions(FontFileNameCheck, - FontFileInitFPE, - FontFileFreeFPE, - FontFileResetFPE, - FontFileCheckOpenFont, - FontFileCloseFont, - FontFileCheckListFonts, - FontFileCheckStartListFontsWithInfo, - FontFileCheckListNextFontWithInfo, - NULL, - NULL, - NULL, - FontFileCheckStartListFontsAndAliases, - FontFileCheckListNextFontOrAlias, - FontFileEmptyBitmapSource); -} diff --git a/nx-X11/lib/font/fontfile/fileio.c b/nx-X11/lib/font/fontfile/fileio.c deleted file mode 100644 index a3f94640b..000000000 --- a/nx-X11/lib/font/fontfile/fileio.c +++ /dev/null @@ -1,90 +0,0 @@ -/* $Xorg: fileio.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.9 2001/12/14 19:56:51 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#ifndef O_BINARY -#define O_BINARY O_RDONLY -#endif - -FontFilePtr -FontFileOpen (const char *name) -{ - int fd; - int len; - BufFilePtr raw, cooked; - - fd = open (name, O_BINARY); - if (fd < 0) - return 0; - raw = BufFileOpenRead (fd); - if (!raw) - { - close (fd); - return 0; - } - len = strlen (name); -#ifndef __UNIXOS2__ - if (len > 2 && !strcmp (name + len - 2, ".Z")) { -#else - if (len > 2 && (!strcmp (name + len - 4, ".pcz") || - !strcmp (name + len - 2, ".Z"))) { -#endif - cooked = BufFilePushCompressed (raw); - if (!cooked) { - BufFileClose (raw, TRUE); - return 0; - } - raw = cooked; -#ifdef X_GZIP_FONT_COMPRESSION - } else if (len > 3 && !strcmp (name + len - 3, ".gz")) { - cooked = BufFilePushZIP (raw); - if (!cooked) { - BufFileClose (raw, TRUE); - return 0; - } - raw = cooked; -#endif - } - return (FontFilePtr) raw; -} - -int -FontFileClose (FontFilePtr f) -{ - return BufFileClose ((BufFilePtr) f, TRUE); -} - diff --git a/nx-X11/lib/font/fontfile/filewr.c b/nx-X11/lib/font/fontfile/filewr.c deleted file mode 100644 index d076f166a..000000000 --- a/nx-X11/lib/font/fontfile/filewr.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Xorg: filewr.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.6 2001/12/14 19:56:51 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -FontFilePtr -FontFileOpenWrite (const char *name) -{ - int fd; - -#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__) - fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666); -#else - fd = creat (name, 0666); -#endif - if (fd < 0) - return 0; - return (FontFilePtr) BufFileOpenWrite (fd); -} - -FontFilePtr -FontFileOpenWriteFd (int fd) -{ - return (FontFilePtr) BufFileOpenWrite (fd); -} - -FontFilePtr -FontFileOpenFd (int fd) -{ - return (FontFilePtr) BufFileOpenRead (fd); -} diff --git a/nx-X11/lib/font/fontfile/fontdir.c b/nx-X11/lib/font/fontfile/fontdir.c deleted file mode 100644 index 899ff05ef..000000000 --- a/nx-X11/lib/font/fontfile/fontdir.c +++ /dev/null @@ -1,832 +0,0 @@ -/* $XdotOrg: xc/lib/font/fontfile/fontdir.c,v 1.6 2005/11/14 20:40:42 ajax Exp $ */ -/* $Xorg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.22 2003/07/07 16:40:11 eich Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -#if HAVE_STDINT_H -#include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fffffff -#endif - -Bool -FontFileInitTable (FontTablePtr table, int size) -{ - if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec))) - return FALSE; - if (size) - { - table->entries = (FontEntryPtr) xalloc(sizeof(FontEntryRec) * size); - if (!table->entries) - return FALSE; - } - else - table->entries = 0; - table->used = 0; - table->size = size; - table->sorted = FALSE; - return TRUE; -} - -void -FontFileFreeEntry (FontEntryPtr entry) -{ - FontScalableExtraPtr extra; - int i; - - if (entry->name.name) - xfree(entry->name.name); - entry->name.name = NULL; - - switch (entry->type) - { - case FONT_ENTRY_SCALABLE: - xfree (entry->u.scalable.fileName); - extra = entry->u.scalable.extra; - for (i = 0; i < extra->numScaled; i++) - if (extra->scaled[i].vals.ranges) - xfree (extra->scaled[i].vals.ranges); - xfree (extra->scaled); - xfree (extra); - break; - case FONT_ENTRY_BITMAP: - xfree (entry->u.bitmap.fileName); - entry->u.bitmap.fileName = NULL; - break; - case FONT_ENTRY_ALIAS: - xfree (entry->u.alias.resolved); - entry->u.alias.resolved = NULL; - break; -#ifdef NOTYET - case FONT_ENTRY_BC: - break; -#endif - } -} - -void -FontFileFreeTable (FontTablePtr table) -{ - int i; - - for (i = 0; i < table->used; i++) - FontFileFreeEntry (&table->entries[i]); - xfree (table->entries); -} - -FontDirectoryPtr -FontFileMakeDir(char *dirName, int size) -{ - FontDirectoryPtr dir; - int dirlen; - int needslash = 0; - char *attrib; - int attriblen; - -#if !defined(__UNIXOS2__) && !defined(WIN32) - attrib = strchr(dirName, ':'); -#else - /* OS/2 uses the colon in the drive letter descriptor, skip this */ - attrib = strchr(dirName+2, ':'); -#endif - if (attrib) { - dirlen = attrib - dirName; - attriblen = strlen(attrib); - } else { - dirlen = strlen(dirName); - attriblen = 0; - } - if (dirName[dirlen - 1] != '/') -#ifdef NCD - if (dirlen) /* leave out slash for builtins */ -#endif - needslash = 1; - dir = (FontDirectoryPtr) xalloc(sizeof *dir + dirlen + needslash + 1 + - (attriblen ? attriblen + 1 : 0)); - if (!dir) - return (FontDirectoryPtr)0; - if (!FontFileInitTable (&dir->scalable, 0)) - { - xfree (dir); - return (FontDirectoryPtr)0; - } - if (!FontFileInitTable (&dir->nonScalable, size)) - { - FontFileFreeTable (&dir->scalable); - xfree (dir); - return (FontDirectoryPtr)0; - } - dir->directory = (char *) (dir + 1); - dir->dir_mtime = 0; - dir->alias_mtime = 0; - if (attriblen) - dir->attributes = dir->directory + dirlen + needslash + 1; - else - dir->attributes = NULL; - strncpy(dir->directory, dirName, dirlen); - dir->directory[dirlen] = '\0'; - if (dir->attributes) - strcpy(dir->attributes, attrib); - if (needslash) - strcat(dir->directory, "/"); - return dir; -} - -void -FontFileFreeDir (FontDirectoryPtr dir) -{ - FontFileFreeTable (&dir->scalable); - FontFileFreeTable (&dir->nonScalable); - xfree(dir); -} - -FontEntryPtr -FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype) -{ - FontEntryPtr entry; - int newsize; - - /* can't add entries to a sorted table, pointers get broken! */ - if (table->sorted) - return (FontEntryPtr) 0; /* "cannot" happen */ - if (table->used == table->size) { - if (table->size >= ((INT32_MAX / sizeof(FontEntryRec)) - 100)) - /* If we've read so many entries we're going to ask for 2gb - or more of memory, something is so wrong with this font - directory that we should just give up before we overflow. */ - return NULL; - newsize = table->size + 100; - entry = (FontEntryPtr) xrealloc(table->entries, - newsize * sizeof(FontEntryRec)); - if (!entry) - return (FontEntryPtr)0; - table->size = newsize; - table->entries = entry; - } - entry = &table->entries[table->used]; - *entry = *prototype; - entry->name.name = (char *) xalloc(prototype->name.length + 1); - if (!entry->name.name) - return (FontEntryPtr)0; - memcpy (entry->name.name, prototype->name.name, prototype->name.length); - entry->name.name[entry->name.length] = '\0'; - table->used++; - return entry; -} - -/* - * Compare two strings just like strcmp, but preserve decimal integer - * sorting order, i.e. "2" < "10" or "iso8859-2" < "iso8859-10" < - * "iso10646-1". Strings are sorted as if sequences of digits were - * prefixed by a length indicator (i.e., does not ignore leading zeroes). - * - * Markus Kuhn - */ -#define Xisdigit(c) ('\060' <= (c) && (c) <= '\071') - -static int strcmpn(const char *s1, const char *s2) -{ - int digits, predigits = 0; - const char *ss1, *ss2; - - while (1) { - if (*s1 == 0 && *s2 == 0) - return 0; - digits = Xisdigit(*s1) && Xisdigit(*s2); - if (digits && !predigits) { - ss1 = s1; - ss2 = s2; - while (Xisdigit(*ss1) && Xisdigit(*ss2)) - ss1++, ss2++; - if (!Xisdigit(*ss1) && Xisdigit(*ss2)) - return -1; - if (Xisdigit(*ss1) && !Xisdigit(*ss2)) - return 1; - } - if ((unsigned char)*s1 < (unsigned char)*s2) - return -1; - if ((unsigned char)*s1 > (unsigned char)*s2) - return 1; - predigits = digits; - s1++, s2++; - } -} - - -static int -FontFileNameCompare(const void* a, const void* b) -{ - FontEntryPtr a_name = (FontEntryPtr) a, - b_name = (FontEntryPtr) b; - - return strcmpn(a_name->name.name, b_name->name.name); -} - -void -FontFileSortTable (FontTablePtr table) -{ - if (!table->sorted) { - qsort((char *) table->entries, table->used, sizeof(FontEntryRec), - FontFileNameCompare); - table->sorted = TRUE; - } -} - -void -FontFileSortDir(FontDirectoryPtr dir) -{ - FontFileSortTable (&dir->scalable); - FontFileSortTable (&dir->nonScalable); - /* now that the table is fixed in size, swizzle the pointers */ - FontFileSwitchStringsToBitmapPointers (dir); -} - -/* - Given a Font Table, SetupWildMatch() sets up various pointers and state - information so the table can be searched for name(s) that match a given - fontname pattern -- which may contain wildcards. Under certain - circumstances, SetupWildMatch() will find the one table entry that - matches the pattern. If those circumstances do not pertain, - SetupWildMatch() returns a range within the the table that should be - searched for matching name(s). With the information established by - SetupWildMatch(), including state information in "private", the - PatternMatch() procedure is then used to test names in the range for a - match. -*/ - -#define isWild(c) ((c) == XK_asterisk || (c) == XK_question) -#define isDigit(c) (XK_0 <= (c) && (c) <= XK_9) - -static int -SetupWildMatch(FontTablePtr table, FontNamePtr pat, - int *leftp, int *rightp, int *privatep) -{ - int nDashes; - char c; - char *t; - char *firstWild; - char *firstDigit; - int first; - int center, - left, - right; - int result; - char *name; - - name = pat->name; - nDashes = pat->ndashes; - firstWild = 0; - firstDigit = 0; - t = name; - while ((c = *t++)) { - if (isWild(c)) { - if (!firstWild) - firstWild = t - 1; - } - if (isDigit(c)) { - if (!firstDigit) - firstDigit = t - 1; - } - } - left = 0; - right = table->used; - if (firstWild) - *privatep = nDashes; - else - *privatep = -1; - if (!table->sorted) { - *leftp = left; - *rightp = right; - return -1; - } else if (firstWild) { - if (firstDigit && firstDigit < firstWild) - first = firstDigit - name; - else - first = firstWild - name; - while (left < right) { - center = (left + right) / 2; - result = strncmp(name, table->entries[center].name.name, first); - if (result == 0) - break; - if (result < 0) - right = center; - else - left = center + 1; - } - *leftp = left; - *rightp = right; - return -1; - } else { - while (left < right) { - center = (left + right) / 2; - result = strcmpn(name, table->entries[center].name.name); - if (result == 0) - return center; - if (result < 0) - right = center; - else - left = center + 1; - } - *leftp = 1; - *rightp = 0; - return -1; - } -} - -static int -PatternMatch(char *pat, int patdashes, char *string, int stringdashes) -{ - char c, - t; - - if (stringdashes < patdashes) - return 0; - for (;;) { - switch (c = *pat++) { - case '*': - if (!(c = *pat++)) - return 1; - if (c == XK_minus) { - patdashes--; - for (;;) { - while ((t = *string++) != XK_minus) - if (!t) - return 0; - stringdashes--; - if (PatternMatch(pat, patdashes, string, stringdashes)) - return 1; - if (stringdashes == patdashes) - return 0; - } - } else { - for (;;) { - while ((t = *string++) != c) { - if (!t) - return 0; - if (t == XK_minus) { - if (stringdashes-- < patdashes) - return 0; - } - } - if (PatternMatch(pat, patdashes, string, stringdashes)) - return 1; - } - } - case '?': - if (*string++ == XK_minus) - stringdashes--; - break; - case '\0': - return (*string == '\0'); - case XK_minus: - if (*string++ == XK_minus) { - patdashes--; - stringdashes--; - break; - } - return 0; - default: - if (c == *string++) - break; - return 0; - } - } -} - -int -FontFileCountDashes (char *name, int namelen) -{ - int ndashes = 0; - - while (namelen--) - if (*name++ == '\055') /* avoid non ascii systems */ - ++ndashes; - return ndashes; -} - -char * -FontFileSaveString (char *s) -{ - char *n; - - n = (char *) xalloc (strlen (s) + 1); - if (!n) - return 0; - strcpy (n, s); - return n; -} - -FontEntryPtr -FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat, - FontScalablePtr vals) -{ - int i, - start, - stop, - res, - private; - FontNamePtr name; - - if ((i = SetupWildMatch(table, pat, &start, &stop, &private)) >= 0) - return &table->entries[i]; - for (i = start; i < stop; i++) { - name = &table->entries[i].name; - res = PatternMatch(pat->name, private, name->name, name->ndashes); - if (res > 0) - { - /* Check to see if enhancements requested are available */ - if (vals) - { - int vs = vals->values_supplied; - int cap; - - if (table->entries[i].type == FONT_ENTRY_SCALABLE) - cap = table->entries[i].u.scalable.renderer->capabilities; - else if (table->entries[i].type == FONT_ENTRY_ALIAS) - cap = ~0; /* Calling code will have to see if true */ - else - cap = 0; - if ((((vs & PIXELSIZE_MASK) == PIXELSIZE_ARRAY || - (vs & POINTSIZE_MASK) == POINTSIZE_ARRAY) && - !(cap & CAP_MATRIX)) || - ((vs & CHARSUBSET_SPECIFIED) && - !(cap & CAP_CHARSUBSETTING))) - continue; - } - return &table->entries[i]; - } - if (res < 0) - break; - } - return (FontEntryPtr)0; -} - -FontEntryPtr -FontFileFindNameInDir(FontTablePtr table, FontNamePtr pat) -{ - return FontFileFindNameInScalableDir(table, pat, (FontScalablePtr)0); -} - -int -FontFileFindNamesInScalableDir(FontTablePtr table, FontNamePtr pat, int max, - FontNamesPtr names, FontScalablePtr vals, - int alias_behavior, int *newmax) -{ - int i, - start, - stop, - res, - private; - int ret = Successful; - FontEntryPtr fname; - FontNamePtr name; - - if (max <= 0) - return Successful; - if ((i = SetupWildMatch(table, pat, &start, &stop, &private)) >= 0) { - if (alias_behavior == NORMAL_ALIAS_BEHAVIOR || - table->entries[i].type != FONT_ENTRY_ALIAS) - { - name = &table->entries[i].name; - if (newmax) *newmax = max - 1; - return AddFontNamesName(names, name->name, name->length); - } - start = i; - stop = i + 1; - } - for (i = start, fname = &table->entries[start]; i < stop; i++, fname++) { - res = PatternMatch(pat->name, private, fname->name.name, fname->name.ndashes); - if (res > 0) { - if (vals) - { - int vs = vals->values_supplied; - int cap; - - if (fname->type == FONT_ENTRY_SCALABLE) - cap = fname->u.scalable.renderer->capabilities; - else if (fname->type == FONT_ENTRY_ALIAS) - cap = ~0; /* Calling code will have to see if true */ - else - cap = 0; - if ((((vs & PIXELSIZE_MASK) == PIXELSIZE_ARRAY || - (vs & POINTSIZE_MASK) == POINTSIZE_ARRAY) && - !(cap & CAP_MATRIX)) || - ((vs & CHARSUBSET_SPECIFIED) && - !(cap & CAP_CHARSUBSETTING))) - continue; - } - - if ((alias_behavior & IGNORE_SCALABLE_ALIASES) && - fname->type == FONT_ENTRY_ALIAS) - { - FontScalableRec tmpvals; - if (FontParseXLFDName (fname->name.name, &tmpvals, - FONT_XLFD_REPLACE_NONE) && - !(tmpvals.values_supplied & SIZE_SPECIFY_MASK)) - continue; - } - - ret = AddFontNamesName(names, fname->name.name, fname->name.length); - if (ret != Successful) - goto bail; - - /* If alias_behavior is LIST_ALIASES_AND_TARGET_NAMES, mark - this entry as an alias by negating its length and follow - it by the resolved name */ - if ((alias_behavior & LIST_ALIASES_AND_TARGET_NAMES) && - fname->type == FONT_ENTRY_ALIAS) - { - names->length[names->nnames - 1] = - -names->length[names->nnames - 1]; - ret = AddFontNamesName(names, fname->u.alias.resolved, - strlen(fname->u.alias.resolved)); - if (ret != Successful) - goto bail; - } - - if (--max <= 0) - break; - } else if (res < 0) - break; - } - bail: ; - if (newmax) *newmax = max; - return ret; -} - -int -FontFileFindNamesInDir(FontTablePtr table, FontNamePtr pat, - int max, FontNamesPtr names) -{ - return FontFileFindNamesInScalableDir(table, pat, max, names, - (FontScalablePtr)0, - NORMAL_ALIAS_BEHAVIOR, (int *)0); -} - -Bool -FontFileMatchName(char *name, int length, FontNamePtr pat) -{ - /* Perform a fontfile-type name match on a single name */ - FontTableRec table; - FontEntryRec entries[1]; - - /* Dummy up a table */ - table.used = 1; - table.size = 1; - table.sorted = TRUE; - table.entries = entries; - entries[0].name.name = name; - entries[0].name.length = length; - entries[0].name.ndashes = FontFileCountDashes(name, length); - - return FontFileFindNameInDir(&table, pat) != (FontEntryPtr)0; -} - -/* - * Add a font file to a directory. This handles bitmap and - * scalable names both - */ - -Bool -FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) -{ - FontEntryRec entry; - FontScalableRec vals, zeroVals; - FontRendererPtr renderer; - FontEntryPtr existing; - FontScalableExtraPtr extra; - FontEntryPtr bitmap = 0, scalable; - Bool isscale; - Bool scalable_xlfd; - - renderer = FontFileMatchRenderer (fileName); - if (!renderer) - return FALSE; - entry.name.length = strlen (fontName); - if (entry.name.length > MAXFONTNAMELEN) - entry.name.length = MAXFONTNAMELEN; - entry.name.name = fontName; - CopyISOLatin1Lowered (entry.name.name, fontName, entry.name.length); - entry.name.ndashes = FontFileCountDashes (entry.name.name, entry.name.length); - entry.name.name[entry.name.length] = '\0'; - /* - * Add a bitmap name if the incoming name isn't an XLFD name, or - * if it isn't a scalable name (i.e. non-zero scalable fields) - * - * If name of bitmapped font contains XLFD enhancements, do not add - * a scalable version of the name... this can lead to confusion and - * ambiguity between the font name and the field enhancements. - */ - isscale = entry.name.ndashes == 14 && - FontParseXLFDName(entry.name.name, - &vals, FONT_XLFD_REPLACE_NONE) && - (vals.values_supplied & PIXELSIZE_MASK) != PIXELSIZE_ARRAY && - (vals.values_supplied & POINTSIZE_MASK) != POINTSIZE_ARRAY && - !(vals.values_supplied & ENHANCEMENT_SPECIFY_MASK); -#define UNSCALED_ATTRIB "unscaled" - scalable_xlfd = (isscale && - (((vals.values_supplied & PIXELSIZE_MASK) == 0) || - ((vals.values_supplied & POINTSIZE_MASK) == 0))); - /* - * For scalable fonts without a scalable XFLD, check if the "unscaled" - * attribute is present. - */ - if (isscale && !scalable_xlfd && - dir->attributes && dir->attributes[0] == ':') { - char *ptr1 = dir->attributes + 1; - char *ptr2; - int length; - int uslength = strlen(UNSCALED_ATTRIB); - - do { - ptr2 = strchr(ptr1, ':'); - if (ptr2) - length = ptr2 - ptr1; - else - length = dir->attributes + strlen(dir->attributes) - ptr1; - if (length == uslength && !strncmp(ptr1, UNSCALED_ATTRIB, uslength)) - isscale = FALSE; - if (ptr2) - ptr1 = ptr2 + 1; - } while (ptr2); - } - if (!isscale || (vals.values_supplied & SIZE_SPECIFY_MASK)) - { - /* - * If the renderer doesn't support OpenBitmap, FontFileOpenFont - * will still do the right thing. - */ - entry.type = FONT_ENTRY_BITMAP; - entry.u.bitmap.renderer = renderer; - entry.u.bitmap.pFont = NullFont; - if (!(entry.u.bitmap.fileName = FontFileSaveString (fileName))) - return FALSE; - if (!(bitmap = FontFileAddEntry (&dir->nonScalable, &entry))) - { - xfree (entry.u.bitmap.fileName); - return FALSE; - } - } - /* - * Parse out scalable fields from XLFD names - a scalable name - * just gets inserted, a scaled name has more things to do. - */ - if (isscale) - { - if (vals.values_supplied & SIZE_SPECIFY_MASK) - { - bzero((char *)&zeroVals, sizeof(zeroVals)); - zeroVals.x = vals.x; - zeroVals.y = vals.y; - zeroVals.values_supplied = PIXELSIZE_SCALAR | POINTSIZE_SCALAR; - FontParseXLFDName (entry.name.name, &zeroVals, - FONT_XLFD_REPLACE_VALUE); - entry.name.length = strlen (entry.name.name); - existing = FontFileFindNameInDir (&dir->scalable, &entry.name); - if (existing) - { - if ((vals.values_supplied & POINTSIZE_MASK) == - POINTSIZE_SCALAR && - (int)(vals.point_matrix[3] * 10) == GetDefaultPointSize()) - { - existing->u.scalable.extra->defaults = vals; - - xfree (existing->u.scalable.fileName); - if (!(existing->u.scalable.fileName = FontFileSaveString (fileName))) - return FALSE; - } - if(bitmap) - { - FontFileCompleteXLFD(&vals, &vals); - FontFileAddScaledInstance (existing, &vals, NullFont, - bitmap->name.name); - return TRUE; - } - } - } - if (!(entry.u.scalable.fileName = FontFileSaveString (fileName))) - return FALSE; - extra = (FontScalableExtraPtr) xalloc (sizeof (FontScalableExtraRec)); - if (!extra) - { - xfree (entry.u.scalable.fileName); - return FALSE; - } - bzero((char *)&extra->defaults, sizeof(extra->defaults)); - if ((vals.values_supplied & POINTSIZE_MASK) == POINTSIZE_SCALAR && - (int)(vals.point_matrix[3] * 10) == GetDefaultPointSize()) - extra->defaults = vals; - else - { - FontResolutionPtr resolution; - int num; - - extra->defaults.point_matrix[0] = - extra->defaults.point_matrix[3] = - (double)GetDefaultPointSize() / 10.0; - extra->defaults.point_matrix[1] = - extra->defaults.point_matrix[2] = 0.0; - extra->defaults.values_supplied = - POINTSIZE_SCALAR | PIXELSIZE_UNDEFINED; - extra->defaults.width = -1; - if (vals.x <= 0 || vals.y <= 0) - { - resolution = GetClientResolutions (&num); - if (resolution && num > 0) - { - extra->defaults.x = resolution->x_resolution; - extra->defaults.y = resolution->y_resolution; - } - else - { - extra->defaults.x = 75; - extra->defaults.y = 75; - } - } - else - { - extra->defaults.x = vals.x; - extra->defaults.y = vals.y; - } - FontFileCompleteXLFD (&extra->defaults, &extra->defaults); - } - extra->numScaled = 0; - extra->sizeScaled = 0; - extra->scaled = 0; - extra->private = 0; - entry.type = FONT_ENTRY_SCALABLE; - entry.u.scalable.renderer = renderer; - entry.u.scalable.extra = extra; - if (!(scalable = FontFileAddEntry (&dir->scalable, &entry))) - { - xfree (extra); - xfree (entry.u.scalable.fileName); - return FALSE; - } - if (vals.values_supplied & SIZE_SPECIFY_MASK) - { - if(bitmap) - { - FontFileCompleteXLFD(&vals, &vals); - FontFileAddScaledInstance (scalable, &vals, NullFont, - bitmap->name.name); - } - } - } - return TRUE; -} - -Bool -FontFileAddFontAlias (FontDirectoryPtr dir, char *aliasName, char *fontName) -{ - FontEntryRec entry; - - entry.name.length = strlen (aliasName); - CopyISOLatin1Lowered (aliasName, aliasName, entry.name.length); - entry.name.name = aliasName; - entry.name.ndashes = FontFileCountDashes (entry.name.name, entry.name.length); - entry.type = FONT_ENTRY_ALIAS; - if (!(entry.u.alias.resolved = FontFileSaveString (fontName))) - return FALSE; - if (!FontFileAddEntry (&dir->nonScalable, &entry)) - { - xfree (entry.u.alias.resolved); - return FALSE; - } - return TRUE; -} diff --git a/nx-X11/lib/font/fontfile/fontenc.c b/nx-X11/lib/font/fontfile/fontenc.c deleted file mode 100644 index e96cdde26..000000000 --- a/nx-X11/lib/font/fontfile/fontenc.c +++ /dev/null @@ -1,952 +0,0 @@ -/* -Copyright (c) 1998-2001 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XdotOrg: xc/lib/font/fontfile/fontenc.c,v 1.5 2005/11/08 06:33:26 jkj Exp $ */ -/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.15 2003/02/20 03:25:19 dawes Exp $ */ - -/* Backend-independent encoding code */ - -#include - -#if defined(__SCO__) || defined(__UNIXWARE__) -#include -#endif - -#ifndef FONTENC_NO_LIBFONT - -#include /* defines xalloc and friends */ -#include - -#else - -#include -#define xalloc(n) malloc(n) -#define xrealloc(p, n) realloc(p, n) -#define xfree(p) free(p) -#define FALSE 0 -#define TRUE 1 -#define MAXFONTNAMELEN 1024 -#define MAXFONTFILENAMELEN 1024 - -#endif /* FONTENC_NO_FONTFILE */ - -#include -#include "fontencI.h" - -/* Functions local to this file */ - -static FontEncPtr FontEncLoad(const char*, const char*); - -/* Early versions of this code only knew about hardwired encodings, - hence the following data. Now that the code knows how to load an - encoding from a file, most of these tables could go away. */ - -/* At any rate, no new hardcoded encodings will be added. */ - -static FontMapRec iso10646[]= -{ - {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* Notice that the Apple encodings do not have all the characters in - the corresponding ISO 8859, and therefore the table has some holes. - There's not much more we can do with fonts without a Unicode cmap - unless we are willing to combine cmaps (which we are not). */ - -static unsigned short -iso8859_1_apple_roman[]= -{ 0xCA, 0xC1, 0xA2, 0xA3, 0xDB, 0xB4, 0x00, 0xA4, - 0xAC, 0xA9, 0xBB, 0xC7, 0xC2, 0x00, 0xA8, 0xF8, - 0xA1, 0xB1, 0x00, 0x00, 0xAB, 0xB5, 0xA6, 0xE1, - 0xFC, 0x00, 0xBC, 0xC8, 0x00, 0x00, 0x00, 0xC0, - 0xCB, 0xE7, 0xE5, 0xCC, 0x80, 0x81, 0xAE, 0x82, - 0xE9, 0x83, 0xE6, 0xE8, 0xED, 0xEA, 0xEB, 0xEC, - 0x00, 0x84, 0xF1, 0xEE, 0xEF, 0xCD, 0x85, 0x00, - 0xAF, 0xF4, 0xF2, 0xF3, 0x86, 0x00, 0x00, 0xA7, - 0x88, 0x87, 0x89, 0x8B, 0x8A, 0x8C, 0xBE, 0x8D, - 0x8F, 0x8E, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, - 0x00, 0x96, 0x98, 0x97, 0x99, 0x9B, 0x9A, 0xD6, - 0xBF, 0x9D, 0x9C, 0x9E, 0x9F, 0x00, 0x00, 0xD8 }; - -/* Cannot use simple_recode because need to eliminate 0x80<=code<0xA0 */ -static unsigned -iso8859_1_to_apple_roman(unsigned isocode, void *client_data) -{ - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_1_apple_roman[isocode-0xA0]; - else - return 0; -} - -static FontMapRec iso8859_1[]= -{ - {FONT_ENCODING_TRUETYPE,2,2,0,0,0,0}, /* ISO 8859-1 */ - {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, /* ISO 8859-1 coincides with Unicode*/ - {FONT_ENCODING_TRUETYPE,1,0,iso8859_1_to_apple_roman,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned short iso8859_2_tophalf[]= -{ 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, - 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, - 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, - 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C, - 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, - 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, - 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, - 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, - 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, - 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, - 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, - 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 }; - -static FontEncSimpleMapRec iso8859_2_to_unicode_map= -{0x60, 0, 0xA0, iso8859_2_tophalf }; - -static unsigned short iso8859_2_apple_centeuro[]= -{ 0xCA, 0x84, 0x00, 0xFC, 0x00, 0xBB, 0xE5, 0xA4, - 0xAC, 0xE1, 0x00, 0xE8, 0x8F, 0x00, 0xEB, 0xFB, - 0xA1, 0x88, 0x00, 0xB8, 0x00, 0xBC, 0xE6, 0xFF, - 0x00, 0xE4, 0x00, 0xE9, 0x90, 0x00, 0xEC, 0xFD, - 0xD9, 0xE7, 0x00, 0x00, 0x80, 0xBD, 0x8C, 0x00, - 0x89, 0x83, 0xA2, 0x00, 0x9D, 0xEA, 0x00, 0x91, - 0x00, 0xC1, 0xC5, 0xEE, 0xEF, 0xCC, 0x85, 0x00, - 0xDB, 0xF1, 0xF2, 0xF4, 0x86, 0xF8, 0x00, 0xA7, - 0xDA, 0x87, 0x00, 0x00, 0x8A, 0xBE, 0x8D, 0x00, - 0x8B, 0x8E, 0xAB, 0x00, 0x9E, 0x92, 0x00, 0x93, - 0x00, 0xC4, 0xCB, 0x97, 0x99, 0xCE, 0x9A, 0xD6, - 0xDE, 0xF3, 0x9C, 0xF5, 0x9F, 0xF9, 0x00, 0x00 }; - -static unsigned -iso8859_2_to_apple_centeuro(unsigned isocode, void *client_data) -{ - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_2_apple_centeuro[isocode-0xA0]; - else - return 0; -} - - -static FontMapRec iso8859_2[]= -{ - {FONT_ENCODING_UNICODE,0,0, - FontEncSimpleRecode,0,&iso8859_2_to_unicode_map,0}, - {FONT_ENCODING_TRUETYPE,1,29,iso8859_2_to_apple_centeuro,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned short iso8859_3_tophalf[]= -{ 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7, - 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B, - 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, - 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C, - 0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7, - 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, - 0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, - 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF, - 0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7, - 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, - 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, - 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9}; - -static FontEncSimpleMapRec iso8859_3_to_unicode_map= -{ 0x60, 0, 0xA0, iso8859_3_tophalf }; - -static FontMapRec iso8859_3[]= -{ - {FONT_ENCODING_UNICODE,0,0, - FontEncSimpleRecode,0,&iso8859_3_to_unicode_map,0}, - {0,0,0,0,0,0,0} -}; - - -static unsigned short iso8859_4_tophalf[]= -{ 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, - 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF, - 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, - 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B, - 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, - 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A, - 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, - 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF, - 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, - 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B, - 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, - 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9, -}; - -static FontEncSimpleMapRec iso8859_4_to_unicode_map= -{ 0x60, 0, 0xA0, iso8859_4_tophalf }; - -static FontMapRec iso8859_4[]= -{ - {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, - &iso8859_4_to_unicode_map,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned short iso8859_5_tophalf[]= -{ 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, - 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F}; - -static FontEncSimpleMapRec iso8859_5_to_unicode_map= -{ 0x60, 0, 0xA0, iso8859_5_tophalf }; - -static unsigned short -iso8859_5_apple_cyrillic[]= -{ 0xCA, 0xDD, 0xAB, 0xAE, 0xB8, 0xC1, 0xA7, 0xBA, - 0xB7, 0xBC, 0xBE, 0xCB, 0xCD, 0x00, 0xD8, 0xDA, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, - 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, - 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, - 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, - 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF, - 0xDC, 0xDE, 0xAC, 0xAF, 0xB9, 0xCF, 0xB4, 0xBB, - 0xC0, 0xBD, 0xBF, 0xCC, 0xCE, 0xA4, 0xD9, 0xDB }; - -static unsigned -iso8859_5_to_apple_cyrillic(unsigned isocode, void *client_data) -{ - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_5_apple_cyrillic[isocode-0x80]; - else return 0; -} - -static FontMapRec iso8859_5[]= -{ - {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, - &iso8859_5_to_unicode_map,0}, - {FONT_ENCODING_TRUETYPE,1,7,iso8859_5_to_apple_cyrillic,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* ISO 8859-6 seems useless for serving fonts (not enough presentation - * forms). What do Arabic-speakers use? */ - -static unsigned -iso8859_6_to_unicode(unsigned isocode, void *client_data) -{ - if(isocode<=0xA0 || isocode==0xA4 || isocode==0xAD) - return isocode; - else if(isocode==0xAC || isocode==0xBB || - (isocode>=0xBF && isocode<=0xDA) || - (isocode>=0xE0 && isocode<=0xEF) || - (isocode>=0xF0 && isocode<=0xF2)) - return isocode-0xA0+0x0600; - else - return 0; -} - -static FontMapRec iso8859_6[]= -{ - {FONT_ENCODING_UNICODE,0,0,iso8859_6_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned -iso8859_7_to_unicode(unsigned isocode, void *client_data) -{ - if(isocode<=0xA0 || - (isocode>=0xA3 && isocode<=0xAD) || - (isocode>=0xB0 && isocode<=0xB3) || - isocode==0xB7 || isocode==0xBB || isocode==0xBD) - return isocode; - else if(isocode==0xA1) - return 0x02BD; - else if(isocode==0xA2) - return 0x02BC; - else if(isocode==0xAF) - return 0x2015; - else if(isocode>=0xB4) - return isocode-0xA0+0x0370; - else - return 0; -} - -static FontMapRec iso8859_7[]= -{ - {FONT_ENCODING_UNICODE,0,0,iso8859_7_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned -iso8859_8_to_unicode(unsigned isocode, void *client_data) -{ - if(isocode==0xA1) - return 0; - else if(isocode<0xBF) - return isocode; - else if(isocode==0xDF) - return 0x2017; - else if(isocode>=0xE0 && isocode<=0xFA) - return isocode+0x04F0; - else - return 0; -} - -static FontMapRec iso8859_8[]= -{ - {FONT_ENCODING_UNICODE,0,0,iso8859_8_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned -iso8859_9_to_unicode(unsigned isocode, void *client_data) -{ - switch(isocode) { - case 0xD0: return 0x011E; - case 0xDD: return 0x0130; - case 0xDE: return 0x015E; - case 0xF0: return 0x011F; - case 0xFD: return 0x0131; - case 0xFE: return 0x015F; - default: return isocode; - } -} - -static FontMapRec iso8859_9[]= -{ - {FONT_ENCODING_UNICODE,0,0,iso8859_9_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned short iso8859_10_tophalf[]= -{ 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, - 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A, - 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, - 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2014, 0x016B, 0x014B, - 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, - 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF, - 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168, - 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, - 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, - 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF, - 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, - 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138}; - -static FontEncSimpleMapRec iso8859_10_to_unicode_map= -{ 0x60, 0, 0xA0, iso8859_10_tophalf }; - -static FontMapRec iso8859_10[]= -{ - {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, - &iso8859_10_to_unicode_map,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned -iso8859_15_to_unicode(unsigned isocode, void *client_data) -{ - switch(isocode) { - case 0xA4: return 0x20AC; - case 0xA6: return 0x0160; - case 0xA8: return 0x0161; - case 0xB4: return 0x017D; - case 0xB8: return 0x017E; - case 0xBC: return 0x0152; - case 0xBD: return 0x0153; - case 0xBE: return 0x0178; - default: return isocode; - } -} - -static FontMapRec iso8859_15[]= -{ - {FONT_ENCODING_UNICODE,0,0,iso8859_15_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned short koi8_r_tophalf[]= -{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, - 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2022, 0x221A, 0x2248, - 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, - 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, - 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, - 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, - 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, - 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A}; - -static FontEncSimpleMapRec koi8_r_to_unicode_map= -{ 0x80, 0, 0x80, koi8_r_tophalf }; - - -static FontMapRec koi8_r[]= -{ - {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, - &koi8_r_to_unicode_map,0}, - {0,0,0,0,0,0,0} -}; - -static unsigned -koi8_ru_to_unicode(unsigned koicode, void *client_data) -{ - switch(koicode) { - case 0x93: return 0x201C; - case 0x96: return 0x201D; - case 0x97: return 0x2014; - case 0x98: return 0x2116; - case 0x99: return 0x2122; - case 0x9B: return 0x00BB; - case 0x9C: return 0x00AE; - case 0x9D: return 0x00AB; - case 0x9F: return 0x00A4; - case 0xA4: return 0x0454; - case 0xA6: return 0x0456; - case 0xA7: return 0x0457; - case 0xAD: return 0x0491; - case 0xAE: return 0x045E; - case 0xB4: return 0x0404; - case 0xB6: return 0x0406; - case 0xB7: return 0x0407; - case 0xBD: return 0x0490; - case 0xBE: return 0x040E; - default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); - } -} - -static FontMapRec koi8_ru[]= -{ - {FONT_ENCODING_UNICODE,0,0,koi8_ru_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* koi8-e, ISO-IR-111 or ECMA-Cyrillic */ - -static unsigned short koi8_e_A0_BF[]= -{ 0x00A0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00AD, 0x045E, 0x045F, - 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00A4, 0x040E, 0x040F }; - -static unsigned -koi8_e_to_unicode(unsigned koicode, void *client_data) -{ - if(koicode<0xA0) - return koicode; - else if(koicode<0xC0) - return koi8_e_A0_BF[koicode-0xA0]; - else - return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); -} - -static FontMapRec koi8_e[]= -{ - {FONT_ENCODING_UNICODE,0,0,koi8_e_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* Koi8 unified */ - -static unsigned short koi8_uni_80_BF[]= -{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, - 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, - 0x2591, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, - 0x00A9, 0x2122, 0x00A0, 0x00BB, 0x00AE, 0x00AB, 0x00B7, 0x00A4, - 0x00A0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x0491, 0x045E, 0x045F, - 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x0490, 0x040E, 0x040F }; - -static unsigned -koi8_uni_to_unicode(unsigned koicode, void *client_data) -{ - if(koicode<0x80) - return koicode; - else if(koicode<0xC0) - return koi8_uni_80_BF[koicode-0x80]; - else - return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); -} - -static FontMapRec koi8_uni[]= -{ - {FONT_ENCODING_UNICODE,0,0,koi8_uni_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* Ukrainian variant of Koi8-R; see RFC 2319 */ - -static unsigned -koi8_u_to_unicode(unsigned koicode, void *client_data) -{ - switch(koicode) { - case 0xA4: return 0x0454; - case 0xA6: return 0x0456; - case 0xA7: return 0x0457; - case 0xAD: return 0x0491; - case 0xB4: return 0x0404; - case 0xB6: return 0x0406; - case 0xB7: return 0x0407; - case 0xBD: return 0x0490; - default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); - } -} - -static FontMapRec koi8_u[]= -{ - {FONT_ENCODING_UNICODE,0,0,koi8_u_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* Microsoft Symbol, which is only meaningful for TrueType fonts, is - treated specially in ftenc.c, where we add usFirstCharIndex-0x20 to - the glyph index before applying the cmap. Lovely design. */ - -static FontMapRec microsoft_symbol[]= -{{FONT_ENCODING_TRUETYPE,3,0,0,0,0,0}, - /* You never know */ - {FONT_ENCODING_TRUETYPE,3,1,0,0,0,0}, - {0,0,0,0,0,0,0}}; - -static FontMapRec apple_roman[]= -{{FONT_ENCODING_TRUETYPE,1,0,0,0,0,0}, {0,0,0,0,0,0,0}}; - -/* The data for recodings */ - -/* For compatibility with X11R6.4. Losers. */ -static char *iso8859_15_aliases[2]={"fcd8859-15",0}; - -static FontEncRec initial_encodings[]= -{ - {"iso10646-1",0,256*256,0,iso10646,0,0,0}, /* Unicode */ - {"iso8859-1",0,256,0,iso8859_1,0,0,0}, /* Latin 1 (West European) */ - {"iso8859-2",0,256,0,iso8859_2,0,0,0}, /* Latin 2 (East European) */ - {"iso8859-3",0,256,0,iso8859_3,0,0,0}, /* Latin 3 (South European) */ - {"iso8859-4",0,256,0,iso8859_4,0,0,0}, /* Latin 4 (North European) */ - {"iso8859-5",0,256,0,iso8859_5,0,0,0}, /* Cyrillic */ - {"iso8859-6",0,256,0,iso8859_6,0,0,0}, /* Arabic */ - {"iso8859-7",0,256,0,iso8859_7,0,0,0}, /* Greek */ - {"iso8859-8",0,256,0,iso8859_8,0,0,0}, /* Hebrew */ - {"iso8859-9",0,256,0,iso8859_9,0,0,0}, /* Latin 5 (Turkish) */ - {"iso8859-10",0,256,0,iso8859_10,0,0,0}, /* Latin 6 (Nordic) */ - {"iso8859-15",iso8859_15_aliases,256,0,iso8859_15,0,0,0}, /* Latin 9 */ - {"koi8-r",0,256,0,koi8_r,0,0,0}, /* Russian */ - {"koi8-ru",0,256,0,koi8_ru,0,0,0}, /* Ukrainian */ - {"koi8-uni",0,256,0,koi8_uni,0,0,0}, /* Russian/Ukrainian/Bielorussian */ - {"koi8-e",0,256,0,koi8_e,0,0,0}, /* ``European'' */ - {"koi8-u",0,256,0,koi8_u,0,0,0}, /* Ukrainian too */ - {"microsoft-symbol",0,256,0,microsoft_symbol,0,0,0}, - {"apple-roman",0,256,0,apple_roman,0,0,0}, - {0,0,0,0,0,0,0} -}; - -static FontEncPtr font_encodings=NULL; - -static void -define_initial_encoding_info(void) -{ - FontEncPtr encoding; - FontMapPtr mapping; - - font_encodings = initial_encodings; - for(encoding = font_encodings; ; encoding++) { - encoding->next = encoding + 1; - for(mapping = encoding->mappings; ; mapping++) { - mapping->next = mapping+1; - mapping->encoding = encoding; - if(mapping->next->type == 0) { - mapping->next = NULL; - break; - } - } - if(!encoding->next->name) { - encoding->next = NULL; - break; - } - } -} - - -char* -FontEncFromXLFD(const char *name, int length) -{ - const char *p; - char *q; - static char charset[MAXFONTNAMELEN]; - int len; - - if(length > MAXFONTNAMELEN - 1) - return 0; - - if(name == NULL) - p = NULL; - else { - p = name + length - 1; - while(p > name && *p != '-') - p--; - p--; - while(p >= name && *p != '-') - p--; - if(p <= name) - p = 0; - } - - /* now p either is null or points at the '-' before the charset registry */ - - if(p == 0) - return 0; - - len = length - (p - name) - 1; - memcpy(charset, p+1, len); - charset[len] = 0; - - /* check for a subset specification */ - if((q = strchr(charset, (int)'['))) - *q = 0; - - return charset; -} - -unsigned -FontEncRecode(unsigned code, FontMapPtr mapping) -{ - FontEncPtr encoding = mapping->encoding; - if(encoding && mapping->recode) { - if(encoding->row_size == 0) { - /* linear encoding */ - if(code < encoding->first || code>=encoding->size) - return 0; - } else { - /* matrix encoding */ - int row = code/0x100, col = code&0xFF; - if(row < encoding->first || row >= encoding->size || - col < encoding->first_col || col >= encoding->row_size) - return 0; - } - return (*mapping->recode)(code, mapping->client_data); - } else - return code; -} - -char* -FontEncName(unsigned code, FontMapPtr mapping) -{ - FontEncPtr encoding = mapping->encoding; - if(encoding && mapping->name) { - if((encoding->row_size == 0 && code >= encoding->size) || - (encoding->row_size != 0 && - (code/0x100 >= encoding->size || - (code&0xFF) >= encoding->row_size))) - return 0; - return (*mapping->name)(code, mapping->client_data); - } else - return 0; -} - -FontEncPtr -FontEncFind(const char *encoding_name, const char *filename) -{ - FontEncPtr encoding; - char **alias; - - if(font_encodings == NULL) define_initial_encoding_info(); - - for(encoding = font_encodings; encoding; encoding = encoding->next) { - if(!strcasecmp(encoding->name, encoding_name)) - return encoding; - if(encoding->aliases) - for(alias=encoding->aliases; *alias; alias++) - if(!strcasecmp(*alias, encoding_name)) - return encoding; - } - - /* Unknown charset, try to load a definition file */ - return FontEncLoad(encoding_name, filename); -} - -FontMapPtr -FontMapFind(FontEncPtr encoding, int type, int pid, int eid) -{ - FontMapPtr mapping; - if(encoding == NULL) - return NULL; - - for(mapping = encoding->mappings; mapping; mapping = mapping->next) { - if(mapping->type != type) - continue; - if(pid > 0 && mapping->pid != pid) - continue; - if(eid > 0 && mapping->eid != eid) - continue; - return mapping; - } - return NULL; -} - -FontMapPtr -FontEncMapFind(const char *encoding_name, int type, int pid, int eid, - const char *filename) -{ - FontEncPtr encoding; - FontMapPtr mapping; - - encoding = FontEncFind(encoding_name, filename); - if(encoding == NULL) - return NULL; - mapping = FontMapFind(encoding, type, pid, eid); - return mapping; -} - -static FontEncPtr -FontEncLoad(const char *encoding_name, const char *filename) -{ - FontEncPtr encoding; - - encoding = FontEncReallyLoad(encoding_name, filename); - if (encoding == NULL) { - return 0; - } else { - char **alias; - int found = 0; - - /* Check whether the name is already known for this encoding */ - if(strcasecmp(encoding->name, encoding_name) == 0) { - found = 1; - } else { - if(encoding->aliases) { - for(alias=encoding->aliases; *alias; alias++) - if(!strcasecmp(*alias, encoding_name)) { - found = 1; - break; - } - } - } - - if(!found) { - /* Add a new alias. This works because we know that this - particular encoding has been allocated dynamically */ - char **new_aliases; - char *new_name; - int numaliases = 0; - - new_name = xalloc(strlen(encoding_name) + 1); - if(new_name == NULL) - return NULL; - strcpy(new_name, encoding_name); - if(encoding->aliases) { - for(alias = encoding->aliases; *alias; alias++) - numaliases++; - } - new_aliases = (char**)xalloc((numaliases+2)*sizeof(char*)); - if(new_aliases == NULL) { - xfree(new_name); - return NULL; - } - if(encoding->aliases) { - memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); - xfree(encoding->aliases); - } - new_aliases[numaliases] = new_name; - new_aliases[numaliases+1] = NULL; - encoding->aliases = new_aliases; - } - - /* register the new encoding */ - encoding->next=font_encodings; - font_encodings=encoding; - - return encoding; - } -} - -unsigned -FontEncSimpleRecode(unsigned code, void *client_data) -{ - FontEncSimpleMapPtr map; - unsigned index; - - map = client_data; - - if(code > 0xFFFF || (map->row_size && (code&0xFF) >= map->row_size)) - return 0; - - if(map->row_size) - index = (code&0xFF)+(code>>8)*map->row_size; - else - index = code; - - if(map->map && index>=map->first && indexfirst+map->len) - return map->map[index-map->first]; - else - return code; -} - -char * -FontEncSimpleName(unsigned code, void *client_data) -{ - FontEncSimpleNamePtr map; - - map = client_data; - if(map && code >= map->first && codefirst+map->len) - return map->map[code-map->first]; - else - return NULL; -} - -unsigned -FontEncUndefinedRecode(unsigned code, void *client_data) -{ - return code; -} - -char * -FontEncUndefinedName(unsigned code, void *client_data) -{ - return NULL; -} - -#define FONTENC_SEGMENT_SIZE 256 -#define FONTENC_SEGMENTS 256 -#define FONTENC_INVERSE_CODES (FONTENC_SEGMENT_SIZE * FONTENC_SEGMENTS) - -static unsigned int -reverse_reverse(unsigned i, void* data) -{ - int s, j; - unsigned **map = (unsigned**)data; - - if(i >= FONTENC_INVERSE_CODES) - return 0; - - if(map == NULL) - return 0; - - s = i / FONTENC_SEGMENT_SIZE; - j = i % FONTENC_SEGMENT_SIZE; - - if(map[s] == NULL) - return 0; - else - return map[s][j]; -} - -static int -tree_set(unsigned int **map, unsigned int i, unsigned int j) -{ - int s, c; - - if(i >= FONTENC_INVERSE_CODES) - return FALSE; - - s = i / FONTENC_SEGMENT_SIZE; - c = i % FONTENC_SEGMENT_SIZE; - - if(map[s] == NULL) { - map[s] = calloc(FONTENC_SEGMENT_SIZE, sizeof(int)); - if(map[s] == NULL) - return FALSE; - } - - map[s][c] = j; - return TRUE; -} - -FontMapReversePtr -FontMapReverse(FontMapPtr mapping) -{ - FontEncPtr encoding = mapping->encoding; - FontMapReversePtr reverse = NULL; - unsigned int **map = NULL; - int i, j, k; - - if(encoding == NULL) goto bail; - - map = calloc(FONTENC_SEGMENTS, sizeof(int*)); - if(map == NULL) goto bail; - - if(encoding->row_size == 0) { - for(i = encoding->first; i < encoding->size; i++) { - k = FontEncRecode(i, mapping); - if(k != 0) - if(!tree_set(map, k, i)) - goto bail; - } - } else { - for(i = encoding->first; i < encoding->size; i++) { - for(j = encoding->first_col; j < encoding->row_size; j++) { - k = FontEncRecode(i*256 + j, mapping); - if(k != 0) - if(!tree_set(map, k, i*256+j)) - goto bail; - } - } - } - - reverse = malloc(sizeof(FontMapReverseRec)); - if(!reverse) goto bail; - - reverse->reverse = reverse_reverse; - reverse->data = map; - return reverse; - - bail: - if(map) - xfree(map); - if(reverse) - xfree(reverse); - return NULL; -} - -void -FontMapReverseFree(FontMapReversePtr delendum) -{ - unsigned int **map = (unsigned int**)delendum; - int i; - - if(map == NULL) - return; - - for(i = 0; i < FONTENC_SEGMENTS; i++) - if(map[i] != NULL) - xfree(map[i]); - - xfree(map); - return; -} diff --git a/nx-X11/lib/font/fontfile/fontencI.h b/nx-X11/lib/font/fontfile/fontencI.h deleted file mode 100644 index bd35a1fbb..000000000 --- a/nx-X11/lib/font/fontfile/fontencI.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright (c) 1998-2001 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ - -/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.3 1999/04/25 10:01:43 dawes Exp $ */ - -/* Private types and functions for the encoding code. */ -/* Used by the files `fontenc.h' and `encparse.h' */ - -typedef struct _FontEncSimpleMap { - unsigned len; /* might be 0x10000 */ - unsigned short row_size; - unsigned short first; - unsigned short *map; -} FontEncSimpleMapRec, *FontEncSimpleMapPtr; - -typedef struct _FontEncSimpleName { - unsigned len; - unsigned short first; - char **map; -} FontEncSimpleNameRec, *FontEncSimpleNamePtr; - -unsigned FontEncSimpleRecode(unsigned, void*); -unsigned FontEncUndefinedRecode(unsigned, void*); -char *FontEncSimpleName(unsigned, void*); -char *FontEncUndefinedName(unsigned, void*); - -FontEncPtr FontEncReallyLoad(const char*, const char*); diff --git a/nx-X11/lib/font/fontfile/fontencc.c b/nx-X11/lib/font/fontfile/fontencc.c deleted file mode 100644 index b54079acf..000000000 --- a/nx-X11/lib/font/fontfile/fontencc.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright (c) 1998-2001 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ -/* $XFree86: xc/lib/font/fontfile/fontencc.c,v 1.1 2001/08/13 21:46:47 dawes Exp $ */ - -/* Binary compatibility code. */ - -/* This file includes code to make modules compiled for earlier - versions of the fontenc interfaces link with this one. It does - *not* provide source compatibility, as many of the data structures - now have different names. */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -extern void ErrorF(const char *f, ...); - -char * -font_encoding_from_xlfd(const char * name, int length) -{ - return FontEncFromXLFD(name, length); -} - -FontEncPtr -font_encoding_find(const char *encoding_name, const char *filename) -{ - return FontEncFind(encoding_name, filename); -} - -unsigned -font_encoding_recode(unsigned code, - FontEncPtr encoding, FontMapPtr mapping) -{ - if(encoding != mapping->encoding) { - ErrorF("Inconsistent mapping/encoding\n"); - return 0; - } - return FontEncRecode(code, mapping); -} - -char * -font_encoding_name(unsigned code, - FontEncPtr encoding, FontMapPtr mapping) -{ - if(encoding != mapping->encoding) { - ErrorF("Inconsistent mapping/encoding\n"); - return 0; - } - return FontEncName(code, mapping); -} - -char ** -identifyEncodingFile(const char *filename) -{ - return FontEncIdentify(filename); -} diff --git a/nx-X11/lib/font/fontfile/fontfile.c b/nx-X11/lib/font/fontfile/fontfile.c deleted file mode 100644 index 2356c0595..000000000 --- a/nx-X11/lib/font/fontfile/fontfile.c +++ /dev/null @@ -1,1147 +0,0 @@ -/* $XdotOrg: xc/lib/font/fontfile/fontfile.c,v 1.5 2005/07/09 06:36:13 keithp Exp $ */ -/* $Xorg: fontfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.21 2003/12/02 19:50:40 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ -/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#ifdef WIN32 -#include -#endif - -/* - * Map FPE functions to renderer functions - */ - -static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont, - int flags, FontEntryPtr entry, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font); - -int -FontFileNameCheck (char *name) -{ -#ifndef NCD -#if defined(__UNIXOS2__) || defined(WIN32) - /* OS/2 uses D:/... as a path name for fonts, so accept this as a valid - * path if it starts with a letter and a colon. Same applies for WIN32 - */ - if (isalpha(*name) && name[1]==':') - return TRUE; -#endif - return *name == '/'; -#else - return ((strcmp(name, "built-ins") == 0) || (*name == '/')); -#endif -} - -int -FontFileInitFPE (FontPathElementPtr fpe) -{ - int status; - FontDirectoryPtr dir; - - status = FontFileReadDirectory (fpe->name, &dir); - if (status == Successful) - { - if (dir->nonScalable.used > 0) - if (!FontFileRegisterBitmapSource (fpe)) - { - FontFileFreeFPE (fpe); - return AllocError; - } - fpe->private = (pointer) dir; - } - return status; -} - -/* ARGSUSED */ -int -FontFileResetFPE (FontPathElementPtr fpe) -{ - FontDirectoryPtr dir; - - dir = (FontDirectoryPtr) fpe->private; - /* - * The reset must fail for bitmap fonts because they get cleared when - * the path is set. - */ - if (FontFileDirectoryChanged (dir)) - { - /* can't do it, so tell the caller to close and re-open */ - return FPEResetFailed; - } - else - { - if (dir->nonScalable.used > 0) - if (!FontFileRegisterBitmapSource (fpe)) - { - return FPEResetFailed; - } - return Successful; - } -} - -int -FontFileFreeFPE (FontPathElementPtr fpe) -{ - FontFileUnregisterBitmapSource (fpe); - FontFileFreeDir ((FontDirectoryPtr) fpe->private); - return Successful; -} - -static int -transfer_values_to_alias(char *entryname, int entrynamelength, - char *resolvedname, - char **aliasName, FontScalablePtr vals) -{ - static char aliasname[MAXFONTNAMELEN]; - int nameok = 1, len; - char lowerName[MAXFONTNAMELEN]; - - *aliasName = resolvedname; - if ((len = strlen(*aliasName)) <= MAXFONTNAMELEN && - (entrynamelength < MAXFONTNAMELEN) && - FontFileCountDashes (*aliasName, len) == 14) - { - FontScalableRec tmpVals; - FontScalableRec tmpVals2; - - tmpVals2 = *vals; - - /* If we're aliasing a scalable name, transfer values - from the name into the destination alias, multiplying - by matrices that appear in the alias. */ - - CopyISOLatin1Lowered (lowerName, entryname, - entrynamelength); - lowerName[entrynamelength] = '\0'; - - if (FontParseXLFDName(lowerName, &tmpVals, - FONT_XLFD_REPLACE_NONE) && - !tmpVals.values_supplied && - FontParseXLFDName(*aliasName, &tmpVals, - FONT_XLFD_REPLACE_NONE)) - { - double *matrix = 0, tempmatrix[4]; - - /* Use a matrix iff exactly one is defined */ - if ((tmpVals.values_supplied & PIXELSIZE_MASK) == - PIXELSIZE_ARRAY && - !(tmpVals.values_supplied & POINTSIZE_MASK)) - matrix = tmpVals.pixel_matrix; - else if ((tmpVals.values_supplied & POINTSIZE_MASK) == - POINTSIZE_ARRAY && - !(tmpVals.values_supplied & PIXELSIZE_MASK)) - matrix = tmpVals.point_matrix; - - /* If matrix given in the alias, compute new point - and/or pixel matrices */ - if (matrix) - { - /* Complete the XLFD name to avoid potential - gotchas */ - if (FontFileCompleteXLFD(&tmpVals2, &tmpVals2)) - { - tempmatrix[0] = - matrix[0] * tmpVals2.point_matrix[0] + - matrix[1] * tmpVals2.point_matrix[2]; - tempmatrix[1] = - matrix[0] * tmpVals2.point_matrix[1] + - matrix[1] * tmpVals2.point_matrix[3]; - tempmatrix[2] = - matrix[2] * tmpVals2.point_matrix[0] + - matrix[3] * tmpVals2.point_matrix[2]; - tempmatrix[3] = - matrix[2] * tmpVals2.point_matrix[1] + - matrix[3] * tmpVals2.point_matrix[3]; - tmpVals2.point_matrix[0] = tempmatrix[0]; - tmpVals2.point_matrix[1] = tempmatrix[1]; - tmpVals2.point_matrix[2] = tempmatrix[2]; - tmpVals2.point_matrix[3] = tempmatrix[3]; - - tempmatrix[0] = - matrix[0] * tmpVals2.pixel_matrix[0] + - matrix[1] * tmpVals2.pixel_matrix[2]; - tempmatrix[1] = - matrix[0] * tmpVals2.pixel_matrix[1] + - matrix[1] * tmpVals2.pixel_matrix[3]; - tempmatrix[2] = - matrix[2] * tmpVals2.pixel_matrix[0] + - matrix[3] * tmpVals2.pixel_matrix[2]; - tempmatrix[3] = - matrix[2] * tmpVals2.pixel_matrix[1] + - matrix[3] * tmpVals2.pixel_matrix[3]; - tmpVals2.pixel_matrix[0] = tempmatrix[0]; - tmpVals2.pixel_matrix[1] = tempmatrix[1]; - tmpVals2.pixel_matrix[2] = tempmatrix[2]; - tmpVals2.pixel_matrix[3] = tempmatrix[3]; - - tmpVals2.values_supplied = - (tmpVals2.values_supplied & - ~(PIXELSIZE_MASK | POINTSIZE_MASK)) | - PIXELSIZE_ARRAY | POINTSIZE_ARRAY; - } - else - nameok = 0; - } - - CopyISOLatin1Lowered (aliasname, *aliasName, len + 1); - if (nameok && FontParseXLFDName(aliasname, &tmpVals2, - FONT_XLFD_REPLACE_VALUE)) - /* Return a version of the aliasname that has - had the vals stuffed into it. To avoid - memory leak, this alias name lives in a - static buffer. The caller needs to be done - with this buffer before this procedure is - called again to avoid reentrancy problems. */ - *aliasName = aliasname; - } - } - return nameok; -} - -/* ARGSUSED */ -int -FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font) -{ - FontDirectoryPtr dir; - char lowerName[MAXFONTNAMELEN]; - char fileName[MAXFONTFILENAMELEN*2 + 1]; - FontNameRec tmpName; - FontEntryPtr entry; - FontScalableRec vals; - FontScalableEntryPtr scalable; - FontScaledPtr scaled; - FontBitmapEntryPtr bitmap; - int ret; - Bool noSpecificSize; - int nranges; - fsRange *ranges; - - if (namelen >= MAXFONTNAMELEN) - return AllocError; - dir = (FontDirectoryPtr) fpe->private; - - /* Match non-scalable pattern */ - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - ranges = FontParseRanges(lowerName, &nranges); - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - if (!FontParseXLFDName(lowerName, &vals, FONT_XLFD_REPLACE_NONE)) - bzero(&vals, sizeof(vals)); - if (!(entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName)) && - tmpName.ndashes == 14 && - FontParseXLFDName (lowerName, &vals, FONT_XLFD_REPLACE_ZERO)) - { - tmpName.length = strlen(lowerName); - entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName); - } - - if (entry) - { - switch (entry->type) { - case FONT_ENTRY_BITMAP: - bitmap = &entry->u.bitmap; - if (bitmap->pFont) - { - *pFont = bitmap->pFont; - (*pFont)->fpe = fpe; - ret = Successful; - } - else - { - ret = FontFileOpenBitmapNCF (fpe, pFont, flags, entry, format, - fmask, non_cachable_font); - if (ret == Successful && *pFont) - (*pFont)->fpe = fpe; - } - break; - case FONT_ENTRY_ALIAS: - vals.nranges = nranges; - vals.ranges = ranges; - transfer_values_to_alias(entry->name.name, entry->name.length, - entry->u.alias.resolved, aliasName, &vals); - ret = FontNameAlias; - break; -#ifdef NOTYET - case FONT_ENTRY_BC: - bc = &entry->u.bc; - entry = bc->entry; - ret = (*scalable->renderer->OpenScalable) - (fpe, pFont, flags, entry, &bc->vals, format, fmask, - non_cachable_font); - if (ret == Successful && *pFont) - (*pFont)->fpe = fpe; - break; -#endif - default: - ret = BadFontName; - } - } - else - { - ret = BadFontName; - } - - if (ret != BadFontName) - { - if (ranges) xfree(ranges); - return ret; - } - - /* Match XLFD patterns */ - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - if (!FontParseXLFDName (lowerName, &vals, FONT_XLFD_REPLACE_ZERO) || - !(tmpName.length = strlen (lowerName), - entry = FontFileFindNameInScalableDir (&dir->scalable, &tmpName, - &vals))) { - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - entry = FontFileFindNameInScalableDir (&dir->scalable, &tmpName, &vals); - if (entry) - { - strcpy(lowerName, entry->name.name); - tmpName.name = lowerName; - tmpName.length = entry->name.length; - tmpName.ndashes = entry->name.ndashes; - } - } - if (entry) - { - noSpecificSize = FALSE; /* TRUE breaks XLFD enhancements */ - if (entry->type == FONT_ENTRY_SCALABLE && - FontFileCompleteXLFD (&vals, &entry->u.scalable.extra->defaults)) - { - scalable = &entry->u.scalable; - if ((vals.values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY || - (vals.values_supplied & POINTSIZE_MASK) == POINTSIZE_ARRAY || - (vals.values_supplied & - ~SIZE_SPECIFY_MASK & ~CHARSUBSET_SPECIFIED)) - scaled = 0; - else - scaled = FontFileFindScaledInstance (entry, &vals, - noSpecificSize); - /* - * A scaled instance can occur one of two ways: - * - * Either the font has been scaled to this - * size already, in which case scaled->pFont - * will point at that font. - * - * Or a bitmap instance in this size exists, - * which is handled as if we got a pattern - * matching the bitmap font name. - */ - if (scaled) - { - if (scaled->pFont) - { - *pFont = scaled->pFont; - (*pFont)->fpe = fpe; - ret = Successful; - } - else if (scaled->bitmap) - { - entry = scaled->bitmap; - bitmap = &entry->u.bitmap; - if (bitmap->pFont) - { - *pFont = bitmap->pFont; - (*pFont)->fpe = fpe; - ret = Successful; - } - else - { - ret = FontFileOpenBitmapNCF (fpe, pFont, flags, entry, - format, fmask, - non_cachable_font); - if (ret == Successful && *pFont) - (*pFont)->fpe = fpe; - } - } - else /* "cannot" happen */ - { - ret = BadFontName; - } - } - else - { - ret = FontFileMatchBitmapSource (fpe, pFont, flags, entry, &tmpName, &vals, format, fmask, noSpecificSize); - if (ret != Successful) - { - char origName[MAXFONTNAMELEN]; - - CopyISOLatin1Lowered (origName, name, namelen); - origName[namelen] = '\0'; - - /* Pass the original XLFD name in the vals - structure; the rasterizer is free to examine it - for hidden meanings. This information will not - be saved in the scaled-instances table. */ - - vals.xlfdName = origName; - vals.ranges = ranges; - vals.nranges = nranges; - - if (strlen(dir->directory) + strlen(scalable->fileName) >= - sizeof(fileName)) { - ret = BadFontName; - } else { - strcpy (fileName, dir->directory); - strcat (fileName, scalable->fileName); - ret = (*scalable->renderer->OpenScalable) (fpe, pFont, - flags, entry, fileName, &vals, format, fmask, - non_cachable_font); - } - - /* In case rasterizer does something bad because of - charset subsetting... */ - if (ret == Successful && - ((*pFont)->info.firstCol > (*pFont)->info.lastCol || - (*pFont)->info.firstRow > (*pFont)->info.lastRow)) - { - (*(*pFont)->unload_font)(*pFont); - ret = BadFontName; - } - /* Save the instance */ - if (ret == Successful) - { - if (FontFileAddScaledInstance (entry, &vals, - *pFont, (char *) 0)) - ranges = 0; - else - (*pFont)->fpePrivate = (pointer) 0; - (*pFont)->fpe = fpe; - } - } - } - } - } - else - ret = BadFontName; - - if (ranges) - xfree(ranges); - return ret; -} - -/* ARGSUSED */ -void -FontFileCloseFont (FontPathElementPtr fpe, FontPtr pFont) -{ - FontEntryPtr entry; - - if ((entry = (FontEntryPtr) pFont->fpePrivate)) { - switch (entry->type) { - case FONT_ENTRY_SCALABLE: - FontFileRemoveScaledInstance (entry, pFont); - break; - case FONT_ENTRY_BITMAP: - entry->u.bitmap.pFont = 0; - break; - default: - /* "cannot" happen */ - break; - } - pFont->fpePrivate = 0; - } - (*pFont->unload_font) (pFont); -} - -static int -FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont, - int flags, FontEntryPtr entry, - fsBitmapFormat format, fsBitmapFormatMask fmask, - FontPtr non_cachable_font) -{ - FontBitmapEntryPtr bitmap; - char fileName[MAXFONTFILENAMELEN*2+1]; - int ret; - FontDirectoryPtr dir; - - dir = (FontDirectoryPtr) fpe->private; - bitmap = &entry->u.bitmap; - if(!bitmap || !bitmap->renderer->OpenBitmap) - return BadFontName; - if (strlen(dir->directory) + strlen(bitmap->fileName) >= sizeof(fileName)) - return BadFontName; - strcpy (fileName, dir->directory); - strcat (fileName, bitmap->fileName); - ret = (*bitmap->renderer->OpenBitmap) - (fpe, pFont, flags, entry, fileName, format, fmask, - non_cachable_font); - if (ret == Successful) - { - bitmap->pFont = *pFont; - (*pFont)->fpePrivate = (pointer) entry; - } - return ret; -} - -int -FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont, - int flags, FontEntryPtr entry, - fsBitmapFormat format, fsBitmapFormatMask fmask) -{ - return FontFileOpenBitmapNCF (fpe, pFont, flags, entry, format, fmask, - (FontPtr)0); -} - -static int -FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, - FontEntryPtr entry) -{ - FontBitmapEntryPtr bitmap; - char fileName[MAXFONTFILENAMELEN*2+1]; - int ret; - FontDirectoryPtr dir; - - dir = (FontDirectoryPtr) fpe->private; - bitmap = &entry->u.bitmap; - if (!bitmap || !bitmap->renderer->GetInfoBitmap) - return BadFontName; - if (strlen(dir->directory) + strlen(bitmap->fileName) >= sizeof(fileName)) - return BadFontName; - strcpy (fileName, dir->directory); - strcat (fileName, bitmap->fileName); - ret = (*bitmap->renderer->GetInfoBitmap) (fpe, pFontInfo, entry, fileName); - return ret; -} - -static void -_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames, - FontNamePtr nameptr, char *zeroChars, - FontScalablePtr vals, fsRange *ranges, - int nranges, int *max) -{ - int i; - FontScalableRec zeroVals, tmpVals; - for (i = 0; i < scaleNames->nnames; i++) - { - char nameChars[MAXFONTNAMELEN]; - if (!*max) - return; - FontParseXLFDName (scaleNames->names[i], &zeroVals, - FONT_XLFD_REPLACE_NONE); - tmpVals = *vals; - if (FontFileCompleteXLFD (&tmpVals, &zeroVals)) - { - --*max; - - strcpy (nameChars, scaleNames->names[i]); - if ((vals->values_supplied & PIXELSIZE_MASK) || - !(vals->values_supplied & PIXELSIZE_WILDCARD) || - vals->y == 0) - { - tmpVals.values_supplied = - (tmpVals.values_supplied & ~PIXELSIZE_MASK) | - (vals->values_supplied & PIXELSIZE_MASK); - tmpVals.pixel_matrix[0] = vals->pixel_matrix[0]; - tmpVals.pixel_matrix[1] = vals->pixel_matrix[1]; - tmpVals.pixel_matrix[2] = vals->pixel_matrix[2]; - tmpVals.pixel_matrix[3] = vals->pixel_matrix[3]; - } - if ((vals->values_supplied & POINTSIZE_MASK) || - !(vals->values_supplied & POINTSIZE_WILDCARD) || - vals->y == 0) - { - tmpVals.values_supplied = - (tmpVals.values_supplied & ~POINTSIZE_MASK) | - (vals->values_supplied & POINTSIZE_MASK); - tmpVals.point_matrix[0] = vals->point_matrix[0]; - tmpVals.point_matrix[1] = vals->point_matrix[1]; - tmpVals.point_matrix[2] = vals->point_matrix[2]; - tmpVals.point_matrix[3] = vals->point_matrix[3]; - } - if (vals->width <= 0) - tmpVals.width = 0; - if (vals->x == 0) - tmpVals.x = 0; - if (vals->y == 0) - tmpVals.y = 0; - tmpVals.ranges = ranges; - tmpVals.nranges = nranges; - FontParseXLFDName (nameChars, &tmpVals, - FONT_XLFD_REPLACE_VALUE); - /* If we're marking aliases with negative lengths, we - need to concoct a valid target name to follow it. - Otherwise we're done. */ - if (scaleNames->length[i] >= 0) - { - (void) AddFontNamesName (names, nameChars, - strlen (nameChars)); - /* If our original pattern matches the name from - the table and that name doesn't duplicate what - we just added, add the name from the table */ - if (strcmp(nameChars, scaleNames->names[i]) && - FontFileMatchName(scaleNames->names[i], - scaleNames->length[i], - nameptr) && - *max) - { - --*max; - (void) AddFontNamesName (names, scaleNames->names[i], - scaleNames->length[i]); - } - } - else - { - char *aliasName; - vals->ranges = ranges; - vals->nranges = nranges; - if (transfer_values_to_alias(zeroChars, - strlen(zeroChars), - scaleNames->names[++i], - &aliasName, vals)) - { - (void) AddFontNamesName (names, nameChars, - strlen (nameChars)); - names->length[names->nnames - 1] = - -names->length[names->nnames - 1]; - (void) AddFontNamesName (names, aliasName, - strlen (aliasName)); - /* If our original pattern matches the name from - the table and that name doesn't duplicate what - we just added, add the name from the table */ - if (strcmp(nameChars, scaleNames->names[i - 1]) && - FontFileMatchName(scaleNames->names[i - 1], - -scaleNames->length[i - 1], - nameptr) && - *max) - { - --*max; - (void) AddFontNamesName (names, - scaleNames->names[i - 1], - -scaleNames->length[i - 1]); - names->length[names->nnames - 1] = - -names->length[names->nnames - 1]; - (void) AddFontNamesName (names, aliasName, - strlen (aliasName)); - } - } - } - } - } -} - -/* ARGSUSED */ -static int -_FontFileListFonts (pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, FontNamesPtr names, - int mark_aliases) -{ - FontDirectoryPtr dir; - char lowerChars[MAXFONTNAMELEN], zeroChars[MAXFONTNAMELEN]; - FontNameRec lowerName; - FontNameRec zeroName; - FontNamesPtr scaleNames; - FontScalableRec vals; - fsRange *ranges; - int nranges; - int result = BadFontName; - - if (len >= MAXFONTNAMELEN) - return AllocError; - dir = (FontDirectoryPtr) fpe->private; - CopyISOLatin1Lowered (lowerChars, pat, len); - lowerChars[len] = '\0'; - lowerName.name = lowerChars; - lowerName.length = len; - lowerName.ndashes = FontFileCountDashes (lowerChars, len); - - /* Match XLFD patterns */ - - strcpy (zeroChars, lowerChars); - if (lowerName.ndashes == 14 && - FontParseXLFDName (zeroChars, &vals, FONT_XLFD_REPLACE_ZERO)) - { - ranges = FontParseRanges(lowerChars, &nranges); - result = FontFileFindNamesInScalableDir (&dir->nonScalable, - &lowerName, max, names, - (FontScalablePtr)0, - (mark_aliases ? - LIST_ALIASES_AND_TARGET_NAMES : - NORMAL_ALIAS_BEHAVIOR) | - IGNORE_SCALABLE_ALIASES, - &max); - zeroName.name = zeroChars; - zeroName.length = strlen (zeroChars); - zeroName.ndashes = lowerName.ndashes; - - /* Look for scalable names and aliases, adding scaled instances of - them to the output */ - - /* Scalable names... */ - scaleNames = MakeFontNamesRecord (0); - if (!scaleNames) - { - if (ranges) xfree(ranges); - return AllocError; - } - FontFileFindNamesInScalableDir (&dir->scalable, &zeroName, max, - scaleNames, &vals, - mark_aliases ? - LIST_ALIASES_AND_TARGET_NAMES : - NORMAL_ALIAS_BEHAVIOR, (int *)0); - _FontFileAddScalableNames(names, scaleNames, &lowerName, - zeroChars, &vals, ranges, nranges, - &max); - FreeFontNames (scaleNames); - - /* Scalable aliases... */ - scaleNames = MakeFontNamesRecord (0); - if (!scaleNames) - { - if (ranges) xfree(ranges); - return AllocError; - } - FontFileFindNamesInScalableDir (&dir->nonScalable, &zeroName, - max, scaleNames, &vals, - mark_aliases ? - LIST_ALIASES_AND_TARGET_NAMES : - NORMAL_ALIAS_BEHAVIOR, (int *)0); - _FontFileAddScalableNames(names, scaleNames, &lowerName, - zeroChars, &vals, ranges, nranges, - &max); - FreeFontNames (scaleNames); - - if (ranges) xfree(ranges); - } - else - { - result = FontFileFindNamesInScalableDir (&dir->nonScalable, - &lowerName, max, names, - (FontScalablePtr)0, - mark_aliases ? - LIST_ALIASES_AND_TARGET_NAMES : - NORMAL_ALIAS_BEHAVIOR, - &max); - if (result == Successful) - result = FontFileFindNamesInScalableDir (&dir->scalable, - &lowerName, max, names, - (FontScalablePtr)0, - mark_aliases ? - LIST_ALIASES_AND_TARGET_NAMES : - NORMAL_ALIAS_BEHAVIOR, (int *)0); - } - return result; -} - -typedef struct _LFWIData { - FontNamesPtr names; - int current; -} LFWIDataRec, *LFWIDataPtr; - -int -FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat, - int len, int max, FontNamesPtr names) -{ - return _FontFileListFonts (client, fpe, pat, len, max, names, 0); -} - -int -FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - LFWIDataPtr data; - int ret; - - data = (LFWIDataPtr) xalloc (sizeof *data); - if (!data) - return AllocError; - data->names = MakeFontNamesRecord (0); - if (!data->names) - { - xfree (data); - return AllocError; - } - ret = FontFileListFonts (client, fpe, pat, len, max, data->names); - if (ret != Successful) - { - FreeFontNames (data->names); - xfree (data); - return ret; - } - data->current = 0; - *privatep = (pointer) data; - return Successful; -} - -/* ARGSUSED */ -static int -FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo) -{ - FontDirectoryPtr dir; - char lowerName[MAXFONTNAMELEN]; - char fileName[MAXFONTFILENAMELEN*2 + 1]; - FontNameRec tmpName; - FontEntryPtr entry; - FontScalableRec vals; - FontScalableEntryPtr scalable; - FontScaledPtr scaled; - FontBitmapEntryPtr bitmap; - int ret; - Bool noSpecificSize; - int nranges; - fsRange *ranges; - - char *name = *namep; - int namelen = *namelenp; - - if (namelen >= MAXFONTNAMELEN) - return AllocError; - dir = (FontDirectoryPtr) fpe->private; - - /* Match non-scalable pattern */ - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - ranges = FontParseRanges(lowerName, &nranges); - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - if (!FontParseXLFDName(lowerName, &vals, FONT_XLFD_REPLACE_NONE)) - bzero(&vals, sizeof(vals)); - if (!(entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName)) && - tmpName.ndashes == 14 && - FontParseXLFDName (lowerName, &vals, FONT_XLFD_REPLACE_ZERO)) - { - tmpName.length = strlen(lowerName); - entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName); - } - - if (entry) - { - switch (entry->type) { - case FONT_ENTRY_BITMAP: - bitmap = &entry->u.bitmap; - if (bitmap->pFont) - { - *pFontInfo = &bitmap->pFont->info; - ret = Successful; - } - else - { - ret = FontFileGetInfoBitmap (fpe, *pFontInfo, entry); - } - break; - case FONT_ENTRY_ALIAS: - vals.nranges = nranges; - vals.ranges = ranges; - transfer_values_to_alias(entry->name.name, entry->name.length, - entry->u.alias.resolved, namep, &vals); - *namelenp = strlen (*namep); - ret = FontNameAlias; - break; -#ifdef NOTYET - case FONT_ENTRY_BC: - /* no LFWI for this yet */ - bc = &entry->u.bc; - entry = bc->entry; - /* Make a new scaled instance */ - if (strlen(dir->directory) + strlen(scalable->fileName) >= - sizeof(fileName)) { - ret = BadFontName; - } else { - strcpy (fileName, dir->directory); - strcat (fileName, scalable->fileName); - ret = (*scalable->renderer->GetInfoScalable) - (fpe, *pFontInfo, entry, tmpName, fileName, &bc->vals); - } - break; -#endif - default: - ret = BadFontName; - } - } - else - { - ret = BadFontName; - } - - if (ret != BadFontName) - { - if (ranges) xfree(ranges); - return ret; - } - - /* Match XLFD patterns */ - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - if (!FontParseXLFDName (lowerName, &vals, FONT_XLFD_REPLACE_ZERO) || - !(tmpName.length = strlen (lowerName), - entry = FontFileFindNameInScalableDir (&dir->scalable, &tmpName, - &vals))) { - CopyISOLatin1Lowered (lowerName, name, namelen); - lowerName[namelen] = '\0'; - tmpName.name = lowerName; - tmpName.length = namelen; - tmpName.ndashes = FontFileCountDashes (lowerName, namelen); - entry = FontFileFindNameInScalableDir (&dir->scalable, &tmpName, &vals); - if (entry) - { - strcpy(lowerName, entry->name.name); - tmpName.name = lowerName; - tmpName.length = entry->name.length; - tmpName.ndashes = entry->name.ndashes; - } - } - - if (entry) - { - noSpecificSize = FALSE; /* TRUE breaks XLFD enhancements */ - if (entry && entry->type == FONT_ENTRY_SCALABLE && - FontFileCompleteXLFD (&vals, &entry->u.scalable.extra->defaults)) - { - scalable = &entry->u.scalable; - scaled = FontFileFindScaledInstance (entry, &vals, noSpecificSize); - /* - * A scaled instance can occur one of two ways: - * - * Either the font has been scaled to this - * size already, in which case scaled->pFont - * will point at that font. - * - * Or a bitmap instance in this size exists, - * which is handled as if we got a pattern - * matching the bitmap font name. - */ - if (scaled) - { - if (scaled->pFont) - { - *pFontInfo = &scaled->pFont->info; - ret = Successful; - } - else if (scaled->bitmap) - { - entry = scaled->bitmap; - bitmap = &entry->u.bitmap; - if (bitmap->pFont) - { - *pFontInfo = &bitmap->pFont->info; - ret = Successful; - } - else - { - ret = FontFileGetInfoBitmap (fpe, *pFontInfo, entry); - } - } - else /* "cannot" happen */ - { - ret = BadFontName; - } - } - else - { -#ifdef NOTDEF - /* no special case yet */ - ret = FontFileMatchBitmapSource (fpe, pFont, flags, entry, &vals, format, fmask, noSpecificSize); - if (ret != Successful) -#endif - { - char origName[MAXFONTNAMELEN]; - - CopyISOLatin1Lowered (origName, name, namelen); - origName[namelen] = '\0'; - vals.xlfdName = origName; - vals.ranges = ranges; - vals.nranges = nranges; - - /* Make a new scaled instance */ - if (strlen(dir->directory) + strlen(scalable->fileName) >= - sizeof(fileName)) { - ret = BadFontName; - } else { - strcpy (fileName, dir->directory); - strcat (fileName, scalable->fileName); - ret = (*scalable->renderer->GetInfoScalable) - (fpe, *pFontInfo, entry, &tmpName, fileName, &vals); - } - if (ranges) xfree(ranges); - } - } - if (ret == Successful) return ret; - } - CopyISOLatin1Lowered (lowerName, name, namelen); - tmpName.length = namelen; - } - else - ret = BadFontName; - - if (ranges) - xfree(ranges); - return ret; -} - -int -FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private) -{ - LFWIDataPtr data = (LFWIDataPtr) private; - int ret; - char *name; - int namelen; - - if (data->current == data->names->nnames) - { - FreeFontNames (data->names); - xfree (data); - return BadFontName; - } - name = data->names->names[data->current]; - namelen = data->names->length[data->current]; - ret = FontFileListOneFontWithInfo (client, fpe, &name, &namelen, pFontInfo); - if (ret == BadFontName) - ret = AllocError; - *namep = name; - *namelenp = namelen; - ++data->current; - *numFonts = data->names->nnames - data->current; - return ret; -} - -int -FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - LFWIDataPtr data; - int ret; - - data = (LFWIDataPtr) xalloc (sizeof *data); - if (!data) - return AllocError; - data->names = MakeFontNamesRecord (0); - if (!data->names) - { - xfree (data); - return AllocError; - } - ret = _FontFileListFonts (client, fpe, pat, len, max, data->names, 1); - if (ret != Successful) - { - FreeFontNames (data->names); - xfree (data); - return ret; - } - data->current = 0; - *privatep = (pointer) data; - return Successful; -} - -int -FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, char **resolvedp, - int *resolvedlenp, pointer private) -{ - LFWIDataPtr data = (LFWIDataPtr) private; - int ret; - char *name; - int namelen; - - if (data->current == data->names->nnames) - { - FreeFontNames (data->names); - xfree (data); - return BadFontName; - } - name = data->names->names[data->current]; - namelen = data->names->length[data->current]; - - /* If this is a real font name... */ - if (namelen >= 0) - { - *namep = name; - *namelenp = namelen; - ret = Successful; - } - /* Else if an alias */ - else - { - /* Tell the caller that this is an alias... let him resolve it to - see if it's valid */ - *namep = name; - *namelenp = -namelen; - *resolvedp = data->names->names[++data->current]; - *resolvedlenp = data->names->length[data->current]; - ret = FontNameAlias; - } - - ++data->current; - return ret; -} - -void -FontFileRegisterLocalFpeFunctions (void) -{ - RegisterFPEFunctions(FontFileNameCheck, - FontFileInitFPE, - FontFileFreeFPE, - FontFileResetFPE, - FontFileOpenFont, - FontFileCloseFont, - FontFileListFonts, - FontFileStartListFontsWithInfo, - FontFileListNextFontWithInfo, - NULL, - NULL, - NULL, - FontFileStartListFontsAndAliases, - FontFileListNextFontOrAlias, - FontFileEmptyBitmapSource); -} diff --git a/nx-X11/lib/font/fontfile/fontscale.c b/nx-X11/lib/font/fontfile/fontscale.c deleted file mode 100644 index 8e9de513d..000000000 --- a/nx-X11/lib/font/fontfile/fontscale.c +++ /dev/null @@ -1,447 +0,0 @@ -/* $Xorg: fontscale.c,v 1.5 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/fontscale.c,v 3.9 2001/08/27 19:49:54 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#ifdef _XOPEN_SOURCE -#include -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include -#undef _XOPEN_SOURCE -#endif - -Bool -FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals, - FontPtr pFont, char *bitmapName) -{ - FontScalableEntryPtr scalable; - FontScalableExtraPtr extra; - FontScaledPtr new; - int newsize; - - scalable = &entry->u.scalable; - extra = scalable->extra; - if (extra->numScaled == extra->sizeScaled) - { - newsize = extra->sizeScaled + 4; - new = (FontScaledPtr) xrealloc (extra->scaled, - newsize * sizeof (FontScaledRec)); - if (!new) - return FALSE; - extra->sizeScaled = newsize; - extra->scaled = new; - } - new = &extra->scaled[extra->numScaled++]; - new->vals = *vals; - new->pFont = pFont; - new->bitmap = (FontEntryPtr) bitmapName; - if (pFont) - pFont->fpePrivate = (pointer) entry; - return TRUE; -} - -/* Must call this after the directory is sorted */ - -void -FontFileSwitchStringsToBitmapPointers (FontDirectoryPtr dir) -{ - int s; - int b; - int i; - FontEntryPtr scalable; - FontEntryPtr nonScalable; - FontScaledPtr scaled; - FontScalableExtraPtr extra; - - scalable = dir->scalable.entries; - nonScalable = dir->nonScalable.entries; - for (s = 0; s < dir->scalable.used; s++) - { - extra = scalable[s].u.scalable.extra; - scaled = extra->scaled; - for (i = 0; i < extra->numScaled; i++) - for (b = 0; b < dir->nonScalable.used; b++) - if (nonScalable[b].name.name == (char *) scaled[i].bitmap) - scaled[i].bitmap = &nonScalable[b]; - } -} - -void -FontFileRemoveScaledInstance (FontEntryPtr entry, FontPtr pFont) -{ - FontScalableEntryPtr scalable; - FontScalableExtraPtr extra; - int i; - - scalable = &entry->u.scalable; - extra = scalable->extra; - for (i = 0; i < extra->numScaled; i++) - { - if (extra->scaled[i].pFont == pFont) - { - if (extra->scaled[i].vals.ranges) - xfree (extra->scaled[i].vals.ranges); - extra->numScaled--; - for (; i < extra->numScaled; i++) - extra->scaled[i] = extra->scaled[i+1]; - } - } -} - -Bool -FontFileCompleteXLFD (FontScalablePtr vals, FontScalablePtr def) -{ - FontResolutionPtr res; - int num_res; - double sx, sy, temp_matrix[4]; - double pixel_setsize_adjustment = 1.0; - /* - * If two of the three vertical scale values are specified, compute the - * third. If all three are specified, make sure they are consistent - * (within a pixel) - * - * One purpose of this procedure is to complete XLFD names in a - * repeatable manner. That is, if the user partially specifies - * a name (say, pixelsize but not pointsize), the results generated - * here result in a fully specified name that will result in the - * same font. - */ - - res = GetClientResolutions(&num_res); - - if (!(vals->values_supplied & PIXELSIZE_MASK) || - !(vals->values_supplied & POINTSIZE_MASK)) - { - /* If resolution(s) unspecified and cannot be computed from - pixelsize and pointsize, get appropriate defaults. */ - - if (num_res) - { - if (vals->x <= 0) - vals->x = res->x_resolution; - if (vals->y <= 0) - vals->y = res->y_resolution; - } - - if (vals->x <= 0) - vals->x = def->x; - if (vals->y <= 0) - vals->y = def->y; - } - else - { - /* If needed, compute resolution values from the pixel and - pointsize information we were given. This problem is - overdetermined (four equations, two unknowns), but we don't - check for inconsistencies here. If they exist, they will - show up in later tests for the point and pixel sizes. */ - - if (vals->y <= 0) - { - double x = hypot(vals->pixel_matrix[1], vals->pixel_matrix[3]); - double y = hypot(vals->point_matrix[1], vals->point_matrix[3]); - if (y < EPS) return FALSE; - vals->y = (int)(x * 72.27 / y + .5); - } - if (vals->x <= 0) - { - /* If the pixelsize was given as an array, or as a scalar that - has been normalized for the pixel shape, we have enough - information to compute a separate horizontal resolution */ - - if ((vals->values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY || - (vals->values_supplied & PIXELSIZE_MASK) == - PIXELSIZE_SCALAR_NORMALIZED) - { - double x = hypot(vals->pixel_matrix[0], vals->pixel_matrix[2]); - double y = hypot(vals->point_matrix[0], vals->point_matrix[2]); - if (y < EPS) return FALSE; - vals->x = (int)(x * 72.27 / y + .5); - } - else - { - /* Not enough information in the pixelsize array. Just - assume the pixels are square. */ - vals->x = vals->y; - } - } - } - - if (vals->x <= 0 || vals->y <= 0) return FALSE; - - /* If neither pixelsize nor pointsize is defined, take the pointsize - from the defaults structure we've been passed. */ - if (!(vals->values_supplied & PIXELSIZE_MASK) && - !(vals->values_supplied & POINTSIZE_MASK)) - { - if (num_res) - { - vals->point_matrix[0] = - vals->point_matrix[3] = (double)res->point_size / 10.0; - vals->point_matrix[1] = - vals->point_matrix[2] = 0; - vals->values_supplied = (vals->values_supplied & ~POINTSIZE_MASK) | - POINTSIZE_SCALAR; - } - else if (def->values_supplied & POINTSIZE_MASK) - { - vals->point_matrix[0] = def->point_matrix[0]; - vals->point_matrix[1] = def->point_matrix[1]; - vals->point_matrix[2] = def->point_matrix[2]; - vals->point_matrix[3] = def->point_matrix[3]; - vals->values_supplied = (vals->values_supplied & ~POINTSIZE_MASK) | - (def->values_supplied & POINTSIZE_MASK); - } - else return FALSE; - } - - /* At this point, at least two of the three vertical scale values - should be specified. Our job now is to compute the missing ones - and check for agreement between overspecified values */ - - /* If pixelsize was specified by a scalar, we need to fix the matrix - now that we know the resolutions. */ - if ((vals->values_supplied & PIXELSIZE_MASK) == PIXELSIZE_SCALAR) - { - /* pixel_setsize_adjustment used below to modify permissible - error in pixel/pointsize matching, since multiplying a - number rounded to integer changes the amount of the error - caused by the rounding */ - - pixel_setsize_adjustment = (double)vals->x / (double)vals->y; - vals->pixel_matrix[0] *= pixel_setsize_adjustment; - vals->values_supplied = (vals->values_supplied & ~PIXELSIZE_MASK) | - PIXELSIZE_SCALAR_NORMALIZED; - } - - sx = (double)vals->x / 72.27; - sy = (double)vals->y / 72.27; - - /* If a pointsize was specified, make sure pixelsize is consistent - to within 1 pixel, then replace pixelsize with a consistent - floating-point value. */ - - if (vals->values_supplied & POINTSIZE_MASK) - { - recompute_pixelsize: ; - temp_matrix[0] = vals->point_matrix[0] * sx; - temp_matrix[1] = vals->point_matrix[1] * sy; - temp_matrix[2] = vals->point_matrix[2] * sx; - temp_matrix[3] = vals->point_matrix[3] * sy; - if (vals->values_supplied & PIXELSIZE_MASK) - { - if (fabs(vals->pixel_matrix[0] - temp_matrix[0]) > - pixel_setsize_adjustment || - fabs(vals->pixel_matrix[1] - temp_matrix[1]) > 1 || - fabs(vals->pixel_matrix[2] - temp_matrix[2]) > 1 || - fabs(vals->pixel_matrix[3] - temp_matrix[3]) > 1) - return FALSE; - } - if ((vals->values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY && - (vals->values_supplied & POINTSIZE_MASK) == POINTSIZE_SCALAR) - { - /* In the special case that pixelsize came as an array and - pointsize as a scalar, recompute the pointsize matrix - from the pixelsize matrix. */ - goto recompute_pointsize; - } - - /* Refresh pixel matrix with precise values computed from - pointsize and resolution. */ - vals->pixel_matrix[0] = temp_matrix[0]; - vals->pixel_matrix[1] = temp_matrix[1]; - vals->pixel_matrix[2] = temp_matrix[2]; - vals->pixel_matrix[3] = temp_matrix[3]; - - /* Set values_supplied for pixel to match that for point */ - vals->values_supplied = - (vals->values_supplied & ~PIXELSIZE_MASK) | - (((vals->values_supplied & POINTSIZE_MASK) == POINTSIZE_ARRAY) ? - PIXELSIZE_ARRAY : PIXELSIZE_SCALAR_NORMALIZED); - } - else - { - /* Pointsize unspecified... compute from pixel size and - resolutions */ - recompute_pointsize: ; - if (fabs(sx) < EPS || fabs(sy) < EPS) return FALSE; - vals->point_matrix[0] = vals->pixel_matrix[0] / sx; - vals->point_matrix[1] = vals->pixel_matrix[1] / sy; - vals->point_matrix[2] = vals->pixel_matrix[2] / sx; - vals->point_matrix[3] = vals->pixel_matrix[3] / sy; - - /* Set values_supplied for pixel to match that for point */ - vals->values_supplied = - (vals->values_supplied & ~POINTSIZE_MASK) | - (((vals->values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY) ? - POINTSIZE_ARRAY : POINTSIZE_SCALAR); - - /* If we computed scalar pointsize from scalar pixelsize, round - pointsize to decipoints and recompute pixelsize so we end up - with a repeatable name */ - if ((vals->values_supplied & POINTSIZE_MASK) == POINTSIZE_SCALAR) - { - /* Off-diagonal elements should be zero since no matrix was - specified. */ - vals->point_matrix[0] = - (double)(int)(vals->point_matrix[0] * 10.0 + .5) / 10.0; - vals->point_matrix[3] = - (double)(int)(vals->point_matrix[3] * 10.0 + .5) / 10.0; - goto recompute_pixelsize; - } - } - - /* We've succeeded. Round everything to a few decimal places - for repeatability. */ - - vals->pixel_matrix[0] = xlfd_round_double(vals->pixel_matrix[0]); - vals->pixel_matrix[1] = xlfd_round_double(vals->pixel_matrix[1]); - vals->pixel_matrix[2] = xlfd_round_double(vals->pixel_matrix[2]); - vals->pixel_matrix[3] = xlfd_round_double(vals->pixel_matrix[3]); - vals->point_matrix[0] = xlfd_round_double(vals->point_matrix[0]); - vals->point_matrix[1] = xlfd_round_double(vals->point_matrix[1]); - vals->point_matrix[2] = xlfd_round_double(vals->point_matrix[2]); - vals->point_matrix[3] = xlfd_round_double(vals->point_matrix[3]); - - /* Fill in the deprecated fields for the benefit of rasterizers - that do not handle the matrices. */ - vals->point = vals->point_matrix[3] * 10; - vals->pixel = vals->pixel_matrix[3]; - - return TRUE; -} - -static Bool -MatchScalable (FontScalablePtr a, FontScalablePtr b) -{ - int i; - - /* Some asymmetry here: we assume that the first argument (a) is - the table entry and the second (b) the item we're trying to match - (the key). We'll consider the fonts matched if the relevant - metrics match *and* if a) the table entry doesn't have charset - subsetting or b) the table entry has identical charset subsetting - to that in the key. We could add logic to check if the table - entry has a superset of the charset required by the key, but - we'll resist the urge for now. */ - -#define EQUAL(a,b) ((a)[0] == (b)[0] && \ - (a)[1] == (b)[1] && \ - (a)[2] == (b)[2] && \ - (a)[3] == (b)[3]) - - if (!(a->x == b->x && - a->y == b->y && - (a->width == b->width || a->width == 0 || b->width == 0 || b->width == -1) && - (!(b->values_supplied & PIXELSIZE_MASK) || - ((a->values_supplied & PIXELSIZE_MASK) == - (b->values_supplied & PIXELSIZE_MASK) && - EQUAL(a->pixel_matrix, b->pixel_matrix))) && - (!(b->values_supplied & POINTSIZE_MASK) || - ((a->values_supplied & POINTSIZE_MASK) == - (b->values_supplied & POINTSIZE_MASK) && - EQUAL(a->point_matrix, b->point_matrix))) && - (a->nranges == 0 || a->nranges == b->nranges))) - return FALSE; - - for (i = 0; i < a->nranges; i++) - if (a->ranges[i].min_char_low != b->ranges[i].min_char_low || - a->ranges[i].min_char_high != b->ranges[i].min_char_high || - a->ranges[i].max_char_low != b->ranges[i].max_char_low || - a->ranges[i].max_char_high != b->ranges[i].max_char_high) - return FALSE; - - return TRUE; -} - -FontScaledPtr -FontFileFindScaledInstance (FontEntryPtr entry, FontScalablePtr vals, - int noSpecificSize) -{ - FontScalableEntryPtr scalable; - FontScalableExtraPtr extra; - FontScalablePtr mvals; - int dist, i; - int mini; - double mindist; - register double temp, sum=0.0; - -#define NORMDIFF(a, b) ( \ - temp = (a)[0] - (b)[0], \ - sum = temp * temp, \ - temp = (a)[1] - (b)[1], \ - sum += temp * temp, \ - temp = (a)[2] - (b)[2], \ - sum += temp * temp, \ - temp = (a)[3] - (b)[3], \ - sum + temp * temp ) - - scalable = &entry->u.scalable; - extra = scalable->extra; - if (noSpecificSize && extra->numScaled) - { - mini = 0; - mindist = NORMDIFF(extra->scaled[0].vals.point_matrix, - vals->point_matrix); - for (i = 1; i < extra->numScaled; i++) - { - if (extra->scaled[i].pFont && - !extra->scaled[i].pFont->info.cachable) continue; - mvals = &extra->scaled[i].vals; - dist = NORMDIFF(mvals->point_matrix, vals->point_matrix); - if (dist < mindist) - { - mindist = dist; - mini = i; - } - } - if (extra->scaled[mini].pFont && - !extra->scaled[mini].pFont->info.cachable) return 0; - return &extra->scaled[mini]; - } - else - { - /* See if we've scaled to this value yet */ - for (i = 0; i < extra->numScaled; i++) - { - if (extra->scaled[i].pFont && - !extra->scaled[i].pFont->info.cachable) continue; - if (MatchScalable (&extra->scaled[i].vals, vals)) - return &extra->scaled[i]; - } - } - return 0; -} diff --git a/nx-X11/lib/font/fontfile/gunzip.c b/nx-X11/lib/font/fontfile/gunzip.c deleted file mode 100644 index 8c9c317aa..000000000 --- a/nx-X11/lib/font/fontfile/gunzip.c +++ /dev/null @@ -1,227 +0,0 @@ -/* $Xorg: gunzip.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ -/* lib/font/fontfile/gunzip.c - written by Mark Eichin September 1996. - intended for inclusion in X11 public releases. */ -/* $XFree86: xc/lib/font/fontfile/gunzip.c,v 1.4 2000/09/19 12:46:08 eich Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - -typedef struct _xzip_buf { - z_stream z; - int zstat; - BufChar b[BUFFILESIZE]; - BufChar b_in[BUFFILESIZE]; - BufFilePtr f; -} xzip_buf; - -static int BufZipFileClose ( BufFilePtr f, int flag ); -static int BufZipFileFill ( BufFilePtr f ); -static int BufZipFileSkip ( BufFilePtr f, int c ); -static int BufCheckZipHeader ( BufFilePtr f ); - -BufFilePtr -BufFilePushZIP (BufFilePtr f) -{ - xzip_buf *x; - - x = (xzip_buf *) xalloc (sizeof (xzip_buf)); - if (!x) return 0; - /* these are just for raw calloc/free */ - x->z.zalloc = Z_NULL; - x->z.zfree = Z_NULL; - x->z.opaque = Z_NULL; - x->f = f; - - /* force inflateInit to allocate it's own history buffer */ - x->z.next_in = Z_NULL; - x->z.next_out = Z_NULL; - x->z.avail_in = x->z.avail_out = 0; - - /* using negative windowBits sets "nowrap" mode, which turns off - zlib header checking [undocumented, for gzip compatibility only?] */ - x->zstat = inflateInit2(&(x->z), -MAX_WBITS); - if (x->zstat != Z_OK) { - xfree(x); - return 0; - } - - /* now that the history buffer is allocated, we provide the data buffer */ - x->z.next_out = x->b; - x->z.avail_out = BUFFILESIZE; - x->z.next_out = x->b_in; - x->z.avail_in = 0; - - if (BufCheckZipHeader(x->f)) { - xfree(x); - return 0; - } - - return BufFileCreate((char *)x, - BufZipFileFill, - 0, - BufZipFileSkip, - BufZipFileClose); -} - -static int -BufZipFileClose(BufFilePtr f, int flag) -{ - xzip_buf *x = (xzip_buf *)f->private; - inflateEnd (&(x->z)); - BufFileClose (x->f, flag); - xfree (x); - return 1; -} - -/* here's the real work. - -- we need to put stuff in f.buffer, update f.left and f.bufp, - then return the first byte (or BUFFILEEOF). - -- to do this, we need to get stuff into avail_in, and next_in, - and call inflate appropriately. - -- we may also need to add CRC maintenance - if inflate tells us - Z_STREAM_END, we then have 4bytes CRC and 4bytes length... - gzio.c:gzread shows most of the mechanism. - */ -static int -BufZipFileFill (BufFilePtr f) -{ - xzip_buf *x = (xzip_buf *)f->private; - - /* we only get called when left == 0... */ - /* but just in case, deal */ - if (f->left >= 0) { - f->left--; - return *(f->bufp++); - } - /* did we run out last time? */ - switch (x->zstat) { - case Z_OK: - break; - case Z_STREAM_END: - case Z_DATA_ERROR: - case Z_ERRNO: - f->left = 0; - return BUFFILEEOF; - default: - return BUFFILEEOF; - } - /* now we work to consume what we can */ - /* let zlib know what we can handle */ - x->z.next_out = x->b; - x->z.avail_out = BUFFILESIZE; - - /* and try to consume all of it */ - while (x->z.avail_out > 0) { - /* if we don't have anything to work from... */ - if (x->z.avail_in == 0) { - /* ... fill the z buf from underlying file */ - int i, c; - for (i = 0; i < sizeof(x->b_in); i++) { - c = BufFileGet(x->f); - if (c == BUFFILEEOF) break; - x->b_in[i] = c; - } - x->z.avail_in += i; - x->z.next_in = x->b_in; - } - /* so now we have some output space and some input data */ - x->zstat = inflate(&(x->z), Z_NO_FLUSH); - /* the inflation output happens in the f buffer directly... */ - if (x->zstat == Z_STREAM_END) { - /* deal with EOF, crc */ - break; - } - if (x->zstat != Z_OK) { - break; - } - } - f->bufp = x->b; - f->left = BUFFILESIZE - x->z.avail_out; - - if (f->left >= 0) { - f->left--; - return *(f->bufp++); - } else { - return BUFFILEEOF; - } -} - -/* there should be a BufCommonSkip... */ -static int -BufZipFileSkip (BufFilePtr f, int c) -{ - /* BufFileRawSkip returns the count unchanged. - BufCompressedSkip returns 0. - That means it probably never gets called... */ - int retval = c; - while(c--) { - int get = BufFileGet(f); - if (get == BUFFILEEOF) return get; - } - return retval; -} - -/* now we need to duplicate check_header */ -/* contents: - 0x1f, 0x8b -- magic number - 1 byte -- method (Z_DEFLATED) - 1 byte -- flags (mask with RESERVED -> fail) - 4 byte -- time (discard) - 1 byte -- xflags (discard) - 1 byte -- "os" code (discard) - [if flags & EXTRA_FIELD: - 2 bytes -- LSBfirst length n - n bytes -- extra data (discard)] - [if flags & ORIG_NAME: - n bytes -- null terminated name (discard)] - [if flags & COMMENT: - n bytes -- null terminated comment (discard)] - [if flags & HEAD_CRC: - 2 bytes -- crc of headers? (discard)] - */ - -/* gzip flag byte -- from gzio.c */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ - -#define GET(f) do {c = BufFileGet(f); if (c == BUFFILEEOF) return c;} while(0) -static int -BufCheckZipHeader(BufFilePtr f) -{ - int c, flags; - GET(f); if (c != 0x1f) return 1; /* magic 1 */ - GET(f); if (c != 0x8b) return 2; /* magic 2 */ - GET(f); if (c != Z_DEFLATED) return 3; /* method */ - GET(f); if (c & RESERVED) return 4; /* reserved flags */ - flags = c; - GET(f); GET(f); GET(f); GET(f); /* time */ - GET(f); /* xflags */ - GET(f); /* os code */ - if (flags & EXTRA_FIELD) { - int len; - GET(f); len = c; - GET(f); len += (c<<8); - while (len-- >= 0) { - GET(f); - } - } - if (flags & ORIG_NAME) { - do { GET(f); } while (c != 0); - } - if (flags & COMMENT) { - do { GET(f); } while (c != 0); - } - if (flags & HEAD_CRC) { - GET(f); GET(f); /* header crc */ - } - return 0; -} diff --git a/nx-X11/lib/font/fontfile/module/Imakefile b/nx-X11/lib/font/fontfile/module/Imakefile deleted file mode 100644 index 0eebe085e..000000000 --- a/nx-X11/lib/font/fontfile/module/Imakefile +++ /dev/null @@ -1,21 +0,0 @@ -XCOMM $XFree86: xc/lib/font/fontfile/module/Imakefile,v 1.3 1999/06/13 13:47:35 dawes Exp $ -#include - - INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XINCLUDESRC) - - DEFINES = -DLOADABLEFONTS - - SRCS = ffcheck.c register.c - OBJS = ffcheck.o register.o - -SubdirLibraryRule($(OBJS)) - -NormalLibraryObjectRule() -NormalLintTarget($(SRCS)) - -LinkSourceFile(ffcheck.c,..) -LinkSourceFile(register.c,..) - -DependTarget() - diff --git a/nx-X11/lib/font/fontfile/printerfont.c b/nx-X11/lib/font/fontfile/printerfont.c deleted file mode 100644 index 0b6c19c62..000000000 --- a/nx-X11/lib/font/fontfile/printerfont.c +++ /dev/null @@ -1,178 +0,0 @@ -/* $Xorg: printerfont.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.5tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ -/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -/* - * Map FPE functions to renderer functions - */ - -#define PRINTERPATHPREFIX "PRINTER:" - -/* STUB -int XpClientIsPrintClient(client,fpe) -pointer client; -FontPathElementPtr fpe; -{ return 1; } - */ - -static int -PrinterFontNameCheck (char *name) -{ - if (strncmp(name,PRINTERPATHPREFIX,strlen(PRINTERPATHPREFIX)) != 0) - return 0; - name += strlen(PRINTERPATHPREFIX); -#ifndef NCD - return *name == '/'; -#else - return ((strcmp(name, "built-ins") == 0) || (*name == '/')); -#endif -} - -static int -PrinterFontInitFPE (FontPathElementPtr fpe) -{ - int status; - FontDirectoryPtr dir; - char * name; - - name = fpe->name + strlen(PRINTERPATHPREFIX); - status = FontFileReadDirectory (name, &dir); - if (status == Successful) - { - if (dir->nonScalable.used > 0) - if (!FontFileRegisterBitmapSource (fpe)) - { - FontFileFreeFPE (fpe); - return AllocError; - } - fpe->private = (pointer) dir; - } - return status; -} - -/* Here we must check the client to see if it has a context attached to - * it that allows us to access the printer fonts - */ - -static int -PrinterFontOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font) -{ - if (XpClientIsPrintClient(client,fpe)) - return (FontFileOpenFont (client, fpe, flags, name, namelen, format, - fmask, id, pFont, aliasName, non_cachable_font)); - return BadFontName; -} - -static int -PrinterFontListFonts (pointer client, FontPathElementPtr fpe, char *pat, - int len, int max, FontNamesPtr names) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListFonts (client, fpe, pat, len, max, names); - return BadFontName; -} - -static int -PrinterFontStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileStartListFontsWithInfo(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -PrinterFontListNextFontWithInfo(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListNextFontWithInfo(client, fpe, namep, namelenp, - pFontInfo, numFonts, private); - return BadFontName; -} - -static int -PrinterFontStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileStartListFontsAndAliases(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -PrinterFontListNextFontOrAlias(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - char **resolvedp, int *resolvedlenp, - pointer private) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListNextFontOrAlias(client, fpe, namep, namelenp, - resolvedp, resolvedlenp, private); - return BadFontName; -} - -void -PrinterFontRegisterFpeFunctions (void) -{ - RegisterFPEFunctions(PrinterFontNameCheck, - PrinterFontInitFPE, - FontFileFreeFPE, - FontFileResetFPE, - PrinterFontOpenFont, - FontFileCloseFont, - PrinterFontListFonts, - PrinterFontStartListFontsWithInfo, - PrinterFontListNextFontWithInfo, - NULL, - NULL, - NULL, - PrinterFontStartListFontsAndAliases, - PrinterFontListNextFontOrAlias, - FontFileEmptyBitmapSource); -} diff --git a/nx-X11/lib/font/fontfile/register.c b/nx-X11/lib/font/fontfile/register.c deleted file mode 100644 index 5ddab0386..000000000 --- a/nx-X11/lib/font/fontfile/register.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Xorg: register.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/register.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ - -/* - * This is in a separate source file so that small programs - * such as mkfontdir that want to use the fontfile utilities don't - * end up dragging in code from all the renderers, which is not small. - */ - -#ifdef HAVE_CONFIG_H -#include -#else -#define XFONT_BITMAP 1 -#endif - -#include -#include -#include - -#ifdef LOADABLEFONTS -#include -#endif - -/* - * Translate monolithic build symbols to modular build symbols. - * I chose to make the modular symbols 'canonical' because they - * are prefixed with XFONT_, neatly avoiding name collisions - * with other packages. - */ - -#ifdef BUILD_SPEEDO -# define XFONT_SPEEDO 1 -#endif -#ifdef BUILD_TYPE1 -# define XFONT_TYPE1 1 -#endif - -#ifdef BUILD_CID -# define XFONT_CID 1 -#endif -#ifdef BUILD_FREETYPE -# define XFONT_FREETYPE 1 -#endif - -void -FontFileRegisterFpeFunctions(void) -{ -#ifndef LOADABLEFONTS - -#ifdef XFONT_BITMAP - BitmapRegisterFontFileFunctions (); -#endif -#ifdef XFONT_SPEEDO - SpeedoRegisterFontFileFunctions (); -#endif -#ifdef XFONT_TYPE1 - Type1RegisterFontFileFunctions(); -#endif -#ifdef XFONT_CID - CIDRegisterFontFileFunctions(); -#endif -#ifdef XFONT_FREETYPE - FreeTypeRegisterFontFileFunctions(); -#endif - -#else - { - int i; - - if (FontModuleList) { - for (i = 0; FontModuleList[i].name; i++) { - if (FontModuleList[i].initFunc) - FontModuleList[i].initFunc(); - } - } - } -#endif - - FontFileRegisterLocalFpeFunctions (); -} - diff --git a/nx-X11/lib/font/fontfile/renderers.c b/nx-X11/lib/font/fontfile/renderers.c deleted file mode 100644 index f110ba817..000000000 --- a/nx-X11/lib/font/fontfile/renderers.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $Xorg: renderers.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.7 2002/12/09 17:30:00 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -extern void ErrorF(const char *f, ...); - -static FontRenderersRec renderers; - -/* - * XXX Maybe should allow unregistering renders. For now, just clear the - * list at each new generation. - */ -extern unsigned long serverGeneration; -static unsigned long rendererGeneration = 0; - -Bool -FontFileRegisterRenderer (FontRendererPtr renderer) -{ - return FontFilePriorityRegisterRenderer(renderer, 0); -} - -Bool -FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority) -{ - int i; - struct _FontRenderersElement *new; - - if (rendererGeneration != serverGeneration) { - rendererGeneration = serverGeneration; - renderers.number = 0; - if (renderers.renderers) - xfree(renderers.renderers); - renderers.renderers = NULL; - } - - for (i = 0; i < renderers.number; i++) { - if (!strcmp (renderers.renderers[i].renderer->fileSuffix, - renderer->fileSuffix)) { - if(renderers.renderers[i].priority >= priority) { - if(renderers.renderers[i].priority == priority) { - if (rendererGeneration == 1) - ErrorF("Warning: font renderer for \"%s\" " - "already registered at priority %d\n", - renderer->fileSuffix, priority); - } - return TRUE; - } else { - break; - } - } - } - - if(i >= renderers.number) { - new = xrealloc (renderers.renderers, sizeof(*new) * (i + 1)); - if (!new) - return FALSE; - renderers.renderers = new; - renderers.number = i + 1; - } - renderer->number = i; - renderers.renderers[i].renderer = renderer; - renderers.renderers[i].priority = priority; - return TRUE; -} - -FontRendererPtr -FontFileMatchRenderer (char *fileName) -{ - int i; - int fileLen; - FontRendererPtr r; - - fileLen = strlen (fileName); - for (i = 0; i < renderers.number; i++) - { - r = renderers.renderers[i].renderer; - if (fileLen >= r->fileSuffixLen && - !strcmp (fileName + fileLen - r->fileSuffixLen, r->fileSuffix)) - { - return r; - } - } - return 0; -} diff --git a/nx-X11/lib/font/include/Imakefile b/nx-X11/lib/font/include/Imakefile deleted file mode 100644 index 73e65a41c..000000000 --- a/nx-X11/lib/font/include/Imakefile +++ /dev/null @@ -1,11 +0,0 @@ -XCOMM $Xorg$ - HEADERS = bitmap.h bufio.h fntfil.h fntfilio.h fntfilst.h \ - fontencc.h fontmisc.h fontmod.h fontshow.h fontutil.h \ - fontxlfd.h -all:: - -BuildIncludes($(HEADERS),X11/fonts,../..) - -#if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS)) -#endif diff --git a/nx-X11/lib/font/include/bitmap.h b/nx-X11/lib/font/include/bitmap.h deleted file mode 100644 index e60fda8eb..000000000 --- a/nx-X11/lib/font/include/bitmap.h +++ /dev/null @@ -1,116 +0,0 @@ -/* $Xorg: bitmap.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/bitmap.h,v 1.9 2001/01/17 19:43:31 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _BITMAP_H_ -#define _BITMAP_H_ - -#include -#ifndef FONTMODULE -#include /* just for NULL */ -#else -#include "xf86_ansic.h" -#endif - -/* - * Internal format used to store bitmap fonts - */ - -/* number of encoding entries in one segment */ -#define BITMAP_FONT_SEGMENT_SIZE 128 - -typedef struct _BitmapExtra { - Atom *glyphNames; - int *sWidths; - CARD32 bitmapsSizes[GLYPHPADOPTIONS]; - FontInfoRec info; -} BitmapExtraRec, *BitmapExtraPtr; - -typedef struct _BitmapFont { - unsigned version_num; - int num_chars; - int num_tables; - CharInfoPtr metrics; /* font metrics, including glyph pointers */ - xCharInfo *ink_metrics; /* ink metrics */ - char *bitmaps; /* base of bitmaps, useful only to free */ - CharInfoPtr **encoding; /* array of arrays of char info pointers */ - CharInfoPtr pDefault; /* default character */ - BitmapExtraPtr bitmapExtra; /* stuff not used by X server */ -} BitmapFontRec, *BitmapFontPtr; - -#define ACCESSENCODING(enc,i) \ -(enc[(i)/BITMAP_FONT_SEGMENT_SIZE]?\ -(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE]):\ -0) -#define ACCESSENCODINGL(enc,i) \ -(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE]) - -#define SEGMENT_MAJOR(n) ((n)/BITMAP_FONT_SEGMENT_SIZE) -#define SEGMENT_MINOR(n) ((n)%BITMAP_FONT_SEGMENT_SIZE) -#define NUM_SEGMENTS(n) \ - (((n)+BITMAP_FONT_SEGMENT_SIZE-1)/BITMAP_FONT_SEGMENT_SIZE) - -extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs ); -extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, xCharInfo **glyphs ); - -extern void bitmapComputeFontBounds ( FontPtr pFont ); -extern void bitmapComputeFontInkBounds ( FontPtr pFont ); -extern Bool bitmapAddInkMetrics ( FontPtr pFont ); -extern int bitmapComputeWeight ( FontPtr pFont ); - -extern int BitmapOpenBitmap ( FontPathElementPtr fpe, FontPtr *ppFont, - int flags, FontEntryPtr entry, char *fileName, - fsBitmapFormat format, fsBitmapFormatMask fmask, - FontPtr non_cachable_font ); -extern int BitmapGetInfoBitmap ( FontPathElementPtr fpe, - FontInfoPtr pFontInfo, FontEntryPtr entry, - char *fileName ); -extern void BitmapRegisterFontFileFunctions ( void ); -extern int BitmapGetRenderIndex ( FontRendererPtr renderer ); - -extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont, - int flags, FontEntryPtr entry, char *fileName, - FontScalablePtr vals, fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font ); -extern int BitmapGetInfoScalable ( FontPathElementPtr fpe, - FontInfoPtr pFontInfo, FontEntryPtr entry, - FontNamePtr fontName, char *fileName, - FontScalablePtr vals ); - -#endif /* _BITMAP_H_ */ diff --git a/nx-X11/lib/font/include/bufio.h b/nx-X11/lib/font/include/bufio.h deleted file mode 100644 index da90064a2..000000000 --- a/nx-X11/lib/font/include/bufio.h +++ /dev/null @@ -1,92 +0,0 @@ -/* $Xorg: bufio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/bufio.h,v 1.6 2001/07/31 16:44:55 alanh Exp $ */ - -#ifndef ___BUFIO_H___ -#define ___BUFIO_H___ 1 - -#include - -#ifdef TEST - -#define xalloc(s) malloc(s) -#define xfree(s) free(s) - -#endif - -#define BUFFILESIZE 8192 -#define BUFFILEEOF -1 - -typedef unsigned char BufChar; -typedef struct _buffile *BufFilePtr; - -typedef struct _buffile { - BufChar *bufp; - int left; - int eof; - BufChar buffer[BUFFILESIZE]; - int (*input)( BufFilePtr /* f */); - int (*output)( int /* c */, BufFilePtr /* f */); - int (*skip)( BufFilePtr /* f */, int /* count */); - int (*close)( BufFilePtr /* f */, int /* doClose */); - char *private; -} BufFileRec; - -extern BufFilePtr BufFileCreate ( - char*, - int (*)(BufFilePtr), - int (*)(int, BufFilePtr), - int (*)(BufFilePtr, int), - int (*)(BufFilePtr, int)); -extern BufFilePtr BufFileOpenRead ( int ); -extern BufFilePtr BufFileOpenWrite ( int ); -extern BufFilePtr BufFilePushCompressed ( BufFilePtr ); -#ifdef X_GZIP_FONT_COMPRESSION -extern BufFilePtr BufFilePushZIP ( BufFilePtr ); -#endif -extern int BufFileClose ( BufFilePtr, int ); -extern int BufFileFlush ( BufFilePtr, int ); -extern int BufFileRead ( BufFilePtr, char*, int ); -extern int BufFileWrite ( BufFilePtr, char*, int ); -extern void BufFileFree ( BufFilePtr ); - -#define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : ((f)->eof = (*(f)->input) (f))) -#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = ((unsigned char)(c)) : (*(f)->output) ((unsigned char)(c),f)) -#define BufFileSkip(f,c) ((f)->eof = (*(f)->skip) (f, c)) - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -#endif /* ___BUFIO_H___ */ - diff --git a/nx-X11/lib/font/include/fntfil.h b/nx-X11/lib/font/include/fntfil.h deleted file mode 100644 index 81d2cbc3d..000000000 --- a/nx-X11/lib/font/include/fntfil.h +++ /dev/null @@ -1,178 +0,0 @@ -/* $Xorg: fntfil.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/fntfil.h,v 1.9 2001/12/14 19:56:54 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _FONTFILE_H_ -#define _FONTFILE_H_ - -#include - -typedef struct _FontEntry *FontEntryPtr; -typedef struct _FontTable *FontTablePtr; -typedef struct _FontName *FontNamePtr; -typedef struct _FontScaled *FontScaledPtr; -typedef struct _FontScalableExtra *FontScalableExtraPtr; -typedef struct _FontScalableEntry *FontScalableEntryPtr; -typedef struct _FontScaleAliasEntry *FontScaleAliasEntryPtr; -typedef struct _FontBitmapEntry *FontBitmapEntryPtr; -typedef struct _FontAliasEntry *FontAliasEntryPtr; -typedef struct _FontBCEntry *FontBCEntryPtr; -typedef struct _FontDirectory *FontDirectoryPtr; -typedef struct _FontRenderer *FontRendererPtr; - -#define NullFontEntry ((FontEntryPtr) 0) -#define NullFontTable ((FontTablePtr) 0) -#define NullFontName ((FontNamePtr) 0) -#define NullFontScaled ((FontScaled) 0) -#define NullFontScalableExtra ((FontScalableExtra) 0) -#define NullFontscalableEntry ((FontScalableEntry) 0) -#define NullFontScaleAliasEntry ((FontScaleAliasEntry) 0) -#define NullFontBitmapEntry ((FontBitmapEntry) 0) -#define NullFontAliasEntry ((FontAliasEntry) 0) -#define NullFontBCEntry ((FontBCEntry) 0) -#define NullFontDirectory ((FontDirectoryPtr) 0) -#define NullFontRenderer ((FontRendererPtr) 0) - -#define FONT_ENTRY_SCALABLE 0 -#define FONT_ENTRY_SCALE_ALIAS 1 -#define FONT_ENTRY_BITMAP 2 -#define FONT_ENTRY_ALIAS 3 -#define FONT_ENTRY_BC 4 - -#define MAXFONTNAMELEN 1024 -#define MAXFONTFILENAMELEN 1024 - -#define FontDirFile "fonts.dir" -#define FontAliasFile "fonts.alias" -#define FontScalableFile "fonts.scale" - -extern int FontFileNameCheck ( char *name ); -extern int FontFileInitFPE ( FontPathElementPtr fpe ); -extern int FontFileResetFPE ( FontPathElementPtr fpe ); -extern int FontFileFreeFPE ( FontPathElementPtr fpe ); -extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe, - Mask flags, char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font ); -extern void FontFileCloseFont ( FontPathElementPtr fpe, FontPtr pFont ); -extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont, - int flags, FontEntryPtr entry, - fsBitmapFormat format, - fsBitmapFormatMask fmask ); -extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - FontNamesPtr names ); -extern int FontFileStartListFontsWithInfo ( pointer client, - FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep ); -extern int FontFileListNextFontWithInfo ( pointer client, - FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private ); -extern int FontFileStartListFontsAndAliases ( pointer client, - FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep ); -extern int FontFileListNextFontOrAlias ( pointer client, - FontPathElementPtr fpe, - char **namep, int *namelenp, - char **resolvedp, int *resolvedlenp, - pointer private ); -extern void FontFileRegisterLocalFpeFunctions ( void ); - - -extern FontEntryPtr FontFileAddEntry ( FontTablePtr table, - FontEntryPtr prototype ); -extern Bool FontFileAddFontAlias ( FontDirectoryPtr dir, char *aliasName, - char *fontName ); -extern Bool FontFileAddFontFile ( FontDirectoryPtr dir, char *fontName, - char *fileName ); -extern int FontFileCountDashes ( char *name, int namelen ); -extern FontEntryPtr FontFileFindNameInDir ( FontTablePtr table, - FontNamePtr pat ); -extern FontEntryPtr FontFileFindNameInScalableDir ( FontTablePtr table, - FontNamePtr pat, - FontScalablePtr vals ); -extern int FontFileFindNamesInDir ( FontTablePtr table, FontNamePtr pat, - int max, FontNamesPtr names ); -extern int FontFileFindNamesInScalableDir ( FontTablePtr table, - FontNamePtr pat, int max, - FontNamesPtr names, - FontScalablePtr vals, - int alias_behavior, int *newmax ); - -extern void FontFileFreeDir ( FontDirectoryPtr dir ); -extern void FontFileFreeEntry ( FontEntryPtr entry ); -extern void FontFileFreeTable ( FontTablePtr table ); -extern Bool FontFileInitTable ( FontTablePtr table, int size ); -extern FontDirectoryPtr FontFileMakeDir ( char *dirName, int size ); -extern Bool FontFileMatchName ( char *name, int length, FontNamePtr pat ); -extern char * FontFileSaveString ( char *s ); -extern void FontFileSortDir ( FontDirectoryPtr dir ); -extern void FontFileSortTable ( FontTablePtr table ); - -extern void FontDefaultFormat ( int *bit, int *byte, int *glyph, int *scan ); - -extern Bool FontFileRegisterRenderer ( FontRendererPtr renderer ); -extern Bool FontFilePriorityRegisterRenderer ( FontRendererPtr renderer, - int priority ); -extern FontRendererPtr FontFileMatchRenderer ( char *fileName ); - -extern Bool FontFileAddScaledInstance ( FontEntryPtr entry, - FontScalablePtr vals, FontPtr pFont, - char *bitmapName ); -extern void FontFileSwitchStringsToBitmapPointers ( FontDirectoryPtr dir ); -extern void FontFileRemoveScaledInstance ( FontEntryPtr entry, FontPtr pFont ); -extern Bool FontFileCompleteXLFD ( FontScalablePtr vals, FontScalablePtr def ); -extern FontScaledPtr FontFileFindScaledInstance ( FontEntryPtr entry, - FontScalablePtr vals, - int noSpecificSize ); - -extern Bool FontFileRegisterBitmapSource ( FontPathElementPtr fpe ); -extern void FontFileUnregisterBitmapSource ( FontPathElementPtr fpe ); -extern void FontFileEmptyBitmapSource ( void ); -extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe, - FontPtr *pFont, int flags, - FontEntryPtr entry, - FontNamePtr zeroPat, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Bool noSpecificSize ); - -extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir ); -extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir ); - -#endif /* _FONTFILE_H_ */ diff --git a/nx-X11/lib/font/include/fntfilio.h b/nx-X11/lib/font/include/fntfilio.h deleted file mode 100644 index f8e24f390..000000000 --- a/nx-X11/lib/font/include/fntfilio.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $Xorg: fntfilio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.6 2001/10/31 22:50:26 tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _FNTFILIO_H_ -#define _FNTFILIO_H_ - -#include - -typedef BufFilePtr FontFilePtr; - -#define FontFileGetc(f) BufFileGet(f) -#define FontFilePutc(c,f) BufFilePut(c,f) -#define FontFileRead(f,b,n) BufFileRead(f,b,n) -#define FontFileWrite(f,b,n) BufFileWrite(f,b,n) -#define FontFileSkip(f,n) (BufFileSkip (f, n) != BUFFILEEOF) -#define FontFileSeek(f,n) (BufFileSeek (f,n,0) != BUFFILEEOF) - -#define FontFileEOF BUFFILEEOF - -extern FontFilePtr FontFileOpen ( const char *name ); -extern int FontFileClose ( FontFilePtr f ); -extern FontFilePtr FontFileOpenWrite ( const char *name ); -extern FontFilePtr FontFileOpenWriteFd ( int fd ); -extern FontFilePtr FontFileOpenFd ( int fd ); - -#endif /* _FNTFILIO_H_ */ diff --git a/nx-X11/lib/font/include/fntfilst.h b/nx-X11/lib/font/include/fntfilst.h deleted file mode 100644 index 1a71eae7a..000000000 --- a/nx-X11/lib/font/include/fntfilst.h +++ /dev/null @@ -1,198 +0,0 @@ -/* $Xorg: fntfilst.h,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.8 2002/12/09 17:30:00 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _FONTFILEST_H_ -#define _FONTFILEST_H_ - -#ifndef FONTMODULE -#include -#endif -#ifndef XP_PSTEXT -#include -#endif -#include -#include -#include - -typedef struct _FontName { - char *name; - short length; - short ndashes; -} FontNameRec; - -typedef struct _FontScaled { - FontScalableRec vals; - FontEntryPtr bitmap; - FontPtr pFont; -} FontScaledRec; - -typedef struct _FontScalableExtra { - FontScalableRec defaults; - int numScaled; - int sizeScaled; - FontScaledPtr scaled; - pointer private; -} FontScalableExtraRec; - -typedef struct _FontScalableEntry { - FontRendererPtr renderer; - char *fileName; - FontScalableExtraPtr extra; -} FontScalableEntryRec; - -/* - * This "can't" work yet - the returned alias string must be permanent, - * but this layer would need to generate the appropriate name from the - * resolved scalable + the XLFD values passed in. XXX - */ - -typedef struct _FontScaleAliasEntry { - char *resolved; -} FontScaleAliasEntryRec; - -typedef struct _FontBitmapEntry { - FontRendererPtr renderer; - char *fileName; - FontPtr pFont; -} FontBitmapEntryRec; - -typedef struct _FontAliasEntry { - char *resolved; -} FontAliasEntryRec; - -typedef struct _FontBCEntry { - FontScalableRec vals; - FontEntryPtr entry; -} FontBCEntryRec; - -typedef struct _FontEntry { - FontNameRec name; - int type; - union _FontEntryParts { - FontScalableEntryRec scalable; - FontBitmapEntryRec bitmap; - FontAliasEntryRec alias; - FontBCEntryRec bc; - } u; -} FontEntryRec; - -typedef struct _FontTable { - int used; - int size; - FontEntryPtr entries; - Bool sorted; -} FontTableRec; - -typedef struct _FontDirectory { - char *directory; - unsigned long dir_mtime; - unsigned long alias_mtime; - FontTableRec scalable; - FontTableRec nonScalable; - char *attributes; -} FontDirectoryRec; - -/* Capability bits: for definition of capabilities bitmap in the - FontRendererRec to indicate support of XLFD enhancements */ - -#define CAP_MATRIX 0x1 -#define CAP_CHARSUBSETTING 0x2 - -typedef struct _FontRenderer { - char *fileSuffix; - int fileSuffixLen; - int (*OpenBitmap)(FontPathElementPtr /* fpe */, - FontPtr * /* pFont */, - int /* flags */, - FontEntryPtr /* entry */, - char * /* fileName */, - fsBitmapFormat /* format */, - fsBitmapFormatMask /* mask */, - FontPtr /* non_cachable_font */); - int (*OpenScalable)(FontPathElementPtr /* fpe */, - FontPtr * /* pFont */, - int /* flags */, - FontEntryPtr /* entry */, - char * /* fileName */, - FontScalablePtr /* vals */, - fsBitmapFormat /* format */, - fsBitmapFormatMask /* fmask */, - FontPtr /* non_cachable_font */); - int (*GetInfoBitmap)(FontPathElementPtr /* fpe */, - FontInfoPtr /* pFontInfo */, - FontEntryPtr /* entry */, - char * /*fileName */); - int (*GetInfoScalable)(FontPathElementPtr /* fpe */, - FontInfoPtr /* pFontInfo */, - FontEntryPtr /* entry */, - FontNamePtr /* fontName */, - char * /* fileName */, - FontScalablePtr /* vals */); - int number; - int capabilities; /* Bitmap components defined above */ -} FontRendererRec; - -typedef struct _FontRenders { - int number; - struct _FontRenderersElement { - /* In order to preserve backward compatibility, the - priority field is made invisible to renderers */ - FontRendererPtr renderer; - int priority; - } *renderers; -} FontRenderersRec, *FontRenderersPtr; - -typedef struct _BitmapInstance { - FontScalableRec vals; - FontBitmapEntryPtr bitmap; -} BitmapInstanceRec, *BitmapInstancePtr; - -typedef struct _BitmapScalablePrivate { - int numInstances; - BitmapInstancePtr instances; -} BitmapScalablePrivateRec, *BitmapScalablePrivatePtr; - -typedef struct _BitmapSources { - FontPathElementPtr *fpe; - int size; - int count; -} BitmapSourcesRec, *BitmapSourcesPtr; - -extern BitmapSourcesRec FontFileBitmapSources; - -/* Defines for FontFileFindNamesInScalableDir() behavior */ -#define NORMAL_ALIAS_BEHAVIOR 0 -#define LIST_ALIASES_AND_TARGET_NAMES (1<<0) -#define IGNORE_SCALABLE_ALIASES (1<<1) - -#endif /* _FONTFILEST_H_ */ diff --git a/nx-X11/lib/font/include/fontencc.h b/nx-X11/lib/font/include/fontencc.h deleted file mode 100644 index 51e0e1440..000000000 --- a/nx-X11/lib/font/include/fontencc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright (c) 1998-2001 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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. -*/ -/* $XFree86$ */ - -/* Binary compatibility entry points. */ - -/* This file includes code to make modules compiled for earlier - versions of the fontenc interfaces link with this one. It does - *not* provide source compatibility, as many of the data structures - now have different names. */ - -extern char *font_encoding_from_xlfd(const char*, int); -extern unsigned font_encoding_recode(unsigned, FontEncPtr, FontMapPtr); -extern FontEncPtr font_encoding_find(const char*, const char*); -extern char *font_encoding_name(unsigned, FontEncPtr, FontMapPtr); -extern char **identifyEncodingFile(const char *fileName); - diff --git a/nx-X11/lib/font/include/fontmisc.h b/nx-X11/lib/font/include/fontmisc.h deleted file mode 100644 index b7e359068..000000000 --- a/nx-X11/lib/font/include/fontmisc.h +++ /dev/null @@ -1,133 +0,0 @@ -/* $Xorg: fontmisc.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.16 2001/12/14 19:56:54 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _FONTMISC_H_ -#define _FONTMISC_H_ - -#ifndef FONTMODULE -#include -#include -#include - -#ifndef X_NOT_POSIX -#include -#else -extern int close(); -#endif - -#endif /* FONTMODULE */ - -#include "X11/Xdefs.h" - - -#ifndef LSBFirst -#define LSBFirst 0 -#define MSBFirst 1 -#endif - -#ifndef None -#define None 0l -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -extern Atom MakeAtom ( char *string, unsigned len, int makeit ); -extern int ValidAtom ( Atom atom ); -extern char *NameForAtom (Atom atom); - -#ifndef _HAVE_XALLOC_DECLS -#define _HAVE_XALLOC_DECLS -extern pointer Xalloc(unsigned long); -extern pointer Xrealloc(pointer, unsigned long); -extern void Xfree(pointer); -extern pointer Xcalloc(unsigned long); -#endif -extern int f_strcasecmp(const char *s1, const char *s2); - -#ifndef xalloc -#define xalloc(n) Xalloc ((unsigned) n) -#define xfree(p) Xfree ((pointer) p) -#define xrealloc(p,n) Xrealloc ((pointer)p,n) -#define xcalloc(n,s) Xcalloc((unsigned) n * (unsigned) s) -#endif -#define lowbit(x) ((x) & (~(x) + 1)) - -#undef assert -#define assert(x) ((void)0) - -#ifndef strcasecmp -#if defined(NEED_STRCASECMP) && !defined(FONTMODULE) -#define strcasecmp(s1,s2) f_strcasecmp(s1,s2) -#endif -#endif - -extern void -BitOrderInvert( - register unsigned char *, - register int -); - -extern void -TwoByteSwap( - register unsigned char *, - register int -); - -extern void -FourByteSwap( - register unsigned char *, - register int -); - -extern int -RepadBitmap ( - char*, - char*, - unsigned, - unsigned, - int, - int -); - -extern void CopyISOLatin1Lowered( - char * /*dest*/, - char * /*source*/, - int /*length*/ -); - -extern void register_fpe_functions(void); - -#endif /* _FONTMISC_H_ */ diff --git a/nx-X11/lib/font/include/fontmod.h b/nx-X11/lib/font/include/fontmod.h deleted file mode 100644 index 42d277fd4..000000000 --- a/nx-X11/lib/font/include/fontmod.h +++ /dev/null @@ -1,16 +0,0 @@ -/* $XFree86: xc/lib/font/include/fontmod.h,v 1.2 1998/07/25 06:57:09 dawes Exp $ */ - -#ifndef _FONTMOD_H_ -#define _FONTMOD_H_ - -typedef void (*InitFont)(void); - -typedef struct { - InitFont initFunc; - char * name; - pointer module; -} FontModule; - -extern FontModule *FontModuleList; - -#endif /* _FONTMOD_H_ */ diff --git a/nx-X11/lib/font/include/fontshow.h b/nx-X11/lib/font/include/fontshow.h deleted file mode 100644 index 5bb48fe18..000000000 --- a/nx-X11/lib/font/include/fontshow.h +++ /dev/null @@ -1,37 +0,0 @@ -/* $Xorg: fontshow.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#define FONT_SHOW_INFO (1<<0) -#define FONT_SHOW_PROPS (1<<1) -#define FONT_SHOW_METRICS (1<<2) -#define FONT_SHOW_GLYPHS (1<<3) -#define FONT_SHOW_ALL (FONT_SHOW_INFO|FONT_SHOW_PROPS|FONT_SHOW_GLYPHS) diff --git a/nx-X11/lib/font/include/fontutil.h b/nx-X11/lib/font/include/fontutil.h deleted file mode 100644 index 9a73eaa47..000000000 --- a/nx-X11/lib/font/include/fontutil.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $XFree86: xc/lib/font/include/fontutil.h,v 1.1 1999/03/14 11:17:49 dawes Exp $ */ - -#ifndef _FONTUTIL_H_ -#define _FONTUTIL_H_ - -#include - -extern int FontCouldBeTerminal(FontInfoPtr); -extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *, - int *, int *, int *); -extern void FontComputeInfoAccelerators(FontInfoPtr); - -extern void GetGlyphs ( FontPtr font, unsigned long count, - unsigned char *chars, FontEncoding fontEncoding, - unsigned long *glyphcount, CharInfoPtr *glyphs ); -extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo, - unsigned long count, ExtentInfoRec *info ); -extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count, - unsigned char *chars, ExtentInfoRec *info ); -extern Bool ParseGlyphCachingMode ( char *str ); -extern void InitGlyphCaching ( void ); -extern void SetGlyphCachingMode ( int newmode ); -extern int add_range ( fsRange *newrange, int *nranges, fsRange **range, - Bool charset_subset ); - -#endif /* _FONTUTIL_H_ */ diff --git a/nx-X11/lib/font/include/fontxlfd.h b/nx-X11/lib/font/include/fontxlfd.h deleted file mode 100644 index e87b93143..000000000 --- a/nx-X11/lib/font/include/fontxlfd.h +++ /dev/null @@ -1,100 +0,0 @@ -/* $Xorg: fontxlfd.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.5 2001/01/17 19:43:32 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifndef _FONTXLFD_H_ -#define _FONTXLFD_H_ - -#include - -/* Constants for values_supplied bitmap */ - -#define SIZE_SPECIFY_MASK 0xf - -#define PIXELSIZE_MASK 0x3 -#define PIXELSIZE_UNDEFINED 0 -#define PIXELSIZE_SCALAR 0x1 -#define PIXELSIZE_ARRAY 0x2 -#define PIXELSIZE_SCALAR_NORMALIZED 0x3 /* Adjusted for resolution */ - -#define POINTSIZE_MASK 0xc -#define POINTSIZE_UNDEFINED 0 -#define POINTSIZE_SCALAR 0x4 -#define POINTSIZE_ARRAY 0x8 - -#define PIXELSIZE_WILDCARD 0x10 -#define POINTSIZE_WILDCARD 0x20 - -#define ENHANCEMENT_SPECIFY_MASK 0x40 - -#define CHARSUBSET_SPECIFIED 0x40 - -#define EPS 1.0e-20 -#define XLFD_NDIGITS 3 /* Round numbers in pixel and - point arrays to this many - digits for repeatability */ - -typedef struct _FontScalable { - int values_supplied; /* Bitmap identifying what advanced - capabilities or enhancements - were specified in the font name */ - double pixel_matrix[4]; - double point_matrix[4]; - - /* Pixel and point fields are deprecated in favor of the - transformation matrices. They are provided and filled in for the - benefit of rasterizers that do not handle the matrices. */ - - int pixel, - point; - - int x, - y, - width; - char *xlfdName; - int nranges; - fsRange *ranges; -} FontScalableRec, *FontScalablePtr; - - -extern double xlfd_round_double ( double x ); -extern Bool FontParseXLFDName ( char *fname, FontScalablePtr vals, int subst ); -extern fsRange *FontParseRanges ( char *name, int *nranges ); - -#define FONT_XLFD_REPLACE_NONE 0 -#define FONT_XLFD_REPLACE_STAR 1 -#define FONT_XLFD_REPLACE_ZERO 2 -#define FONT_XLFD_REPLACE_VALUE 3 - -#endif /* _FONTXLFD_H_ */ diff --git a/nx-X11/lib/font/stubs/Imakefile b/nx-X11/lib/font/stubs/Imakefile deleted file mode 100644 index 555bbf614..000000000 --- a/nx-X11/lib/font/stubs/Imakefile +++ /dev/null @@ -1,25 +0,0 @@ -XCOMM $XFree86: xc/lib/font/stubs/Imakefile,v 1.3 1999/12/15 01:14:35 robin Exp $ - -#include - -INCLUDES = -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) -SRCS = cauthgen.c csignal.c delfntcid.c errorf.c fatalerror.c \ - findoldfnt.c getcres.c getdefptsize.c getnewfntcid.c gettime.c \ - initfshdl.c regfpefunc.c rmfshdl.c servclient.c setfntauth.c \ - stfntcfnt.c xpstubs.c -OBJS = cauthgen.o csignal.o delfntcid.o errorf.o fatalerror.o \ - findoldfnt.o getcres.o getdefptsize.o getnewfntcid.o gettime.o \ - initfshdl.o regfpefunc.o rmfshdl.o servclient.o setfntauth.o \ - stfntcfnt.o xpstubs.o - -#undef _LinkBuildLibrary -#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) - -NormalLibraryObjectRule() -NormalLibraryTarget(fntstubs,$(OBJS)) -LintLibraryTarget(fntstubs,$(SRCS)) -InstallLibrary(fntstubs,$(USRLIBDIR)) -NormalLintTarget($(SRCS)) -DependTarget() - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/cauthgen.c b/nx-X11/lib/font/stubs/cauthgen.c deleted file mode 100644 index dec438d08..000000000 --- a/nx-X11/lib/font/stubs/cauthgen.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -client_auth_generation(ClientPtr client) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/csignal.c b/nx-X11/lib/font/stubs/csignal.c deleted file mode 100644 index c957eb837..000000000 --- a/nx-X11/lib/font/stubs/csignal.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -Bool -ClientSignal(ClientPtr client) -{ - return True; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/delfntcid.c b/nx-X11/lib/font/stubs/delfntcid.c deleted file mode 100644 index af5c0a881..000000000 --- a/nx-X11/lib/font/stubs/delfntcid.c +++ /dev/null @@ -1,13 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -void -DeleteFontClientID(Font id) -{ -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/errorf.c b/nx-X11/lib/font/stubs/errorf.c deleted file mode 100644 index 52c6042a6..000000000 --- a/nx-X11/lib/font/stubs/errorf.c +++ /dev/null @@ -1,13 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/errorf.c,v 1.1 1999/01/11 05:13:19 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -void -ErrorF(const char *f, ...) -{ -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/fatalerror.c b/nx-X11/lib/font/stubs/fatalerror.c deleted file mode 100644 index 7dff1704d..000000000 --- a/nx-X11/lib/font/stubs/fatalerror.c +++ /dev/null @@ -1,13 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/fatalerror.c,v 1.1 1999/01/11 05:13:19 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -void -FatalError(const char *f, ...) -{ -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/findoldfnt.c b/nx-X11/lib/font/stubs/findoldfnt.c deleted file mode 100644 index 218ecd479..000000000 --- a/nx-X11/lib/font/stubs/findoldfnt.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -FontPtr -find_old_font(FSID id) -{ - return (FontPtr)NULL; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/getcres.c b/nx-X11/lib/font/stubs/getcres.c deleted file mode 100644 index da0de9174..000000000 --- a/nx-X11/lib/font/stubs/getcres.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -FontResolutionPtr -GetClientResolutions(int *num) -{ - return (FontResolutionPtr) 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/getdefptsize.c b/nx-X11/lib/font/stubs/getdefptsize.c deleted file mode 100644 index 10a46c86e..000000000 --- a/nx-X11/lib/font/stubs/getdefptsize.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -GetDefaultPointSize(void) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/getnewfntcid.c b/nx-X11/lib/font/stubs/getnewfntcid.c deleted file mode 100644 index 5a1e9270a..000000000 --- a/nx-X11/lib/font/stubs/getnewfntcid.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -Font -GetNewFontClientID(void) -{ - return (Font)0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/gettime.c b/nx-X11/lib/font/stubs/gettime.c deleted file mode 100644 index 60a4e3951..000000000 --- a/nx-X11/lib/font/stubs/gettime.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -unsigned long -GetTimeInMillis (void) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/initfshdl.c b/nx-X11/lib/font/stubs/initfshdl.c deleted file mode 100644 index 15a337a29..000000000 --- a/nx-X11/lib/font/stubs/initfshdl.c +++ /dev/null @@ -1,15 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/initfshdl.c,v 1.1 1999/01/11 05:13:20 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -init_fs_handlers(FontPathElementPtr fpe, - BlockHandlerProcPtr block_handler) -{ - return Successful; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/regfpefunc.c b/nx-X11/lib/font/stubs/regfpefunc.c deleted file mode 100644 index d6fcf3be3..000000000 --- a/nx-X11/lib/font/stubs/regfpefunc.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/regfpefunc.c,v 1.1 1999/01/11 05:13:20 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -RegisterFPEFunctions(NameCheckFunc name_func, - InitFpeFunc init_func, - FreeFpeFunc free_func, - ResetFpeFunc reset_func, - OpenFontFunc open_func, - CloseFontFunc close_func, - ListFontsFunc list_func, - StartLfwiFunc start_lfwi_func, - NextLfwiFunc next_lfwi_func, - WakeupFpeFunc wakeup_func, - ClientDiedFunc client_died, - LoadGlyphsFunc load_glyphs, - StartLaFunc start_list_alias_func, - NextLaFunc next_list_alias_func, - SetPathFunc set_path_func) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/rmfshdl.c b/nx-X11/lib/font/stubs/rmfshdl.c deleted file mode 100644 index ae0ab7863..000000000 --- a/nx-X11/lib/font/stubs/rmfshdl.c +++ /dev/null @@ -1,15 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/rmfshdl.c,v 1.1 1999/01/11 05:13:21 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -void -remove_fs_handlers(FontPathElementPtr fpe, - BlockHandlerProcPtr blockHandler, - Bool all) -{ -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/servclient.c b/nx-X11/lib/font/stubs/servclient.c deleted file mode 100644 index 25c853f87..000000000 --- a/nx-X11/lib/font/stubs/servclient.c +++ /dev/null @@ -1,3 +0,0 @@ -/* $XFree86$ */ - -void *serverClient = 0; diff --git a/nx-X11/lib/font/stubs/setfntauth.c b/nx-X11/lib/font/stubs/setfntauth.c deleted file mode 100644 index 843f155e5..000000000 --- a/nx-X11/lib/font/stubs/setfntauth.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -set_font_authorizations(char **authorizations, int *authlen, ClientPtr client) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/stfntcfnt.c b/nx-X11/lib/font/stubs/stfntcfnt.c deleted file mode 100644 index c062677f6..000000000 --- a/nx-X11/lib/font/stubs/stfntcfnt.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -int -StoreFontClientFont(FontPtr pfont, Font id) -{ - return 0; -} - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/stubs.h b/nx-X11/lib/font/stubs/stubs.h deleted file mode 100644 index d687a77e3..000000000 --- a/nx-X11/lib/font/stubs/stubs.h +++ /dev/null @@ -1,27 +0,0 @@ -/* $XFree86: xc/lib/font/stubs/stubs.h,v 1.3 1999/12/15 01:14:36 robin Exp $ */ - -/* This directory includes dummy entry for bdftopcf and mkfontdir */ - -#include -#include -#include - - -#ifndef True -#define True (-1) -#endif -#ifndef False -#define False (0) -#endif - -extern FontPtr find_old_font ( FSID id ); -extern int set_font_authorizations ( char **authorizations, - int *authlen, - ClientPtr client ); - -extern unsigned long GetTimeInMillis (void); - -extern void ErrorF(const char *format, ...); -extern void FatalError(const char *format, ...); - -/* end of file */ diff --git a/nx-X11/lib/font/stubs/xpstubs.c b/nx-X11/lib/font/stubs/xpstubs.c deleted file mode 100644 index 444915367..000000000 --- a/nx-X11/lib/font/stubs/xpstubs.c +++ /dev/null @@ -1,24 +0,0 @@ -/* $XFree86$ */ - -/* - stub for XpClient* functions. -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "stubs.h" - -Bool -XpClientIsBitmapClient(ClientPtr client) -{ - return True; -} - -Bool -XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe) -{ - return False; -} - -/* end of file */ diff --git a/nx-X11/lib/font/util/Imakefile b/nx-X11/lib/font/util/Imakefile deleted file mode 100644 index 6c318ba7f..000000000 --- a/nx-X11/lib/font/util/Imakefile +++ /dev/null @@ -1,43 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/font/util/Imakefile,v 1.6 2000/12/07 16:40:30 dawes Exp $ - -#include - - INCLUDES = -I$(FONTINCSRC) -I../include - HEADERS = -#ifdef FontFormatDefines - FORMAT_DEFS = FontFormatDefines -#endif - -#if defined(SunArchitecture) && (OSMajorVersion == 5) && (OSMinorVersion <= 6) - /* Work around a problem with __ctype being a "relocation against - allocatable but non-writable section" on Solaris 2.6. Hopefully - it doesn't break anything. */ - SYS_DEFINES = -D__XPG4_CHAR_CLASS__ -#endif - - - DEFINES = StrcasecmpDefines $(SYS_DEFINES) $(INTERNALDEFINES) - - SRCS = utilbitmap.c fontnames.c fontutil.c fontxlfd.c format.c \ - fontaccel.c atom.c miscutil.c private.c patcache.c - - OBJS = utilbitmap.o fontnames.o fontutil.o fontxlfd.o format.o \ - fontaccel.o atom.o miscutil.o private.o patcache.o - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -DependTarget() - diff --git a/nx-X11/lib/font/util/atom.c b/nx-X11/lib/font/util/atom.c deleted file mode 100644 index 942ea0d46..000000000 --- a/nx-X11/lib/font/util/atom.c +++ /dev/null @@ -1,233 +0,0 @@ -/* $Xorg: atom.c,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/atom.c,v 1.9 2002/09/19 13:22:00 tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -/* lame atom replacement routines for font applications */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -typedef struct _AtomList { - char *name; - int len; - int hash; - Atom atom; -} AtomListRec, *AtomListPtr; - -static AtomListPtr *hashTable; - -static int hashSize, hashUsed; -static int hashMask; -static int rehash; - -static AtomListPtr *reverseMap; -static int reverseMapSize; -static Atom lastAtom; - -static int -Hash(char *string, int len) -{ - int h; - - h = 0; - while (len--) - h = (h << 3) ^ *string++; - if (h < 0) - return -h; - return h; -} - -static int -ResizeHashTable (void) -{ - int newHashSize; - int newHashMask; - AtomListPtr *newHashTable; - int i; - int h; - int newRehash; - int r; - - if (hashSize == 0) - newHashSize = 1024; - else - newHashSize = hashSize * 2; - newHashTable = (AtomListPtr *) xalloc (newHashSize * sizeof (AtomListPtr)); - if (!newHashTable) { - fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate" - " newHashTable (%ld)\n", - newHashSize * (unsigned long)sizeof (AtomListPtr)); - return FALSE; - } - bzero ((char *) newHashTable, newHashSize * sizeof (AtomListPtr)); - newHashMask = newHashSize - 1; - newRehash = (newHashMask - 2); - for (i = 0; i < hashSize; i++) - { - if (hashTable[i]) - { - h = (hashTable[i]->hash) & newHashMask; - if (newHashTable[h]) - { - r = hashTable[i]->hash % newRehash | 1; - do { - h += r; - if (h >= newHashSize) - h -= newHashSize; - } while (newHashTable[h]); - } - newHashTable[h] = hashTable[i]; - } - } - xfree (hashTable); - hashTable = newHashTable; - hashSize = newHashSize; - hashMask = newHashMask; - rehash = newRehash; - return TRUE; -} - -static int -ResizeReverseMap (void) -{ - int ret = TRUE; - if (reverseMapSize == 0) - reverseMapSize = 1000; - else - reverseMapSize *= 2; - reverseMap = (AtomListPtr *) xrealloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); - if (!reverseMap) { - fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate" - " reverseMap (%ld)\n", - reverseMapSize * (unsigned long)sizeof(AtomListPtr)); - ret = FALSE; - } - return ret; -} - -static int -NameEqual (const char *a, const char *b, int l) -{ - while (l--) - if (*a++ != *b++) - return FALSE; - return TRUE; -} - -Atom -MakeAtom(char *string, unsigned len, int makeit) -{ - AtomListPtr a; - int hash; - int h = 0; - int r; - - hash = Hash (string, len); - if (hashTable) - { - h = hash & hashMask; - if (hashTable[h]) - { - if (hashTable[h]->hash == hash && hashTable[h]->len == len && - NameEqual (hashTable[h]->name, string, len)) - { - return hashTable[h]->atom; - } - r = (hash % rehash) | 1; - for (;;) - { - h += r; - if (h >= hashSize) - h -= hashSize; - if (!hashTable[h]) - break; - if (hashTable[h]->hash == hash && hashTable[h]->len == len && - NameEqual (hashTable[h]->name, string, len)) - { - return hashTable[h]->atom; - } - } - } - } - if (!makeit) - return None; - a = (AtomListPtr) xalloc (sizeof (AtomListRec) + len + 1); - if (a == NULL) { - fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec" - " (%ld)\n", (unsigned long)sizeof (AtomListRec) + len + 1); - return None; - } - a->name = (char *) (a + 1); - a->len = len; - strncpy (a->name, string, len); - a->name[len] = '\0'; - a->atom = ++lastAtom; - a->hash = hash; - if (hashUsed >= hashSize / 2) - { - ResizeHashTable (); - h = hash & hashMask; - if (hashTable[h]) - { - r = (hash % rehash) | 1; - do { - h += r; - if (h >= hashSize) - h -= hashSize; - } while (hashTable[h]); - } - } - hashTable[h] = a; - hashUsed++; - if (reverseMapSize <= a->atom) { - if (!ResizeReverseMap()) - return None; - } - reverseMap[a->atom] = a; - return a->atom; -} - -int -ValidAtom(Atom atom) -{ - return (atom != None) && (atom <= lastAtom); -} - -char * -NameForAtom(Atom atom) -{ - if (atom != None && atom <= lastAtom) - return reverseMap[atom]->name; - return NULL; -} diff --git a/nx-X11/lib/font/util/fontaccel.c b/nx-X11/lib/font/util/fontaccel.c deleted file mode 100644 index c37f69a39..000000000 --- a/nx-X11/lib/font/util/fontaccel.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Xorg: fontaccel.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/fontaccel.c,v 1.6 2001/01/17 19:43:33 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - -void -FontComputeInfoAccelerators(FontInfoPtr pFontInfo) -{ - pFontInfo->noOverlap = FALSE; - if (pFontInfo->maxOverlap <= pFontInfo->minbounds.leftSideBearing) - pFontInfo->noOverlap = TRUE; - - if ((pFontInfo->minbounds.ascent == pFontInfo->maxbounds.ascent) && - (pFontInfo->minbounds.descent == pFontInfo->maxbounds.descent) && - (pFontInfo->minbounds.leftSideBearing == - pFontInfo->maxbounds.leftSideBearing) && - (pFontInfo->minbounds.rightSideBearing == - pFontInfo->maxbounds.rightSideBearing) && - (pFontInfo->minbounds.characterWidth == - pFontInfo->maxbounds.characterWidth) && - (pFontInfo->minbounds.attributes == pFontInfo->maxbounds.attributes)) { - pFontInfo->constantMetrics = TRUE; - if ((pFontInfo->maxbounds.leftSideBearing == 0) && - (pFontInfo->maxbounds.rightSideBearing == - pFontInfo->maxbounds.characterWidth) && - (pFontInfo->maxbounds.ascent == pFontInfo->fontAscent) && - (pFontInfo->maxbounds.descent == pFontInfo->fontDescent)) - pFontInfo->terminalFont = TRUE; - else - pFontInfo->terminalFont = FALSE; - } else { - pFontInfo->constantMetrics = FALSE; - pFontInfo->terminalFont = FALSE; - } - if (pFontInfo->minbounds.characterWidth == pFontInfo->maxbounds.characterWidth) - pFontInfo->constantWidth = TRUE; - else - pFontInfo->constantWidth = FALSE; - - if ((pFontInfo->minbounds.leftSideBearing >= 0) && - (pFontInfo->maxOverlap <= 0) && - (pFontInfo->minbounds.ascent >= -pFontInfo->fontDescent) && - (pFontInfo->maxbounds.ascent <= pFontInfo->fontAscent) && - (-pFontInfo->minbounds.descent <= pFontInfo->fontAscent) && - (pFontInfo->maxbounds.descent <= pFontInfo->fontDescent)) - pFontInfo->inkInside = TRUE; - else - pFontInfo->inkInside = FALSE; -} - -int -FontCouldBeTerminal(FontInfoPtr pFontInfo) -{ - if ((pFontInfo->minbounds.leftSideBearing >= 0) && - (pFontInfo->maxbounds.rightSideBearing <= pFontInfo->maxbounds.characterWidth) && - (pFontInfo->minbounds.characterWidth == pFontInfo->maxbounds.characterWidth) && - (pFontInfo->maxbounds.ascent <= pFontInfo->fontAscent) && - (pFontInfo->maxbounds.descent <= pFontInfo->fontDescent) && - (pFontInfo->maxbounds.leftSideBearing != 0 || - pFontInfo->minbounds.rightSideBearing != pFontInfo->minbounds.characterWidth || - pFontInfo->minbounds.ascent != pFontInfo->fontAscent || - pFontInfo->minbounds.descent != pFontInfo->fontDescent)) { - /* blow off font with nothing but a SPACE */ - if (pFontInfo->maxbounds.ascent == 0 && - pFontInfo->maxbounds.descent == 0) - return FALSE; - return TRUE; - } - return FALSE; -} diff --git a/nx-X11/lib/font/util/fontnames.c b/nx-X11/lib/font/util/fontnames.c deleted file mode 100644 index 2d3a51752..000000000 --- a/nx-X11/lib/font/util/fontnames.c +++ /dev/null @@ -1,123 +0,0 @@ -/* $Xorg: fontnames.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/fontnames.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - * - * @(#)fontnames.c 3.1 91/04/10 - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -void -FreeFontNames(FontNamesPtr pFN) -{ - int i; - - if (!pFN) - return; - for (i = 0; i < pFN->nnames; i++) { - xfree(pFN->names[i]); - } - xfree(pFN->names); - xfree(pFN->length); - xfree(pFN); -} - -FontNamesPtr -MakeFontNamesRecord(unsigned int size) -{ - FontNamesPtr pFN; - - pFN = (FontNamesPtr) xalloc(sizeof(FontNamesRec)); - if (pFN) { - pFN->nnames = 0; - pFN->size = size; - if (size) - { - pFN->length = (int *) xalloc(size * sizeof(int)); - pFN->names = (char **) xalloc(size * sizeof(char *)); - if (!pFN->length || !pFN->names) { - xfree(pFN->length); - xfree(pFN->names); - xfree(pFN); - pFN = (FontNamesPtr) 0; - } - } - else - { - pFN->length = 0; - pFN->names = 0; - } - } - return pFN; -} - -int -AddFontNamesName(FontNamesPtr names, char *name, int length) -{ - int index = names->nnames; - char *nelt; - - nelt = (char *) xalloc(length + 1); - if (!nelt) - return AllocError; - if (index >= names->size) { - int size = names->size << 1; - int *nlength; - char **nnames; - - if (size == 0) - size = 8; - nlength = (int *) xrealloc(names->length, size * sizeof(int)); - nnames = (char **) xrealloc(names->names, size * sizeof(char *)); - if (nlength && nnames) { - names->size = size; - names->length = nlength; - names->names = nnames; - } else { - xfree(nelt); - xfree(nlength); - xfree(nnames); - return AllocError; - } - } - names->length[index] = length; - names->names[index] = nelt; - strncpy(nelt, name, length); - nelt[length] = '\0'; - names->nnames++; - return Successful; -} diff --git a/nx-X11/lib/font/util/fontutil.c b/nx-X11/lib/font/util/fontutil.c deleted file mode 100644 index 05fe5c2f2..000000000 --- a/nx-X11/lib/font/util/fontutil.c +++ /dev/null @@ -1,443 +0,0 @@ -/* $Xorg: fontutil.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/fontutil.c,v 3.6 2001/10/28 03:32:46 tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -/* Define global here... doesn't hurt the servers, and avoids - unresolved references in font clients. */ - -static int defaultGlyphCachingMode = DEFAULT_GLYPH_CACHING_MODE; -int glyphCachingMode = DEFAULT_GLYPH_CACHING_MODE; - -void -GetGlyphs(FontPtr font, - unsigned long count, - unsigned char *chars, - FontEncoding fontEncoding, - unsigned long *glyphcount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - (*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs); -} - -#define MIN(a,b) ((a)<(b)?(a):(b)) -#define MAX(a,b) ((a)>(b)?(a):(b)) - -void -QueryGlyphExtents(FontPtr pFont, - CharInfoPtr *charinfo, - unsigned long count, - ExtentInfoRec *info) -{ - register unsigned long i; - xCharInfo *pCI; - - info->drawDirection = pFont->info.drawDirection; - - info->fontAscent = pFont->info.fontAscent; - info->fontDescent = pFont->info.fontDescent; - - if (count != 0) { - - pCI = &((*charinfo)->metrics); charinfo++; - /* ignore nonexisting characters when calculating text extents */ - if ( !((pCI->characterWidth == 0) - && (pCI->rightSideBearing == 0) - && (pCI->leftSideBearing == 0) - && (pCI->ascent == 0) - && (pCI->descent == 0)) ) { - info->overallAscent = pCI->ascent; - info->overallDescent = pCI->descent; - info->overallLeft = pCI->leftSideBearing; - info->overallRight = pCI->rightSideBearing; - info->overallWidth = pCI->characterWidth; - } - - if (pFont->info.constantMetrics && pFont->info.noOverlap) { - info->overallWidth *= count; - info->overallRight += (info->overallWidth - - pCI->characterWidth); - } else { - for (i = 1; i < count; i++) { - pCI = &((*charinfo)->metrics); charinfo++; - /* ignore nonexisting characters when calculating extents */ - if ( !((pCI->characterWidth == 0) - && (pCI->rightSideBearing == 0) - && (pCI->leftSideBearing == 0) - && (pCI->ascent == 0) - && (pCI->descent == 0)) ) { - info->overallAscent = MAX( - info->overallAscent, - pCI->ascent); - info->overallDescent = MAX( - info->overallDescent, - pCI->descent); - info->overallLeft = MIN( - info->overallLeft, - info->overallWidth + pCI->leftSideBearing); - info->overallRight = MAX( - info->overallRight, - info->overallWidth + pCI->rightSideBearing); - /* - * yes, this order is correct; overallWidth IS incremented - * last - */ - info->overallWidth += pCI->characterWidth; - } - } - } - } else { - info->overallAscent = 0; - info->overallDescent = 0; - info->overallWidth = 0; - info->overallLeft = 0; - info->overallRight = 0; - } -} - -Bool -QueryTextExtents(FontPtr pFont, - unsigned long count, - unsigned char *chars, - ExtentInfoRec *info) -{ - xCharInfo **charinfo; - unsigned long n; - FontEncoding encoding; - int cm; - int i; - unsigned long t; - xCharInfo *defaultChar = 0; - unsigned char defc[2]; - int firstReal; - - charinfo = (xCharInfo **) xalloc(count * sizeof(xCharInfo *)); - if (!charinfo) - return FALSE; - encoding = TwoD16Bit; - if (pFont->info.lastRow == 0) - encoding = Linear16Bit; - (*pFont->get_metrics) (pFont, count, chars, encoding, &n, charinfo); - - /* Do default character substitution as get_metrics doesn't */ - -#define IsNonExistentChar(ci) (!(ci) || \ - ((ci)->ascent == 0 && \ - (ci)->descent == 0 && \ - (ci)->leftSideBearing == 0 && \ - (ci)->rightSideBearing == 0 && \ - (ci)->characterWidth == 0)) - - firstReal = n; - defc[0] = pFont->info.defaultCh >> 8; - defc[1] = pFont->info.defaultCh; - (*pFont->get_metrics) (pFont, 1, defc, encoding, &t, &defaultChar); - if ((IsNonExistentChar (defaultChar))) - defaultChar = 0; - for (i = 0; i < n; i++) - { - if ((IsNonExistentChar (charinfo[i]))) - { - if (!defaultChar) - continue; - charinfo[i] = defaultChar; - } - if (firstReal == n) - firstReal = i; - } - cm = pFont->info.constantMetrics; - pFont->info.constantMetrics = FALSE; - QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal, - n - firstReal, info); - pFont->info.constantMetrics = cm; - xfree(charinfo); - return TRUE; -} - -Bool -ParseGlyphCachingMode(char *str) -{ - if (!strcmp(str, "none")) defaultGlyphCachingMode = CACHING_OFF; - else if (!strcmp(str, "all")) defaultGlyphCachingMode = CACHE_ALL_GLYPHS; - else if (!strcmp(str, "16")) defaultGlyphCachingMode = CACHE_16_BIT_GLYPHS; - else return FALSE; - return TRUE; -} - -void -InitGlyphCaching(void) -{ - /* Set glyphCachingMode to the mode the server hopes to - support. DDX drivers that do not support the requested level - of glyph caching can call SetGlyphCachingMode to lower the - level of support. - */ - - glyphCachingMode = defaultGlyphCachingMode; -} - -/* ddxen can call SetGlyphCachingMode to inform us of what level of glyph - * caching they can support. - */ -void -SetGlyphCachingMode(int newmode) -{ - if ( (glyphCachingMode > newmode) && (newmode >= 0) ) - glyphCachingMode = newmode; -} - -#define range_alloc_granularity 16 -#define mincharp(p) ((p)->min_char_low + ((p)->min_char_high << 8)) -#define maxcharp(p) ((p)->max_char_low + ((p)->max_char_high << 8)) - -/* add_range(): Add range to a list of ranges, with coalescence */ -int -add_range(fsRange *newrange, - int *nranges, - fsRange **range, - Bool charset_subset) -{ - int first, last, middle; - unsigned long keymin, keymax; - unsigned long ptrmin = 0, ptrmax = 0; - fsRange *ptr = NULL, *ptr1, *ptr2, *endptr; - - /* There are two different ways to treat ranges: - - 1) Charset subsetting (support of the HP XLFD enhancements), in - which a range of 0x1234,0x3456 means all numbers between - 0x1234 and 0x3456, and in which min and max might be swapped. - - 2) Row/column ranges, in which a range of 0x1234,0x3456 means the - ranges 0x1234-0x1256, 0x1334-0x1356, ... , 0x3434-0x3456. - This is for support of glyph caching. - - The choice of treatment is selected with the "charset_subset" - flag */ - - /* If newrange covers multiple rows; break up the rows */ - if (!charset_subset && newrange->min_char_high != newrange->max_char_high) - { - int i, err = 0; - fsRange temprange; - for (i = newrange->min_char_high; - i <= newrange->max_char_high; - i++) - { - temprange.min_char_low = newrange->min_char_low; - temprange.max_char_low = newrange->max_char_low; - temprange.min_char_high = temprange.max_char_high = i; - err = add_range(&temprange, nranges, range, charset_subset); - if (err != Successful) break; - } - return err; - } - - keymin = mincharp(newrange); - keymax = maxcharp(newrange); - - if (charset_subset && keymin > keymax) - { - unsigned long temp = keymin; - keymin = keymax; - keymax = temp; - } - - /* add_range() maintains a sorted list; this makes possible coalescence - and binary searches */ - - /* Binary search for a range with which the new range can merge */ - - first = middle = 0; - last = *nranges - 1; - while (last >= first) - { - middle = (first + last) / 2; - ptr = (*range) + middle; - ptrmin = mincharp(ptr); - ptrmax = maxcharp(ptr); - - if (ptrmin > 0 && keymax < ptrmin - 1) last = middle - 1; - else if (keymin > ptrmax + 1) first = middle + 1; - else if (!charset_subset) - { - /* We might have a range with which to merge... IF the - result doesn't cross rows */ - if (newrange->min_char_high != ptr->min_char_high) - last = first - 1; /* Force adding a new range */ - break; - } - else break; /* We have at least one range with which we can merge */ - } - - if (last < first) - { - /* Search failed; we need to add a new range to the list. */ - - /* Grow the list if necessary */ - if (*nranges == 0 || *range == (fsRange *)0) - { - *range = (fsRange *)xalloc(range_alloc_granularity * - SIZEOF(fsRange)); - *nranges = 0; - } - else if (!(*nranges % range_alloc_granularity)) - { - *range = (fsRange *)xrealloc((char *)*range, - (*nranges + range_alloc_granularity) * - SIZEOF(fsRange)); - } - - /* If alloc failed, just return a null list */ - if (*range == (fsRange *)0) - { - *nranges = 0; - return AllocError; - } - - /* Should new entry go *at* or *after* ptr? */ - ptr = (*range) + middle; - if (middle < *nranges && keymin > ptrmin) ptr++; /* after */ - - /* Open up a space for our new range */ - memmove((char *)(ptr + 1), - (char *)ptr, - (char *)(*range + *nranges) - (char *)ptr); - - /* Insert the new range */ - ptr->min_char_low = keymin & 0xff; - ptr->min_char_high = keymin >> 8; - ptr->max_char_low = keymax & 0xff; - ptr->max_char_high = keymax >> 8; - - /* Update range count */ - (*nranges)++; - - /* Done */ - return Successful; - } - - /* Join our new range to that pointed to by "ptr" */ - if (keymin < ptrmin) - { - ptr->min_char_low = keymin & 0xff; - ptr->min_char_high = keymin >> 8; - } - if (keymax > ptrmax) - { - ptr->max_char_low = keymax & 0xff; - ptr->max_char_high = keymax >> 8; - } - - ptrmin = mincharp(ptr); - ptrmax = maxcharp(ptr); - - endptr = *range + *nranges; - - for (ptr1 = ptr; ptr1 >= *range; ptr1--) - { - if (ptrmin <= maxcharp(ptr1) + 1) - { - if (!charset_subset && ptr->min_char_high != ptr1->min_char_high) - break; - if (ptrmin >= mincharp(ptr1)) - ptrmin = mincharp(ptr1); - } - else break; - } - for (ptr2 = ptr; ptr2 < endptr; ptr2++) - { - if ((ptr2->min_char_low == 0 && ptr2->min_char_high == 0) || - ptrmax >= mincharp(ptr2) - 1) - { - if (!charset_subset && ptr->min_char_high != ptr2->min_char_high) - break; - if (ptrmax <= maxcharp(ptr2)) - ptrmax = maxcharp(ptr2); - } - else break; - } - - /* We need to coalesce ranges between ptr1 and ptr2 exclusive */ - ptr1++; - ptr2--; - if (ptr1 != ptr2) - { - memmove(ptr1, ptr2, (char *)endptr - (char *)ptr2); - *nranges -= (ptr2 - ptr1); - } - - /* Write the new range into the range list */ - ptr1->min_char_low = ptrmin & 0xff; - ptr1->min_char_high = ptrmin >> 8; - ptr1->max_char_low = ptrmax & 0xff; - ptr1->max_char_high = ptrmax >> 8; - - return Successful; -} - -/* It is difficult to find a good place for this. */ -#ifdef NEED_STRCASECMP -int -f_strcasecmp(const char *s1, const char *s2) -{ - char c1, c2; - - if (*s1 == 0) - if (*s2 == 0) - return 0; - else - return 1; - - c1 = (isupper (*s1) ? tolower (*s1) : *s1); - c2 = (isupper (*s2) ? tolower (*s2) : *s2); - while (c1 == c2) { - if (c1 == '\0') - return 0; - s1++; - s2++; - c1 = (isupper (*s1) ? tolower (*s1) : *s1); - c2 = (isupper (*s2) ? tolower (*s2) : *s2); - } - return c1 - c2; -} -#endif - diff --git a/nx-X11/lib/font/util/fontxlfd.c b/nx-X11/lib/font/util/fontxlfd.c deleted file mode 100644 index 7adf74f4c..000000000 --- a/nx-X11/lib/font/util/fontxlfd.c +++ /dev/null @@ -1,637 +0,0 @@ -/* $Xorg: fontxlfd.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.16tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#if defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) -#define NO_LOCALE -#endif -#ifndef NO_LOCALE -#include -#endif -#include -#include /* for sprintf() */ - -static char * -GetInt(char *ptr, int *val) -{ - if (*ptr == '*') { - *val = -1; - ptr++; - } else - for (*val = 0; *ptr >= '0' && *ptr <= '9';) - *val = *val * 10 + *ptr++ - '0'; - if (*ptr == '-') - return ptr; - return (char *) 0; -} - -#define minchar(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxchar(p) ((p).max_char_low + ((p).max_char_high << 8)) - - -#ifndef NO_LOCALE -static struct lconv *locale = 0; -#endif -static char *radix = ".", *plus = "+", *minus = "-"; - -static char * -readreal(char *ptr, double *result) -{ - char buffer[80], *p1, *p2; - -#ifndef NO_LOCALE - /* Figure out what symbols apply in this locale */ - - if (!locale) - { - locale = localeconv(); - if (locale->decimal_point && *locale->decimal_point) - radix = locale->decimal_point; - if (locale->positive_sign && *locale->positive_sign) - plus = locale->positive_sign; - if (locale->negative_sign && *locale->negative_sign) - minus = locale->negative_sign; - } -#endif - /* Copy the first 80 chars of ptr into our local buffer, changing - symbols as needed. */ - for (p1 = ptr, p2 = buffer; - *p1 && (p2 - buffer) < sizeof(buffer) - 1; - p1++, p2++) - { - switch(*p1) - { - case '~': *p2 = *minus; break; - case '+': *p2 = *plus; break; - case '.': *p2 = *radix; break; - default: *p2 = *p1; - } - } - *p2 = 0; - - /* Now we have something that strtod() can interpret... do it. */ - *result = strtod(buffer, &p1); - /* Return NULL if failure, pointer past number if success */ - return (p1 == buffer) ? (char *)0 : (ptr + (p1 - buffer)); -} - -static char * -xlfd_double_to_text(double value, char *buffer, int space_required) -{ - char formatbuf[40]; - register char *p1; - int ndigits, exponent; - -#ifndef NO_LOCALE - if (!locale) - { - locale = localeconv(); - if (locale->decimal_point && *locale->decimal_point) - radix = locale->decimal_point; - if (locale->positive_sign && *locale->positive_sign) - plus = locale->positive_sign; - if (locale->negative_sign && *locale->negative_sign) - minus = locale->negative_sign; - } -#endif - /* Compute a format to use to render the number */ - sprintf(formatbuf, "%%.%dle", XLFD_NDIGITS); - - if (space_required) - *buffer++ = ' '; - - /* Render the number using printf's idea of formatting */ - sprintf(buffer, formatbuf, value); - - /* Find and read the exponent value */ - for (p1 = buffer + strlen(buffer); - *p1-- != 'e' && p1[1] != 'E';); - exponent = atoi(p1 + 2); - if (value == 0.0) exponent = 0; - - /* Figure out how many digits are significant */ - while (p1 >= buffer && (!isdigit(*p1) || *p1 == '0')) p1--; - ndigits = 0; - while (p1 >= buffer) if (isdigit(*p1--)) ndigits++; - - /* Figure out notation to use */ - if (exponent >= XLFD_NDIGITS || ndigits - exponent > XLFD_NDIGITS + 1) - { - /* Scientific */ - sprintf(formatbuf, "%%.%dle", ndigits - 1); - sprintf(buffer, formatbuf, value); - } - else - { - /* Fixed */ - ndigits -= exponent + 1; - if (ndigits < 0) ndigits = 0; - sprintf(formatbuf, "%%.%dlf", ndigits); - sprintf(buffer, formatbuf, value); - if (exponent < 0) - { - p1 = buffer; - while (*p1 && *p1 != '0') p1++; - while (*p1++) p1[-1] = *p1; - } - } - - /* Last step, convert the locale-specific sign and radix characters - to our own. */ - for (p1 = buffer; *p1; p1++) - { - if (*p1 == *minus) *p1 = '~'; - else if (*p1 == *plus) *p1 = '+'; - else if (*p1 == *radix) *p1 = '.'; - } - - return buffer - space_required; -} - -double -xlfd_round_double(double x) -{ - /* Utility for XLFD users to round numbers to XLFD_NDIGITS - significant digits. How do you round to n significant digits on - a binary machine? */ - -#if defined(i386) || defined(__i386__) || \ - defined(ia64) || defined(__ia64__) || \ - defined(__alpha__) || defined(__alpha) || \ - defined(__hppa__) || \ - defined(__amd64__) || defined(__amd64) || \ - defined(sgi) -#if !defined(__UNIXOS2__) -#include - -/* if we have IEEE 754 fp, we can round to binary digits... */ - -#if (FLT_RADIX == 2) && (DBL_DIG == 15) && (DBL_MANT_DIG == 53) - -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif -#ifndef M_LN10 -#define M_LN10 2.30258509299404568402 -#endif - -/* convert # of decimal digits to # of binary digits */ -#define XLFD_NDIGITS_2 ((int)(XLFD_NDIGITS * M_LN10 / M_LN2 + 0.5)) - - union conv_d { - double d; - unsigned char b[8]; - } d; - int i,j,k,d_exp; - - if (x == 0) - return x; - - /* do minor sanity check for IEEE 754 fp and correct byte order */ - d.d = 1.0; - if (sizeof(double) == 8 && d.b[7] == 0x3f && d.b[6] == 0xf0) { - - /* - * this code will round IEEE 754 double to XLFD_NDIGITS_2 binary digits - */ - - d.d = x; - d_exp = (d.b[7] << 4) | (d.b[6] >> 4); - - i = (DBL_MANT_DIG-XLFD_NDIGITS_2) >> 3; - j = 1 << ((DBL_MANT_DIG-XLFD_NDIGITS_2) & 0x07); - for (; i<7; i++) { - k = d.b[i] + j; - d.b[i] = k; - if (k & 0x100) j = 1; - else break; - } - if ((i==7) && ((d.b[6] & 0xf0) != ((d_exp<<4) & 0xf0))) { - /* mantissa overflow: increment exponent */ - d_exp = (d_exp & 0x800 ) | ((d_exp & 0x7ff) + 1); - d.b[7] = d_exp >> 4; - d.b[6] = (d.b[6] & 0x0f) | (d_exp << 4); - } - - i = (DBL_MANT_DIG-XLFD_NDIGITS_2) >> 3; - j = 1 << ((DBL_MANT_DIG-XLFD_NDIGITS_2) & 0x07); - d.b[i] &= ~(j-1); - for (;--i>=0;) d.b[i] = 0; - - return d.d; - } - else -#endif -#endif /* !__UNIXOS2__ */ -#endif /* i386 || __i386__ */ - { - /* - * If not IEEE 754: Let printf() do it for you. - */ - - char formatbuf[40], buffer[40]; - - sprintf(formatbuf, "%%.%dlg", XLFD_NDIGITS); - sprintf(buffer, formatbuf, x); - return atof(buffer); - } -} - -static char * -GetMatrix(char *ptr, FontScalablePtr vals, int which) -{ - double *matrix; - - if (which == PIXELSIZE_MASK) - matrix = vals->pixel_matrix; - else if (which == POINTSIZE_MASK) - matrix = vals->point_matrix; - else return (char *)0; - - while (isspace(*ptr)) ptr++; - if (*ptr == '[') - { - /* This is a matrix containing real numbers. It would be nice - to use strtod() or sscanf() to read the numbers, but those - don't handle '~' for minus and we cannot force them to use a - "." for the radix. We'll have to do the hard work ourselves - (in readreal()). */ - - if ((ptr = readreal(++ptr, matrix + 0)) && - (ptr = readreal(ptr, matrix + 1)) && - (ptr = readreal(ptr, matrix + 2)) && - (ptr = readreal(ptr, matrix + 3))) - { - while (isspace(*ptr)) ptr++; - if (*ptr != ']') - ptr = (char *)0; - else - { - ptr++; - while (isspace(*ptr)) ptr++; - if (*ptr == '-') - { - if (which == POINTSIZE_MASK) - vals->values_supplied |= POINTSIZE_ARRAY; - else - vals->values_supplied |= PIXELSIZE_ARRAY; - } - else ptr = (char *)0; - } - } - } - else - { - int value; - if ((ptr = GetInt(ptr, &value))) - { - vals->values_supplied &= ~which; - if (value > 0) - { - matrix[3] = (double)value; - if (which == POINTSIZE_MASK) - { - matrix[3] /= 10.0; - vals->values_supplied |= POINTSIZE_SCALAR; - } - else - vals->values_supplied |= PIXELSIZE_SCALAR; - /* If we're concocting the pixelsize array from a scalar, - we will need to normalize element 0 for the pixel shape. - This is done in FontFileCompleteXLFD(). */ - matrix[0] = matrix[3]; - matrix[1] = matrix[2] = 0.0; - } - else if (value < 0) - { - if (which == POINTSIZE_MASK) - vals->values_supplied |= POINTSIZE_WILDCARD; - else - vals->values_supplied |= PIXELSIZE_WILDCARD; - } - } - } - return ptr; -} - - -static void -append_ranges(char *fname, int nranges, fsRange *ranges) -{ - if (nranges) - { - int i; - - strcat(fname, "["); - for (i = 0; i < nranges && strlen(fname) < 1010; i++) - { - if (i) strcat(fname, " "); - sprintf(fname + strlen(fname), "%d", - minchar(ranges[i])); - if (ranges[i].min_char_low == - ranges[i].max_char_low && - ranges[i].min_char_high == - ranges[i].max_char_high) continue; - sprintf(fname + strlen(fname), "_%d", - maxchar(ranges[i])); - } - strcat(fname, "]"); - } -} - -Bool -FontParseXLFDName(char *fname, FontScalablePtr vals, int subst) -{ - register char *ptr; - register char *ptr1, - *ptr2, - *ptr3, - *ptr4; - register char *ptr5; - FontScalableRec tmpvals; - char replaceChar = '0'; - char tmpBuf[1024]; - int spacingLen; - int l; - char *p; - - bzero(&tmpvals, sizeof(tmpvals)); - if (subst != FONT_XLFD_REPLACE_VALUE) - *vals = tmpvals; - - if (!(*(ptr = fname) == '-' || (*ptr++ == '*' && *ptr == '-')) || /* fndry */ - !(ptr = strchr(ptr + 1, '-')) || /* family_name */ - !(ptr1 = ptr = strchr(ptr + 1, '-')) || /* weight_name */ - !(ptr = strchr(ptr + 1, '-')) || /* slant */ - !(ptr = strchr(ptr + 1, '-')) || /* setwidth_name */ - !(ptr = strchr(ptr + 1, '-')) || /* add_style_name */ - !(ptr = strchr(ptr + 1, '-')) || /* pixel_size */ - !(ptr = GetMatrix(ptr + 1, &tmpvals, PIXELSIZE_MASK)) || - !(ptr2 = ptr = GetMatrix(ptr + 1, &tmpvals, POINTSIZE_MASK)) || - !(ptr = GetInt(ptr + 1, &tmpvals.x)) || /* resolution_x */ - !(ptr3 = ptr = GetInt(ptr + 1, &tmpvals.y)) || /* resolution_y */ - !(ptr4 = ptr = strchr(ptr + 1, '-')) || /* spacing */ - !(ptr5 = ptr = GetInt(ptr + 1, &tmpvals.width)) || /* average_width */ - !(ptr = strchr(ptr + 1, '-')) || /* charset_registry */ - strchr(ptr + 1, '-'))/* charset_encoding */ - return FALSE; - - /* Lop off HP charset subsetting enhancement. Interpreting this - field requires allocating some space in which to return the - results. So, to prevent memory leaks, this procedure will simply - lop off and ignore charset subsetting, and initialize the - relevant vals fields to zero. It's up to the caller to make its - own call to FontParseRanges() if it's interested in the charset - subsetting. */ - - if (subst != FONT_XLFD_REPLACE_NONE && - (p = strchr(strrchr(fname, '-'), '['))) - { - tmpvals.values_supplied |= CHARSUBSET_SPECIFIED; - *p = '\0'; - } - - /* Fill in deprecated fields for the benefit of rasterizers that care - about them. */ - tmpvals.pixel = (tmpvals.pixel_matrix[3] >= 0) ? - (int)(tmpvals.pixel_matrix[3] + .5) : - (int)(tmpvals.pixel_matrix[3] - .5); - tmpvals.point = (tmpvals.point_matrix[3] >= 0) ? - (int)(tmpvals.point_matrix[3] * 10 + .5) : - (int)(tmpvals.point_matrix[3] * 10 - .5); - - spacingLen = ptr4 - ptr3 + 1; - - switch (subst) { - case FONT_XLFD_REPLACE_NONE: - *vals = tmpvals; - break; - case FONT_XLFD_REPLACE_STAR: - replaceChar = '*'; - case FONT_XLFD_REPLACE_ZERO: - strcpy(tmpBuf, ptr2); - ptr5 = tmpBuf + (ptr5 - ptr2); - ptr3 = tmpBuf + (ptr3 - ptr2); - ptr2 = tmpBuf; - ptr = ptr1 + 1; - - ptr = strchr(ptr, '-') + 1; /* skip weight */ - ptr = strchr(ptr, '-') + 1; /* skip slant */ - ptr = strchr(ptr, '-') + 1; /* skip setwidth_name */ - ptr = strchr(ptr, '-') + 1; /* skip add_style_name */ - - if ((ptr - fname) + spacingLen + strlen(ptr5) + 10 >= (unsigned)1024) - return FALSE; - *ptr++ = replaceChar; - *ptr++ = '-'; - *ptr++ = replaceChar; - *ptr++ = '-'; - *ptr++ = '*'; - *ptr++ = '-'; - *ptr++ = '*'; - if (spacingLen > 2) - { - memmove(ptr, ptr3, spacingLen); - ptr += spacingLen; - } - else - { - *ptr++ = '-'; - *ptr++ = '*'; - *ptr++ = '-'; - } - *ptr++ = replaceChar; - strcpy(ptr, ptr5); - *vals = tmpvals; - break; - case FONT_XLFD_REPLACE_VALUE: - if (vals->values_supplied & PIXELSIZE_MASK) - { - tmpvals.values_supplied = - (tmpvals.values_supplied & ~PIXELSIZE_MASK) | - (vals->values_supplied & PIXELSIZE_MASK); - tmpvals.pixel_matrix[0] = vals->pixel_matrix[0]; - tmpvals.pixel_matrix[1] = vals->pixel_matrix[1]; - tmpvals.pixel_matrix[2] = vals->pixel_matrix[2]; - tmpvals.pixel_matrix[3] = vals->pixel_matrix[3]; - } - if (vals->values_supplied & POINTSIZE_MASK) - { - tmpvals.values_supplied = - (tmpvals.values_supplied & ~POINTSIZE_MASK) | - (vals->values_supplied & POINTSIZE_MASK); - tmpvals.point_matrix[0] = vals->point_matrix[0]; - tmpvals.point_matrix[1] = vals->point_matrix[1]; - tmpvals.point_matrix[2] = vals->point_matrix[2]; - tmpvals.point_matrix[3] = vals->point_matrix[3]; - } - if (vals->x >= 0) - tmpvals.x = vals->x; - if (vals->y >= 0) - tmpvals.y = vals->y; - if (vals->width >= 0) - tmpvals.width = vals->width; - else if (vals->width < -1) /* overload: -1 means wildcard */ - tmpvals.width = -vals->width; - - - p = ptr1 + 1; /* weight field */ - l = strchr(p, '-') - p; - sprintf(tmpBuf, "%*.*s", l, l, p); - - p += l + 1; /* slant field */ - l = strchr(p, '-') - p; - sprintf(tmpBuf + strlen(tmpBuf), "-%*.*s", l, l, p); - - p += l + 1; /* setwidth_name */ - l = strchr(p, '-') - p; - sprintf(tmpBuf + strlen(tmpBuf), "-%*.*s", l, l, p); - - p += l + 1; /* add_style_name field */ - l = strchr(p, '-') - p; - sprintf(tmpBuf + strlen(tmpBuf), "-%*.*s", l, l, p); - - strcat(tmpBuf, "-"); - if ((tmpvals.values_supplied & PIXELSIZE_MASK) == PIXELSIZE_ARRAY) - { - char buffer[80]; - strcat(tmpBuf, "["); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.pixel_matrix[0], - buffer, 0)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.pixel_matrix[1], - buffer, 1)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.pixel_matrix[2], - buffer, 1)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.pixel_matrix[3], - buffer, 1)); - strcat(tmpBuf, "]"); - } - else - { - sprintf(tmpBuf + strlen(tmpBuf), "%d", - (int)(tmpvals.pixel_matrix[3] + .5)); - } - strcat(tmpBuf, "-"); - if ((tmpvals.values_supplied & POINTSIZE_MASK) == POINTSIZE_ARRAY) - { - char buffer[80]; - strcat(tmpBuf, "["); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.point_matrix[0], - buffer, 0)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.point_matrix[1], - buffer, 1)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.point_matrix[2], - buffer, 1)); - strcat(tmpBuf, xlfd_double_to_text(tmpvals.point_matrix[3], - buffer, 1)); - strcat(tmpBuf, "]"); - } - else - { - sprintf(tmpBuf + strlen(tmpBuf), "%d", - (int)(tmpvals.point_matrix[3] * 10.0 + .5)); - } - sprintf(tmpBuf + strlen(tmpBuf), "-%d-%d%*.*s%d%s", - tmpvals.x, tmpvals.y, - spacingLen, spacingLen, ptr3, tmpvals.width, ptr5); - strcpy(ptr1 + 1, tmpBuf); - if ((vals->values_supplied & CHARSUBSET_SPECIFIED) && !vals->nranges) - strcat(fname, "[]"); - else - append_ranges(fname, vals->nranges, vals->ranges); - break; - } - return TRUE; -} - -fsRange *FontParseRanges(char *name, int *nranges) -{ - int n; - unsigned long l; - char *p1, *p2; - fsRange *result = (fsRange *)0; - - name = strchr(name, '-'); - for (n = 1; name && n < 14; n++) - name = strchr(name + 1, '-'); - - *nranges = 0; - if (!name || !(p1 = strchr(name, '['))) return (fsRange *)0; - p1++; - - while (*p1 && *p1 != ']') - { - fsRange thisrange; - - l = strtol(p1, &p2, 0); - if (p2 == p1 || l > 0xffff) break; - thisrange.max_char_low = thisrange.min_char_low = l & 0xff; - thisrange.max_char_high = thisrange.min_char_high = l >> 8; - - p1 = p2; - if (*p1 == ']' || *p1 == ' ') - { - while (*p1 == ' ') p1++; - if (add_range(&thisrange, nranges, &result, TRUE) != Successful) - break; - } - else if (*p1 == '_') - { - l = strtol(++p1, &p2, 0); - if (p2 == p1 || l > 0xffff) break; - thisrange.max_char_low = l & 0xff; - thisrange.max_char_high = l >> 8; - p1 = p2; - if (*p1 == ']' || *p1 == ' ') - { - while (*p1 == ' ') p1++; - if (add_range(&thisrange, nranges, &result, TRUE) != Successful) - break; - } - } - else break; - } - - return result; -} diff --git a/nx-X11/lib/font/util/format.c b/nx-X11/lib/font/util/format.c deleted file mode 100644 index 6700721f9..000000000 --- a/nx-X11/lib/font/util/format.c +++ /dev/null @@ -1,126 +0,0 @@ -/* $Xorg: format.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices and Digital make no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR 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. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/format.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -CheckFSFormat(fsBitmapFormat format, - fsBitmapFormatMask fmask, - int *bit_order, - int *byte_order, - int *scan, - int *glyph, - int *image) -{ - /* convert format to what the low levels want */ - if (fmask & BitmapFormatMaskBit) { - *bit_order = format & BitmapFormatBitOrderMask; - *bit_order = (*bit_order == BitmapFormatBitOrderMSB) - ? MSBFirst : LSBFirst; - } - if (fmask & BitmapFormatMaskByte) { - *byte_order = format & BitmapFormatByteOrderMask; - *byte_order = (*byte_order == BitmapFormatByteOrderMSB) - ? MSBFirst : LSBFirst; - } - if (fmask & BitmapFormatMaskScanLineUnit) { - *scan = format & BitmapFormatScanlineUnitMask; - /* convert byte paddings into byte counts */ - switch (*scan) { - case BitmapFormatScanlineUnit8: - *scan = 1; - break; - case BitmapFormatScanlineUnit16: - *scan = 2; - break; - case BitmapFormatScanlineUnit32: - *scan = 4; - break; - default: - return BadFontFormat; - } - } - if (fmask & BitmapFormatMaskScanLinePad) { - *glyph = format & BitmapFormatScanlinePadMask; - /* convert byte paddings into byte counts */ - switch (*glyph) { - case BitmapFormatScanlinePad8: - *glyph = 1; - break; - case BitmapFormatScanlinePad16: - *glyph = 2; - break; - case BitmapFormatScanlinePad32: - *glyph = 4; - break; - default: - return BadFontFormat; - } - } - if (fmask & BitmapFormatMaskImageRectangle) { - *image = format & BitmapFormatImageRectMask; - - if (*image != BitmapFormatImageRectMin && - *image != BitmapFormatImageRectMaxWidth && - *image != BitmapFormatImageRectMax) - return BadFontFormat; - } - return Successful; -} diff --git a/nx-X11/lib/font/util/miscutil.c b/nx-X11/lib/font/util/miscutil.c deleted file mode 100644 index 03b4d061d..000000000 --- a/nx-X11/lib/font/util/miscutil.c +++ /dev/null @@ -1,99 +0,0 @@ -/* $Xorg: miscutil.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/miscutil.c,v 1.7 2001/07/25 15:04:57 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - -#define XK_LATIN1 -#include -/* #include */ - -/* make sure everything initializes themselves at least once */ - -long serverGeneration = 1; - -void * -Xalloc (unsigned long m) -{ - return malloc (m); -} - -void * -Xrealloc (void *n, unsigned long m) -{ - if (!n) - return malloc (m); - else - return realloc (n, m); -} - -void -Xfree (void *n) -{ - if (n) - free (n); -} - -void * -Xcalloc (unsigned long n) -{ - return calloc (n, 1); -} - -void -CopyISOLatin1Lowered (char *dst, char *src, int len) -{ - register unsigned char *dest, *source; - - for (dest = (unsigned char *)dst, source = (unsigned char *)src; - *source && len > 0; - source++, dest++, len--) - { - if ((*source >= XK_A) && (*source <= XK_Z)) - *dest = *source + (XK_a - XK_A); - else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis)) - *dest = *source + (XK_agrave - XK_Agrave); - else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn)) - *dest = *source + (XK_oslash - XK_Ooblique); - else - *dest = *source; - } - *dest = '\0'; -} - -void -register_fpe_functions () -{ -} diff --git a/nx-X11/lib/font/util/patcache.c b/nx-X11/lib/font/util/patcache.c deleted file mode 100644 index 0351b1ac2..000000000 --- a/nx-X11/lib/font/util/patcache.c +++ /dev/null @@ -1,221 +0,0 @@ -/* $Xorg: patcache.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/patcache.c,v 3.4 2001/01/17 19:43:33 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -/* - * Static sized hash table for looking up font name patterns - * - * LRU entries, reusing old entries - */ - -#define NBUCKETS 16 -#define NENTRIES 64 - -#define UNSET (NENTRIES+1) - -typedef unsigned char EntryPtr; - -typedef struct _FontPatternCacheEntry { - struct _FontPatternCacheEntry *next, **prev; - short patlen; - char *pattern; - int hash; - FontPtr pFont; /* associated font */ -} FontPatternCacheEntryRec, *FontPatternCacheEntryPtr; - -typedef struct _FontPatternCache { - FontPatternCacheEntryPtr buckets[NBUCKETS]; - FontPatternCacheEntryRec entries[NENTRIES]; - FontPatternCacheEntryPtr free; -} FontPatternCacheRec; - -/* Empty cache (for rehash) */ -void -EmptyFontPatternCache (FontPatternCachePtr cache) -{ - int i; - - for (i = 0; i < NBUCKETS; i++) - cache->buckets[i] = 0; - for (i = 0; i < NENTRIES; i++) - { - cache->entries[i].next = &cache->entries[i+1]; - cache->entries[i].prev = 0; - cache->entries[i].pFont = 0; - xfree (cache->entries[i].pattern); - cache->entries[i].pattern = 0; - cache->entries[i].patlen = 0; - } - cache->free = &cache->entries[0]; - cache->entries[NENTRIES - 1].next = 0; -} - -/* Create and initialize cache */ -FontPatternCachePtr -MakeFontPatternCache (void) -{ - FontPatternCachePtr cache; - int i; - cache = (FontPatternCachePtr) xalloc (sizeof *cache); - if (!cache) - return 0; - for (i = 0; i < NENTRIES; i++) { - cache->entries[i].patlen = 0; - cache->entries[i].pattern = 0; - cache->entries[i].pFont = 0; - } - EmptyFontPatternCache (cache); - return cache; -} - -/* toss cache */ -void -FreeFontPatternCache (FontPatternCachePtr cache) -{ - int i; - - for (i = 0; i < NENTRIES; i++) - xfree (cache->entries[i].pattern); - xfree (cache); -} - -/* compute id for string */ -static int -Hash (const char *string, int len) -{ - int hash; - - hash = 0; - while (len--) - hash = (hash << 1) ^ *string++; - if (hash < 0) - hash = -hash; - return hash; -} - -/* add entry */ -void -CacheFontPattern (FontPatternCachePtr cache, - char *pattern, - int patlen, - FontPtr pFont) -{ - FontPatternCacheEntryPtr e; - char *newpat; - int i; - - newpat = (char *) xalloc (patlen); - if (!newpat) - return; - if (cache->free) - { - e = cache->free; - cache->free = e->next; - } - else - { - i = rand (); - if (i < 0) - i = -i; - i %= NENTRIES; - e = &cache->entries[i]; - if (e->next) - e->next->prev = e->prev; - *e->prev = e->next; - xfree (e->pattern); - } - /* set pattern */ - memcpy (newpat, pattern, patlen); - e->pattern = newpat; - e->patlen = patlen; - /* link to new hash chain */ - e->hash = Hash (pattern, patlen); - i = e->hash % NBUCKETS; - e->next = cache->buckets[i]; - if (e->next) - e->next->prev = &(e->next); - cache->buckets[i] = e; - e->prev = &(cache->buckets[i]); - e->pFont = pFont; -} - -/* find matching entry */ -FontPtr -FindCachedFontPattern (FontPatternCachePtr cache, - char *pattern, - int patlen) -{ - int hash; - int i; - FontPatternCacheEntryPtr e; - - hash = Hash (pattern, patlen); - i = hash % NBUCKETS; - for (e = cache->buckets[i]; e; e = e->next) - { - if (e->patlen == patlen && e->hash == hash && - !memcmp (e->pattern, pattern, patlen)) - { - return e->pFont; - } - } - return 0; -} - -void -RemoveCachedFontPattern (FontPatternCachePtr cache, - FontPtr pFont) -{ - FontPatternCacheEntryPtr e; - int i; - - for (i = 0; i < NENTRIES; i++) - { - if ((e = &cache->entries[i])->pFont == pFont) - { - e->pFont = 0; - if (e->next) - e->next->prev = e->prev; - *e->prev = e->next; - e->next = cache->free; - cache->free = e; - xfree (e->pattern); - e->pattern = 0; - } - } -} diff --git a/nx-X11/lib/font/util/private.c b/nx-X11/lib/font/util/private.c deleted file mode 100644 index 85e90e57b..000000000 --- a/nx-X11/lib/font/util/private.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Xorg: private.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/private.c,v 1.8tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -static int _FontPrivateAllocateIndex = 0; - -int -AllocateFontPrivateIndex (void) -{ - return _FontPrivateAllocateIndex++; -} - -FontPtr -CreateFontRec (void) -{ - FontPtr pFont; - int size; - - size = sizeof(FontRec) + (sizeof(pointer) * _FontPrivateAllocateIndex); - - pFont = (FontPtr)xalloc(size); - - if(pFont) { - bzero((char*)pFont, size); - pFont->maxPrivate = _FontPrivateAllocateIndex - 1; - if(_FontPrivateAllocateIndex) - pFont->devPrivates = (pointer)(&pFont[1]); - } - - return pFont; -} - -void -DestroyFontRec (FontPtr pFont) -{ - if (pFont->devPrivates && pFont->devPrivates != (pointer)(&pFont[1])) - xfree(pFont->devPrivates); - xfree(pFont); -} - -void -ResetFontPrivateIndex (void) -{ - _FontPrivateAllocateIndex = 0; -} - -Bool -_FontSetNewPrivate (FontPtr pFont, int n, pointer ptr) -{ - pointer *new; - - if (n > pFont->maxPrivate) { - if (pFont->devPrivates && pFont->devPrivates != (pointer)(&pFont[1])) { - new = (pointer *) xrealloc (pFont->devPrivates, (n + 1) * sizeof (pointer)); - if (!new) - return FALSE; - } else { - new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); - if (!new) - return FALSE; - if (pFont->devPrivates) - memcpy (new, pFont->devPrivates, (pFont->maxPrivate + 1) * sizeof (pointer)); - } - pFont->devPrivates = new; - /* zero out new, uninitialized privates */ - while(++pFont->maxPrivate < n) - pFont->devPrivates[pFont->maxPrivate] = (pointer)0; - } - pFont->devPrivates[n] = ptr; - return TRUE; -} - diff --git a/nx-X11/lib/font/util/utilbitmap.c b/nx-X11/lib/font/util/utilbitmap.c deleted file mode 100644 index a817a4ec6..000000000 --- a/nx-X11/lib/font/util/utilbitmap.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $Xorg: utilbitmap.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - -/* - -Copyright 1990, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.4 2001/01/17 19:43:34 dawes Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -/* Utility functions for reformating font bitmaps */ - -static unsigned char _reverse_byte[0x100] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, - 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, - 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, - 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, - 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, - 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, - 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, - 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, - 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, - 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, - 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff -}; - -/* - * Invert bit order within each BYTE of an array. - */ -void -BitOrderInvert(unsigned char *buf, int nbytes) -{ - unsigned char *rev = _reverse_byte; - - for (; --nbytes >= 0; buf++) - *buf = rev[*buf]; -} - -/* - * Invert byte order within each 16-bits of an array. - */ -void -TwoByteSwap(unsigned char *buf, int nbytes) -{ - unsigned char c; - - for (; nbytes > 0; nbytes -= 2, buf += 2) - { - c = buf[0]; - buf[0] = buf[1]; - buf[1] = c; - } -} - -/* - * Invert byte order within each 32-bits of an array. - */ -void -FourByteSwap(unsigned char *buf, int nbytes) -{ - unsigned char c; - - for (; nbytes > 0; nbytes -= 4, buf += 4) - { - c = buf[0]; - buf[0] = buf[3]; - buf[3] = c; - c = buf[1]; - buf[1] = buf[2]; - buf[2] = c; - } -} - -/* - * Repad a bitmap - */ - -int -RepadBitmap (char *pSrc, char *pDst, - unsigned int srcPad, unsigned int dstPad, - int width, int height) -{ - int srcWidthBytes,dstWidthBytes; - int row,col; - char *pTmpSrc,*pTmpDst; - - switch (srcPad) { - case 1: - srcWidthBytes = (width+7)>>3; - break; - case 2: - srcWidthBytes = ((width+15)>>4)<<1; - break; - case 4: - srcWidthBytes = ((width+31)>>5)<<2; - break; - case 8: - srcWidthBytes = ((width+63)>>6)<<3; - break; - default: - return 0; - } - switch (dstPad) { - case 1: - dstWidthBytes = (width+7)>>3; - break; - case 2: - dstWidthBytes = ((width+15)>>4)<<1; - break; - case 4: - dstWidthBytes = ((width+31)>>5)<<2; - break; - case 8: - dstWidthBytes = ((width+63)>>6)<<3; - break; - default: - return 0; - } - - width = srcWidthBytes; - if (width > dstWidthBytes) - width = dstWidthBytes; - pTmpSrc= pSrc; - pTmpDst= pDst; - for (row = 0; row < height; row++) - { - for (col = 0; col < width; col++) - *pTmpDst++ = *pTmpSrc++; - while (col < dstWidthBytes) - { - *pTmpDst++ = '\0'; - col++; - } - pTmpSrc += srcWidthBytes - width; - } - return dstWidthBytes * height; -} - - diff --git a/nx-X11/programs/Xserver/GL/glx/Imakefile b/nx-X11/programs/Xserver/GL/glx/Imakefile index 5283e2286..506ef5539 100644 --- a/nx-X11/programs/Xserver/GL/glx/Imakefile +++ b/nx-X11/programs/Xserver/GL/glx/Imakefile @@ -42,7 +42,7 @@ LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \ -I$(XINCLUDESRC) -I$(SERVERSRC)/mi \ - -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(LIBSRC)/GL/include \ + -I$(EXTINCSRC) -I$(LIBSRC)/GL/include \ -I$(XF86SRC) #if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 1419531a4..fd0a55311 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -201,7 +201,7 @@ INSTPGMFLAGS = $(LBXDIRS) $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \ $(RANDRDIR) $(RENDERDIR) $(XTRAPDIR) $(XPCONFIGDIR) \ $(FIXESDIR) $(DAMAGEDIR) $(CWDIR) $(COMPOSITEDIR) -#if BuildLBX || GzipFontCompression +#if BuildLBX ZLIB = GzipLibrary #endif OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) $(DEPXDMCPLIB) @@ -267,14 +267,6 @@ INSTPGMFLAGS = #endif MIINITEXTOBJ = mi/miinitext.o DIX = dix/LibraryTargetName(dix) - FONTBASE = $(FONTLIBSRC)/fontbase.o \ - $(FONTLIBSRC)/LibraryTargetName(fontbase) -#if XserverStaticFontLib - FONT = $(FONTLIBSRC)/LibraryTargetName(NX_Xfont) $(FREETYPE2LIB) -#else - FONT = $(LDPRELIB) $(XFONTLIB) $(FREETYPE2LIB) -#endif - FONTLIBS = $(FONT) $(XPFBLIBS) #if UsbMouseSupport #if !HasLibUsb USB = $(XF86OSSRC)/bsd/libusb/LibraryTargetName(usb) @@ -432,7 +424,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ XPMLIB = -lXpm NXAGENT = hw/nxagent/LibraryTargetName(nxagent) NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI) -NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) +NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) #if HasParallelMake MakeMutex($(NXAGENTDIRS) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS)) #endif @@ -447,17 +439,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes \ + -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes \ + -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes -lXfont \ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes \ + -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \ `pkg-config --libs libxml-2.0` #endif @@ -512,7 +504,7 @@ nxagent_static_nolibs: nxagent $(MV) nxagent__static_nolibs nxagent_static_nolibs.bak; \ else exit 0; fi $(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \ - $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) $(FONTLIBS) \ + $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) \ $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS) #endif /* NXAgentServer */ @@ -573,7 +565,7 @@ XWINW32 = -lgdi32 -lwsock32 $(XWINGL32) $(PTHREADLIB) #else XWINW32 = -lgdi32 #endif -NXWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XWINX11) $(SYSLIBS) $(XWINW32) +NXWINSYSLIBS = $(LDPRELIBS) $(XWINX11) $(SYSLIBS) $(XWINW32) NXWINNXLIBS = -L../../../nxcomp -lXcomp @@ -638,7 +630,7 @@ NXWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(LAYERDIR) $(NXWINDDXDIR) \ NXWINOBJS = $(NXWINDDXDIR)/stubs.o $(NXWINDDXDIR)/NX.res NXWINLIBS = PreFbLibs $(NXWINLIB) FbPostFbLibs $(LAYER) $(SHADOW) \ $(XWINPARSERLIB) -NXWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) -lgdi32 -lddraw +NXWINSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) -lgdi32 -lddraw NXWINNXLIBS = -L../../../nxcomp -lXcomp /* @@ -704,7 +696,7 @@ XCOMM Hackery for building dlopen-able .so modules on Solaris AllTarget(linker-deps) -LINKER_DEPS_DIRS = $(SUBDIRS) $(FONTLIBSRC) +LINKER_DEPS_DIRS = $(SUBDIRS) XCOMM After everything is built, run through and generate linker dependencies linker-deps: diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index 6c2c060f8..f44edb172 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -111,7 +111,7 @@ XF86BIGFOBJS = xf86bigfont.o #if BuildXinerama PNRXSRCS = panoramiX.c panoramiXSwap.c panoramiXprocs.c PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o - PNRXINCLUDES = -I$(FONTINCSRC) -I../mi -I../render + PNRXINCLUDES = -I../mi -I../render #endif #if BuildDPMS DPMSSRCS = dpms.c @@ -162,7 +162,7 @@ NX_DEFINES = -DNXAGENT_SERVER XF86INCLUDES = -I$(XF86COMSRC) #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(PNRXINCLUDES) $(XF86INCLUDES) -I$(FONTINCSRC) \ + $(PNRXINCLUDES) $(XF86INCLUDES) \ $(FONTCACHEINCLUDES) $(DMXINCLUDES) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/Xext/extmod/Imakefile b/nx-X11/programs/Xserver/Xext/extmod/Imakefile index 450a318b4..45f3f39d7 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/Imakefile +++ b/nx-X11/programs/Xserver/Xext/extmod/Imakefile @@ -98,7 +98,7 @@ LinkSourceFile(cup.c,..) XF86INCLUDES = -I$(XF86COMSRC) INCLUDES = -I.. -I../../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(XF86INCLUDES) $(FONTCACHEINCLUDES) -I$(FONTINCSRC) + $(XF86INCLUDES) $(FONTCACHEINCLUDES) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln LinkSourceFile(shape.c,..) diff --git a/nx-X11/programs/Xserver/composite/Imakefile b/nx-X11/programs/Xserver/composite/Imakefile index 9d3edcf8c..c45aa7f6a 100644 --- a/nx-X11/programs/Xserver/composite/Imakefile +++ b/nx-X11/programs/Xserver/composite/Imakefile @@ -6,7 +6,7 @@ INCLUDES = -I../include -I../mi -I../Xext -I../render -I../xfixes \ -I../damageext -I../miext/damage -I$(EXTINCSRC) \ - -I$(XINCLUDESRC) -I$(FONTINCSRC) + -I$(XINCLUDESRC) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile index a0d420851..47e617718 100644 --- a/nx-X11/programs/Xserver/dix/Imakefile +++ b/nx-X11/programs/Xserver/dix/Imakefile @@ -24,7 +24,7 @@ OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ main.o property.o resource.o swaprep.o swapreq.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) - INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) \ + INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx LINTLIBS = ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index 42fd647a4..9a8b09993 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1973,22 +1973,7 @@ InitFonts () { patternCache = MakeFontPatternCache(); -#ifndef KDRIVESERVER - if (screenInfo.numScreens > screenInfo.numVideoScreens) { - PrinterFontRegisterFpeFunctions(); - FontFileCheckRegisterFpeFunctions(); - check_fs_register_fpe_functions(); - } else -#endif - { -#ifdef KDRIVESERVER - BuiltinRegisterFpeFunctions(); -#endif - FontFileRegisterFpeFunctions(); -#ifndef NOFONTSERVERACCESS - fs_register_fpe_functions(); -#endif - } + register_fpe_functions(); } int diff --git a/nx-X11/programs/Xserver/fb/Imakefile b/nx-X11/programs/Xserver/fb/Imakefile index cb560e7a0..489d6a201 100644 --- a/nx-X11/programs/Xserver/fb/Imakefile +++ b/nx-X11/programs/Xserver/fb/Imakefile @@ -122,7 +122,7 @@ OBJS = $(XFMODOBJ) \ INCLUDES = -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ + -I$(XF86SRC)/common $(EXTRAINCLUDES) \ -I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln $(SERVERSRC)/os/llib-los.ln \ $(SERVERSRC)/mi/llib-lmi.ln diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 178ed3cf7..5becb2cff 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -31,8 +31,8 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "dixstruct.h" -#include "../../../../include/fonts/font.h" -#include "fontstruct.h" +#include +#include #include "misc.h" #include "miscstruct.h" #include "opaque.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.h b/nx-X11/programs/Xserver/hw/nxagent/Font.h index 63cb6aa24..d3ee2b0da 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.h @@ -32,7 +32,7 @@ is" without express or implied warranty. #ifndef __Font_H__ #define __Font_H__ -#include "fontstruct.h" +#include #include "resource.h" extern RESTYPE RT_NX_FONT; diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c index 71562d999..ec51bbedc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GC.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c @@ -36,7 +36,7 @@ is" without express or implied warranty. #include "pixmapstr.h" #include "scrnintstr.h" #include "dixstruct.h" -#include "fontstruct.h" +#include #include "mistruct.h" #include "region.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 3d4331c78..4d409dc41 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -134,39 +134,38 @@ OBJS = NXwindow.o \ $(OBJS1) VFBINCLUDES = -I../../fb -I../../mfb -I../../render -NXFONTINCLUDES = -I../../../../lib/font/include LIBXRANDRINCLUDES= -I../../../../lib/Xrandr INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ - -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ + -I$(XBUILDINCDIR) \ -I../../mi -I../../include -I../../os \ -I../../miext/damage -I../../miext/cw \ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + $(VFBINCLUDES) $(LIBXRANDRINCLUDES) \ `pkg-config --cflags-only-I libxml-2.0` #ifdef SunArchitecture INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ - -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ + -I$(XBUILDINCDIR) \ -I/usr/sfw/include \ -I../../mi -I../../include -I../../os \ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I../../miext/damage -I../../miext/cw \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + $(VFBINCLUDES) $(LIBXRANDRINCLUDES) \ `pkg-config --cflags-only-I libxml-2.0` #else #ifdef cygwinArchitecture -INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ +INCLUDES = -I. -I$(XBUILDINCDIR) \ -I../../mi -I../../include -I../../os \ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I../../miext/damage -I../../miext/cw \ -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \ + $(VFBINCLUDES) $(LIBXRANDRINCLUDES) \ `pkg-config --cflags-only-I libxml-2.0` #endif #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index d0e3e57b8..3722800ff 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -42,7 +42,7 @@ is" without express or implied warranty. #include "windowstr.h" #include "servermd.h" #include "mi.h" -#include "fontstruct.h" +#include #include "Agent.h" #include "Display.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 2b642692f..922443633 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -82,6 +82,7 @@ Equipment Corporation. #include "cursorstr.h" #include "misc.h" #include "opaque.h" +#include #include "dixfontstr.h" #include "closestr.h" @@ -2116,22 +2117,7 @@ InitFonts () { patternCache = MakeFontPatternCache(); -#ifndef KDRIVESERVER - if (screenInfo.numScreens > screenInfo.numVideoScreens) { - PrinterFontRegisterFpeFunctions(); - FontFileCheckRegisterFpeFunctions(); - check_fs_register_fpe_functions(); - } else -#endif - { -#ifdef KDRIVESERVER - BuiltinRegisterFpeFunctions(); -#endif - FontFileRegisterFpeFunctions(); -#ifndef NOFONTSERVERACCESS - fs_register_fpe_functions(); -#endif - } + register_fpe_functions(); } int diff --git a/nx-X11/programs/Xserver/mi/Imakefile b/nx-X11/programs/Xserver/mi/Imakefile index b85a9f98b..24caa0299 100644 --- a/nx-X11/programs/Xserver/mi/Imakefile +++ b/nx-X11/programs/Xserver/mi/Imakefile @@ -88,9 +88,9 @@ EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC \ #endif -INCLUDES = -I. -I../include -I../../../include/fonts -I../render \ +INCLUDES = -I. -I../include -I../render \ -I../xfixes -I../damageext -I../miext/damage \ - -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(FFS_DEFINES) diff --git a/nx-X11/programs/Xserver/miext/damage/Imakefile b/nx-X11/programs/Xserver/miext/damage/Imakefile index 1fa5cf126..7fa745b65 100755 --- a/nx-X11/programs/Xserver/miext/damage/Imakefile +++ b/nx-X11/programs/Xserver/miext/damage/Imakefile @@ -10,7 +10,7 @@ SRCS = damage.c OBJS = damage.o INCLUDES = -I. -I../shadow -I../../mi -I../../fb -I../../include -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ + -I$(XF86SRC)/common $(EXTRAINCLUDES) \ -I../../render -I../cw -I$(EXTINCSRC) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \ ../../mi/llib-lmi.ln diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile index 55f8e41fb..aa3f568b5 100644 --- a/nx-X11/programs/Xserver/os/Imakefile +++ b/nx-X11/programs/Xserver/os/Imakefile @@ -165,7 +165,7 @@ BOOTSTRAPCFLAGS = $(KRB5_DEFINES) $(RGB_DEFINES) $(GETPEER_DEFINES) \ $(RANDOM_DEFINES) $(BUGMSG) $(XTRANS_FAILDEFINES) $(NX_DEFINES) INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - -I$(SERVERSRC)/Xext -I$(FONTINCSRC) -I$(SERVERSRC)/render \ + -I$(SERVERSRC)/Xext -I$(SERVERSRC)/render \ -I$(TOP)/lib/Xau -I../lbx Krb5Includes $(NX_INCLUDES) DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \ $(TRANS_INCLUDES) $(CONNECTION_FLAGS) $(GETPEER_DEFINES) \ diff --git a/nx-X11/programs/Xserver/randr/Imakefile b/nx-X11/programs/Xserver/randr/Imakefile index 2eff07fee..19f8143e4 100644 --- a/nx-X11/programs/Xserver/randr/Imakefile +++ b/nx-X11/programs/Xserver/randr/Imakefile @@ -21,9 +21,9 @@ XCOMM $XFree86: xc/programs/Xserver/randr/Imakefile,v 1.1 2001/05/23 03:29:44 ke OBJS = mirandr.o randr.o rrcrtc.o rrdispatch.o rrinfo.o rrmode.o rroutput.o rrpointer.o rrproperty.o rrscreen.o rrsdispatch.o rrxinerama.o - INCLUDES = -I../include -I../mi -I../../../include/fonts \ + INCLUDES = -I../include -I../mi \ -I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) -I../render + -I../render LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = -DNXAGENT_SERVER diff --git a/nx-X11/programs/Xserver/render/Imakefile b/nx-X11/programs/Xserver/render/Imakefile index 0d7ad152f..1331b1fb4 100644 --- a/nx-X11/programs/Xserver/render/Imakefile +++ b/nx-X11/programs/Xserver/render/Imakefile @@ -27,9 +27,9 @@ XCOMM $XFree86: xc/programs/Xserver/render/Imakefile,v 1.10 2002/11/23 02:38:15 render.o \ renderedge.o - INCLUDES = -I. -I../include -I../mi -I../../../include/fonts \ + INCLUDES = -I. -I../include -I../mi \ -I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) -I../Xext + -I../Xext LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln NormalLibraryTarget(render,$(OBJS)) diff --git a/nx-libs.spec b/nx-libs.spec index 2e6c5da4c..3e38173c3 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -27,35 +27,29 @@ BuildRequires: gpg-offline BuildRequires: fdupes %if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(expat) -BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(fontenc) -BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(xfont) %else BuildRequires: libexpat-devel -BuildRequires: fontconfig-devel -BuildRequires: freetype2-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel -BuildRequires: xorg-x11-libfontenc-devel BuildRequires: xorg-x11-libXpm-devel +BuildRequires: xorg-x11-libXfont-devel %endif BuildRequires: xorg-x11-util-devel %endif %if 0%{?fedora} || 0%{?rhel} BuildRequires: expat-devel -BuildRequires: fontconfig-devel -BuildRequires: freetype-devel -BuildRequires: libfontenc-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel +BuildRequires: libXfont-devel %endif # For imake @@ -680,7 +674,6 @@ find -type f -name '*.[hc]' | xargs chmod -x # Mesa - Used by the X server # Xcursor - Other code still references files in it -# Xfont - Statically linked to nxarget, others? # Xpm @@ -962,20 +955,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_includedir}/nx/X11/extensions/record.h %{_includedir}/nx/X11/extensions/xf86dga1.h %{_includedir}/nx/X11/extensions/xf86vmode.h -%dir %{_includedir}/nx/X11/fonts -%{_includedir}/nx/X11/fonts/bdfint.h -%{_includedir}/nx/X11/fonts/bitmap.h -%{_includedir}/nx/X11/fonts/bufio.h -%{_includedir}/nx/X11/fonts/fntfil.h -%{_includedir}/nx/X11/fonts/fntfilio.h -%{_includedir}/nx/X11/fonts/fntfilst.h -%{_includedir}/nx/X11/fonts/fontencc.h -%{_includedir}/nx/X11/fonts/fontmisc.h -%{_includedir}/nx/X11/fonts/fontmod.h -%{_includedir}/nx/X11/fonts/fontshow.h -%{_includedir}/nx/X11/fonts/fontutil.h -%{_includedir}/nx/X11/fonts/fontxlfd.h -%{_includedir}/nx/X11/fonts/pcf.h %{_includedir}/nx/X11/misc.h %{_includedir}/nx/X11/os.h @@ -1041,12 +1020,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %{_includedir}/nx/X11/extensions/xtraplib.h %{_includedir}/nx/X11/extensions/xtraplibp.h %{_includedir}/nx/X11/extensions/xtrapproto.h -%dir %{_includedir}/nx/X11/fonts -%{_includedir}/nx/X11/fonts/FS.h -%{_includedir}/nx/X11/fonts/FSproto.h -%{_includedir}/nx/X11/fonts/font.h -%{_includedir}/nx/X11/fonts/fontstruct.h -%{_includedir}/nx/X11/fonts/fsmasks.h %files -n nxagent %defattr(-,root,root) -- cgit v1.2.3 From 294d91223f75a70614a4b8f5e93ddfc7cd7565e5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 22 Apr 2015 22:39:14 +0200 Subject: debian/control: Typo fix (Meas -> Mesa). --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 9572f7ce7..e17a387e2 100644 --- a/debian/control +++ b/debian/control @@ -977,7 +977,7 @@ Architecture: any Depends: libnx-x11-dev (= ${binary:Version}), ${misc:Depends}, -Description: Library headers for nx-X11/Meas (dummy package) +Description: Library headers for nx-X11/Mesa (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -- cgit v1.2.3 From 49fc383a4107062a843bc0c3a8fd9cae7e20e032 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Apr 2015 18:07:53 +0200 Subject: library clean-up: Don't build libNX_Xdmcp anymore. Use system's libXdmcp shared library. --- debian/control | 39 +-- debian/libnx-x11-6.symbols | 8 +- debian/libnx-xdmcp-dev.install.in | 2 - debian/libnx-xdmcp6.install.in | 1 - debian/libnx-xdmcp6.symbols | 46 --- debian/rules | 1 - nx-X11/config/cf/README | 6 - nx-X11/config/cf/X11.tmpl | 30 -- nx-X11/lib/Imakefile | 7 +- nx-X11/lib/X11/Imakefile | 11 +- nx-X11/lib/Xdmcp/A8Eq.c | 50 ---- nx-X11/lib/Xdmcp/AA16.c | 51 ---- nx-X11/lib/Xdmcp/AA32.c | 51 ---- nx-X11/lib/Xdmcp/AA8.c | 51 ---- nx-X11/lib/Xdmcp/Alloc.c | 66 ----- nx-X11/lib/Xdmcp/AofA8.c | 51 ---- nx-X11/lib/Xdmcp/CA8.c | 49 ---- nx-X11/lib/Xdmcp/CmpKey.c | 49 ---- nx-X11/lib/Xdmcp/DA16.c | 46 --- nx-X11/lib/Xdmcp/DA32.c | 45 --- nx-X11/lib/Xdmcp/DA8.c | 45 --- nx-X11/lib/Xdmcp/DAofA8.c | 51 ---- nx-X11/lib/Xdmcp/DecKey.c | 49 ---- nx-X11/lib/Xdmcp/Fill.c | 102 ------- nx-X11/lib/Xdmcp/Flush.c | 83 ------ nx-X11/lib/Xdmcp/GenKey.c | 74 ----- nx-X11/lib/Xdmcp/Imakefile | 121 -------- nx-X11/lib/Xdmcp/IncKey.c | 49 ---- nx-X11/lib/Xdmcp/RA16.c | 72 ----- nx-X11/lib/Xdmcp/RA32.c | 72 ----- nx-X11/lib/Xdmcp/RA8.c | 72 ----- nx-X11/lib/Xdmcp/RAofA8.c | 75 ----- nx-X11/lib/Xdmcp/RC16.c | 52 ---- nx-X11/lib/Xdmcp/RC32.c | 56 ---- nx-X11/lib/Xdmcp/RC8.c | 47 --- nx-X11/lib/Xdmcp/RHead.c | 48 --- nx-X11/lib/Xdmcp/RR.c | 43 --- nx-X11/lib/Xdmcp/RaA16.c | 51 ---- nx-X11/lib/Xdmcp/RaA32.c | 51 ---- nx-X11/lib/Xdmcp/RaA8.c | 51 ---- nx-X11/lib/Xdmcp/RaAoA8.c | 51 ---- nx-X11/lib/Xdmcp/Unwrap.c | 95 ------ nx-X11/lib/Xdmcp/WA16.c | 51 ---- nx-X11/lib/Xdmcp/WA32.c | 51 ---- nx-X11/lib/Xdmcp/WA8.c | 51 ---- nx-X11/lib/Xdmcp/WAofA8.c | 51 ---- nx-X11/lib/Xdmcp/WC16.c | 50 ---- nx-X11/lib/Xdmcp/WC32.c | 53 ---- nx-X11/lib/Xdmcp/WC8.c | 49 ---- nx-X11/lib/Xdmcp/Whead.c | 64 ---- nx-X11/lib/Xdmcp/Wrap.c | 133 --------- nx-X11/lib/Xdmcp/Wrap.h | 19 -- nx-X11/lib/Xdmcp/Wraphelp.README.crypto | 64 ---- nx-X11/lib/Xdmcp/Wraphelp.c | 500 -------------------------------- nx-X11/lib/Xdmcp/Xdmcp.h | 190 ------------ nx-X11/programs/Xserver/Imakefile | 8 +- nx-libs.spec | 59 +--- 57 files changed, 28 insertions(+), 3435 deletions(-) delete mode 100644 debian/libnx-xdmcp-dev.install.in delete mode 100644 debian/libnx-xdmcp6.install.in delete mode 100644 debian/libnx-xdmcp6.symbols delete mode 100644 nx-X11/lib/Xdmcp/A8Eq.c delete mode 100644 nx-X11/lib/Xdmcp/AA16.c delete mode 100644 nx-X11/lib/Xdmcp/AA32.c delete mode 100644 nx-X11/lib/Xdmcp/AA8.c delete mode 100644 nx-X11/lib/Xdmcp/Alloc.c delete mode 100644 nx-X11/lib/Xdmcp/AofA8.c delete mode 100644 nx-X11/lib/Xdmcp/CA8.c delete mode 100644 nx-X11/lib/Xdmcp/CmpKey.c delete mode 100644 nx-X11/lib/Xdmcp/DA16.c delete mode 100644 nx-X11/lib/Xdmcp/DA32.c delete mode 100644 nx-X11/lib/Xdmcp/DA8.c delete mode 100644 nx-X11/lib/Xdmcp/DAofA8.c delete mode 100644 nx-X11/lib/Xdmcp/DecKey.c delete mode 100644 nx-X11/lib/Xdmcp/Fill.c delete mode 100644 nx-X11/lib/Xdmcp/Flush.c delete mode 100644 nx-X11/lib/Xdmcp/GenKey.c delete mode 100644 nx-X11/lib/Xdmcp/Imakefile delete mode 100644 nx-X11/lib/Xdmcp/IncKey.c delete mode 100644 nx-X11/lib/Xdmcp/RA16.c delete mode 100644 nx-X11/lib/Xdmcp/RA32.c delete mode 100644 nx-X11/lib/Xdmcp/RA8.c delete mode 100644 nx-X11/lib/Xdmcp/RAofA8.c delete mode 100644 nx-X11/lib/Xdmcp/RC16.c delete mode 100644 nx-X11/lib/Xdmcp/RC32.c delete mode 100644 nx-X11/lib/Xdmcp/RC8.c delete mode 100644 nx-X11/lib/Xdmcp/RHead.c delete mode 100644 nx-X11/lib/Xdmcp/RR.c delete mode 100644 nx-X11/lib/Xdmcp/RaA16.c delete mode 100644 nx-X11/lib/Xdmcp/RaA32.c delete mode 100644 nx-X11/lib/Xdmcp/RaA8.c delete mode 100644 nx-X11/lib/Xdmcp/RaAoA8.c delete mode 100644 nx-X11/lib/Xdmcp/Unwrap.c delete mode 100644 nx-X11/lib/Xdmcp/WA16.c delete mode 100644 nx-X11/lib/Xdmcp/WA32.c delete mode 100644 nx-X11/lib/Xdmcp/WA8.c delete mode 100644 nx-X11/lib/Xdmcp/WAofA8.c delete mode 100644 nx-X11/lib/Xdmcp/WC16.c delete mode 100644 nx-X11/lib/Xdmcp/WC32.c delete mode 100644 nx-X11/lib/Xdmcp/WC8.c delete mode 100644 nx-X11/lib/Xdmcp/Whead.c delete mode 100644 nx-X11/lib/Xdmcp/Wrap.c delete mode 100644 nx-X11/lib/Xdmcp/Wrap.h delete mode 100644 nx-X11/lib/Xdmcp/Wraphelp.README.crypto delete mode 100644 nx-X11/lib/Xdmcp/Wraphelp.c delete mode 100644 nx-X11/lib/Xdmcp/Xdmcp.h (limited to 'debian') diff --git a/debian/control b/debian/control index e17a387e2..4e4918999 100644 --- a/debian/control +++ b/debian/control @@ -16,6 +16,7 @@ Build-Depends: libxml2-dev, libxpm-dev, libxfont-dev, + libxdmcp-dev, autoconf, pkg-config, x11proto-core-dev, @@ -367,19 +368,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Display Manager Control Protocol library +Description: nx-X11 Display Manager Control Protocol library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - nx-X11 Display Manager Control Protocol library + This package removes the obsoleted libNX_Xdmcp.so.6 library. With + recent versions of NX, the system-wide installed libXdmcp gets used. . - This package provides the main interface to the nx-X11 display manager control - protocol library, which allows for remote logins to display managers. + This package can be safely removed. Package: libnx-xdmcp-dev Provides: libnx-xdmcp6-dev @@ -387,21 +385,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xdmcp6 (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Display Manager Control Protocol library (development headers) +Description: nx-X11 Display Manager Control Protocol library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - nx-X11 Display Manager Control Protocol library - . - This package provides the main interface to the nx-X11 display manager control - protocol library, which allows for remote logins to display managers. + This package removes the obsoleted headers for the libNX_Xdmcp.so.6 + library. With recent versions of NX, the system-wide installed libXdmcp + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: libnx-xdmcp6-dbg Architecture: any @@ -409,21 +403,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xdmcp6 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Display Manager Control Protocol library (debug package) +Description: nx-X11 Display Manager Control Protocol library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - nx-X11 Display Manager Control Protocol library - . - This package provides the main interface to the nx-X11 display manager control - protocol library, which allows for remote logins to display managers. + This package removes the obsoleted debug symbols for the libNX_Xdmcp.so.6 + library. With recent versions of NX, the system-wide installed libXdmcp + gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xext6 Architecture: any diff --git a/debian/libnx-x11-6.symbols b/debian/libnx-x11-6.symbols index 4b7ceacbe..b9ab97120 100644 --- a/debian/libnx-x11-6.symbols +++ b/debian/libnx-x11-6.symbols @@ -547,7 +547,7 @@ libNX_X11.so.6 libnx-x11-6 #MINVER# XcmsTekHVCWhiteShiftColors@Base 3.5.0.29 XcmsUNDEFINEDColorSpace@Base 3.5.0.29 XcmsVisualOfCCC@Base 3.5.0.29 - XdmcpWrap@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0~build1# XdmcpWrap@Base 3.5.0.29 XkbAddDeviceLedInfo@Base 3.5.0.29 XkbAddGeomColor@Base 3.5.0.29 XkbAddGeomDoodad@Base 3.5.0.29 @@ -956,9 +956,9 @@ libNX_X11.so.6 libnx-x11-6 #MINVER# _XcmsTekHVC_prefix@Base 3.5.0.29 _XcmsUnresolveColor@Base 3.5.0.29 _Xdebug@Base 3.5.0.29 - _XdmcpAuthDoIt@Base 3.5.0.29 - _XdmcpAuthSetup@Base 3.5.0.29 - _XdmcpWrapperToOddParity@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0~build1# _XdmcpAuthDoIt@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0~build1# _XdmcpAuthSetup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0~build1# _XdmcpWrapperToOddParity@Base 3.5.0.29 _Xevent_to_mask@Base 3.5.0.29 _Xglobal_lock@Base 3.5.0.29 _Xi18n_lock@Base 3.5.0.29 diff --git a/debian/libnx-xdmcp-dev.install.in b/debian/libnx-xdmcp-dev.install.in deleted file mode 100644 index 2c2457b10..000000000 --- a/debian/libnx-xdmcp-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xdmcp.so -usr/include/*/nx/X11/Xdmcp.h diff --git a/debian/libnx-xdmcp6.install.in b/debian/libnx-xdmcp6.install.in deleted file mode 100644 index 69100139e..000000000 --- a/debian/libnx-xdmcp6.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xdmcp.so.* diff --git a/debian/libnx-xdmcp6.symbols b/debian/libnx-xdmcp6.symbols deleted file mode 100644 index 49645d63a..000000000 --- a/debian/libnx-xdmcp6.symbols +++ /dev/null @@ -1,46 +0,0 @@ -libNX_Xdmcp.so.6 libnx-xdmcp6 #MINVER# - Xalloc@Base 3.5.0.29 - XdmcpARRAY8Equal@Base 3.5.0.29 - XdmcpAllocARRAY16@Base 3.5.0.29 - XdmcpAllocARRAY32@Base 3.5.0.29 - XdmcpAllocARRAY8@Base 3.5.0.29 - XdmcpAllocARRAYofARRAY8@Base 3.5.0.29 - XdmcpCompareKeys@Base 3.5.0.29 - XdmcpCopyARRAY8@Base 3.5.0.29 - XdmcpDecrementKey@Base 3.5.0.29 - XdmcpDisposeARRAY16@Base 3.5.0.29 - XdmcpDisposeARRAY32@Base 3.5.0.29 - XdmcpDisposeARRAY8@Base 3.5.0.29 - XdmcpDisposeARRAYofARRAY8@Base 3.5.0.29 - XdmcpFill@Base 3.5.0.29 - XdmcpFlush@Base 3.5.0.29 - XdmcpGenerateKey@Base 3.5.0.29 - XdmcpIncrementKey@Base 3.5.0.29 - XdmcpReadARRAY16@Base 3.5.0.29 - XdmcpReadARRAY32@Base 3.5.0.29 - XdmcpReadARRAY8@Base 3.5.0.29 - XdmcpReadARRAYofARRAY8@Base 3.5.0.29 - XdmcpReadCARD16@Base 3.5.0.29 - XdmcpReadCARD32@Base 3.5.0.29 - XdmcpReadCARD8@Base 3.5.0.29 - XdmcpReadHeader@Base 3.5.0.29 - XdmcpReadRemaining@Base 3.5.0.29 - XdmcpReallocARRAY16@Base 3.5.0.29 - XdmcpReallocARRAY32@Base 3.5.0.29 - XdmcpReallocARRAY8@Base 3.5.0.29 - XdmcpReallocARRAYofARRAY8@Base 3.5.0.29 - XdmcpUnwrap@Base 3.5.0.29 - XdmcpWrap@Base 3.5.0.29 - XdmcpWriteARRAY16@Base 3.5.0.29 - XdmcpWriteARRAY32@Base 3.5.0.29 - XdmcpWriteARRAY8@Base 3.5.0.29 - XdmcpWriteARRAYofARRAY8@Base 3.5.0.29 - XdmcpWriteCARD16@Base 3.5.0.29 - XdmcpWriteCARD32@Base 3.5.0.29 - XdmcpWriteCARD8@Base 3.5.0.29 - XdmcpWriteHeader@Base 3.5.0.29 - Xfree@Base 3.5.0.29 - Xrealloc@Base 3.5.0.29 - _XdmcpAuthDoIt@Base 3.5.0.29 - _XdmcpAuthSetup@Base 3.5.0.29 - _XdmcpWrapperToOddParity@Base 3.5.0.29 diff --git a/debian/rules b/debian/rules index 6d076a1c4..dd4f1c7c2 100755 --- a/debian/rules +++ b/debian/rules @@ -83,7 +83,6 @@ override_dh_strip: dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg dh_strip -plibnx-xcomposite1 --dbg-package=libnx-xcomposite1-dbg dh_strip -plibnx-xdamage1 --dbg-package=libnx-xdamage1-dbg - dh_strip -plibnx-xdmcp6 --dbg-package=libnx-xdmcp6-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 80113a9e3..323b6bc5e 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -204,7 +204,6 @@ X11.tmpl provides defaults for the following variables: DebugLibX11 build libX11_d.a DebugLibXau build libXau_d.a DebugLibXaw build libXaw_d.a - DebugLibXdmcp build libXdmcp_d.a DebugLibXext build libXext_d.a DebugLibXi build libXi_d.a DebugLibXmu build libXmu_d.a @@ -253,7 +252,6 @@ X11.tmpl provides defaults for the following variables: NormalLibX11 build libX11.a NormalLibXau build libXau.a NormalLibXaw build libXaw.a - NormalLibXdmcp build libXdmcp.a NormalLibXext build libXext.a NormalLibXi build libXi.a NormalLibXmu build libXmu.a @@ -269,7 +267,6 @@ X11.tmpl provides defaults for the following variables: ProfileLibX11 build libX11_p.a ProfileLibXau build libXau_p.a ProfileLibXaw build libXaw_p.a - ProfileLibXdmcp build libXdmcp_p.a ProfileLibXext build libXext_p.a ProfileLibXi build libXi_p.a ProfileLibXmu build libXmu_p.a @@ -291,7 +288,6 @@ X11.tmpl provides defaults for the following variables: SharedLibX11 boolean for making sharable libX11.so SharedLibXau boolean for making sharable libXau.so SharedLibXaw boolean for making sharable libXaw.so - SharedLibXdmcp boolean for making sharable libXdmcp.so SharedLibXext boolean for making sharable libXext.so SharedLibXi boolean for making sharable libXi.so SharedLibXmu boolean for making sharable libXmu.so @@ -384,8 +380,6 @@ An Lib.tmpl file provides defaults for the following variables: SharedXauRev version number for libXau.so SharedXawReqs required libs for libXaw.so SharedXawRev version number for libXaw.so - SharedXdmcpReqs required libs for libXdmcp.so - SharedXdmcpRev version number for libXdmcp.so SharedXextReqs required libs for libXext.so SharedXextRev version number for libXext.so SharedXiReqs required libs for libXi.so diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 30b04510b..f89873d01 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -171,10 +171,6 @@ XORGRELSTRING = XorgManVersionString #define BuildXauLib (BuildLibraries || BuildLibrariesForXServers) #endif #define UseInstalledXauLib (defined(UseInstalled) || !BuildXauLib) -#ifndef BuildXdmcpLib -#define BuildXdmcpLib (BuildLibraries || BuildLibrariesForXServers) -#endif -#define UseInstalledXdmcpLib (defined(UseInstalled) || !BuildXdmcpLib) #ifndef BuildMITMiscExt #define BuildMITMiscExt YES #endif @@ -2442,32 +2438,6 @@ ProjectUnsharedLibReferences(XAUTH,NX_Xau,$(XAUTHSRC),$(USRLIBDIR)) #endif #endif -#ifndef SharedLibXdmcp -#define SharedLibXdmcp YES -#endif -#ifndef NormalLibXdmcp -#define NormalLibXdmcp (!SharedLibXdmcp | ForceNormalLib) -#endif -#ifndef DebugLibXdmcp -#define DebugLibXdmcp NO /* debugged XDMCP library */ -#endif -#ifndef ProfileLibXdmcp -#define ProfileLibXdmcp NO /* profiled XDMCP library */ -#endif - XDMCPLIBSRC = $(LIBSRC)/Xdmcp -#if SharedLibXdmcp -#ifndef SharedXdmcpRev -#define SharedXdmcpRev 6.0 -#endif -SharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev) -#else -#if !UseInstalledXdmcpLib -ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),XBuildLibDir) -#else -ProjectUnsharedLibReferences(XDMCP,NX_Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR)) -#endif -#endif - #ifndef SharedLibXmu #define SharedLibXmu HasSharedLibraries #endif diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 2c7f17472..28d9f1296 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -165,10 +165,6 @@ XALIBDIR = Xa XAULIBDIR = Xau #endif -#if BuildXdmcpLib -XDMCPLIBDIR = Xdmcp -#endif - #if BuildX11Lib X11LIBDIR = X11 #endif @@ -183,7 +179,7 @@ XTSTLIBDIR = Xtst #endif -LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \ +LINTSUBDIRS = $(XAULIBDIR) $(X11LIBDIR) \ $(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \ $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ $(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \ @@ -204,4 +200,3 @@ MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(LINTSUBDIRS)) MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) - diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 4e781f59c..e00351169 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -120,8 +120,6 @@ EXTRA_LIBRARIES = /**/ #endif #if HasXdmAuth XDMAUTHDEFS = -DHASXDMAUTH - XDMAUTHOBJS = Wrap.o Wraphelp.o - XDMAUTHSRCS = Wrap.c Wraphelp.c #endif #if BuildXKBlib XKB_DEFINES = -DXKB @@ -593,7 +591,7 @@ SRCS2 = \ Withdraw.c \ WMGeom.c \ WMProps.c \ - $(AUTHSRCS) $(XDMAUTHSRCS) $(K5SRCS) $(THRSTUBSRCS) + $(AUTHSRCS) $(K5SRCS) $(THRSTUBSRCS) OBJS2 = \ Macros.o \ @@ -716,7 +714,6 @@ OBJS2 = \ WMGeom.o \ WMProps.o \ $(AUTHOBJS) \ - $(XDMAUTHOBJS) \ $(K5OBJS) \ $(THRSTUBOBJS) @@ -1069,7 +1066,6 @@ LinkFile(x11trans.c,$(TRANSCOMMSRC)/transport.c) SpecialCLibObjectRule(ximtrans,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES) $(XTRANS_XIM_DEFINES) $(POLL_DEFINES)) LinkFile(ximtrans.c,$(TRANSCOMMSRC)/transport.c) SpecialCLibObjectRule(OpenDis,$(ICONFIGFILES),$(BC_DEFINES) $(OPEN_DEFINES) $(XTRANS_X_DEFINES) $(XKB_DEFINES)) -SpecialCLibObjectRule(Wrap,$(ICONFIGFILES),$(XDMAUTHDEFS)) SpecialCLibObjectRule(XlibInt,$(ICONFIGFILES),$(CONN_DEFINES) $(POLL_DEFINES) $(XTRANS_X_DEFINES)) SpecialCLibObjectRule(Font,$(ICONFIGFILES),$(SHM_DEFINES) $(XF86BIGFONT_DEFINES)) SpecialCLibObjectRule(FontInfo,$(ICONFIGFILES),$(SHM_DEFINES) $(XF86BIGFONT_DEFINES)) @@ -1116,11 +1112,6 @@ LinkSourceFile(AuRead.c,$(XAUTHSRC)) #if HasKrb5 LinkSourceFile(k5encode.c,$(XAUTHSRC)) #endif -#if HasXdmAuth -LinkSourceFile(Wrap.h,$(XDMCPLIBSRC)) -LinkSourceFile(Wrap.c,$(XDMCPLIBSRC)) -LinkSourceFile(Wraphelp.c,$(XDMCPLIBSRC)) -#endif #ifdef QNX4Architecture LOCAL_LDFLAGS=-F diff --git a/nx-X11/lib/Xdmcp/A8Eq.c b/nx-X11/lib/Xdmcp/A8Eq.c deleted file mode 100644 index b98658017..000000000 --- a/nx-X11/lib/Xdmcp/A8Eq.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Xorg: A8Eq.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpARRAY8Equal (array1, array2) - ARRAY8Ptr array1, array2; -{ - int i; - - if (array1->length != array2->length) - return FALSE; - for (i = 0; i < (int)array1->length; i++) - if (array1->data[i] != array2->data[i]) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/AA16.c b/nx-X11/lib/Xdmcp/AA16.c deleted file mode 100644 index 5de5cafee..000000000 --- a/nx-X11/lib/Xdmcp/AA16.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: AA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/AA16.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpAllocARRAY16 (ARRAY16Ptr array, int length) -{ - CARD16Ptr newData; - - newData = (CARD16Ptr) Xalloc (length * sizeof (CARD16)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/AA32.c b/nx-X11/lib/Xdmcp/AA32.c deleted file mode 100644 index fbeded1f9..000000000 --- a/nx-X11/lib/Xdmcp/AA32.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: AA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/AA32.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpAllocARRAY32 (ARRAY32Ptr array, int length) -{ - CARD32Ptr newData; - - newData = (CARD32Ptr) Xalloc (length * sizeof (CARD32)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/AA8.c b/nx-X11/lib/Xdmcp/AA8.c deleted file mode 100644 index 391e78874..000000000 --- a/nx-X11/lib/Xdmcp/AA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: AA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/AA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpAllocARRAY8 (ARRAY8Ptr array, int length) -{ - CARD8Ptr newData; - - newData = (CARD8Ptr) Xalloc (length * sizeof (CARD8)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/Alloc.c b/nx-X11/lib/Xdmcp/Alloc.c deleted file mode 100644 index 40cbacf0b..000000000 --- a/nx-X11/lib/Xdmcp/Alloc.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Xorg: Alloc.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Alloc.c,v 3.4 2001/07/25 15:04:50 dawes Exp $ */ - -/* stubs for use when Xalloc, Xrealloc and Xfree are not defined */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -void * -Xalloc (unsigned long amount) -{ - if (amount == 0) - amount = 1; - return malloc (amount); -} - -void * -Xrealloc (void *old, unsigned long amount) -{ - if (amount == 0) - amount = 1; - if (!old) - return malloc (amount); - return realloc ((char *) old, amount); -} - -void -Xfree (void *old) -{ - if (old) - free ((char *) old); -} diff --git a/nx-X11/lib/Xdmcp/AofA8.c b/nx-X11/lib/Xdmcp/AofA8.c deleted file mode 100644 index fe773300d..000000000 --- a/nx-X11/lib/Xdmcp/AofA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: AofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/AofA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length) -{ - ARRAY8Ptr newData; - - newData = (ARRAY8Ptr) Xalloc (length * sizeof (ARRAY8)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/CA8.c b/nx-X11/lib/Xdmcp/CA8.c deleted file mode 100644 index efdd5a17b..000000000 --- a/nx-X11/lib/Xdmcp/CA8.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Xorg: CA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -int -XdmcpCopyARRAY8 (src, dst) - ARRAY8Ptr src, dst; -{ - dst->length = src->length; - dst->data = (CARD8 *) Xalloc (dst->length * sizeof (CARD8)); - if (!dst->data) - return FALSE; - memmove (dst->data, src->data, src->length * sizeof (CARD8)); - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/CmpKey.c b/nx-X11/lib/Xdmcp/CmpKey.c deleted file mode 100644 index 112bc2006..000000000 --- a/nx-X11/lib/Xdmcp/CmpKey.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Xorg: CmpKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/CmpKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpCompareKeys (XdmAuthKeyPtr a, XdmAuthKeyPtr b) -{ - int i; - - for (i = 0; i < 8; i++) - if (a->data[i] != b->data[i]) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/DA16.c b/nx-X11/lib/Xdmcp/DA16.c deleted file mode 100644 index 021accee5..000000000 --- a/nx-X11/lib/Xdmcp/DA16.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Xorg: DA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/DA16.c,v 1.5 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpDisposeARRAY16 (ARRAY16Ptr array) -{ - if (array->data != NULL) Xfree (array->data); - array->length = 0; - array->data = NULL; -} diff --git a/nx-X11/lib/Xdmcp/DA32.c b/nx-X11/lib/Xdmcp/DA32.c deleted file mode 100644 index 9d9620b81..000000000 --- a/nx-X11/lib/Xdmcp/DA32.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Xorg: DA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpDisposeARRAY32 (array) - ARRAY32Ptr array; -{ - if (array->data != NULL) Xfree (array->data); - array->length = 0; - array->data = NULL; -} diff --git a/nx-X11/lib/Xdmcp/DA8.c b/nx-X11/lib/Xdmcp/DA8.c deleted file mode 100644 index 9c206904d..000000000 --- a/nx-X11/lib/Xdmcp/DA8.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Xorg: DA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpDisposeARRAY8 (array) - ARRAY8Ptr array; -{ - if (array->data != NULL) Xfree (array->data); - array->length = 0; - array->data = NULL; -} diff --git a/nx-X11/lib/Xdmcp/DAofA8.c b/nx-X11/lib/Xdmcp/DAofA8.c deleted file mode 100644 index 73a2e9c75..000000000 --- a/nx-X11/lib/Xdmcp/DAofA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $Xdotorg: $ - * $Xorg: DAofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpDisposeARRAYofARRAY8 (array) - ARRAYofARRAY8Ptr array; -{ - int i; - - if (array->data != NULL) { - for (i = 0; i < (int)array->length; i++) - XdmcpDisposeARRAY8 (&array->data[i]); - Xfree (array->data); - } - array->length = 0; - array->data = NULL; -} diff --git a/nx-X11/lib/Xdmcp/DecKey.c b/nx-X11/lib/Xdmcp/DecKey.c deleted file mode 100644 index fe08cc33f..000000000 --- a/nx-X11/lib/Xdmcp/DecKey.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Xorg: DecKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/DecKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpDecrementKey (XdmAuthKeyPtr key) -{ - int i; - - i = 7; - while (key->data[i]-- == 0) - if (--i < 0) - break; -} diff --git a/nx-X11/lib/Xdmcp/Fill.c b/nx-X11/lib/Xdmcp/Fill.c deleted file mode 100644 index 08f6b350a..000000000 --- a/nx-X11/lib/Xdmcp/Fill.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * $Xorg: Fill.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Fill.c,v 3.8 2001/07/23 13:15:42 dawes Exp $ */ - -#ifdef WIN32 -#define _WILLWINSOCK_ -#endif -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -#ifdef STREAMSCONN -#include -#else -#ifdef WIN32 -#include -#else -#ifndef Lynx -#include -#else -#include -#endif /* !Lynx */ -#endif -#endif - -int -XdmcpFill (fd, buffer, from, fromlen) - int fd; - XdmcpBufferPtr buffer; - XdmcpNetaddr from; /* return */ - int *fromlen; /* return */ -{ - BYTE *newBuf; -#ifdef STREAMSCONN - struct t_unitdata dataunit; - int gotallflag, result; -#endif - - if (buffer->size < XDM_MAX_MSGLEN) - { - newBuf = (BYTE *) Xalloc (XDM_MAX_MSGLEN); - if (newBuf) - { - Xfree (buffer->data); - buffer->data = newBuf; - buffer->size = XDM_MAX_MSGLEN; - } - } - buffer->pointer = 0; -#ifdef STREAMSCONN - dataunit.addr.buf = from; - dataunit.addr.maxlen = *fromlen; - dataunit.opt.maxlen = 0; /* don't care to know about options */ - dataunit.udata.buf = (char *)buffer->data; - dataunit.udata.maxlen = buffer->size; - result = t_rcvudata (fd, &dataunit, &gotallflag); - if (result < 0) { - return FALSE; - } - buffer->count = dataunit.udata.len; - *fromlen = dataunit.addr.len; -#else - buffer->count = recvfrom (fd, (char*)buffer->data, buffer->size, 0, - (struct sockaddr *)from, (void *)fromlen); -#endif - if (buffer->count < 6) { - buffer->count = 0; - return FALSE; - } - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/Flush.c b/nx-X11/lib/Xdmcp/Flush.c deleted file mode 100644 index d04cdb378..000000000 --- a/nx-X11/lib/Xdmcp/Flush.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * $Xorg: Flush.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.7 2001/07/23 13:15:42 dawes Exp $ */ - -#ifdef WIN32 -#define _WILLWINSOCK_ -#endif -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -#ifdef STREAMSCONN -#include -#else -#ifdef WIN32 -#include -#else -#ifndef Lynx -#include -#else -#include -#endif /* !Lynx */ -#endif -#endif - -int -XdmcpFlush (fd, buffer, to, tolen) - int fd; - XdmcpBufferPtr buffer; - XdmcpNetaddr to; - int tolen; -{ - int result; -#ifdef STREAMSCONN - struct t_unitdata dataunit; - - dataunit.addr.buf = to; - dataunit.addr.len = tolen; - dataunit.opt.len = 0; /* default options */ - dataunit.udata.buf = (char *)buffer->data; - dataunit.udata.len = buffer->pointer; - result = t_sndudata(fd, &dataunit); - if (result < 0) - return FALSE; -#else - result = sendto (fd, (char *)buffer->data, buffer->pointer, 0, - (struct sockaddr *)to, tolen); - if (result != buffer->pointer) - return FALSE; -#endif - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/GenKey.c b/nx-X11/lib/Xdmcp/GenKey.c deleted file mode 100644 index 0d702560e..000000000 --- a/nx-X11/lib/Xdmcp/GenKey.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * $Xorg: GenKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/GenKey.c,v 3.7 2001/07/25 15:04:50 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -static void -getbits (long data, unsigned char *dst) -{ - dst[0] = (data ) & 0xff; - dst[1] = (data >> 8) & 0xff; - dst[2] = (data >> 16) & 0xff; - dst[3] = (data >> 24) & 0xff; -} - -#define Time_t time_t - -#include - -#if defined(SYSV) || defined(SVR4) -#define srandom srand48 -#define random lrand48 -#endif -#ifdef WIN32 -#include -#define srandom srand -#define random rand -#define getpid(x) _getpid(x) -#endif - -void -XdmcpGenerateKey (XdmAuthKeyPtr key) -{ - long lowbits, highbits; - - srandom ((int)getpid() ^ time((Time_t *)0)); - lowbits = random (); - highbits = random (); - getbits (lowbits, key->data); - getbits (highbits, key->data + 4); -} diff --git a/nx-X11/lib/Xdmcp/Imakefile b/nx-X11/lib/Xdmcp/Imakefile deleted file mode 100644 index 1fc7b6de3..000000000 --- a/nx-X11/lib/Xdmcp/Imakefile +++ /dev/null @@ -1,121 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ -XCOMM $XdotOrg: xc/lib/Xdmcp/Imakefile,v 1.3 2005/09/22 23:54:18 alanc Exp $ - - - -XCOMM $XFree86: xc/lib/Xdmcp/Imakefile,v 3.4 1999/04/17 09:08:12 dawes Exp $ - -#define DoNormalLib NormalLibXdmcp -#define DoSharedLib SharedLibXdmcp -#define DoExtraLib SharedLibXdmcp -#define DoDebugLib DebugLibXdmcp -#define DoProfileLib ProfileLibXdmcp -#define LibName NX_Xdmcp -#define SoRev SOXDMCPREV -#define IncSubdir X11 - -#ifdef SharedXdmcpReqs -REQUIREDLIBS = SharedXdmcpReqs -#endif - -#if HasXdmAuth -AUTHDEFS = -DHASXDMAUTH -AUTHSRCS = Wrap.c Unwrap.c Wraphelp.c -AUTHOBJS = Wrap.o Unwrap.o Wraphelp.o -#endif - -DEFINES = $(AUTHDEFS) - -HEADERS = Xdmcp.h - -SRCS = \ - A8Eq.c \ - AA8.c \ - AA16.c \ - AA32.c \ - AofA8.c \ - CA8.c \ - DA8.c \ - DA16.c \ - DA32.c \ - DAofA8.c \ - Fill.c \ - Flush.c \ - RA8.c \ - RA16.c \ - RA32.c \ - RAofA8.c \ - RC8.c \ - RC16.c \ - RC32.c \ - RHead.c \ - RR.c \ - RaA8.c \ - RaA16.c \ - RaA32.c \ - RaAoA8.c \ - WA8.c \ - WA16.c \ - WA32.c \ - WAofA8.c \ - WC8.c \ - WC16.c \ - WC32.c \ - Whead.c \ - Alloc.c \ - CmpKey.c \ - DecKey.c \ - GenKey.c \ - IncKey.c \ - $(AUTHSRCS) - -OBJS = \ - A8Eq.o \ - AA8.o \ - AA16.o \ - AA32.o \ - AofA8.o \ - CA8.o \ - DA8.o \ - DA16.o \ - DA32.o \ - DAofA8.o \ - Fill.o \ - Flush.o \ - RA8.o \ - RA16.o \ - RA32.o \ - RAofA8.o \ - RC8.o \ - RC16.o \ - RC32.o \ - RHead.o \ - RR.o \ - RaA8.o \ - RaA16.o \ - RaA32.o \ - RaAoA8.o \ - WA8.o \ - WA16.o \ - WA32.o \ - WAofA8.o \ - WC8.o \ - WC16.o \ - WC32.o \ - Whead.o \ - Alloc.o \ - CmpKey.o \ - DecKey.o \ - GenKey.o \ - IncKey.o \ - $(AUTHOBJS) - -#include - -#ifdef WraphelpSourceRule -WraphelpSourceRule() -#endif -SpecialCLibObjectRule(Fill,$(ICONFIGFILES),$(CONNECTION_FLAGS)) -SpecialCLibObjectRule(Flush,$(ICONFIGFILES),$(CONNECTION_FLAGS)) - -DependTarget() diff --git a/nx-X11/lib/Xdmcp/IncKey.c b/nx-X11/lib/Xdmcp/IncKey.c deleted file mode 100644 index 292413a49..000000000 --- a/nx-X11/lib/Xdmcp/IncKey.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Xorg: IncKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/IncKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -void -XdmcpIncrementKey (XdmAuthKeyPtr key) -{ - int i; - - i = 7; - while (++key->data[i] == 0) - if (--i < 0) - break; -} diff --git a/nx-X11/lib/Xdmcp/RA16.c b/nx-X11/lib/Xdmcp/RA16.c deleted file mode 100644 index cdaaa226c..000000000 --- a/nx-X11/lib/Xdmcp/RA16.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Xorg: RA16.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadARRAY16 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY16Ptr array; -{ - int i; - - if (!XdmcpReadCARD8 (buffer, &array->length)) { - - /* Must set array->data to NULL to guarantee safe call of - * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); - * see defect 7329 */ - array->data = 0; - return FALSE; - } - if (!array->length) - { - array->data = NULL; - return TRUE; - } - array->data = (CARD16 *) Xalloc (array->length * sizeof (CARD16)); - if (!array->data) - return FALSE; - for (i = 0; i < (int)array->length; i++) - { - if (!XdmcpReadCARD16 (buffer, &array->data[i])) - { - Xfree (array->data); - array->data = NULL; - array->length = 0; - return FALSE; - } - } - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RA32.c b/nx-X11/lib/Xdmcp/RA32.c deleted file mode 100644 index 09f72da48..000000000 --- a/nx-X11/lib/Xdmcp/RA32.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Xorg: RA32.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadARRAY32 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY32Ptr array; -{ - int i; - - if (!XdmcpReadCARD8 (buffer, &array->length)) { - - /* Must set array->data to NULL to guarantee safe call of - * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); - * see defect 7329 */ - array->data = 0; - return FALSE; - } - if (!array->length) - { - array->data = NULL; - return TRUE; - } - array->data = (CARD32 *) Xalloc (array->length * sizeof (CARD32)); - if (!array->data) - return FALSE; - for (i = 0; i < (int)array->length; i++) - { - if (!XdmcpReadCARD32 (buffer, &array->data[i])) - { - Xfree (array->data); - array->data = NULL; - array->length = 0; - return FALSE; - } - } - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RA8.c b/nx-X11/lib/Xdmcp/RA8.c deleted file mode 100644 index eee3c6b3b..000000000 --- a/nx-X11/lib/Xdmcp/RA8.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Xorg: RA8.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadARRAY8 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY8Ptr array; -{ - int i; - - if (!XdmcpReadCARD16 (buffer, &array->length)) { - - /* Must set array->data to NULL to guarantee safe call of - * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); - * see defect 7329 */ - array->data = 0; - return FALSE; - } - if (!array->length) - { - array->data = NULL; - return TRUE; - } - array->data = (CARD8 *) Xalloc (array->length * sizeof (CARD8)); - if (!array->data) - return FALSE; - for (i = 0; i < (int)array->length; i++) - { - if (!XdmcpReadCARD8 (buffer, &array->data[i])) - { - Xfree (array->data); - array->data = NULL; - array->length = 0; - return FALSE; - } - } - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RAofA8.c b/nx-X11/lib/Xdmcp/RAofA8.c deleted file mode 100644 index 568236c61..000000000 --- a/nx-X11/lib/Xdmcp/RAofA8.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * $Xorg: RAofA8.c,v 1.6 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadARRAYofARRAY8 (buffer, array) - XdmcpBufferPtr buffer; - ARRAYofARRAY8Ptr array; -{ - int i; - - if (!XdmcpReadCARD8 (buffer, &array->length)) { - - /* Must set array->data to NULL to guarantee safe call of - * XdmcpDisposeARRAY*(array) (which calls Xfree(array->data)); - * see defect 7329 */ - array->data = 0; - return FALSE; - } - if (!array->length) - { - array->data = NULL; - return TRUE; - } - array->data = (ARRAY8 *) Xalloc (array->length * sizeof (ARRAY8)); - if (!array->data) - return FALSE; - for (i = 0; i < (int)array->length; i++) - { - if (!XdmcpReadARRAY8 (buffer, &array->data[i])) - { - - /* All arrays allocated thus far in the loop must be freed - * if there is an error in the read. - * See Defect 7328 */ - array->length = i; - XdmcpDisposeARRAYofARRAY8(array); - return FALSE; - } - } - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RC16.c b/nx-X11/lib/Xdmcp/RC16.c deleted file mode 100644 index 1af69a663..000000000 --- a/nx-X11/lib/Xdmcp/RC16.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $Xorg: RC16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadCARD16 (buffer, valuep) - XdmcpBufferPtr buffer; - CARD16Ptr valuep; -{ - CARD8 high, low; - - if (XdmcpReadCARD8 (buffer, &high) && - XdmcpReadCARD8 (buffer, &low)) - { - *valuep = (((CARD16) high) << 8) | ((CARD16) low); - return TRUE; - } - return FALSE; -} diff --git a/nx-X11/lib/Xdmcp/RC32.c b/nx-X11/lib/Xdmcp/RC32.c deleted file mode 100644 index caf19e643..000000000 --- a/nx-X11/lib/Xdmcp/RC32.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Xorg: RC32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadCARD32 (buffer, valuep) - XdmcpBufferPtr buffer; - CARD32Ptr valuep; -{ - CARD8 byte0, byte1, byte2, byte3; - if (XdmcpReadCARD8 (buffer, &byte0) && - XdmcpReadCARD8 (buffer, &byte1) && - XdmcpReadCARD8 (buffer, &byte2) && - XdmcpReadCARD8 (buffer, &byte3)) - { - *valuep = (((CARD32) byte0) << 24) | - (((CARD32) byte1) << 16) | - (((CARD32) byte2) << 8) | - (((CARD32) byte3)); - return TRUE; - } - return FALSE; -} diff --git a/nx-X11/lib/Xdmcp/RC8.c b/nx-X11/lib/Xdmcp/RC8.c deleted file mode 100644 index a9cd068a9..000000000 --- a/nx-X11/lib/Xdmcp/RC8.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Xorg: RC8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadCARD8 (buffer, valuep) - XdmcpBufferPtr buffer; - CARD8Ptr valuep; -{ - if (buffer->pointer >= buffer->count) - return FALSE; - *valuep = (CARD8) buffer->data[buffer->pointer++]; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RHead.c b/nx-X11/lib/Xdmcp/RHead.c deleted file mode 100644 index 6b0b837bd..000000000 --- a/nx-X11/lib/Xdmcp/RHead.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Xorg: RHead.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadHeader (buffer, header) - XdmcpBufferPtr buffer; - XdmcpHeaderPtr header; -{ - if (XdmcpReadCARD16 (buffer, &header->version) && - XdmcpReadCARD16 (buffer, &header->opcode) && - XdmcpReadCARD16 (buffer, &header->length)) - return TRUE; - return FALSE; -} diff --git a/nx-X11/lib/Xdmcp/RR.c b/nx-X11/lib/Xdmcp/RR.c deleted file mode 100644 index 2d7d2dba7..000000000 --- a/nx-X11/lib/Xdmcp/RR.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Xorg: RR.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReadRemaining (buffer) - XdmcpBufferPtr buffer; -{ - return buffer->count - buffer->pointer; -} diff --git a/nx-X11/lib/Xdmcp/RaA16.c b/nx-X11/lib/Xdmcp/RaA16.c deleted file mode 100644 index b02fa2f05..000000000 --- a/nx-X11/lib/Xdmcp/RaA16.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: RaA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/RaA16.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReallocARRAY16 (ARRAY16Ptr array, int length) -{ - CARD16Ptr newData; - - newData = (CARD16Ptr) Xrealloc (array->data, length * sizeof (CARD16)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RaA32.c b/nx-X11/lib/Xdmcp/RaA32.c deleted file mode 100644 index 52167d1e4..000000000 --- a/nx-X11/lib/Xdmcp/RaA32.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: RaA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/RaA32.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReallocARRAY32 (ARRAY32Ptr array, int length) -{ - CARD32Ptr newData; - - newData = (CARD32Ptr) Xrealloc (array->data, length * sizeof (CARD32)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RaA8.c b/nx-X11/lib/Xdmcp/RaA8.c deleted file mode 100644 index 3e7bc08e4..000000000 --- a/nx-X11/lib/Xdmcp/RaA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: RaA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/RaA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReallocARRAY8 (ARRAY8Ptr array, int length) -{ - CARD8Ptr newData; - - newData = (CARD8Ptr) Xrealloc (array->data, length * sizeof (CARD8)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/RaAoA8.c b/nx-X11/lib/Xdmcp/RaAoA8.c deleted file mode 100644 index 8b4806c5b..000000000 --- a/nx-X11/lib/Xdmcp/RaAoA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: RaAoA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/RaAoA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length) -{ - ARRAY8Ptr newData; - - newData = (ARRAY8Ptr) Xrealloc (array->data, length * sizeof (ARRAY8)); - if (!newData) - return FALSE; - array->length = length; - array->data = newData; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/Unwrap.c b/nx-X11/lib/Xdmcp/Unwrap.c deleted file mode 100644 index 0d60c2bed..000000000 --- a/nx-X11/lib/Xdmcp/Unwrap.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * $Xorg: Unwrap.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -#ifdef HASXDMAUTH - -/* - * The following function exists only to demonstrate the - * desired functional interface for this routine. You will - * need to add the appropriate algorithm if you wish to - * use XDM-AUTHENTICATION-1/XDM-AUTHORIZATION-1. - * - * The interface for this routine is quite simple. All three - * arguments are arrays of 8 unsigned characters, the first two - * are 64 bits of useful data, the last is 56 bits of useful - * data packed into 8 bytes, using the low 7 bits of each - * byte, filling the high bit with odd parity. - * - * Examine the XDMCP specification for the correct algorithm - */ - -#include "Wrap.h" - -void -XdmcpUnwrap ( - unsigned char *input, - unsigned char *wrapper, - unsigned char *output, - int bytes) -{ - int i, j, k; - unsigned char tmp[8]; - unsigned char blocks[2][8]; - unsigned char expand_wrapper[8]; - auth_wrapper_schedule schedule; - - _XdmcpWrapperToOddParity (wrapper, expand_wrapper); - _XdmcpAuthSetup (expand_wrapper, schedule); - - k = 0; - for (j = 0; j < bytes; j += 8) - { - if (bytes - j < 8) - return; /* bad input length */ - for (i = 0; i < 8; i++) - blocks[k][i] = input[j + i]; - _XdmcpAuthDoIt ((unsigned char *) (input + j), (unsigned char *) tmp, schedule, 0); - /* block chaining */ - k = (k == 0) ? 1 : 0; - for (i = 0; i < 8; i++) - { - if (j == 0) - output[j + i] = tmp[i]; - else - output[j + i] = tmp[i] ^ blocks[k][i]; - } - } -} - -#endif /* HASXDMAUTH */ diff --git a/nx-X11/lib/Xdmcp/WA16.c b/nx-X11/lib/Xdmcp/WA16.c deleted file mode 100644 index 4551161e4..000000000 --- a/nx-X11/lib/Xdmcp/WA16.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: WA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteARRAY16 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY16Ptr array; -{ - int i; - - if (!XdmcpWriteCARD8 (buffer, array->length)) - return FALSE; - for (i = 0; i < (int)array->length; i++) - if (!XdmcpWriteCARD16 (buffer, array->data[i])) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WA32.c b/nx-X11/lib/Xdmcp/WA32.c deleted file mode 100644 index 8d61b1e37..000000000 --- a/nx-X11/lib/Xdmcp/WA32.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: WA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteARRAY32 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY32Ptr array; -{ - int i; - - if (!XdmcpWriteCARD8 (buffer, array->length)) - return FALSE; - for (i = 0; i < (int)array->length; i++) - if (!XdmcpWriteCARD32 (buffer, array->data[i])) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WA8.c b/nx-X11/lib/Xdmcp/WA8.c deleted file mode 100644 index 43443c9f6..000000000 --- a/nx-X11/lib/Xdmcp/WA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: WA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteARRAY8 (buffer, array) - XdmcpBufferPtr buffer; - ARRAY8Ptr array; -{ - int i; - - if (!XdmcpWriteCARD16 (buffer, array->length)) - return FALSE; - for (i = 0; i < (int)array->length; i++) - if (!XdmcpWriteCARD8 (buffer, array->data[i])) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WAofA8.c b/nx-X11/lib/Xdmcp/WAofA8.c deleted file mode 100644 index 69f7bd051..000000000 --- a/nx-X11/lib/Xdmcp/WAofA8.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Xorg: WAofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteARRAYofARRAY8 (buffer, array) - XdmcpBufferPtr buffer; - ARRAYofARRAY8Ptr array; -{ - int i; - - if (!XdmcpWriteCARD8 (buffer, array->length)) - return FALSE; - for (i = 0; i < (int)array->length; i++) - if (!XdmcpWriteARRAY8 (buffer, &array->data[i])) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WC16.c b/nx-X11/lib/Xdmcp/WC16.c deleted file mode 100644 index 945171d8c..000000000 --- a/nx-X11/lib/Xdmcp/WC16.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Xorg: WC16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/WC16.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteCARD16 ( - XdmcpBufferPtr buffer, - unsigned value) -{ - if (!XdmcpWriteCARD8 (buffer, value >> 8)) - return FALSE; - if (!XdmcpWriteCARD8 (buffer, value & 0xff)) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WC32.c b/nx-X11/lib/Xdmcp/WC32.c deleted file mode 100644 index 2d5df8340..000000000 --- a/nx-X11/lib/Xdmcp/WC32.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * $Xorg: WC32.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ -/* $XFree86: xc/lib/Xdmcp/WC32.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteCARD32 ( - XdmcpBufferPtr buffer, - unsigned value) -{ - if (!XdmcpWriteCARD8 (buffer, value >> 24)) - return FALSE; - if (!XdmcpWriteCARD8 (buffer, (value >> 16) & 0xff)) - return FALSE; - if (!XdmcpWriteCARD8 (buffer, (value >> 8) & 0xff)) - return FALSE; - if (!XdmcpWriteCARD8 (buffer, value & 0xff)) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/WC8.c b/nx-X11/lib/Xdmcp/WC8.c deleted file mode 100644 index 2cbd6f1bf..000000000 --- a/nx-X11/lib/Xdmcp/WC8.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Xorg: WC8.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/WC8.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteCARD8 ( - XdmcpBufferPtr buffer, - unsigned value) -{ - if (buffer->pointer >= buffer->size) - return FALSE; - buffer->data[buffer->pointer++] = (BYTE) value; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/Whead.c b/nx-X11/lib/Xdmcp/Whead.c deleted file mode 100644 index 82c55c9d2..000000000 --- a/nx-X11/lib/Xdmcp/Whead.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * $Xorg: Whead.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Whead.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -int -XdmcpWriteHeader ( - XdmcpBufferPtr buffer, - XdmcpHeaderPtr header) -{ - BYTE *newData; - - if ((int)buffer->size < 6 + (int)header->length) - { - newData = (BYTE *) Xalloc (XDM_MAX_MSGLEN * sizeof (BYTE)); - if (!newData) - return FALSE; - Xfree ((unsigned long *)(buffer->data)); - buffer->data = newData; - buffer->size = XDM_MAX_MSGLEN; - } - buffer->pointer = 0; - if (!XdmcpWriteCARD16 (buffer, header->version)) - return FALSE; - if (!XdmcpWriteCARD16 (buffer, header->opcode)) - return FALSE; - if (!XdmcpWriteCARD16 (buffer, header->length)) - return FALSE; - return TRUE; -} diff --git a/nx-X11/lib/Xdmcp/Wrap.c b/nx-X11/lib/Xdmcp/Wrap.c deleted file mode 100644 index d8a032abc..000000000 --- a/nx-X11/lib/Xdmcp/Wrap.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * $Xorg: Wrap.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * * - * Author: Keith Packard, MIT X Consortium - */ - -/* $XFree86: xc/lib/Xdmcp/Wrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -#ifdef HASXDMAUTH - -/* - * The following function exists only to demonstrate the - * desired functional interface for this routine. You will - * need to add the appropriate algorithm if you wish to - * use XDM-AUTHENTICATION-1/XDM-AUTHORIZATION-1. - * - * Examine the XDMCP specification for the correct algorithm - */ - -#include "Wrap.h" - -void -XdmcpWrap ( - unsigned char *input, - unsigned char *wrapper, - unsigned char *output, - int bytes) -{ - int i, j; - int len; - unsigned char tmp[8]; - unsigned char expand_wrapper[8]; - auth_wrapper_schedule schedule; - - _XdmcpWrapperToOddParity (wrapper, expand_wrapper); - _XdmcpAuthSetup (expand_wrapper, schedule); - for (j = 0; j < bytes; j += 8) - { - len = 8; - if (bytes - j < len) - len = bytes - j; - /* block chaining */ - for (i = 0; i < len; i++) - { - if (j == 0) - tmp[i] = input[i]; - else - tmp[i] = input[j + i] ^ output[j - 8 + i]; - } - for (; i < 8; i++) - { - if (j == 0) - tmp[i] = 0; - else - tmp[i] = 0 ^ output[j - 8 + i]; - } - _XdmcpAuthDoIt (tmp, (output + j), schedule, 1); - } -} - -/* - * Given a 56 bit wrapper in XDMCP format, create a 56 - * bit wrapper in 7-bits + odd parity format - */ - -static int -OddParity (unsigned char c) -{ - c = c ^ (c >> 4); - c = c ^ (c >> 2); - c = c ^ (c >> 1); - return ~c & 0x1; -} - -/* - * Spread the 56 bit wrapper among 8 bytes, using the upper 7 bits - * of each byte, and storing an odd parity bit in the low bit - */ - -void -_XdmcpWrapperToOddParity ( - unsigned char *in, - unsigned char *out) -{ - int ashift, bshift; - int i; - unsigned char c; - - ashift = 7; - bshift = 1; - for (i = 0; i < 7; i++) - { - c = ((in[i] << ashift) | (in[i+1] >> bshift)) & 0x7f; - out[i] = (c << 1) | OddParity (c); - ashift--; - bshift++; - } - c = in[i]; - out[i] = (c << 1) | OddParity(c); -} - -#endif diff --git a/nx-X11/lib/Xdmcp/Wrap.h b/nx-X11/lib/Xdmcp/Wrap.h deleted file mode 100644 index 511254933..000000000 --- a/nx-X11/lib/Xdmcp/Wrap.h +++ /dev/null @@ -1,19 +0,0 @@ -/* $XdotOrg: xc/lib/Xdmcp/Wrap.h,v 1.6 2005/07/03 07:00:56 daniels Exp $ */ -/* $Xorg: Wrap.h,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ */ -/* - * header file for compatibility with something useful - */ - -/* $XFree86: xc/lib/Xdmcp/Wrap.h,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ - -typedef unsigned char auth_cblock[8]; /* block size */ - -typedef struct auth_ks_struct { auth_cblock _; } auth_wrapper_schedule[16]; - -extern void _XdmcpWrapperToOddParity (unsigned char *in, unsigned char *out); - -#ifdef HASXDMAUTH -extern void _XdmcpAuthSetup (auth_cblock key, auth_wrapper_schedule schedule); -extern void _XdmcpAuthDoIt (auth_cblock input, auth_cblock output, - auth_wrapper_schedule schedule, int edflag); -#endif diff --git a/nx-X11/lib/Xdmcp/Wraphelp.README.crypto b/nx-X11/lib/Xdmcp/Wraphelp.README.crypto deleted file mode 100644 index 20c34c071..000000000 --- a/nx-X11/lib/Xdmcp/Wraphelp.README.crypto +++ /dev/null @@ -1,64 +0,0 @@ -Export Requirements. - -You may not export or re-export this software or any copy or -adaptation in violation of any applicable laws or regulations. - -Without limiting the generality of the foregoing, hardware, software, -technology or services provided under this license agreement may not -be exported, reexported, transferred or downloaded to or within (or to -a national resident of) countries under U.S. economic embargo -including the following countries: - -Cuba, Iran, Libya, North Korea, Sudan and Syria. This list is subject -to change. - -Hardware, software, technology or services may not be exported, -reexported, transferred or downloaded to persons or entities listed on -the U.S. Department of Commerce Denied Persons List, Entity List of -proliferation concern or on any U.S. Treasury Department Designated -Nationals exclusion list, or to parties directly or indirectly -involved in the development or production of nuclear, chemical, -biological weapons or in missile technology programs as specified in -the U.S. Export Administration Regulations (15 CFR 744). - -By accepting this license agreement you confirm that you are not -located in (or a national resident of) any country under U.S. economic -embargo, not identified on any U.S. Department of Commerce Denied -Persons List, Entity List or Treasury Department Designated Nationals -exclusion list, and not directly or indirectly involved in the -development or production of nuclear, chemical, biological weapons or -in missile technology programs as specified in the U.S. Export -Administration Regulations. - -Software available on this web site contains cryptography and is -therefore subject to US government export control under the -U.S. Export Administration Regulations ("EAR"). EAR Part 740.13(e) -allows the export and reexport of publicly available encryption source -code that is not subject to payment of license fee or royalty -payment. Object code resulting from the compiling of such source code -may also be exported and reexported under this provision if publicly -available and not subject to a fee or payment other than reasonable -and customary fees for reproduction and distribution. This kind of -encryption source code and the corresponding object code may be -exported or reexported without prior U.S. government export license -authorization provided that the U.S. government is notified about the -Internet location of the software. - -The open source software available on this web site is publicly -available without license fee or royalty payment, and all binary -software is compiled from the source code. The U.S. government has -been notified about this site and the location site for the source -code. Therefore, the source code and compiled object code may be -downloaded and exported under U.S. export license exception (without a -U.S. export license) in accordance with the further restrictions -outlined above regarding embargoed countries, restricted persons and -restricted end uses. - -Local Country Import Requirements. The software you are about to -download contains cryptography technology. Some countries regulate the -import, use and/or export of certain products with cryptography. The -X.org Foundation makes no claims as to the applicability of local -country import, use and/or export regulations in relation to the -download of this product. If you are located outside the U.S. and -Canada you are advised to consult your local country regulations to -insure compliance. diff --git a/nx-X11/lib/Xdmcp/Wraphelp.c b/nx-X11/lib/Xdmcp/Wraphelp.c deleted file mode 100644 index 8e50ee222..000000000 --- a/nx-X11/lib/Xdmcp/Wraphelp.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * $Xorg: A8Eq.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include "Wrap.h" - -/* des routines for non-usa - eay 10/9/1991 eay@psych.psy.uq.oz.au - * These routines were written for speed not size so they are bigger than - * needed. I have removed some of the loop unrolling, this will reduce - * code size at the expense of some speed. - * 25/9/1991 eay - much faster _XdmcpAuthSetup (4 times faster). - * 19/9/1991 eay - cleaned up the IP and FP code. - * 10/9/1991 eay - first release. - * The des routines this file has been made from can be found in - * ftp.psy.uq.oz.au /pub/DES - * This particular version derived from OpenBSD Revsion 1.3. - */ - -/* - * - * Export Requirements. - * You may not export or re-export this software or any copy or - * adaptation in violation of any applicable laws or regulations. - * - * Without limiting the generality of the foregoing, hardware, software, - * technology or services provided under this license agreement may not - * be exported, reexported, transferred or downloaded to or within (or to - * a national resident of) countries under U.S. economic embargo - * including the following countries: - * - * Cuba, Iran, Libya, North Korea, Sudan and Syria. This list is subject - * to change. - * - * Hardware, software, technology or services may not be exported, - * reexported, transferred or downloaded to persons or entities listed on - * the U.S. Department of Commerce Denied Persons List, Entity List of - * proliferation concern or on any U.S. Treasury Department Designated - * Nationals exclusion list, or to parties directly or indirectly - * involved in the development or production of nuclear, chemical, - * biological weapons or in missile technology programs as specified in - * the U.S. Export Administration Regulations (15 CFR 744). - * - * By accepting this license agreement you confirm that you are not - * located in (or a national resident of) any country under U.S. economic - * embargo, not identified on any U.S. Department of Commerce Denied - * Persons List, Entity List or Treasury Department Designated Nationals - * exclusion list, and not directly or indirectly involved in the - * development or production of nuclear, chemical, biological weapons or - * in missile technology programs as specified in the U.S. Export - * Administration Regulations. - * - * - * Local Country Import Requirements. The software you are about to - * download contains cryptography technology. Some countries regulate the - * import, use and/or export of certain products with cryptography. The - * X.org Foundation makes no claims as to the applicability of local - * country import, use and/or export regulations in relation to the - * download of this product. If you are located outside the U.S. and - * Canada you are advised to consult your local country regulations to - * insure compliance. - */ - -static CARD32 skb[8][64] = { - /* for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ - { 0x00000000,0x00000010,0x20000000,0x20000010, - 0x00010000,0x00010010,0x20010000,0x20010010, - 0x00000800,0x00000810,0x20000800,0x20000810, - 0x00010800,0x00010810,0x20010800,0x20010810, - 0x00000020,0x00000030,0x20000020,0x20000030, - 0x00010020,0x00010030,0x20010020,0x20010030, - 0x00000820,0x00000830,0x20000820,0x20000830, - 0x00010820,0x00010830,0x20010820,0x20010830, - 0x00080000,0x00080010,0x20080000,0x20080010, - 0x00090000,0x00090010,0x20090000,0x20090010, - 0x00080800,0x00080810,0x20080800,0x20080810, - 0x00090800,0x00090810,0x20090800,0x20090810, - 0x00080020,0x00080030,0x20080020,0x20080030, - 0x00090020,0x00090030,0x20090020,0x20090030, - 0x00080820,0x00080830,0x20080820,0x20080830, - 0x00090820,0x00090830,0x20090820,0x20090830 }, - /* for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 */ - { 0x00000000,0x02000000,0x00002000,0x02002000, - 0x00200000,0x02200000,0x00202000,0x02202000, - 0x00000004,0x02000004,0x00002004,0x02002004, - 0x00200004,0x02200004,0x00202004,0x02202004, - 0x00000400,0x02000400,0x00002400,0x02002400, - 0x00200400,0x02200400,0x00202400,0x02202400, - 0x00000404,0x02000404,0x00002404,0x02002404, - 0x00200404,0x02200404,0x00202404,0x02202404, - 0x10000000,0x12000000,0x10002000,0x12002000, - 0x10200000,0x12200000,0x10202000,0x12202000, - 0x10000004,0x12000004,0x10002004,0x12002004, - 0x10200004,0x12200004,0x10202004,0x12202004, - 0x10000400,0x12000400,0x10002400,0x12002400, - 0x10200400,0x12200400,0x10202400,0x12202400, - 0x10000404,0x12000404,0x10002404,0x12002404, - 0x10200404,0x12200404,0x10202404,0x12202404 }, - /* for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 */ - { 0x00000000,0x00000001,0x00040000,0x00040001, - 0x01000000,0x01000001,0x01040000,0x01040001, - 0x00000002,0x00000003,0x00040002,0x00040003, - 0x01000002,0x01000003,0x01040002,0x01040003, - 0x00000200,0x00000201,0x00040200,0x00040201, - 0x01000200,0x01000201,0x01040200,0x01040201, - 0x00000202,0x00000203,0x00040202,0x00040203, - 0x01000202,0x01000203,0x01040202,0x01040203, - 0x08000000,0x08000001,0x08040000,0x08040001, - 0x09000000,0x09000001,0x09040000,0x09040001, - 0x08000002,0x08000003,0x08040002,0x08040003, - 0x09000002,0x09000003,0x09040002,0x09040003, - 0x08000200,0x08000201,0x08040200,0x08040201, - 0x09000200,0x09000201,0x09040200,0x09040201, - 0x08000202,0x08000203,0x08040202,0x08040203, - 0x09000202,0x09000203,0x09040202,0x09040203 }, - /* for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 */ - { 0x00000000,0x00100000,0x00000100,0x00100100, - 0x00000008,0x00100008,0x00000108,0x00100108, - 0x00001000,0x00101000,0x00001100,0x00101100, - 0x00001008,0x00101008,0x00001108,0x00101108, - 0x04000000,0x04100000,0x04000100,0x04100100, - 0x04000008,0x04100008,0x04000108,0x04100108, - 0x04001000,0x04101000,0x04001100,0x04101100, - 0x04001008,0x04101008,0x04001108,0x04101108, - 0x00020000,0x00120000,0x00020100,0x00120100, - 0x00020008,0x00120008,0x00020108,0x00120108, - 0x00021000,0x00121000,0x00021100,0x00121100, - 0x00021008,0x00121008,0x00021108,0x00121108, - 0x04020000,0x04120000,0x04020100,0x04120100, - 0x04020008,0x04120008,0x04020108,0x04120108, - 0x04021000,0x04121000,0x04021100,0x04121100, - 0x04021008,0x04121008,0x04021108,0x04121108 }, - /* for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ - { 0x00000000,0x10000000,0x00010000,0x10010000, - 0x00000004,0x10000004,0x00010004,0x10010004, - 0x20000000,0x30000000,0x20010000,0x30010000, - 0x20000004,0x30000004,0x20010004,0x30010004, - 0x00100000,0x10100000,0x00110000,0x10110000, - 0x00100004,0x10100004,0x00110004,0x10110004, - 0x20100000,0x30100000,0x20110000,0x30110000, - 0x20100004,0x30100004,0x20110004,0x30110004, - 0x00001000,0x10001000,0x00011000,0x10011000, - 0x00001004,0x10001004,0x00011004,0x10011004, - 0x20001000,0x30001000,0x20011000,0x30011000, - 0x20001004,0x30001004,0x20011004,0x30011004, - 0x00101000,0x10101000,0x00111000,0x10111000, - 0x00101004,0x10101004,0x00111004,0x10111004, - 0x20101000,0x30101000,0x20111000,0x30111000, - 0x20101004,0x30101004,0x20111004,0x30111004 }, - /* for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 */ - { 0x00000000,0x08000000,0x00000008,0x08000008, - 0x00000400,0x08000400,0x00000408,0x08000408, - 0x00020000,0x08020000,0x00020008,0x08020008, - 0x00020400,0x08020400,0x00020408,0x08020408, - 0x00000001,0x08000001,0x00000009,0x08000009, - 0x00000401,0x08000401,0x00000409,0x08000409, - 0x00020001,0x08020001,0x00020009,0x08020009, - 0x00020401,0x08020401,0x00020409,0x08020409, - 0x02000000,0x0A000000,0x02000008,0x0A000008, - 0x02000400,0x0A000400,0x02000408,0x0A000408, - 0x02020000,0x0A020000,0x02020008,0x0A020008, - 0x02020400,0x0A020400,0x02020408,0x0A020408, - 0x02000001,0x0A000001,0x02000009,0x0A000009, - 0x02000401,0x0A000401,0x02000409,0x0A000409, - 0x02020001,0x0A020001,0x02020009,0x0A020009, - 0x02020401,0x0A020401,0x02020409,0x0A020409 }, - /* for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 */ - { 0x00000000,0x00000100,0x00080000,0x00080100, - 0x01000000,0x01000100,0x01080000,0x01080100, - 0x00000010,0x00000110,0x00080010,0x00080110, - 0x01000010,0x01000110,0x01080010,0x01080110, - 0x00200000,0x00200100,0x00280000,0x00280100, - 0x01200000,0x01200100,0x01280000,0x01280100, - 0x00200010,0x00200110,0x00280010,0x00280110, - 0x01200010,0x01200110,0x01280010,0x01280110, - 0x00000200,0x00000300,0x00080200,0x00080300, - 0x01000200,0x01000300,0x01080200,0x01080300, - 0x00000210,0x00000310,0x00080210,0x00080310, - 0x01000210,0x01000310,0x01080210,0x01080310, - 0x00200200,0x00200300,0x00280200,0x00280300, - 0x01200200,0x01200300,0x01280200,0x01280300, - 0x00200210,0x00200310,0x00280210,0x00280310, - 0x01200210,0x01200310,0x01280210,0x01280310 }, - /* for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 */ - { 0x00000000,0x04000000,0x00040000,0x04040000, - 0x00000002,0x04000002,0x00040002,0x04040002, - 0x00002000,0x04002000,0x00042000,0x04042000, - 0x00002002,0x04002002,0x00042002,0x04042002, - 0x00000020,0x04000020,0x00040020,0x04040020, - 0x00000022,0x04000022,0x00040022,0x04040022, - 0x00002020,0x04002020,0x00042020,0x04042020, - 0x00002022,0x04002022,0x00042022,0x04042022, - 0x00000800,0x04000800,0x00040800,0x04040800, - 0x00000802,0x04000802,0x00040802,0x04040802, - 0x00002800,0x04002800,0x00042800,0x04042800, - 0x00002802,0x04002802,0x00042802,0x04042802, - 0x00000820,0x04000820,0x00040820,0x04040820, - 0x00000822,0x04000822,0x00040822,0x04040822, - 0x00002820,0x04002820,0x00042820,0x04042820, - 0x00002822,0x04002822,0x00042822,0x04042822 } -}; - - -static CARD32 SPtrans[8][64] = { - /* nibble 0 */ - { 0x00410100, 0x00010000, 0x40400000, 0x40410100, - 0x00400000, 0x40010100, 0x40010000, 0x40400000, - 0x40010100, 0x00410100, 0x00410000, 0x40000100, - 0x40400100, 0x00400000, 0x00000000, 0x40010000, - 0x00010000, 0x40000000, 0x00400100, 0x00010100, - 0x40410100, 0x00410000, 0x40000100, 0x00400100, - 0x40000000, 0x00000100, 0x00010100, 0x40410000, - 0x00000100, 0x40400100, 0x40410000, 0x00000000, - 0x00000000, 0x40410100, 0x00400100, 0x40010000, - 0x00410100, 0x00010000, 0x40000100, 0x00400100, - 0x40410000, 0x00000100, 0x00010100, 0x40400000, - 0x40010100, 0x40000000, 0x40400000, 0x00410000, - 0x40410100, 0x00010100, 0x00410000, 0x40400100, - 0x00400000, 0x40000100, 0x40010000, 0x00000000, - 0x00010000, 0x00400000, 0x40400100, 0x00410100, - 0x40000000, 0x40410000, 0x00000100, 0x40010100 }, - - /* nibble 1 */ - { 0x08021002, 0x00000000, 0x00021000, 0x08020000, - 0x08000002, 0x00001002, 0x08001000, 0x00021000, - 0x00001000, 0x08020002, 0x00000002, 0x08001000, - 0x00020002, 0x08021000, 0x08020000, 0x00000002, - 0x00020000, 0x08001002, 0x08020002, 0x00001000, - 0x00021002, 0x08000000, 0x00000000, 0x00020002, - 0x08001002, 0x00021002, 0x08021000, 0x08000002, - 0x08000000, 0x00020000, 0x00001002, 0x08021002, - 0x00020002, 0x08021000, 0x08001000, 0x00021002, - 0x08021002, 0x00020002, 0x08000002, 0x00000000, - 0x08000000, 0x00001002, 0x00020000, 0x08020002, - 0x00001000, 0x08000000, 0x00021002, 0x08001002, - 0x08021000, 0x00001000, 0x00000000, 0x08000002, - 0x00000002, 0x08021002, 0x00021000, 0x08020000, - 0x08020002, 0x00020000, 0x00001002, 0x08001000, - 0x08001002, 0x00000002, 0x08020000, 0x00021000 }, - - /* nibble 2 */ - { 0x20800000, 0x00808020, 0x00000020, 0x20800020, - 0x20008000, 0x00800000, 0x20800020, 0x00008020, - 0x00800020, 0x00008000, 0x00808000, 0x20000000, - 0x20808020, 0x20000020, 0x20000000, 0x20808000, - 0x00000000, 0x20008000, 0x00808020, 0x00000020, - 0x20000020, 0x20808020, 0x00008000, 0x20800000, - 0x20808000, 0x00800020, 0x20008020, 0x00808000, - 0x00008020, 0x00000000, 0x00800000, 0x20008020, - 0x00808020, 0x00000020, 0x20000000, 0x00008000, - 0x20000020, 0x20008000, 0x00808000, 0x20800020, - 0x00000000, 0x00808020, 0x00008020, 0x20808000, - 0x20008000, 0x00800000, 0x20808020, 0x20000000, - 0x20008020, 0x20800000, 0x00800000, 0x20808020, - 0x00008000, 0x00800020, 0x20800020, 0x00008020, - 0x00800020, 0x00000000, 0x20808000, 0x20000020, - 0x20800000, 0x20008020, 0x00000020, 0x00808000 }, - - /* nibble 3 */ - { 0x00080201, 0x02000200, 0x00000001, 0x02080201, - 0x00000000, 0x02080000, 0x02000201, 0x00080001, - 0x02080200, 0x02000001, 0x02000000, 0x00000201, - 0x02000001, 0x00080201, 0x00080000, 0x02000000, - 0x02080001, 0x00080200, 0x00000200, 0x00000001, - 0x00080200, 0x02000201, 0x02080000, 0x00000200, - 0x00000201, 0x00000000, 0x00080001, 0x02080200, - 0x02000200, 0x02080001, 0x02080201, 0x00080000, - 0x02080001, 0x00000201, 0x00080000, 0x02000001, - 0x00080200, 0x02000200, 0x00000001, 0x02080000, - 0x02000201, 0x00000000, 0x00000200, 0x00080001, - 0x00000000, 0x02080001, 0x02080200, 0x00000200, - 0x02000000, 0x02080201, 0x00080201, 0x00080000, - 0x02080201, 0x00000001, 0x02000200, 0x00080201, - 0x00080001, 0x00080200, 0x02080000, 0x02000201, - 0x00000201, 0x02000000, 0x02000001, 0x02080200 }, - - /* nibble 4 */ - { 0x01000000, 0x00002000, 0x00000080, 0x01002084, - 0x01002004, 0x01000080, 0x00002084, 0x01002000, - 0x00002000, 0x00000004, 0x01000004, 0x00002080, - 0x01000084, 0x01002004, 0x01002080, 0x00000000, - 0x00002080, 0x01000000, 0x00002004, 0x00000084, - 0x01000080, 0x00002084, 0x00000000, 0x01000004, - 0x00000004, 0x01000084, 0x01002084, 0x00002004, - 0x01002000, 0x00000080, 0x00000084, 0x01002080, - 0x01002080, 0x01000084, 0x00002004, 0x01002000, - 0x00002000, 0x00000004, 0x01000004, 0x01000080, - 0x01000000, 0x00002080, 0x01002084, 0x00000000, - 0x00002084, 0x01000000, 0x00000080, 0x00002004, - 0x01000084, 0x00000080, 0x00000000, 0x01002084, - 0x01002004, 0x01002080, 0x00000084, 0x00002000, - 0x00002080, 0x01002004, 0x01000080, 0x00000084, - 0x00000004, 0x00002084, 0x01002000, 0x01000004 }, - - /* nibble 5 */ - { 0x10000008, 0x00040008, 0x00000000, 0x10040400, - 0x00040008, 0x00000400, 0x10000408, 0x00040000, - 0x00000408, 0x10040408, 0x00040400, 0x10000000, - 0x10000400, 0x10000008, 0x10040000, 0x00040408, - 0x00040000, 0x10000408, 0x10040008, 0x00000000, - 0x00000400, 0x00000008, 0x10040400, 0x10040008, - 0x10040408, 0x10040000, 0x10000000, 0x00000408, - 0x00000008, 0x00040400, 0x00040408, 0x10000400, - 0x00000408, 0x10000000, 0x10000400, 0x00040408, - 0x10040400, 0x00040008, 0x00000000, 0x10000400, - 0x10000000, 0x00000400, 0x10040008, 0x00040000, - 0x00040008, 0x10040408, 0x00040400, 0x00000008, - 0x10040408, 0x00040400, 0x00040000, 0x10000408, - 0x10000008, 0x10040000, 0x00040408, 0x00000000, - 0x00000400, 0x10000008, 0x10000408, 0x10040400, - 0x10040000, 0x00000408, 0x00000008, 0x10040008 }, - - /* nibble 6 */ - { 0x00000800, 0x00000040, 0x00200040, 0x80200000, - 0x80200840, 0x80000800, 0x00000840, 0x00000000, - 0x00200000, 0x80200040, 0x80000040, 0x00200800, - 0x80000000, 0x00200840, 0x00200800, 0x80000040, - 0x80200040, 0x00000800, 0x80000800, 0x80200840, - 0x00000000, 0x00200040, 0x80200000, 0x00000840, - 0x80200800, 0x80000840, 0x00200840, 0x80000000, - 0x80000840, 0x80200800, 0x00000040, 0x00200000, - 0x80000840, 0x00200800, 0x80200800, 0x80000040, - 0x00000800, 0x00000040, 0x00200000, 0x80200800, - 0x80200040, 0x80000840, 0x00000840, 0x00000000, - 0x00000040, 0x80200000, 0x80000000, 0x00200040, - 0x00000000, 0x80200040, 0x00200040, 0x00000840, - 0x80000040, 0x00000800, 0x80200840, 0x00200000, - 0x00200840, 0x80000000, 0x80000800, 0x80200840, - 0x80200000, 0x00200840, 0x00200800, 0x80000800 }, - - /* nibble 7 */ - { 0x04100010, 0x04104000, 0x00004010, 0x00000000, - 0x04004000, 0x00100010, 0x04100000, 0x04104010, - 0x00000010, 0x04000000, 0x00104000, 0x00004010, - 0x00104010, 0x04004010, 0x04000010, 0x04100000, - 0x00004000, 0x00104010, 0x00100010, 0x04004000, - 0x04104010, 0x04000010, 0x00000000, 0x00104000, - 0x04000000, 0x00100000, 0x04004010, 0x04100010, - 0x00100000, 0x00004000, 0x04104000, 0x00000010, - 0x00100000, 0x00004000, 0x04000010, 0x04104010, - 0x00004010, 0x04000000, 0x00000000, 0x00104000, - 0x04100010, 0x04004010, 0x04004000, 0x00100010, - 0x04104000, 0x00000010, 0x00100010, 0x04004000, - 0x04104010, 0x00100000, 0x04100000, 0x04000010, - 0x00104000, 0x00004010, 0x04004010, 0x04100000, - 0x00000010, 0x04104000, 0x00104010, 0x00000000, - 0x04000000, 0x04100010, 0x00004000, 0x00104010} -}; - -#define ITERATIONS 16 -#define HALF_ITERATIONS 8 - -#define c2l(c,l) (l =((CARD32)(*((c)++))) , \ - l|=((CARD32)(*((c)++)))<< 8, \ - l|=((CARD32)(*((c)++)))<<16, \ - l|=((CARD32)(*((c)++)))<<24) - -#define l2c(l,c) (*((c)++)=(CARD8)(((l) )&0xff), \ - *((c)++)=(CARD8)(((l)>> 8)&0xff), \ - *((c)++)=(CARD8)(((l)>>16)&0xff), \ - *((c)++)=(CARD8)(((l)>>24)&0xff)) - -#define PERM_OP(a,b,t,n,m) ((t)=((((a)>>(n))^(b))&(m)),\ - (b)^=(t),\ - (a)^=((t)<<(n))) - -#define HPERM_OP(a,t,n,m) ((t)=((((a)<<(16-(n)))^(a))&(m)),\ - (a)=(a)^(t)^(t>>(16-(n))))\ - -static char shifts2[16] = {0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0}; - -void _XdmcpAuthSetup(auth_cblock key, auth_wrapper_schedule schedule) -{ - CARD32 c,d,t,s; - CARD8 *in; - CARD32 *k; - int i; - - k=(CARD32 *)schedule; - in=(CARD8 *)key; - - c2l(in,c); - c2l(in,d); - - /* do PC1 in 60 simple operations */ - PERM_OP(d,c,t,4,0x0f0f0f0f); - HPERM_OP(c,t,-2, 0xcccc0000); - HPERM_OP(c,t,-1, 0xaaaa0000); - HPERM_OP(c,t, 8, 0x00ff0000); - HPERM_OP(c,t,-1, 0xaaaa0000); - HPERM_OP(d,t,-8, 0xff000000); - HPERM_OP(d,t, 8, 0x00ff0000); - HPERM_OP(d,t, 2, 0x33330000); - d=((d&0x00aa00aa)<<7)|((d&0x55005500)>>7)|(d&0xaa55aa55); - d=(d>>8)|((c&0xf0000000)>>4); - c&=0x0fffffff; - - for (i=0; i>2)|(c<<26)); d=((d>>2)|(d<<26)); - } else { - c=((c>>1)|(c<<27)); d=((d>>1)|(d<<27)); - } - c&=0x0fffffff; - d&=0x0fffffff; - /* could be a few less shifts but I am to lazy at this - * point in time to investigate */ - s= skb[0][ (c )&0x3f ]| - skb[1][((c>> 6)&0x03)|((c>> 7)&0x3c)]| - skb[2][((c>>13)&0x0f)|((c>>14)&0x30)]| - skb[3][((c>>20)&0x01)|((c>>21)&0x06) | - ((c>>22)&0x38)]; - t= skb[4][ (d )&0x3f ]| - skb[5][((d>> 7)&0x03)|((d>> 8)&0x3c)]| - skb[6][ (d>>15)&0x3f ]| - skb[7][((d>>21)&0x0f)|((d>>22)&0x30)]; - - /* table contained 0213 4657 */ - *(k++)=((t<<16)|(s&0x0000ffff)); - s= ((s>>16)|(t&0xffff0000)); - - s=(s<<4)|(s>>28); - *(k++)=s; - } - return; -} - -#define D_ENCRYPT(L,R,S) \ - t=(R<<1)|(R>>31); \ - u=(t^s[S ]); \ - t=(t^s[S+1]); \ - t=(t>>4)|(t<<28); \ - L^= SPtrans[1][(t )&0x3f]| \ - SPtrans[3][(t>> 8)&0x3f]| \ - SPtrans[5][(t>>16)&0x3f]| \ - SPtrans[7][(t>>24)&0x3f]| \ - SPtrans[0][(u )&0x3f]| \ - SPtrans[2][(u>> 8)&0x3f]| \ - SPtrans[4][(u>>16)&0x3f]| \ - SPtrans[6][(u>>24)&0x3f]; - - -void _XdmcpAuthDoIt(auth_cblock input, auth_cblock output, - auth_wrapper_schedule ks, int encrypt) -{ - CARD32 l,r,t,u; - CARD32 *s; - CARD8 *in,*out; - int i; - - in=(CARD8 *)input; - out=(CARD8 *)output; - c2l(in,l); - c2l(in,r); - - /* do IP */ - PERM_OP(r,l,t, 4,0x0f0f0f0f); - PERM_OP(l,r,t,16,0x0000ffff); - PERM_OP(r,l,t, 2,0x33333333); - PERM_OP(l,r,t, 8,0x00ff00ff); - PERM_OP(r,l,t, 1,0x55555555); - /* r and l are reversed - remember that :-) */ - t=l; - l=r; - r=t; - - s=(CARD32 *)ks; - - if (encrypt) { - for (i=0; i<(ITERATIONS*2); i+=4) { - D_ENCRYPT(l,r, i); /* 1 */ - D_ENCRYPT(r,l, i+2); /* 2 */ - } - } else { - for (i=(ITERATIONS*2)-2; i >= 0; i-=4) { - D_ENCRYPT(l,r, i); /* 1 */ - D_ENCRYPT(r,l, i-2); /* 2 */ - } - } - - /* swap l and r - * we will not do the swap so just remember they are - * reversed for the rest of the subroutine - * luckily by FP fixes this problem :-) */ - - PERM_OP(r,l,t, 1,0x55555555); - PERM_OP(l,r,t, 8,0x00ff00ff); - PERM_OP(r,l,t, 2,0x33333333); - PERM_OP(l,r,t,16,0x0000ffff); - PERM_OP(r,l,t, 4,0x0f0f0f0f); - - l2c(l,out); - l2c(r,out); - return; -} diff --git a/nx-X11/lib/Xdmcp/Xdmcp.h b/nx-X11/lib/Xdmcp/Xdmcp.h deleted file mode 100644 index 8fcf63292..000000000 --- a/nx-X11/lib/Xdmcp/Xdmcp.h +++ /dev/null @@ -1,190 +0,0 @@ -/* $XdotOrg: xc/lib/Xdmcp/Xdmcp.h,v 1.3 2005/07/03 07:00:56 daniels Exp $ */ -/* $Xorg: Xdmcp.h,v 1.7 2001/04/13 14:43:00 steve Exp $ */ -/* - * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. - * - * 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 N.C.D. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. N.C.D. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - */ -/* $XFree86: xc/lib/Xdmcp/Xdmcp.h,v 3.7 2003/07/09 15:27:29 tsi Exp $ */ - -#ifndef _XDMCP_H_ -#define _XDMCP_H_ - -#include - -#include - -_XFUNCPROTOBEGIN - -#define XDM_PROTOCOL_VERSION 1 -#define XDM_UDP_PORT 177 - -/* IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned - * multicast addresses for XDMCP, where X in the prefix may be replaced - * by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, - * 5 for Site-Local, and so on. We set the default here to the Link-Local - * version to most closely match the old IPv4 subnet broadcast behavior. - * Both xdm and X -query allow specifying a different address if a different - * scope is defined. - */ -#define XDM_DEFAULT_MCAST_ADDR6 "ff02:0:0:0:0:0:0:12b" - -#define XDM_MAX_MSGLEN 8192 -#define XDM_MIN_RTX 2 -#define XDM_MAX_RTX 32 -#define XDM_RTX_LIMIT 7 -#define XDM_KA_RTX_LIMIT 4 -#define XDM_DEF_DORMANCY (3 * 60) /* 3 minutes */ -#define XDM_MAX_DORMANCY (24 * 60 * 60) /* 24 hours */ - -typedef enum { - BROADCAST_QUERY = 1, QUERY, INDIRECT_QUERY, FORWARD_QUERY, - WILLING, UNWILLING, REQUEST, ACCEPT, DECLINE, MANAGE, REFUSE, - FAILED, KEEPALIVE, ALIVE -} xdmOpCode; - -typedef enum { - XDM_QUERY, XDM_BROADCAST, XDM_INDIRECT, XDM_COLLECT_QUERY, - XDM_COLLECT_BROADCAST_QUERY, XDM_COLLECT_INDIRECT_QUERY, - XDM_START_CONNECTION, XDM_AWAIT_REQUEST_RESPONSE, - XDM_AWAIT_MANAGE_RESPONSE, XDM_MANAGE, XDM_RUN_SESSION, XDM_OFF, - XDM_AWAIT_USER_INPUT, XDM_KEEPALIVE, XDM_AWAIT_ALIVE_RESPONSE, -#if defined(IPv6) && defined(AF_INET6) - XDM_MULTICAST, XDM_COLLECT_MULTICAST_QUERY, -#endif - XDM_KEEP_ME_LAST -} xdmcp_states; - -#ifdef NOTDEF -/* table of hosts */ - -#define XDM_MAX_STR_LEN 21 -#define XDM_MAX_HOSTS 20 -struct xdm_host_table { - struct sockaddr_in sockaddr; - char name[XDM_MAX_STR_LEN]; - char status[XDM_MAX_STR_LEN]; -}; -#endif /* NOTDEF */ - -typedef CARD8 *CARD8Ptr; -typedef CARD16 *CARD16Ptr; -typedef CARD32 *CARD32Ptr; - -typedef struct _ARRAY8 { - CARD16 length; - CARD8Ptr data; -} ARRAY8, *ARRAY8Ptr; - -typedef struct _ARRAY16 { - CARD8 length; - CARD16Ptr data; -} ARRAY16, *ARRAY16Ptr; - -typedef struct _ARRAY32 { - CARD8 length; - CARD32Ptr data; -} ARRAY32, *ARRAY32Ptr; - -typedef struct _ARRAYofARRAY8 { - CARD8 length; - ARRAY8Ptr data; -} ARRAYofARRAY8, *ARRAYofARRAY8Ptr; - -typedef struct _XdmcpHeader { - CARD16 version, opcode, length; -} XdmcpHeader, *XdmcpHeaderPtr; - -typedef struct _XdmcpBuffer { - BYTE *data; - int size; /* size of buffer pointed by to data */ - int pointer; /* current index into data */ - int count; /* bytes read from network into data */ -} XdmcpBuffer, *XdmcpBufferPtr; - -typedef struct _XdmAuthKey { - BYTE data[8]; -} XdmAuthKeyRec, *XdmAuthKeyPtr; - - -/* implementation-independent network address structure. - Equiv to sockaddr* for sockets and netbuf* for STREAMS. */ - -typedef char *XdmcpNetaddr; - -extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array); -extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array); -extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array); -extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array); -extern int XdmcpWriteCARD16(XdmcpBufferPtr buffer, unsigned value); -extern int XdmcpWriteCARD32(XdmcpBufferPtr buffer, unsigned value); -extern int XdmcpWriteCARD8(XdmcpBufferPtr buffer, unsigned value); -extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header); - -extern int XdmcpFlush(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen); - -extern int XdmcpReadARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array); -extern int XdmcpReadARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array); -extern int XdmcpReadARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array); -extern int XdmcpReadARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array); -extern int XdmcpReadCARD16(XdmcpBufferPtr buffer, CARD16Ptr valuep); -extern int XdmcpReadCARD32(XdmcpBufferPtr buffer, CARD32Ptr valuep); -extern int XdmcpReadCARD8(XdmcpBufferPtr buffer, CARD8Ptr valuep); -extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header); - -extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen); - -extern int XdmcpReadRemaining(XdmcpBufferPtr buffer); - -extern void XdmcpDisposeARRAY8(ARRAY8Ptr array); -extern void XdmcpDisposeARRAY16(ARRAY16Ptr array); -extern void XdmcpDisposeARRAY32(ARRAY32Ptr array); -extern void XdmcpDisposeARRAYofARRAY8(ARRAYofARRAY8Ptr array); - -extern int XdmcpCopyARRAY8(ARRAY8Ptr src, ARRAY8Ptr dst); - -extern int XdmcpARRAY8Equal(ARRAY8Ptr array1, ARRAY8Ptr array2); - -extern void XdmcpGenerateKey (XdmAuthKeyPtr key); -extern void XdmcpIncrementKey (XdmAuthKeyPtr key); -extern void XdmcpDecrementKey (XdmAuthKeyPtr key); -#ifdef HASXDMAUTH -extern void XdmcpWrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes); -extern void XdmcpUnwrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes); -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#if !defined(Xalloc) && !defined(xalloc) && !defined(Xrealloc) -extern void *Xalloc (unsigned long amount); -extern void *Xrealloc (void *old, unsigned long amount); -extern void Xfree(void *old); -#endif - -extern int XdmcpCompareKeys (XdmAuthKeyPtr a, XdmAuthKeyPtr b); - -extern int XdmcpAllocARRAY16 (ARRAY16Ptr array, int length); -extern int XdmcpAllocARRAY32 (ARRAY32Ptr array, int length); -extern int XdmcpAllocARRAY8 (ARRAY8Ptr array, int length); -extern int XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length); - -extern int XdmcpReallocARRAY16 (ARRAY16Ptr array, int length); -extern int XdmcpReallocARRAY32 (ARRAY32Ptr array, int length); -extern int XdmcpReallocARRAY8 (ARRAY8Ptr array, int length); -extern int XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length); - -_XFUNCPROTOEND - -#endif /* _XDMCP_H_ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index fd0a55311..bf791c878 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -204,7 +204,7 @@ INSTPGMFLAGS = #if BuildLBX ZLIB = GzipLibrary #endif - OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) $(DEPXDMCPLIB) + OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) BSDEMUL = $(DEPXBSDLIB) #if DoLoadableServer MFB = mfb/ModuleLibraryTargetName(mfb) @@ -440,17 +440,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes -lXfont \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \ + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lXdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-libs.spec b/nx-libs.spec index f4525bee1..6774a7ed6 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -33,6 +33,7 @@ BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xfont) +BuildRequires: pkgconfig(xdmcp) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -41,6 +42,7 @@ BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libXpm-devel BuildRequires: xorg-x11-libXfont-devel +BuildRequires: xorg-x11-libXdmcp-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -50,6 +52,7 @@ BuildRequires: expat-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: libXfont-devel +BuildRequires: libXdmcp-devel %endif # For imake @@ -214,50 +217,6 @@ The X Damage Extension allows applications to track modified regions of drawables. -%package -n libNX_Xdmcp-devel -Group: Development/Libraries -Summary: Development files for the NXDM Control Protocol library -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: libNX_Xdmcp6%{?_isa} = %{version}-%{release} -Requires: nx-proto-devel%{?_isa} = %{version}-%{release} - -%description -n libNX_Xdmcp-devel -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The X Display Manager Control Protocol (XDMCP) provides a uniform -mechanism for an autonomous display to request login service from a -remote host. By autonomous, we mean the display consists of hardware -and processes that are independent of any particular host where login -service is desired. An X terminal (screen, keyboard, mouse, -processor, network interface) is a prime example of an autonomous -display. - -This package contains all necessary include files and libraries -needed to develop applications that require these. - - -%package -n libNX_Xdmcp6 -Group: System Environment/Libraries -Summary: NX Display Manager Control Protocol library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xdmcp - -%description -n libNX_Xdmcp6 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The X Display Manager Control Protocol (XDMCP) provides a uniform -mechanism for an autonomous display to request login service from a -remote host. By autonomous, we mean the display consists of hardware -and processes that are independent of any particular host where login -service is desired. An X terminal (screen, keyboard, mouse, -processor, network interface) is a prime example of an autonomous -display. - - %package -n libNX_Xext-devel Group: Development/Libraries Summary: Development files for the NX Common Extensions library @@ -518,7 +477,6 @@ Group: Development/Libraries Summary: Include files and libraries for NX development Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xau-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xdmcp-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xfixes-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xrender-devel%{?_isa} = %{version}-%{release} @@ -699,7 +657,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %post -n libNX_Xau6 -p /sbin/ldconfig %post -n libNX_Xcomposite1 -p /sbin/ldconfig %post -n libNX_Xdamage1 -p /sbin/ldconfig -%post -n libNX_Xdmcp6 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig @@ -714,7 +671,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %postun -n libNX_Xau6 -p /sbin/ldconfig %postun -n libNX_Xcomposite1 -p /sbin/ldconfig %postun -n libNX_Xdamage1 -p /sbin/ldconfig -%postun -n libNX_Xdmcp6 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig @@ -776,15 +732,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama %defattr(-,root,root) %{_libdir}/libNX_Xdamage.so.1* -%files -n libNX_Xdmcp-devel -%defattr(-,root,root) -%{_libdir}/libNX_Xdmcp.so -%{_includedir}/nx/X11/Xdmcp.h - -%files -n libNX_Xdmcp6 -%defattr(-,root,root) -%{_libdir}/libNX_Xdmcp.so.6* - %files -n libNX_Xext-devel %defattr(-,root,root) %{_libdir}/libNX_Xext.so -- cgit v1.2.3 From e69b7d1ecf9672effd4715a4bc8d5bd729b5bd37 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Apr 2015 10:42:47 +0200 Subject: xbitmaps cleanup: The headers are not required at build time for NX. --- Makefile | 6 +- debian/rules | 1 - nx-X11/include/Imakefile | 2 +- nx-X11/include/bitmaps/1x1 | 6 - nx-X11/include/bitmaps/2x2 | 6 - nx-X11/include/bitmaps/Imakefile | 86 --- nx-X11/include/bitmaps/black | 6 - nx-X11/include/bitmaps/boxes | 6 - nx-X11/include/bitmaps/calculator | 19 - nx-X11/include/bitmaps/cntr_ptr | 8 - nx-X11/include/bitmaps/cntr_ptrmsk | 6 - nx-X11/include/bitmaps/cross_weave | 6 - nx-X11/include/bitmaps/dimple1 | 6 - nx-X11/include/bitmaps/dimple3 | 6 - nx-X11/include/bitmaps/dot | 6 - nx-X11/include/bitmaps/dropbar7 | 4 - nx-X11/include/bitmaps/dropbar8 | 4 - nx-X11/include/bitmaps/escherknot | 473 --------------- nx-X11/include/bitmaps/flagdown | 27 - nx-X11/include/bitmaps/flagup | 27 - nx-X11/include/bitmaps/flipped_gray | 4 - nx-X11/include/bitmaps/gray | 4 - nx-X11/include/bitmaps/gray1 | 4 - nx-X11/include/bitmaps/gray3 | 4 - nx-X11/include/bitmaps/grid16 | 6 - nx-X11/include/bitmaps/grid2 | 4 - nx-X11/include/bitmaps/grid4 | 4 - nx-X11/include/bitmaps/grid8 | 4 - nx-X11/include/bitmaps/hlines2 | 4 - nx-X11/include/bitmaps/hlines3 | 4 - nx-X11/include/bitmaps/icon | 6 - nx-X11/include/bitmaps/keyboard16 | 6 - nx-X11/include/bitmaps/left_ptr | 8 - nx-X11/include/bitmaps/left_ptrmsk | 6 - nx-X11/include/bitmaps/letters | 27 - nx-X11/include/bitmaps/light_gray | 4 - nx-X11/include/bitmaps/mailempty | 27 - nx-X11/include/bitmaps/mailemptymsk | 27 - nx-X11/include/bitmaps/mailfull | 27 - nx-X11/include/bitmaps/mailfullmsk | 27 - nx-X11/include/bitmaps/mensetmanus | 258 -------- nx-X11/include/bitmaps/menu10 | 5 - nx-X11/include/bitmaps/menu12 | 5 - nx-X11/include/bitmaps/menu16 | 6 - nx-X11/include/bitmaps/menu6 | 4 - nx-X11/include/bitmaps/menu8 | 4 - nx-X11/include/bitmaps/noletters | 27 - nx-X11/include/bitmaps/opendot | 8 - nx-X11/include/bitmaps/opendotMask | 8 - nx-X11/include/bitmaps/plaid | 11 - nx-X11/include/bitmaps/right_ptr | 8 - nx-X11/include/bitmaps/right_ptrmsk | 6 - nx-X11/include/bitmaps/root_weave | 4 - nx-X11/include/bitmaps/scales | 6 - nx-X11/include/bitmaps/sipb | 16 - nx-X11/include/bitmaps/star | 8 - nx-X11/include/bitmaps/starMask | 8 - nx-X11/include/bitmaps/stipple | 4 - nx-X11/include/bitmaps/target | 6 - nx-X11/include/bitmaps/terminal | 52 -- nx-X11/include/bitmaps/tie_fighter | 6 - nx-X11/include/bitmaps/vlines2 | 4 - nx-X11/include/bitmaps/vlines3 | 4 - nx-X11/include/bitmaps/weird_size | 5 - nx-X11/include/bitmaps/wide_weave | 6 - nx-X11/include/bitmaps/wingdogs | 14 - nx-X11/include/bitmaps/woman | 66 --- nx-X11/include/bitmaps/xfd_icon | 27 - nx-X11/include/bitmaps/xlogo11 | 6 - nx-X11/include/bitmaps/xlogo16 | 6 - nx-X11/include/bitmaps/xlogo32 | 14 - nx-X11/include/bitmaps/xlogo64 | 46 -- nx-X11/include/bitmaps/xsnow | 1112 ----------------------------------- nx-libs.spec | 1 - 74 files changed, 2 insertions(+), 2687 deletions(-) delete mode 100644 nx-X11/include/bitmaps/1x1 delete mode 100644 nx-X11/include/bitmaps/2x2 delete mode 100644 nx-X11/include/bitmaps/Imakefile delete mode 100644 nx-X11/include/bitmaps/black delete mode 100644 nx-X11/include/bitmaps/boxes delete mode 100644 nx-X11/include/bitmaps/calculator delete mode 100644 nx-X11/include/bitmaps/cntr_ptr delete mode 100644 nx-X11/include/bitmaps/cntr_ptrmsk delete mode 100644 nx-X11/include/bitmaps/cross_weave delete mode 100644 nx-X11/include/bitmaps/dimple1 delete mode 100644 nx-X11/include/bitmaps/dimple3 delete mode 100644 nx-X11/include/bitmaps/dot delete mode 100644 nx-X11/include/bitmaps/dropbar7 delete mode 100644 nx-X11/include/bitmaps/dropbar8 delete mode 100644 nx-X11/include/bitmaps/escherknot delete mode 100644 nx-X11/include/bitmaps/flagdown delete mode 100644 nx-X11/include/bitmaps/flagup delete mode 100644 nx-X11/include/bitmaps/flipped_gray delete mode 100644 nx-X11/include/bitmaps/gray delete mode 100644 nx-X11/include/bitmaps/gray1 delete mode 100644 nx-X11/include/bitmaps/gray3 delete mode 100644 nx-X11/include/bitmaps/grid16 delete mode 100644 nx-X11/include/bitmaps/grid2 delete mode 100644 nx-X11/include/bitmaps/grid4 delete mode 100644 nx-X11/include/bitmaps/grid8 delete mode 100644 nx-X11/include/bitmaps/hlines2 delete mode 100644 nx-X11/include/bitmaps/hlines3 delete mode 100644 nx-X11/include/bitmaps/icon delete mode 100644 nx-X11/include/bitmaps/keyboard16 delete mode 100644 nx-X11/include/bitmaps/left_ptr delete mode 100644 nx-X11/include/bitmaps/left_ptrmsk delete mode 100644 nx-X11/include/bitmaps/letters delete mode 100644 nx-X11/include/bitmaps/light_gray delete mode 100644 nx-X11/include/bitmaps/mailempty delete mode 100644 nx-X11/include/bitmaps/mailemptymsk delete mode 100644 nx-X11/include/bitmaps/mailfull delete mode 100644 nx-X11/include/bitmaps/mailfullmsk delete mode 100644 nx-X11/include/bitmaps/mensetmanus delete mode 100644 nx-X11/include/bitmaps/menu10 delete mode 100644 nx-X11/include/bitmaps/menu12 delete mode 100644 nx-X11/include/bitmaps/menu16 delete mode 100644 nx-X11/include/bitmaps/menu6 delete mode 100644 nx-X11/include/bitmaps/menu8 delete mode 100644 nx-X11/include/bitmaps/noletters delete mode 100644 nx-X11/include/bitmaps/opendot delete mode 100644 nx-X11/include/bitmaps/opendotMask delete mode 100644 nx-X11/include/bitmaps/plaid delete mode 100644 nx-X11/include/bitmaps/right_ptr delete mode 100644 nx-X11/include/bitmaps/right_ptrmsk delete mode 100644 nx-X11/include/bitmaps/root_weave delete mode 100644 nx-X11/include/bitmaps/scales delete mode 100644 nx-X11/include/bitmaps/sipb delete mode 100644 nx-X11/include/bitmaps/star delete mode 100644 nx-X11/include/bitmaps/starMask delete mode 100644 nx-X11/include/bitmaps/stipple delete mode 100644 nx-X11/include/bitmaps/target delete mode 100644 nx-X11/include/bitmaps/terminal delete mode 100644 nx-X11/include/bitmaps/tie_fighter delete mode 100644 nx-X11/include/bitmaps/vlines2 delete mode 100644 nx-X11/include/bitmaps/vlines3 delete mode 100644 nx-X11/include/bitmaps/weird_size delete mode 100644 nx-X11/include/bitmaps/wide_weave delete mode 100644 nx-X11/include/bitmaps/wingdogs delete mode 100644 nx-X11/include/bitmaps/woman delete mode 100644 nx-X11/include/bitmaps/xfd_icon delete mode 100644 nx-X11/include/bitmaps/xlogo11 delete mode 100644 nx-X11/include/bitmaps/xlogo16 delete mode 100644 nx-X11/include/bitmaps/xlogo32 delete mode 100644 nx-X11/include/bitmaps/xlogo64 delete mode 100644 nx-X11/include/bitmaps/xsnow (limited to 'debian') diff --git a/Makefile b/Makefile index 6400f21dd..9f6442181 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ install-full: $(INSTALL_DIR) $(DESTDIR)$(USRLIBDIR) $(COPY_SYMLINK) nx-X11/.build-exports/lib/*.so* $(DESTDIR)$(USRLIBDIR)/ - . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | grep -v "include/X11/bitmaps" | \ + . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | \ while read dirname; do \ $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"; \ $(INSTALL_FILE) $${dirname}/*.h \ @@ -161,10 +161,6 @@ install-full: $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama $(INSTALL_SYMLINK) $(USRLIBDIR)/libNX_Xinerama.so.1 $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 - $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps - $(INSTALL_FILE) nx-X11/.build-exports/include/X11/bitmaps/* \ - $(DESTDIR)$(INCLUDEDIR)/nx/X11/bitmaps/ - $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/ diff --git a/debian/rules b/debian/rules index dd4f1c7c2..0da6db71a 100755 --- a/debian/rules +++ b/debian/rules @@ -43,7 +43,6 @@ override_dh_install: # remove extras, GL, and other unneeded headers rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/GL/ - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/bitmaps/ rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XInput.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XK*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/*Xv*.h diff --git a/nx-X11/include/Imakefile b/nx-X11/include/Imakefile index 39d330d04..74d775b75 100644 --- a/nx-X11/include/Imakefile +++ b/nx-X11/include/Imakefile @@ -15,7 +15,7 @@ GLXDIR = GL DPSDIR = DPS #endif -SUBDIRS = bitmaps extensions $(GLXDIR) $(DPSDIR) +SUBDIRS = extensions $(GLXDIR) $(DPSDIR) #ifdef Win32Architecture EXTRA_HEADERS = Xw32defs.h Xwinsock.h Xwindows.h diff --git a/nx-X11/include/bitmaps/1x1 b/nx-X11/include/bitmaps/1x1 deleted file mode 100644 index 6d013d4af..000000000 --- a/nx-X11/include/bitmaps/1x1 +++ /dev/null @@ -1,6 +0,0 @@ -#define 1x1_width 16 -#define 1x1_height 16 -static char 1x1_bits[] = { - 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, - 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, - 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55}; diff --git a/nx-X11/include/bitmaps/2x2 b/nx-X11/include/bitmaps/2x2 deleted file mode 100644 index 8490457a1..000000000 --- a/nx-X11/include/bitmaps/2x2 +++ /dev/null @@ -1,6 +0,0 @@ -#define 2x2_width 16 -#define 2x2_height 16 -static char 2x2_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, - 0x33, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33, - 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33}; diff --git a/nx-X11/include/bitmaps/Imakefile b/nx-X11/include/bitmaps/Imakefile deleted file mode 100644 index 4e1ec0b0b..000000000 --- a/nx-X11/include/bitmaps/Imakefile +++ /dev/null @@ -1,86 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:43 coskrey Exp $ - - - -XCOMM $XFree86$ - -HEADERS = \ - 1x1 \ - 2x2 \ - black \ - boxes \ - calculator \ - cntr_ptr \ - cntr_ptrmsk \ - cross_weave \ - dimple1 \ - dimple3 \ - dot \ - dropbar7 \ - dropbar8 \ - escherknot \ - flagdown \ - flagup \ - flipped_gray \ - gray \ - gray1 \ - gray3 \ - grid2 \ - grid4 \ - grid8 \ - grid16 \ - hlines2 \ - hlines3 \ - icon \ - keyboard16 \ - left_ptr \ - left_ptrmsk \ - letters \ - light_gray \ - mailempty \ - mailemptymsk \ - mailfull \ - mailfullmsk \ - mensetmanus \ - menu6 \ - menu8 \ - menu10 \ - menu12 \ - menu16 \ - noletters \ - opendot \ - opendotMask \ - plaid \ - right_ptr \ - right_ptrmsk \ - root_weave \ - scales \ - sipb \ - star \ - starMask \ - stipple \ - target \ - terminal \ - tie_fighter \ - vlines2 \ - vlines3 \ - weird_size \ - wide_weave \ - wingdogs \ - woman \ - xfd_icon \ - xlogo11 \ - xlogo16 \ - xlogo32 \ - xlogo64 \ - xsnow - - -all:: - -BuildIncludes($(HEADERS),X11/bitmaps,../..) - -#if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/bitmaps,$(INSTINCFLAGS)) -#endif - diff --git a/nx-X11/include/bitmaps/black b/nx-X11/include/bitmaps/black deleted file mode 100644 index 3a1ec90a3..000000000 --- a/nx-X11/include/bitmaps/black +++ /dev/null @@ -1,6 +0,0 @@ -#define black_width 16 -#define black_height 16 -static char black_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/nx-X11/include/bitmaps/boxes b/nx-X11/include/bitmaps/boxes deleted file mode 100644 index 0deb80130..000000000 --- a/nx-X11/include/bitmaps/boxes +++ /dev/null @@ -1,6 +0,0 @@ -#define boxes_width 16 -#define boxes_height 16 -static char boxes_bits[] = { - 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0xf0, 0xf0, 0x90, 0x90, - 0x90, 0x90, 0xf0, 0xf0, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, - 0xf0, 0xf0, 0x90, 0x90, 0x90, 0x90, 0xf0, 0xf0}; diff --git a/nx-X11/include/bitmaps/calculator b/nx-X11/include/bitmaps/calculator deleted file mode 100644 index 2be3b9d5a..000000000 --- a/nx-X11/include/bitmaps/calculator +++ /dev/null @@ -1,19 +0,0 @@ -#define icon_width 28 -#define icon_height 48 -static char icon_bits[] = { - 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0x03, 0x00, 0x00, 0x0c, - 0xd3, 0x5d, 0x5d, 0x0c, 0x13, 0x51, 0x45, 0x0c, 0xd3, 0xdd, 0xdd, 0x0d, - 0x53, 0x10, 0x51, 0x0d, 0xd3, 0x1d, 0xdd, 0x0d, 0x03, 0x00, 0x00, 0x0c, - 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x08, - 0xbd, 0xf7, 0xde, 0x0b, 0xbd, 0xf7, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, - 0xbd, 0xf7, 0xde, 0x0b, 0xa5, 0x94, 0x52, 0x0a, 0xbd, 0xf7, 0xde, 0x0b, - 0x01, 0x00, 0x00, 0x08, 0xbd, 0xf7, 0xde, 0x0b, 0xbd, 0xf7, 0xde, 0x0b, - 0xbd, 0xf7, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, 0xbd, 0xf7, 0xde, 0x0b, - 0xbd, 0xf7, 0xde, 0x0b, 0xbd, 0xf7, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, - 0xbd, 0xf7, 0xde, 0x0b, 0xbd, 0x94, 0xd2, 0x0b, 0xbd, 0x94, 0xd2, 0x0b, - 0xbd, 0xf7, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, 0xbd, 0xf7, 0xde, 0x0b, - 0xbd, 0x94, 0xd2, 0x0b, 0xbd, 0x94, 0xd2, 0x0b, 0xbd, 0xf7, 0xde, 0x0b, - 0x01, 0x00, 0x00, 0x08, 0xbd, 0xf7, 0xde, 0x0b, 0xbd, 0x94, 0xd2, 0x0b, - 0xbd, 0x94, 0xd2, 0x0b, 0xbd, 0xf7, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, - 0xbd, 0xff, 0xde, 0x0b, 0xbd, 0x80, 0xd2, 0x0b, 0xbd, 0x80, 0xd2, 0x0b, - 0xbd, 0xff, 0xde, 0x0b, 0x01, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0x0f}; diff --git a/nx-X11/include/bitmaps/cntr_ptr b/nx-X11/include/bitmaps/cntr_ptr deleted file mode 100644 index eddb25f1e..000000000 --- a/nx-X11/include/bitmaps/cntr_ptr +++ /dev/null @@ -1,8 +0,0 @@ -#define cntr_ptr_width 16 -#define cntr_ptr_height 16 -#define cntr_ptr_x_hot 7 -#define cntr_ptr_y_hot 1 -static char cntr_ptr_bits[] = { - 0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x07, - 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, 0x98, 0x19, 0x88, 0x11, 0x80, 0x01, - 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/cntr_ptrmsk b/nx-X11/include/bitmaps/cntr_ptrmsk deleted file mode 100644 index d3607a4ba..000000000 --- a/nx-X11/include/bitmaps/cntr_ptrmsk +++ /dev/null @@ -1,6 +0,0 @@ -#define cntr_ptrmsk_width 16 -#define cntr_ptrmsk_height 16 -static char cntr_ptrmsk_bits[] = { - 0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, - 0xf8, 0x1f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xdc, 0x3b, - 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03}; diff --git a/nx-X11/include/bitmaps/cross_weave b/nx-X11/include/bitmaps/cross_weave deleted file mode 100644 index 40de9e426..000000000 --- a/nx-X11/include/bitmaps/cross_weave +++ /dev/null @@ -1,6 +0,0 @@ -#define cross_weave_width 16 -#define cross_weave_height 16 -static char cross_weave_bits[] = { - 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22, 0x55, 0x55, 0x88, 0x88, - 0x55, 0x55, 0x22, 0x22, 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22, - 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22}; diff --git a/nx-X11/include/bitmaps/dimple1 b/nx-X11/include/bitmaps/dimple1 deleted file mode 100644 index 9144605a8..000000000 --- a/nx-X11/include/bitmaps/dimple1 +++ /dev/null @@ -1,6 +0,0 @@ -#define dimple1_width 16 -#define dimple1_height 16 -static char dimple1_bits[] = { - 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, - 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, - 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/dimple3 b/nx-X11/include/bitmaps/dimple3 deleted file mode 100644 index 209b4e8b2..000000000 --- a/nx-X11/include/bitmaps/dimple3 +++ /dev/null @@ -1,6 +0,0 @@ -#define dimple3_width 16 -#define dimple3_height 16 -static char dimple3_bits[] = { - 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/dot b/nx-X11/include/bitmaps/dot deleted file mode 100644 index e403eebe9..000000000 --- a/nx-X11/include/bitmaps/dot +++ /dev/null @@ -1,6 +0,0 @@ -#define dot_width 16 -#define dot_height 16 -static char dot_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xf0, 0x0f, 0xf0, 0x0f, - 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x0f, 0xf0, 0x0f, - 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/dropbar7 b/nx-X11/include/bitmaps/dropbar7 deleted file mode 100644 index 26893009b..000000000 --- a/nx-X11/include/bitmaps/dropbar7 +++ /dev/null @@ -1,4 +0,0 @@ -#define bar7_width 7 -#define bar7_height 7 -static char bar7_bits[] = { - 0x00, 0x3f, 0x61, 0x61, 0x7f, 0x7e, 0x00}; diff --git a/nx-X11/include/bitmaps/dropbar8 b/nx-X11/include/bitmaps/dropbar8 deleted file mode 100644 index d7cfdeb9a..000000000 --- a/nx-X11/include/bitmaps/dropbar8 +++ /dev/null @@ -1,4 +0,0 @@ -#define dropbar8_width 8 -#define dropbar8_height 8 -static char dropbar8_bits[] = { - 0x00, 0x7f, 0xc1, 0xc1, 0xc1, 0xff, 0xfe, 0x00}; diff --git a/nx-X11/include/bitmaps/escherknot b/nx-X11/include/bitmaps/escherknot deleted file mode 100644 index 80bc471b2..000000000 --- a/nx-X11/include/bitmaps/escherknot +++ /dev/null @@ -1,473 +0,0 @@ -#define escherknot_width 216 -#define escherknot_height 208 - -static char escherknot_bits[] = { - 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, 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, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x5f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0x6f, 0xf6, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0xff, 0x3a, 0x13, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0d, 0x02, 0x51, 0x71, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, 0x20, 0xd9, 0x88, - 0x9b, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x82, - 0xac, 0x44, 0x4e, 0x1c, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1e, 0x40, 0x02, 0x44, 0x60, 0xe2, 0xfc, 0x06, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x25, 0x09, 0x90, 0x22, 0x13, 0xb7, 0x9a, 0x1e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x40, 0x10, 0x89, - 0x18, 0xe3, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x04, 0x08, - 0x01, 0x10, 0xc8, 0xa8, 0xd5, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x80, 0x20, 0x40, 0x82, 0x00, 0x66, 0x9c, 0xec, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x08, 0x08, 0x24, 0x12, 0x93, 0x5b, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x12, 0x80, 0x04, 0x01, 0x00, 0x80, - 0x19, 0x33, 0xfa, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x80, 0x00, - 0x20, 0x08, 0x12, 0xc4, 0x68, 0x26, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x04, 0x24, 0x00, 0x01, 0x40, 0x24, 0x8c, 0xcd, 0x3f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x80, 0x49, 0x10, 0x90, 0x00, 0x21, 0x20, 0x08, 0x11, 0x43, 0xd9, - 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, - 0xff, 0xff, 0x0b, 0x00, 0x60, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x30, 0xb9, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x97, 0x04, 0x08, 0xfe, 0x05, 0x30, 0x10, 0x12, 0x20, 0x20, - 0x04, 0x00, 0x80, 0x48, 0x0c, 0xa3, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3e, 0x92, 0x20, 0x49, 0x40, 0x3e, 0x0e, 0x82, - 0x00, 0x84, 0x25, 0x01, 0x80, 0x00, 0x80, 0xc8, 0x34, 0xed, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x25, 0x01, 0x04, 0x01, 0x08, - 0xd0, 0x17, 0x00, 0x80, 0x25, 0x01, 0xad, 0x04, 0x12, 0x20, 0x23, 0x4c, - 0x6a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x48, - 0x92, 0x20, 0x41, 0x92, 0x9e, 0x80, 0x24, 0x24, 0x29, 0x00, 0x04, 0x00, - 0x10, 0x98, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x4f, 0x10, 0x01, 0x90, 0x24, 0x40, 0x12, 0xf0, 0x00, 0x24, 0x41, 0x0b, - 0xa9, 0x10, 0x00, 0x00, 0x04, 0xd9, 0x96, 0x0e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x92, 0x48, 0x02, 0x04, 0x09, 0xc0, 0x84, 0x8f, - 0x29, 0x2d, 0xf8, 0xa9, 0x02, 0x00, 0x00, 0x20, 0x90, 0xf4, 0x1e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x24, 0x91, 0x04, 0x50, 0x22, 0x24, - 0x1b, 0x12, 0x7a, 0x48, 0xca, 0x03, 0x21, 0x10, 0x00, 0x00, 0x48, 0x93, - 0xff, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x24, 0x92, 0x20, - 0x81, 0xda, 0x24, 0xc8, 0x16, 0xd0, 0xe7, 0x50, 0xd2, 0xbf, 0x03, 0x00, - 0x80, 0x00, 0x30, 0x29, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, - 0x20, 0x80, 0x24, 0x41, 0x12, 0x2a, 0x41, 0xb2, 0x80, 0x33, 0x0e, 0x7e, - 0x88, 0x1c, 0x01, 0x00, 0xa0, 0x24, 0x69, 0x75, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x82, 0x44, 0x11, 0x24, 0x09, 0x90, 0xa4, 0x4d, 0xd2, 0x92, - 0x9e, 0xd3, 0x83, 0x6b, 0x62, 0x00, 0x00, 0x10, 0x22, 0xff, 0x7f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x42, 0x04, 0x92, 0x24, 0x6b, 0x53, 0x32, - 0x59, 0x90, 0x16, 0xfa, 0xb4, 0xf4, 0xff, 0x0f, 0x01, 0x00, 0x90, 0x68, - 0x4a, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x90, 0x24, 0x11, 0x24, - 0x49, 0xda, 0x82, 0xc5, 0x92, 0xd2, 0xd0, 0x9e, 0x1e, 0x00, 0x78, 0x0a, - 0x00, 0x00, 0x05, 0xd2, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x02, - 0x44, 0xb2, 0x65, 0xea, 0x49, 0x9e, 0x2c, 0x4b, 0x1a, 0xd2, 0xeb, 0xe3, - 0xff, 0xc7, 0x09, 0x00, 0x20, 0x68, 0xff, 0xd6, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x0b, 0x90, 0x40, 0x92, 0x24, 0x09, 0x5f, 0xd2, 0x64, 0x59, 0x72, - 0x56, 0x7f, 0xfd, 0xdf, 0x1f, 0x12, 0x00, 0x20, 0x49, 0x92, 0xde, 0x01, - 0x00, 0x00, 0x00, 0x80, 0x41, 0x92, 0x4c, 0x92, 0x24, 0x25, 0xc9, 0x8b, - 0x2e, 0xcb, 0x92, 0x4b, 0x5a, 0x2f, 0x75, 0xf4, 0x04, 0x00, 0x00, 0x41, - 0xf6, 0x74, 0x01, 0x00, 0x00, 0x00, 0x40, 0x49, 0x02, 0x00, 0xba, 0xb6, - 0xfd, 0x49, 0xf8, 0x74, 0x6d, 0x4b, 0x72, 0xed, 0xdb, 0xff, 0xcf, 0x53, - 0x00, 0x00, 0x48, 0xb6, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x60, 0x48, 0x10, - 0xc9, 0x93, 0x24, 0x00, 0x7b, 0xc3, 0xa6, 0x69, 0x58, 0x5a, 0xfb, 0xfa, - 0xa5, 0xbe, 0x16, 0x00, 0x00, 0x92, 0xa4, 0xfd, 0x03, 0x00, 0x00, 0x00, - 0x30, 0x01, 0x20, 0x5d, 0xa2, 0xfe, 0x7f, 0x01, 0x4f, 0x1a, 0xcd, 0x6b, - 0x6a, 0xa9, 0x5f, 0xff, 0xf3, 0x24, 0x01, 0x40, 0xc0, 0xb4, 0xf4, 0x03, - 0x00, 0x00, 0x00, 0x2c, 0x88, 0x84, 0x89, 0xb6, 0x00, 0x24, 0x7d, 0x69, - 0xf2, 0x34, 0xad, 0x99, 0x2d, 0xf7, 0xff, 0x9f, 0x4b, 0x00, 0x00, 0x92, - 0xa6, 0xad, 0x07, 0x00, 0x00, 0x00, 0x06, 0x91, 0x24, 0xe9, 0xa4, 0xfd, - 0xa5, 0xa9, 0x4b, 0x93, 0xe7, 0x34, 0x63, 0xf9, 0xfc, 0xd5, 0xef, 0x16, - 0x00, 0x40, 0x90, 0xb4, 0xbd, 0x07, 0x00, 0x00, 0x00, 0x6a, 0x80, 0x4c, - 0x96, 0xbe, 0x2d, 0xfd, 0x2f, 0x7c, 0x5e, 0x9c, 0x67, 0xad, 0xa5, 0xfd, - 0xff, 0xbf, 0x29, 0x00, 0x00, 0x92, 0x76, 0xed, 0x06, 0x00, 0x00, 0x00, - 0x05, 0x12, 0x48, 0x53, 0x25, 0x65, 0x25, 0xf4, 0xe5, 0xd3, 0x72, 0x9c, - 0x35, 0xdf, 0xf6, 0x7f, 0xf5, 0x56, 0x00, 0x00, 0x92, 0xa4, 0xed, 0x0f, - 0x00, 0x00, 0x80, 0x49, 0x20, 0x59, 0x38, 0xec, 0xff, 0xff, 0xad, 0x2f, - 0x5d, 0xd3, 0x33, 0xe6, 0x24, 0xed, 0xff, 0xdf, 0x2d, 0x01, 0x40, 0x80, - 0x24, 0xbd, 0x07, 0x00, 0x00, 0xc0, 0x48, 0x24, 0x49, 0x87, 0x37, 0x21, - 0xa0, 0xbd, 0xf4, 0x79, 0x4f, 0xc7, 0x9c, 0xde, 0xf6, 0xff, 0xff, 0x5b, - 0x08, 0x00, 0x92, 0xfc, 0xe9, 0x0e, 0x00, 0x00, 0x20, 0x89, 0x40, 0xd3, - 0xf4, 0x49, 0xff, 0xff, 0xe7, 0x2f, 0xcf, 0x79, 0x9c, 0x53, 0xb2, 0x35, - 0xff, 0xff, 0x37, 0x00, 0x40, 0x90, 0x24, 0xef, 0x0e, 0x00, 0x00, 0x30, - 0x91, 0x49, 0x32, 0x2d, 0xff, 0x6b, 0xb7, 0xbd, 0xbc, 0x3c, 0xef, 0x79, - 0xce, 0xde, 0xd6, 0xfd, 0xff, 0x9f, 0x00, 0x00, 0x92, 0xa6, 0xad, 0x0b, - 0x00, 0x00, 0x30, 0x11, 0x89, 0x8c, 0xcb, 0x5b, 0xba, 0xaf, 0xf6, 0xd7, - 0xe7, 0x35, 0xe7, 0x59, 0xb3, 0xfb, 0xff, 0xff, 0x7f, 0x04, 0x40, 0x80, - 0xe4, 0xb9, 0x1f, 0x00, 0x00, 0x48, 0x22, 0x91, 0x66, 0x79, 0xeb, 0xff, - 0xff, 0xdf, 0xbe, 0xbe, 0xe7, 0x8c, 0x75, 0x6b, 0x4a, 0xfa, 0xbf, 0x7f, - 0x00, 0x00, 0x82, 0x24, 0xef, 0x0e, 0x00, 0x00, 0x4c, 0x22, 0xb2, 0x79, - 0x5e, 0xfa, 0x5b, 0xa9, 0xfd, 0xeb, 0xf5, 0x9c, 0x3d, 0xc6, 0xcc, 0xee, - 0xed, 0x01, 0xf8, 0x00, 0x40, 0x82, 0xb6, 0xa9, 0x1b, 0x00, 0x00, 0x94, - 0x64, 0x66, 0x8e, 0xd3, 0x97, 0xfe, 0xff, 0xd7, 0xdf, 0x9f, 0x7b, 0xf3, - 0x3c, 0x35, 0x59, 0x6b, 0x00, 0x70, 0x00, 0x00, 0x40, 0xe4, 0xed, 0x1e, - 0x00, 0x00, 0x92, 0xc4, 0x34, 0xf3, 0xfc, 0xfd, 0x5f, 0xad, 0x7d, 0xfa, - 0x7a, 0xce, 0x8e, 0xb3, 0x76, 0x2f, 0xfd, 0x00, 0xe0, 0x04, 0x00, 0x9a, - 0x26, 0xaf, 0x1e, 0x00, 0x00, 0x13, 0x88, 0xcc, 0xb5, 0x3f, 0xbf, 0xff, - 0xff, 0xd7, 0xef, 0xef, 0xbd, 0x79, 0x6a, 0xde, 0xec, 0xab, 0x01, 0xc0, - 0x00, 0x00, 0x40, 0xb6, 0xbd, 0x1b, 0x00, 0x00, 0x05, 0x91, 0xeb, 0x5c, - 0xeb, 0xeb, 0xff, 0xff, 0xff, 0x7e, 0xef, 0x6b, 0xef, 0xcd, 0x99, 0xb3, - 0xe4, 0x07, 0x80, 0x00, 0x40, 0x49, 0xb2, 0xe5, 0x1a, 0x00, 0x80, 0x20, - 0x32, 0xb1, 0xe7, 0x79, 0x7f, 0xf7, 0xff, 0xfd, 0xeb, 0xbd, 0xfe, 0x2c, - 0x3d, 0x6b, 0xb6, 0xaf, 0x06, 0x80, 0x00, 0x00, 0x41, 0x96, 0xfe, 0x1e, - 0x00, 0x80, 0x44, 0xb2, 0x9b, 0xf9, 0xde, 0xff, 0xff, 0xff, 0x7f, 0xbf, - 0xf7, 0xbb, 0xb3, 0x77, 0xce, 0xce, 0xb6, 0x0d, 0x80, 0x01, 0x00, 0x49, - 0xf2, 0x94, 0x1f, 0x00, 0x40, 0x49, 0x44, 0xe6, 0x9e, 0x77, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xbf, 0xf7, 0x7e, 0xd6, 0xbc, 0xd9, 0xba, 0x3b, 0x80, - 0x00, 0x00, 0x64, 0x93, 0xf7, 0x1b, 0x00, 0x40, 0x89, 0xec, 0x7e, 0x67, - 0xbd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xce, 0xdb, 0x99, 0x33, 0x37, - 0xd3, 0x36, 0x80, 0x01, 0x80, 0x24, 0xda, 0xd6, 0x1e, 0x00, 0x20, 0x90, - 0x99, 0x99, 0x7b, 0xef, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xef, 0xbd, 0x37, - 0x63, 0xf3, 0x66, 0xdb, 0x7a, 0x80, 0x00, 0x00, 0x24, 0x59, 0xde, 0x1f, - 0x00, 0x60, 0x12, 0xb3, 0xf7, 0xdd, 0xfb, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xbf, 0xf7, 0xfe, 0x6e, 0xce, 0xdd, 0x6d, 0xd7, 0x80, 0x00, 0x80, 0x20, - 0xcb, 0xfb, 0x1f, 0x00, 0x10, 0x20, 0x6e, 0x66, 0x76, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xef, 0xde, 0xdb, 0x9b, 0x99, 0xb3, 0x5d, 0x6b, 0x81, - 0x00, 0x40, 0x96, 0x59, 0x6a, 0x1f, 0x00, 0x98, 0xc4, 0xe4, 0xdf, 0xff, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7b, 0x6f, 0x7b, 0x37, 0x7f, - 0xb3, 0xdd, 0x83, 0x00, 0x00, 0xb0, 0xed, 0xef, 0x1d, 0x00, 0x10, 0x88, - 0x9e, 0xdd, 0xcd, 0xbd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xed, - 0x6c, 0xe6, 0xcc, 0x76, 0x6d, 0xc1, 0x00, 0x40, 0x91, 0x24, 0x7b, 0x1f, - 0x00, 0x08, 0xd1, 0xf1, 0x66, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xdf, 0xbd, 0xbf, 0xd9, 0xdd, 0xdd, 0xb6, 0x47, 0x00, 0x00, 0xd8, - 0xb4, 0xad, 0x1f, 0x00, 0x24, 0x24, 0x6f, 0xf6, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0xb7, 0x9d, 0x33, 0xd9, 0x96, 0x4e, - 0x00, 0x20, 0x49, 0xf7, 0xfd, 0x1e, 0x00, 0x48, 0xe4, 0xac, 0xb9, 0xdd, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xdd, 0x76, 0xb6, - 0xb7, 0xfd, 0x7a, 0x00, 0x00, 0x44, 0x96, 0xb7, 0x1f, 0x00, 0x02, 0x9a, - 0xbe, 0x6f, 0x77, 0xff, 0xff, 0x7f, 0x61, 0xd9, 0xff, 0xff, 0xff, 0xfd, - 0xdd, 0x66, 0xed, 0x66, 0x5b, 0x37, 0x00, 0x90, 0x64, 0xb9, 0xf6, 0x1f, - 0x00, 0x02, 0xc9, 0xf3, 0xee, 0xfd, 0xff, 0xff, 0x2f, 0x24, 0x4f, 0xfe, - 0xff, 0xff, 0x7f, 0x37, 0xdb, 0xcd, 0x7c, 0xff, 0x3a, 0x00, 0x88, 0x24, - 0xdb, 0xde, 0x1a, 0x00, 0x13, 0x31, 0x6f, 0xbb, 0xdf, 0xff, 0xff, 0x21, - 0xa0, 0x64, 0xf3, 0xff, 0xff, 0xe7, 0xff, 0x96, 0xbb, 0x9b, 0xa5, 0x1d, - 0x00, 0x60, 0x32, 0xe9, 0xdb, 0x0f, 0x00, 0x65, 0xe6, 0x3c, 0xfb, 0xf6, - 0xff, 0x7f, 0x10, 0xa4, 0xb5, 0x9d, 0xfe, 0xdf, 0xdf, 0xdd, 0x6d, 0x32, - 0xb3, 0x7d, 0x0d, 0x00, 0x0b, 0x93, 0x7c, 0x7b, 0x0f, 0x00, 0x89, 0xdc, - 0xb3, 0xed, 0xfb, 0xff, 0x1f, 0x10, 0x90, 0x92, 0xd9, 0xfe, 0x7f, 0xff, - 0x77, 0xdb, 0xee, 0x6e, 0xdb, 0x0e, 0x00, 0x20, 0xdd, 0x66, 0x6f, 0x0f, - 0x80, 0x91, 0x5a, 0xfb, 0xbe, 0xef, 0xff, 0x0f, 0x10, 0xda, 0x92, 0xee, - 0xff, 0xff, 0xff, 0xf7, 0xb7, 0xcd, 0xee, 0xde, 0x07, 0x00, 0x24, 0x49, - 0xb6, 0xed, 0x0f, 0x00, 0x12, 0x6b, 0xcd, 0xf3, 0xbe, 0xff, 0x07, 0x08, - 0x48, 0xda, 0x76, 0xb7, 0xff, 0xff, 0xdd, 0x6e, 0xba, 0x99, 0x65, 0x03, - 0x40, 0x92, 0xe4, 0xba, 0xbd, 0x0e, 0x80, 0x62, 0xed, 0x7d, 0x5f, 0xf7, - 0xff, 0x01, 0x08, 0x28, 0xc9, 0x26, 0xbb, 0xff, 0xff, 0xff, 0x99, 0xb7, - 0xbb, 0x7d, 0x03, 0x00, 0x89, 0x64, 0xdb, 0xf6, 0x07, 0x40, 0x0c, 0x35, - 0xe7, 0x79, 0xdd, 0xff, 0x01, 0x84, 0xa5, 0x7d, 0xba, 0xdd, 0xfe, 0x7f, - 0xbf, 0xbf, 0x6d, 0x76, 0xdb, 0x01, 0x00, 0x48, 0x36, 0xdb, 0xd6, 0x07, - 0xc0, 0x88, 0xb4, 0xb6, 0xbf, 0xff, 0x7f, 0x00, 0x0c, 0x24, 0x44, 0xdb, - 0xed, 0xff, 0xdf, 0xef, 0x6e, 0xdb, 0x6e, 0xb7, 0x00, 0x80, 0x44, 0x93, - 0xed, 0x5b, 0x07, 0x40, 0x91, 0xd2, 0xfa, 0xfc, 0xf6, 0x7f, 0x00, 0x02, - 0xb4, 0x35, 0xd9, 0xef, 0xff, 0xff, 0xfb, 0xef, 0xb6, 0xc9, 0xe4, 0x00, - 0x10, 0x24, 0xd9, 0x6d, 0xfb, 0x03, 0x00, 0x27, 0xfe, 0xd3, 0xd6, 0xdb, - 0x3f, 0x00, 0xa2, 0x94, 0xb4, 0xdb, 0x7c, 0xff, 0xff, 0xbf, 0xd9, 0xad, - 0xdb, 0x7d, 0x00, 0x40, 0x32, 0xd9, 0xb6, 0xef, 0x03, 0x60, 0xe4, 0x5a, - 0x5f, 0x5f, 0xff, 0x1f, 0x00, 0x02, 0x52, 0x92, 0xec, 0xb6, 0xff, 0xff, - 0xef, 0xff, 0x6d, 0xb6, 0x3b, 0x00, 0x28, 0x90, 0xcc, 0xbe, 0xfd, 0x03, - 0xa0, 0x88, 0xeb, 0xf9, 0xfd, 0xf5, 0x1f, 0x00, 0x82, 0x53, 0xbb, 0x6d, - 0xf7, 0xff, 0xf9, 0xff, 0x6f, 0xdb, 0x6d, 0x1b, 0x00, 0x04, 0xc9, 0x66, - 0xdb, 0x57, 0x03, 0xa0, 0x52, 0xaf, 0xa7, 0x97, 0xff, 0x0f, 0x00, 0x51, - 0x48, 0xda, 0x66, 0xdb, 0xff, 0xf8, 0xdf, 0xed, 0xbe, 0xed, 0x0e, 0x00, - 0x92, 0x64, 0x32, 0xeb, 0xf6, 0x01, 0x20, 0x63, 0xbd, 0xbc, 0xfc, 0xfa, - 0x0f, 0x00, 0x09, 0x20, 0x89, 0x3e, 0xff, 0xff, 0xe0, 0x7f, 0xdf, 0x6f, - 0xdb, 0x07, 0x00, 0x01, 0x24, 0xbb, 0xed, 0xfe, 0x01, 0xa0, 0xce, 0xf5, - 0xf6, 0xdb, 0xdf, 0x07, 0x00, 0x41, 0xad, 0x5f, 0xf2, 0xed, 0xff, 0xc0, - 0xff, 0xbf, 0xdd, 0x92, 0x03, 0x00, 0x44, 0xb2, 0xd9, 0x7d, 0xfb, 0x01, - 0xe0, 0xaa, 0xdf, 0x9b, 0x7f, 0xfb, 0x07, 0x80, 0x28, 0x21, 0x64, 0xbb, - 0x7f, 0x7f, 0x80, 0xff, 0xf6, 0xbb, 0xee, 0x03, 0x80, 0x22, 0x99, 0xed, - 0xb6, 0xff, 0x00, 0x90, 0xb8, 0x5e, 0x5b, 0x6b, 0xed, 0x03, 0x00, 0x01, - 0xa6, 0x6d, 0xdb, 0xf6, 0x7f, 0x00, 0xff, 0xff, 0xf6, 0xcd, 0x00, 0x40, - 0x10, 0xc9, 0x6c, 0xff, 0xf7, 0x00, 0xa0, 0xe3, 0x72, 0xeb, 0xef, 0xff, - 0x03, 0x80, 0xe0, 0x90, 0x24, 0xdb, 0xbd, 0x3f, 0x00, 0xfe, 0xdb, 0x6f, - 0xfb, 0x00, 0x00, 0x89, 0x4c, 0xb6, 0xd9, 0x7e, 0x00, 0x70, 0xaf, 0xaf, - 0x6f, 0xb5, 0xde, 0x03, 0x80, 0x94, 0x92, 0xb6, 0xf9, 0xf6, 0x3f, 0x00, - 0xfc, 0xbf, 0xdd, 0x7b, 0x00, 0x10, 0x48, 0x26, 0xb3, 0xdf, 0x7f, 0x00, - 0x70, 0xd8, 0xae, 0xfd, 0xff, 0xf7, 0x03, 0x80, 0x00, 0xd2, 0x36, 0xcf, - 0xdf, 0x3f, 0x00, 0xb8, 0x6d, 0xdf, 0x16, 0x00, 0x48, 0x44, 0xb2, 0xfb, - 0x6c, 0x3f, 0x00, 0x50, 0x75, 0xfd, 0xa5, 0xd5, 0xfe, 0x01, 0x40, 0xd1, - 0x12, 0xa2, 0x7d, 0xfb, 0x1f, 0x00, 0xf0, 0xff, 0xbf, 0x0d, 0x00, 0x20, - 0x12, 0x9b, 0xcd, 0xf6, 0x3f, 0x00, 0x90, 0xd5, 0xa7, 0xfd, 0x77, 0xab, - 0x03, 0x40, 0x1c, 0xc8, 0xbe, 0x6d, 0xfb, 0x1f, 0x00, 0xe0, 0xff, 0xee, - 0x07, 0x00, 0x04, 0x91, 0xc9, 0x7e, 0xbf, 0x1f, 0x00, 0x30, 0x57, 0xbf, - 0xa6, 0xde, 0xfd, 0x01, 0x40, 0x40, 0x6b, 0xd3, 0x6e, 0xef, 0x0f, 0x00, - 0xc0, 0xeb, 0x7d, 0x03, 0x00, 0x90, 0xc8, 0x6c, 0x76, 0xfb, 0x0f, 0x00, - 0x70, 0x5c, 0xe5, 0xf7, 0xfa, 0xeb, 0x01, 0x40, 0x50, 0x49, 0x92, 0xf4, - 0xfd, 0x0f, 0x00, 0xc0, 0xff, 0xdb, 0x01, 0x80, 0x44, 0x44, 0x66, 0xbb, - 0x6f, 0x0f, 0x00, 0xd0, 0xf1, 0x95, 0xf6, 0x6f, 0xad, 0x01, 0x40, 0x08, - 0x78, 0xdb, 0xb6, 0xef, 0x0f, 0x00, 0x00, 0xdf, 0xd6, 0x00, 0x00, 0x20, - 0x32, 0xb3, 0xdb, 0xfd, 0x0f, 0x00, 0x10, 0xd7, 0xf7, 0xb6, 0xd8, 0xeb, - 0x03, 0x20, 0x43, 0x27, 0xd9, 0xb6, 0xfd, 0x0f, 0x00, 0x00, 0xff, 0x7e, - 0x00, 0x40, 0x12, 0x93, 0xd9, 0xec, 0xb6, 0x07, 0x00, 0x70, 0x55, 0xdd, - 0xf6, 0x6f, 0xbb, 0x01, 0x40, 0x28, 0xa1, 0x6f, 0xb6, 0xb7, 0x0f, 0x00, - 0x00, 0xde, 0x1f, 0x00, 0x80, 0x88, 0xd8, 0xcc, 0x66, 0xff, 0x03, 0x00, - 0x70, 0xf4, 0xf5, 0xdb, 0xaa, 0xee, 0x01, 0x60, 0x28, 0x2d, 0x49, 0xf7, - 0xf6, 0x07, 0x00, 0x00, 0x7c, 0x0f, 0x00, 0x08, 0x48, 0x66, 0x6e, 0xfb, - 0xef, 0x03, 0x00, 0xd0, 0xd5, 0xdf, 0x52, 0xff, 0xda, 0x03, 0x20, 0xa3, - 0xa5, 0xd9, 0xb2, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x20, 0x22, - 0x33, 0x37, 0xbf, 0xfd, 0x01, 0x00, 0x70, 0x5f, 0xf7, 0xfe, 0xab, 0x6b, - 0x02, 0xa0, 0xa8, 0xb4, 0x6d, 0xdf, 0xf6, 0x07, 0x00, 0x00, 0xf8, 0x01, - 0x00, 0x12, 0x33, 0x11, 0xd9, 0xdd, 0xff, 0x01, 0x00, 0x70, 0x75, 0xd5, - 0x52, 0xea, 0x8a, 0x03, 0x20, 0x84, 0x36, 0x69, 0xba, 0xdb, 0x07, 0x00, - 0x00, 0xf0, 0x01, 0x00, 0x81, 0xc8, 0xcc, 0xdd, 0xed, 0xff, 0x00, 0x00, - 0x60, 0xd5, 0xdf, 0xf6, 0xae, 0x6b, 0x03, 0x00, 0xa1, 0xa4, 0x6d, 0xdf, - 0xfe, 0x07, 0x00, 0x00, 0x60, 0x00, 0x40, 0x44, 0xc6, 0xcc, 0x64, 0xb7, - 0xfd, 0x00, 0x00, 0xe0, 0x55, 0xf7, 0xd6, 0xea, 0xba, 0x07, 0x20, 0x94, - 0x94, 0x6d, 0xfb, 0xdb, 0x07, 0x00, 0x00, 0x20, 0x00, 0x20, 0x20, 0x32, - 0x76, 0x77, 0xff, 0x7f, 0x00, 0x00, 0x60, 0x7d, 0xd5, 0xb6, 0x3f, 0xaf, - 0x06, 0xa0, 0xa4, 0x95, 0x6c, 0x9b, 0xee, 0x07, 0x00, 0x00, 0x18, 0x00, - 0x10, 0x92, 0x15, 0x73, 0xbb, 0xd9, 0x3f, 0x00, 0x00, 0xe0, 0xf5, 0xff, - 0xf7, 0x6a, 0xa9, 0x06, 0x80, 0xa2, 0xb4, 0x6d, 0xfb, 0xfb, 0x07, 0x00, - 0x00, 0x04, 0x00, 0x84, 0x88, 0xc8, 0x99, 0xdd, 0xff, 0x3f, 0x00, 0x00, - 0xe0, 0x8b, 0xff, 0x96, 0x6a, 0xb6, 0x0a, 0xa0, 0x94, 0x96, 0x64, 0xdb, - 0xee, 0x07, 0x00, 0x00, 0x03, 0x08, 0x20, 0x60, 0x66, 0xec, 0xee, 0xb6, - 0x1d, 0x00, 0x00, 0xc0, 0x7e, 0xa5, 0xf4, 0xab, 0x55, 0x0d, 0x20, 0xe7, - 0xd4, 0x6d, 0xdb, 0xfb, 0x07, 0x00, 0x80, 0x00, 0x00, 0x09, 0x12, 0x33, - 0x67, 0x77, 0xff, 0x0f, 0x00, 0x00, 0xc0, 0xfa, 0xff, 0xb7, 0x7a, 0x55, - 0x19, 0x90, 0x91, 0xd4, 0x64, 0xdb, 0xee, 0x07, 0x00, 0x40, 0x00, 0x81, - 0x04, 0x88, 0x91, 0x3b, 0xbb, 0xfd, 0x0f, 0x00, 0x00, 0xc0, 0xab, 0xbf, - 0xed, 0x4e, 0xbb, 0x32, 0x20, 0x94, 0x96, 0x6c, 0xff, 0xfa, 0x03, 0x00, - 0x30, 0x40, 0x20, 0x20, 0x64, 0xcc, 0xdc, 0xdd, 0xff, 0x07, 0x00, 0x00, - 0xc0, 0xeb, 0xea, 0xfd, 0xd5, 0xaa, 0x2a, 0x20, 0xd7, 0xb0, 0x6d, 0x93, - 0xef, 0x07, 0x00, 0x08, 0x00, 0x08, 0x01, 0x23, 0xee, 0xee, 0xee, 0xfb, - 0x03, 0x00, 0x00, 0xc0, 0xfe, 0xff, 0x2d, 0xdd, 0x6a, 0x49, 0xd0, 0x90, - 0x9a, 0x64, 0xdf, 0xea, 0x07, 0x00, 0x03, 0x80, 0x40, 0x8c, 0x98, 0x33, - 0xb3, 0xbb, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xa5, 0x7b, 0x6d, 0xa7, 0x56, - 0xc5, 0xa0, 0x94, 0x94, 0x6f, 0xd3, 0xbb, 0x07, 0x80, 0x10, 0x0c, 0x12, - 0x40, 0xc6, 0xb9, 0xdb, 0xfb, 0xfd, 0x01, 0x00, 0x00, 0x80, 0x97, 0xee, - 0xdf, 0xba, 0x54, 0x1a, 0xa1, 0xe5, 0xd2, 0x64, 0x7e, 0xee, 0x07, 0x60, - 0x02, 0x80, 0x00, 0x31, 0x62, 0xcc, 0xdc, 0xee, 0x7f, 0x00, 0x00, 0x00, - 0x80, 0xff, 0xff, 0xdb, 0xaa, 0xb5, 0x8a, 0x86, 0x98, 0x96, 0x6d, 0x9b, - 0xea, 0x07, 0x98, 0x00, 0x22, 0x44, 0x88, 0x39, 0x77, 0x77, 0xff, 0x7f, - 0x00, 0x00, 0x00, 0x80, 0x7d, 0x77, 0xba, 0x7b, 0x2d, 0x55, 0x3c, 0xa6, - 0xb4, 0x6c, 0xf6, 0xaf, 0x07, 0x07, 0x90, 0x88, 0x20, 0x42, 0x9c, 0xbb, - 0xbb, 0xbb, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xbd, 0xbf, 0x55, 0x53, - 0xa5, 0xb2, 0xa1, 0xb4, 0xc9, 0x9f, 0xda, 0xcf, 0x28, 0x24, 0x42, 0x08, - 0x31, 0xe6, 0xcc, 0xdd, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xef, - 0xb7, 0xbd, 0xde, 0x12, 0xd1, 0xac, 0x95, 0x4d, 0xf2, 0x56, 0x9f, 0x88, - 0x80, 0x10, 0xc2, 0x9c, 0x73, 0x77, 0xef, 0xfe, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0xbf, 0xfb, 0xed, 0xeb, 0x35, 0x95, 0x72, 0xa2, 0x35, 0xcd, 0xb6, - 0xd6, 0x2f, 0x21, 0x24, 0x04, 0x31, 0xc6, 0x98, 0x33, 0xf7, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xd6, 0x6a, 0x7f, 0x5b, 0xab, 0x2d, 0x28, 0x23, - 0x65, 0xd9, 0xb6, 0x55, 0x5f, 0x88, 0x08, 0x43, 0x0c, 0x61, 0xde, 0xdd, - 0xfb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x76, 0xff, 0x4d, 0xd7, 0x4d, - 0x4a, 0xa5, 0x29, 0x2d, 0xdb, 0xbe, 0x55, 0x1f, 0x22, 0x42, 0x28, 0xc2, - 0x39, 0xe7, 0xee, 0xee, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x7f, - 0xfb, 0xb6, 0xb6, 0x95, 0x70, 0x2e, 0xa5, 0xd9, 0x24, 0x5d, 0x5f, 0x8a, - 0x28, 0x88, 0x31, 0x9e, 0x39, 0x73, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xec, 0xb7, 0xdf, 0x6c, 0xb5, 0x65, 0x26, 0xa3, 0x39, 0x9b, 0xfc, - 0x85, 0x5d, 0x21, 0x04, 0x63, 0x1c, 0xe6, 0xdd, 0xbd, 0xfb, 0xff, 0xff, - 0x01, 0x00, 0x00, 0x00, 0xb8, 0xfa, 0xb6, 0x6f, 0x4d, 0x9a, 0x28, 0x59, - 0x4d, 0xd3, 0x2f, 0xf5, 0x3f, 0x8c, 0xd1, 0x18, 0xc6, 0x31, 0xf6, 0xdd, - 0xfe, 0xff, 0xfe, 0x01, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xef, 0xb9, 0xb6, - 0x25, 0xe1, 0x4d, 0x69, 0xba, 0x6c, 0xad, 0x3c, 0x41, 0x14, 0x84, 0xe9, - 0x9e, 0x37, 0xf7, 0xff, 0xff, 0xfb, 0x03, 0x00, 0x00, 0x00, 0x70, 0x5d, - 0x3d, 0x9f, 0x3d, 0x6d, 0x26, 0x52, 0x59, 0xb6, 0x6d, 0xab, 0x7f, 0x14, - 0x82, 0xe1, 0x39, 0xe6, 0xdd, 0xfb, 0xff, 0xbf, 0xff, 0x01, 0x00, 0x00, - 0x00, 0xf0, 0xf6, 0x6f, 0x77, 0xcd, 0x92, 0xd0, 0x52, 0x4b, 0xb3, 0x49, - 0x0b, 0x3a, 0x41, 0x61, 0x38, 0x9e, 0x73, 0xee, 0xdc, 0xff, 0xff, 0xfd, - 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xd7, 0x65, 0xda, 0x66, 0x63, 0x9d, - 0xf2, 0x36, 0x7b, 0x6a, 0x7f, 0x14, 0x18, 0x8e, 0xe7, 0xd9, 0x7b, 0xff, - 0xff, 0xef, 0xff, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xdd, 0xb6, - 0xc9, 0x4c, 0x46, 0x9a, 0x64, 0xcb, 0x5b, 0xed, 0x06, 0xc6, 0xe3, 0x71, - 0xde, 0xbd, 0xff, 0xff, 0x7f, 0xff, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x7f, - 0x7f, 0xff, 0x59, 0x37, 0x75, 0xbb, 0x96, 0x66, 0xdb, 0x56, 0xf7, 0xe0, - 0xf2, 0x74, 0x9e, 0x77, 0xef, 0xfd, 0xff, 0xeb, 0xed, 0x03, 0x00, 0x00, - 0x00, 0xc0, 0xea, 0xdf, 0xb3, 0xdb, 0xde, 0xc6, 0x81, 0xb0, 0x6c, 0xba, - 0xb4, 0xf6, 0x38, 0x18, 0x3c, 0xe7, 0x9c, 0xfb, 0xff, 0x7f, 0xff, 0xff, - 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, 0xf7, 0x6e, 0x66, 0xd9, 0x99, 0xac, - 0xa4, 0xcd, 0x96, 0xa5, 0xea, 0x03, 0xa7, 0xcf, 0x79, 0xef, 0xfd, 0xff, - 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfd, 0xef, 0xdf, - 0x6f, 0xef, 0x72, 0x65, 0xd9, 0xb6, 0xad, 0xe8, 0xc1, 0xe1, 0xf1, 0xbe, - 0x7b, 0xef, 0xff, 0xdf, 0x7a, 0xfb, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0x5f, 0xdd, 0x9d, 0xac, 0x99, 0x84, 0x29, 0xcd, 0x3c, 0x4f, 0x9d, 0x7d, - 0x3c, 0x9e, 0xe7, 0xbe, 0xff, 0xff, 0xff, 0xff, 0xef, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0xff, 0x77, 0x7b, 0x33, 0xe7, 0x5a, 0x49, 0x9b, 0x65, - 0x59, 0x75, 0x07, 0x97, 0xf7, 0xbb, 0xef, 0xff, 0xff, 0xdb, 0xfe, 0xff, - 0x07, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf7, 0x3f, 0xe7, 0xcf, 0x9c, 0x51, - 0x4d, 0xb0, 0x6d, 0x4b, 0xc9, 0xd3, 0xf5, 0x79, 0xfe, 0xfb, 0xff, 0xff, - 0xdb, 0xda, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xef, 0xde, - 0xdd, 0xf3, 0x4d, 0x52, 0x36, 0xcb, 0xd2, 0x3a, 0x7e, 0x3c, 0xde, 0xe7, - 0xbe, 0xff, 0x7f, 0xda, 0xff, 0xdf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, - 0xff, 0xfb, 0xdd, 0x73, 0x8f, 0xa5, 0x9a, 0xe6, 0xd9, 0xb6, 0xe2, 0x4e, - 0xc7, 0xf7, 0xfd, 0xff, 0xff, 0xff, 0xf7, 0xf6, 0xff, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0xee, 0x79, 0xb2, 0xb2, 0x2c, 0x9f, - 0xb6, 0x54, 0xfe, 0xfb, 0x79, 0xbf, 0xff, 0xff, 0x5f, 0xda, 0xff, 0xfa, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xf7, 0xbf, 0xe7, 0x4b, - 0xb4, 0x69, 0xd3, 0x2c, 0x25, 0xbd, 0xbc, 0xcf, 0xf7, 0xfd, 0xff, 0xd7, - 0xf6, 0xfe, 0xdf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xbf, 0x9d, - 0xf1, 0x3e, 0x57, 0x25, 0xcb, 0xb6, 0x6d, 0xa9, 0xb5, 0xef, 0xfb, 0xff, - 0xff, 0xff, 0xd5, 0xda, 0xd6, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xff, 0xff, 0xfb, 0xcf, 0xf5, 0x25, 0x65, 0xd9, 0x66, 0x5b, 0x4a, 0xfa, - 0xf9, 0x7e, 0xff, 0xff, 0xff, 0xf6, 0xd6, 0xdf, 0xfa, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xfe, 0xff, 0xef, 0x3e, 0xf7, 0x9f, 0x5b, 0x92, 0x6c, - 0xdb, 0x52, 0xe5, 0xbe, 0xdf, 0xff, 0xff, 0xbf, 0x51, 0xda, 0xfa, 0x7f, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7b, 0x9f, 0xe7, - 0x4c, 0xb3, 0x4d, 0xd3, 0x54, 0xd9, 0xe7, 0xfb, 0xff, 0xff, 0x5f, 0xdc, - 0xfa, 0xdf, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, - 0xe7, 0xf9, 0x3a, 0xd3, 0xa6, 0xe9, 0xb6, 0xa5, 0xca, 0xf9, 0xfd, 0xff, - 0xff, 0x83, 0x42, 0xd2, 0xff, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xfd, 0xbf, 0xef, 0x4f, 0xd5, 0x64, 0xdb, 0x26, 0x4d, 0x30, - 0x7f, 0xff, 0xff, 0xff, 0x91, 0xda, 0xdb, 0xda, 0xdf, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0xff, 0xbf, 0xff, 0x7d, 0xbe, 0xb5, 0x6d, 0x97, - 0x6d, 0x93, 0x56, 0xdf, 0xff, 0xff, 0x7f, 0x81, 0x4a, 0xda, 0x7f, 0xff, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xef, 0xeb, 0xbb, - 0xa6, 0x4d, 0x73, 0xcd, 0x92, 0xaa, 0xfe, 0xff, 0xff, 0x1f, 0x01, 0x6a, - 0x5b, 0xfb, 0xfb, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xfd, 0xbf, 0x5f, 0x3b, 0xdb, 0x36, 0xbb, 0x26, 0x4c, 0xf9, 0xff, 0xff, - 0x0f, 0xa3, 0x2a, 0xe9, 0x7f, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xee, 0xff, 0xff, 0xfe, 0xfe, 0xcc, 0x91, 0xec, 0x93, 0x6d, 0x93, - 0xf2, 0xff, 0xff, 0x03, 0x00, 0x6a, 0x6d, 0x6f, 0xff, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xf7, 0x6f, 0x76, 0xb6, 0xcd, - 0x76, 0xc9, 0x2a, 0xe9, 0xff, 0xff, 0x00, 0x02, 0x24, 0xed, 0xf9, 0xed, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xdf, 0xff, - 0xd9, 0x66, 0x9b, 0x6c, 0x93, 0x54, 0xc5, 0xff, 0x3f, 0x00, 0x01, 0x95, - 0xb5, 0xaf, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, - 0xff, 0xff, 0xfd, 0xae, 0x7d, 0xde, 0x6d, 0xf6, 0xa1, 0x8a, 0xff, 0x0f, - 0x00, 0x81, 0x90, 0xb4, 0xfd, 0xfd, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xcd, 0xb2, 0xdb, 0x2c, 0xcb, - 0x54, 0xfe, 0x01, 0x00, 0x01, 0xd2, 0xb6, 0xb7, 0xff, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x39, 0xdb, 0x76, - 0xb3, 0x4b, 0xb6, 0x0a, 0xfe, 0x00, 0x00, 0x01, 0x48, 0xda, 0xfe, 0xff, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, - 0xcf, 0xb9, 0x6d, 0xb6, 0xd9, 0xa5, 0x75, 0x1c, 0x00, 0x80, 0x80, 0x20, - 0xdb, 0xda, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xff, 0xff, 0xff, 0x77, 0x96, 0xd9, 0x26, 0xb3, 0x4d, 0x82, 0x11, 0x00, - 0x80, 0x80, 0x24, 0x6d, 0xff, 0xf7, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xbb, 0x67, 0xdb, 0xdd, 0x36, 0xd9, - 0x54, 0x60, 0x00, 0xc0, 0x00, 0x92, 0x65, 0x6b, 0xff, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x4f, 0x7d, 0x96, - 0xd9, 0x6c, 0x36, 0xad, 0xc2, 0x00, 0x60, 0x00, 0xc8, 0xb6, 0x6d, 0xff, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, - 0xff, 0xc8, 0x76, 0xbb, 0xcb, 0x64, 0x52, 0x02, 0x03, 0x10, 0x00, 0x64, - 0xda, 0xff, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xff, 0xff, 0x5f, 0xd7, 0x4d, 0x33, 0x99, 0xdd, 0x96, 0x04, 0x2c, - 0x1c, 0x40, 0x22, 0xdb, 0xb6, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xdf, 0xb5, 0xed, 0xe6, 0x36, 0x9b, - 0x6c, 0x29, 0xf0, 0x03, 0x00, 0x99, 0x6c, 0xfb, 0xfd, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x35, 0xbb, - 0xec, 0x76, 0x33, 0x91, 0x02, 0x00, 0x00, 0x00, 0x64, 0x67, 0xdf, 0xff, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, - 0xbf, 0x6f, 0x9b, 0x9d, 0xc9, 0xce, 0x36, 0x49, 0x00, 0x00, 0x00, 0x93, - 0xb1, 0xdd, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0xff, 0x6a, 0x76, 0xbb, 0xdd, 0xd9, 0x64, 0x12, 0x01, - 0x00, 0x40, 0x98, 0xdd, 0x6d, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xdf, 0x66, 0x73, 0x33, 0xbb, - 0x9d, 0x4d, 0x00, 0x00, 0x00, 0x63, 0xe6, 0xf6, 0xff, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xed, 0xfd, - 0xee, 0xee, 0x36, 0x73, 0x2b, 0x04, 0x00, 0xa0, 0x38, 0x75, 0xbf, 0xff, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7f, 0xd9, 0xec, 0xce, 0x66, 0x66, 0x66, 0x22, 0x04, 0x00, 0xc6, - 0x99, 0xbb, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5e, 0xb3, 0xdb, 0xb9, 0xcd, 0xc9, 0x88, 0x89, - 0x00, 0x68, 0x31, 0xee, 0xdd, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xbe, 0xbb, 0x9b, 0x3f, - 0xbb, 0x33, 0x23, 0x04, 0x00, 0x8c, 0xf3, 0xee, 0xff, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x67, - 0x76, 0x77, 0xb2, 0x66, 0xce, 0x0c, 0xd1, 0xd6, 0xe3, 0x79, 0xf7, 0xff, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0xfd, 0xef, 0xe6, 0xee, 0xce, 0x9c, 0x31, 0x16, 0x00, 0x3c, - 0x9e, 0xfb, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0x9f, 0xdb, 0xdc, 0x9d, 0x99, 0x33, 0xc6, - 0xc1, 0xff, 0x8f, 0xe7, 0xbb, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf7, 0xbd, 0xbb, 0x33, - 0x7b, 0xee, 0x18, 0x1e, 0x50, 0xf0, 0xf9, 0xfe, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7b, - 0xf7, 0x77, 0xf7, 0xe6, 0x9c, 0xe3, 0xf0, 0x4d, 0xff, 0x7c, 0xef, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0xdf, 0x76, 0x7f, 0xcf, 0x9e, 0x73, 0x8f, 0x07, 0xff, 0x0b, - 0xdf, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xee, 0xcd, 0xdd, 0x9d, 0x7b, 0xf7, 0x7c, - 0x7a, 0x00, 0xf0, 0xe7, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0xbf, 0xdd, 0x7b, - 0x6b, 0x9e, 0xf3, 0xe1, 0xff, 0xff, 0x7d, 0xff, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, - 0xb7, 0xbb, 0x7b, 0xee, 0x79, 0x8f, 0x0f, 0xfa, 0x2f, 0xff, 0xf7, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0xff, 0x77, 0xef, 0xdd, 0x77, 0x7c, 0xfe, 0x02, 0xe8, - 0xcf, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xef, 0xee, 0xdd, 0xb3, 0xcf, 0xf3, - 0xf1, 0xff, 0xff, 0xf9, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0xff, 0xbf, - 0xef, 0xbe, 0xcf, 0x8f, 0xfe, 0x5f, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xbf, 0xbb, 0xf7, 0xde, 0x79, 0x3e, 0xff, 0x52, 0xd2, 0xdf, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xef, 0xef, 0xef, 0x3c, 0xef, 0xf9, 0xf8, 0xff, 0xff, - 0xf7, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xee, 0xdc, 0xf7, 0xfe, 0xe7, - 0x97, 0xfe, 0xff, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, - 0xef, 0xbf, 0x3e, 0xff, 0xda, 0xf6, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfe, 0xbf, 0xf7, 0xfe, 0xf7, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xfe, 0xff, 0xde, 0xbd, 0xef, 0xfb, 0xd7, 0xff, 0xbf, - 0xfd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xf7, 0x7d, 0xbf, - 0xff, 0xd2, 0xf6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xbf, - 0xef, 0xfb, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0xef, 0xbe, 0xf7, 0xef, 0xef, 0xff, 0xff, 0xff, 0x3f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xdf, 0xbf, 0xff, 0xff, 0xff, - 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, - 0xfe, 0xff, 0xfb, 0xf7, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xfd, 0xff, 0xff, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, - 0xff, 0xff, 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, 0xff, 0x0f, 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, 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, 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, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; diff --git a/nx-X11/include/bitmaps/flagdown b/nx-X11/include/bitmaps/flagdown deleted file mode 100644 index 55abc5182..000000000 --- a/nx-X11/include/bitmaps/flagdown +++ /dev/null @@ -1,27 +0,0 @@ -#define flagdown_width 48 -#define flagdown_height 48 -static char flagdown_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, - 0x00, 0x00, 0x03, 0x00, 0x06, 0x06, 0x00, 0x80, 0x01, 0x00, 0x06, 0x07, - 0x00, 0xc0, 0x1f, 0x00, 0x87, 0x07, 0x00, 0xe0, 0x7f, 0x80, 0xc7, 0x07, - 0x00, 0x70, 0xe0, 0xc0, 0xe5, 0x07, 0x00, 0x38, 0x80, 0xe1, 0x74, 0x07, - 0x00, 0x18, 0x80, 0x71, 0x3c, 0x07, 0x00, 0x0c, 0x00, 0x3b, 0x1e, 0x03, - 0x00, 0x0c, 0x00, 0x1f, 0x0f, 0x00, 0x00, 0x86, 0x1f, 0x8e, 0x07, 0x00, - 0x00, 0x06, 0x06, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x05, 0x00, - 0x00, 0x06, 0x00, 0xc6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, - 0x7f, 0x06, 0x00, 0x06, 0xe4, 0xff, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, - 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00, - 0x00, 0x06, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, - 0x00, 0x06, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x3e, 0x00, 0x00, - 0x00, 0xfe, 0xff, 0x2f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x27, 0x00, 0x00, - 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, - 0xf7, 0xbf, 0x8e, 0xfc, 0xdf, 0xf8, 0x9d, 0xeb, 0x9b, 0x76, 0xd2, 0x7a, - 0x46, 0x30, 0xe2, 0x0f, 0xe1, 0x47, 0x55, 0x84, 0x48, 0x11, 0x84, 0x19}; diff --git a/nx-X11/include/bitmaps/flagup b/nx-X11/include/bitmaps/flagup deleted file mode 100644 index 6eb0d846a..000000000 --- a/nx-X11/include/bitmaps/flagup +++ /dev/null @@ -1,27 +0,0 @@ -#define flagup_width 48 -#define flagup_height 48 -static char flagup_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00, - 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00, - 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00, - 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00, - 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00, - 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00, - 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00, - 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00, - 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00, - 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, - 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00, - 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00, - 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00, - 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, - 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a, - 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a, - 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a, - 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, - 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, - 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, - 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a, - 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a, - 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/flipped_gray b/nx-X11/include/bitmaps/flipped_gray deleted file mode 100644 index b75cacd7b..000000000 --- a/nx-X11/include/bitmaps/flipped_gray +++ /dev/null @@ -1,4 +0,0 @@ -#define flipped_gray_width 4 -#define flipped_gray_height 2 -static char flipped_gray_bits[] = { - 0x07, 0x0d}; diff --git a/nx-X11/include/bitmaps/gray b/nx-X11/include/bitmaps/gray deleted file mode 100644 index dc7327e5c..000000000 --- a/nx-X11/include/bitmaps/gray +++ /dev/null @@ -1,4 +0,0 @@ -#define gray_width 2 -#define gray_height 2 -static char gray_bits[] = { - 0x01, 0x02}; diff --git a/nx-X11/include/bitmaps/gray1 b/nx-X11/include/bitmaps/gray1 deleted file mode 100644 index 476d93055..000000000 --- a/nx-X11/include/bitmaps/gray1 +++ /dev/null @@ -1,4 +0,0 @@ -#define gray1_width 2 -#define gray1_height 2 -static char gray1_bits[] = { - 0x01, 0x02}; diff --git a/nx-X11/include/bitmaps/gray3 b/nx-X11/include/bitmaps/gray3 deleted file mode 100644 index 230288478..000000000 --- a/nx-X11/include/bitmaps/gray3 +++ /dev/null @@ -1,4 +0,0 @@ -#define gray3_width 4 -#define gray3_height 4 -static char gray3_bits[] = { - 0x01, 0x00, 0x04, 0x00}; diff --git a/nx-X11/include/bitmaps/grid16 b/nx-X11/include/bitmaps/grid16 deleted file mode 100644 index edc7c735b..000000000 --- a/nx-X11/include/bitmaps/grid16 +++ /dev/null @@ -1,6 +0,0 @@ -#define grid16_width 16 -#define grid16_height 16 -static char grid16_bits[] = { - 0x55, 0x55, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/grid2 b/nx-X11/include/bitmaps/grid2 deleted file mode 100644 index 7a021673e..000000000 --- a/nx-X11/include/bitmaps/grid2 +++ /dev/null @@ -1,4 +0,0 @@ -#define grid2_width 2 -#define grid2_height 2 -static char grid2_bits[] = { - 0x01, 0x00}; diff --git a/nx-X11/include/bitmaps/grid4 b/nx-X11/include/bitmaps/grid4 deleted file mode 100644 index 8062f40f1..000000000 --- a/nx-X11/include/bitmaps/grid4 +++ /dev/null @@ -1,4 +0,0 @@ -#define grid4_width 4 -#define grid4_height 4 -static char grid4_bits[] = { - 0x05, 0x00, 0x01, 0x00}; diff --git a/nx-X11/include/bitmaps/grid8 b/nx-X11/include/bitmaps/grid8 deleted file mode 100644 index 02ce50e5b..000000000 --- a/nx-X11/include/bitmaps/grid8 +++ /dev/null @@ -1,4 +0,0 @@ -#define grid8_width 8 -#define grid8_height 8 -static char grid8_bits[] = { - 0x55, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00}; diff --git a/nx-X11/include/bitmaps/hlines2 b/nx-X11/include/bitmaps/hlines2 deleted file mode 100644 index 5c1a396f9..000000000 --- a/nx-X11/include/bitmaps/hlines2 +++ /dev/null @@ -1,4 +0,0 @@ -#define hlines2_width 1 -#define hlines2_height 2 -static char hlines2_bits[] = { - 0x01, 0x00}; diff --git a/nx-X11/include/bitmaps/hlines3 b/nx-X11/include/bitmaps/hlines3 deleted file mode 100644 index ed4943319..000000000 --- a/nx-X11/include/bitmaps/hlines3 +++ /dev/null @@ -1,4 +0,0 @@ -#define hlines3_width 1 -#define hlines3_height 3 -static char hlines3_bits[] = { - 0x00, 0x01, 0x00}; diff --git a/nx-X11/include/bitmaps/icon b/nx-X11/include/bitmaps/icon deleted file mode 100644 index 9a75a57c4..000000000 --- a/nx-X11/include/bitmaps/icon +++ /dev/null @@ -1,6 +0,0 @@ -#define icon_width 16 -#define icon_height 16 -static char icon_bits[] = { - 0xff, 0xff, 0xab, 0xaa, 0x55, 0xd5, 0xab, 0xaa, 0x05, 0xd0, 0x0b, 0xa0, - 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, - 0x55, 0xd5, 0xab, 0xaa, 0x55, 0xd5, 0xff, 0xff}; diff --git a/nx-X11/include/bitmaps/keyboard16 b/nx-X11/include/bitmaps/keyboard16 deleted file mode 100644 index c4ead326b..000000000 --- a/nx-X11/include/bitmaps/keyboard16 +++ /dev/null @@ -1,6 +0,0 @@ -#define keyboard16_width 16 -#define keyboard16_height 16 -static char keyboard16_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x08, 0x10, 0x08, 0x10, 0x08, 0x10, - 0x08, 0x10, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0xa8, 0x1a, - 0x54, 0x35, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/left_ptr b/nx-X11/include/bitmaps/left_ptr deleted file mode 100644 index 8a6abb13a..000000000 --- a/nx-X11/include/bitmaps/left_ptr +++ /dev/null @@ -1,8 +0,0 @@ -#define left_ptr_width 16 -#define left_ptr_height 16 -#define left_ptr_x_hot 3 -#define left_ptr_y_hot 1 -static char left_ptr_bits[] = { - 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x38, 0x00, 0x78, 0x00, 0xf8, 0x00, - 0xf8, 0x01, 0xf8, 0x03, 0xf8, 0x07, 0xf8, 0x00, 0xd8, 0x00, 0x88, 0x01, - 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/left_ptrmsk b/nx-X11/include/bitmaps/left_ptrmsk deleted file mode 100644 index 851911d3d..000000000 --- a/nx-X11/include/bitmaps/left_ptrmsk +++ /dev/null @@ -1,6 +0,0 @@ -#define left_ptrmsk_width 16 -#define left_ptrmsk_height 16 -static char left_ptrmsk_bits[] = { - 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00, 0xfc, 0x01, - 0xfc, 0x03, 0xfc, 0x07, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x01, 0xdc, 0x03, - 0xcc, 0x03, 0x80, 0x07, 0x80, 0x07, 0x00, 0x03}; diff --git a/nx-X11/include/bitmaps/letters b/nx-X11/include/bitmaps/letters deleted file mode 100644 index 0f12568d1..000000000 --- a/nx-X11/include/bitmaps/letters +++ /dev/null @@ -1,27 +0,0 @@ -#define letters_width 48 -#define letters_height 48 -static char letters_bits[] = { - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, - 0x00, 0xfa, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, - 0x00, 0x3a, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2e, - 0xe0, 0xff, 0xff, 0xff, 0xff, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, - 0xa0, 0x03, 0x00, 0x00, 0x70, 0x21, 0x20, 0x00, 0x00, 0x00, 0x50, 0x21, - 0xa0, 0x1f, 0x00, 0x00, 0x50, 0x21, 0x20, 0x00, 0x00, 0x00, 0x70, 0x21, - 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21, - 0xfa, 0x01, 0x00, 0x80, 0x0b, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0a, 0x21, - 0xba, 0x01, 0x00, 0x80, 0x0a, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0b, 0x21, - 0x3a, 0x00, 0x00, 0x00, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21, - 0x02, 0xc0, 0xfb, 0x03, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3f, - 0x02, 0xc0, 0xbd, 0x0f, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x02, 0xc0, 0x7f, 0x7b, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x02, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, - 0xfe, 0xff, 0xff, 0xff, 0x0f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/light_gray b/nx-X11/include/bitmaps/light_gray deleted file mode 100644 index ea62e17dc..000000000 --- a/nx-X11/include/bitmaps/light_gray +++ /dev/null @@ -1,4 +0,0 @@ -#define light_gray_width 4 -#define light_gray_height 2 -static char light_gray_bits[] = { - 0x08, 0x02}; diff --git a/nx-X11/include/bitmaps/mailempty b/nx-X11/include/bitmaps/mailempty deleted file mode 100644 index 064252534..000000000 --- a/nx-X11/include/bitmaps/mailempty +++ /dev/null @@ -1,27 +0,0 @@ -#define mailempty_width 48 -#define mailempty_height 48 -static unsigned char mailempty_bits[] = { - 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, 0xff, 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0x7a, 0xe0, 0x57, 0x55, 0x55, 0x55, 0x7d, - 0xf0, 0xaf, 0xaa, 0xaa, 0xaa, 0x7e, 0xf8, 0x57, 0x55, 0x55, 0x55, 0x7f, - 0xfc, 0xaf, 0xaa, 0xaa, 0xaa, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, - 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, - 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0xfe, 0xff, 0xff, 0xff, 0x7f, - 0x06, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x86, 0xaf, 0xaa, 0xaa, 0xea, 0x7a, - 0xc6, 0x57, 0x55, 0x55, 0x75, 0x7d, 0xe6, 0xaf, 0xaa, 0xaa, 0xea, 0x7e, - 0xf6, 0x57, 0x55, 0x55, 0x75, 0x7f, 0xfe, 0xaf, 0xaa, 0xaa, 0xea, 0x7f, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, - 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, - 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, - 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/mailemptymsk b/nx-X11/include/bitmaps/mailemptymsk deleted file mode 100644 index f1204b233..000000000 --- a/nx-X11/include/bitmaps/mailemptymsk +++ /dev/null @@ -1,27 +0,0 @@ -#define mailemask_width 48 -#define mailemask_height 48 -static char mailemask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, - 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, - 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x0f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x0f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0x00}; diff --git a/nx-X11/include/bitmaps/mailfull b/nx-X11/include/bitmaps/mailfull deleted file mode 100644 index cc2f6f8b6..000000000 --- a/nx-X11/include/bitmaps/mailfull +++ /dev/null @@ -1,27 +0,0 @@ -#define mailfull_width 48 -#define mailfull_height 48 -static unsigned char mailfull_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, - 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x04, 0x40, 0x00, 0x00, 0x00, 0xd0, 0x05, - 0x40, 0x00, 0x00, 0x00, 0x57, 0x7d, 0x40, 0x1e, 0x00, 0x00, 0x55, 0x7d, - 0x40, 0x00, 0x00, 0x00, 0xd5, 0x7d, 0x60, 0x02, 0x00, 0x00, 0x17, 0x7c, - 0x70, 0x00, 0x7e, 0x00, 0x10, 0x7c, 0x78, 0x00, 0x00, 0x00, 0x10, 0x7e, - 0x7c, 0x00, 0x1e, 0x00, 0x10, 0x7f, 0x7e, 0x00, 0x00, 0x00, 0x90, 0x7f, - 0x7e, 0x00, 0x3e, 0x07, 0xd0, 0x7f, 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x7f, - 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x6f, 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x67, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x63, 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, - 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0x86, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc6, 0xaf, 0xaa, 0xaa, 0xea, 0x7a, - 0xe6, 0x57, 0x55, 0x55, 0x75, 0x7d, 0xf6, 0xaf, 0xaa, 0xaa, 0xea, 0x7e, - 0xfe, 0x57, 0x55, 0x55, 0x75, 0x7f, 0xfe, 0xaf, 0xaa, 0xaa, 0xea, 0x7f, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, - 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, - 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, - 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, - 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0xee, 0x9c, 0x37, 0x60, 0x00, - 0x06, 0xfe, 0x36, 0x33, 0x60, 0x00, 0x06, 0xd6, 0x3e, 0x33, 0x60, 0x00, - 0x06, 0xc6, 0xb6, 0xf7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/mailfullmsk b/nx-X11/include/bitmaps/mailfullmsk deleted file mode 100644 index 6dfc942eb..000000000 --- a/nx-X11/include/bitmaps/mailfullmsk +++ /dev/null @@ -1,27 +0,0 @@ -#define mailfullmsk_width 48 -#define mailfullmsk_height 48 -static char mailfullmsk_bits[] = { - 0x00, 0xe0, 0xff, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, - 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, - 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0x0f, 0xff, 0xff, 0xff, 0xf1, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xf1, 0x00, - 0x0f, 0xff, 0xff, 0xff, 0xf1, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xf1, 0x00, - 0x0f, 0xff, 0xff, 0xff, 0xf1, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xf1, 0x00}; diff --git a/nx-X11/include/bitmaps/mensetmanus b/nx-X11/include/bitmaps/mensetmanus deleted file mode 100644 index 095b8ec48..000000000 --- a/nx-X11/include/bitmaps/mensetmanus +++ /dev/null @@ -1,258 +0,0 @@ -#define mensetmanus_width 161 -#define mensetmanus_height 145 - -static char mensetmanus_bits[] = { - 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, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, - 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x07, - 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf7, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0xc6, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0xff, - 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xe1, 0xff, 0xff, 0x87, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0xf6, 0x1f, 0x00, 0x00, - 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x9f, 0x65, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x07, 0x80, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x9f, 0x6d, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xff, 0xff, 0xc7, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x89, 0x6d, - 0x1b, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x81, 0x6d, 0x1b, 0x00, 0x00, - 0x00, 0xc0, 0xe1, 0x5b, 0xdb, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x81, 0x6d, 0x1b, 0x00, 0x00, 0x00, 0x80, 0x83, - 0x5b, 0xdb, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x81, 0x6d, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x5b, 0x1b, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x6d, - 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x5b, 0x1b, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x80, 0x6d, 0x1b, 0x00, 0x00, - 0x00, 0x00, 0xf8, 0x5b, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x83, 0x6d, 0x19, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x5b, 0x0b, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x83, 0x6d, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x80, 0x5b, 0x0f, 0x0e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x6d, - 0x1b, 0x00, 0x00, 0x00, 0x00, 0x80, 0x4b, 0x0f, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x79, 0x1b, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x6b, 0xbf, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0xfb, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x6d, 0xb7, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xed, 0xf7, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xfe, - 0x7f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xed, 0xd7, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0xf8, 0xff, 0x07, 0x00, - 0x00, 0x00, 0xe0, 0xfe, 0xd7, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xff, 0x7f, 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, - 0xff, 0xd6, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xbf, 0x73, 0x80, 0x3b, 0x7c, 0x00, 0x00, 0x00, 0xf8, 0xe7, 0xd6, 0xef, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xb9, 0x73, 0xc0, - 0x3b, 0xf0, 0x01, 0x00, 0x00, 0xff, 0xc3, 0xbf, 0xe7, 0x3f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xb8, 0x7f, 0xe0, 0x3b, 0xc0, 0x03, - 0x00, 0xc0, 0xbf, 0xc7, 0xbf, 0xe7, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1c, 0xb8, 0xff, 0xf8, 0x3b, 0x80, 0x07, 0x00, 0xe0, 0x61, - 0x87, 0xfd, 0xe7, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, - 0xb8, 0xf3, 0xff, 0x3b, 0x00, 0x0f, 0x00, 0x78, 0x60, 0x8e, 0xf1, 0x67, - 0xc7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xb8, 0xc3, 0x8f, - 0x7b, 0x00, 0x0e, 0x00, 0x38, 0xe0, 0x8c, 0x03, 0x66, 0x87, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xb8, 0x03, 0x83, 0x7b, 0x00, 0x1e, - 0x00, 0x1c, 0xe0, 0x1d, 0x03, 0x76, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x07, 0xb8, 0xe3, 0x8f, 0xbb, 0x01, 0x39, 0x00, 0x1e, 0xe0, - 0x3b, 0x03, 0xf6, 0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, - 0xb8, 0xe3, 0x8f, 0x3b, 0xc6, 0x38, 0x00, 0x17, 0xe0, 0x73, 0x07, 0xfe, - 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0b, 0xb8, 0xe7, 0x8e, - 0x3b, 0x38, 0x78, 0x00, 0x13, 0xe0, 0x77, 0x06, 0xfe, 0xff, 0xff, 0xff, - 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x12, 0x3c, 0xff, 0xce, 0x3b, 0x00, 0x78, - 0x80, 0x13, 0x60, 0xef, 0x0e, 0xfe, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, - 0x00, 0x70, 0x22, 0x3e, 0xfc, 0xfe, 0x39, 0x00, 0xe8, 0x80, 0x61, 0x60, - 0xce, 0x0f, 0xfe, 0x00, 0x00, 0x60, 0xf8, 0x00, 0x00, 0x00, 0x70, 0xc2, - 0x39, 0xf8, 0x7e, 0x38, 0x00, 0xc8, 0xc0, 0x81, 0x71, 0xde, 0x0f, 0xfe, - 0x00, 0x00, 0x60, 0x88, 0x00, 0x00, 0x00, 0x70, 0x04, 0x38, 0xe0, 0x0e, - 0x38, 0x00, 0xc4, 0xc0, 0x01, 0x7e, 0xbc, 0x1f, 0xfe, 0x00, 0x00, 0x60, - 0x88, 0x00, 0x00, 0x00, 0x78, 0x04, 0x38, 0xe0, 0x0e, 0x38, 0x00, 0xc4, - 0xc1, 0x01, 0x60, 0x3c, 0x1f, 0xfe, 0x00, 0x00, 0x60, 0x84, 0x0f, 0x00, - 0x00, 0x78, 0x08, 0x38, 0xe0, 0x0f, 0x38, 0x00, 0x82, 0xe1, 0x01, 0x60, - 0x74, 0x3e, 0xfe, 0x00, 0x00, 0x60, 0x44, 0x08, 0x00, 0x00, 0xb8, 0x10, - 0x38, 0xe0, 0x0f, 0x38, 0x00, 0x81, 0xe1, 0x00, 0x60, 0xe4, 0x3e, 0xfe, - 0x00, 0x00, 0x60, 0x44, 0x08, 0x00, 0x00, 0x98, 0x20, 0x38, 0xf8, 0x3f, - 0x38, 0x80, 0x80, 0xe1, 0x01, 0x60, 0xc4, 0x3c, 0xfe, 0x00, 0x00, 0x60, - 0x24, 0x0c, 0x00, 0x00, 0x1c, 0xc1, 0x39, 0x3c, 0x78, 0x38, 0x40, 0x80, - 0x61, 0x01, 0x60, 0xc4, 0x79, 0xfe, 0x00, 0x00, 0x60, 0x22, 0x32, 0x00, - 0x00, 0x1c, 0x01, 0x3e, 0x1c, 0xf0, 0x38, 0xf0, 0x9f, 0x61, 0x01, 0x60, - 0x84, 0x7b, 0xee, 0x00, 0x00, 0x60, 0x12, 0x21, 0x00, 0x00, 0x1c, 0x02, - 0x38, 0x0e, 0xe7, 0xf8, 0x3f, 0xe0, 0x61, 0x00, 0x60, 0x04, 0xf7, 0xce, - 0x00, 0x00, 0x60, 0x92, 0x10, 0x00, 0x00, 0x1c, 0x04, 0x38, 0x06, 0xff, - 0x38, 0x40, 0x80, 0x61, 0x02, 0x60, 0x04, 0xe7, 0xcf, 0x00, 0x00, 0x60, - 0x8a, 0x18, 0x00, 0x00, 0x1c, 0x18, 0x38, 0x07, 0xf0, 0x38, 0x00, 0x81, - 0x61, 0x02, 0x60, 0x04, 0xee, 0xcf, 0xff, 0x03, 0x60, 0x49, 0xe4, 0x00, - 0x00, 0x1c, 0x70, 0x38, 0x07, 0xe7, 0x38, 0x00, 0x82, 0x61, 0x04, 0x60, - 0x04, 0xdc, 0xcf, 0x01, 0x04, 0x60, 0x25, 0x42, 0x00, 0x00, 0x1c, 0xfe, - 0x3f, 0x03, 0xff, 0x38, 0x00, 0x84, 0x61, 0x08, 0x60, 0x04, 0xfc, 0xcf, - 0xf8, 0xff, 0x60, 0x95, 0x31, 0x00, 0x00, 0xfc, 0x01, 0xff, 0x03, 0xf0, - 0xf8, 0x1f, 0x88, 0x61, 0x10, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x00, 0xe1, - 0x53, 0x0c, 0x00, 0x00, 0x38, 0xf0, 0xff, 0x03, 0xef, 0xf8, 0x7f, 0x90, - 0x61, 0x40, 0xe0, 0xff, 0xff, 0xff, 0x00, 0xff, 0xe3, 0x2b, 0xfe, 0x00, - 0x00, 0x18, 0xf8, 0xff, 0x03, 0xff, 0x7c, 0xf0, 0x90, 0x61, 0x00, 0x3e, - 0x36, 0xe3, 0xe1, 0x00, 0x00, 0xe3, 0x9f, 0x60, 0x00, 0x00, 0x38, 0x3c, - 0x00, 0x03, 0xf0, 0x1f, 0xe0, 0xa0, 0xe1, 0x00, 0x30, 0x22, 0xe2, 0xc0, - 0x00, 0xff, 0xe3, 0x7f, 0x18, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x07, 0xe7, - 0x07, 0xc0, 0xe1, 0xc1, 0x00, 0x18, 0x22, 0xe2, 0xc0, 0x00, 0x00, 0xe1, - 0x1f, 0x07, 0x00, 0x00, 0x38, 0x06, 0x00, 0x07, 0xef, 0x01, 0xc0, 0xc1, - 0xc1, 0x01, 0x16, 0x24, 0xe2, 0xc0, 0x01, 0xff, 0xe1, 0xff, 0x00, 0x00, - 0x00, 0x70, 0x07, 0x00, 0x0e, 0xf8, 0x00, 0x80, 0xc3, 0xc0, 0xf1, 0x11, - 0x24, 0xe4, 0xc0, 0x03, 0xe0, 0xe1, 0x7f, 0x00, 0x00, 0x00, 0x70, 0x07, - 0x00, 0x1e, 0x3c, 0x00, 0x80, 0xe3, 0x80, 0x0f, 0x10, 0x24, 0xe4, 0xc0, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xe0, 0x03, 0x00, 0xfc, 0x0f, - 0x00, 0x00, 0x63, 0x80, 0x01, 0x08, 0x44, 0xe4, 0xc0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x01, 0x00, 0xe0, 0x03, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x73, - 0x80, 0x03, 0x08, 0x44, 0xe4, 0xc0, 0xfc, 0x00, 0x07, 0x0e, 0x00, 0x00, - 0x00, 0xc0, 0x03, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x33, 0x00, 0x03, 0x08, - 0x44, 0xe4, 0xe0, 0xcc, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x03, - 0x00, 0x78, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x07, 0x04, 0x44, 0xe8, 0x70, - 0xcc, 0x01, 0x87, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x3e, 0x00, - 0x00, 0x80, 0x1f, 0x00, 0x0e, 0x04, 0x44, 0xe8, 0x38, 0xcc, 0x81, 0xe7, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x00, 0x80, 0x0f, - 0x00, 0x1c, 0x02, 0x44, 0xf8, 0x1e, 0xcc, 0xe1, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0xc0, 0x23, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x38, 0x01, - 0x42, 0xfc, 0x0f, 0xcc, 0xf1, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, - 0xf0, 0x39, 0x00, 0x00, 0xe0, 0x03, 0x00, 0xf0, 0x00, 0xc2, 0xff, 0x07, - 0xcc, 0x7f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7c, 0x0e, 0x00, - 0x00, 0xf0, 0x01, 0x00, 0xe0, 0x03, 0xe2, 0xe7, 0x07, 0xcc, 0x1f, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbf, 0x23, 0xe0, 0xff, 0xff, 0x00, - 0x00, 0xc0, 0x1f, 0xff, 0x64, 0x06, 0xcc, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0xff, 0x3c, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, - 0x7f, 0x64, 0x06, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0xf8, 0x1f, 0x78, 0x7c, 0x7f, 0x00, 0x00, 0x00, 0xfc, 0x20, 0x64, 0x06, - 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x33, 0x1c, - 0x38, 0x66, 0x00, 0x00, 0x00, 0x0c, 0x20, 0x6c, 0x06, 0xcc, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x3e, 0x0e, 0x38, 0x76, 0x00, - 0x00, 0x00, 0x0c, 0x20, 0x68, 0x06, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0xf8, 0x87, 0x0f, 0x38, 0x76, 0x00, 0x00, 0x00, 0x0c, - 0x20, 0x68, 0x06, 0xcc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, - 0x78, 0xf8, 0x0f, 0x38, 0x76, 0x00, 0x00, 0x00, 0x0c, 0x10, 0x68, 0x06, - 0xcc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf8, 0xff, 0x0f, - 0x38, 0x76, 0x00, 0x00, 0x00, 0x0c, 0x10, 0x68, 0x06, 0xcc, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf8, 0xff, 0x0e, 0x38, 0x76, 0x00, - 0x00, 0x00, 0x0c, 0x10, 0x68, 0x06, 0xcc, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1c, 0xf8, 0xe1, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x0c, - 0x08, 0x68, 0x06, 0xcc, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x68, 0x06, - 0xcc, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x0e, - 0x38, 0x3e, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x68, 0x06, 0xcc, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, - 0x00, 0x00, 0x1c, 0x04, 0x68, 0x06, 0xcc, 0x0e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x1c, - 0x02, 0x68, 0x06, 0xcc, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x68, 0x06, - 0xcc, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 0xe0, 0x0e, - 0x38, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x01, 0x68, 0x06, 0xcc, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, - 0x00, 0x00, 0x18, 0x01, 0x68, 0x06, 0xcc, 0x1c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x98, - 0x00, 0x68, 0x06, 0xcc, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, - 0x38, 0xe0, 0x0e, 0x38, 0x3e, 0x00, 0x00, 0x00, 0x98, 0x00, 0x68, 0x06, - 0xcc, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x38, 0xe0, 0x0e, - 0x38, 0x1e, 0x00, 0x00, 0x00, 0x58, 0x00, 0x6c, 0x0e, 0xcc, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0xe0, 0x0e, 0x38, 0x1e, 0x00, - 0x00, 0x00, 0x38, 0x00, 0x64, 0x0e, 0xcc, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x01, 0x70, 0xe0, 0x0e, 0x1c, 0x1e, 0x00, 0x00, 0x00, 0x18, - 0x00, 0x64, 0x1e, 0xcc, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, - 0xe0, 0xe1, 0x0e, 0x0f, 0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x64, 0x3e, - 0xcc, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0xef, 0xce, - 0x07, 0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x64, 0x3e, 0xcc, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xff, 0xfe, 0x03, 0x1e, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x64, 0x7e, 0xcc, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x00, 0xfc, 0xfe, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x18, - 0x00, 0x64, 0x66, 0xcc, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x00, 0xe0, 0x1e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x66, 0xe6, - 0xcc, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xe0, 0x0e, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x62, 0xc6, 0xcd, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x1e, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x62, 0xc6, 0xcd, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x70, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x0e, 0x00, 0x00, 0x00, 0x38, - 0x00, 0x62, 0x86, 0xcf, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, - 0xf0, 0xff, 0xff, 0x0f, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x61, 0x86, - 0xcf, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xfc, 0x00, 0x00, - 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x61, 0x8e, 0xcf, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x78, 0x00, 0x00, 0x0e, 0x0e, 0x00, - 0x00, 0x00, 0xf8, 0xff, 0x7f, 0xfe, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x00, 0xf0, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0xf0, - 0xff, 0x3f, 0xff, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0xe0, 0x01, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x8f, 0x07, - 0x9e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xe0, 0x07, 0x00, - 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x30, 0x00, 0xc0, 0xff, 0x3f, 0xc0, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x00, - 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xf0, - 0xff, 0xff, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, - 0x3f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0x00, - 0x38, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x38, 0x00, 0x38, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x18, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x18, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0xdc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x00, - 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x9c, 0x03, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x00, 0x18, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x0c, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x1c, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x0c, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x1c, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0c, 0x00, - 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x1c, 0x00, - 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x18, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x1c, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x1c, 0x1c, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x0e, 0x00, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x1c, 0x1c, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, - 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x1c, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x00, 0x18, 0x38, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x06, 0x00, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x0e, 0x00, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, - 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x18, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x0e, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, - 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1e, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x00, 0x38, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x1c, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x18, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x18, 0x00, - 0x30, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x1e, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0x00, 0x30, 0xe0, 0x01, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x3c, 0x00, 0x30, 0xf0, 0x01, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x7e, 0x00, 0x70, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x0f, - 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe7, 0x00, - 0x70, 0xbc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x1f, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xe3, 0x00, 0x60, 0x1e, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0xfc, 0xc1, 0x01, 0xe0, 0x0f, 0x0f, 0x00, 0x00, 0x00, - 0x80, 0x07, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0xf8, 0x80, 0x03, 0xe0, 0x03, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xe0, - 0x1b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x78, 0x80, 0x07, - 0xe0, 0x01, 0x1c, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xc0, 0x1b, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0f, 0xe0, 0x01, 0x38, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0xc0, 0x19, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x0e, 0x1e, 0xc0, 0x71, 0xf8, 0x00, 0x00, 0x00, - 0x78, 0x00, 0xdc, 0x19, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x1f, 0x1e, 0xc0, 0xf9, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x0f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/nx-X11/include/bitmaps/menu10 b/nx-X11/include/bitmaps/menu10 deleted file mode 100644 index 6250e8e3c..000000000 --- a/nx-X11/include/bitmaps/menu10 +++ /dev/null @@ -1,5 +0,0 @@ -#define menu10_width 10 -#define menu10_height 10 -static char menu10_bits[] = { - 0xfe, 0x01, 0x02, 0x01, 0x02, 0x03, 0x32, 0x03, 0x02, 0x03, 0x32, 0x03, - 0x02, 0x03, 0x02, 0x03, 0xfe, 0x03, 0xf8, 0x03}; diff --git a/nx-X11/include/bitmaps/menu12 b/nx-X11/include/bitmaps/menu12 deleted file mode 100644 index e88ca688b..000000000 --- a/nx-X11/include/bitmaps/menu12 +++ /dev/null @@ -1,5 +0,0 @@ -#define menu12_width 12 -#define menu12_height 12 -static unsigned char menu12_bits[] = { - 0xfe, 0x03, 0x02, 0x02, 0x02, 0x06, 0x72, 0x06, 0x02, 0x06, 0x72, 0x06, - 0x02, 0x06, 0x72, 0x06, 0x02, 0x06, 0x02, 0x06, 0xfe, 0x07, 0xf8, 0x07}; diff --git a/nx-X11/include/bitmaps/menu16 b/nx-X11/include/bitmaps/menu16 deleted file mode 100644 index 770deeea5..000000000 --- a/nx-X11/include/bitmaps/menu16 +++ /dev/null @@ -1,6 +0,0 @@ -#define menu16_width 16 -#define menu16_height 16 -static char menu16_bits[] = { - 0xfc, 0x1f, 0x04, 0x10, 0x04, 0x30, 0x04, 0x30, 0xe4, 0x33, 0x04, 0x30, - 0xe4, 0x33, 0x04, 0x30, 0xe4, 0x33, 0x04, 0x30, 0xe4, 0x33, 0x04, 0x30, - 0x04, 0x30, 0x04, 0x30, 0xfc, 0x3f, 0xf0, 0x3f}; diff --git a/nx-X11/include/bitmaps/menu6 b/nx-X11/include/bitmaps/menu6 deleted file mode 100644 index 780b028b5..000000000 --- a/nx-X11/include/bitmaps/menu6 +++ /dev/null @@ -1,4 +0,0 @@ -#define menu6_width 6 -#define menu6_height 7 -static char menu6_bits[] = { - 0x1f, 0x31, 0x35, 0x35, 0x31, 0x3f, 0x1e}; diff --git a/nx-X11/include/bitmaps/menu8 b/nx-X11/include/bitmaps/menu8 deleted file mode 100644 index 955c1e92b..000000000 --- a/nx-X11/include/bitmaps/menu8 +++ /dev/null @@ -1,4 +0,0 @@ -#define menu8_width 8 -#define menu8_height 8 -static char menu8_bits[] = { - 0x7f, 0x41, 0xdd, 0xc1, 0xdd, 0xc1, 0xff, 0xfc}; diff --git a/nx-X11/include/bitmaps/noletters b/nx-X11/include/bitmaps/noletters deleted file mode 100644 index 5774124ef..000000000 --- a/nx-X11/include/bitmaps/noletters +++ /dev/null @@ -1,27 +0,0 @@ -#define noletters_width 48 -#define noletters_height 48 -static char noletters_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, - 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, - 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01, - 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x07, - 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x78, 0x0e, - 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x1c, - 0x38, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x38, 0x00, 0x00, 0x80, 0x07, 0x38, - 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x1c, 0x04, 0x00, 0xe0, 0x41, 0x70, - 0x1c, 0x04, 0x00, 0xf0, 0x40, 0x70, 0x1c, 0x74, 0x00, 0x78, 0x4e, 0x70, - 0x0e, 0x04, 0x00, 0x3c, 0x4a, 0xe0, 0x0e, 0x74, 0x03, 0x1e, 0x4a, 0xe0, - 0x0e, 0x04, 0x00, 0x0f, 0x4e, 0xe0, 0x0e, 0x04, 0x80, 0x07, 0x40, 0xe0, - 0x0e, 0x04, 0xf8, 0x0f, 0x40, 0xe0, 0x0e, 0x04, 0xe0, 0x01, 0x40, 0xe0, - 0x0e, 0x04, 0xf8, 0x00, 0x40, 0xe0, 0x0e, 0x04, 0x78, 0x00, 0x40, 0xe0, - 0x0e, 0x04, 0xfc, 0xf3, 0x40, 0xe0, 0x1c, 0x04, 0x1e, 0x00, 0x40, 0x70, - 0x1c, 0x04, 0x0f, 0x00, 0x40, 0x70, 0x1c, 0x84, 0x07, 0x00, 0x40, 0x70, - 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x38, 0xe0, 0x01, 0x00, 0x00, 0x38, - 0x38, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x78, 0x00, 0x00, 0x00, 0x1c, - 0xf0, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0xe0, 0x1e, 0x00, 0x00, 0x00, 0x0e, - 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, - 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01, - 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, - 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/opendot b/nx-X11/include/bitmaps/opendot deleted file mode 100644 index a8ec421df..000000000 --- a/nx-X11/include/bitmaps/opendot +++ /dev/null @@ -1,8 +0,0 @@ -#define opendot_width 16 -#define opendot_height 16 -#define opendot_x_hot 7 -#define opendot_y_hot 7 -static char opendot_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, - 0x60, 0x03, 0x20, 0x02, 0x60, 0x03, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/opendotMask b/nx-X11/include/bitmaps/opendotMask deleted file mode 100644 index 0f83c64de..000000000 --- a/nx-X11/include/bitmaps/opendotMask +++ /dev/null @@ -1,8 +0,0 @@ -#define opendotMask_width 16 -#define opendotMask_height 16 -#define opendotMask_x_hot 7 -#define opendotMask_y_hot 7 -static char opendotMask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0xf0, 0x07, - 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0xe0, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/plaid b/nx-X11/include/bitmaps/plaid deleted file mode 100644 index 578e464db..000000000 --- a/nx-X11/include/bitmaps/plaid +++ /dev/null @@ -1,11 +0,0 @@ -#define plaid_width 22 -#define plaid_height 22 -#define plaid_x_hot -1 -#define plaid_y_hot -1 -static char plaid_bits[] = { - 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, - 0x75, 0xfd, 0x3f, 0xff, 0x57, 0x15, 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, - 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, 0x75, 0xfd, 0x3f, 0x20, 0xa8, 0x2b, - 0x20, 0x50, 0x15, 0x20, 0xa8, 0x2b, 0x20, 0x50, 0x15, 0x20, 0xa8, 0x2b, - 0xff, 0xff, 0x3f, 0x20, 0xa8, 0x2b, 0x20, 0x50, 0x15, 0x20, 0xa8, 0x2b, - 0x20, 0x50, 0x15, 0x20, 0xa8, 0x2b}; diff --git a/nx-X11/include/bitmaps/right_ptr b/nx-X11/include/bitmaps/right_ptr deleted file mode 100644 index 3922aa562..000000000 --- a/nx-X11/include/bitmaps/right_ptr +++ /dev/null @@ -1,8 +0,0 @@ -#define right_ptr_width 16 -#define right_ptr_height 16 -#define right_ptr_x_hot 12 -#define right_ptr_y_hot 1 -static char right_ptr_bits[] = { - 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x1f, - 0x80, 0x1f, 0xc0, 0x1f, 0xe0, 0x1f, 0x00, 0x1f, 0x00, 0x1b, 0x80, 0x11, - 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/right_ptrmsk b/nx-X11/include/bitmaps/right_ptrmsk deleted file mode 100644 index 96f532488..000000000 --- a/nx-X11/include/bitmaps/right_ptrmsk +++ /dev/null @@ -1,6 +0,0 @@ -#define right_ptrmsk_width 16 -#define right_ptrmsk_height 16 -static char right_ptrmsk_bits[] = { - 0x00, 0x30, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x3e, 0x00, 0x3f, 0x80, 0x3f, - 0xc0, 0x3f, 0xe0, 0x3f, 0xf0, 0x3f, 0xf0, 0x3f, 0x80, 0x3f, 0xc0, 0x3b, - 0xc0, 0x33, 0xe0, 0x01, 0xe0, 0x01, 0xc0, 0x00}; diff --git a/nx-X11/include/bitmaps/root_weave b/nx-X11/include/bitmaps/root_weave deleted file mode 100644 index ec41e436f..000000000 --- a/nx-X11/include/bitmaps/root_weave +++ /dev/null @@ -1,4 +0,0 @@ -#define root_weave_width 4 -#define root_weave_height 4 -static char root_weave_bits[] = { - 0x07, 0x0d, 0x0b, 0x0e}; diff --git a/nx-X11/include/bitmaps/scales b/nx-X11/include/bitmaps/scales deleted file mode 100644 index e5aac6acb..000000000 --- a/nx-X11/include/bitmaps/scales +++ /dev/null @@ -1,6 +0,0 @@ -#define scales_width 16 -#define scales_height 16 -static char scales_bits[] = { - 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0xc7, 0xc7, 0x01, 0x01, 0x01, 0x01, - 0x82, 0x82, 0x7c, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0xc7, 0xc7, - 0x01, 0x01, 0x01, 0x01, 0x82, 0x82, 0x7c, 0x7c}; diff --git a/nx-X11/include/bitmaps/sipb b/nx-X11/include/bitmaps/sipb deleted file mode 100644 index 7f3b7c1a6..000000000 --- a/nx-X11/include/bitmaps/sipb +++ /dev/null @@ -1,16 +0,0 @@ -#define sipb_width 32 -#define sipb_height 32 -#define sipb_x_hot 12 -#define sipb_y_hot 16 -static char sipb_bits[] = { - 0xbe, 0xdf, 0x03, 0x00, 0x22, 0x49, 0x04, 0x00, 0x04, 0x49, 0x04, 0x00, - 0x08, 0x49, 0x04, 0x00, 0x10, 0xc9, 0x03, 0x00, 0x08, 0x49, 0x04, 0x00, - 0x04, 0x49, 0x04, 0x00, 0x22, 0x49, 0x04, 0x00, 0x3e, 0xc9, 0x03, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfd, 0x1e, 0x00, 0x10, 0x49, 0x22, - 0x00, 0x20, 0x48, 0x22, 0x00, 0x40, 0x48, 0x22, 0x00, 0x80, 0x48, 0x1e, - 0x00, 0x40, 0x48, 0x22, 0x00, 0x20, 0x48, 0x22, 0x00, 0x10, 0x49, 0x22, - 0x00, 0xf0, 0x49, 0x1e, 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, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/star b/nx-X11/include/bitmaps/star deleted file mode 100644 index c98f1a4ab..000000000 --- a/nx-X11/include/bitmaps/star +++ /dev/null @@ -1,8 +0,0 @@ -#define star_width 16 -#define star_height 16 -#define star_x_hot 7 -#define star_y_hot 7 -static char star_bits[] = { - 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x88, 0x08, 0x90, 0x04, 0xa0, 0x02, - 0x40, 0x01, 0x3e, 0x3e, 0x40, 0x01, 0xa0, 0x02, 0x90, 0x04, 0x88, 0x08, - 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/starMask b/nx-X11/include/bitmaps/starMask deleted file mode 100644 index c220bb6ff..000000000 --- a/nx-X11/include/bitmaps/starMask +++ /dev/null @@ -1,8 +0,0 @@ -#define starMask_width 16 -#define starMask_height 16 -#define starMask_x_hot 7 -#define starMask_y_hot 7 -static char starMask_bits[] = { - 0xc0, 0x01, 0xc0, 0x01, 0xdc, 0x1d, 0xfc, 0x1f, 0xfc, 0x1f, 0xf8, 0x0f, - 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xf8, 0x0f, 0xfc, 0x1f, 0xfc, 0x1f, - 0xdc, 0x1d, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/stipple b/nx-X11/include/bitmaps/stipple deleted file mode 100644 index 63558d026..000000000 --- a/nx-X11/include/bitmaps/stipple +++ /dev/null @@ -1,4 +0,0 @@ -#define stipple_width 16 -#define stipple_height 4 -static char stipple_bits[] = { - 0x55, 0x55, 0xee, 0xee, 0x55, 0x55, 0xba, 0xbb}; diff --git a/nx-X11/include/bitmaps/target b/nx-X11/include/bitmaps/target deleted file mode 100644 index 6d23ecada..000000000 --- a/nx-X11/include/bitmaps/target +++ /dev/null @@ -1,6 +0,0 @@ -#define target_width 16 -#define target_height 16 -static char target_bits[] = { - 0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0xe0, 0x07, 0x90, 0x09, 0x88, 0x11, - 0xc8, 0x13, 0x7e, 0x7e, 0x7e, 0x7e, 0xc8, 0x13, 0x88, 0x11, 0x90, 0x09, - 0xe0, 0x07, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/terminal b/nx-X11/include/bitmaps/terminal deleted file mode 100644 index b8d9204bd..000000000 --- a/nx-X11/include/bitmaps/terminal +++ /dev/null @@ -1,52 +0,0 @@ -/*****************************************************************************/ -/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/ -/** Salt Lake City, Utah **/ -/** **/ -/** 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 permis- **/ -/** sion notice appear in supporting documentation, and that the **/ -/** name of Evans & Sutherland not be used in advertising or publi- **/ -/** city pertaining to distribution of the software without specif- **/ -/** ic, written prior permission. **/ -/** **/ -/** EVANS & SUTHERLAND DISCLAIMS ALL WARRANTIES WITH REGARD TO **/ -/** THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILI- **/ -/** TY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND BE LIABLE **/ -/** FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAM- **/ -/** AGES 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 PER- **/ -/** FORMANCE OF THIS SOFTWARE. **/ -/*****************************************************************************/ - -#define xterm_width 48 -#define xterm_height 48 -static char xterm_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0xfe, 0xff, 0xff, 0x1f, 0x05, - 0x20, 0x01, 0x00, 0x00, 0x20, 0x09, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, - 0xa0, 0xfc, 0xff, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0xfc, 0x01, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0xfc, 0xff, 0x3f, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0xfc, 0x03, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0xfc, 0xff, 0x01, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0xfc, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x09, - 0xa0, 0x00, 0x00, 0x00, 0x40, 0x09, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x05, - 0x20, 0x01, 0x00, 0x00, 0x20, 0x05, 0x20, 0xfe, 0xff, 0xff, 0x1f, 0x03, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, - 0xa0, 0xaa, 0xaa, 0xaa, 0x2a, 0x03, 0x10, 0x00, 0x00, 0x00, 0x80, 0x02, - 0x50, 0x55, 0x55, 0x55, 0x95, 0x02, 0x08, 0x00, 0x00, 0x00, 0x40, 0x02, - 0xa8, 0xaa, 0xaa, 0xaa, 0x4a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x20, 0x01, - 0xb4, 0xff, 0xff, 0xff, 0xad, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, - 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/tie_fighter b/nx-X11/include/bitmaps/tie_fighter deleted file mode 100644 index 0513db646..000000000 --- a/nx-X11/include/bitmaps/tie_fighter +++ /dev/null @@ -1,6 +0,0 @@ -#define tie_fighter_width 16 -#define tie_fighter_height 16 -static char tie_fighter_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x02, 0x40, - 0xe2, 0x47, 0x3e, 0x7c, 0x12, 0x48, 0x3e, 0x7c, 0xe2, 0x47, 0x02, 0x40, - 0x42, 0x42, 0x64, 0x26, 0x28, 0x14, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/vlines2 b/nx-X11/include/bitmaps/vlines2 deleted file mode 100644 index f42ae583f..000000000 --- a/nx-X11/include/bitmaps/vlines2 +++ /dev/null @@ -1,4 +0,0 @@ -#define vlines2_width 2 -#define vlines2_height 1 -static char vlines2_bits[] = { - 0x01}; diff --git a/nx-X11/include/bitmaps/vlines3 b/nx-X11/include/bitmaps/vlines3 deleted file mode 100644 index 55c224654..000000000 --- a/nx-X11/include/bitmaps/vlines3 +++ /dev/null @@ -1,4 +0,0 @@ -#define vlines3_width 3 -#define vlines3_height 1 -static char vlines3_bits[] = { - 0x02}; diff --git a/nx-X11/include/bitmaps/weird_size b/nx-X11/include/bitmaps/weird_size deleted file mode 100644 index e6f45d506..000000000 --- a/nx-X11/include/bitmaps/weird_size +++ /dev/null @@ -1,5 +0,0 @@ -#define weird_size_width 7 -#define weird_size_height 13 -static char weird_size_bits[] = { - 0x07, 0x05, 0x07, 0x01, 0x75, 0x45, 0x74, 0x44, 0x74, 0x00, 0x10, 0x38, - 0x10}; diff --git a/nx-X11/include/bitmaps/wide_weave b/nx-X11/include/bitmaps/wide_weave deleted file mode 100644 index 27ba6397f..000000000 --- a/nx-X11/include/bitmaps/wide_weave +++ /dev/null @@ -1,6 +0,0 @@ -#define wide_weave_width 16 -#define wide_weave_height 16 -static char wide_weave_bits[] = { - 0x11, 0x11, 0xb8, 0xb8, 0x7c, 0x7c, 0x3a, 0x3a, 0x11, 0x11, 0xa3, 0xa3, - 0xc7, 0xc7, 0x8b, 0x8b, 0x11, 0x11, 0xb8, 0xb8, 0x7c, 0x7c, 0x3a, 0x3a, - 0x11, 0x11, 0xa3, 0xa3, 0xc7, 0xc7, 0x8b, 0x8b}; diff --git a/nx-X11/include/bitmaps/wingdogs b/nx-X11/include/bitmaps/wingdogs deleted file mode 100644 index 1a4befc44..000000000 --- a/nx-X11/include/bitmaps/wingdogs +++ /dev/null @@ -1,14 +0,0 @@ -#define wingdogs_width 32 -#define wingdogs_height 32 -static char wingdogs_bits[] = { - 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x20, 0x0f, 0x00, 0x00, 0x40, 0x3e, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x80, - 0x84, 0xff, 0x00, 0xc0, 0x86, 0xff, 0x00, 0xc0, 0x07, 0xff, 0x21, 0xe0, - 0x0f, 0xfe, 0x23, 0xf0, 0x0f, 0xfe, 0x23, 0xfc, 0x1d, 0xfe, 0x13, 0xfe, - 0x39, 0xfc, 0x13, 0xff, 0x3f, 0xfc, 0x83, 0xff, 0x9f, 0xfc, 0xc1, 0xff, - 0x0f, 0xfe, 0xe0, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, - 0xfc, 0xff, 0xff, 0x7f, 0xf6, 0xff, 0xff, 0x1f, 0xfb, 0xff, 0xff, 0x07, - 0xf8, 0xfd, 0xff, 0x03, 0xbc, 0xf9, 0xff, 0x01, 0x3c, 0xf9, 0xff, 0x01, - 0x3e, 0xf0, 0xf7, 0x00, 0x1f, 0xe0, 0x77, 0x00, 0x1f, 0x80, 0x77, 0x00, - 0x8f, 0x00, 0x6f, 0x00, 0xc7, 0x00, 0x6e, 0x80, 0x07, 0x00, 0x7c, 0x80, - 0x0d, 0x00, 0xf8, 0x80, 0x1f, 0x00, 0xf0, 0x01}; diff --git a/nx-X11/include/bitmaps/woman b/nx-X11/include/bitmaps/woman deleted file mode 100644 index 92e604186..000000000 --- a/nx-X11/include/bitmaps/woman +++ /dev/null @@ -1,66 +0,0 @@ -#define sorceress_width 75 -#define sorceress_height 75 -static char sorceress_bits[] = { - 0xfc, 0x7e, 0x40, 0x20, 0x90, 0x00, 0x07, 0x80, 0x23, 0x00, 0x00, 0xc6, - 0xc1, 0x41, 0x98, 0xb8, 0x01, 0x07, 0x66, 0x00, 0x15, 0x9f, 0x03, 0x47, - 0x8c, 0xc6, 0xdc, 0x7b, 0xcc, 0x00, 0xb0, 0x71, 0x0e, 0x4d, 0x06, 0x66, - 0x73, 0x8e, 0x8f, 0x01, 0x18, 0xc4, 0x39, 0x4b, 0x02, 0x23, 0x0c, 0x04, - 0x1e, 0x03, 0x0c, 0x08, 0xc7, 0xef, 0x08, 0x30, 0x06, 0x07, 0x1c, 0x02, - 0x06, 0x30, 0x18, 0xae, 0xc8, 0x98, 0x3f, 0x78, 0x20, 0x06, 0x02, 0x20, - 0x60, 0xa0, 0xc4, 0x1d, 0xc0, 0xff, 0x41, 0x04, 0xfa, 0x63, 0x80, 0xa1, - 0xa4, 0x3d, 0x00, 0x84, 0xbf, 0x04, 0x0f, 0x06, 0xfc, 0xa1, 0x34, 0x6b, - 0x01, 0x1c, 0xc9, 0x05, 0x06, 0xc7, 0x06, 0xbe, 0x11, 0x1e, 0x43, 0x30, - 0x91, 0x05, 0xc3, 0x61, 0x02, 0x30, 0x1b, 0x30, 0xcc, 0x20, 0x11, 0x00, - 0xc1, 0x3c, 0x03, 0x20, 0x0a, 0x00, 0xe8, 0x60, 0x21, 0x00, 0x61, 0x1b, - 0xc1, 0x63, 0x08, 0xf0, 0xc6, 0xc7, 0x21, 0x03, 0xf8, 0x08, 0xe1, 0xcf, - 0x0a, 0xfc, 0x4d, 0x99, 0x43, 0x07, 0x3c, 0x0c, 0xf1, 0x9f, 0x0b, 0xfc, - 0x5b, 0x81, 0x47, 0x02, 0x16, 0x04, 0x31, 0x1c, 0x0b, 0x1f, 0x17, 0x89, - 0x4d, 0x06, 0x1a, 0x04, 0x31, 0x38, 0x02, 0x07, 0x56, 0x89, 0x49, 0x04, - 0x0b, 0x04, 0xb1, 0x72, 0x82, 0xa1, 0x54, 0x9a, 0x49, 0x04, 0x1d, 0x66, - 0x50, 0xe7, 0xc2, 0xf0, 0x54, 0x9a, 0x58, 0x04, 0x0d, 0x62, 0xc1, 0x1f, - 0x44, 0xfc, 0x51, 0x90, 0x90, 0x04, 0x86, 0x63, 0xe0, 0x74, 0x04, 0xef, - 0x31, 0x1a, 0x91, 0x00, 0x02, 0xe2, 0xc1, 0xfd, 0x84, 0xf9, 0x30, 0x0a, - 0x91, 0x00, 0x82, 0xa9, 0xc0, 0xb9, 0x84, 0xf9, 0x31, 0x16, 0x81, 0x00, - 0x42, 0xa9, 0xdb, 0x7f, 0x0c, 0xff, 0x1c, 0x16, 0x11, 0x00, 0x02, 0x28, - 0x0b, 0x07, 0x08, 0x60, 0x1c, 0x02, 0x91, 0x00, 0x46, 0x29, 0x0e, 0x00, - 0x00, 0x00, 0x10, 0x16, 0x11, 0x02, 0x06, 0x29, 0x04, 0x00, 0x00, 0x00, - 0x10, 0x16, 0x91, 0x06, 0xa6, 0x2a, 0x04, 0x00, 0x00, 0x00, 0x18, 0x24, - 0x91, 0x04, 0x86, 0x2a, 0x04, 0x00, 0x00, 0x00, 0x18, 0x27, 0x93, 0x04, - 0x96, 0x4a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x02, 0x91, 0x04, 0x86, 0x4a, - 0x0c, 0x00, 0x00, 0x00, 0x1e, 0x23, 0x93, 0x04, 0x56, 0x88, 0x08, 0x00, - 0x00, 0x00, 0x90, 0x21, 0x93, 0x04, 0x52, 0x0a, 0x09, 0x80, 0x01, 0x00, - 0xd0, 0x21, 0x95, 0x04, 0x57, 0x0a, 0x0f, 0x80, 0x27, 0x00, 0xd8, 0x20, - 0x9d, 0x04, 0x5d, 0x08, 0x1c, 0x80, 0x67, 0x00, 0xe4, 0x01, 0x85, 0x04, - 0x79, 0x8a, 0x3f, 0x00, 0x00, 0x00, 0xf4, 0x11, 0x85, 0x06, 0x39, 0x08, - 0x7d, 0x00, 0x00, 0x18, 0xb7, 0x10, 0x81, 0x03, 0x29, 0x12, 0xcb, 0x00, - 0x7e, 0x30, 0x28, 0x00, 0x85, 0x03, 0x29, 0x10, 0xbe, 0x81, 0xff, 0x27, - 0x0c, 0x10, 0x85, 0x03, 0x29, 0x32, 0xfa, 0xc1, 0xff, 0x27, 0x94, 0x11, - 0x85, 0x03, 0x28, 0x20, 0x6c, 0xe1, 0xff, 0x07, 0x0c, 0x01, 0x85, 0x01, - 0x28, 0x62, 0x5c, 0xe3, 0x8f, 0x03, 0x4e, 0x91, 0x80, 0x05, 0x39, 0x40, - 0xf4, 0xc2, 0xff, 0x00, 0x9f, 0x91, 0x84, 0x05, 0x31, 0xc6, 0xe8, 0x07, - 0x7f, 0x80, 0xcd, 0x00, 0xc4, 0x04, 0x31, 0x06, 0xc9, 0x0e, 0x00, 0xc0, - 0x48, 0x88, 0xe0, 0x04, 0x79, 0x04, 0xdb, 0x12, 0x00, 0x30, 0x0c, 0xc8, - 0xe4, 0x04, 0x6d, 0x06, 0xb6, 0x23, 0x00, 0x18, 0x1c, 0xc0, 0x84, 0x04, - 0x25, 0x0c, 0xff, 0xc2, 0x00, 0x4e, 0x06, 0xb0, 0x80, 0x04, 0x3f, 0x8a, - 0xb3, 0x83, 0xff, 0xc3, 0x03, 0x91, 0x84, 0x04, 0x2e, 0xd8, 0x0f, 0x3f, - 0x00, 0x00, 0x5f, 0x83, 0x84, 0x04, 0x2a, 0x70, 0xfd, 0x7f, 0x00, 0x00, - 0xc8, 0xc0, 0x84, 0x04, 0x4b, 0xe2, 0x2f, 0x01, 0x00, 0x08, 0x58, 0x60, - 0x80, 0x04, 0x5b, 0x82, 0xff, 0x01, 0x00, 0x08, 0xd0, 0xa0, 0x84, 0x04, - 0x72, 0x80, 0xe5, 0x00, 0x00, 0x08, 0xd2, 0x20, 0x44, 0x04, 0xca, 0x02, - 0xff, 0x00, 0x00, 0x08, 0xde, 0xa0, 0x44, 0x04, 0x82, 0x02, 0x6d, 0x00, - 0x00, 0x08, 0xf6, 0xb0, 0x40, 0x02, 0x82, 0x07, 0x3f, 0x00, 0x00, 0x08, - 0x44, 0x58, 0x44, 0x02, 0x93, 0x3f, 0x1f, 0x00, 0x00, 0x30, 0x88, 0x4f, - 0x44, 0x03, 0x83, 0x23, 0x3e, 0x00, 0x00, 0x00, 0x18, 0x60, 0xe0, 0x07, - 0xe3, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x70, 0x70, 0xe4, 0x07, 0xc7, 0x1b, - 0xfe, 0x01, 0x00, 0x00, 0xe0, 0x3c, 0xe4, 0x07, 0xc7, 0xe3, 0xfe, 0x1f, - 0x00, 0x00, 0xff, 0x1f, 0xfc, 0x07, 0xc7, 0x03, 0xf8, 0x33, 0x00, 0xc0, - 0xf0, 0x07, 0xff, 0x07, 0x87, 0x02, 0xfc, 0x43, 0x00, 0x60, 0xf0, 0xff, - 0xff, 0x07, 0x8f, 0x06, 0xbe, 0x87, 0x00, 0x30, 0xf8, 0xff, 0xff, 0x07, - 0x8f, 0x14, 0x9c, 0x8f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x9f, 0x8d, - 0x8a, 0x0f, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0xbf, 0x0b, 0x80, 0x1f, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0x7f, 0x3a, 0x80, 0x3f, 0x00, 0x80, - 0xff, 0xff, 0xff, 0x07, 0xff, 0x20, 0xc0, 0x3f, 0x00, 0x80, 0xff, 0xff, - 0xff, 0x07, 0xff, 0x01, 0xe0, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, - 0xff, 0x0f, 0xf8, 0xff, 0x40, 0xe0, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, - 0xff, 0xff, 0x40, 0xf0, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, - 0x41, 0xf0, 0xff, 0xff, 0xff, 0x07}; diff --git a/nx-X11/include/bitmaps/xfd_icon b/nx-X11/include/bitmaps/xfd_icon deleted file mode 100644 index 383334cf9..000000000 --- a/nx-X11/include/bitmaps/xfd_icon +++ /dev/null @@ -1,27 +0,0 @@ -#define xfd_icon_width 48 -#define xfd_icon_height 48 -static char xfd_icon_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x81, 0x40, 0x20, 0x10, 0x08, - 0x11, 0x9d, 0x5c, 0xa7, 0xd7, 0x0b, 0x29, 0xa5, 0x42, 0xa9, 0x50, 0x08, - 0x45, 0xa5, 0x42, 0xa9, 0x50, 0x08, 0x7d, 0x9d, 0x42, 0xa9, 0xd7, 0x09, - 0x45, 0xa5, 0x42, 0xa9, 0x50, 0x08, 0x45, 0xa5, 0x42, 0xa9, 0x50, 0x08, - 0x45, 0x9d, 0x5c, 0xa7, 0x57, 0x08, 0x01, 0x81, 0x40, 0x20, 0x10, 0x08, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-X11/include/bitmaps/xlogo11 b/nx-X11/include/bitmaps/xlogo11 deleted file mode 100644 index 5efd2c20e..000000000 --- a/nx-X11/include/bitmaps/xlogo11 +++ /dev/null @@ -1,6 +0,0 @@ -#define xlogo11_width 11 -#define xlogo11_height 11 - -static char xlogo11_bits[] = { - 0x0f, 0x04, 0x0f, 0x02, 0x1e, 0x01, 0x3c, 0x01, 0xb8, 0x00, 0x58, 0x00, - 0xe8, 0x00, 0xe4, 0x01, 0xc4, 0x03, 0xc2, 0x03, 0x81, 0x07 }; diff --git a/nx-X11/include/bitmaps/xlogo16 b/nx-X11/include/bitmaps/xlogo16 deleted file mode 100644 index 5c2302734..000000000 --- a/nx-X11/include/bitmaps/xlogo16 +++ /dev/null @@ -1,6 +0,0 @@ -#define xlogo16_width 16 -#define xlogo16_height 16 -static unsigned char xlogo16_bits[] = { - 0x0f, 0x80, 0x1e, 0x80, 0x3c, 0x40, 0x78, 0x20, 0x78, 0x10, 0xf0, 0x08, - 0xe0, 0x09, 0xc0, 0x05, 0xc0, 0x02, 0x40, 0x07, 0x20, 0x0f, 0x20, 0x1e, - 0x10, 0x1e, 0x08, 0x3c, 0x04, 0x78, 0x02, 0xf0}; diff --git a/nx-X11/include/bitmaps/xlogo32 b/nx-X11/include/bitmaps/xlogo32 deleted file mode 100644 index 1ecb6acaa..000000000 --- a/nx-X11/include/bitmaps/xlogo32 +++ /dev/null @@ -1,14 +0,0 @@ -#define xlogo32_width 32 -#define xlogo32_height 32 -static char xlogo32_bits[] = { - 0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x00, 0xc0, 0xfc, 0x03, 0x00, 0x60, - 0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18, 0xf0, 0x0f, 0x00, 0x0c, - 0xe0, 0x1f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x03, - 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00, - 0x00, 0xfe, 0x31, 0x00, 0x00, 0xfc, 0x33, 0x00, 0x00, 0xf8, 0x1b, 0x00, - 0x00, 0xf0, 0x0d, 0x00, 0x00, 0xf0, 0x0e, 0x00, 0x00, 0x60, 0x1f, 0x00, - 0x00, 0xb0, 0x3f, 0x00, 0x00, 0x98, 0x7f, 0x00, 0x00, 0x98, 0x7f, 0x00, - 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x03, 0xfc, 0x03, - 0x80, 0x01, 0xfc, 0x03, 0xc0, 0x00, 0xf8, 0x07, 0xc0, 0x00, 0xf0, 0x0f, - 0x60, 0x00, 0xe0, 0x1f, 0x30, 0x00, 0xe0, 0x1f, 0x18, 0x00, 0xc0, 0x3f, - 0x0c, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff}; diff --git a/nx-X11/include/bitmaps/xlogo64 b/nx-X11/include/bitmaps/xlogo64 deleted file mode 100644 index ad3b0dbbf..000000000 --- a/nx-X11/include/bitmaps/xlogo64 +++ /dev/null @@ -1,46 +0,0 @@ -#define xlogo64_width 64 -#define xlogo64_height 64 -static unsigned char xlogo64_bits[] = { - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x01, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7c, - 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf8, 0xff, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x0f, - 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xc0, 0xff, 0x3f, 0x00, - 0x00, 0x00, 0xc0, 0x07, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0x03, - 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x00, - 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0xff, 0x03, - 0x00, 0x00, 0x3e, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, - 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0x0f, - 0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xc0, 0x07, 0x00, - 0x00, 0xc0, 0xff, 0x3f, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x80, 0xff, 0x7f, - 0x00, 0xf0, 0x01, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0xf8, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, - 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x3e, 0x00, 0x00, - 0x00, 0x00, 0xfc, 0xff, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, - 0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xcf, 0x07, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xff, 0xcf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, - 0xe7, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xf3, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xff, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x7e, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, - 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xff, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xcf, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, - 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, 0xff, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xc3, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc1, - 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x80, 0xff, 0x7f, 0x00, 0x00, - 0x00, 0x00, 0x7c, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, - 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xfe, 0xff, 0x01, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x80, 0x0f, 0x00, - 0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xf0, 0xff, 0x0f, 0x00, - 0x00, 0xe0, 0x03, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xe0, 0x03, 0x00, - 0xe0, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xc0, 0xff, 0x3f, 0x00, - 0x00, 0xf8, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x7c, 0x00, 0x00, - 0x80, 0xff, 0x7f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, - 0x00, 0x3e, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x00, - 0x00, 0xfc, 0xff, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, - 0xc0, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00, - 0x00, 0xf0, 0xff, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, - 0xf0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0xff, 0x3f, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, - 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}; diff --git a/nx-X11/include/bitmaps/xsnow b/nx-X11/include/bitmaps/xsnow deleted file mode 100644 index 2c1bd8b65..000000000 --- a/nx-X11/include/bitmaps/xsnow +++ /dev/null @@ -1,1112 +0,0 @@ -#define xsnow_width 300 -#define xsnow_height 350 -static char xsnow_bits[] = { - 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, 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, 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, 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, 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, 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, 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, 0x00, 0x30, 0x00, 0x40, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, - 0x60, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x01, 0x68, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x01, 0x38, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x78, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x99, 0x39, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9e, 0x1f, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x98, - 0x1b, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x09, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x0f, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0xdf, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xfe, 0x03, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x47, 0x00, - 0x00, 0x90, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xce, - 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x6c, 0x0f, 0xef, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x6a, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0xcf, 0x07, 0x7c, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0xf7, 0x03, 0x1e, 0xfe, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x70, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfc, 0x07, 0x7e, 0x5b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x60, 0x30, 0xf0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0xef, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x71, - 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xfe, - 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0x77, 0xf0, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xb0, 0x33, 0xf0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0xf0, 0xe1, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0xe0, 0xe1, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x19, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0xe0, 0x81, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x9c, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x30, - 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9f, - 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x19, 0xe0, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x99, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfc, 0x1f, 0xe0, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0x01, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x7b, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xfc, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, 0x68, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0xdf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x33, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0xf6, 0xff, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x00, 0xfe, 0xff, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x66, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0x1e, 0xce, 0x03, 0x78, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x1f, 0x80, 0x07, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, - 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x90, 0xc3, 0x1f, 0x80, 0x1f, - 0x7e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1c, 0xef, 0x0f, - 0x80, 0xbf, 0xff, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x1e, - 0xfc, 0x07, 0x80, 0xff, 0x8f, 0x7b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0xf8, 0x0f, 0x02, 0x00, 0x00, 0x00, 0x40, - 0xdb, 0x0f, 0xf8, 0x03, 0x00, 0xf7, 0x07, 0xff, 0x16, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xb8, 0x0f, 0x03, 0x00, 0x00, - 0x00, 0xe0, 0x8d, 0x07, 0xfe, 0x01, 0x00, 0xfc, 0x03, 0x8e, 0x3d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x3d, 0xdc, 0x23, - 0x00, 0x00, 0x00, 0x60, 0xef, 0x03, 0x7f, 0x07, 0x00, 0xfe, 0x80, 0xcf, - 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3e, 0x1f, - 0xfc, 0xbd, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x8e, 0x7f, 0x0f, 0x00, 0xff, - 0xc1, 0xfb, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x1d, 0x0f, 0x58, 0xdc, 0x03, 0x00, 0x00, 0x00, 0x30, 0xfc, 0xef, 0x0f, - 0x80, 0xbf, 0xc3, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0xde, 0x1f, 0x7c, 0xbe, 0x01, 0x00, 0x00, 0x00, 0x10, 0xf0, - 0xc3, 0x0f, 0xc0, 0x1f, 0x46, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe2, 0x1d, 0xde, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0x01, 0x0f, 0xc0, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x78, 0x0e, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0x9e, 0xc3, 0x03, 0x38, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xf8, 0x0f, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xfe, 0xdf, 0x03, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xfe, 0x7f, 0x03, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, - 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x39, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x07, 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, 0x3b, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0xff, 0xfc, 0x1f, 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, 0x3b, 0x6a, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x7e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x1e, 0xe0, 0xff, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x33, - 0xf2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1e, 0xe0, 0xfe, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1e, - 0x60, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x1c, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x1c, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3c, 0x70, 0x62, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3f, 0x70, 0x6f, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x39, - 0x70, 0xfc, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7e, 0x20, 0x30, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x33, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x50, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xf0, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0b, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x67, 0x00, - 0x00, 0x90, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xcf, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfc, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xdc, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xd8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x98, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0xfc, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x1f, 0x08, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x70, 0x3e, 0x0c, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x7b, 0x78, - 0x8f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7d, - 0x3e, 0xf8, 0xd3, 0x02, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x33, 0x1a, 0xf0, 0xb0, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xad, 0x3f, 0xf0, 0xf9, 0x07, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x3b, 0x78, 0x9f, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0x39, 0x0c, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x1f, - 0x08, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf8, 0x3f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0xfc, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x73, 0xe8, 0x03, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x88, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xac, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfc, - 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xcf, 0xcc, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x40, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x01, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, - 0x18, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x00, 0x1a, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x03, 0x00, 0x0e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x00, 0x1e, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x33, 0x60, 0x0e, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xe0, 0x07, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xe0, - 0x06, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x13, 0xc0, 0x0c, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x1f, 0xc0, 0x1e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x07, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0x01, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xcf, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xc1, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0xc0, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0xc0, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x01, 0x01, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x00, 0x86, 0x01, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xb6, 0x07, 0x00, 0xec, 0x13, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xe7, 0x03, 0x00, - 0xf8, 0xfe, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf3, - 0x00, 0x00, 0x3c, 0xfe, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd0, 0xfe, 0x01, 0x00, 0x7e, 0x5b, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0xbc, 0x03, 0x00, 0xef, 0x11, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x07, 0x00, 0x87, 0x01, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x80, 0x01, 0x01, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, - 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x80, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, - 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x19, 0x40, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x11, 0x00, 0x00, 0xe6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1b, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3b, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x1a, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x3f, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x08, 0x00, 0x00, 0x4c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x33, 0x20, 0x1e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0b, 0x00, 0x00, 0xcc, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x08, - 0x04, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x0c, 0x9c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0x0d, 0xfc, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x23, 0x60, 0x1e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0c, 0x7c, 0x1c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0xe0, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0c, 0x3c, 0x1c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xe0, - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x38, 0x1c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, - 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, 0xc0, 0x17, 0xc0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x1f, 0x06, 0x78, 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, 0x3f, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x7f, 0x06, 0x78, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x78, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xdf, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x7c, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc5, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xff, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, - 0xff, 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, 0x0c, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x0c, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0xc0, 0xfd, 0x7f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x07, 0x00, 0x87, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0xc0, 0xff, 0xff, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xbc, 0x07, 0x00, 0xee, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xc0, 0x87, 0xf9, 0x00, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xf6, 0x03, 0x00, - 0xfc, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xe0, 0x07, 0xf0, 0x80, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xe3, - 0x01, 0x00, 0x78, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x04, 0xf4, 0xf0, 0x07, - 0xf0, 0xc3, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd8, 0xfb, 0x00, 0x00, 0x3e, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc7, - 0xfb, 0x03, 0xf0, 0xf7, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0xbe, 0x03, 0x00, 0xef, 0x13, 0x00, 0x00, 0x00, 0x40, - 0xbc, 0x87, 0xff, 0x00, 0xf0, 0xff, 0x73, 0x8f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x07, 0x00, 0x87, 0x01, 0x00, 0x00, - 0x00, 0xd0, 0xf6, 0x03, 0xff, 0x00, 0xc0, 0xff, 0xe0, 0xdf, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x01, 0x01, - 0x00, 0x00, 0x00, 0xf8, 0xe3, 0x81, 0x3f, 0x00, 0x00, 0x7f, 0xc0, 0x33, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xfb, 0xc0, 0xef, 0x00, 0xc0, 0x3f, - 0xf0, 0xf9, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xbe, 0xf3, 0xff, 0x03, - 0xe0, 0x3f, 0x78, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xff, - 0xfb, 0x03, 0xf0, 0x77, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x98, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0xfc, 0xf0, 0x03, 0xf8, 0xc3, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x7c, 0xe0, 0x03, 0xf8, 0x80, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x05, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xc0, 0x67, 0xf8, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x67, 0xe6, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x19, 0xc0, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0xff, 0xff, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x19, 0x40, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc0, 0xff, - 0x6f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6b, 0x6e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3b, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xf7, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0xcc, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x33, 0x60, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x1e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0xfc, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9f, 0x07, 0xf8, 0x7f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x20, 0xf8, 0x0f, 0x04, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x87, 0x07, - 0x98, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x38, 0x1f, 0x06, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x81, 0x07, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x3d, 0xbc, 0x47, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x07, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3e, 0x1f, 0xfc, - 0x69, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x19, - 0x0d, 0x78, 0xd8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0c, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xd6, 0x1f, 0xf8, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0f, 0xcc, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe2, 0x1d, 0xbc, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x0f, - 0xec, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf8, 0x1c, 0x06, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x0e, 0x8c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xf8, 0x0f, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x1f, 0x08, 0x04, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x44, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x39, 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x56, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x33, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x56, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x19, 0x00, 0x00, 0xe6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x67, 0xe6, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x07, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x80, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x01, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x01, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 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, - 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, 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, 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, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x0c, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x00, 0x00, 0x0e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x80, 0x0e, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x80, 0x07, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x0f, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, - 0x98, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x0e, 0x78, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x08, 0x38, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x30, 0x06, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0xf0, 0x07, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xf8, 0x03, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, - 0xfe, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf6, 0x73, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x42, 0x70, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x03, - 0x80, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0xdb, 0x03, 0x00, 0xfb, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xfe, 0xf3, 0x01, 0x00, 0xbc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xfe, 0x79, 0x00, 0x00, 0x8f, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x23, 0x00, 0x00, - 0x00, 0x30, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xff, 0x00, 0x80, 0xdf, 0x16, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, - 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xde, 0x01, 0xc0, 0x7b, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x35, 0x00, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, - 0xc0, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x10, 0x00, 0x20, 0xf0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x18, 0x00, - 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x67, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, - 0x1b, 0x00, 0xe0, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x7f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd8, 0x19, 0x00, 0xe0, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, - 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0xe0, 0xe1, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x0f, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0xc0, 0xe1, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x0e, 0xd0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0xc0, 0x81, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x08, 0x00, - 0xc0, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0e, 0x58, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, - 0x0c, 0x00, 0xc0, 0xc3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xf8, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xfe, 0x0f, 0x00, 0xc0, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x09, - 0x88, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0x01, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0xfe, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x87, - 0xcf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf3, 0xff, 0xc3, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc3, 0xcf, 0xc0, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0xc0, 0x03, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0x07, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0x07, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x80, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x01, 0x00, 0x80, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x01, 0x00, 0x00, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 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, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x06, - 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, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x3c, - 0x80, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, - 0x00, 0x78, 0xc0, 0x07, 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, 0x00, 0x00, 0x00, 0x80, 0x80, 0x1e, 0xfe, - 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x07, 0x04, 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, 0x00, 0x00, 0x80, 0xe1, - 0x78, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xfb, 0x1f, 0x06, 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, 0x00, 0x00, - 0x88, 0xf7, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x80, 0xff, 0xb9, 0x47, 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, - 0x00, 0x00, 0xda, 0x7e, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf0, - 0x6f, 0x01, 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, 0x00, 0x7f, 0x3c, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x80, - 0x3f, 0xe0, 0xb9, 0x03, 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, 0x00, 0x7b, 0x1f, 0xf8, 0x01, 0x00, 0x00, - 0x00, 0xc0, 0x1f, 0xf8, 0x7c, 0x03, 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, 0x00, 0xc8, 0x77, 0xfe, 0x03, - 0x00, 0x00, 0x00, 0xe0, 0x1f, 0xbc, 0x4f, 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, 0x00, 0x00, 0x80, 0xe1, - 0x7f, 0x07, 0x00, 0x00, 0x00, 0xf8, 0x7b, 0x1c, 0x06, 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, 0x00, 0x00, - 0x80, 0x80, 0x1f, 0x0e, 0x00, 0x00, 0x00, 0xfc, 0xe1, 0x04, 0x04, 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, - 0x00, 0x00, 0x00, 0x80, 0x0f, 0x38, 0x00, 0x00, 0x00, 0x7c, 0xc0, 0x01, - 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, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x70, 0x00, 0x00, 0x00, 0x3c, - 0x80, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x06, 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, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x03, 0x00, 0x00, 0x06, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x06, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x06, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x80, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0xec, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, - 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x23, - 0x00, 0x00, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc7, 0xff, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x3f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0xff, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x35, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, - 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, - 0x1f, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x17, 0x00, 0x00, 0x98, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3e, 0x0f, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x10, 0x08, - 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x0f, 0x0f, 0x00, 0xc0, 0xfc, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0x18, 0x38, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x00, 0x60, 0xf0, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xfc, 0x1b, 0xf8, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0e, 0x00, 0x60, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xcc, 0x19, 0xf8, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0e, 0x00, - 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x78, 0x38, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x1e, 0x00, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x70, 0x38, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x1e, 0x00, 0x60, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x70, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x1f, 0x00, 0x70, 0x7f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, - 0x0c, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x00, 0x70, 0xfc, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0x0c, 0xf0, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x10, 0x00, 0x30, 0xf0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x0f, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x19, 0x00, 0x00, - 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xf8, 0x3e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, - 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xfe, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3b, 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xff, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x33, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x80, 0xfb, 0xff, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x80, 0xff, 0xff, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0x80, 0x0f, 0xf3, 0x01, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x0f, 0xe0, 0x01, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0xe1, 0x0f, 0xe0, - 0x87, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x8e, 0xf7, - 0x07, 0xe0, 0xef, 0x7f, 0x18, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x78, - 0x0f, 0xff, 0x01, 0xe0, 0xff, 0xe7, 0x1e, 0x01, 0x00, 0x00, 0x00, 0xf0, - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0xed, 0x07, 0xfe, 0x01, 0x80, 0xff, 0xc1, 0xbf, 0x05, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0xc7, 0x03, 0x7f, 0x00, 0x00, 0xfe, 0x80, 0x67, 0x0e, - 0x00, 0x00, 0x00, 0xe0, 0x06, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xb0, 0xf7, 0x81, 0xdf, 0x01, 0x80, 0x7f, 0xe0, - 0xf3, 0x0d, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7c, 0xe7, 0xff, 0x07, 0xc0, - 0x7f, 0xf0, 0x3e, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x1b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xfe, 0xf7, - 0x07, 0xe0, 0xef, 0x70, 0x18, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0xf8, 0xe1, 0x07, 0xf0, 0x87, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x8f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf8, 0xc0, 0x07, 0xf0, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0x80, 0xcf, 0xf0, 0x01, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x19, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0xff, 0xff, 0x01, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0xff, 0xdf, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x04, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xef, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x01, 0xdc, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xff, - 0x01, 0xf8, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0x73, 0x00, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xf8, 0x3f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x7f, 0x00, 0x78, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x0f, 0xf0, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xde, 0x00, 0xdc, 0x0b, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x0f, 0x30, - 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x04, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x0f, 0x30, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, - 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, 0x04, 0x0e, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x04, 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, 0x0c, 0x0e, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf3, 0x07, 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, 0x0c, 0x1e, 0x18, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1e, 0x98, 0x31, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x1f, 0xd8, - 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x1b, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0x1c, 0x18, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x38, 0x41, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x3f, 0x10, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x07, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc1, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xc1, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xc1, 0x0d, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0xc1, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3d, 0x00, 0x00, - 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0xf7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x33, - 0x00, 0x00, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x9e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x03, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x41, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x77, - 0x00, 0xf6, 0x02, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfc, 0x3d, 0x00, 0xbc, 0x1f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfc, 0x1e, 0x00, 0xde, 0x1f, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x37, 0x00, 0xf7, 0x03, 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, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x63, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x41, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x00, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0xb4, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe3, 0x07, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xc1, 0x0f, 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, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xc1, 0x04, - 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0xc1, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x38, 0xc1, 0x0e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x38, 0x00, 0x0e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x0e, 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, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 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, 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, - 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, 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, 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, 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, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/nx-libs.spec b/nx-libs.spec index 6774a7ed6..a56a15559 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -638,7 +638,6 @@ chmod 755 %{buildroot}%{_libdir}/lib*.so* #Remove extras, GL, and other unneeded headers rm -r %{buildroot}%{_includedir}/nx/GL -rm -r %{buildroot}%{_includedir}/nx/X11/bitmaps rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XInput.h rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XK*.h rm -r %{buildroot}%{_includedir}/nx/X11/extensions/*Xv*.h -- cgit v1.2.3 From e68c36625d9d76d96ebe0d94ba02803bee574783 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 26 Apr 2015 23:45:42 +0200 Subject: debian/roll-tarballs.sh: use more quotes. Fixes potential bugs, including one triggered by an unquoted hash within the command line. BASH accepts this. Other shells do not (i.e., treat everything following the hash character as a comment.) --- debian/roll-tarballs.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index c7cac5f08..c2819cfc8 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -33,7 +33,7 @@ usage() { PROJECT="nx-libs" NULL="" -test -d .git || usage +test -d ".git" || usage RELEASE="$1" test -n "${RELEASE}" || usage CHECKOUT="$2" @@ -52,14 +52,14 @@ else fi if [ x"$RELEASE" == "xHEAD" ]; then - CHECKOUT=HEAD + CHECKOUT="HEAD" fi if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then echo " '${RELEASE}' is not a valid release number because there is no git tag named $CHECKOUT." echo " Please specify one of the following releases:" echo "HEAD" - git tag -l | grep ^redist | cut -f2 -d/ | sort -u + git tag -l | grep "^redist" | cut -f2 -d"/" | sort -u exit 1 fi @@ -71,42 +71,42 @@ TEMP_DIR="$(mktemp -d)" trap "rm -f \"${MANIFEST}\"; rm -rf \"${TEMP_DIR}\"" 0 # create local copy of Git project at temp location -git archive --format=tar ${CHECKOUT} --prefix=${PROJECT}-${RELEASE}/ | ( cd $TEMP_DIR; tar xf - ) +git archive --format=tar "${CHECKOUT}" --prefix="${PROJECT}-${RELEASE}/" | ( cd "$TEMP_DIR"; tar xf - ) echo "Created tarball for $CHECKOUT" cd "$TEMP_DIR/${PROJECT}-${RELEASE}/" -mkdir -p doc/applied-patches +mkdir -p "doc/applied-patches" # prepare patches for lite and full tarball if [ "x$MODE" = "xfull" ]; then - cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file + cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file do - cp -v debian/patches/$file doc/applied-patches - echo ${file##*/} >> doc/applied-patches/series + cp -v "debian/patches/$file" "doc/applied-patches/" + echo "${file##*/}" >> "doc/applied-patches/series" done else rm -Rf "nxcompshad"* rm -Rf "nxcompext"* rm -Rf "nx-X11"* - cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file + cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file do - cp -v debian/patches/$file doc/applied-patches - echo ${file##*/} >> doc/applied-patches/series + cp -v "debian/patches/$file" "doc/applied-patches/" + echo "${file##*/}" >> "doc/applied-patches/series" done fi # apply all patches shipped in debian/patches and create a copy of them that we ship with the tarball if [ -s "doc/applied-patches/series" ]; then - QUILT_PATCHES=doc/applied-patches quilt --quiltrc /dev/null push -a -q + QUILT_PATCHES="doc/applied-patches" quilt --quiltrc /dev/null push -a -q else echo "No patches applied at all. Very old release?" fi # very old release did not add any README for f in $(ls README* 2>/dev/null); do - mv -v $f doc/; + mv -v "$f" "doc/"; done # remove folders that we do not want to roll into the tarball @@ -116,7 +116,7 @@ rm -Rf "debian/" # remove files, that we do not want in the tarballs (build cruft) rm -Rf nx*/configure nx*/autom4te.cache* -cd $OLDPWD +cd "$OLDPWD" # create target location for tarball mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/" @@ -124,7 +124,7 @@ mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/" # roll the ball... cd "$TEMP_DIR" find "${PROJECT}-${RELEASE}" -type f | sort > "$MANIFEST" -cd $OLDPWD +cd "$OLDPWD" tar c -C "$TEMP_DIR" \ --owner 0 \ -- cgit v1.2.3 From cf9181918ac8f3b884f7a975c108611d613e1d0f Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 26 Apr 2015 23:47:33 +0200 Subject: debian/roll-tarballs.sh: convert tabs to spaces. --- debian/roll-tarballs.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index c2819cfc8..f692c2983 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -39,16 +39,16 @@ test -n "${RELEASE}" || usage CHECKOUT="$2" test -n "$CHECKOUT" || usage -if [ "x$CHECKOUT" = "xserver" ] || [ "x$CHECKOUT" = "xfull" ]; then - MODE="full" - CHECKOUT="redist-server/${RELEASE}" - RELEASE_SUFFIX='-full' -elif [ "x$CHECKOUT" = "xclient" ] || [ "x$CHECKOUT" = "xlite" ]; then - MODE="lite" - CHECKOUT="redist-client/${RELEASE}" - RELEASE_SUFFIX='-lite' +if [ "x$CHECKOUT" = "xserver" ] || [ "x${CHECKOUT}" = "xfull" ]; then + MODE="full" + CHECKOUT="redist-server/${RELEASE}" + RELEASE_SUFFIX='-full' +elif [ "x$CHECKOUT" = "xclient" ] || [ "x${CHECKOUT}" = "xlite" ]; then + MODE="lite" + CHECKOUT="redist-client/${RELEASE}" + RELEASE_SUFFIX='-lite' else - usage + usage fi if [ x"$RELEASE" == "xHEAD" ]; then -- cgit v1.2.3 From 21a556b37f9bacb2a0e0f3246c6bd06359f97bd8 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 26 Apr 2015 23:48:02 +0200 Subject: debian/roll-tarballs.sh: use more curly braces. Prevents random characters as being treated as part of a variable name. --- debian/roll-tarballs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index f692c2983..8bf2d51ee 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -56,7 +56,7 @@ if [ x"$RELEASE" == "xHEAD" ]; then fi if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then - echo " '${RELEASE}' is not a valid release number because there is no git tag named $CHECKOUT." + echo " '${RELEASE}' is not a valid release number because there is no git tag named ${CHECKOUT}." echo " Please specify one of the following releases:" echo "HEAD" git tag -l | grep "^redist" | cut -f2 -d"/" | sort -u @@ -75,7 +75,7 @@ git archive --format=tar "${CHECKOUT}" --prefix="${PROJECT}-${RELEASE}/" | ( cd echo "Created tarball for $CHECKOUT" -cd "$TEMP_DIR/${PROJECT}-${RELEASE}/" +cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/" mkdir -p "doc/applied-patches" @@ -119,7 +119,7 @@ rm -Rf nx*/configure nx*/autom4te.cache* cd "$OLDPWD" # create target location for tarball -mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/" +mkdir -p "${TARGETDIR}/_releases_/source/${PROJECT}/" # roll the ball... cd "$TEMP_DIR" -- cgit v1.2.3 From 347e973353e64c7f004950cd846360254effd324 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sun, 26 Apr 2015 23:49:06 +0200 Subject: debian/roll-tarballs.sh: don't escape last newline of a multiline command. Worked out fine so far, because the next line was empty, but this can easily change... --- debian/roll-tarballs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 8bf2d51ee..954986b5f 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -133,6 +133,6 @@ tar c -C "$TEMP_DIR" \ --no-recursion \ --files-from "$MANIFEST" \ --gzip \ - > "$TARGETDIR/_releases_/source/${PROJECT}/${PROJECT}-${RELEASE}${RELEASE_SUFFIX}.tar.gz" \ + > "$TARGETDIR/_releases_/source/${PROJECT}/${PROJECT}-${RELEASE}${RELEASE_SUFFIX}.tar.gz" echo "$TARGETDIR/_releases_/source/${PROJECT}/${PROJECT}-${RELEASE}${RELEASE_SUFFIX}.tar.gz is ready" -- cgit v1.2.3 From 99ef17f907e0c1b21122a7e273885a18f86235a1 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 27 Apr 2015 02:56:07 +0200 Subject: debian/changelog: merge with 3.5.0.x branch. --- debian/changelog | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4bbe4028f..dda68a4cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -79,6 +79,140 @@ nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low - Add overlooked Obsolete: statement to libNX_Xfixes3. * Mid-release fixup: - Rename *nxcomp{ext,shad}*.full+lite* to *nxcomp{ext,shad}*.full. + * CVE patches were previously not included in release tarballs. + Rename: + - 1001-LZW-decompress-fix-for-CVE-2011-2895-From-xorg-lib-X.patch => + 1001-LZW-decompress-fix-for-CVE-2011-2895-From-xorg-.full.patch + - 1002-Fix-CVE-2011-4028-File-disclosure-vulnerability.-ups.patch => + 1002-Fix-CVE-2011-4028-File-disclosure-vulnerability.full.patch + - 1003-Avoid-use-after-free-in-dix-dixfonts.c-doImageText-C.patch => + 1003-Avoid-use-after-free-in-dix-dixfonts.c-doImageT.full.patch + - 1004-CVE-2013-6462-unlimited-sscanf-overflows-stack-buffe.patch => + 1004-CVE-2013-6462-unlimited-sscanf-overflows-stack-.full.patch + - 1005-CVE-2014-0209-integer-overflow-of-realloc-size-in-Fo.patch => + 1005-CVE-2014-0209-integer-overflow-of-realloc-size-.full.patch + - 1006-CVE-2014-0209-integer-overflow-of-realloc-size-in-le.patch => + 1006-CVE-2014-0209-integer-overflow-of-realloc-size-.full.patch + - 1007-CVE-2014-0210-unvalidated-length-in-_fs_recv_conn_se.patch => + 1007-CVE-2014-0210-unvalidated-length-in-_fs_recv_co.full.patch + - 1008-Don-t-crash-when-we-receive-an-FS_Error-from-the-fon.patch => + 1008-Don-t-crash-when-we-receive-an-FS_Error-from-th.full.patch + - 1009-CVE-2014-0210-unvalidated-lengths-when-reading-repli.patch => + 1009-CVE-2014-0210-unvalidated-lengths-when-reading-.full.patch + - 1010-CVE-2014-0211-Integer-overflow-in-fs_get_reply-_fs_s.patch => + 1010-CVE-2014-0211-Integer-overflow-in-fs_get_reply-.full.patch + - 1011-CVE-2014-0210-unvalidated-length-fields-in-fs_read_q.patch => + 1011-CVE-2014-0210-unvalidated-length-fields-in-fs_r.full.patch + - 1012-CVE-2014-0211-integer-overflow-in-fs_read_extent_inf.patch => + 1012-CVE-2014-0211-integer-overflow-in-fs_read_exten.full.patch + - 1013-CVE-2014-0211-integer-overflow-in-fs_alloc_glyphs-fr.patch => + 1013-CVE-2014-0211-integer-overflow-in-fs_alloc_glyp.full.patch + - 1014-CVE-2014-0210-unvalidated-length-fields-in-fs_read_e.patch => + 1014-CVE-2014-0210-unvalidated-length-fields-in-fs_r.full.patch + - 1015-CVE-2014-0210-unvalidated-length-fields-in-fs_read_g.patch => + 1015-CVE-2014-0210-unvalidated-length-fields-in-fs_r.full.patch + - 1016-CVE-2014-0210-unvalidated-length-fields-in-fs_read_l.patch => + 1016-CVE-2014-0210-unvalidated-length-fields-in-fs_r.full.patch + - 1017-CVE-2014-0210-unvalidated-length-fields-in-fs_read_l.patch => + 1017-CVE-2014-0210-unvalidated-length-fields-in-fs_r.full.patch + - 1018-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch => + 1018-unchecked-malloc-may-allow-unauthed-client-to-c.full.patch + - 1019-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch => + 1019-dix-integer-overflow-in-ProcPutImage-CVE-2014-8.full.patch + - 1020-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch => + 1020-dix-integer-overflow-in-GetHosts-CVE-2014-8092-.full.patch + - 1021-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch => + 1021-dix-integer-overflow-in-RegionSizeof-CVE-2014-8.full.patch + - 1022-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch => + 1022-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-.full.patch + - 1023-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch => + 1023-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls.full.patch + - 1024-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch => + 1024-Xi-unvalidated-lengths-in-Xinput-extension-CVE-.full.patch + - 1025-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch => + 1025-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDL.full.patch + - 1026-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch => + 1026-Xv-unvalidated-lengths-in-XVideo-extension-swap.full.patch + - 1027-render-check-request-size-before-reading-it-CVE-2014.patch => + 1027-render-check-request-size-before-reading-it-CVE.full.patch + - 1028-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch => + 1028-render-unvalidated-lengths-in-Render-extn.-swap.full.patch + - 1029-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch => + 1029-xfixes-unvalidated-length-in-SProcXFixesSelectS.full.patch + - 1030-randr-unvalidated-lengths-in-RandR-extension-swapped.patch => + 1030-randr-unvalidated-lengths-in-RandR-extension-sw.full.patch + - 1031-glx-Be-more-paranoid-about-variable-length-requests-.patch => + 1031-glx-Be-more-paranoid-about-variable-length-requ.full.patch + - 1032-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch => + 1032-glx-Be-more-strict-about-rejecting-invalid-imag.full.patch + - 1033-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch => + 1033-glx-Additional-paranoia-in-__glXGetAnswerBuffer.full.patch + - 1034-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6-v4.patch => + 1034-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6-.full.patch + - 1035-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch => + 1035-glx-Length-checking-for-GLXRender-requests-v2-C.full.patch + - 1036-glx-Integer-overflow-protection-for-non-generated-re.patch => + 1036-glx-Integer-overflow-protection-for-non-generat.full.patch + - 1037-glx-Top-level-length-checking-for-swapped-VendorPriv.patch => + 1037-glx-Top-level-length-checking-for-swapped-Vendo.full.patch + - 1038-glx-Length-checking-for-non-generated-single-request.patch => + 1038-glx-Length-checking-for-non-generated-single-re.full.patch + - 1039-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch => + 1039-glx-Length-checking-for-RenderLarge-requests-v2.full.patch + - 1040-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch => + 1040-glx-Pass-remaining-request-length-into-varsize-.full.patch + - 1041-nx-X11-lib-font-fc-fserve.c-initialize-remaining-buf.patch => + 1041-nx-X11-lib-font-fc-fserve.c-initialize-remainin.full.patch + - 1042-Do-proper-input-validation-to-fix-for-CVE-2011-2895.patch => + 1042-Do-proper-input-validation-to-fix-for-CVE-2011-.full.patch + - 1101-Coverity-844-845-846-Fix-memory-leaks.patch => + 1101-Coverity-844-845-846-Fix-memory-leaks.full.patch + - 1102-include-introduce-byte-counting-functions.patch => + 1102-include-introduce-byte-counting-functions.full.patch + - 1103-xkb-Don-t-swap-XkbSetGeometry-data-in-the-input-buff.patch => + 1103-xkb-Don-t-swap-XkbSetGeometry-data-in-the-input.full.patch + - 1104-xkb-Check-strings-length-against-request-size.patch => + 1104-xkb-Check-strings-length-against-request-size.full.patch + * debian/rolltarball.sh: + Cherry-picked from Arctica GH 3.6.x branch. + + - Use more quotes. Fixes potential bugs, including one triggered by an + unquoted hash within the command line. BASH accepts this. Other shells + do not (i.e., treat everything following the hash character as a + comment.) + - Convert tabs to spaces for consistency. + - Use more curly braces. Prevents random characters as being treated as + part of a variable name. + - Don't escape last newline of a multiline command. Worked out fine so + far, because the next line was empty, but this can easily change... + * README.keystrokes: + Backported from Arctica GH 3.6.x branch. + Affects: + + 0320_nxagent_configurable-keystrokes.full.patch + + - Copy actions documentation from the wiki. + - Add documentation for branding behavior. + - Remove accidentally copied Dokuwiki syntax. + * debian/keystrokes.cfg: fix whitespace errors. + Backported from Arctica GH 3.6.x branch. + + [ Bernard Cafarelli ] + * nx-X11: link to libdl to fix undefined references to 'dlopen' and 'dlsym'. + Fixes: #853. + v2: generally link to libdl in all of nx-X11. (Mike Gabriel) + Adds: + - 0630_nx-X11_fix-underlinking-dlopen-dlsym.full.patch + + [ Mike Gabriel ] + * Security fixes: + - X.Org CVE-2013-7439: + 1200-CVE-2013-7439-MakeBigReq-don-t-move-the-last-wo.full.patch + * nx-X11: Prevent underlinking by linking to libNX_X{11,damage,fixes). + Adds: + - 0640_nx-X11_fix-underlinking-libNX_Xcomposite_damage_fixes.full.patch + * nxcompshad: Prevent underlinking by linking to libNX_Xext. + Adds: + - 0650_nxcompshad_link-to-NX_Xext.full.patch -- X2Go Release Manager Tue, 17 Mar 2015 18:48:06 +0100 -- cgit v1.2.3 From 83983e944e5076ad2d8beb6dd9190559fb6c5937 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 28 Apr 2015 23:00:43 +0200 Subject: libnx-xinerama1: also create libXinerama symlink in postinst (and remove in prerm.) Due to the nx-x11-common package being a noarch/allarch package, creating the symlink in nx-libs' Makefile will lead to the symlink referencing the "default" architecture dpkg uses for building noarch/allarch packages. Incidentally, this worked fine for Debian, as amd64 seems to be the default architecture. On Ubuntu, however, the default architecture up to Vivid (15.04) was i386. For those builds, the symlink pointed to the 32 bit library of libNX_Xinerama.so.1 -- essentially breaking this feature. Move the symlink creation to the arch-sensitive libnx-xinerama1 package. The postinst and prerm scriptlets will work fine, unless someone installs the i386 package version *after* the amd64 version. Given that we already create symlinks to libNX_X11 and friends using that method, no new regression is introduced. Strictly speaking that's a bug, but we'll hopefully clean that up later... --- Makefile | 11 +++++----- debian/libnx-xinerama1.postinst.in | 12 +++++++++-- debian/libnx-xinerama1.prerm | 42 ++++++++++++++++++-------------------- 3 files changed, 36 insertions(+), 29 deletions(-) (limited to 'debian') diff --git a/Makefile b/Makefile index 9f6442181..47efbde52 100644 --- a/Makefile +++ b/Makefile @@ -155,11 +155,12 @@ install-full: done; \ # Provide means for Xinerama support in NX/X2Go sessions. This - # This also requires two post-install symlinks: - # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr//libX11.so.6 - # (DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama - $(INSTALL_SYMLINK) $(USRLIBDIR)/libNX_Xinerama.so.1 $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 + # This also requires three post-install symlinks created by libnx-xinerama1: + # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr//libX11.so.6 + # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 + # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 -> /usr//libNX_Xinerama.so.1 + # Only create the owned directory here for nx-x11-common. + $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11 $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in index c690be387..9b88c4b6f 100755 --- a/debian/libnx-xinerama1.postinst.in +++ b/debian/libnx-xinerama1.postinst.in @@ -26,14 +26,22 @@ case "$1" in libdir=/usr/lib/#DEB_BUILD_MULTIARCH# - rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + # Already existent files and directories are not removed. + # Users will need to explicitly remove them and (re-) configure this package. + + if test ! -e /usr/lib/nx/X11/Xinerama; then + install -d -m 755 /usr/lib/nx/X11/Xinerama + fi + if test -e $libdir/libX11.so.6; then ln -s $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 fi if test -e $libdir/libXext.so.6; then ln -s $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 fi + if test -e $libdir/libNX_Xinerama.so.1; then + ln -s $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/libnx-xinerama1.prerm b/debian/libnx-xinerama1.prerm index 3fcd330e6..91105d0f8 100755 --- a/debian/libnx-xinerama1.prerm +++ b/debian/libnx-xinerama1.prerm @@ -1,37 +1,35 @@ #!/bin/sh -# postrm script for x2goserver-fmbindings +# prerm script for libnx-xinerama1 # # see: dh_installdeb(1) - -set -e - # summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +set -e + + case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - fi - if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + remove) + if test -d /usr/lib/nx/X11/Xinerama; then + rm -rf /usr/lib/nx/X11/Xinerama fi - ;; + ;; + deconfigure|upgrade|failed-upgrade) + : + ;; *) - echo "postrm called with unknown argument \`$1'" >&2 + echo "prerm called with unknown argument \`$1'" >&2 exit 1 - ;; + ;; esac # dh_installdeb will replace this with shell code automatically -- cgit v1.2.3 From a9bc7bdb6bc8c51f3ed8f35e80c4c0291f3d7ac2 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Thu, 30 Apr 2015 14:25:25 +0200 Subject: debian/libnx-xinerama1.*: move Xinerama dir back to nx-x11-common. Only delete known files. Fixes RPM build failures. --- Makefile | 2 +- debian/libnx-xinerama1.postinst.in | 7 +------ debian/libnx-xinerama1.prerm | 13 ++++++++++++- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/Makefile b/Makefile index 47efbde52..c218d8604 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ install-full: # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 -> /usr//libNX_Xinerama.so.1 # Only create the owned directory here for nx-x11-common. - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11 + $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in index 9b88c4b6f..c3706038c 100755 --- a/debian/libnx-xinerama1.postinst.in +++ b/debian/libnx-xinerama1.postinst.in @@ -26,13 +26,8 @@ case "$1" in libdir=/usr/lib/#DEB_BUILD_MULTIARCH# - # Already existent files and directories are not removed. + # Already existent files are not removed. # Users will need to explicitly remove them and (re-) configure this package. - - if test ! -e /usr/lib/nx/X11/Xinerama; then - install -d -m 755 /usr/lib/nx/X11/Xinerama - fi - if test -e $libdir/libX11.so.6; then ln -s $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 fi diff --git a/debian/libnx-xinerama1.prerm b/debian/libnx-xinerama1.prerm index 91105d0f8..8cca06c85 100755 --- a/debian/libnx-xinerama1.prerm +++ b/debian/libnx-xinerama1.prerm @@ -20,7 +20,18 @@ set -e case "$1" in remove) if test -d /usr/lib/nx/X11/Xinerama; then - rm -rf /usr/lib/nx/X11/Xinerama + if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then + rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 + fi + + if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then + rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + fi + + + if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then + rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1 + fi fi ;; deconfigure|upgrade|failed-upgrade) -- cgit v1.2.3 From e595613879bc4c4f2ebdd13150fc18303611cda7 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Thu, 30 Apr 2015 14:43:04 +0200 Subject: debian/changelog: correctly sync with 3.5.0.x branch. Add latest entries. --- debian/changelog | 107 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 50 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dda68a4cd..016ee357a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,56 +29,6 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low * nx-X11: add more NULL guards to TEST and DEBUG sections of Render.c. Affects: - 0990_fix-DEBUG-and-TEST-builds.full.patch - - -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 - -nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low - - [ Clemens Lang ] - * Use path discovery for finding makedepend. Remove old cruft. Adds: - - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch - - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch - - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch - - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch - * Fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. - Adds: - - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch - - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch - * Use the correct library naming scheme on OS X. It differs from other - UNIX-based systems. - Adds: - - 0410_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - - [ Mihai Moldovan ] - * nx{comp{,ext,shad},proxy}: try really hard to find makedepend. Do not fail - if it is not available. - * Rename: - - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch => - 0410_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch - - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch => - 0610_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch - - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch => - 0611_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch - - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch => - 0612_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch - - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch => - 0613_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch - - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch => - 0614_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch - - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - => - 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - => - 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - * nx-libs.spec: - - Versioned libXcomp* should obsolete unversioned libXcomp*, not - libNX_Xcomp*. - - Add overlooked Obsolete: statement to libNX_Xfixes3. - * Mid-release fixup: - - Rename *nxcomp{ext,shad}*.full+lite* to *nxcomp{ext,shad}*.full. * CVE patches were previously not included in release tarballs. Rename: - 1001-LZW-decompress-fix-for-CVE-2011-2895-From-xorg-lib-X.patch => @@ -195,6 +145,13 @@ nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low - Remove accidentally copied Dokuwiki syntax. * debian/keystrokes.cfg: fix whitespace errors. Backported from Arctica GH 3.6.x branch. + * debian/libnx-xinerama1.*: also create libXinerama symlink in + libnx-xinerama1.postinst.postinst (and remove in + libnx-xinerama1.postinst.prerm.) + Backported from Arctica GH 3.6.x branch. + * debian/libnx-xinerama1.*: move Xinerama dir back to nx-x11-common. Only + delete known files. Fixes RPM build failures. + Backported from Arctica GH 3.6.x branch. [ Bernard Cafarelli ] * nx-X11: link to libdl to fix undefined references to 'dlopen' and 'dlsym'. @@ -214,6 +171,56 @@ nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low Adds: - 0650_nxcompshad_link-to-NX_Xext.full.patch + -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 + +nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low + + [ Clemens Lang ] + * Use path discovery for finding makedepend. Remove old cruft. Adds: + - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch + - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch + - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch + - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch + * Fix dynamic library linking on OS X. Use -dynamiclib instead of -bundle. + Adds: + - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch + * Use the correct library naming scheme on OS X. It differs from other + UNIX-based systems. + Adds: + - 0410_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + + [ Mihai Moldovan ] + * nx{comp{,ext,shad},proxy}: try really hard to find makedepend. Do not fail + if it is not available. + * Rename: + - 0070_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch => + 0410_nxcomp_use-MAKEDEPEND-in-path.full+lite.patch + - 0071_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch => + 0610_nxcompext_use-MAKEDEPEND-in-path.full+lite.patch + - 0072_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch => + 0611_nxcompshad_use-MAKEDEPEND-in-path.full+lite.patch + - 0073_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch => + 0612_nxproxy_use-MAKEDEPEND-in-path.full+lite.patch + - 0074_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch => + 0613_nxcomp_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0075_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch => + 0614_nxcompshad_use-dynamiclib-flag-on-OS-X.full+lite.patch + - 0610_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + => + 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + - 0611_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + => + 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full+lite.patch + * nx-libs.spec: + - Versioned libXcomp* should obsolete unversioned libXcomp*, not + libNX_Xcomp*. + - Add overlooked Obsolete: statement to libNX_Xfixes3. + * Mid-release fixup: + - Rename *nxcomp{ext,shad}*.full+lite* to *nxcomp{ext,shad}*.full. + -- X2Go Release Manager Tue, 17 Mar 2015 18:48:06 +0100 nx-libs (2:3.5.0.30-0x2go1) unstable; urgency=low -- cgit v1.2.3 From 7ccbb073f83b7aa8d0f154b34693b1075e455bd8 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Thu, 30 Apr 2015 15:51:48 +0200 Subject: debian/changelog: sync with 3.5.0.x branch. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 016ee357a..ef9a1113a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -152,6 +152,8 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low * debian/libnx-xinerama1.*: move Xinerama dir back to nx-x11-common. Only delete known files. Fixes RPM build failures. Backported from Arctica GH 3.6.x branch. + * nx-libs.spec: actually create libXinerama.so.1 symlink during build phase. + Backported from Arctica GH 3.6.x branch. [ Bernard Cafarelli ] * nx-X11: link to libdl to fix undefined references to 'dlopen' and 'dlsym'. -- cgit v1.2.3 From 06aa41671963dac9fa4bf84a8fc996a5360c94b0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 27 Apr 2015 16:08:06 +0200 Subject: library clean-up: Don't build libNX_Xdamage anymore. Use system's libXdamage shared library. (Fixes ArcticaProject/nx-libs#6, X2GoBTS#826). --- debian/control | 55 ++--- debian/libnx-xdamage-dev.install.in | 2 - debian/libnx-xdamage1.install.in | 1 - debian/libnx-xdamage1.symbols | 9 - debian/nx-x11proto-damage-dev.install.in | 2 - debian/rules | 1 - nx-X11/config/cf/X11.tmpl | 40 +--- nx-X11/config/cf/host.def | 2 - nx-X11/include/extensions/Imakefile | 4 - nx-X11/include/extensions/damageproto.h | 149 ------------- nx-X11/include/extensions/damagewire.h | 57 ----- nx-X11/lib/Imakefile | 5 - nx-X11/lib/Xdamage/AUTHORS | 2 - nx-X11/lib/Xdamage/COPYING | 22 -- nx-X11/lib/Xdamage/ChangeLog | 13 -- nx-X11/lib/Xdamage/INSTALL | 8 - nx-X11/lib/Xdamage/Imakefile | 68 ------ nx-X11/lib/Xdamage/NEWS | 0 nx-X11/lib/Xdamage/README | 10 - nx-X11/lib/Xdamage/Xdamage.c | 365 ------------------------------- nx-X11/lib/Xdamage/Xdamage.h | 68 ------ nx-X11/lib/Xdamage/autogen.sh | 3 - nx-X11/lib/Xdamage/configure.ac | 93 -------- nx-X11/lib/Xdamage/xdamage.pc.in | 10 - nx-X11/lib/Xdamage/xdamageint.h | 66 ------ nx-X11/programs/Xserver/Imakefile | 4 +- nx-libs.spec | 28 +-- nxcompshad/Makefile.in | 2 +- 28 files changed, 28 insertions(+), 1061 deletions(-) delete mode 100644 debian/libnx-xdamage-dev.install.in delete mode 100644 debian/libnx-xdamage1.install.in delete mode 100644 debian/libnx-xdamage1.symbols delete mode 100644 debian/nx-x11proto-damage-dev.install.in delete mode 100644 nx-X11/include/extensions/damageproto.h delete mode 100644 nx-X11/include/extensions/damagewire.h delete mode 100644 nx-X11/lib/Xdamage/AUTHORS delete mode 100644 nx-X11/lib/Xdamage/COPYING delete mode 100644 nx-X11/lib/Xdamage/ChangeLog delete mode 100644 nx-X11/lib/Xdamage/INSTALL delete mode 100644 nx-X11/lib/Xdamage/Imakefile delete mode 100644 nx-X11/lib/Xdamage/NEWS delete mode 100644 nx-X11/lib/Xdamage/README delete mode 100644 nx-X11/lib/Xdamage/Xdamage.c delete mode 100644 nx-X11/lib/Xdamage/Xdamage.h delete mode 100755 nx-X11/lib/Xdamage/autogen.sh delete mode 100644 nx-X11/lib/Xdamage/configure.ac delete mode 100644 nx-X11/lib/Xdamage/xdamage.pc.in delete mode 100644 nx-X11/lib/Xdamage/xdamageint.h (limited to 'debian') diff --git a/debian/control b/debian/control index 4e4918999..0f575421f 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,7 @@ Build-Depends: libxpm-dev, libxfont-dev, libxdmcp-dev, + libxdamage-dev, autoconf, pkg-config, x11proto-core-dev, @@ -283,20 +284,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 damaged region extension library +Description: nx-X11 damaged region extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xdamage provides an X Window System client interface to the DAMAGE - extension to the X protocol. + This package removes the obsoleted libNX_Xdamage.so.1 library. With + recent versions of NX, the system-wide installed libXdamage gets used. . - The Damage extension provides for notification of when on-screen regions have - been 'damaged' (altered) + This package can be safely removed. Package: libnx-xdamage-dev Provides: libnx-xdamage1-dev @@ -304,23 +301,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xdamage1 (= ${binary:Version}), - nx-x11proto-damage-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 damaged region extension library (development headers) +Description: nx-X11 damaged region extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xdamage provides an X Window System client interface to the DAMAGE - extension to the X protocol. - . - The Damage extension provides for notification of when on-screen regions have - been 'damaged' (altered) + This package removes the obsoleted headers for the libNX_Xdamage.so.1 + library. With recent versions of NX, the system-wide installed libXdamage + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-damage-dev Section: libdevel @@ -328,16 +319,16 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Damage extension wire protocol +Description: nx-X11 Damage extension wire protocol (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - This package provides development headers describing the wire protocol - for the Damage extension in nx-X11, used to notify clients of changes - made to particular areas. + This package removes the obsoleted wire protocol headers for the + libNX_Xdamage.so.1 library. With recent versions of NX, the system-wide + installed libXdamage gets used. + . + This package can be safely removed. Package: libnx-xdamage1-dbg Architecture: any @@ -345,22 +336,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xdamage1 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 damaged region extension library (debug package) +Description: nx-X11 damaged region extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xdamage provides an X Window System client interface to the DAMAGE - extension to the X protocol. - . - The Damage extension provides for notification of when on-screen regions have - been 'damaged' (altered) + This package removes the obsoleted debug symbols for the + libNX_Xdamage.so.1 library. With recent versions of NX, the system-wide + installed libXdamage gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xdmcp6 Architecture: any diff --git a/debian/libnx-xdamage-dev.install.in b/debian/libnx-xdamage-dev.install.in deleted file mode 100644 index 068f3badd..000000000 --- a/debian/libnx-xdamage-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xdamage.so -usr/include/*/nx/X11/extensions/Xdamage.h diff --git a/debian/libnx-xdamage1.install.in b/debian/libnx-xdamage1.install.in deleted file mode 100644 index 42bd90874..000000000 --- a/debian/libnx-xdamage1.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xdamage.so.* diff --git a/debian/libnx-xdamage1.symbols b/debian/libnx-xdamage1.symbols deleted file mode 100644 index 09310e69a..000000000 --- a/debian/libnx-xdamage1.symbols +++ /dev/null @@ -1,9 +0,0 @@ -libNX_Xdamage.so.1 libnx-xdamage1 #MINVER# - XDamageCreate@Base 3.5.0.29 - XDamageDestroy@Base 3.5.0.29 - XDamageExtensionInfo@Base 3.5.0.29 - XDamageExtensionName@Base 3.5.0.29 - XDamageFindDisplay@Base 3.5.0.29 - XDamageQueryExtension@Base 3.5.0.29 - XDamageQueryVersion@Base 3.5.0.29 - XDamageSubtract@Base 3.5.0.29 diff --git a/debian/nx-x11proto-damage-dev.install.in b/debian/nx-x11proto-damage-dev.install.in deleted file mode 100644 index 949549f17..000000000 --- a/debian/nx-x11proto-damage-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/include/*/nx/X11/extensions/damageproto.h -usr/include/*/nx/X11/extensions/damagewire.h \ No newline at end of file diff --git a/debian/rules b/debian/rules index 0da6db71a..16a09fb3f 100755 --- a/debian/rules +++ b/debian/rules @@ -81,7 +81,6 @@ override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg dh_strip -plibnx-xcomposite1 --dbg-package=libnx-xcomposite1-dbg - dh_strip -plibnx-xdamage1 --dbg-package=libnx-xdamage1-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 74b1b5fe7..de60cecaa 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -339,16 +339,12 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildDamage #define BuildDamage BuildXfixes #endif -#ifndef BuildDamageLibrary -#define BuildDamageLibrary !BuildServersOnly -#endif #ifndef BuildComposite #define BuildComposite (BuildXfixes && BuildDamage) #endif #ifndef BuildCompositeLibrary -#define BuildCompositeLibrary !BuildServersOnly && (BuildXfixesLibrary && \ - BuildDamageLibrary) +#define BuildCompositeLibrary !BuildServersOnly && BuildXfixesLibrary #endif #ifndef BuildXevie @@ -1581,30 +1577,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #define ProfileLibXfixes NO #endif -#if BuildDamageLibrary -#ifndef SharedLibXdamage -#define SharedLibXdamage HasSharedLibraries -#endif -#ifndef NormalLibXdamage -#define NormalLibXdamage (!SharedLibXdamage || ForceNormalLib) -#endif -#ifndef DebugLibXdamage -#define DebugLibXdamage NO -#endif -#ifndef ProfileLibXdamage -#define ProfileLibXdamage NO -#endif -#else -#undef SharedLibXdamage -#define SharedLibXdamage NO -#undef NormalLibXdamage -#define NormalLibXdamage NO -#undef DebugLibXdamage -#define DebugLibXdamage NO -#undef ProfileLibXdamage -#define ProfileLibXdamage NO -#endif - #if BuildCompositeLibrary #ifndef SharedLibXcomposite #define SharedLibXcomposite HasSharedLibraries @@ -1799,16 +1771,6 @@ ProjectUnsharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),XBuildLibDir) SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) #else ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) -#endif - - XDAMAGELIBSRC = $(LIBSRC)/Xdamage -#if SharedLibXdamage -#ifndef SharedXdamageRev -#define SharedXdamageRev 1.0 -#endif -SharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) -#else -ProjectUnsharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) #endif XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 28e36da82..0566befdd 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -123,8 +123,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildLibraries YES #endif -#define BuildDamageLibrary YES - #define BuildXfixesLibrary YES #define BuildCompositeLibrary YES diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 3f2992b77..4f88d2bab 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -47,9 +47,6 @@ RENDERHEADERS = render.h renderproto.h #if BuildXfixes || BuildXfixesLibrary XFIXESHEADERS = xfixeswire.h xfixesproto.h #endif -#if BuildDamage || BuildDamageLibrary -DAMAGEHEADERS = damagewire.h damageproto.h -#endif #if BuildComposite || BuildCompositeLibrary COMPOSITEHEADERS = composite.h compositeproto.h #endif @@ -82,7 +79,6 @@ EXTRAHEADERS = \ $(RENDERHEADERS) \ $(RANDRHEADERS) \ $(XFIXESHEADERS) \ - $(DAMAGEHEADERS) \ $(COMPOSITEHEADERS) \ $(XEVIEHEADERS) \ $(XTRAPHEADERS) \ diff --git a/nx-X11/include/extensions/damageproto.h b/nx-X11/include/extensions/damageproto.h deleted file mode 100644 index b190d68c7..000000000 --- a/nx-X11/include/extensions/damageproto.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * $Id: damageproto.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _DAMAGEPROTO_H_ -#define _DAMAGEPROTO_H_ - -#include -#include -#include - -#define Window CARD32 -#define Drawable CARD32 -#define Font CARD32 -#define Pixmap CARD32 -#define Cursor CARD32 -#define Colormap CARD32 -#define GContext CARD32 -#define Atom CARD32 -#define VisualID CARD32 -#define Time CARD32 -#define KeyCode CARD8 -#define KeySym CARD32 -#define Picture CARD32 -#define Region CARD32 -#define Damage CARD32 - -/************** Version 0 ******************/ - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; -} xDamageReq; - -/* - * requests and replies - */ - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - CARD32 majorVersion B32; - CARD32 minorVersion B32; -} xDamageQueryVersionReq; - -#define sz_xDamageQueryVersionReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xDamageQueryVersionReply; - -#define sz_xDamageQueryVersionReply 32 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; - Drawable drawable B32; - CARD8 level; - CARD8 pad1; - CARD16 pad2 B16; -} xDamageCreateReq; - -#define sz_xDamageCreateReq 16 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; -} xDamageDestroyReq; - -#define sz_xDamageDestroyReq 8 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; - Region repair B32; - Region parts B32; -} xDamageSubtractReq; - -#define sz_xDamageSubtractReq 16 - -/* Events */ - -#define DamageNotifyMore 0x80 - -typedef struct { - CARD8 type; - CARD8 level; - CARD16 sequenceNumber B16; - Drawable drawable B32; - Damage damage B32; - Time timestamp B32; - xRectangle area; - xRectangle geometry; -} xDamageNotifyEvent; - -#undef Damage -#undef Region -#undef Picture -#undef Window -#undef Drawable -#undef Font -#undef Pixmap -#undef Cursor -#undef Colormap -#undef GContext -#undef Atom -#undef VisualID -#undef Time -#undef KeyCode -#undef KeySym - -#endif /* _DAMAGEPROTO_H_ */ diff --git a/nx-X11/include/extensions/damagewire.h b/nx-X11/include/extensions/damagewire.h deleted file mode 100644 index d523cea98..000000000 --- a/nx-X11/include/extensions/damagewire.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: damagewire.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _DAMAGEWIRE_H_ -#define _DAMAGEWIRE_H_ - -#define DAMAGE_NAME "DAMAGE" -#define DAMAGE_MAJOR 1 -#define DAMAGE_MINOR 0 - -/************* Version 1 ****************/ - -/* Constants */ -#define XDamageReportRawRectangles 0 -#define XDamageReportDeltaRectangles 1 -#define XDamageReportBoundingBox 2 -#define XDamageReportNonEmpty 3 - -/* Requests */ -#define X_DamageQueryVersion 0 -#define X_DamageCreate 1 -#define X_DamageDestroy 2 -#define X_DamageSubtract 3 - -#define XDamageNumberRequests (X_DamageSubtract + 1) - -/* Events */ -#define XDamageNotify 0 - -#define XDamageNumberEvents (XDamageNotify + 1) - -/* Errors */ -#define BadDamage 0 -#define XDamageNumberErrors (BadDamage + 1) - -#endif /* _DAMAGEWIRE_H_ */ diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index aa780877b..13dc8ac73 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -59,10 +59,6 @@ RANDRLIBDIR = Xrandr XFIXESLIBDIR = Xfixes #endif -#if BuildDamageLibrary -DAMAGELIBDIR = Xdamage -#endif - #if BuildCompositeLibrary COMPOSITELIBDIR = Xcomposite #endif @@ -110,7 +106,6 @@ LINTSUBDIRS = \ $(RANDRLIBDIR) \ $(XRESLIBDIR) \ $(XFIXESLIBDIR) \ - $(DAMAGELIBDIR) \ $(COMPOSITELIBDIR) \ $(NULL) diff --git a/nx-X11/lib/Xdamage/AUTHORS b/nx-X11/lib/Xdamage/AUTHORS deleted file mode 100644 index 57c4efd4e..000000000 --- a/nx-X11/lib/Xdamage/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Keith Packard, HP - diff --git a/nx-X11/lib/Xdamage/COPYING b/nx-X11/lib/Xdamage/COPYING deleted file mode 100644 index e85d981e7..000000000 --- a/nx-X11/lib/Xdamage/COPYING +++ /dev/null @@ -1,22 +0,0 @@ -$Id: COPYING,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -Copyright © 2001,2003 Keith Packard - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Keith Packard makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL KEITH PACKARD 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. - diff --git a/nx-X11/lib/Xdamage/ChangeLog b/nx-X11/lib/Xdamage/ChangeLog deleted file mode 100644 index 427091447..000000000 --- a/nx-X11/lib/Xdamage/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ -Tue May 17 12:59:47 2005 Søren Sandmann - - * Xdamage.c: Conditionally include config.h - -2004-02-03 Jim Gettys - - * AUTHORS: Add authors. - -2004-01-15 Daniel Stone - * Tag release 1.0.1 for first freedesktop.org clientside lib release. - -2004-01-15 Harold L Hunt II - * Makefile.am: Pass -no-undefined to libtool via LDFLAGS. diff --git a/nx-X11/lib/Xdamage/INSTALL b/nx-X11/lib/Xdamage/INSTALL deleted file mode 100644 index b94098a95..000000000 --- a/nx-X11/lib/Xdamage/INSTALL +++ /dev/null @@ -1,8 +0,0 @@ -Render is built with the traditional configure script: - - $ ./configure --prefix=/usr/X11R6 - -This should generate valid Makefiles, then: - - $ make - $ make install diff --git a/nx-X11/lib/Xdamage/Imakefile b/nx-X11/lib/Xdamage/Imakefile deleted file mode 100644 index f6ad0d22b..000000000 --- a/nx-X11/lib/Xdamage/Imakefile +++ /dev/null @@ -1,68 +0,0 @@ -XCOMM $XdotOrg: xc/lib/Xdamage/Imakefile,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -#ifndef NormalLibXdamage -#define NormalLibXdamage YES -SOXDAMAGEREV=1.0.1 -#endif - -#ifndef SharedLibXdamage -#define SharedLibXdamage YES -#endif - -#define DoNormalLib NormalLibXdamage -#define DoSharedLib SharedLibXdamage -#define DoDebugLib DebugLibXdamage -#define DoProfileLib ProfileLibXdamage - -#define LibName NX_Xdamage -#define SoRev SOXDAMAGEREV -#define IncSubdir X11 -#define IncSubSubdir extensions - -#include - -#ifdef SharedXdamageReqs -REQUIREDLIBS = SharedXdamageReqs -#endif - -XDAMAGE_VERSION=1.0.1 - -X_LIBS=-L$(SHLIBDIR) $(XONLYLIB) -X_CFLAGS=-I$(INCROOT) $(THREADS_DEFINES) -XDAMAGE_LIBS = $(XFIXESLIB) -XDAMAGE_CFLAGS = - -RPATH_CFLAG = HardCodeLibdirFlag - -SRCS = Xdamage.c - -OBJS = Xdamage.o - -HEADERS = Xdamage.h - -SUBSTVARS=prefix="$(PROJECTROOT)" \ - exec_prefix="$(BINDIR)" \ - libdir="$(USRLIBDIR)" \ - hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \ - includedir="$(INCROOT)" \ - X_LIBS="$(X_LIBS)" \ - X_CFLAGS="$(X_CFLAGS)" \ - XDAMAGE_LIBS="$(XDAMAGE_LIBS)" \ - XDAMAGE_CFLAGS="$(XDAMAGE_CFLAGS)" \ - VERSION="$(XDAMAGE_VERSION)" - -#include - -DependTarget() - -all:: xdamage.pc - -xdamage.pc: xdamage.pc.in - RemoveFile($@) - sh ../Xrender/config-subst $(SUBSTVARS) < xdamage.pc.in > $@ - -InstallNonExecFile(xdamage.pc,$(USRLIBDIR)/pkgconfig) - -clean:: - RemoveFile(xdamage.pc) - diff --git a/nx-X11/lib/Xdamage/NEWS b/nx-X11/lib/Xdamage/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/nx-X11/lib/Xdamage/README b/nx-X11/lib/Xdamage/README deleted file mode 100644 index 9968c6bdf..000000000 --- a/nx-X11/lib/Xdamage/README +++ /dev/null @@ -1,10 +0,0 @@ - RandR - X RandR Extension - Version 1.0 - 2002-10-4 - -This package contains header files and documentation for the X RandR -extension. Library and server implementations are separate. - -Keith Packard -keithp@keithp.com diff --git a/nx-X11/lib/Xdamage/Xdamage.c b/nx-X11/lib/Xdamage/Xdamage.c deleted file mode 100644 index 48ffa68a9..000000000 --- a/nx-X11/lib/Xdamage/Xdamage.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * $Id: Xdamage.c,v 1.3 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "xdamageint.h" - -XDamageExtInfo XDamageExtensionInfo; - -const char XDamageExtensionName[] = DAMAGE_NAME; - -static int -XDamageCloseDisplay (Display *dpy, XExtCodes *codes); - -static Bool -XDamageWireToEvent(Display *dpy, XEvent *event, xEvent *wire); - -static Status -XDamageEventToWire(Display *dpy, XEvent *event, xEvent *wire); - -/* - * XDamageExtAddDisplay - add a display to this extension. (Replaces - * XextAddDisplay) - */ -static XDamageExtDisplayInfo * -XDamageExtAddDisplay (XDamageExtInfo *extinfo, - Display *dpy, - const char *ext_name) -{ - XDamageExtDisplayInfo *info; - int ev; - - info = (XDamageExtDisplayInfo *) Xmalloc (sizeof (XDamageExtDisplayInfo)); - if (!info) return NULL; - info->display = dpy; - - info->codes = XInitExtension (dpy, ext_name); - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (info->codes) { - xDamageQueryVersionReply rep; - xDamageQueryVersionReq *req; - XESetCloseDisplay (dpy, info->codes->extension, - XDamageCloseDisplay); - for (ev = info->codes->first_event; - ev < info->codes->first_event + XDamageNumberEvents; - ev++) - { - XESetWireToEvent (dpy, ev, XDamageWireToEvent); - XESetEventToWire (dpy, ev, XDamageEventToWire); - } - /* - * Get the version info - */ - LockDisplay (dpy); - GetReq (DamageQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageQueryVersion; - req->majorVersion = DAMAGE_MAJOR; - req->minorVersion = DAMAGE_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - info->major_version = rep.majorVersion; - info->minor_version = rep.minorVersion; - UnlockDisplay (dpy); - } else { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(info); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, XDamageCloseDisplay); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - info->next = extinfo->head; - extinfo->head = info; - extinfo->cur = info; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return info; -} - - -/* - * XDamageExtRemoveDisplay - remove the indicated display from the - * extension object. (Replaces XextRemoveDisplay.) - */ -static int -XDamageExtRemoveDisplay (XDamageExtInfo *extinfo, Display *dpy) -{ - XDamageExtDisplayInfo *info, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) break; - prev = info; - } - if (!info) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = info->next; - else - extinfo->head = info->next; - - extinfo->ndisplays--; - if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) info); - return 1; -} - -/* - * XDamageExtFindDisplay - look for a display in this extension; keeps a - * cache of the most-recently used for efficiency. (Replaces - * XextFindDisplay.) - */ -static XDamageExtDisplayInfo * -XDamageExtFindDisplay (XDamageExtInfo *extinfo, - Display *dpy) -{ - XDamageExtDisplayInfo *info; - - /* - * see if this was the most recently accessed display - */ - if ((info = extinfo->cur) && info->display == dpy) - return info; - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) { - extinfo->cur = info; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return info; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - -XDamageExtDisplayInfo * -XDamageFindDisplay (Display *dpy) -{ - XDamageExtDisplayInfo *info; - - info = XDamageExtFindDisplay (&XDamageExtensionInfo, dpy); - if (!info) - info = XDamageExtAddDisplay (&XDamageExtensionInfo, dpy, - XDamageExtensionName); - return info; -} - -static int -XDamageCloseDisplay (Display *dpy, XExtCodes *codes) -{ - return XDamageExtRemoveDisplay (&XDamageExtensionInfo, dpy); -} - -static Bool -XDamageWireToEvent(Display *dpy, XEvent *event, xEvent *wire) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay(dpy); - - XDamageCheckExtension(dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case XDamageNotify: { - XDamageNotifyEvent *aevent = (XDamageNotifyEvent *) event; - xDamageNotifyEvent *awire = (xDamageNotifyEvent *) wire; - - aevent->type = awire->type & 0x7F; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->drawable = awire->drawable; - aevent->damage = awire->damage; - aevent->level = awire->level; - aevent->timestamp = awire->timestamp; - aevent->area.x = awire->area.x; - aevent->area.y = awire->area.y; - aevent->area.width = awire->area.width; - aevent->area.height = awire->area.height; - aevent->geometry.x = awire->geometry.x; - aevent->geometry.y = awire->geometry.y; - aevent->geometry.width = awire->geometry.width; - aevent->geometry.height = awire->geometry.height; - return True; - } - } - return False; -} - -static Status -XDamageEventToWire(Display *dpy, XEvent *event, xEvent *wire) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay(dpy); - - XDamageCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case XDamageNotify: { - XDamageNotifyEvent *aevent; - xDamageNotifyEvent *awire; - awire = (xDamageNotifyEvent *) wire; - aevent = (XDamageNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->drawable = aevent->drawable; - awire->damage = aevent->damage; - awire->level = aevent->level; - awire->timestamp = aevent->timestamp; - awire->area.x = aevent->area.x; - awire->area.y = aevent->area.y; - awire->area.width = aevent->area.width; - awire->area.height = aevent->area.height; - awire->geometry.x = aevent->geometry.x; - awire->geometry.y = aevent->geometry.y; - awire->geometry.width = aevent->geometry.width; - awire->geometry.height = aevent->geometry.height; - return True; - } - } - return False; -} - -Bool -XDamageQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - - if (XDamageHasExtension(info)) - { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } - else - return False; -} - -Status -XDamageQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - - XDamageCheckExtension (dpy, info, 0); - - *major_versionp = info->major_version; - *minor_versionp = info->minor_version; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -Damage -XDamageCreate (Display *dpy, Drawable drawable, int level) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageCreateReq *req; - Damage damage; - - XDamageCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (DamageCreate, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageCreate; - req->damage = damage = XAllocID (dpy); - req->drawable = drawable; - req->level = level; - UnlockDisplay (dpy); - SyncHandle (); - return damage; -} - -void -XDamageDestroy (Display *dpy, Damage damage) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageDestroyReq *req; - - XDamageSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (DamageDestroy, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageDestroy; - req->damage = damage; - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XDamageSubtract (Display *dpy, Damage damage, - XserverRegion repair, XserverRegion parts) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageSubtractReq *req; - - XDamageSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (DamageSubtract, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageSubtract; - req->damage = damage; - req->repair = repair; - req->parts = parts; - UnlockDisplay (dpy); - SyncHandle (); -} diff --git a/nx-X11/lib/Xdamage/Xdamage.h b/nx-X11/lib/Xdamage/Xdamage.h deleted file mode 100644 index 3da0606cb..000000000 --- a/nx-X11/lib/Xdamage/Xdamage.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: Xdamage.h,v 1.3 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XDAMAGE_H_ -#define _XDAMAGE_H_ - -#include -#include -#include - -typedef XID Damage; - -typedef struct { - int type; /* event base */ - unsigned long serial; - Bool send_event; - Display *display; - Drawable drawable; - Damage damage; - int level; - Bool more; /* more events will be delivered immediately */ - Time timestamp; - XRectangle area; - XRectangle geometry; -} XDamageNotifyEvent; - -_XFUNCPROTOBEGIN - -Bool XDamageQueryExtension (Display *dpy, int *event_basep, int *error_basep); - -Status XDamageQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -Damage -XDamageCreate (Display *dpy, Drawable drawable, int level); - -void -XDamageDestroy (Display *dpy, Damage damage); - -void -XDamageSubtract (Display *dpy, Damage damage, - XserverRegion repair, XserverRegion parts); - -_XFUNCPROTOEND - -#endif /* _XDAMAGE_H_ */ diff --git a/nx-X11/lib/Xdamage/autogen.sh b/nx-X11/lib/Xdamage/autogen.sh deleted file mode 100755 index b1376df5a..000000000 --- a/nx-X11/lib/Xdamage/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -autoreconf -v --install || exit 1 -./configure --enable-maintainer-mode "$@" diff --git a/nx-X11/lib/Xdamage/configure.ac b/nx-X11/lib/Xdamage/configure.ac deleted file mode 100644 index c2ab2ce26..000000000 --- a/nx-X11/lib/Xdamage/configure.ac +++ /dev/null @@ -1,93 +0,0 @@ -dnl -dnl $Id: configure.ac,v 1.1 2004/07/31 05:50:39 anholt Exp $ -dnl -dnl Copyright © 2003 Keith Packard, Noah Levitt -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation, and that the name of Keith Packard not be used in -dnl advertising or publicity pertaining to distribution of the software without -dnl specific, written prior permission. Keith Packard makes no -dnl representations about the suitability of this software for any purpose. It -dnl is provided "as is" without express or implied warranty. -dnl -dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -dnl PERFORMANCE OF THIS SOFTWARE. -dnl -dnl Process this file with autoconf to create configure. - -AC_PREREQ([2.57]) - -dnl -dnl Version should match the current XFixes version. XFixesQueryVersion -dnl returns the version from xfixeswire.h, NOT the version we set here. But we -dnl try to keep these the same. Note that the library has an extra -dnl digit in the version number to track changes which don't affect the -dnl protocol, so Xfixes version l.n.m corresponds to protocol version l.n -dnl -AC_INIT(libXdamage, 1.0.1, [keithp@keithp.com], libXdamage) -AM_INIT_AUTOMAKE([dist-bzip2]) -AM_MAINTAINER_MODE - -AM_CONFIG_HEADER(config.h) -AC_CONFIG_AUX_DIR(.) - -# Check for progs -AC_PROG_CC -AC_PROG_LIBTOOL - -# Check for X -PKG_CHECK_MODULES(X, x11, - [x_found_with_pkgconfig=yes], - [x_found_with_pkgconfig=no]) - -if test "$x_found_with_pkgconfig" = "no" -then - AC_PATH_XTRA - X_LIBS="$X_LIBS -lX11" - - if test "x$no_x" = "xyes" - then - AC_MSG_ERROR([X is required, but it was either disabled or not found.]) - fi - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $X_CFLAGS" - LIBS="$LIBS $X_LIBS" - - AC_MSG_CHECKING([for XTHREADS in Xlib]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[return XInitThreads() == 0 ? 0 : 1;]])], - [xthreads=no], - [xthreads=yes], - [xthreads=yes]) - - AC_MSG_RESULT($xthreads) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - if test "x$xthreads" = "xyes" - then - X_CFLAGS="$X_CFLAGS -DXTHREADS" - fi -fi - -# Check damageext configuration, strip extra digits from package version to -# find the required protocol version - -DAMAGEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] -PKG_CHECK_MODULES(XDAMAGE, [damageext >= $DAMAGEEXT_VERSION] xfixes) - -AC_OUTPUT([Makefile - xdamage.pc]) - diff --git a/nx-X11/lib/Xdamage/xdamage.pc.in b/nx-X11/lib/Xdamage/xdamage.pc.in deleted file mode 100644 index d1c9f5de6..000000000 --- a/nx-X11/lib/Xdamage/xdamage.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Xdamage -Description: X Damage Library -Version: @VERSION@ -Cflags: -I${includedir} @XDAMAGE_CFLAGS@ @X_CFLAGS@ -Libs: -L${libdir} -lNX_Xdamage @XDAMAGE_LIBS@ @X_LIBS@ diff --git a/nx-X11/lib/Xdamage/xdamageint.h b/nx-X11/lib/Xdamage/xdamageint.h deleted file mode 100644 index 145d6610f..000000000 --- a/nx-X11/lib/Xdamage/xdamageint.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: xdamageint.h,v 1.2 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XDAMAGEINT_H_ -#define _XDAMAGEINT_H_ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include -#include -#include "Xdamage.h" - -typedef struct _XDamageExtDisplayInfo { - struct _XDamageExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - int major_version; /* -1 means we don't know */ - int minor_version; /* -1 means we don't know */ -} XDamageExtDisplayInfo; - -/* replaces XExtensionInfo */ -typedef struct _XDamageExtInfo { - XDamageExtDisplayInfo *head; /* start of the list */ - XDamageExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XDamageExtInfo; - -extern XDamageExtInfo XDamageExtensionInfo; -extern const char XDamageExtensionName[]; - -XDamageExtDisplayInfo * -XDamageFindDisplay (Display *dpy); - -#define XDamageHasExtension(i) ((i) && ((i)->codes)) - -#define XDamageCheckExtension(dpy,i,val) \ - if (!XDamageHasExtension(i)) { return val; } - -#define XDamageSimpleCheckExtension(dpy,i) \ - if (!XDamageHasExtension(i)) { return; } - -#endif /* _XDAMAGEINT_H_ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index b1782eb15..eb65fba19 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -427,7 +427,7 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ @@ -437,7 +437,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-libs.spec b/nx-libs.spec index 294c8739b..9e8a16e4e 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -34,6 +34,7 @@ BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xfont) BuildRequires: pkgconfig(xdmcp) +BuildRequires: pkgconfig(xdamage) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -43,6 +44,7 @@ BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libXpm-devel BuildRequires: xorg-x11-libXfont-devel BuildRequires: xorg-x11-libXdmcp-devel +BuildRequires: xorg-x11-libXdamage-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -53,6 +55,7 @@ BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: libXfont-devel BuildRequires: libXdmcp-devel +BuildRequires: libXdamage-devel %endif # For imake @@ -202,21 +205,6 @@ off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers. -%package -n libNX_Xdamage1 -Group: System Environment/Libraries -Summary: NX Damage Extension library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xdamage - -%description -n libNX_Xdamage1 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The X Damage Extension allows applications to track modified regions -of drawables. - - %package -n libNX_Xext-devel Group: Development/Libraries Summary: Development files for the NX Common Extensions library @@ -656,7 +644,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -n libNX_X11-6 -p /sbin/ldconfig %post -n libNX_Xau6 -p /sbin/ldconfig %post -n libNX_Xcomposite1 -p /sbin/ldconfig -%post -n libNX_Xdamage1 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig @@ -670,7 +657,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -n libNX_X11-6 -p /sbin/ldconfig %postun -n libNX_Xau6 -p /sbin/ldconfig %postun -n libNX_Xcomposite1 -p /sbin/ldconfig -%postun -n libNX_Xdamage1 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig @@ -728,10 +714,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xcomposite.so.1* -%files -n libNX_Xdamage1 -%defattr(-,root,root) -%{_libdir}/libNX_Xdamage.so.1* - %files -n libNX_Xext-devel %defattr(-,root,root) %{_libdir}/libNX_Xext.so @@ -850,7 +832,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files devel %defattr(-,root,root) %{_libdir}/libNX_Xcomposite.so -%{_libdir}/libNX_Xdamage.so %{_libdir}/libNX_Xinerama.so %{_libdir}/libNX_Xrandr.so %{_libdir}/libNX_Xtst.so @@ -859,7 +840,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx/X11/extensions/XRes.h %{_includedir}/nx/X11/extensions/XTest.h %{_includedir}/nx/X11/extensions/Xcomposite.h -%{_includedir}/nx/X11/extensions/Xdamage.h %{_includedir}/nx/X11/extensions/Xevie.h %{_includedir}/nx/X11/extensions/Xinerama.h %{_includedir}/nx/X11/extensions/Xrandr.h @@ -909,8 +889,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx/X11/extensions/bigreqstr.h %{_includedir}/nx/X11/extensions/composite.h %{_includedir}/nx/X11/extensions/compositeproto.h -%{_includedir}/nx/X11/extensions/damageproto.h -%{_includedir}/nx/X11/extensions/damagewire.h %{_includedir}/nx/X11/extensions/panoramiXproto.h %{_includedir}/nx/X11/extensions/randr.h %{_includedir}/nx/X11/extensions/randrproto.h diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index e4ddd7bd4..1480e5ea8 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -148,7 +148,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL) else -EXTRALIBS = -lNX_Xext -lNX_Xtst -lNX_Xrandr -lNX_Xdamage +EXTRALIBS = -lNX_Xext -lNX_Xtst -lNX_Xrandr -lXdamage all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) -- cgit v1.2.3 From b77b26f4acc3932c29a1e0788e22d24e29e091d5 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 5 May 2015 01:22:18 +0200 Subject: debian/libnx-xinerama1.*: fix faulty logic when creating symlinks. --- debian/libnx-xinerama1.postinst.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in index c3706038c..6d9ba36ef 100755 --- a/debian/libnx-xinerama1.postinst.in +++ b/debian/libnx-xinerama1.postinst.in @@ -28,13 +28,13 @@ case "$1" in # Already existent files are not removed. # Users will need to explicitly remove them and (re-) configure this package. - if test -e $libdir/libX11.so.6; then + if ! test -e $libdir/libX11.so.6; then ln -s $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 fi - if test -e $libdir/libXext.so.6; then + if ! test -e $libdir/libXext.so.6; then ln -s $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 fi - if test -e $libdir/libNX_Xinerama.so.1; then + if ! test -e $libdir/libNX_Xinerama.so.1; then ln -s $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 fi ;; -- cgit v1.2.3 From 998527ce5783a0eae405dabb087a20add9a0ef9f Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 5 May 2015 01:22:41 +0200 Subject: debian/changelog: add entry for last change. --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ef9a1113a..ceb869c0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -154,6 +154,7 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low Backported from Arctica GH 3.6.x branch. * nx-libs.spec: actually create libXinerama.so.1 symlink during build phase. Backported from Arctica GH 3.6.x branch. + * debian/libnx-xinerama1.*: fix faulty logic when creating symlinks. [ Bernard Cafarelli ] * nx-X11: link to libdl to fix undefined references to 'dlopen' and 'dlsym'. -- cgit v1.2.3 From 027f593fc78ea5bb53b1d6372aa7bf37e49e59f7 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 5 May 2015 01:23:04 +0200 Subject: debian/changelog: merge with master branch. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ceb869c0a..e664e5b0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -154,6 +154,8 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low Backported from Arctica GH 3.6.x branch. * nx-libs.spec: actually create libXinerama.so.1 symlink during build phase. Backported from Arctica GH 3.6.x branch. + * debian/control: workaround missing dependencies of nxagent on Ubuntu for + now. * debian/libnx-xinerama1.*: fix faulty logic when creating symlinks. [ Bernard Cafarelli ] -- cgit v1.2.3 From e9dcab679cb686b25df921c2c233198cb9dcfbb8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 1 May 2015 15:57:02 +0200 Subject: library clean-up: Don't build libNX_Xrandr anymore. Use system's libXrandr shared library. --- debian/control | 57 +-- debian/libnx-xrandr-dev.install.in | 2 - debian/libnx-xrandr2.install.in | 1 - debian/libnx-xrandr2.symbols | 23 - debian/nx-x11proto-randr-dev.install.in | 2 - debian/rules | 1 - nx-X11/config/cf/X11.tmpl | 37 -- nx-X11/config/cf/host.def | 2 - nx-X11/config/cf/lnxLib.tmpl | 1 - nx-X11/include/extensions/Imakefile | 4 - nx-X11/include/extensions/randr.h | 74 --- nx-X11/include/extensions/randrproto.h | 209 -------- nx-X11/lib/Imakefile | 5 - nx-X11/lib/Xrandr/Imakefile | 42 -- nx-X11/lib/Xrandr/Xrandr-def.cpp | 36 -- nx-X11/lib/Xrandr/Xrandr.c | 744 ---------------------------- nx-X11/lib/Xrandr/Xrandr.h | 151 ------ nx-X11/lib/Xrandr/Xrandr.man | 351 ------------- nx-X11/lib/Xrandr/Xrandrint.h | 87 ---- nx-X11/lib/Xrandr/test.c | 21 - nx-X11/programs/Xserver/Imakefile | 4 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- nx-libs.spec | 29 +- nxcompshad/Makefile.in | 2 +- 25 files changed, 29 insertions(+), 1860 deletions(-) delete mode 100644 debian/libnx-xrandr-dev.install.in delete mode 100644 debian/libnx-xrandr2.install.in delete mode 100644 debian/libnx-xrandr2.symbols delete mode 100644 debian/nx-x11proto-randr-dev.install.in delete mode 100644 nx-X11/include/extensions/randr.h delete mode 100644 nx-X11/include/extensions/randrproto.h delete mode 100644 nx-X11/lib/Xrandr/Imakefile delete mode 100644 nx-X11/lib/Xrandr/Xrandr-def.cpp delete mode 100644 nx-X11/lib/Xrandr/Xrandr.c delete mode 100644 nx-X11/lib/Xrandr/Xrandr.h delete mode 100644 nx-X11/lib/Xrandr/Xrandr.man delete mode 100644 nx-X11/lib/Xrandr/Xrandrint.h delete mode 100644 nx-X11/lib/Xrandr/test.c (limited to 'debian') diff --git a/debian/control b/debian/control index 0f575421f..485c6fe0e 100644 --- a/debian/control +++ b/debian/control @@ -18,12 +18,12 @@ Build-Depends: libxfont-dev, libxdmcp-dev, libxdamage-dev, + libxrandr-dev, autoconf, pkg-config, x11proto-core-dev, expat, Build-Conflicts: - x11proto-randr-dev, x11proto-record-dev, x11proto-xinerama-dev, Standards-Version: 3.9.6 @@ -714,20 +714,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 RandR extension library +Description: nx-X11 RandR extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xrandr provides an X Window System client interface to the RandR - extension to the X protocol. + This package removes the obsoleted libNX_Xrandr.so.2 library. With + recent versions of NX, the system-wide installed libXrandr gets used. . - The RandR extension allows for run-time configuration of display attributes - such as resolution, rotation, and reflection. + This package can be safely removed. Package: libnx-xrandr-dev Provides: libnx-xrandr2-dev @@ -735,41 +731,34 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xrandr2 (= ${binary:Version}), - nx-x11proto-randr-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 RandR extension library (development headers) +Description: nx-X11 RandR extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xrandr provides an X Window System client interface to the RandR - extension to the X protocol. - . - The RandR extension allows for run-time configuration of display attributes - such as resolution, rotation, and reflection. + This package removes the obsoleted headers for the libNX_Xrandr.so.2 + library. With recent versions of NX, the system-wide installed libXrandr + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-randr-dev Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xrandr2 (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 RandR extension wire protocol +Description: nx-X11 RandR extension wire protocol (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - This package provides development headers describing the wire protocol - for the RandR extension, used to change display properties such as - resolution, rotation, reflection, et al, on the fly. + This package removes the obsoleted headers for the libNX_Xrandr.so.2 + library. With recent versions of NX, the system-wide installed libXrandr + gets used. + . + This package can be safely removed. Package: libnx-xrandr2-dbg Architecture: any @@ -777,22 +766,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xrandr2 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 RandR extension library (debug package) +Description: nx-X11 RandR extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xrandr provides an X Window System client interface to the RandR - extension to the X protocol. - . - The RandR extension allows for run-time configuration of display attributes - such as resolution, rotation, and reflection. + This package removes the obsoleted debug symbols for the libNX_Xrandr.so.2 + library. With recent versions of NX, the system-wide installed libXrandr + gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xrender1 Architecture: any diff --git a/debian/libnx-xrandr-dev.install.in b/debian/libnx-xrandr-dev.install.in deleted file mode 100644 index 4711b6a18..000000000 --- a/debian/libnx-xrandr-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xrandr.so -usr/include/*/nx/X11/extensions/Xrandr.h \ No newline at end of file diff --git a/debian/libnx-xrandr2.install.in b/debian/libnx-xrandr2.install.in deleted file mode 100644 index f4d1b039f..000000000 --- a/debian/libnx-xrandr2.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xrandr.so.* diff --git a/debian/libnx-xrandr2.symbols b/debian/libnx-xrandr2.symbols deleted file mode 100644 index 7dc2fd1b9..000000000 --- a/debian/libnx-xrandr2.symbols +++ /dev/null @@ -1,23 +0,0 @@ -libNX_Xrandr.so.2 libnx-xrandr2 #MINVER# - XRRConfigCurrentConfiguration@Base 3.5.0.29 - XRRConfigCurrentRate@Base 3.5.0.29 - XRRConfigRates@Base 3.5.0.29 - XRRConfigRotations@Base 3.5.0.29 - XRRConfigSizes@Base 3.5.0.29 - XRRConfigTimes@Base 3.5.0.29 - XRRExtensionInfo@Base 3.5.0.29 - XRRExtensionName@Base 3.5.0.29 - XRRFindDisplay@Base 3.5.0.29 - XRRFreeScreenConfigInfo@Base 3.5.0.29 - XRRGetScreenInfo@Base 3.5.0.29 - XRRQueryExtension@Base 3.5.0.29 - XRRQueryVersion@Base 3.5.0.29 - XRRRates@Base 3.5.0.29 - XRRRootToScreen@Base 3.5.0.29 - XRRRotations@Base 3.5.0.29 - XRRSelectInput@Base 3.5.0.29 - XRRSetScreenConfig@Base 3.5.0.29 - XRRSetScreenConfigAndRate@Base 3.5.0.29 - XRRSizes@Base 3.5.0.29 - XRRTimes@Base 3.5.0.29 - XRRUpdateConfiguration@Base 3.5.0.29 diff --git a/debian/nx-x11proto-randr-dev.install.in b/debian/nx-x11proto-randr-dev.install.in deleted file mode 100644 index d92801663..000000000 --- a/debian/nx-x11proto-randr-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/include/*/nx/X11/extensions/randr.h -usr/include/*/nx/X11/extensions/randrproto.h diff --git a/debian/rules b/debian/rules index 16a09fb3f..682c5dab8 100755 --- a/debian/rules +++ b/debian/rules @@ -84,7 +84,6 @@ override_dh_strip: dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg - dh_strip -plibnx-xrandr2 --dbg-package=libnx-xrandr2-dbg dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg dh_strip -plibnx-xtst6 --dbg-package=libnx-xtst6-dbg dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index de60cecaa..37f89696d 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -325,9 +325,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildRandR #define BuildRandR YES #endif -#ifndef BuildRandRLibrary -#define BuildRandRLibrary !BuildServersOnly -#endif #ifndef BuildXfixes #define BuildXfixes YES @@ -1529,30 +1526,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #define ProfileLibXrender NO #endif -#if BuildRandRLibrary -# ifndef SharedLibXrandr -# define SharedLibXrandr HasSharedLibraries -# endif -# ifndef NormalLibXrandr -# define NormalLibXrandr (!SharedLibXrandr || ForceNormalLib) -# endif -# ifndef DebugLibXrandr -# define DebugLibXrandr NO -# endif -# ifndef ProfileLibXrandr -# define ProfileLibXrandr NO -# endif -#else -# undef SharedLibXrandr -# define SharedLibXrandr NO -# undef NormalLibXrandr -# define NormalLibXrandr NO -# undef DebugLibXrandr -# define DebugLibXrandr NO -# undef ProfileLibXrandr -# define ProfileLibXrandr NO -#endif - #if BuildXfixesLibrary #ifndef SharedLibXfixes #define SharedLibXfixes HasSharedLibraries @@ -1751,16 +1724,6 @@ ProjectUnsharedLibReferences(GLX,NX_GL,$(GLXLIBSRC),XBuildLibDir) SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) #else ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir) -#endif - - XRANDRLIBSRC = $(LIBSRC)/Xrandr -#if SharedLibXrandr -#ifndef SharedXrandrRev -#define SharedXrandrRev 2.0 -#endif -SharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev) -#else -ProjectUnsharedLibReferences(XRANDR,NX_Xrandr,$(XRANDRLIBSRC),XBuildLibDir) #endif XFIXESLIBSRC = $(LIBSRC)/Xfixes diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 0566befdd..02eabbb9f 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -127,8 +127,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildCompositeLibrary YES -#define BuildRandRLibrary YES - #define BuildDocs NO #define BuildComposite YES diff --git a/nx-X11/config/cf/lnxLib.tmpl b/nx-X11/config/cf/lnxLib.tmpl index 23fdf0fe3..33c89e102 100644 --- a/nx-X11/config/cf/lnxLib.tmpl +++ b/nx-X11/config/cf/lnxLib.tmpl @@ -9,7 +9,6 @@ XCOMM $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) -#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) #define SharedXrenderReqs $(LDPRELIB) $(XLIB) #define SharedXtstReqs $(LDPRELIB) $(XLIB) diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 4f88d2bab..549c77018 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -50,9 +50,6 @@ XFIXESHEADERS = xfixeswire.h xfixesproto.h #if BuildComposite || BuildCompositeLibrary COMPOSITEHEADERS = composite.h compositeproto.h #endif -#if BuildRandR || BuildRandRLibrary -RANDRHEADERS = randr.h randrproto.h -#endif #if BuildXTrap XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ xtraplibp.h xtrapproto.h @@ -77,7 +74,6 @@ EXTRAHEADERS = \ $(XF86RUSHHEADERS) \ $(FONTCACHEHEADERS) \ $(RENDERHEADERS) \ - $(RANDRHEADERS) \ $(XFIXESHEADERS) \ $(COMPOSITEHEADERS) \ $(XEVIEHEADERS) \ diff --git a/nx-X11/include/extensions/randr.h b/nx-X11/include/extensions/randr.h deleted file mode 100644 index 864ddd4fa..000000000 --- a/nx-X11/include/extensions/randr.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ - * - * Copyright © 2000, Compaq Computer Corporation, - * Copyright © 2002, Hewlett Packard, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. HP makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP - * 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. - * - * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. - */ - -#ifndef _RANDR_H_ -#define _RANDR_H_ - -typedef unsigned short Rotation; -typedef unsigned short SizeID; -typedef unsigned short SubpixelOrder; - -#define RANDR_NAME "RANDR" -#define RANDR_MAJOR 1 -#define RANDR_MINOR 1 - -#define RRNumberErrors 0 -#define RRNumberEvents 1 - -#define X_RRQueryVersion 0 -/* we skip 1 to make old clients fail pretty immediately */ -#define X_RROldGetScreenInfo 1 -#define X_RR1_0SetScreenConfig 2 -/* V1.0 apps share the same set screen config request id */ -#define X_RRSetScreenConfig 2 -#define X_RROldScreenChangeSelectInput 3 -/* 3 used to be ScreenChangeSelectInput; deprecated */ -#define X_RRSelectInput 4 -#define X_RRGetScreenInfo 5 - -/* used in XRRSelectInput */ - -#define RRScreenChangeNotifyMask (1L << 0) - -#define RRScreenChangeNotify 0 - -/* used in the rotation field; rotation and reflection in 0.1 proto. */ -#define RR_Rotate_0 1 -#define RR_Rotate_90 2 -#define RR_Rotate_180 4 -#define RR_Rotate_270 8 - -/* new in 1.0 protocol, to allow reflection of screen */ - -#define RR_Reflect_X 16 -#define RR_Reflect_Y 32 - -#define RRSetConfigSuccess 0 -#define RRSetConfigInvalidConfigTime 1 -#define RRSetConfigInvalidTime 2 -#define RRSetConfigFailed 3 - -#endif /* _RANDR_H_ */ diff --git a/nx-X11/include/extensions/randrproto.h b/nx-X11/include/extensions/randrproto.h deleted file mode 100644 index 04d62fc04..000000000 --- a/nx-X11/include/extensions/randrproto.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * $XFree86: xc/include/extensions/randrproto.h,v 1.6 2002/09/29 23:39:43 keithp Exp $ - * - * Copyright © 2000 Compaq Computer Corporation - * Copyright © 2002 Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq and HP makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ - * 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. - * - * Author: Jim Gettys, Hewlett-Packard Company, Inc. - */ - -/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ -/* V1.0 removes depth switching from the protocol */ -#ifndef _XRANDRP_H_ -#define _XRANDRP_H_ - -#include - -#define Window CARD32 -#define Drawable CARD32 -#define Font CARD32 -#define Pixmap CARD32 -#define Cursor CARD32 -#define Colormap CARD32 -#define GContext CARD32 -#define Atom CARD32 -#define Time CARD32 -#define KeyCode CARD8 -#define KeySym CARD32 - -#define Rotation CARD16 -#define SizeID CARD16 -#define SubpixelOrder CARD16 - -/* - * data structures - */ - -typedef struct { - CARD16 widthInPixels B16; - CARD16 heightInPixels B16; - CARD16 widthInMillimeters B16; - CARD16 heightInMillimeters B16; -} xScreenSizes; -#define sz_xScreenSizes 8 - -/* - * requests and replies - */ - -typedef struct { - CARD8 reqType; - CARD8 randrReqType; - CARD16 length B16; - CARD32 majorVersion B32; - CARD32 minorVersion B32; -} xRRQueryVersionReq; -#define sz_xRRQueryVersionReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xRRQueryVersionReply; -#define sz_xRRQueryVersionReply 32 - -typedef struct { - CARD8 reqType; - CARD8 randrReqType; - CARD16 length B16; - Window window B32; -} xRRGetScreenInfoReq; -#define sz_xRRGetScreenInfoReq 8 - -/* - * the xRRScreenInfoReply structure is followed by: - * - * the size information - */ - - -typedef struct { - BYTE type; /* X_Reply */ - BYTE setOfRotations; - CARD16 sequenceNumber B16; - CARD32 length B32; - Window root B32; - Time timestamp B32; - Time configTimestamp B32; - CARD16 nSizes B16; - SizeID sizeID B16; - Rotation rotation B16; - CARD16 rate B16; - CARD16 nrateEnts B16; - CARD16 pad B16; -} xRRGetScreenInfoReply; -#define sz_xRRGetScreenInfoReply 32 - -typedef struct { - CARD8 reqType; - CARD8 randrReqType; - CARD16 length B16; - Drawable drawable B32; - Time timestamp B32; - Time configTimestamp B32; - SizeID sizeID B16; - Rotation rotation B16; -} xRR1_0SetScreenConfigReq; -#define sz_xRR1_0SetScreenConfigReq 20 - -typedef struct { - CARD8 reqType; - CARD8 randrReqType; - CARD16 length B16; - Drawable drawable B32; - Time timestamp B32; - Time configTimestamp B32; - SizeID sizeID B16; - Rotation rotation B16; - CARD16 rate B16; - CARD16 pad B16; -} xRRSetScreenConfigReq; -#define sz_xRRSetScreenConfigReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 status; - CARD16 sequenceNumber B16; - CARD32 length B32; - Time newTimestamp B32; - Time newConfigTimestamp B32; - Window root; - CARD16 subpixelOrder B16; - CARD16 pad4 B16; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xRRSetScreenConfigReply; -#define sz_xRRSetScreenConfigReply 32 - -typedef struct { - CARD8 reqType; - CARD8 randrReqType; - CARD16 length B16; - Window window B32; - CARD16 enable B16; - CARD16 pad2 B16; -} xRRSelectInputReq; -#define sz_xRRSelectInputReq 12 - -#define sz_xRRSelectInputReq 12 - -/* - * event - */ -typedef struct { - CARD8 type; /* always evBase + ScreenChangeNotify */ - CARD8 rotation; /* new rotation */ - CARD16 sequenceNumber B16; - Time timestamp B32; /* time screen was changed */ - Time configTimestamp B32; /* time config data was changed */ - Window root B32; /* root window */ - Window window B32; /* window requesting notification */ - SizeID sizeID B16; /* new size ID */ - CARD16 subpixelOrder B16; /* subpixel order */ - CARD16 widthInPixels B16; /* new size */ - CARD16 heightInPixels B16; - CARD16 widthInMillimeters B16; - CARD16 heightInMillimeters B16; -} xRRScreenChangeNotifyEvent; -#define sz_xRRScreenChangeNotifyEvent 32 - -#undef Window -#undef Drawable -#undef Font -#undef Pixmap -#undef Cursor -#undef Colormap -#undef GContext -#undef Atom -#undef Time -#undef KeyCode -#undef KeySym -#undef Rotation -#undef SizeID -#undef SubpixelOrder - -#endif /* _XRANDRP_H_ */ diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 13dc8ac73..3e58dfecb 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -51,10 +51,6 @@ GLXLIBDIR = GL RENDERLIBDIR = Xrender #endif -#if BuildRandRLibrary -RANDRLIBDIR = Xrandr -#endif - #if BuildXfixesLibrary XFIXESLIBDIR = Xfixes #endif @@ -103,7 +99,6 @@ LINTSUBDIRS = \ $(GLXLIBDIR) \ $(XINERAMADIR) \ $(RENDERLIBDIR) \ - $(RANDRLIBDIR) \ $(XRESLIBDIR) \ $(XFIXESLIBDIR) \ $(COMPOSITELIBDIR) \ diff --git a/nx-X11/lib/Xrandr/Imakefile b/nx-X11/lib/Xrandr/Imakefile deleted file mode 100644 index 5cf70a516..000000000 --- a/nx-X11/lib/Xrandr/Imakefile +++ /dev/null @@ -1,42 +0,0 @@ -XCOMM $XFree86: xc/lib/Xrandr/Imakefile,v 1.1 2001/05/23 03:29:44 keithp Exp $ -XCOMM $XdotOrg: xc/lib/Xrandr/Imakefile,v 1.5 2005/10/24 23:30:21 alanc Exp $ - -#define DoNormalLib NormalLibXrandr -#define DoSharedLib SharedLibXrandr -#define DoDebugLib DebugLibXrandr -#define DoProfileLib ProfileLibXrandr -#define LibName NX_Xrandr -#define SoRev SOXRANDRREV -#define IncSubdir X11 -#define IncSubSubdir extensions - -#include - -#ifdef SharedXrandrReqs -REQUIREDLIBS = SharedXrandrReqs -#endif - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - - DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I. -I$(XLIBSRC) -I$(EXTINCSRC) - SRCS = Xrandr.c - OBJS = Xrandr.o - LINTLIBS = $(LINTXLIB) - -HEADERS = Xrandr.h - -#include - -MANSUFFIX = $(LIBMANSUFFIX) - -#define PreprocessManPages -InstallManPage(Xrandr,$(LIBMANDIR)) - -#if ExpandManNames -InstallManPageAliases(Xrandr,$(LIBMANDIR),XRRQueryExtension XRRQueryVersion XRRGetScreenInfo XRRFreeScreenConfigInfo XRRSetScreenConfig XRRSetScreenConfigAndRate XRRConfigRotations XRRConfigTimes XRRConfigSizes XRRConfigRates XRRConfigCurrentConfiguration XRRConfigCurrentRate XRRRootToScreen XRRScreenConfig XRRConfig XRRSelectInput) -#endif - -DependTarget() diff --git a/nx-X11/lib/Xrandr/Xrandr-def.cpp b/nx-X11/lib/Xrandr/Xrandr-def.cpp deleted file mode 100644 index 8b0d8a754..000000000 --- a/nx-X11/lib/Xrandr/Xrandr-def.cpp +++ /dev/null @@ -1,36 +0,0 @@ -LIBRARY Xrandr -VERSION LIBRARY_VERSION -EXPORTS -#ifndef __UNIXOS2__ -XRRCurrentConfig -#endif - XRRFindDisplay -#ifndef __UNIXOS2__ -XRRFreeScreenInfo -#endif - XRRGetScreenInfo - XRRQueryExtension - XRRQueryVersion - XRRRootToScreen - XRRRotations -#ifndef __UNIXOS2__ -XRRScreenChangeSelectInput -#endif - XRRSetScreenConfig - XRRSizes - XRRTimes -#ifndef __UNIXOS2__ -XRRVisualIDToVisual -XRRVisualToDepth -#else -XRRConfigCurrentConfiguration -XRRConfigSizes -XRRConfigRotations -XRRSelectInput -XRRFreeScreenConfigInfo -XRRUpdateConfiguration -XRRConfigCurrentRate -XRRConfigRates -XRRSetScreenConfigAndRate -#endif /* __UNIXOS2__ -/* $XFree86: xc/lib/Xrandr/Xrandr-def.cpp,v 1.1 2001/08/19 15:22:58 alanh Exp $ */ diff --git a/nx-X11/lib/Xrandr/Xrandr.c b/nx-X11/lib/Xrandr/Xrandr.c deleted file mode 100644 index 32537b403..000000000 --- a/nx-X11/lib/Xrandr/Xrandr.c +++ /dev/null @@ -1,744 +0,0 @@ -/* - * $XFree86: xc/lib/Xrandr/Xrandr.c,v 1.13tsi Exp $ - * - * Copyright © 2000 Compaq Computer Corporation, Inc. - * Copyright © 2002 Hewlett Packard Company, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. HP makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ - * 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. - * - * Author: Jim Gettys, HP Labs, HP. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -/* we need to be able to manipulate the Display structure on events */ -#include -#include -#include -#include "Xrandrint.h" - -XExtensionInfo XRRExtensionInfo; -char XRRExtensionName[] = RANDR_NAME; - -static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire); -static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire); - -static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, Window window); - -static int -XRRCloseDisplay (Display *dpy, XExtCodes *codes); - -static /* const */ XExtensionHooks rr_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - XRRCloseDisplay, /* close_display */ - XRRWireToEvent, /* wire_to_event */ - XRREventToWire, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = XRRFindDisplay(dpy); - XRRScreenChangeNotifyEvent *aevent; - xRRScreenChangeNotifyEvent *awire; - - RRCheckExtension(dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case RRScreenChangeNotify: - awire = (xRRScreenChangeNotifyEvent *) wire; - aevent = (XRRScreenChangeNotifyEvent *) event; - aevent->type = awire->type & 0x7F; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->window = awire->window; - aevent->root = awire->root; - aevent->timestamp = awire->timestamp; - aevent->config_timestamp = awire->configTimestamp; - aevent->size_index = awire->sizeID; - aevent->subpixel_order = awire->subpixelOrder; - aevent->rotation = awire->rotation; - aevent->width = awire->widthInPixels; - aevent->height = awire->heightInPixels; - aevent->mwidth = awire->widthInMillimeters; - aevent->mheight = awire->heightInMillimeters; - return True; - } - - return False; -} - -static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = XRRFindDisplay(dpy); - XRRScreenChangeNotifyEvent *aevent; - xRRScreenChangeNotifyEvent *awire; - - RRCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case RRScreenChangeNotify: - awire = (xRRScreenChangeNotifyEvent *) wire; - aevent = (XRRScreenChangeNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->rotation = (CARD8) aevent->rotation; - awire->sequenceNumber = aevent->serial & 0xFFFF; - awire->timestamp = aevent->timestamp; - awire->configTimestamp = aevent->config_timestamp; - awire->root = aevent->root; - awire->window = aevent->window; - awire->sizeID = aevent->size_index; - awire->subpixelOrder = aevent->subpixel_order; - awire->widthInPixels = aevent->width; - awire->heightInPixels = aevent->height; - awire->widthInMillimeters = aevent->mwidth; - awire->heightInMillimeters = aevent->mheight; - return True; - } - return False; -} - -XExtDisplayInfo * -XRRFindDisplay (Display *dpy) -{ - XExtDisplayInfo *dpyinfo; - XRandRInfo *xrri; - int i, numscreens; - - dpyinfo = XextFindDisplay (&XRRExtensionInfo, dpy); - if (!dpyinfo) { - dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, - XRRExtensionName, - &rr_extension_hooks, - RRNumberEvents, 0); - numscreens = ScreenCount(dpy); - xrri = Xmalloc (sizeof(XRandRInfo) + - sizeof(char *) * numscreens); - xrri->config = (XRRScreenConfiguration **)(xrri + 1); - for(i = 0; i < numscreens; i++) - xrri->config[i] = NULL; - xrri->major_version = -1; - dpyinfo->data = (char *) xrri; - } - return dpyinfo; -} - -static int -XRRCloseDisplay (Display *dpy, XExtCodes *codes) -{ - int i; - XRRScreenConfiguration **configs; - XExtDisplayInfo *info = XRRFindDisplay (dpy); - XRandRInfo *xrri; - - LockDisplay(dpy); - /* - * free cached data - */ - if (XextHasExtension(info)) { - xrri = (XRandRInfo *) info->data; - if (xrri) { - configs = xrri->config; - - for (i = 0; i < ScreenCount(dpy); i++) { - if (configs[i] != NULL) XFree (configs[i]); - } - XFree (xrri); - } - } - UnlockDisplay(dpy); - return XextRemoveDisplay (&XRRExtensionInfo, dpy); -} - - -Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation) -{ - *current_rotation = config->current_rotation; - return config->rotations; -} - -XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes) -{ - *nsizes = config->nsizes; - return config->sizes; -} - -short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates) -{ - short *r = config->rates; - int nents = config->nrates; - - /* Skip over the intervening rate lists */ - while (sizeID > 0 && nents > 0) - { - int i = (*r + 1); - r += i; - nents -= i; - sizeID--; - } - if (!nents) - { - *nrates = 0; - return 0; - } - *nrates = (int) *r; - return r + 1; -} - -Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp) -{ - *config_timestamp = config->config_timestamp; - return config->timestamp; -} - - -SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, - Rotation *rotation) -{ - *rotation = (Rotation) config->current_rotation; - return (SizeID) config->current_size; -} - -short XRRConfigCurrentRate (XRRScreenConfiguration *config) -{ - return config->current_rate; -} - -/* - * Go get the screen configuration data and salt it away for future use; - * returns NULL if extension not supported - */ -static XRRScreenConfiguration *_XRRValidateCache (Display *dpy, int screen) -{ - XExtDisplayInfo *info = XRRFindDisplay (dpy); - XRRScreenConfiguration **configs; - XRandRInfo *xrri; - - if (XextHasExtension(info)) { - xrri = (XRandRInfo *) info->data; - configs = xrri->config; - - if (configs[screen] == NULL) - configs[screen] = _XRRGetScreenInfo (dpy, RootWindow(dpy, screen)); - return configs[screen]; - } else { - return NULL; - } -} - -/* given a screen, return the information from the (possibly) cached data */ -Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation) -{ - XRRScreenConfiguration *config; - Rotation cr; - LockDisplay(dpy); - if ((config = _XRRValidateCache(dpy, screen))) { - *current_rotation = config->current_rotation; - cr = config->rotations; - UnlockDisplay(dpy); - return cr; - } - else { - UnlockDisplay(dpy); - *current_rotation = RR_Rotate_0; - return 0; /* no rotations supported */ - } -} - -/* given a screen, return the information from the (possibly) cached data */ -XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes) -{ - XRRScreenConfiguration *config; - XRRScreenSize *sizes; - - LockDisplay(dpy); - if ((config = _XRRValidateCache(dpy, screen))) { - *nsizes = config->nsizes; - sizes = config->sizes; - UnlockDisplay(dpy); - return sizes; - } - else { - UnlockDisplay(dpy); - *nsizes = 0; - return NULL; - } -} - -short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates) -{ - XRRScreenConfiguration *config; - short *rates; - - LockDisplay(dpy); - if ((config = _XRRValidateCache(dpy, screen))) { - rates = XRRConfigRates (config, sizeID, nrates); - UnlockDisplay(dpy); - return rates; - } - else { - UnlockDisplay(dpy); - *nrates = 0; - return NULL; - } -} - -/* given a screen, return the information from the (possibly) cached data */ -Time XRRTimes (Display *dpy, int screen, Time *config_timestamp) -{ - XRRScreenConfiguration *config; - Time ts; - - LockDisplay(dpy); - if ((config = _XRRValidateCache(dpy, screen))) { - *config_timestamp = config->config_timestamp; - ts = config->timestamp; - UnlockDisplay(dpy); - return ts; - } else { - UnlockDisplay(dpy); - return CurrentTime; - } -} - -int XRRRootToScreen(Display *dpy, Window root) -{ - int snum; - for (snum = 0; snum < ScreenCount(dpy); snum++) { - if (RootWindow(dpy, snum) == root) return snum; - } - return -1; -} - - -Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = XRRFindDisplay (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - -static Bool -_XRRHasRates (int major, int minor) -{ - return major > 1 || (major == 1 && minor >= 1); -} - -Status XRRQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XExtDisplayInfo *info = XRRFindDisplay (dpy); - xRRQueryVersionReply rep; - xRRQueryVersionReq *req; - XRandRInfo *xrri; - - RRCheckExtension (dpy, info, 0); - - xrri = (XRandRInfo *) info->data; - - /* - * only get the version information from the server if we don't have it already - */ - if (xrri->major_version == -1) { - LockDisplay (dpy); - GetReq (RRQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRQueryVersion; - req->majorVersion = RANDR_MAJOR; - req->minorVersion = RANDR_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - xrri->major_version = rep.majorVersion; - xrri->minor_version = rep.minorVersion; - xrri->has_rates = _XRRHasRates (xrri->major_version, xrri->minor_version); - } - *major_versionp = xrri->major_version; - *minor_versionp = xrri->minor_version; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -typedef struct _randrVersionState { - unsigned long version_seq; - Bool error; - int major_version; - int minor_version; -} _XRRVersionState; - -static Bool -_XRRVersionHandler (Display *dpy, - xReply *rep, - char *buf, - int len, - XPointer data) -{ - xRRQueryVersionReply replbuf; - xRRQueryVersionReply *repl; - _XRRVersionState *state = (_XRRVersionState *) data; - - if (dpy->last_request_read != state->version_seq) - return False; - if (rep->generic.type == X_Error) - { - state->error = True; - return False; - } - repl = (xRRQueryVersionReply *) - _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len, - (SIZEOF(xRRQueryVersionReply) - SIZEOF(xReply)) >> 2, - True); - state->major_version = repl->majorVersion; - state->minor_version = repl->minorVersion; - return True; -} -/* need a version that does not hold the display lock */ -static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, Window window) -{ - XExtDisplayInfo *info = XRRFindDisplay(dpy); - xRRGetScreenInfoReply rep; - xRRGetScreenInfoReq *req; - _XAsyncHandler async; - _XRRVersionState async_state; - int nbytes, nbytesRead, rbytes; - int i; - xScreenSizes size; - struct _XRRScreenConfiguration *scp; - XRRScreenSize *ssp; - short *rates; - xRRQueryVersionReq *vreq; - XRandRInfo *xrri; - Bool getting_version = False; - - RRCheckExtension (dpy, info, 0); - - xrri = (XRandRInfo *) info->data; - - if (xrri->major_version == -1) - { - /* hide a version query in the request */ - GetReq (RRQueryVersion, vreq); - vreq->reqType = info->codes->major_opcode; - vreq->randrReqType = X_RRQueryVersion; - vreq->majorVersion = RANDR_MAJOR; - vreq->minorVersion = RANDR_MINOR; - - async_state.version_seq = dpy->request; - async_state.error = False; - async.next = dpy->async_handlers; - async.handler = _XRRVersionHandler; - async.data = (XPointer) &async_state; - dpy->async_handlers = &async; - - getting_version = True; - } - - GetReq (RRGetScreenInfo, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRGetScreenInfo; - req->window = window; - - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - if (getting_version) - DeqAsyncHandler (dpy, &async); - SyncHandle (); - return NULL; - } - if (getting_version) - { - DeqAsyncHandler (dpy, &async); - if (async_state.error) - { - SyncHandle(); - } - xrri->major_version = async_state.major_version; - xrri->minor_version = async_state.minor_version; - xrri->has_rates = _XRRHasRates (xrri->minor_version, xrri->major_version); - } - - /* - * Make the reply compatible with v1.1 - */ - if (!xrri->has_rates) - { - rep.rate = 0; - rep.nrateEnts = 0; - } - - nbytes = (long) rep.length << 2; - - nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) + - ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF (CARD16) */); - - /* - * first we must compute how much space to allocate for - * randr library's use; we'll allocate the structures in a single - * allocation, on cleanlyness grounds. - */ - - rbytes = sizeof (XRRScreenConfiguration) + - (rep.nSizes * sizeof (XRRScreenSize) + - rep.nrateEnts * sizeof (int)); - - scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes); - if (scp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - SyncHandle (); - return NULL; - } - - - ssp = (XRRScreenSize *)(scp + 1); - rates = (short *) (ssp + rep.nSizes); - - /* set up the screen configuration structure */ - scp->screen = - ScreenOfDisplay (dpy, XRRRootToScreen(dpy, rep.root)); - - scp->sizes = ssp; - scp->rates = rates; - scp->rotations = rep.setOfRotations; - scp->current_size = rep.sizeID; - scp->current_rate = rep.rate; - scp->current_rotation = rep.rotation; - scp->timestamp = rep.timestamp; - scp->config_timestamp = rep.configTimestamp; - scp->nsizes = rep.nSizes; - scp->nrates = rep.nrateEnts; - - /* - * Time to unpack the data from the server. - */ - - /* - * First the size information - */ - for (i = 0; i < rep.nSizes; i++) { - _XReadPad (dpy, (char *) &size, SIZEOF (xScreenSizes)); - - ssp[i].width = size.widthInPixels; - ssp[i].height = size.heightInPixels; - ssp[i].mwidth = size.widthInMillimeters; - ssp[i].mheight = size.heightInMillimeters; - } - /* - * And the rates - */ - _XRead16Pad (dpy, rates, 2 /* SIZEOF (CARD16) */ * rep.nrateEnts); - - /* - * Skip any extra data - */ - if (nbytes > nbytesRead) - _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); - - return (XRRScreenConfiguration *)(scp); -} - -XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window) -{ - XRRScreenConfiguration *config; - XRRFindDisplay(dpy); - LockDisplay (dpy); - config = _XRRGetScreenInfo(dpy, window); - UnlockDisplay (dpy); - SyncHandle (); - return config; -} - - -void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config) -{ - Xfree (config); -} - - -/* - * in protocol version 0.1, routine added to allow selecting for new events. - */ - -void XRRSelectInput (Display *dpy, Window window, int mask) -{ - XExtDisplayInfo *info = XRRFindDisplay (dpy); - xRRSelectInputReq *req; - - RRSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - GetReq (RRSelectInput, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRSelectInput; - req->window = window; - req->enable = 0; - if (mask) req->enable = mask; - UnlockDisplay (dpy); - SyncHandle (); - return; -} - -Status XRRSetScreenConfigAndRate (Display *dpy, - XRRScreenConfiguration *config, - Drawable draw, - int size_index, - Rotation rotation, - short rate, - Time timestamp) -{ - XExtDisplayInfo *info = XRRFindDisplay (dpy); - xRRSetScreenConfigReply rep; - XRandRInfo *xrri; - int major, minor; - - RRCheckExtension (dpy, info, 0); - - /* Make sure has_rates is set */ - if (!XRRQueryVersion (dpy, &major, &minor)) - return 0; - - LockDisplay (dpy); - xrri = (XRandRInfo *) info->data; - if (xrri->has_rates) - { - xRRSetScreenConfigReq *req; - GetReq (RRSetScreenConfig, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRSetScreenConfig; - req->drawable = draw; - req->sizeID = size_index; - req->rotation = rotation; - req->timestamp = timestamp; - req->configTimestamp = config->config_timestamp; - req->rate = rate; - } - else - { - xRR1_0SetScreenConfigReq *req; - GetReq (RR1_0SetScreenConfig, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRSetScreenConfig; - req->drawable = draw; - req->sizeID = size_index; - req->rotation = rotation; - req->timestamp = timestamp; - req->configTimestamp = config->config_timestamp; - } - - (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); - - if (rep.status == RRSetConfigSuccess) { - /* if we succeed, set our view of reality to what we set it to */ - config->config_timestamp = rep.newConfigTimestamp; - config->timestamp = rep.newTimestamp; - config->screen = ScreenOfDisplay (dpy, XRRRootToScreen(dpy, rep.root)); - config->current_size = size_index; - config->current_rotation = rotation; - } - UnlockDisplay (dpy); - SyncHandle (); - return(rep.status); -} - -Status XRRSetScreenConfig (Display *dpy, - XRRScreenConfiguration *config, - Drawable draw, - int size_index, - Rotation rotation, Time timestamp) -{ - return XRRSetScreenConfigAndRate (dpy, config, draw, size_index, - rotation, 0, timestamp); -} - -int XRRUpdateConfiguration(XEvent *event) -{ - XRRScreenChangeNotifyEvent *scevent; - XConfigureEvent *rcevent; - Display *dpy = event->xany.display; - XExtDisplayInfo *info; - XRandRInfo *xrri; - int snum; - - /* first, see if it is a vanilla configure notify event */ - if (event->type == ConfigureNotify) { - rcevent = (XConfigureEvent *) event; - snum = XRRRootToScreen(dpy, rcevent->window); - dpy->screens[snum].width = rcevent->width; - dpy->screens[snum].height = rcevent->height; - return 1; - } - - info = XRRFindDisplay(dpy); - RRCheckExtension (dpy, info, 0); - - switch (event->type - info->codes->first_event) { - case RRScreenChangeNotify: - scevent = (XRRScreenChangeNotifyEvent *) event; - snum = XRRRootToScreen(dpy, - ((XRRScreenChangeNotifyEvent *) event)->root); - if (scevent->rotation & (RR_Rotate_90 | RR_Rotate_270)) { - dpy->screens[snum].width = scevent->height; - dpy->screens[snum].height = scevent->width; - dpy->screens[snum].mwidth = scevent->mheight; - dpy->screens[snum].mheight = scevent->mwidth; - } else { - dpy->screens[snum].width = scevent->width; - dpy->screens[snum].height = scevent->height; - dpy->screens[snum].mwidth = scevent->mwidth; - dpy->screens[snum].mheight = scevent->mheight; - } - XRenderSetSubpixelOrder (dpy, snum, scevent->subpixel_order); - break; - default: - return 0; - } - xrri = (XRandRInfo *) info->data; - /* - * so the next time someone wants some data, it will be fetched; - * it might be better to force the round trip immediately, but - * I dislike pounding the server simultaneously when not necessary - */ - if (xrri->config[snum] != NULL) { - XFree (xrri->config[snum]); - xrri->config[snum] = NULL; - } - return 1; -} diff --git a/nx-X11/lib/Xrandr/Xrandr.h b/nx-X11/lib/Xrandr/Xrandr.h deleted file mode 100644 index 6a4d7fe98..000000000 --- a/nx-X11/lib/Xrandr/Xrandr.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ - * - * Copyright © 2000 Compaq Computer Corporation, Inc. - * Copyright © 2002 Hewlett-Packard Company, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Compaq not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. HP makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ - * 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. - * - * Author: Jim Gettys, HP Labs, HP. - */ - -#ifndef _XRANDR_H_ -#define _XRANDR_H_ - -#include - -#include - -_XFUNCPROTOBEGIN - - -typedef struct { - int width, height; - int mwidth, mheight; -} XRRScreenSize; - -/* - * Events. - */ - -typedef struct { - int type; /* event base */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; /* window which selected for this event */ - Window root; /* Root window for changed screen */ - Time timestamp; /* when the screen change occurred */ - Time config_timestamp; /* when the last configuration change */ - SizeID size_index; - SubpixelOrder subpixel_order; - Rotation rotation; - int width; - int height; - int mwidth; - int mheight; -} XRRScreenChangeNotifyEvent; - - -/* internal representation is private to the library */ -typedef struct _XRRScreenConfiguration XRRScreenConfiguration; - -Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep); -Status XRRQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, - Drawable draw); - -void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); - -/* - * Note that screen configuration changes are only permitted if the client can - * prove it has up to date configuration information. We are trying to - * insist that it become possible for screens to change dynamically, so - * we want to ensure the client knows what it is talking about when requesting - * changes. - */ -Status XRRSetScreenConfig (Display *dpy, - XRRScreenConfiguration *config, - Drawable draw, - int size_index, - Rotation rotation, - Time timestamp); - -/* added in v1.1, sorry for the lame name */ -Status XRRSetScreenConfigAndRate (Display *dpy, - XRRScreenConfiguration *config, - Drawable draw, - int size_index, - Rotation rotation, - short rate, - Time timestamp); - - -Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation); - -Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp); - -XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes); - -short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates); - -SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, - Rotation *rotation); - -short XRRConfigCurrentRate (XRRScreenConfiguration *config); - -int XRRRootToScreen(Display *dpy, Window root); - -/* - * returns the screen configuration for the specified screen; does a lazy - * evalution to delay getting the information, and caches the result. - * These routines should be used in preference to XRRGetScreenInfo - * to avoid unneeded round trips to the X server. These are new - * in protocol version 0.1. - */ - - -XRRScreenConfiguration *XRRScreenConfig(Display *dpy, int screen); -XRRScreenConfiguration *XRRConfig(Screen *screen); -void XRRSelectInput(Display *dpy, Window window, int mask); - -/* - * the following are always safe to call, even if RandR is not implemented - * on a screen - */ - - -Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation); -XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes); -short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates); -Time XRRTimes (Display *dpy, int screen, Time *config_timestamp); - - -/* - * intended to take RRScreenChangeNotify, or - * ConfigureNotify (on the root window) - * returns 1 if it is an event type it understands, 0 if not - */ -int XRRUpdateConfiguration(XEvent *event); - -_XFUNCPROTOEND - -#endif /* _XRANDR_H_ */ diff --git a/nx-X11/lib/Xrandr/Xrandr.man b/nx-X11/lib/Xrandr/Xrandr.man deleted file mode 100644 index f61d93044..000000000 --- a/nx-X11/lib/Xrandr/Xrandr.man +++ /dev/null @@ -1,351 +0,0 @@ -.\" -.\" $XFree86: xc/lib/Xrandr/Xrandr.man,v 1.7 2003/08/04 10:32:21 eich Exp $ -.\" $XdotOrg: xc/lib/Xrandr/Xrandr.man,v 1.4 2005/10/13 02:56:42 alanc Exp $ -.\" -.\" Copyright 2002 Hewlett-Packard Company.\" -.\" Permission to use, copy, modify, distribute, and sell this software and its -.\" documentation for any purpose is hereby granted without fee, 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 Hewlett-Packard Company not be used in -.\" advertising or publicity pertaining to distribution of the software without -.\" specific, written prior permission. Hewlett Packard Company makes no -.\" representations about the suitability of this software for any purpose. It -.\" is provided "as is" without express or implied warranty. -.\" -.\" Hewlett-Packard DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -.\" EVENT SHALL KEITH PACKARD 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. -.\" -.de TQ -.br -.ns -.TP \\$1 -.. -.TH XRANDR __libmansuffix__ __vendorversion__ - -.SH NAME - Xrandr \- X Resize, Rotate and Reflection extension. -.SH SYNTAX -\&#include -.nf -.sp -Bool XRRQueryExtension \^(\^Display *\fIdpy\fP, - int *\fIevent_basep\fP, int *\fIerror_basep\fP\^); -.sp -Status XRRQueryVersion \^(\^Display *\fIdpy\fP, - int *\fImajor_versionp\fP, - int *\fIminor_versionp\fP\^); -.sp -XRRScreenConfiguration *XRRGetScreenInfo \^(\^Display *dpy, - Drawable \fIdraw\fP\^); -.sp -void XRRFreeScreenConfigInfo \^(\^ - \fIXRRScreenConfiguration *config\fP\^); -.sp -Status XRRSetScreenConfig \^(\^Display *\fIdpy\fP, - XRRScreenConfiguration *\fIconfig\fP, - Drawable \fIdraw\fP, - int \fIsize_index\fP, - Rotation \fIrotation\fP, - Time \fItimestamp\fP\^); -.sp -Status XRRSetScreenConfigAndRate \^(\^Display *\fIdpy\fP, - XRRScreenConfiguration *\fIconfig\fP, - Drawable \fIdraw\fP, - int \fIsize_index\fP, - Rotation \fIrotation\fP, - short \fIrate\fP, - Time \fItimestamp\fP\^); -.sp -Rotation XRRConfigRotations\^(\^ - XRRScreenConfiguration *\fIconfig\fP, - Rotation *\fIcurrent_rotation\fP\^); -.sp -Time XRRConfigTimes \^(\^ - XRRScreenConfiguration *\fIconfig\fP, - Time *\fIconfig_timestamp\fP\^); -.sp -XRRScreenSize *XRRConfigSizes\^(\^ - XRRScreenConfiguration *\fIconfig\fP, - int *\fInsizes\fP\^); -.sp -short *XRRConfigRates \^(\^ - XRRScreenConfiguration *\fIconfig\fP, - int \fIsize_index\fP, - int *\fInrates\fP\^); -.sp -SizeID XRRConfigCurrentConfiguration \^(\^ - XRRScreenConfiguration *\fIconfig\fP, - Rotation *\fIrotation\fP\^); -.sp -short XRRConfigCurrentRate \^(\^ - XRRScreenConfiguration *\fIconfig\fP\^); -.sp -int XRRRootToScreen\^(\^ - Display *\fIdpy\fP, - Window \fIroot\fP\^); -.sp -XRRScreenConfiguration *XRRScreenConfig\^(\^ - Display *\fIdpy\fP, int \fIscreen\fP\^); -.sp -XRRScreenConfiguration *XRRConfig\^(\^Screen *\fIscreen\fP\^); -.sp -void XRRSelectInput\^(\^Display *\fIdpy\fP, Window \fIwindow\fP, int \fImask\fP\^); -.sp -/\(** - * intended to take RRScreenChangeNotify, or - * ConfigureNotify \^(\^\fIon the root window\fP\^) - * returns 1 if it is an event type it understands, 0 if not - */ -int XRRUpdateConfiguration\^(\^XEvent *\fIevent\fP^); -.sp -/\(** - * the following are always safe to call, even if RandR is - * not implemented on a screen - */ -.br -Rotation XRRRotations\^(\^ - Display *\fIdpy\fP, int \fIscreen\fP, - Rotation *\fIcurrent_rotation\fP\^); -.sp -XRRScreenSize *XRRSizes\^(\^Display *\fIdpy\fP, - int \fIscreen\fP, int *\fInsizes\fP\^); -.sp -short *XRRRates \^(\^Display *\fIdpy\fP, int \fIscreen\fP, - int \fIsize_index\fP, int *\fInrates\fP\^); -.sp -Time XRRTimes \^(\^Display *\fIdpy\fP, int \fIscreen\fP, Time *\fIconfig_timestamp\fP\^); -.fi -.SH ARGUMENTS -.IP \fIdisplay\fP 1i -Specifies the connection to the X server. -.IP \fIscreen\fP 1i -Specifies which screen. -.IP \fIdraw\fP 1i -Specifies the screen. -.IP \fIrotation\fP 1i -Specifies the rotations or reflections possible of the screen. -.IP \fIcurrent_rotation\fP 1i -Specifies the current rotations and reflection of the screen. -.IP \fItimestamp\fP 1i -Specifies the server timestamp. -.IP \fIconfig_timestamp\fP 1i -Specifies the timestamp when the screen was last (re)configured. -.IP \fIconfig\fP 1i -Specifies the screen configuration being used. -.IP \fIsizes\fP 1i -Specifies the array of sizes supported. -.IP \fIrate\fP 1i -Specifies the refresh rate in Hz. - -.SH DATATYPES - -.PP -.B Rotations/Reflections -.PP -Can be any of: -.nf -\&#define RR_Rotate_0 1 -\&#define RR_Rotate_90 2 -\&#define RR_Rotate_180 4 -\&#define RR_Rotate_270 8 - -/\(** new in 1.0 protocol, to allow reflection of screen */ -/\(** reflection is applied after rotation */ - -\&#define RR_Reflect_X 16 -\&#define RR_Reflect_Y 32 - - -typedef struct { - int width, height; - int mwidth, mheight; -} XRRScreenSize; - -typedef struct { - int type; /\(** event base */ - unsigned long serial; /\(** # of last request processed by server */ - Bool send_event; /\(** true if this came from a SendEvent request */ - Display *display; /\(** Display the event was read from */ - Window window; /\(** window which selected for this event */ - Window root; /\(** Root window for changed screen */ - Time timestamp; /\(** when the screen change occurred */ - Time config_timestamp; /\(** when the last configuration change */ - SizeID size_index; - SubpixelOrder subpixel_order; - Rotation rotation; - int width; - int height; - int mwidth; - int mheight; -} XRRScreenChangeNotifyEvent; -.sp -.fi -.B XRRScreenSize -structure contains a possible root size in pixels and in millimeters. -.B XRRScreenChangeNotifyEvent -Is sent to a client that has requested notification whenever the screen -configuration is changed. - -.B XRRScreenConfiguration -This is an opaque data type containing the configuration information -for a screen. - -.B Timestamps -.PP -Time stamps are included and must be used to ensure the client is playing -with a full deck: the screen may change properties -on the fly and this ensures its knowledge of the configuration is up to date. -This is to help issues when screens may become hot-pluggable in the future. - -.SH DESCRIPTION -.B Xrandr -is a simple library designed to interface the X Resize and Rotate -Extension. This allows clients to change the size and rotation of the -root window of a screen, along with the ability to reflect the screen -about either axis (if supported by the implementation). Rotation and -reflection may be implemented by software and may result in slower -performance if rotation and reflection are implemented in this fashion -(as are all implementations as of October 2002). -.PP -The Xrandr library does some minimal caching to avoid roundtrips to -provide clients frequently used information. See "The X Resize and -Rotate Extension" for a detailed description; also note that depth -switching, as described in the document is not implemented, and may -(or may not) ever be implemented, as display memory is growing rapidly, -and toolkits are already beginning to support migration, mitigating the -need for depth switching. If it is implemented in the future, we -expect to do so via an upward compatible extension to the -current library/protocol; functionality described here should continue -to work. -.PP -Rotation and reflection and how they interact can be confusing. In -Randr, the coordinate system is rotated in a counter-clockwise -direction relative to the normal orientation. Reflection is along the -window system coordinate system, not the physical screen X and Y axis, -so that rotation and reflection do not interact. The other way to -consider reflection is to is specified in the "normal" orientation, -before rotation, if you find the other way confusing. -.PP -The -.B XRRScreenChangeNotify -event is sent to clients that ask to be informed whenever the root window -configuration changes. Configuration changes may include resolution, -physical size, subpixel order (see XRender(3)), and rotation. Note -that changes to any or all of these could occur due to external events -(user control in the X server, a different monitor/flat panel display -being hot-plugged) and is not only the result of a protocol/library -request to the X server. -.PP -Additionally, to eliminate a potential race condition, -this event may be generated -immediately upon selecting for notification if the screen has changed -since the client of Xrandr connected to the X server, to enable -reliable screen resolution changing when a user may log in and -change the configuration while one or many clients are starting up. -.PP -.B Xlib notification -.PP -Clients must call back into Xlib using -.B XRRUpdateConfiguration -when screen configuration change notify events are generated -(or root window configuration changes occur, to update Xlib's -view of the resolution, size, rotation, reflection or subpixel order. -Generally, toolkits will perform this operation on behalf of applications; -we did not want to change display structure data behind the back of toolkits, -as in multithreaded clients, various race conditions might occur. -Toolkits should provide clients some mechanism for notification of -screen change, of course. - -.SH FUNCTIONS -There are two classes of interfaces: those which can be safely called -even if RandR is not implemented on a screen (to make common idioms not -dependent on the server having support), and those which will return -errors if the extension is not present. -.PP -.B XRRRotations -returns both the possible set of rotations/reflections supported -(as a bitmask) as the value of the function, along with the current -rotation/reflection of the screen. -.PP -.B XRRSizes -returns the size and a pointer to the current sizes supported by -the specified screen. The first size specified is the default size -of the server. If RandR is not supported, it returns 0 for -the number of sizes. -.PP -.B XRRRates -returns a pointer to a the rates supported by the specified size. -If RandR is not supported, it returns 0 for the number of rates. -.PP -.B XRRTimes -returns the time last reported by the server along with the -timestamp the last configuration changed. -If the configuration has changed since the client last updated -its view of the server time, requests to change the configuration -will fail until the client has an up to date timestamp. -.PP -.B XRRRootToScreen -returns the screen number given a root window (for example, from -an \fBXRRScreenChangeNotifyEvent\fI. -.PP -The rest of the functions will fail if applied to screens not -implementing the RandR extension. -.B XRRSetScreenConfig -sets the screen size and rotation and reflection to the desired -values on the screen specified by \fIdraw\fP, or returns a -.B BadValue -error. -\fIsize_index\fP specifies which size configuration is to be used, -\fIrotation\fP specifies which rotation or reflection is to -be used (or a -.B BadValue -error is returned). -The \fItimestamp\fP is used by the server to make sure the client -has up to date configuration information. Status is returned -to indicate success or failure; a client must refresh its configuration -information if it fails and try the call again (by calling -\fBXRRGetScreenInfo\fP). -.PP -.B XRRSetScreenConfigAndRate -like -.B XRRSetScreenConfig -but also set the refresh rate. If specified rate is not supported a -.B BadValue -error is returned. -.PP -.B XRRConfigRotations, -.B XRRConfigSizes, -.B XRRConfigCurrentConfiguration, -.B XRRConfigTimes, -.B XRRConfigRates, -and -.B XRRConfigCurrentRate -are used to get specific configuration information out of a screen -configuration. -.PP -.B XRRGetScreenInfo -Returns a screen configuration for later use; the information is -private to the library. -Call -.B XRRFreeScreenConfigInfo -to free this information when you are finished with it. -It forces a round trip to the server. - -Other functions include: -.B XRRQueryExtension -which returns the event and error base codes, -.B XRRQueryVersion -, which returns the current version of the extension (this information -is cached by the library). -.SH RESTRICTIONS -.B Xrandr -will remain upward compatible after the current 1.0 release. -.SH AUTHOR -Jim Gettys, and Keith Packard, HP. - diff --git a/nx-X11/lib/Xrandr/Xrandrint.h b/nx-X11/lib/Xrandr/Xrandrint.h deleted file mode 100644 index 78a8fcf11..000000000 --- a/nx-X11/lib/Xrandr/Xrandrint.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $XFree86: xc/lib/Xrandr/Xrandrint.h,v 1.2 2001/06/07 15:33:43 keithp Exp $ - * - * - * Copyright © 2000, Compaq Computer Corporation, - * Copyright © 2002, Hewlett Packard, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising - * or publicity pertaining to distribution of the software without specific, - * written prior permission. HP makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP - * 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. - * - * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. - */ - -#ifndef _XRANDRINT_H_ -#define _XRANDRINT_H_ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include -#include "Xrandr.h" -#include -#include - -extern XExtensionInfo XrandrExtensionInfo; -extern char XrandrExtensionName[]; - -#define RRCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, XRRExtensionName, val) -#define RRSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, XRRExtensionName) - -XExtDisplayInfo *XRRFindDisplay (Display *dpy); - - -/* deliberately opaque internal data structure; can be extended, - but not reordered */ -struct _XRRScreenConfiguration { - Screen *screen; /* the root window in GetScreenInfo */ - XRRScreenSize *sizes; - Rotation rotations; - Rotation current_rotation; - int nsizes; - int current_size; - short current_rate; - Time timestamp; - Time config_timestamp; - int subpixel_order; /* introduced in randr v0.1 */ - short *rates; /* introduced in randr v1.1 */ - int nrates; -}; - -/* - * if a configure notify on the root is recieved, or - * an XRRScreenChangeNotify is recieved, - * XRRUpdateConfiguration should be called to update the X library's - * view of the screen configuration; it will also invalidate the cache - * provided by XRRScreenConfig and XRRConfig, and force a round trip - * when next used. Returns invalid status if not an event type - * the library routine understand. - */ - -/* we cache one screen configuration/screen */ - -typedef struct _XRandRInfo { - XRRScreenConfiguration **config; - int major_version, minor_version; /* major_version = -1 means we don't know */ - Bool has_rates; /* Server supports refresh rates */ -} XRandRInfo; - -#endif /* _XRANDRINT_H_ */ diff --git a/nx-X11/lib/Xrandr/test.c b/nx-X11/lib/Xrandr/test.c deleted file mode 100644 index 01e67eba0..000000000 --- a/nx-X11/lib/Xrandr/test.c +++ /dev/null @@ -1,21 +0,0 @@ -/* $XFree86$ */ - -#include -#include -#include "Xrandr.h" - -main (int argc, char **argv) - -{ - char *display_name = ":0"; - Display *display; - int major, minor, status; - - if ((display = XOpenDisplay (display_name)) == NULL) { - fprintf(stderr, "Can't open display!\n"); - } - status = XRRQueryVersion (display, &major, &minor); - fprintf(stderr, "status = %d, major = %d, minor = %d\n, - status, major, minor"); - -} diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index eb65fba19..9f730cb97 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -427,7 +427,7 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lNX_Xcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ @@ -437,7 +437,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index d0efa71e6..be5dd9032 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -93,7 +93,7 @@ #include #include "Shadow.h" -#include "Xrandr.h" +#include #include "NXlib.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index d0608a900..37296e80f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -77,7 +77,7 @@ is" without express or implied warranty. #include "Shadow.h" #include "Utils.h" -#include "Xrandr.h" +#include #define GC XlibGC #define Font XlibFont diff --git a/nx-libs.spec b/nx-libs.spec index 9e8a16e4e..327e59e24 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -35,6 +35,7 @@ BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xfont) BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xrandr) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -45,6 +46,7 @@ BuildRequires: xorg-x11-libXpm-devel BuildRequires: xorg-x11-libXfont-devel BuildRequires: xorg-x11-libXdmcp-devel BuildRequires: xorg-x11-libXdamage-devel +BuildRequires: xorg-x11-libXrandr-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -56,6 +58,7 @@ BuildRequires: libxml2-devel BuildRequires: libXfont-devel BuildRequires: libXdmcp-devel BuildRequires: libXdamage-devel +BuildRequires: libXrandr-devel %endif # For imake @@ -301,22 +304,6 @@ multi-headed X applications and window managers to use two or more physical displays as one large virtual display. -%package -n libNX_Xrandr2 -Group: System Environment/Libraries -Summary: NX Resize, Rotate and Reflection extension library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xrandr - -%description -n libNX_Xrandr2 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The X Resize, Rotate and Reflect Extension (RandR) allows clients to -dynamically change X screens, so as to resize, to change the -orientation and layout of the root window of a screen. - - %package -n libNX_Xrender-devel Group: Development/Libraries Summary: Development files for the NX Render Extension library @@ -647,7 +634,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig -%post -n libNX_Xrandr2 -p /sbin/ldconfig %post -n libNX_Xrender1 -p /sbin/ldconfig %post -n libNX_Xtst6 -p /sbin/ldconfig %post -n libXcomp3 -p /sbin/ldconfig @@ -660,7 +646,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig -%postun -n libNX_Xrandr2 -p /sbin/ldconfig %postun -n libNX_Xrender1 -p /sbin/ldconfig %postun -n libNX_Xtst6 -p /sbin/ldconfig %postun -n libXcomp3 -p /sbin/ldconfig @@ -762,10 +747,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xinerama.so.1* -%files -n libNX_Xrandr2 -%defattr(-,root,root) -%{_libdir}/libNX_Xrandr.so.2* - %files -n libNX_Xrender-devel %defattr(-,root,root) %{_libdir}/libNX_Xrender.so @@ -833,7 +814,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xcomposite.so %{_libdir}/libNX_Xinerama.so -%{_libdir}/libNX_Xrandr.so %{_libdir}/libNX_Xtst.so %{_includedir}/nx/X11/X10.h %dir %{_includedir}/nx/X11/extensions @@ -842,7 +822,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx/X11/extensions/Xcomposite.h %{_includedir}/nx/X11/extensions/Xevie.h %{_includedir}/nx/X11/extensions/Xinerama.h -%{_includedir}/nx/X11/extensions/Xrandr.h %{_includedir}/nx/X11/extensions/lbxbuf.h %{_includedir}/nx/X11/extensions/lbxbufstr.h %{_includedir}/nx/X11/extensions/lbxdeltastr.h @@ -890,8 +869,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx/X11/extensions/composite.h %{_includedir}/nx/X11/extensions/compositeproto.h %{_includedir}/nx/X11/extensions/panoramiXproto.h -%{_includedir}/nx/X11/extensions/randr.h -%{_includedir}/nx/X11/extensions/randrproto.h %{_includedir}/nx/X11/extensions/recordstr.h %{_includedir}/nx/X11/extensions/render.h %{_includedir}/nx/X11/extensions/renderproto.h diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 1480e5ea8..3e5c33a22 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -148,7 +148,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL) else -EXTRALIBS = -lNX_Xext -lNX_Xtst -lNX_Xrandr -lXdamage +EXTRALIBS = -lNX_Xext -lNX_Xtst -lXrandr -lXdamage all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) -- cgit v1.2.3 From 167d09ed740529bc43c1b32a34e80be12c6eb257 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 2 Jun 2015 21:12:05 +0200 Subject: debian/changelog: sync with master/3.5.0.x branch. --- debian/changelog | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e664e5b0f..0d56a4b96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -157,6 +157,48 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low * debian/control: workaround missing dependencies of nxagent on Ubuntu for now. * debian/libnx-xinerama1.*: fix faulty logic when creating symlinks. + Backported from Arctica GH 3.6.x branch. + * Security fixes: + - X.Org CVE-2014-8100: + v3: port to NXrender.c rather than render.c (Mike DePaulo) + v4: backport v3 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1027-render-check-request-size-before-reading-it-CVE.full.patch + * Security fixes: + - X.Org CVE-2014-8100: + v3: port to NXrender.c rather than render.c (Mike DePaulo) + v4: backport v3 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1028-render-unvalidated-lengths-in-Render-extn.-swap.full.patch + * nxcomp/Misc.cpp: fix build failure introduced in + a27a8aae3ca7a3f70e05152ac3d347942e11159d. + Backported from Arctica GH 3.6.x branch. + Affects: + - 9900-dxpc-license-history.full+lite.patch + * Security fixes: + - X.Org CVE-2013-4396: + v2: Apply to NXdixfonts.c rather than dixfonts.c (Mike DePaulo) + v3: backport v2 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1003-Avoid-use-after-free-in-dix-dixfonts.c-doImageT.full.patch + * Security fixes: + - X.Org CVE-2014-8092: + v3: port to NXdispatch.c rather than dispatch.c (Mike DePaulo) + v4: backport v3 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1019-dix-integer-overflow-in-ProcPutImage-CVE-2014-8.full.patch + * Security fixes: + - X.Org CVE-2015-3418: + v3: port to NXdispatch.c rather than dispatch.c (Mike DePaulo) + v4: backport v3 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1210-CVE-2015-3418-dix-Allow-zero-height-PutImage-re.full.patch + * Security fixes: + - X.Org CVE-2014-8099: + v3: port to NXxvdisp.c rather than xvdisp.c (Mike DePaulo) + v4: backport v3 to nx-libs 3.5.0.x (Mihai Moldovan) + Changes: + + 1026-Xv-unvalidated-lengths-in-XVideo-extension-swap.full.patch [ Bernard Cafarelli ] * nx-X11: link to libdl to fix undefined references to 'dlopen' and 'dlsym'. @@ -175,6 +217,31 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low * nxcompshad: Prevent underlinking by linking to libNX_Xext. Adds: - 0650_nxcompshad_link-to-NX_Xext.full.patch + * Security fixes: + - X.Org CVE-2015-3418: + 1210-CVE-2015-3418-dix-Allow-zero-height-PutImage-re.full.patch + * debian/roll-tarball.sh: + + Make sure *.keyboard, debian/**, nx-libs.spec, .pc/** don't end up + in tarball (special focus on the nx-libs-lite tarball). + + Allow patch files names having a dash next to the four digits (i.e., + 1234-.). + + Support tarring up the HEAD of the current branch. + * debian/COPYING.full+lite: + + Replace content with GPL-2 license text, because that is the overall + (i.e., strictest) license we have to deal with in nx-libs. + * Add 9900-dxpc-license-history.full+lite.patch. Document license history of + DXPC (where nxcomp got forked from). + Backported from Arctica GH 3.6.x branch. + * nxcomp/README.on-retroactive-DXPC-license: Some layout and + interpunctuation fixes. + Backported from Arctica GH 3.6.x branch. + Affects: + - 9900-dxpc-license-history.full+lite.patch + + [ Nito Martinez ] + * nxcomp: fix DEBUG, TEST, DUMP, FLUSH, TOKEN, PING, MIXED et al builds. + Adds: + - 0992_fix-DEBUG-TEST-DUMP-FLUSH-TOKEN-PING-et-al-builds.full+lite.patch -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 -- cgit v1.2.3 From 4674a4ae46aec7c104aed2090e57fd36c2cbbef2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 19 Jun 2015 23:58:49 +0200 Subject: debian/control: Add Breaks:/Replaces: for qvd-libxcomp3 and qvd-nxproxy. --- debian/control | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 485c6fe0e..08e260a8b 100644 --- a/debian/control +++ b/debian/control @@ -1022,6 +1022,8 @@ Description: X2Go agent Package: nxproxy Architecture: any +Breaks: qvd-nxproxy +Replaces: qvd-nxproxy Multi-Arch: foreign Depends: ${shlibs:Depends}, @@ -1094,8 +1096,10 @@ Pre-Depends: Depends: ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxcomp (<= 3.5.1) -Replaces: nxcomp +Breaks: nxcomp (<= 3.5.1), + qvd-libxcomp3, +Replaces: nxcomp, + qvd-libxcomp3, Description: nx-X11 compression library NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when -- cgit v1.2.3 From 701471e8e464558a05ff99eeeeb7b886c1a7cefa Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 28 May 2015 13:29:27 +0200 Subject: debian/roll-tarball.sh: Allow patch files names having a dash next to the four digits (i.e., 1234-.). --- debian/roll-tarballs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 954986b5f..a060212f0 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -81,7 +81,7 @@ mkdir -p "doc/applied-patches" # prepare patches for lite and full tarball if [ "x$MODE" = "xfull" ]; then - cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file + cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.(full|full\+lite)\.patch)" | while read file do cp -v "debian/patches/$file" "doc/applied-patches/" echo "${file##*/}" >> "doc/applied-patches/series" @@ -90,7 +90,7 @@ else rm -Rf "nxcompshad"* rm -Rf "nxcompext"* rm -Rf "nx-X11"* - cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file + cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file do cp -v "debian/patches/$file" "doc/applied-patches/" echo "${file##*/}" >> "doc/applied-patches/series" -- cgit v1.2.3 From 895ee3b3b1f199dae2ed4da9c393d1ba575820a0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 28 May 2015 13:33:43 +0200 Subject: debian/roll-tarball.sh: Support tarring up the HEAD of the current branch. --- debian/roll-tarballs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index a060212f0..ff777bd37 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -52,13 +52,13 @@ else fi if [ x"$RELEASE" == "xHEAD" ]; then - CHECKOUT="HEAD" + CHECKOUT=refs/heads/$(git rev-parse --abbrev-ref HEAD) fi if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then echo " '${RELEASE}' is not a valid release number because there is no git tag named ${CHECKOUT}." echo " Please specify one of the following releases:" - echo "HEAD" + echo "HEAD (on branch `git rev-parse --abbrev-ref HEAD`)" git tag -l | grep "^redist" | cut -f2 -d"/" | sort -u exit 1 fi -- cgit v1.2.3 From 47afc48ea312b3ab7a5138c15271942103ec3fee Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 28 May 2015 14:33:08 +0200 Subject: debian/roll-tarball.sh: Prevent several files/folders from ending up in nx-libs-lite tarball. * bin/{nxagent,nxauth,x2goagent} * etc/ * doc/nx-X11_vs_XOrg69_patches * README.keystrokes" * nx-libs.spec --- debian/roll-tarballs.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index ff777bd37..3e41092f8 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -87,9 +87,13 @@ if [ "x$MODE" = "xfull" ]; then echo "${file##*/}" >> "doc/applied-patches/series" done else + rm -f "bin/"{nxagent,nxauth,x2goagent} rm -Rf "nxcompshad"* rm -Rf "nxcompext"* rm -Rf "nx-X11"* + rm -Rf "etc"* + rm -Rf "doc/nx-X11_vs_XOrg69_patches"* + rm -f "README.keystrokes" cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file do cp -v "debian/patches/$file" "doc/applied-patches/" @@ -104,15 +108,16 @@ else echo "No patches applied at all. Very old release?" fi +# remove folders that we do not want to roll into the tarball +rm -Rf ".pc/" +rm -Rf "debian/" +rm -Rf "nx-libs.spec" + # very old release did not add any README for f in $(ls README* 2>/dev/null); do mv -v "$f" "doc/"; done -# remove folders that we do not want to roll into the tarball -rm -Rf ".pc/" -rm -Rf "debian/" - # remove files, that we do not want in the tarballs (build cruft) rm -Rf nx*/configure nx*/autom4te.cache* -- cgit v1.2.3 From 7e1effbe782644ddf1ec30354224d56e7f3f24ff Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 28 May 2015 14:49:40 +0200 Subject: debian/roll-tarball.sh: Rename README.md to README.NX-Development before moving it into doc/ folder. --- debian/roll-tarballs.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 3e41092f8..07e052268 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -113,6 +113,9 @@ rm -Rf ".pc/" rm -Rf "debian/" rm -Rf "nx-libs.spec" +# some file renamings +mv README.md README.NX-Development + # very old release did not add any README for f in $(ls README* 2>/dev/null); do mv -v "$f" "doc/"; -- cgit v1.2.3 From 438f3df14cf12a423aae3ec1a17c1067191b8686 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 28 May 2015 14:50:05 +0200 Subject: debian/roll-tarball.sh: Auto-generate ChangeLog from Git history. --- debian/roll-tarballs.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 07e052268..ecaeac2e0 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -72,6 +72,7 @@ trap "rm -f \"${MANIFEST}\"; rm -rf \"${TEMP_DIR}\"" 0 # create local copy of Git project at temp location git archive --format=tar "${CHECKOUT}" --prefix="${PROJECT}-${RELEASE}/" | ( cd "$TEMP_DIR"; tar xf - ) +git --no-pager log --after "1972-01-01" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > "${TEMP_DIR}/${PROJECT}-${RELEASE}/ChangeLog" echo "Created tarball for $CHECKOUT" -- cgit v1.2.3 From fa0286ed673c11777831de1f2297cef805954272 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 29 Jun 2015 03:40:58 +0200 Subject: debian/changelog: sync with master/3.5.0.x branch. --- debian/changelog | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0d56a4b96..17820e3d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -243,6 +243,37 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low Adds: - 0992_fix-DEBUG-TEST-DUMP-FLUSH-TOKEN-PING-et-al-builds.full+lite.patch + [ Vadim Troshchinskiy ] + * nxcomp: fix "negotiation in stage 10" error. + v2: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch + + [ Emanuele Giaquinta ] + * nx-X11: Fix alpha premultiplication in XRenderParseColor. + Fixes: #893. + v2: backport to nx-libs 3.6.x (Mike Gabriel) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 0040_nx-X11_Fix-alpha-premultiplication-in-XRenderPa.full.patch + + [ Michael DePaulo ] + * {nx-X11,nxproxy}: correct manpages: --help -> -help + xorg-server does not follow the convention of using 2 dashes. + Note that --help does produce the help output. However, it + produces this additional output after it: + Error: Aborting session with 'Unrecognized option: --help'. + Session: Aborting session at 'Sun Jun 28 01:35:35 2015'. + Session: Session aborted at 'Sun Jun 28 01:35:35 2015'. + It also causes a return code of 1 rather than 0. + Therefore, we should instruct users to call -help instead. + + v2: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Affects: + - 0009_nxagent_add-man-page.full.patch + - 0009_nxproxy_add-man-page.full+lite.patch + - 0209_x2goagent_add-man-page.full.patch + -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low -- cgit v1.2.3 From f4c07c07760c33bf7bc908e2d45aee4c4f73f088 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sat, 4 Jul 2015 06:46:29 +0200 Subject: debian/changelog: sync with master/3.5.0.x branch. --- debian/changelog | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 17820e3d9..2d977e181 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,13 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium -- Mike Gabriel Sat, 14 Feb 2015 14:27:25 +0100 -nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low +nx-libs (2:3.5.0.33-0x2go1) UNRELEASED; urgency=low + + * Continue development + + -- X2Go Release Manager Sat, 04 Jul 2015 06:29:19 +0200 + +nx-libs (2:3.5.0.32-0x2go1) unstable; urgency=low [ Mihai Moldovan ] * Only use the first three numbers in the full version for current_version @@ -274,7 +280,76 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low - 0009_nxproxy_add-man-page.full+lite.patch - 0209_x2goagent_add-man-page.full.patch - -- X2Go Release Manager Tue, 17 Mar 2015 19:19:32 +0100 + [ Ulrich Sibiller ] + * nx-X11: Bug 51375: Xorg doesn't set status for RRGetOutputInfo + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1250_nx-X11_Bug-51375-Xorg-doesn_t-set-status-for-RR.full.patch + * nx-X11: Drop a reference to user mode after create + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1251_nx-X11_Drop-a-reference-to-user-mode-after-crea.full.patch + * nx-X11: Free randr crtc and output pointer arrays + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1252_nx-X11_Free-randr-crtc-and-output-pointer-array.full.patch + * nx-X11: randr: check for virtual size limits before set crtc + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch + * nx-X11: randr: fix server crash in RRGetScreenInfo + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch + * nx-X11: RRModeCreate: plug memory leak of newModes if AddResource fails + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch + * nx-X11: ProcRRGetScreenInfo: swap configTimestamp as well + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1256_nx-X11_ProcRRGetScreenInfo-swap-configTimestamp.full.patch + * nx-X11: randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1257_nx-X11_randr-Fix-REQUEST-vs-REQUEST_SIZE_MATCH-.full.patch + * nx-X11: randr: Clean up compiler warnings about unused and shadowing + variables + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1258_nx-X11_randr-Clean-up-compiler-warnings-about-u.full.patch + * nx-X11: Make RANDR 'set' timestamps follow client specified time. Bug 21987. + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1259_nx-X11_Make-RANDR-_set_-timestamps-follow-clien.full.patch + * nx-X11: xserver: Avoid sending uninitialized padding data over the network + Backported from Arctica GH 3.6.x branch. + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + Adds: + - 1260_nx-X11_xserver-Avoid-sending-uninitialized-padd.full.patch + + -- X2Go Release Manager Sat, 04 Jul 2015 04:44:00 +0200 nx-libs (2:3.5.0.31-0x2go1) unstable; urgency=low -- cgit v1.2.3 From 931050cbe3ab6a880bef04aaba362fdf7155136e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 14 Jul 2015 14:46:42 +0200 Subject: debian/libxcomp{,ext,shad}-dev.install.in: Install nxcomp{,ext,shad}.pc file into the corresponding development packages. --- debian/libxcomp-dev.install.in | 1 + debian/libxcompext-dev.install.in | 1 + debian/libxcompshad-dev.install.in | 1 + 3 files changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/libxcomp-dev.install.in b/debian/libxcomp-dev.install.in index 7b7bbe591..f0faa49e3 100644 --- a/debian/libxcomp-dev.install.in +++ b/debian/libxcomp-dev.install.in @@ -7,3 +7,4 @@ usr/include/*/nx/NXproto.h usr/include/*/nx/NXrender.h usr/include/*/nx/NXvars.h usr/include/*/nx/MD5.h +usr/lib/*/pkgconfig/nxcomp.pc \ No newline at end of file diff --git a/debian/libxcompext-dev.install.in b/debian/libxcompext-dev.install.in index 8be19251e..a31961b99 100644 --- a/debian/libxcompext-dev.install.in +++ b/debian/libxcompext-dev.install.in @@ -1,3 +1,4 @@ usr/lib/*/libXcompext.so usr/include/*/nx/NXlib.h usr/include/*/nx/NXlibint.h +usr/lib/*/pkgconfig/nxcompext.pc \ No newline at end of file diff --git a/debian/libxcompshad-dev.install.in b/debian/libxcompshad-dev.install.in index fe11227df..31cc685d2 100644 --- a/debian/libxcompshad-dev.install.in +++ b/debian/libxcompshad-dev.install.in @@ -10,3 +10,4 @@ usr/include/*/nx/Shadow.h usr/include/*/nx/Updater.h usr/include/*/nx/Win.h usr/include/*/nx/X11.h +usr/lib/*/pkgconfig/nxcompshad.pc -- cgit v1.2.3 From c2761fb7c7dc497e48ba51b0943c7c369efef5e7 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 14 Jul 2015 20:39:58 +0200 Subject: roll-tarball.sh: Make sure symlinked files are included in tarballs. As the system a tarball gets extracted on may potentially be unable to handle symlinks, we ship symlinks as files in the rolled tarball. By transforming symlinks into real files, we also assure that all VERSION files/symlinks get shipped in the tarballs. Fixes ArcticaProject/nx-libs#27 --- debian/roll-tarballs.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index ecaeac2e0..2fba5a042 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -78,6 +78,20 @@ echo "Created tarball for $CHECKOUT" cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/" +set -x +# Replace symlinks by copies of the linked target files +# Note: We don't have symlinked directories!!! +find . -type l | while read link; do + TARGET=$(readlink "$link") + cd $(dirname $link) + if [ -f "$TARGET" ]; then + rm -f $(basename $link) + cp ${TARGET} $(basename $link) + fi + cd - 1>/dev/null +done +set +x + mkdir -p "doc/applied-patches" # prepare patches for lite and full tarball @@ -95,6 +109,7 @@ else rm -Rf "etc"* rm -Rf "doc/nx-X11_vs_XOrg69_patches"* rm -f "README.keystrokes" + rm -f "VERSION.x2goagent" cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file do cp -v "debian/patches/$file" "doc/applied-patches/" @@ -114,9 +129,6 @@ rm -Rf ".pc/" rm -Rf "debian/" rm -Rf "nx-libs.spec" -# some file renamings -mv README.md README.NX-Development - # very old release did not add any README for f in $(ls README* 2>/dev/null); do mv -v "$f" "doc/"; -- cgit v1.2.3 From 01ad7dad439f446c559e6da8411962c26d99e16a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 15 Jul 2015 09:30:29 +0200 Subject: roll-tarball.sh: more quotes (follow-up for previous commit), drop debug code --- debian/roll-tarballs.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 2fba5a042..0f9568aad 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -78,19 +78,17 @@ echo "Created tarball for $CHECKOUT" cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/" -set -x # Replace symlinks by copies of the linked target files # Note: We don't have symlinked directories!!! find . -type l | while read link; do TARGET=$(readlink "$link") - cd $(dirname $link) + cd $(dirname "$link") if [ -f "$TARGET" ]; then - rm -f $(basename $link) - cp ${TARGET} $(basename $link) + rm -f $(basename "$link") + cp "${TARGET}" $(basename "$link") fi cd - 1>/dev/null done -set +x mkdir -p "doc/applied-patches" -- cgit v1.2.3 From 0606ec8149a087ebe5681012670f265c2f7e9adb Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 17 Jul 2015 17:48:44 +0200 Subject: debian/roll-tarballs.sh: more quotes, more curly braces, replace cd with pushd and pop. --- debian/roll-tarballs.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 0f9568aad..52c2090f0 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -52,7 +52,7 @@ else fi if [ x"$RELEASE" == "xHEAD" ]; then - CHECKOUT=refs/heads/$(git rev-parse --abbrev-ref HEAD) + CHECKOUT="refs/heads/$(git rev-parse --abbrev-ref HEAD)" fi if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then @@ -80,14 +80,14 @@ cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/" # Replace symlinks by copies of the linked target files # Note: We don't have symlinked directories!!! -find . -type l | while read link; do - TARGET=$(readlink "$link") - cd $(dirname "$link") - if [ -f "$TARGET" ]; then - rm -f $(basename "$link") - cp "${TARGET}" $(basename "$link") +find . -type "l" | while read link; do + TARGET="$(readlink "${link}")" + pushd "$(dirname "${link}")" >/dev/null + if [ -f "${TARGET}" ]; then + rm -f "$(basename "${link}")" + cp "${TARGET}" "$(basename "${link}")" fi - cd - 1>/dev/null + popd >/dev/null done mkdir -p "doc/applied-patches" -- cgit v1.2.3 From 813d0cf137aa34d159342de5c6c3055c8d1fc984 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 17 Jul 2015 17:57:24 +0200 Subject: debian/control: add xkb-data to nxagent's Recommends. Cherry-picked from 3.5.0.x branch. --- debian/changelog | 4 +++- debian/control | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2d977e181..2be4d2d22 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,7 +12,9 @@ nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium nx-libs (2:3.5.0.33-0x2go1) UNRELEASED; urgency=low - * Continue development + [ Mihai Moldovan ] + * debian/control: + - Add xkb-data to nxagent's Recommends. -- X2Go Release Manager Sat, 04 Jul 2015 06:29:19 +0200 diff --git a/debian/control b/debian/control index 08e260a8b..8cbb4bc54 100644 --- a/debian/control +++ b/debian/control @@ -957,6 +957,7 @@ Depends: ${misc:Depends}, Recommends: xfonts-base, + xkb-data, Description: NX agent NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when -- cgit v1.2.3 From edeb4e196d3ac084a1429b27b6ef87403073ee8c Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 17 Jul 2015 18:13:00 +0200 Subject: nx-libs.spec: add xkeyboard-config to nxagent's Requires. Should be a weak dependency, but RPM doesn't support that too well yet. Cherry-picked from 3.5.0.x branch. --- debian/changelog | 3 +++ nx-libs.spec | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2be4d2d22..0a48e8635 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ nx-libs (2:3.5.0.33-0x2go1) UNRELEASED; urgency=low [ Mihai Moldovan ] * debian/control: - Add xkb-data to nxagent's Recommends. + * nx-libs.spec: + - Add xkeyboard-config to nxagent's Requires. Should be a weak dependency, + but RPM doesn't support that too well yet. -- X2Go Release Manager Sat, 04 Jul 2015 06:29:19 +0200 diff --git a/nx-libs.spec b/nx-libs.spec index f3bda3f80..01d5d9464 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -491,6 +491,10 @@ Provides: nx%{?_isa} = %{version}-%{release} Requires: xorg-x11-fonts-core %endif +# Should be a weak dependency, because this package +# works without the dependency. +Requires: xkeyboard-config + %description -n nxagent NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X -- cgit v1.2.3 From 4db753eb79b86f1bd864654f51da34c38db222cc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 22 Sep 2015 15:02:22 +0200 Subject: Revert "debian/libnx-xinerama1.*: fix faulty logic when creating symlinks." This reverts commit b77b26f4acc3932c29a1e0788e22d24e29e091d5. --- debian/libnx-xinerama1.postinst.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in index 6d9ba36ef..c3706038c 100755 --- a/debian/libnx-xinerama1.postinst.in +++ b/debian/libnx-xinerama1.postinst.in @@ -28,13 +28,13 @@ case "$1" in # Already existent files are not removed. # Users will need to explicitly remove them and (re-) configure this package. - if ! test -e $libdir/libX11.so.6; then + if test -e $libdir/libX11.so.6; then ln -s $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 fi - if ! test -e $libdir/libXext.so.6; then + if test -e $libdir/libXext.so.6; then ln -s $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 fi - if ! test -e $libdir/libNX_Xinerama.so.1; then + if test -e $libdir/libNX_Xinerama.so.1; then ln -s $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 fi ;; -- cgit v1.2.3 From da6b89f7e89fcb0858e6e32188a2f72d1c75366d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 23 Sep 2015 12:15:06 +0200 Subject: debian/libnx-xinerama1.postinst.in: Enforce symlink creation for Xinerama support. --- debian/libnx-xinerama1.postinst.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in index c3706038c..38cc415f4 100755 --- a/debian/libnx-xinerama1.postinst.in +++ b/debian/libnx-xinerama1.postinst.in @@ -29,13 +29,13 @@ case "$1" in # Already existent files are not removed. # Users will need to explicitly remove them and (re-) configure this package. if test -e $libdir/libX11.so.6; then - ln -s $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 + ln -sf $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 fi if test -e $libdir/libXext.so.6; then - ln -s $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + ln -sf $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 fi if test -e $libdir/libNX_Xinerama.so.1; then - ln -s $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 + ln -sf $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 fi ;; -- cgit v1.2.3 From 0382b4018d96cfcc0c406231d294d9a6bff76902 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 28 Sep 2015 08:10:59 +0200 Subject: debian/changelog: Drop unnecessary "~build1" from version string --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0a48e8635..802ba1b33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nx-libs (2:3.5.99.0-0~build1) UNRELEASED; urgency=medium +nx-libs (2:3.5.99.0-0) UNRELEASED; urgency=medium * Version bump, continuing NX 3.x development.. Targeting NX 3.6.x.y some time. -- cgit v1.2.3 From 45983d13072020f5d210b9c613f0db5636dad6a3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 28 Sep 2015 08:15:52 +0200 Subject: Xinerama symlinking: Attach Xinerama symlinking to nxagent bin:package (and not libnx-xinerama1). --- debian/libnx-xinerama1.postinst.in | 56 -------------------------------------- debian/libnx-xinerama1.prerm | 51 ---------------------------------- debian/nxagent.postinst.in | 56 ++++++++++++++++++++++++++++++++++++++ debian/nxagent.prerm | 51 ++++++++++++++++++++++++++++++++++ debian/rules | 6 ++-- nx-libs.spec | 8 +++--- 6 files changed, 114 insertions(+), 114 deletions(-) delete mode 100755 debian/libnx-xinerama1.postinst.in delete mode 100755 debian/libnx-xinerama1.prerm create mode 100755 debian/nxagent.postinst.in create mode 100755 debian/nxagent.prerm (limited to 'debian') diff --git a/debian/libnx-xinerama1.postinst.in b/debian/libnx-xinerama1.postinst.in deleted file mode 100755 index 38cc415f4..000000000 --- a/debian/libnx-xinerama1.postinst.in +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# postinst script for libnx-x11 -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ### FIXME: this is a work-around while we have not implemented - ### multiarch support into the Debian source package of - ### nx-libs. - - libdir=/usr/lib/#DEB_BUILD_MULTIARCH# - - # Already existent files are not removed. - # Users will need to explicitly remove them and (re-) configure this package. - if test -e $libdir/libX11.so.6; then - ln -sf $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - fi - if test -e $libdir/libXext.so.6; then - ln -sf $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 - fi - if test -e $libdir/libNX_Xinerama.so.1; then - ln -sf $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 - fi - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/libnx-xinerama1.prerm b/debian/libnx-xinerama1.prerm deleted file mode 100755 index 8cca06c85..000000000 --- a/debian/libnx-xinerama1.prerm +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# prerm script for libnx-xinerama1 -# -# see: dh_installdeb(1) -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -set -e - - - -case "$1" in - remove) - if test -d /usr/lib/nx/X11/Xinerama; then - if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - fi - - if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 - fi - - - if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then - rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1 - fi - fi - ;; - deconfigure|upgrade|failed-upgrade) - : - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/nxagent.postinst.in b/debian/nxagent.postinst.in new file mode 100755 index 000000000..4ad52a525 --- /dev/null +++ b/debian/nxagent.postinst.in @@ -0,0 +1,56 @@ +#!/bin/sh +# postinst script for nxagent +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ### FIXME: this is a work-around while we have not implemented + ### multiarch support into the Debian source package of + ### nx-libs. + + libdir=/usr/lib/#DEB_BUILD_MULTIARCH# + + # Already existent files are not removed. + # Users will need to explicitly remove them and (re-) configure this package. + if test -e $libdir/libX11.so.6; then + ln -sf $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 + fi + if test -e $libdir/libXext.so.6; then + ln -sf $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + fi + if test -e $libdir/libNX_Xinerama.so.1; then + ln -sf $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/nxagent.prerm b/debian/nxagent.prerm new file mode 100755 index 000000000..edc882a46 --- /dev/null +++ b/debian/nxagent.prerm @@ -0,0 +1,51 @@ +#!/bin/sh +# prerm script for nxagent +# +# see: dh_installdeb(1) +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +set -e + + + +case "$1" in + remove) + if test -d /usr/lib/nx/X11/Xinerama; then + if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then + rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 + fi + + if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then + rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 + fi + + + if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then + rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1 + fi + fi + ;; + deconfigure|upgrade|failed-upgrade) + : + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 682c5dab8..b3060b36f 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,7 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -f debian/libnx-xinerama1.postinst + rm -f debian/nxagent.postinst rm -fR .preserve/ dh_clean @@ -72,8 +72,8 @@ override_dh_auto_install: override_dh_auto_build: - # let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable - sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst + # let's prep the nxagent.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable + sed debian/nxagent.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/nxagent.postinst LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS="$(LDFLAGS)" SHLIBDIR="$(LIBDIR)" PREFIX=/usr dh_auto_build --parallel diff --git a/nx-libs.spec b/nx-libs.spec index 01d5d9464..6eed3691a 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -664,10 +664,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %dir %{_libdir}/nx/X11 %dir %{_datadir}/nx %{_datadir}/nx/SecurityPolicy -%dir %{_libdir}/nx/X11/Xinerama/ -%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6 -%{_libdir}/nx/X11/Xinerama/libNX_Xext.so.6 -%{_libdir}/nx/X11/Xinerama/libXinerama.so.1* %files -n libNX_X11-6 %defattr(-,root,root) @@ -912,6 +908,10 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_datadir}/pixmaps/nxagent.xpm %{_datadir}/nx/rgb %{_datadir}/man/man1/nxagent.1* +%dir %{_libdir}/nx/X11/Xinerama/ +%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6 +%{_libdir}/nx/X11/Xinerama/libNX_Xext.so.6 +%{_libdir}/nx/X11/Xinerama/libXinerama.so.1* %files -n nxauth %defattr(-,root,root) -- cgit v1.2.3 From 81d92cd0fa293e44bbb063d373d9289ddc358c99 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 28 Sep 2015 09:57:12 +0200 Subject: Xinerama symlinking: Create / remove folder containing Xinerama sylinks on installation/upgrade and removal. --- debian/nxagent.postinst.in | 1 + debian/nxagent.prerm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/nxagent.postinst.in b/debian/nxagent.postinst.in index 4ad52a525..95879b943 100755 --- a/debian/nxagent.postinst.in +++ b/debian/nxagent.postinst.in @@ -26,6 +26,7 @@ case "$1" in libdir=/usr/lib/#DEB_BUILD_MULTIARCH# + mkdir -p /usr/lib/nx/X11/Xinerama/ # Already existent files are not removed. # Users will need to explicitly remove them and (re-) configure this package. if test -e $libdir/libX11.so.6; then diff --git a/debian/nxagent.prerm b/debian/nxagent.prerm index edc882a46..019284a16 100755 --- a/debian/nxagent.prerm +++ b/debian/nxagent.prerm @@ -28,10 +28,12 @@ case "$1" in rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 fi - if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1 fi + + rmdir --ignore-fail-on-non-empty /usr/lib/nx/X11/Xinerama + fi ;; deconfigure|upgrade|failed-upgrade) -- cgit v1.2.3 From 433d8186588698ce6a435fbff5e9d40a37b78be9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 8 Jul 2015 16:16:40 +0200 Subject: Clear header file namespace separation ( vs. ). In the process of building nxagent against more and more system-wide installed X.org libraries, we come to the limit of including structs from this (bundled nx-X11) and that (system-wide X.Org) library. This commit introduces a clear namespace separation of headers provided by nx-X11 and headers provided by X.Org. This approach is only temporary as we want to drop all nx-X11 bundled libraries from nx-libs. However, for a while we need to make this separation clear and also ship some reduced fake X.Org headers that avoid pulling in libX* and libNX_X* symbols at the same time. This patch has been tested on Debian jessie and unstable and requires no overall testing on various distros and distro versions, as we finally will drop all libNX_X* libraries and build against X.org's client libs. For now, this hack eases our development / cleanup process. --- Makefile | 4 +- debian/libnx-x11-dev.install.in | 28 +-- debian/libnx-xau-dev.install.in | 2 +- debian/libnx-xcomposite-dev.install.in | 2 +- debian/libnx-xext-dev.install.in | 66 +++--- debian/libnx-xfixes-dev.install.in | 2 +- debian/libnx-xinerama-dev.install.in | 4 +- debian/libnx-xrender-dev.install.in | 2 +- debian/libnx-xtst-dev.install.in | 2 +- debian/nx-x11proto-composite-dev.install.in | 4 +- debian/nx-x11proto-core-dev.install.in | 46 ++-- debian/nx-x11proto-render-dev.install.in | 4 +- debian/nx-x11proto-xext-dev.install.in | 8 +- debian/nx-x11proto-xfixes-dev.install.in | 4 +- debian/nx-x11proto-xinerama-dev.install.in | 2 +- debian/rules | 44 ++-- nx-X11/config/cf/X11.tmpl | 2 +- nx-X11/include/GL/glx.h | 4 +- nx-X11/include/GL/glxint.h | 4 +- nx-X11/include/Imakefile | 4 +- nx-X11/include/XWDFile.h | 2 +- nx-X11/include/Xdefs.h | 2 +- nx-X11/include/Xfuncs.h | 2 +- nx-X11/include/Xos.h | 6 +- nx-X11/include/Xos_r.h | 14 +- nx-X11/include/Xpoll.h.in | 6 +- nx-X11/include/Xproto.h | 4 +- nx-X11/include/Xprotostr.h | 2 +- nx-X11/include/Xthreads.h | 2 +- nx-X11/include/extensions/Imakefile | 4 +- nx-X11/include/extensions/MITMisc.h | 2 +- nx-X11/include/extensions/XEVI.h | 2 +- nx-X11/include/extensions/XEVIstr.h | 2 +- nx-X11/include/extensions/XInput.h | 4 +- nx-X11/include/extensions/XIproto.h | 4 +- nx-X11/include/extensions/XKBgeom.h | 2 +- nx-X11/include/extensions/XKBproto.h | 4 +- nx-X11/include/extensions/XKBsrv.h | 10 +- nx-X11/include/extensions/XKBstr.h | 2 +- nx-X11/include/extensions/XLbx.h | 6 +- nx-X11/include/extensions/XShm.h | 2 +- nx-X11/include/extensions/XTest.h | 4 +- nx-X11/include/extensions/Xag.h | 2 +- nx-X11/include/extensions/Xagsrv.h | 2 +- nx-X11/include/extensions/Xagstr.h | 2 +- nx-X11/include/extensions/Xcup.h | 2 +- nx-X11/include/extensions/Xcupstr.h | 2 +- nx-X11/include/extensions/Xdbe.h | 4 +- nx-X11/include/extensions/Xevie.h | 2 +- nx-X11/include/extensions/Xext.h | 2 +- nx-X11/include/extensions/Xinerama.h | 2 +- nx-X11/include/extensions/Xv.h | 2 +- nx-X11/include/extensions/XvMC.h | 4 +- nx-X11/include/extensions/XvMClib.h | 6 +- nx-X11/include/extensions/Xvlib.h | 4 +- nx-X11/include/extensions/Xvproto.h | 2 +- nx-X11/include/extensions/composite.h | 2 +- nx-X11/include/extensions/compositeproto.h | 4 +- nx-X11/include/extensions/dpms.h | 4 +- nx-X11/include/extensions/extutil.h | 2 +- nx-X11/include/extensions/fontcache.h | 2 +- nx-X11/include/extensions/fontcacheP.h | 2 +- nx-X11/include/extensions/fontcachstr.h | 2 +- nx-X11/include/extensions/lbxbuf.h | 2 +- nx-X11/include/extensions/lbxbufstr.h | 2 +- nx-X11/include/extensions/lbximage.h | 2 +- nx-X11/include/extensions/lbxstr.h | 2 +- nx-X11/include/extensions/multibuf.h | 2 +- nx-X11/include/extensions/recordstr.h | 2 +- nx-X11/include/extensions/renderproto.h | 4 +- nx-X11/include/extensions/saverproto.h | 2 +- nx-X11/include/extensions/scrnsaver.h | 6 +- nx-X11/include/extensions/security.h | 2 +- nx-X11/include/extensions/securstr.h | 2 +- nx-X11/include/extensions/shape.h | 4 +- nx-X11/include/extensions/sync.h | 2 +- nx-X11/include/extensions/vldXvMC.h | 6 +- nx-X11/include/extensions/xf86bigfont.h | 2 +- nx-X11/include/extensions/xf86bigfstr.h | 2 +- nx-X11/include/extensions/xf86dga.h | 4 +- nx-X11/include/extensions/xf86dga1.h | 2 +- nx-X11/include/extensions/xf86dgastr.h | 2 +- nx-X11/include/extensions/xf86misc.h | 2 +- nx-X11/include/extensions/xf86mscstr.h | 2 +- nx-X11/include/extensions/xf86vmode.h | 4 +- nx-X11/include/extensions/xf86vmstr.h | 2 +- nx-X11/include/extensions/xfixesproto.h | 6 +- nx-X11/include/extensions/xtrapddmi.h | 4 +- nx-X11/include/extensions/xtrapdi.h | 8 +- nx-X11/include/extensions/xtrapemacros.h | 2 +- nx-X11/include/extensions/xtraplib.h | 8 +- nx-X11/include/keysym.h | 2 +- nx-X11/lib/X11/ClDisplay.c | 2 +- nx-X11/lib/X11/ConnDis.c | 8 +- nx-X11/lib/X11/ErrDes.c | 2 +- nx-X11/lib/X11/FSWrap.c | 2 +- nx-X11/lib/X11/FetchName.c | 6 +- nx-X11/lib/X11/Font.c | 2 +- nx-X11/lib/X11/GetDflt.c | 8 +- nx-X11/lib/X11/GetHints.c | 8 +- nx-X11/lib/X11/GetImage.c | 2 +- nx-X11/lib/X11/GetNrmHint.c | 6 +- nx-X11/lib/X11/GetRGBCMap.c | 6 +- nx-X11/lib/X11/GetStCmap.c | 6 +- nx-X11/lib/X11/GetTxtProp.c | 8 +- nx-X11/lib/X11/GetWMCMapW.c | 2 +- nx-X11/lib/X11/GetWMProto.c | 2 +- nx-X11/lib/X11/HVC.c | 2 +- nx-X11/lib/X11/Iconify.c | 8 +- nx-X11/lib/X11/ImUtil.c | 4 +- nx-X11/lib/X11/Imakefile | 2 +- nx-X11/lib/X11/InitExt.c | 4 +- nx-X11/lib/X11/KeyBind.c | 6 +- nx-X11/lib/X11/KeysymStr.c | 4 +- nx-X11/lib/X11/LRGB.c | 4 +- nx-X11/lib/X11/Lab.c | 2 +- nx-X11/lib/X11/Luv.c | 2 +- nx-X11/lib/X11/OpenDis.c | 8 +- nx-X11/lib/X11/ParseCmd.c | 2 +- nx-X11/lib/X11/PolyReg.c | 2 +- nx-X11/lib/X11/Quarks.c | 2 +- nx-X11/lib/X11/RdBitF.c | 2 +- nx-X11/lib/X11/Region.c | 2 +- nx-X11/lib/X11/ScrResStr.c | 2 +- nx-X11/lib/X11/SetHints.c | 8 +- nx-X11/lib/X11/SetLocale.c | 4 +- nx-X11/lib/X11/SetNrmHint.c | 8 +- nx-X11/lib/X11/SetRGBCMap.c | 6 +- nx-X11/lib/X11/SetStCmap.c | 6 +- nx-X11/lib/X11/SetTxtProp.c | 8 +- nx-X11/lib/X11/SetWMCMapW.c | 2 +- nx-X11/lib/X11/SetWMProto.c | 2 +- nx-X11/lib/X11/StBytes.c | 4 +- nx-X11/lib/X11/StName.c | 4 +- nx-X11/lib/X11/StrKeysym.c | 4 +- nx-X11/lib/X11/StrToText.c | 6 +- nx-X11/lib/X11/TextToStr.c | 6 +- nx-X11/lib/X11/WMProps.c | 10 +- nx-X11/lib/X11/Withdraw.c | 8 +- nx-X11/lib/X11/WrBitF.c | 2 +- nx-X11/lib/X11/XDefaultOMIF.c | 4 +- nx-X11/lib/X11/XKB.c | 2 +- nx-X11/lib/X11/XKBAlloc.c | 12 +- nx-X11/lib/X11/XKBBell.c | 2 +- nx-X11/lib/X11/XKBBind.c | 8 +- nx-X11/lib/X11/XKBCompat.c | 2 +- nx-X11/lib/X11/XKBCtrls.c | 2 +- nx-X11/lib/X11/XKBCvt.c | 16 +- nx-X11/lib/X11/XKBExtDev.c | 4 +- nx-X11/lib/X11/XKBGAlloc.c | 12 +- nx-X11/lib/X11/XKBGeom.c | 4 +- nx-X11/lib/X11/XKBGetByName.c | 2 +- nx-X11/lib/X11/XKBGetMap.c | 2 +- nx-X11/lib/X11/XKBList.c | 2 +- nx-X11/lib/X11/XKBMAlloc.c | 12 +- nx-X11/lib/X11/XKBMisc.c | 12 +- nx-X11/lib/X11/XKBNames.c | 2 +- nx-X11/lib/X11/XKBRdBuf.c | 2 +- nx-X11/lib/X11/XKBSetGeom.c | 4 +- nx-X11/lib/X11/XKBSetMap.c | 2 +- nx-X11/lib/X11/XKBUse.c | 2 +- nx-X11/lib/X11/XKBleds.c | 2 +- nx-X11/lib/X11/XKBlib.h | 4 +- nx-X11/lib/X11/XKBlibint.h | 4 +- nx-X11/lib/X11/XYZ.c | 2 +- nx-X11/lib/X11/Xcms.h | 2 +- nx-X11/lib/X11/Xcmsint.h | 2 +- nx-X11/lib/X11/XimThai.h | 2 +- nx-X11/lib/X11/Ximint.h | 2 +- nx-X11/lib/X11/Xintatom.h | 2 +- nx-X11/lib/X11/Xintconn.h | 2 +- nx-X11/lib/X11/Xlcint.h | 4 +- nx-X11/lib/X11/Xlib.h | 6 +- nx-X11/lib/X11/XlibAsync.c | 4 +- nx-X11/lib/X11/XlibInt.c | 6 +- nx-X11/lib/X11/Xlibint.h | 14 +- nx-X11/lib/X11/Xlocale.h | 4 +- nx-X11/lib/X11/Xresource.h | 2 +- nx-X11/lib/X11/Xrm.c | 4 +- nx-X11/lib/X11/Xutil.h | 2 +- nx-X11/lib/X11/cmsColNm.c | 4 +- nx-X11/lib/X11/cmsProp.c | 2 +- nx-X11/lib/X11/evtomask.c | 2 +- nx-X11/lib/X11/globals.c | 2 +- nx-X11/lib/X11/imDefFlt.c | 2 +- nx-X11/lib/X11/imDefIm.c | 2 +- nx-X11/lib/X11/imDefLkup.c | 2 +- nx-X11/lib/X11/imDispch.c | 2 +- nx-X11/lib/X11/imEvToWire.c | 4 +- nx-X11/lib/X11/imExten.c | 2 +- nx-X11/lib/X11/imInt.c | 6 +- nx-X11/lib/X11/imLcFlt.c | 2 +- nx-X11/lib/X11/imLcIc.c | 4 +- nx-X11/lib/X11/imLcIm.c | 8 +- nx-X11/lib/X11/imLcLkup.c | 10 +- nx-X11/lib/X11/imLcPrs.c | 6 +- nx-X11/lib/X11/imLcSIc.c | 6 +- nx-X11/lib/X11/imRm.c | 2 +- nx-X11/lib/X11/imThaiFlt.c | 8 +- nx-X11/lib/X11/imThaiIc.c | 4 +- nx-X11/lib/X11/imThaiIm.c | 8 +- nx-X11/lib/X11/imTrX.c | 2 +- nx-X11/lib/X11/imTrans.c | 8 +- nx-X11/lib/X11/lcCT.c | 2 +- nx-X11/lib/X11/lcDB.c | 4 +- nx-X11/lib/X11/lcFile.c | 2 +- nx-X11/lib/X11/lcPrTxt.c | 4 +- nx-X11/lib/X11/lcTxtPr.c | 4 +- nx-X11/lib/X11/lcUtil.c | 2 +- nx-X11/lib/X11/lcWrap.c | 6 +- nx-X11/lib/X11/locking.h | 2 +- nx-X11/lib/X11/mbWMProps.c | 8 +- nx-X11/lib/X11/omDefault.c | 4 +- nx-X11/lib/X11/omGeneric.c | 4 +- nx-X11/lib/X11/os2Stubs.c | 2 +- nx-X11/lib/X11/utf8WMProps.c | 8 +- nx-X11/lib/X11/util/makekeys.c | 6 +- nx-X11/lib/X11/uvY.c | 2 +- nx-X11/lib/X11/xyY.c | 2 +- nx-X11/lib/Xau/AuDispose.c | 2 +- nx-X11/lib/Xau/AuFileName.c | 4 +- nx-X11/lib/Xau/AuGetAddr.c | 4 +- nx-X11/lib/Xau/AuGetBest.c | 8 +- nx-X11/lib/Xau/AuLock.c | 6 +- nx-X11/lib/Xau/AuRead.c | 2 +- nx-X11/lib/Xau/AuUnlock.c | 4 +- nx-X11/lib/Xau/AuWrite.c | 2 +- nx-X11/lib/Xau/Autest.c | 2 +- nx-X11/lib/Xau/Imakefile | 2 +- nx-X11/lib/Xau/k5encode.c | 8 +- nx-X11/lib/Xcomposite/Imakefile | 2 +- nx-X11/lib/Xcomposite/Xcomposite.h | 6 +- nx-X11/lib/Xcomposite/xcompositeint.h | 10 +- nx-X11/lib/Xext/DPMS.c | 10 +- nx-X11/lib/Xext/MITMisc.c | 10 +- nx-X11/lib/Xext/XAppgroup.c | 10 +- nx-X11/lib/Xext/XEVI.c | 12 +- nx-X11/lib/Xext/XLbx.c | 10 +- nx-X11/lib/Xext/XMultibuf.c | 8 +- nx-X11/lib/Xext/XSecurity.c | 8 +- nx-X11/lib/Xext/XShape.c | 12 +- nx-X11/lib/Xext/XShm.c | 12 +- nx-X11/lib/Xext/XSync.c | 8 +- nx-X11/lib/Xext/XTestExt1.c | 6 +- nx-X11/lib/Xext/Xcup.c | 10 +- nx-X11/lib/Xext/Xdbe.c | 8 +- nx-X11/lib/Xext/extutil.c | 6 +- nx-X11/lib/Xext/globals.c | 4 +- nx-X11/lib/Xfixes/Imakefile | 2 +- nx-X11/lib/Xfixes/Xfixes.h | 4 +- nx-X11/lib/Xfixes/Xfixes.man | 2 +- nx-X11/lib/Xfixes/Xfixesint.h | 8 +- nx-X11/lib/Xinerama/Xinerama.c | 14 +- nx-X11/lib/Xrender/Imakefile | 2 +- nx-X11/lib/Xrender/Picture.c | 2 +- nx-X11/lib/Xrender/Xrender.h | 10 +- nx-X11/lib/Xrender/Xrenderint.h | 6 +- nx-X11/lib/Xtst/XRecord.c | 8 +- nx-X11/lib/Xtst/XTest.c | 14 +- nx-X11/lib/oldX/Imakefile | 2 +- nx-X11/lib/xkbfile/Imakefile | 2 +- nx-X11/lib/xkbfile/XKMformat.h | 6 +- nx-X11/lib/xkbfile/cout.c | 8 +- nx-X11/lib/xkbfile/maprules.c | 34 +-- nx-X11/lib/xkbfile/srvmisc.c | 6 +- nx-X11/lib/xkbfile/xkbatom.c | 6 +- nx-X11/lib/xkbfile/xkbbells.c | 4 +- nx-X11/lib/xkbfile/xkbconfig.c | 22 +- nx-X11/lib/xkbfile/xkbdraw.c | 12 +- nx-X11/lib/xkbfile/xkbmisc.c | 24 +- nx-X11/lib/xkbfile/xkbout.c | 22 +- nx-X11/lib/xkbfile/xkbtext.c | 18 +- nx-X11/lib/xkbfile/xkmout.c | 8 +- nx-X11/lib/xkbfile/xkmread.c | 24 +- nx-X11/lib/xtrans/Imakefile | 2 +- nx-X11/programs/Xserver/GL/glx/glxserver.h | 6 +- nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c | 2 +- nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c | 2 +- nx-X11/programs/Xserver/XTrap/xtrapddmi.c | 10 +- nx-X11/programs/Xserver/XTrap/xtrapdi.c | 12 +- nx-X11/programs/Xserver/XTrap/xtrapdiswp.c | 12 +- nx-X11/programs/Xserver/XTrap/xtrapditbl.c | 12 +- nx-X11/programs/Xserver/Xext/EVI.c | 6 +- nx-X11/programs/Xserver/Xext/appgroup.c | 14 +- nx-X11/programs/Xserver/Xext/bigreq.c | 6 +- nx-X11/programs/Xserver/Xext/cup.c | 8 +- nx-X11/programs/Xserver/Xext/dgaproc.h | 2 +- nx-X11/programs/Xserver/Xext/dpms.c | 8 +- nx-X11/programs/Xserver/Xext/extmod/modinit.c | 2 +- nx-X11/programs/Xserver/Xext/extmod/modinit.h | 40 ++-- nx-X11/programs/Xserver/Xext/fontcache.c | 6 +- nx-X11/programs/Xserver/Xext/mbuf.c | 6 +- nx-X11/programs/Xserver/Xext/mbufbf.c | 6 +- nx-X11/programs/Xserver/Xext/mbufpx.c | 6 +- nx-X11/programs/Xserver/Xext/mitmisc.c | 6 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 8 +- nx-X11/programs/Xserver/Xext/panoramiX.h | 2 +- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 8 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 4 +- nx-X11/programs/Xserver/Xext/sampleEVI.c | 6 +- nx-X11/programs/Xserver/Xext/saver.c | 6 +- nx-X11/programs/Xserver/Xext/security.c | 10 +- nx-X11/programs/Xserver/Xext/shape.c | 6 +- nx-X11/programs/Xserver/Xext/shm.c | 8 +- nx-X11/programs/Xserver/Xext/sleepuntil.c | 4 +- nx-X11/programs/Xserver/Xext/sync.c | 10 +- nx-X11/programs/Xserver/Xext/xcmisc.c | 6 +- nx-X11/programs/Xserver/Xext/xevie.c | 10 +- nx-X11/programs/Xserver/Xext/xf86bigfont.c | 6 +- nx-X11/programs/Xserver/Xext/xf86dga.c | 8 +- nx-X11/programs/Xserver/Xext/xf86dga2.c | 8 +- nx-X11/programs/Xserver/Xext/xf86misc.c | 12 +- nx-X11/programs/Xserver/Xext/xf86vmode.c | 6 +- nx-X11/programs/Xserver/Xext/xres.c | 6 +- nx-X11/programs/Xserver/Xext/xtest.c | 12 +- nx-X11/programs/Xserver/Xext/xtest1dd.c | 10 +- nx-X11/programs/Xserver/Xext/xtest1di.c | 6 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 10 +- nx-X11/programs/Xserver/Xext/xvdix.h | 2 +- nx-X11/programs/Xserver/Xext/xvmain.c | 8 +- nx-X11/programs/Xserver/Xext/xvmc.c | 12 +- nx-X11/programs/Xserver/Xext/xvmcext.h | 2 +- nx-X11/programs/Xserver/Xext/xvmod.c | 6 +- nx-X11/programs/Xserver/Xi/allowev.c | 8 +- nx-X11/programs/Xserver/Xi/chgdctl.c | 8 +- nx-X11/programs/Xserver/Xi/chgfctl.c | 8 +- nx-X11/programs/Xserver/Xi/chgkbd.c | 8 +- nx-X11/programs/Xserver/Xi/chgkmap.c | 8 +- nx-X11/programs/Xserver/Xi/chgprop.c | 8 +- nx-X11/programs/Xserver/Xi/chgptr.c | 8 +- nx-X11/programs/Xserver/Xi/closedev.c | 8 +- nx-X11/programs/Xserver/Xi/devbell.c | 8 +- nx-X11/programs/Xserver/Xi/exevents.c | 8 +- nx-X11/programs/Xserver/Xi/extinit.c | 8 +- nx-X11/programs/Xserver/Xi/getbmap.c | 8 +- nx-X11/programs/Xserver/Xi/getdctl.c | 8 +- nx-X11/programs/Xserver/Xi/getfctl.c | 8 +- nx-X11/programs/Xserver/Xi/getfocus.c | 8 +- nx-X11/programs/Xserver/Xi/getkmap.c | 8 +- nx-X11/programs/Xserver/Xi/getmmap.c | 8 +- nx-X11/programs/Xserver/Xi/getprop.c | 8 +- nx-X11/programs/Xserver/Xi/getselev.c | 8 +- nx-X11/programs/Xserver/Xi/getvers.c | 8 +- nx-X11/programs/Xserver/Xi/grabdev.c | 8 +- nx-X11/programs/Xserver/Xi/grabdevb.c | 8 +- nx-X11/programs/Xserver/Xi/grabdevk.c | 8 +- nx-X11/programs/Xserver/Xi/gtmotion.c | 8 +- nx-X11/programs/Xserver/Xi/listdev.c | 8 +- nx-X11/programs/Xserver/Xi/opendev.c | 8 +- nx-X11/programs/Xserver/Xi/queryst.c | 8 +- nx-X11/programs/Xserver/Xi/selectev.c | 8 +- nx-X11/programs/Xserver/Xi/sendexev.c | 8 +- nx-X11/programs/Xserver/Xi/setbmap.c | 8 +- nx-X11/programs/Xserver/Xi/setdval.c | 8 +- nx-X11/programs/Xserver/Xi/setfocus.c | 8 +- nx-X11/programs/Xserver/Xi/setmmap.c | 8 +- nx-X11/programs/Xserver/Xi/setmode.c | 8 +- nx-X11/programs/Xserver/Xi/stubs.c | 8 +- nx-X11/programs/Xserver/Xi/ungrdev.c | 6 +- nx-X11/programs/Xserver/Xi/ungrdevb.c | 8 +- nx-X11/programs/Xserver/Xi/ungrdevk.c | 8 +- nx-X11/programs/Xserver/composite/compint.h | 2 +- nx-X11/programs/Xserver/damageext/damageextint.h | 4 +- nx-X11/programs/Xserver/dbe/dbe.c | 4 +- nx-X11/programs/Xserver/dbe/dbestruct.h | 2 +- nx-X11/programs/Xserver/dbe/midbe.c | 4 +- nx-X11/programs/Xserver/dix/atom.c | 4 +- nx-X11/programs/Xserver/dix/colormap.c | 4 +- nx-X11/programs/Xserver/dix/cursor.c | 4 +- nx-X11/programs/Xserver/dix/devices.c | 8 +- nx-X11/programs/Xserver/dix/dispatch.c | 6 +- nx-X11/programs/Xserver/dix/dixfonts.c | 8 +- nx-X11/programs/Xserver/dix/dixutils.c | 8 +- nx-X11/programs/Xserver/dix/events.c | 10 +- nx-X11/programs/Xserver/dix/extension.c | 6 +- nx-X11/programs/Xserver/dix/gc.c | 6 +- nx-X11/programs/Xserver/dix/globals.c | 4 +- nx-X11/programs/Xserver/dix/grabs.c | 4 +- nx-X11/programs/Xserver/dix/initatoms.c | 4 +- nx-X11/programs/Xserver/dix/main.c | 8 +- nx-X11/programs/Xserver/dix/pixmap.c | 2 +- nx-X11/programs/Xserver/dix/privates.c | 2 +- nx-X11/programs/Xserver/dix/property.c | 6 +- nx-X11/programs/Xserver/dix/resource.c | 2 +- nx-X11/programs/Xserver/dix/swaprep.c | 4 +- nx-X11/programs/Xserver/dix/swapreq.c | 6 +- nx-X11/programs/Xserver/dix/tables.c | 4 +- nx-X11/programs/Xserver/dix/window.c | 4 +- nx-X11/programs/Xserver/fb/fb.h | 2 +- nx-X11/programs/Xserver/fb/fbcmap.c | 4 +- nx-X11/programs/Xserver/fb/fbpseudocolor.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Agent.h | 4 +- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Holder.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h | 6 +- .../programs/Xserver/hw/nxagent/NXcompositeext.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 11 +- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXextension.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXresource.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/TestExt.c | 6 +- .../hw/nxagent/X11/include/Xrandr_nxagent.h | 105 +++++++++ .../Xserver/hw/nxagent/X11/include/xpm_nxagent.h | 259 +++++++++++++++++++++ .../Xserver/hw/xfree86/os-support/xf86_libc.h | 2 +- nx-X11/programs/Xserver/include/Imakefile | 4 +- nx-X11/programs/Xserver/include/closestr.h | 2 +- nx-X11/programs/Xserver/include/colormap.h | 2 +- nx-X11/programs/Xserver/include/dixfontstr.h | 2 +- nx-X11/programs/Xserver/include/dixstruct.h | 2 +- nx-X11/programs/Xserver/include/gc.h | 6 +- nx-X11/programs/Xserver/include/gcstruct.h | 2 +- nx-X11/programs/Xserver/include/input.h | 4 +- nx-X11/programs/Xserver/include/misc.h | 12 +- nx-X11/programs/Xserver/include/miscstruct.h | 2 +- nx-X11/programs/Xserver/include/opaque.h | 2 +- nx-X11/programs/Xserver/include/os.h | 2 +- nx-X11/programs/Xserver/include/scrnintstr.h | 2 +- nx-X11/programs/Xserver/include/window.h | 2 +- nx-X11/programs/Xserver/include/windowstr.h | 2 +- nx-X11/programs/Xserver/mfb/maskbits.h | 4 +- nx-X11/programs/Xserver/mi/mi.h | 2 +- nx-X11/programs/Xserver/mi/miarc.c | 6 +- nx-X11/programs/Xserver/mi/mibitblt.c | 6 +- nx-X11/programs/Xserver/mi/mibstore.c | 6 +- nx-X11/programs/Xserver/mi/miclipn.c | 2 +- nx-X11/programs/Xserver/mi/micmap.c | 4 +- nx-X11/programs/Xserver/mi/miexpose.c | 8 +- nx-X11/programs/Xserver/mi/mifillarc.c | 4 +- nx-X11/programs/Xserver/mi/mifillrct.c | 4 +- nx-X11/programs/Xserver/mi/mifpolycon.c | 2 +- nx-X11/programs/Xserver/mi/miinitext.c | 18 +- nx-X11/programs/Xserver/mi/mioverlay.c | 2 +- nx-X11/programs/Xserver/mi/mipoly.c | 2 +- nx-X11/programs/Xserver/mi/mipolygen.c | 2 +- nx-X11/programs/Xserver/mi/mipolypnt.c | 4 +- nx-X11/programs/Xserver/mi/mipolyrect.c | 4 +- nx-X11/programs/Xserver/mi/mipolyseg.c | 4 +- nx-X11/programs/Xserver/mi/mipushpxl.c | 2 +- nx-X11/programs/Xserver/mi/miregion.c | 2 +- nx-X11/programs/Xserver/mi/miscrinit.c | 4 +- nx-X11/programs/Xserver/mi/miwideline.c | 2 +- nx-X11/programs/Xserver/mi/miwindow.c | 2 +- nx-X11/programs/Xserver/mi/mizerarc.c | 4 +- nx-X11/programs/Xserver/mi/mizerclip.c | 2 +- nx-X11/programs/Xserver/mi/mizerline.c | 2 +- nx-X11/programs/Xserver/os/WaitFor.c | 10 +- nx-X11/programs/Xserver/os/access.c | 14 +- nx-X11/programs/Xserver/os/auth.c | 8 +- nx-X11/programs/Xserver/os/connection.c | 14 +- nx-X11/programs/Xserver/os/io.c | 14 +- nx-X11/programs/Xserver/os/k5auth.c | 6 +- nx-X11/programs/Xserver/os/log.c | 2 +- nx-X11/programs/Xserver/os/mitauth.c | 2 +- nx-X11/programs/Xserver/os/osdep.h | 2 +- nx-X11/programs/Xserver/os/osinit.c | 4 +- nx-X11/programs/Xserver/os/rpcauth.c | 2 +- nx-X11/programs/Xserver/os/secauth.c | 4 +- nx-X11/programs/Xserver/os/utils.c | 14 +- nx-X11/programs/Xserver/os/xalloc.c | 4 +- nx-X11/programs/Xserver/os/xdmauth.c | 6 +- nx-X11/programs/Xserver/os/xdmcp.c | 12 +- nx-X11/programs/Xserver/os/xprintf.c | 2 +- nx-X11/programs/Xserver/randr/randrproto.h | 2 +- nx-X11/programs/Xserver/randr/randrstr.h | 12 +- nx-X11/programs/Xserver/randr/rrxinerama.c | 2 +- nx-X11/programs/Xserver/record/record.c | 2 +- nx-X11/programs/Xserver/render/animcur.c | 4 +- nx-X11/programs/Xserver/render/glyphstr.h | 2 +- nx-X11/programs/Xserver/render/render.c | 10 +- nx-X11/programs/Xserver/xfixes/xfixesint.h | 6 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 10 +- nx-X11/programs/Xserver/xkb/ddxConfig.c | 10 +- nx-X11/programs/Xserver/xkb/ddxCtrls.c | 10 +- nx-X11/programs/Xserver/xkb/ddxDevBtn.c | 12 +- nx-X11/programs/Xserver/xkb/ddxFakeBtn.c | 10 +- nx-X11/programs/Xserver/xkb/ddxFakeMtn.c | 10 +- nx-X11/programs/Xserver/xkb/ddxInit.c | 10 +- nx-X11/programs/Xserver/xkb/ddxKeyClick.c | 10 +- nx-X11/programs/Xserver/xkb/ddxKillSrv.c | 10 +- nx-X11/programs/Xserver/xkb/ddxLEDs.c | 10 +- nx-X11/programs/Xserver/xkb/ddxList.c | 14 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 16 +- nx-X11/programs/Xserver/xkb/ddxPrivate.c | 4 +- nx-X11/programs/Xserver/xkb/ddxVT.c | 10 +- nx-X11/programs/Xserver/xkb/xkb.c | 10 +- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 8 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 8 +- nx-X11/programs/Xserver/xkb/xkbEvents.c | 10 +- nx-X11/programs/Xserver/xkb/xkbInit.c | 16 +- nx-X11/programs/Xserver/xkb/xkbLEDs.c | 8 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 8 +- nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c | 12 +- nx-X11/programs/Xserver/xkb/xkbSwap.c | 8 +- nx-X11/programs/Xserver/xkb/xkbUtils.c | 10 +- nx-X11/programs/nxauth/gethost.c | 4 +- nx-X11/programs/nxauth/parsedpy.c | 6 +- nx-X11/programs/nxauth/process.c | 6 +- nx-X11/programs/nxauth/xauth.h | 6 +- nx-libs.spec | 240 +++++++++---------- nxcompext/Jpeg.c | 6 +- nxcompext/NXlib.h | 4 +- nxcompext/Pgn.h | 6 +- nxcompshad/Input.h | 2 +- nxcompshad/Manager.cpp | 6 +- nxcompshad/Manager.h | 2 +- nxcompshad/Regions.h | 4 +- nxcompshad/Shadow.h | 2 +- nxcompshad/Updater.cpp | 6 +- nxcompshad/Updater.h | 2 +- nxcompshad/Win.cpp | 2 +- nxcompshad/Win.h | 2 +- nxcompshad/X11.cpp | 8 +- nxcompshad/X11.h | 8 +- nxcompshad/X11/include/Xdamage_nxcompshad.h | 92 ++++++++ nxcompshad/X11/include/Xrandr_nxcompshad.h | 80 +++++++ 531 files changed, 2203 insertions(+), 1666 deletions(-) create mode 100644 nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h create mode 100644 nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h create mode 100644 nxcompshad/X11/include/Xdamage_nxcompshad.h create mode 100644 nxcompshad/X11/include/Xrandr_nxcompshad.h (limited to 'debian') diff --git a/Makefile b/Makefile index 9b89669df..2b5b4946a 100644 --- a/Makefile +++ b/Makefile @@ -149,9 +149,9 @@ install-full: . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | \ while read dirname; do \ - $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"; \ + $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"; \ $(INSTALL_FILE) $${dirname}/*.h \ - "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"/ || true; \ + "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"/ || true; \ done; \ # Provide means for Xinerama support in NX/X2Go sessions. This diff --git a/debian/libnx-x11-dev.install.in b/debian/libnx-x11-dev.install.in index 331ec104f..13af54672 100644 --- a/debian/libnx-x11-dev.install.in +++ b/debian/libnx-x11-dev.install.in @@ -1,15 +1,15 @@ usr/lib/*/libNX_X11.so -usr/include/*/nx/X11/ImUtil.h -usr/include/*/nx/X11/XKBlib.h -usr/include/*/nx/X11/Xcms.h -usr/include/*/nx/X11/Xlib.h -usr/include/*/nx/X11/XlibConf.h -usr/include/*/nx/X11/Xlibint.h -usr/include/*/nx/X11/Xlocale.h -usr/include/*/nx/X11/Xregion.h -usr/include/*/nx/X11/Xresource.h -usr/include/*/nx/X11/Xutil.h -usr/include/*/nx/X11/cursorfont.h -usr/include/*/nx/X11/misc.h -usr/include/*/nx/X11/os.h -usr/include/*/nx/X11/X10.h +usr/include/*/nx-X11/ImUtil.h +usr/include/*/nx-X11/XKBlib.h +usr/include/*/nx-X11/Xcms.h +usr/include/*/nx-X11/Xlib.h +usr/include/*/nx-X11/XlibConf.h +usr/include/*/nx-X11/Xlibint.h +usr/include/*/nx-X11/Xlocale.h +usr/include/*/nx-X11/Xregion.h +usr/include/*/nx-X11/Xresource.h +usr/include/*/nx-X11/Xutil.h +usr/include/*/nx-X11/cursorfont.h +usr/include/*/nx-X11/misc.h +usr/include/*/nx-X11/os.h +usr/include/*/nx-X11/X10.h diff --git a/debian/libnx-xau-dev.install.in b/debian/libnx-xau-dev.install.in index dd17a6054..1bf954c00 100644 --- a/debian/libnx-xau-dev.install.in +++ b/debian/libnx-xau-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xau.so -usr/include/*/nx/X11/Xauth.h +usr/include/*/nx-X11/Xauth.h diff --git a/debian/libnx-xcomposite-dev.install.in b/debian/libnx-xcomposite-dev.install.in index e7e3a33db..71451dbcc 100644 --- a/debian/libnx-xcomposite-dev.install.in +++ b/debian/libnx-xcomposite-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xcomposite.so -usr/include/*/nx/X11/extensions/Xcomposite.h +usr/include/*/nx-X11/extensions/Xcomposite.h diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index 9f4f60551..0d1df8c08 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -1,34 +1,34 @@ usr/lib/*/libNX_Xext.so -usr/include/*/nx/X11/extensions/MITMisc.h -usr/include/*/nx/X11/extensions/XEVI.h -usr/include/*/nx/X11/extensions/XEVIstr.h -usr/include/*/nx/X11/extensions/Xevie.h -usr/include/*/nx/X11/extensions/Xeviestr.h -usr/include/*/nx/X11/extensions/XLbx.h -usr/include/*/nx/X11/extensions/XShm.h -usr/include/*/nx/X11/extensions/Xag.h -usr/include/*/nx/X11/extensions/Xagsrv.h -usr/include/*/nx/X11/extensions/Xagstr.h -usr/include/*/nx/X11/extensions/Xcup.h -usr/include/*/nx/X11/extensions/Xcupstr.h -usr/include/*/nx/X11/extensions/Xdbe.h -usr/include/*/nx/X11/extensions/Xdbeproto.h -usr/include/*/nx/X11/extensions/Xext.h -usr/include/*/nx/X11/extensions/dpms.h -usr/include/*/nx/X11/extensions/dpmsstr.h -usr/include/*/nx/X11/extensions/extutil.h -usr/include/*/nx/X11/extensions/lbxstr.h -usr/include/*/nx/X11/extensions/lbxbuf.h -usr/include/*/nx/X11/extensions/lbxdeltastr.h -usr/include/*/nx/X11/extensions/lbximage.h -usr/include/*/nx/X11/extensions/lbxbufstr.h -usr/include/*/nx/X11/extensions/lbxopts.h -usr/include/*/nx/X11/extensions/lbxzlib.h -usr/include/*/nx/X11/extensions/mitmiscstr.h -usr/include/*/nx/X11/extensions/multibuf.h -usr/include/*/nx/X11/extensions/multibufst.h -usr/include/*/nx/X11/extensions/security.h -usr/include/*/nx/X11/extensions/securstr.h -usr/include/*/nx/X11/extensions/shape.h -usr/include/*/nx/X11/extensions/sync.h -usr/include/*/nx/X11/extensions/xtestext1.h +usr/include/*/nx-X11/extensions/MITMisc.h +usr/include/*/nx-X11/extensions/XEVI.h +usr/include/*/nx-X11/extensions/XEVIstr.h +usr/include/*/nx-X11/extensions/Xevie.h +usr/include/*/nx-X11/extensions/Xeviestr.h +usr/include/*/nx-X11/extensions/XLbx.h +usr/include/*/nx-X11/extensions/XShm.h +usr/include/*/nx-X11/extensions/Xag.h +usr/include/*/nx-X11/extensions/Xagsrv.h +usr/include/*/nx-X11/extensions/Xagstr.h +usr/include/*/nx-X11/extensions/Xcup.h +usr/include/*/nx-X11/extensions/Xcupstr.h +usr/include/*/nx-X11/extensions/Xdbe.h +usr/include/*/nx-X11/extensions/Xdbeproto.h +usr/include/*/nx-X11/extensions/Xext.h +usr/include/*/nx-X11/extensions/dpms.h +usr/include/*/nx-X11/extensions/dpmsstr.h +usr/include/*/nx-X11/extensions/extutil.h +usr/include/*/nx-X11/extensions/lbxstr.h +usr/include/*/nx-X11/extensions/lbxbuf.h +usr/include/*/nx-X11/extensions/lbxdeltastr.h +usr/include/*/nx-X11/extensions/lbximage.h +usr/include/*/nx-X11/extensions/lbxbufstr.h +usr/include/*/nx-X11/extensions/lbxopts.h +usr/include/*/nx-X11/extensions/lbxzlib.h +usr/include/*/nx-X11/extensions/mitmiscstr.h +usr/include/*/nx-X11/extensions/multibuf.h +usr/include/*/nx-X11/extensions/multibufst.h +usr/include/*/nx-X11/extensions/security.h +usr/include/*/nx-X11/extensions/securstr.h +usr/include/*/nx-X11/extensions/shape.h +usr/include/*/nx-X11/extensions/sync.h +usr/include/*/nx-X11/extensions/xtestext1.h diff --git a/debian/libnx-xfixes-dev.install.in b/debian/libnx-xfixes-dev.install.in index 96b6cf61c..475c78d0a 100644 --- a/debian/libnx-xfixes-dev.install.in +++ b/debian/libnx-xfixes-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xfixes.so -usr/include/*/nx/X11/extensions/Xfixes.h +usr/include/*/nx-X11/extensions/Xfixes.h diff --git a/debian/libnx-xinerama-dev.install.in b/debian/libnx-xinerama-dev.install.in index 983784460..59c0456aa 100644 --- a/debian/libnx-xinerama-dev.install.in +++ b/debian/libnx-xinerama-dev.install.in @@ -1,3 +1,3 @@ usr/lib/*/libNX_Xinerama.so -usr/include/*/nx/X11/extensions/Xinerama.h -usr/include/*/nx/X11/extensions/panoramiXext.h +usr/include/*/nx-X11/extensions/Xinerama.h +usr/include/*/nx-X11/extensions/panoramiXext.h diff --git a/debian/libnx-xrender-dev.install.in b/debian/libnx-xrender-dev.install.in index 392e20025..2aede35da 100644 --- a/debian/libnx-xrender-dev.install.in +++ b/debian/libnx-xrender-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xrender.so -usr/include/*/nx/X11/extensions/Xrender.h +usr/include/*/nx-X11/extensions/Xrender.h diff --git a/debian/libnx-xtst-dev.install.in b/debian/libnx-xtst-dev.install.in index 9dd16a1db..5acca96cf 100644 --- a/debian/libnx-xtst-dev.install.in +++ b/debian/libnx-xtst-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xtst.so -usr/include/*/nx/X11/extensions/XTest.h +usr/include/*/nx-X11/extensions/XTest.h diff --git a/debian/nx-x11proto-composite-dev.install.in b/debian/nx-x11proto-composite-dev.install.in index 609454a5e..cf2c77e36 100644 --- a/debian/nx-x11proto-composite-dev.install.in +++ b/debian/nx-x11proto-composite-dev.install.in @@ -1,2 +1,2 @@ -usr/include/*/nx/X11/extensions/composite.h -usr/include/*/nx/X11/extensions/compositeproto.h \ No newline at end of file +usr/include/*/nx-X11/extensions/composite.h +usr/include/*/nx-X11/extensions/compositeproto.h \ No newline at end of file diff --git a/debian/nx-x11proto-core-dev.install.in b/debian/nx-x11proto-core-dev.install.in index 92c529f41..2e99909a8 100644 --- a/debian/nx-x11proto-core-dev.install.in +++ b/debian/nx-x11proto-core-dev.install.in @@ -1,23 +1,23 @@ -usr/include/*/nx/X11/DECkeysym.h -usr/include/*/nx/X11/HPkeysym.h -usr/include/*/nx/X11/Sunkeysym.h -usr/include/*/nx/X11/X.h -usr/include/*/nx/X11/XF86keysym.h -usr/include/*/nx/X11/XWDFile.h -usr/include/*/nx/X11/Xalloca.h -usr/include/*/nx/X11/Xarch.h -usr/include/*/nx/X11/Xatom.h -usr/include/*/nx/X11/Xdefs.h -usr/include/*/nx/X11/Xfuncproto.h -usr/include/*/nx/X11/Xfuncs.h -usr/include/*/nx/X11/Xmd.h -usr/include/*/nx/X11/Xos.h -usr/include/*/nx/X11/Xos_r.h -usr/include/*/nx/X11/Xosdefs.h -usr/include/*/nx/X11/Xpoll.h -usr/include/*/nx/X11/Xproto.h -usr/include/*/nx/X11/Xprotostr.h -usr/include/*/nx/X11/Xthreads.h -usr/include/*/nx/X11/ap_keysym.h -usr/include/*/nx/X11/keysym.h -usr/include/*/nx/X11/keysymdef.h +usr/include/*/nx-X11/DECkeysym.h +usr/include/*/nx-X11/HPkeysym.h +usr/include/*/nx-X11/Sunkeysym.h +usr/include/*/nx-X11/X.h +usr/include/*/nx-X11/XF86keysym.h +usr/include/*/nx-X11/XWDFile.h +usr/include/*/nx-X11/Xalloca.h +usr/include/*/nx-X11/Xarch.h +usr/include/*/nx-X11/Xatom.h +usr/include/*/nx-X11/Xdefs.h +usr/include/*/nx-X11/Xfuncproto.h +usr/include/*/nx-X11/Xfuncs.h +usr/include/*/nx-X11/Xmd.h +usr/include/*/nx-X11/Xos.h +usr/include/*/nx-X11/Xos_r.h +usr/include/*/nx-X11/Xosdefs.h +usr/include/*/nx-X11/Xpoll.h +usr/include/*/nx-X11/Xproto.h +usr/include/*/nx-X11/Xprotostr.h +usr/include/*/nx-X11/Xthreads.h +usr/include/*/nx-X11/ap_keysym.h +usr/include/*/nx-X11/keysym.h +usr/include/*/nx-X11/keysymdef.h diff --git a/debian/nx-x11proto-render-dev.install.in b/debian/nx-x11proto-render-dev.install.in index bf778716f..f2222d234 100644 --- a/debian/nx-x11proto-render-dev.install.in +++ b/debian/nx-x11proto-render-dev.install.in @@ -1,3 +1,3 @@ -usr/include/*/nx/X11/extensions/render.h -usr/include/*/nx/X11/extensions/renderproto.h +usr/include/*/nx-X11/extensions/render.h +usr/include/*/nx-X11/extensions/renderproto.h diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index 7e0ca507f..0d1f8699b 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -1,4 +1,4 @@ -usr/include/*/nx/X11/extensions/xteststr.h -usr/include/*/nx/X11/extensions/shapestr.h -usr/include/*/nx/X11/extensions/shmstr.h -usr/include/*/nx/X11/extensions/syncstr.h +usr/include/*/nx-X11/extensions/xteststr.h +usr/include/*/nx-X11/extensions/shapestr.h +usr/include/*/nx-X11/extensions/shmstr.h +usr/include/*/nx-X11/extensions/syncstr.h diff --git a/debian/nx-x11proto-xfixes-dev.install.in b/debian/nx-x11proto-xfixes-dev.install.in index 4b614d6c1..91eae0306 100644 --- a/debian/nx-x11proto-xfixes-dev.install.in +++ b/debian/nx-x11proto-xfixes-dev.install.in @@ -1,3 +1,3 @@ -usr/include/*/nx/X11/extensions/xfixeswire.h -usr/include/*/nx/X11/extensions/xfixesproto.h +usr/include/*/nx-X11/extensions/xfixeswire.h +usr/include/*/nx-X11/extensions/xfixesproto.h diff --git a/debian/nx-x11proto-xinerama-dev.install.in b/debian/nx-x11proto-xinerama-dev.install.in index 36717e1f5..dca06ddee 100644 --- a/debian/nx-x11proto-xinerama-dev.install.in +++ b/debian/nx-x11proto-xinerama-dev.install.in @@ -1 +1 @@ -usr/include/*/nx/X11/extensions/panoramiXproto.h \ No newline at end of file +usr/include/*/nx-X11/extensions/panoramiXproto.h \ No newline at end of file diff --git a/debian/rules b/debian/rules index b3060b36f..b78855033 100755 --- a/debian/rules +++ b/debian/rules @@ -42,28 +42,28 @@ override_dh_install: rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcompshad.a # remove extras, GL, and other unneeded headers - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/GL/ - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XInput.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XK*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/*Xv*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xtrap*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XRes*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/record*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmode.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86misc.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dgastr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1str.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86mscstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/bigreqstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xcmiscstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XIproto.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfont.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XI.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/Xtrans/ + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/GL/ + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XInput.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XK*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/*Xv*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtrap*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XRes*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/record*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmode.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86misc.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dgastr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1str.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86mscstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/bigreqstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xcmiscstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XIproto.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfont.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XI.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/Xtrans/ dh_install --fail-missing diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 241bc267f..f54ff84cc 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1223,7 +1223,7 @@ XCOMM X Window System make variables; these need to be coordinated with rules PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib INCLUDESRC = BuildIncDir - XINCLUDESRC = $(INCLUDESRC)/X11 + XINCLUDESRC = $(INCLUDESRC)/nx-X11 SERVERSRC = $(XTOP)/programs/Xserver CONTRIBSRC = ContribDir UNSUPPORTEDSRC = UnsupportedDir diff --git a/nx-X11/include/GL/glx.h b/nx-X11/include/GL/glx.h index 910504a1d..3a9e942c7 100644 --- a/nx-X11/include/GL/glx.h +++ b/nx-X11/include/GL/glx.h @@ -36,8 +36,8 @@ ** compliant with the OpenGL(R) version 1.2.1 Specification. */ -#include -#include +#include +#include #include #include diff --git a/nx-X11/include/GL/glxint.h b/nx-X11/include/GL/glxint.h index d9e2581bb..50f4a0eaa 100644 --- a/nx-X11/include/GL/glxint.h +++ b/nx-X11/include/GL/glxint.h @@ -23,8 +23,8 @@ ** $SGI$ */ -#include -#include +#include +#include #include "GL/gl.h" typedef struct __GLXvisualConfigRec __GLXvisualConfig; diff --git a/nx-X11/include/Imakefile b/nx-X11/include/Imakefile index 26520eab0..76a4daf6d 100644 --- a/nx-X11/include/Imakefile +++ b/nx-X11/include/Imakefile @@ -51,10 +51,10 @@ HEADERS = \ all:: -BuildIncludes($(HEADERS),X11,..) +BuildIncludes($(HEADERS),nx-X11,..) #if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11,$(INSTINCFLAGS)) #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/include/XWDFile.h b/nx-X11/include/XWDFile.h index 0ce22e1a8..19a26ea33 100644 --- a/nx-X11/include/XWDFile.h +++ b/nx-X11/include/XWDFile.h @@ -39,7 +39,7 @@ in this Software without prior written authorization from The Open Group. #ifndef XWDFILE_H #define XWDFILE_H -#include +#include #define XWD_FILE_VERSION 7 #define sz_XWDheader 100 diff --git a/nx-X11/include/Xdefs.h b/nx-X11/include/Xdefs.h index f32149db5..c06202af3 100644 --- a/nx-X11/include/Xdefs.h +++ b/nx-X11/include/Xdefs.h @@ -31,7 +31,7 @@ authorization from The XFree86 Project Inc.. #define _XDEFS_H #ifdef _XSERVER64 -#include +#include #endif #ifndef _XTYPEDEF_ATOM diff --git a/nx-X11/include/Xfuncs.h b/nx-X11/include/Xfuncs.h index a059bc710..7582198bb 100644 --- a/nx-X11/include/Xfuncs.h +++ b/nx-X11/include/Xfuncs.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XFUNCS_H_ #define _XFUNCS_H_ -#include +#include /* the old Xfuncs.h, for pre-R6 */ #if !(defined(XFree86LOADER) && defined(IN_MODULE)) diff --git a/nx-X11/include/Xos.h b/nx-X11/include/Xos.h index 04b14b6fc..a2abf156f 100644 --- a/nx-X11/include/Xos.h +++ b/nx-X11/include/Xos.h @@ -37,7 +37,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XOS_H_ #define _XOS_H_ -#include +#include /* * Get major data types (esp. caddr_t) @@ -150,7 +150,7 @@ extern int sys_nerr; #include #endif #ifdef WIN32 -#include +#include #else #include #endif @@ -285,6 +285,6 @@ struct sockaddr_un { }; #endif -#include +#include #endif /* _XOS_H_ */ diff --git a/nx-X11/include/Xos_r.h b/nx-X11/include/Xos_r.h index e539aee2a..44b1eaacf 100644 --- a/nx-X11/include/Xos_r.h +++ b/nx-X11/include/Xos_r.h @@ -216,7 +216,7 @@ extern void XtProcessUnlock( * * #define X_INCLUDE_PWD_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetpwparams; * @@ -394,7 +394,7 @@ typedef int _Xgetpwret; * * #define X_INCLUDE_NETDB_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgethostbynameparams; * typedef ... _Xgetservbynameparams; @@ -556,7 +556,7 @@ typedef int _Xgetservbynameparams; /* dummy */ * * #define X_INCLUDE_DIRENT_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xreaddirparams; * @@ -680,7 +680,7 @@ extern int _Preaddir_r(DIR *, struct dirent *, struct dirent **); * * #define X_INCLUDE_UNISTD_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetloginparams; * typedef ... _Xttynameparams; @@ -822,7 +822,7 @@ typedef struct { * * #define X_INCLUDE_STRING_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xstrtokparams; * @@ -868,7 +868,7 @@ typedef char * _Xstrtokparams; * * #define X_INCLUDE_TIME_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xatimeparams; * typedef ... _Xctimeparams; @@ -1036,7 +1036,7 @@ typedef struct tm _Xltimeparams; * * #define X_INCLUDE_GRP_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetgrparams; * diff --git a/nx-X11/include/Xpoll.h.in b/nx-X11/include/Xpoll.h.in index 3200c3711..77a0aea3d 100644 --- a/nx-X11/include/Xpoll.h.in +++ b/nx-X11/include/Xpoll.h.in @@ -75,7 +75,7 @@ from The Open Group. #ifndef USE_POLL -#include +#include /* Below is the monster branch from hell. Basically, most systems will drop to * 'the branch below is the fallthrough for halfway modern systems', and include @@ -104,7 +104,7 @@ from The Open Group. # include #endif -#include +#include #ifdef CSRG_BASED #include @@ -241,7 +241,7 @@ extern int _XSelect(int maxfds, fd_set *readfds, fd_set *writefds, #ifndef FD_SETSIZE #define FD_SETSIZE XFD_SETSIZE #endif -#include +#include #define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t) diff --git a/nx-X11/include/Xproto.h b/nx-X11/include/Xproto.h index 877aab442..0f7d1f557 100644 --- a/nx-X11/include/Xproto.h +++ b/nx-X11/include/Xproto.h @@ -73,8 +73,8 @@ SOFTWARE. ******************************************************************/ -#include -#include +#include +#include /* * Define constants for the sizes of the network packets. The sz_ prefix is diff --git a/nx-X11/include/Xprotostr.h b/nx-X11/include/Xprotostr.h index f343d9849..a0f849874 100644 --- a/nx-X11/include/Xprotostr.h +++ b/nx-X11/include/Xprotostr.h @@ -48,7 +48,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -#include +#include /* Used by PolySegment */ diff --git a/nx-X11/include/Xthreads.h b/nx-X11/include/Xthreads.h index 54b5440ad..41440a2fb 100644 --- a/nx-X11/include/Xthreads.h +++ b/nx-X11/include/Xthreads.h @@ -98,7 +98,7 @@ extern xthread_t (*_x11_thr_self)(); #define xcondition_broadcast(cv) cond_broadcast(cv) #else /* !SVR4 */ #ifdef WIN32 -#include +#include typedef DWORD xthread_t; typedef DWORD xthread_key_t; struct _xthread_waiter { diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index ec6c10b98..b7ed23120 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -101,10 +101,10 @@ HEADERS = Xext.h \ all:: -BuildIncludes($(HEADERS),X11/extensions,../..) +BuildIncludes($(HEADERS),nx-X11/extensions,../..) #if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/extensions,$(INSTINCFLAGS)) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11/extensions,$(INSTINCFLAGS)) #endif InstallDriverSDKNonExecFile(XI.h,$(DRIVERSDKINCLUDEDIR)/extensions) diff --git a/nx-X11/include/extensions/MITMisc.h b/nx-X11/include/extensions/MITMisc.h index 975700e01..d66b8242d 100644 --- a/nx-X11/include/extensions/MITMisc.h +++ b/nx-X11/include/extensions/MITMisc.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XMITMISC_H_ #define _XMITMISC_H_ -#include +#include #define X_MITSetBugMode 0 #define X_MITGetBugMode 1 diff --git a/nx-X11/include/extensions/XEVI.h b/nx-X11/include/extensions/XEVI.h index d8e37ff4f..30b2412d9 100644 --- a/nx-X11/include/extensions/XEVI.h +++ b/nx-X11/include/extensions/XEVI.h @@ -25,7 +25,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XEVI_H_ #define _XEVI_H_ -#include +#include #define X_EVIQueryVersion 0 #define X_EVIGetVisualInfo 1 #define XEVI_TRANSPARENCY_NONE 0 diff --git a/nx-X11/include/extensions/XEVIstr.h b/nx-X11/include/extensions/XEVIstr.h index 388ef4bcf..4deb6c113 100644 --- a/nx-X11/include/extensions/XEVIstr.h +++ b/nx-X11/include/extensions/XEVIstr.h @@ -26,7 +26,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _EVISTR_H_ #define _EVISTR_H_ -#include +#include #define VisualID CARD32 #define EVINAME "Extended-Visual-Information" diff --git a/nx-X11/include/extensions/XInput.h b/nx-X11/include/extensions/XInput.h index ee4410531..cf4b72ca0 100644 --- a/nx-X11/include/extensions/XInput.h +++ b/nx-X11/include/extensions/XInput.h @@ -52,8 +52,8 @@ SOFTWARE. #ifndef _XINPUT_H_ #define _XINPUT_H_ -#include -#include +#include +#include #define _deviceKeyPress 0 #define _deviceKeyRelease 1 diff --git a/nx-X11/include/extensions/XIproto.h b/nx-X11/include/extensions/XIproto.h index 1da0248f8..cccb11a2c 100644 --- a/nx-X11/include/extensions/XIproto.h +++ b/nx-X11/include/extensions/XIproto.h @@ -50,8 +50,8 @@ SOFTWARE. #ifndef _XIPROTO_H #define _XIPROTO_H -#include -#include +#include +#include /* make sure types have right sizes for protocol structures. */ #define Window CARD32 diff --git a/nx-X11/include/extensions/XKBgeom.h b/nx-X11/include/extensions/XKBgeom.h index 89f902fba..6ef114bfe 100644 --- a/nx-X11/include/extensions/XKBgeom.h +++ b/nx-X11/include/extensions/XKBgeom.h @@ -29,7 +29,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ -#include +#include #ifdef XKB_IN_SERVER #define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias diff --git a/nx-X11/include/extensions/XKBproto.h b/nx-X11/include/extensions/XKBproto.h index 97dd4d262..2dc3b141e 100644 --- a/nx-X11/include/extensions/XKBproto.h +++ b/nx-X11/include/extensions/XKBproto.h @@ -28,8 +28,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBPROTO_H_ #define _XKBPROTO_H_ -#include -#include +#include +#include #define Window CARD32 #define Atom CARD32 diff --git a/nx-X11/include/extensions/XKBsrv.h b/nx-X11/include/extensions/XKBsrv.h index 0d262e979..3d335bc88 100644 --- a/nx-X11/include/extensions/XKBsrv.h +++ b/nx-X11/include/extensions/XKBsrv.h @@ -69,8 +69,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods #endif -#include -#include +#include +#include #include "inputstr.h" #ifdef NXAGENT_SERVER @@ -1100,9 +1100,9 @@ extern void XkbSendNewKeyboardNotify( #ifdef XKBSRV_NEED_FILE_FUNCS -#include -#include -#include +#include +#include +#include #define _XkbListKeymaps 0 #define _XkbListKeycodes 1 diff --git a/nx-X11/include/extensions/XKBstr.h b/nx-X11/include/extensions/XKBstr.h index 6131c931c..77666f6aa 100644 --- a/nx-X11/include/extensions/XKBstr.h +++ b/nx-X11/include/extensions/XKBstr.h @@ -28,7 +28,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBSTR_H_ #define _XKBSTR_H_ -#include +#include #define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) #define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) diff --git a/nx-X11/include/extensions/XLbx.h b/nx-X11/include/extensions/XLbx.h index 01d44f090..6cd867944 100644 --- a/nx-X11/include/extensions/XLbx.h +++ b/nx-X11/include/extensions/XLbx.h @@ -25,7 +25,7 @@ #ifndef _XLBX_H_ #define _XLBX_H_ -#include +#include /* * NOTE: any changes or additions to the opcodes needs to be reflected @@ -128,8 +128,8 @@ #ifndef _XLBX_SERVER_ -#include -#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/XShm.h b/nx-X11/include/extensions/XShm.h index 4ae14ca8b..4b0d01bef 100644 --- a/nx-X11/include/extensions/XShm.h +++ b/nx-X11/include/extensions/XShm.h @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XSHM_H_ #define _XSHM_H_ -#include +#include #define X_ShmQueryVersion 0 #define X_ShmAttach 1 diff --git a/nx-X11/include/extensions/XTest.h b/nx-X11/include/extensions/XTest.h index afb1849c3..4817ef132 100644 --- a/nx-X11/include/extensions/XTest.h +++ b/nx-X11/include/extensions/XTest.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XTEST_H_ #define _XTEST_H_ -#include +#include #define X_XTestGetVersion 0 #define X_XTestCompareCursor 1 @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XTEST_SERVER_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xag.h b/nx-X11/include/extensions/Xag.h index 815f2b9f9..4c1193e3d 100644 --- a/nx-X11/include/extensions/Xag.h +++ b/nx-X11/include/extensions/Xag.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAG_H_ #define _XAG_H_ -#include +#include #define X_XagQueryVersion 0 #define X_XagCreate 1 diff --git a/nx-X11/include/extensions/Xagsrv.h b/nx-X11/include/extensions/Xagsrv.h index b9c50aaa9..daf1af04d 100644 --- a/nx-X11/include/extensions/Xagsrv.h +++ b/nx-X11/include/extensions/Xagsrv.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAGSRV_H_ #define _XAGSRV_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xagstr.h b/nx-X11/include/extensions/Xagstr.h index ffb5527a2..4f12027e0 100644 --- a/nx-X11/include/extensions/Xagstr.h +++ b/nx-X11/include/extensions/Xagstr.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAGSTR_H_ /* { */ #define _XAGSTR_H_ -#include +#include #define XAppGroup CARD32 diff --git a/nx-X11/include/extensions/Xcup.h b/nx-X11/include/extensions/Xcup.h index b1df039e6..fb5fd0887 100644 --- a/nx-X11/include/extensions/Xcup.h +++ b/nx-X11/include/extensions/Xcup.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XCUP_H_ #define _XCUP_H_ -#include +#include #define X_XcupQueryVersion 0 #define X_XcupGetReservedColormapEntries 1 diff --git a/nx-X11/include/extensions/Xcupstr.h b/nx-X11/include/extensions/Xcupstr.h index f521c333c..fa77b5aea 100644 --- a/nx-X11/include/extensions/Xcupstr.h +++ b/nx-X11/include/extensions/Xcupstr.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XCUPSTR_H_ /* { */ #define _XCUPSTR_H_ -#include +#include #define XCUPNAME "TOG-CUP" diff --git a/nx-X11/include/extensions/Xdbe.h b/nx-X11/include/extensions/Xdbe.h index f9205a228..bc43007c6 100644 --- a/nx-X11/include/extensions/Xdbe.h +++ b/nx-X11/include/extensions/Xdbe.h @@ -38,8 +38,8 @@ /* INCLUDES */ -#include -#include +#include +#include /* DEFINES */ diff --git a/nx-X11/include/extensions/Xevie.h b/nx-X11/include/extensions/Xevie.h index d6d4fab84..5dc48bbfd 100644 --- a/nx-X11/include/extensions/Xevie.h +++ b/nx-X11/include/extensions/Xevie.h @@ -35,7 +35,7 @@ of the copyright holder. #ifndef _XEVIE_H_ #define _XEVIE_H_ -#include +#include #define XEVIE_UNMODIFIED 0 #define XEVIE_MODIFIED 1 diff --git a/nx-X11/include/extensions/Xext.h b/nx-X11/include/extensions/Xext.h index 5b62c8b2d..b0ce292fc 100644 --- a/nx-X11/include/extensions/Xext.h +++ b/nx-X11/include/extensions/Xext.h @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XEXT_H_ #define _XEXT_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xinerama.h b/nx-X11/include/extensions/Xinerama.h index e1c9445c3..77e7e7444 100644 --- a/nx-X11/include/extensions/Xinerama.h +++ b/nx-X11/include/extensions/Xinerama.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _Xinerama_h #define _Xinerama_h -#include +#include typedef struct { int screen_number; diff --git a/nx-X11/include/extensions/Xv.h b/nx-X11/include/extensions/Xv.h index 4e85fa719..f07f9d75f 100644 --- a/nx-X11/include/extensions/Xv.h +++ b/nx-X11/include/extensions/Xv.h @@ -44,7 +44,7 @@ SOFTWARE. ** */ -#include +#include #define XvName "XVideo" #define XvVersion 2 diff --git a/nx-X11/include/extensions/XvMC.h b/nx-X11/include/extensions/XvMC.h index 3e621f05a..1709692a1 100644 --- a/nx-X11/include/extensions/XvMC.h +++ b/nx-X11/include/extensions/XvMC.h @@ -3,8 +3,8 @@ #ifndef _XVMC_H_ #define _XVMC_H_ -#include -#include +#include +#include #define XvMCName "XVideo-MotionCompensation" #define XvMCNumEvents 0 diff --git a/nx-X11/include/extensions/XvMClib.h b/nx-X11/include/extensions/XvMClib.h index 1b30a669a..c1e94119e 100644 --- a/nx-X11/include/extensions/XvMClib.h +++ b/nx-X11/include/extensions/XvMClib.h @@ -4,9 +4,9 @@ #ifndef _XVMCLIB_H_ #define _XVMCLIB_H_ -#include -#include -#include +#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xvlib.h b/nx-X11/include/extensions/Xvlib.h index 2fd26e55b..98c407e31 100644 --- a/nx-X11/include/extensions/Xvlib.h +++ b/nx-X11/include/extensions/Xvlib.h @@ -53,8 +53,8 @@ SOFTWARE. ** */ -#include -#include +#include +#include typedef struct { int numerator; diff --git a/nx-X11/include/extensions/Xvproto.h b/nx-X11/include/extensions/Xvproto.h index 9112f510e..81e1656a8 100644 --- a/nx-X11/include/extensions/Xvproto.h +++ b/nx-X11/include/extensions/Xvproto.h @@ -49,7 +49,7 @@ SOFTWARE. ** */ -#include +#include /* Symbols: These are undefined at the end of this file to restore the values they have in Xv.h */ diff --git a/nx-X11/include/extensions/composite.h b/nx-X11/include/extensions/composite.h index bfdfbee97..d1901750a 100644 --- a/nx-X11/include/extensions/composite.h +++ b/nx-X11/include/extensions/composite.h @@ -25,7 +25,7 @@ #ifndef _COMPOSITE_H_ #define _COMPOSITE_H_ -#include +#include #define COMPOSITE_NAME "Composite" #define COMPOSITE_MAJOR 0 diff --git a/nx-X11/include/extensions/compositeproto.h b/nx-X11/include/extensions/compositeproto.h index 2304e961d..a851c727e 100644 --- a/nx-X11/include/extensions/compositeproto.h +++ b/nx-X11/include/extensions/compositeproto.h @@ -25,8 +25,8 @@ #ifndef _COMPOSITEPROTO_H_ #define _COMPOSITEPROTO_H_ -#include -#include +#include +#include #define Window CARD32 #define Region CARD32 diff --git a/nx-X11/include/extensions/dpms.h b/nx-X11/include/extensions/dpms.h index 7555f4ab6..87d7c9c81 100644 --- a/nx-X11/include/extensions/dpms.h +++ b/nx-X11/include/extensions/dpms.h @@ -46,8 +46,8 @@ Equipment Corporation. #ifndef DPMS_SERVER -#include -#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/extutil.h b/nx-X11/include/extensions/extutil.h index 825d81e93..de6becfd2 100644 --- a/nx-X11/include/extensions/extutil.h +++ b/nx-X11/include/extensions/extutil.h @@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _EXTUTIL_H_ #define _EXTUTIL_H_ -#include +#include /* * We need to keep a list of open displays since the Xlib display list isn't diff --git a/nx-X11/include/extensions/fontcache.h b/nx-X11/include/extensions/fontcache.h index b767db19b..2a3cf619b 100644 --- a/nx-X11/include/extensions/fontcache.h +++ b/nx-X11/include/extensions/fontcache.h @@ -68,7 +68,7 @@ typedef struct { #ifndef _FONTCACHE_SERVER_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/fontcacheP.h b/nx-X11/include/extensions/fontcacheP.h index 75677f300..5363ef149 100644 --- a/nx-X11/include/extensions/fontcacheP.h +++ b/nx-X11/include/extensions/fontcacheP.h @@ -31,7 +31,7 @@ #ifndef _FONTCACHEP_H_ #define _FONTCACHEP_H_ -#include +#include int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); diff --git a/nx-X11/include/extensions/fontcachstr.h b/nx-X11/include/extensions/fontcachstr.h index eab704e23..abead0f2b 100644 --- a/nx-X11/include/extensions/fontcachstr.h +++ b/nx-X11/include/extensions/fontcachstr.h @@ -34,7 +34,7 @@ #ifndef _FONTCACHESTR_H_ #define _FONTCACHESTR_H_ -#include +#include #define FONTCACHENAME "FontCache" diff --git a/nx-X11/include/extensions/lbxbuf.h b/nx-X11/include/extensions/lbxbuf.h index 63983df16..1a5a7475a 100644 --- a/nx-X11/include/extensions/lbxbuf.h +++ b/nx-X11/include/extensions/lbxbuf.h @@ -38,7 +38,7 @@ typedef struct _zlibbuffer *ZlibBufferPtr; -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/lbxbufstr.h b/nx-X11/include/extensions/lbxbufstr.h index e1a06f633..d99730e7e 100644 --- a/nx-X11/include/extensions/lbxbufstr.h +++ b/nx-X11/include/extensions/lbxbufstr.h @@ -27,7 +27,7 @@ #ifndef _BUFFERSTR_H_ #define _BUFFERSTR_H_ -#include +#include /* * ZLIB Input/Output buffer diff --git a/nx-X11/include/extensions/lbximage.h b/nx-X11/include/extensions/lbximage.h index 10627cf29..fff181a69 100644 --- a/nx-X11/include/extensions/lbximage.h +++ b/nx-X11/include/extensions/lbximage.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _LBX_IMAGE_H_ #define _LBX_IMAGE_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/lbxstr.h b/nx-X11/include/extensions/lbxstr.h index a7521b1be..7bde5a766 100644 --- a/nx-X11/include/extensions/lbxstr.h +++ b/nx-X11/include/extensions/lbxstr.h @@ -25,7 +25,7 @@ #ifndef _LBXSTR_H_ #define _LBXSTR_H_ -#include +#include #define LBXNAME "LBX" diff --git a/nx-X11/include/extensions/multibuf.h b/nx-X11/include/extensions/multibuf.h index 96b4c3b14..c35399b01 100644 --- a/nx-X11/include/extensions/multibuf.h +++ b/nx-X11/include/extensions/multibuf.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _MULTIBUF_H_ #define _MULTIBUF_H_ -#include +#include #define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" diff --git a/nx-X11/include/extensions/recordstr.h b/nx-X11/include/extensions/recordstr.h index 246d34f1a..88ff8b66b 100644 --- a/nx-X11/include/extensions/recordstr.h +++ b/nx-X11/include/extensions/recordstr.h @@ -29,7 +29,7 @@ static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44"; #ifndef _RECORDSTR_H_ #define _RECORDSTR_H_ -#include +#include #define RECORD_NAME "RECORD" #define RECORD_MAJOR_VERSION 1 diff --git a/nx-X11/include/extensions/renderproto.h b/nx-X11/include/extensions/renderproto.h index bdd4c746f..25c510cd1 100644 --- a/nx-X11/include/extensions/renderproto.h +++ b/nx-X11/include/extensions/renderproto.h @@ -26,8 +26,8 @@ #ifndef _XRENDERP_H_ #define _XRENDERP_H_ -#include -#include +#include +#include #define Window CARD32 #define Drawable CARD32 diff --git a/nx-X11/include/extensions/saverproto.h b/nx-X11/include/extensions/saverproto.h index 1a671af91..17f740f4d 100644 --- a/nx-X11/include/extensions/saverproto.h +++ b/nx-X11/include/extensions/saverproto.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from the X Consortium. #ifndef _SAVERPROTO_H_ #define _SAVERPROTO_H_ -#include +#include #define Window CARD32 #define Drawable CARD32 diff --git a/nx-X11/include/extensions/scrnsaver.h b/nx-X11/include/extensions/scrnsaver.h index 2659edd73..38e5e24df 100644 --- a/nx-X11/include/extensions/scrnsaver.h +++ b/nx-X11/include/extensions/scrnsaver.h @@ -31,9 +31,9 @@ in this Software without prior written authorization from the X Consortium. #ifndef _SCRNSAVER_H_ #define _SCRNSAVER_H_ -#include -#include -#include +#include +#include +#include typedef struct { int type; /* of event */ diff --git a/nx-X11/include/extensions/security.h b/nx-X11/include/extensions/security.h index 188ad55bc..a0aabaf8e 100644 --- a/nx-X11/include/extensions/security.h +++ b/nx-X11/include/extensions/security.h @@ -30,7 +30,7 @@ from The Open Group. #define _SECURITY_H #define _XAUTH_STRUCT_ONLY -#include +#include /* constants that server, library, and application all need */ diff --git a/nx-X11/include/extensions/securstr.h b/nx-X11/include/extensions/securstr.h index 50c764441..3e93fe10e 100644 --- a/nx-X11/include/extensions/securstr.h +++ b/nx-X11/include/extensions/securstr.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _SECURSTR_H #define _SECURSTR_H -#include +#include #define SECURITY_EXTENSION_NAME "SECURITY" #define SECURITY_MAJOR_VERSION 1 diff --git a/nx-X11/include/extensions/shape.h b/nx-X11/include/extensions/shape.h index d173efef8..5e85ffc04 100644 --- a/nx-X11/include/extensions/shape.h +++ b/nx-X11/include/extensions/shape.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _SHAPE_H_ #define _SHAPE_H_ -#include +#include #define X_ShapeQueryVersion 0 #define X_ShapeRectangles 1 @@ -59,7 +59,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _SHAPE_SERVER_ -#include +#include typedef struct { int type; /* of event */ diff --git a/nx-X11/include/extensions/sync.h b/nx-X11/include/extensions/sync.h index 9fbe6d72f..8d2861663 100644 --- a/nx-X11/include/extensions/sync.h +++ b/nx-X11/include/extensions/sync.h @@ -53,7 +53,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifndef _SYNC_H_ #define _SYNC_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/vldXvMC.h b/nx-X11/include/extensions/vldXvMC.h index 91fb3b76a..355c662e6 100644 --- a/nx-X11/include/extensions/vldXvMC.h +++ b/nx-X11/include/extensions/vldXvMC.h @@ -28,9 +28,9 @@ #ifndef _VLDXVMC_H #define _VLDXVMC_H -#include -#include -#include +#include +#include +#include /* * New "Motion compensation type". diff --git a/nx-X11/include/extensions/xf86bigfont.h b/nx-X11/include/extensions/xf86bigfont.h index 654cc401b..d6be21b6f 100644 --- a/nx-X11/include/extensions/xf86bigfont.h +++ b/nx-X11/include/extensions/xf86bigfont.h @@ -11,7 +11,7 @@ #ifndef _XF86BIGFONT_H_ #define _XF86BIGFONT_H_ -#include +#include #define X_XF86BigfontQueryVersion 0 #define X_XF86BigfontQueryFont 1 diff --git a/nx-X11/include/extensions/xf86bigfstr.h b/nx-X11/include/extensions/xf86bigfstr.h index 95f107a2a..6f66e58d9 100644 --- a/nx-X11/include/extensions/xf86bigfstr.h +++ b/nx-X11/include/extensions/xf86bigfstr.h @@ -11,7 +11,7 @@ #ifndef _XF86BIGFSTR_H_ #define _XF86BIGFSTR_H_ -#include +#include #define XF86BIGFONTNAME "XFree86-Bigfont" diff --git a/nx-X11/include/extensions/xf86dga.h b/nx-X11/include/extensions/xf86dga.h index 720118842..d6e494158 100644 --- a/nx-X11/include/extensions/xf86dga.h +++ b/nx-X11/include/extensions/xf86dga.h @@ -6,8 +6,8 @@ #ifndef _XF86DGA_H_ #define _XF86DGA_H_ -#include -#include +#include +#include #define X_XDGAQueryVersion 0 diff --git a/nx-X11/include/extensions/xf86dga1.h b/nx-X11/include/extensions/xf86dga1.h index 4f45e74b3..972b18e9e 100644 --- a/nx-X11/include/extensions/xf86dga1.h +++ b/nx-X11/include/extensions/xf86dga1.h @@ -15,7 +15,7 @@ Copyright (c) 1995 XFree86 Inc #ifndef _XF86DGA1_H_ #define _XF86DGA1_H_ -#include +#include #define X_XF86DGAQueryVersion 0 #define X_XF86DGAGetVideoLL 1 diff --git a/nx-X11/include/extensions/xf86dgastr.h b/nx-X11/include/extensions/xf86dgastr.h index 66dd354c8..30e4ff722 100644 --- a/nx-X11/include/extensions/xf86dgastr.h +++ b/nx-X11/include/extensions/xf86dgastr.h @@ -9,7 +9,7 @@ Copyright (c) 1995 XFree86 Inc. #ifndef _XF86DGASTR_H_ #define _XF86DGASTR_H_ -#include +#include #define XF86DGANAME "XFree86-DGA" diff --git a/nx-X11/include/extensions/xf86misc.h b/nx-X11/include/extensions/xf86misc.h index f5d7a5664..fb01a6357 100644 --- a/nx-X11/include/extensions/xf86misc.h +++ b/nx-X11/include/extensions/xf86misc.h @@ -9,7 +9,7 @@ #ifndef _XF86MISC_H_ #define _XF86MISC_H_ -#include +#include #define X_XF86MiscQueryVersion 0 #ifdef _XF86MISC_SAVER_COMPAT_ diff --git a/nx-X11/include/extensions/xf86mscstr.h b/nx-X11/include/extensions/xf86mscstr.h index 637d3a5a0..2b8c0d07e 100644 --- a/nx-X11/include/extensions/xf86mscstr.h +++ b/nx-X11/include/extensions/xf86mscstr.h @@ -9,7 +9,7 @@ #ifndef _XF86MISCSTR_H_ #define _XF86MISCSTR_H_ -#include +#include #define XF86MISCNAME "XFree86-Misc" diff --git a/nx-X11/include/extensions/xf86vmode.h b/nx-X11/include/extensions/xf86vmode.h index 3420ae4c8..624820dea 100644 --- a/nx-X11/include/extensions/xf86vmode.h +++ b/nx-X11/include/extensions/xf86vmode.h @@ -35,8 +35,8 @@ from Kaleb S. KEITHLEY #ifndef _XF86VIDMODE_H_ #define _XF86VIDMODE_H_ -#include -#include +#include +#include #define X_XF86VidModeQueryVersion 0 #define X_XF86VidModeGetModeLine 1 diff --git a/nx-X11/include/extensions/xf86vmstr.h b/nx-X11/include/extensions/xf86vmstr.h index a80eb8eb6..43c67980f 100644 --- a/nx-X11/include/extensions/xf86vmstr.h +++ b/nx-X11/include/extensions/xf86vmstr.h @@ -35,7 +35,7 @@ from Kaleb S. KEITHLEY #ifndef _XF86VIDMODESTR_H_ #define _XF86VIDMODESTR_H_ -#include +#include #define XF86VIDMODENAME "XFree86-VidModeExtension" diff --git a/nx-X11/include/extensions/xfixesproto.h b/nx-X11/include/extensions/xfixesproto.h index 773bc65d1..0ef6a2fd6 100644 --- a/nx-X11/include/extensions/xfixesproto.h +++ b/nx-X11/include/extensions/xfixesproto.h @@ -25,10 +25,10 @@ #ifndef _XFIXESPROTO_H_ #define _XFIXESPROTO_H_ -#include -#include +#include +#include #define _SHAPE_SERVER_ -#include +#include #undef _SHAPE_SERVER_ #define Window CARD32 diff --git a/nx-X11/include/extensions/xtrapddmi.h b/nx-X11/include/extensions/xtrapddmi.h index c187a3a0b..71df0712d 100644 --- a/nx-X11/include/extensions/xtrapddmi.h +++ b/nx-X11/include/extensions/xtrapddmi.h @@ -42,8 +42,8 @@ SOFTWARE. * contained herein should *not* be visible to clients (xtrapdi.h * is used for this). The name is historical. */ -#include -#include +#include +#include #include "dix.h" #ifndef MIN diff --git a/nx-X11/include/extensions/xtrapdi.h b/nx-X11/include/extensions/xtrapdi.h index 9db13bb20..34696113d 100644 --- a/nx-X11/include/extensions/xtrapdi.h +++ b/nx-X11/include/extensions/xtrapdi.h @@ -48,14 +48,14 @@ SOFTWARE. #ifndef IN_MODULE #include #endif -#include -#include +#include +#include #ifdef SMT #define NEED_EVENTS #define NEED_REPLIES #endif -#include -#include +#include +#include #define XTrapExtName "DEC-XTRAP" /* Current Release, Version, and Revision of the XTrap Extension */ #define XETrapRelease 3L diff --git a/nx-X11/include/extensions/xtrapemacros.h b/nx-X11/include/extensions/xtrapemacros.h index f59ea3391..f5dc2be31 100644 --- a/nx-X11/include/extensions/xtrapemacros.h +++ b/nx-X11/include/extensions/xtrapemacros.h @@ -43,7 +43,7 @@ SOFTWARE. * specified; however, use of Trap Context convenience * routines is strongly encouraged (XETrapContext.c) */ -#include +#include #include /* msleep macro to replace msleep() for portability reasons */ diff --git a/nx-X11/include/extensions/xtraplib.h b/nx-X11/include/extensions/xtraplib.h index f3f273aab..b733dac7f 100644 --- a/nx-X11/include/extensions/xtraplib.h +++ b/nx-X11/include/extensions/xtraplib.h @@ -47,10 +47,10 @@ SOFTWARE. #define NEED_EVENTS #define NEED_REPLIES #endif -#include -#include -#include -#include +#include +#include +#include +#include typedef struct /* Callback structure */ { diff --git a/nx-X11/include/keysym.h b/nx-X11/include/keysym.h index 785fed32e..cd518a792 100644 --- a/nx-X11/include/keysym.h +++ b/nx-X11/include/keysym.h @@ -71,5 +71,5 @@ SOFTWARE. #define XK_CURRENCY #define XK_MATHEMATICAL -#include +#include diff --git a/nx-X11/lib/X11/ClDisplay.c b/nx-X11/lib/X11/ClDisplay.c index b7a58751e..dfbc2f518 100644 --- a/nx-X11/lib/X11/ClDisplay.c +++ b/nx-X11/lib/X11/ClDisplay.c @@ -32,7 +32,7 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlib.h" #include "Xlibint.h" #include "Xintconn.h" diff --git a/nx-X11/lib/X11/ConnDis.c b/nx-X11/lib/X11/ConnDis.c index 30146a9f1..177ff2c59 100644 --- a/nx-X11/lib/X11/ConnDis.c +++ b/nx-X11/lib/X11/ConnDis.c @@ -54,9 +54,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include #include #include @@ -68,7 +68,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #else -#include +#include #endif #ifndef X_CONNECTION_RETRIES /* number retries on ECONNREFUSED */ diff --git a/nx-X11/lib/X11/ErrDes.c b/nx-X11/lib/X11/ErrDes.c index 16183e85e..64373ffd0 100644 --- a/nx-X11/lib/X11/ErrDes.c +++ b/nx-X11/lib/X11/ErrDes.c @@ -55,7 +55,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "Xresource.h" #include diff --git a/nx-X11/lib/X11/FSWrap.c b/nx-X11/lib/X11/FSWrap.c index d40f3b035..77dd3b59c 100644 --- a/nx-X11/lib/X11/FSWrap.c +++ b/nx-X11/lib/X11/FSWrap.c @@ -64,7 +64,7 @@ from The Open Group. #include "Xlibint.h" #include "Xlcint.h" #include -#include +#include #define XMAXLIST 256 diff --git a/nx-X11/lib/X11/FetchName.c b/nx-X11/lib/X11/FetchName.c index 3d41472f3..216c7453d 100644 --- a/nx-X11/lib/X11/FetchName.c +++ b/nx-X11/lib/X11/FetchName.c @@ -28,9 +28,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include diff --git a/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index 92a6a8f4a..8c8d1e443 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/Font.c @@ -47,7 +47,7 @@ authorization from the X Consortium and the XFree86 Project. #include #include -#include +#include #endif #include "Xlcint.h" diff --git a/nx-X11/lib/X11/GetDflt.c b/nx-X11/lib/X11/GetDflt.c index 8a8563379..a881f1c28 100644 --- a/nx-X11/lib/X11/GetDflt.c +++ b/nx-X11/lib/X11/GetDflt.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE @@ -80,12 +80,12 @@ SOFTWARE. #endif #ifdef XTHREADS -#include +#include #endif #ifndef WIN32 #define X_INCLUDE_PWD_H #define XOS_USE_XLIB_LOCKING -#include +#include #endif #include #include diff --git a/nx-X11/lib/X11/GetHints.c b/nx-X11/lib/X11/GetHints.c index 4faccb624..2c4d49d61 100644 --- a/nx-X11/lib/X11/GetHints.c +++ b/nx-X11/lib/X11/GetHints.c @@ -51,11 +51,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xatomtype.h" -#include +#include #include Status XGetSizeHints (dpy, w, hints, property) diff --git a/nx-X11/lib/X11/GetImage.c b/nx-X11/lib/X11/GetImage.c index ffe9d226f..634910d79 100644 --- a/nx-X11/lib/X11/GetImage.c +++ b/nx-X11/lib/X11/GetImage.c @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include /* for XDestroyImage */ +#include /* for XDestroyImage */ #include "ImUtil.h" #define ROUNDUP(nbytes, pad) (((((nbytes) - 1) + (pad)) / (pad)) * (pad)) diff --git a/nx-X11/lib/X11/GetNrmHint.c b/nx-X11/lib/X11/GetNrmHint.c index 9dcb7c403..c770df43d 100644 --- a/nx-X11/lib/X11/GetNrmHint.c +++ b/nx-X11/lib/X11/GetNrmHint.c @@ -55,10 +55,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include #include Status XGetWMSizeHints (dpy, w, hints, supplied, property) diff --git a/nx-X11/lib/X11/GetRGBCMap.c b/nx-X11/lib/X11/GetRGBCMap.c index 6657c539a..4df3ccced 100644 --- a/nx-X11/lib/X11/GetRGBCMap.c +++ b/nx-X11/lib/X11/GetRGBCMap.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include Status XGetRGBColormaps (dpy, w, stdcmap, count, property) Display *dpy; diff --git a/nx-X11/lib/X11/GetStCmap.c b/nx-X11/lib/X11/GetStCmap.c index 5c8c37e78..ae085aa87 100644 --- a/nx-X11/lib/X11/GetStCmap.c +++ b/nx-X11/lib/X11/GetStCmap.c @@ -50,10 +50,10 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include /* * WARNING diff --git a/nx-X11/lib/X11/GetTxtProp.c b/nx-X11/lib/X11/GetTxtProp.c index 0d4474253..dbff8abc8 100644 --- a/nx-X11/lib/X11/GetTxtProp.c +++ b/nx-X11/lib/X11/GetTxtProp.c @@ -52,10 +52,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include Status XGetTextProperty (display, window, tp, property) diff --git a/nx-X11/lib/X11/GetWMCMapW.c b/nx-X11/lib/X11/GetWMCMapW.c index 6d5c73c85..496efd208 100644 --- a/nx-X11/lib/X11/GetWMCMapW.c +++ b/nx-X11/lib/X11/GetWMCMapW.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include Status XGetWMColormapWindows (dpy, w, colormapWindows, countReturn) diff --git a/nx-X11/lib/X11/GetWMProto.c b/nx-X11/lib/X11/GetWMProto.c index 9b244ce6a..8584a4214 100644 --- a/nx-X11/lib/X11/GetWMProto.c +++ b/nx-X11/lib/X11/GetWMProto.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include Status XGetWMProtocols (dpy, w, protocols, countReturn) diff --git a/nx-X11/lib/X11/HVC.c b/nx-X11/lib/X11/HVC.c index 79241fb7a..84fac58b9 100644 --- a/nx-X11/lib/X11/HVC.c +++ b/nx-X11/lib/X11/HVC.c @@ -55,7 +55,7 @@ #endif #include "Xlibint.h" #include "Xcmsint.h" -#include +#include #include #include "Cv.h" diff --git a/nx-X11/lib/X11/Iconify.c b/nx-X11/lib/X11/Iconify.c index 62e57b84e..e68508666 100644 --- a/nx-X11/lib/X11/Iconify.c +++ b/nx-X11/lib/X11/Iconify.c @@ -54,10 +54,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/ImUtil.c b/nx-X11/lib/X11/ImUtil.c index 85f4183f4..2be839928 100644 --- a/nx-X11/lib/X11/ImUtil.c +++ b/nx-X11/lib/X11/ImUtil.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include "ImUtil.h" diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 212216f46..81a1cfd3d 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -85,7 +85,7 @@ NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status #define LibName NX_X11 #define SoRev SOXLIBREV #define HugeLibrary YES -#define IncSubdir X11 +#define IncSubdir nx-X11 #if BuildLoadableXlibI18n SUBDIRS = xlibi18n diff --git a/nx-X11/lib/X11/InitExt.c b/nx-X11/lib/X11/InitExt.c index 67c865787..5aab682c7 100644 --- a/nx-X11/lib/X11/InitExt.c +++ b/nx-X11/lib/X11/InitExt.c @@ -31,8 +31,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c index fab9eeacd..d99cfdf2f 100644 --- a/nx-X11/lib/X11/KeyBind.c +++ b/nx-X11/lib/X11/KeyBind.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #define XK_MISCELLANY #define XK_LATIN1 #define XK_LATIN2 @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. #define XK_CAUCASUS #define XK_VIETNAMESE #define XK_XKB_KEYS -#include +#include #include #ifdef USE_OWN_COMPOSE diff --git a/nx-X11/lib/X11/KeysymStr.c b/nx-X11/lib/X11/KeysymStr.c index 59aa3f32c..b43e2735a 100644 --- a/nx-X11/lib/X11/KeysymStr.c +++ b/nx-X11/lib/X11/KeysymStr.c @@ -31,8 +31,8 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #include /* sprintf */ diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c index e4bc0b500..392c59579 100644 --- a/nx-X11/lib/X11/LRGB.c +++ b/nx-X11/lib/X11/LRGB.c @@ -41,8 +41,8 @@ #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/Lab.c b/nx-X11/lib/X11/Lab.c index 596c137f8..19b3e3a1d 100644 --- a/nx-X11/lib/X11/Lab.c +++ b/nx-X11/lib/X11/Lab.c @@ -42,7 +42,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include /* sscanf */ #include "Xlibint.h" #include "Xcmsint.h" diff --git a/nx-X11/lib/X11/Luv.c b/nx-X11/lib/X11/Luv.c index ec94c9e56..206ae1017 100644 --- a/nx-X11/lib/X11/Luv.c +++ b/nx-X11/lib/X11/Luv.c @@ -43,7 +43,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/OpenDis.c b/nx-X11/lib/X11/OpenDis.c index e9d019723..67f7ccbd1 100644 --- a/nx-X11/lib/X11/OpenDis.c +++ b/nx-X11/lib/X11/OpenDis.c @@ -50,10 +50,10 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "Xintconn.h" diff --git a/nx-X11/lib/X11/ParseCmd.c b/nx-X11/lib/X11/ParseCmd.c index ddcbf7846..fe20f6eff 100644 --- a/nx-X11/lib/X11/ParseCmd.c +++ b/nx-X11/lib/X11/ParseCmd.c @@ -61,7 +61,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include diff --git a/nx-X11/lib/X11/PolyReg.c b/nx-X11/lib/X11/PolyReg.c index 4b17ec5c5..6e1f7ead8 100644 --- a/nx-X11/lib/X11/PolyReg.c +++ b/nx-X11/lib/X11/PolyReg.c @@ -55,7 +55,7 @@ SOFTWARE. #endif #include "Xlibint.h" #include "Xutil.h" -#include +#include #include "poly.h" /* diff --git a/nx-X11/lib/X11/Quarks.c b/nx-X11/lib/X11/Quarks.c index d47bce314..a49562aac 100644 --- a/nx-X11/lib/X11/Quarks.c +++ b/nx-X11/lib/X11/Quarks.c @@ -55,7 +55,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xresinternal.h" /* Not cost effective, at least for vanilla MIT clients */ diff --git a/nx-X11/lib/X11/RdBitF.c b/nx-X11/lib/X11/RdBitF.c index 198e0e4a5..97afcc493 100644 --- a/nx-X11/lib/X11/RdBitF.c +++ b/nx-X11/lib/X11/RdBitF.c @@ -47,7 +47,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xutil.h" #include #include diff --git a/nx-X11/lib/X11/Region.c b/nx-X11/lib/X11/Region.c index cdd223b25..bef46def0 100644 --- a/nx-X11/lib/X11/Region.c +++ b/nx-X11/lib/X11/Region.c @@ -77,7 +77,7 @@ SOFTWARE. #endif #include "Xlibint.h" #include "Xutil.h" -#include +#include #include "poly.h" #ifdef DEBUG diff --git a/nx-X11/lib/X11/ScrResStr.c b/nx-X11/lib/X11/ScrResStr.c index 89f771784..7feb3b388 100644 --- a/nx-X11/lib/X11/ScrResStr.c +++ b/nx-X11/lib/X11/ScrResStr.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include +#include char *XScreenResourceString(screen) Screen *screen; diff --git a/nx-X11/lib/X11/SetHints.c b/nx-X11/lib/X11/SetHints.c index 5ee34435d..27b1bedbc 100644 --- a/nx-X11/lib/X11/SetHints.c +++ b/nx-X11/lib/X11/SetHints.c @@ -51,11 +51,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include -#include +#include +#include #define safestrlen(s) ((s) ? strlen(s) : 0) diff --git a/nx-X11/lib/X11/SetLocale.c b/nx-X11/lib/X11/SetLocale.c index bb4f850e3..875718dca 100644 --- a/nx-X11/lib/X11/SetLocale.c +++ b/nx-X11/lib/X11/SetLocale.c @@ -63,8 +63,8 @@ from The Open Group. #endif #include "Xlibint.h" #include "Xlcint.h" -#include -#include +#include +#include #include "XlcPubI.h" #define MAXLOCALE 64 /* buffer size of locale name */ diff --git a/nx-X11/lib/X11/SetNrmHint.c b/nx-X11/lib/X11/SetNrmHint.c index 64b0ef7f3..e8e6daf31 100644 --- a/nx-X11/lib/X11/SetNrmHint.c +++ b/nx-X11/lib/X11/SetNrmHint.c @@ -54,11 +54,11 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include -#include +#include +#include void XSetWMSizeHints (dpy, w, hints, prop) Display *dpy; diff --git a/nx-X11/lib/X11/SetRGBCMap.c b/nx-X11/lib/X11/SetRGBCMap.c index 4be840b75..03aa9392c 100644 --- a/nx-X11/lib/X11/SetRGBCMap.c +++ b/nx-X11/lib/X11/SetRGBCMap.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include void XSetRGBColormaps (dpy, w, cmaps, count, property) Display *dpy; diff --git a/nx-X11/lib/X11/SetStCmap.c b/nx-X11/lib/X11/SetStCmap.c index b5a93e36e..521b9480d 100644 --- a/nx-X11/lib/X11/SetStCmap.c +++ b/nx-X11/lib/X11/SetStCmap.c @@ -50,10 +50,10 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include /* * WARNING diff --git a/nx-X11/lib/X11/SetTxtProp.c b/nx-X11/lib/X11/SetTxtProp.c index a82d9b3e3..ae8b81e29 100644 --- a/nx-X11/lib/X11/SetTxtProp.c +++ b/nx-X11/lib/X11/SetTxtProp.c @@ -52,10 +52,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include void XSetTextProperty (dpy, w, tp, property) diff --git a/nx-X11/lib/X11/SetWMCMapW.c b/nx-X11/lib/X11/SetWMCMapW.c index dd88061da..6774d7326 100644 --- a/nx-X11/lib/X11/SetWMCMapW.c +++ b/nx-X11/lib/X11/SetWMCMapW.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include /* * XSetWMProtocols sets the property diff --git a/nx-X11/lib/X11/SetWMProto.c b/nx-X11/lib/X11/SetWMProto.c index 8640e5060..bc7dcf63c 100644 --- a/nx-X11/lib/X11/SetWMProto.c +++ b/nx-X11/lib/X11/SetWMProto.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include /* * XSetWMProtocols sets the property diff --git a/nx-X11/lib/X11/StBytes.c b/nx-X11/lib/X11/StBytes.c index b23902581..676652678 100644 --- a/nx-X11/lib/X11/StBytes.c +++ b/nx-X11/lib/X11/StBytes.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include /* insulate predefined atom numbers from cut routines */ static Atom n_to_atom[8] = { diff --git a/nx-X11/lib/X11/StName.c b/nx-X11/lib/X11/StName.c index ba01ffb0c..d3053346c 100644 --- a/nx-X11/lib/X11/StName.c +++ b/nx-X11/lib/X11/StName.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include int XStoreName ( diff --git a/nx-X11/lib/X11/StrKeysym.c b/nx-X11/lib/X11/StrKeysym.c index 74ccecbcd..fc1e7a34d 100644 --- a/nx-X11/lib/X11/StrKeysym.c +++ b/nx-X11/lib/X11/StrKeysym.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #include "Xresinternal.h" #define NEEDKTABLE diff --git a/nx-X11/lib/X11/StrToText.c b/nx-X11/lib/X11/StrToText.c index ba894e16f..5fd9c6ec6 100644 --- a/nx-X11/lib/X11/StrToText.c +++ b/nx-X11/lib/X11/StrToText.c @@ -28,9 +28,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include /* * XStringListToTextProperty - fill in TextProperty structure with diff --git a/nx-X11/lib/X11/TextToStr.c b/nx-X11/lib/X11/TextToStr.c index 0bea8096d..f4c00adcf 100644 --- a/nx-X11/lib/X11/TextToStr.c +++ b/nx-X11/lib/X11/TextToStr.c @@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include /* diff --git a/nx-X11/lib/X11/WMProps.c b/nx-X11/lib/X11/WMProps.c index 62c6a8d12..7a390a9d7 100644 --- a/nx-X11/lib/X11/WMProps.c +++ b/nx-X11/lib/X11/WMProps.c @@ -55,11 +55,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* diff --git a/nx-X11/lib/X11/Withdraw.c b/nx-X11/lib/X11/Withdraw.c index 1b771c286..2037b8e46 100644 --- a/nx-X11/lib/X11/Withdraw.c +++ b/nx-X11/lib/X11/Withdraw.c @@ -54,10 +54,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/WrBitF.c b/nx-X11/lib/X11/WrBitF.c index d8c9f18fa..d48295f0b 100644 --- a/nx-X11/lib/X11/WrBitF.c +++ b/nx-X11/lib/X11/WrBitF.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xutil.h" #include diff --git a/nx-X11/lib/X11/XDefaultOMIF.c b/nx-X11/lib/X11/XDefaultOMIF.c index 13f0d9cff..b4e63091b 100644 --- a/nx-X11/lib/X11/XDefaultOMIF.c +++ b/nx-X11/lib/X11/XDefaultOMIF.c @@ -49,8 +49,8 @@ Sun Microsystems, Inc. or its licensors is granted. #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" -#include -#include +#include +#include #include #define MAXFONTS 100 diff --git a/nx-X11/lib/X11/XKB.c b/nx-X11/lib/X11/XKB.c index ecc5ddf0a..413a51eb6 100644 --- a/nx-X11/lib/X11/XKB.c +++ b/nx-X11/lib/X11/XKB.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" XkbInternAtomFunc _XkbInternAtomFunc= XInternAtom; diff --git a/nx-X11/lib/X11/XKBAlloc.c b/nx-X11/lib/X11/XKBAlloc.c index 9430ac0ed..131985444 100644 --- a/nx-X11/lib/X11/XKBAlloc.c +++ b/nx-X11/lib/X11/XKBAlloc.c @@ -39,21 +39,21 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBBell.c b/nx-X11/lib/X11/XKBBell.c index 6ea30855e..51869097e 100644 --- a/nx-X11/lib/X11/XKBBell.c +++ b/nx-X11/lib/X11/XKBBell.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBBind.c b/nx-X11/lib/X11/XKBBind.c index e190d0052..6c1864d41 100644 --- a/nx-X11/lib/X11/XKBBind.c +++ b/nx-X11/lib/X11/XKBBind.c @@ -35,13 +35,13 @@ from The Open Group. #include #endif #include "XKBlib.h" -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include "XKBlibint.h" #ifdef USE_OWN_COMPOSE diff --git a/nx-X11/lib/X11/XKBCompat.c b/nx-X11/lib/X11/XKBCompat.c index 5886e4d26..b16e6b083 100644 --- a/nx-X11/lib/X11/XKBCompat.c +++ b/nx-X11/lib/X11/XKBCompat.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #define NEED_MAP_READERS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" Status diff --git a/nx-X11/lib/X11/XKBCtrls.c b/nx-X11/lib/X11/XKBCtrls.c index 0ea131aa0..f3a09a124 100644 --- a/nx-X11/lib/X11/XKBCtrls.c +++ b/nx-X11/lib/X11/XKBCtrls.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBCvt.c b/nx-X11/lib/X11/XKBCvt.c index 1bdf81cd4..2d58ca990 100644 --- a/nx-X11/lib/X11/XKBCvt.c +++ b/nx-X11/lib/X11/XKBCvt.c @@ -35,23 +35,23 @@ from The Open Group. #include #include -#include -#include +#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" #include "XlcPubI.h" #include "Ximint.h" -#include -#include +#include +#include #define XK_LATIN1 #define XK_PUBLISHING -#include -#include +#include +#include #include "XKBlibint.h" -#include +#include #include -#include +#include #ifdef __sgi_not_xconsortium #define XKB_EXTEND_LOOKUP_STRING diff --git a/nx-X11/lib/X11/XKBExtDev.c b/nx-X11/lib/X11/XKBExtDev.c index 34558e476..0510b7f55 100644 --- a/nx-X11/lib/X11/XKBExtDev.c +++ b/nx-X11/lib/X11/XKBExtDev.c @@ -34,9 +34,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #define NEED_MAP_READERS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBGAlloc.c b/nx-X11/lib/X11/XKBGAlloc.c index fddb770b6..eb74cbfd0 100644 --- a/nx-X11/lib/X11/XKBGAlloc.c +++ b/nx-X11/lib/X11/XKBGAlloc.c @@ -40,18 +40,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #else #include -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBGeom.c b/nx-X11/lib/X11/XKBGeom.c index 061175489..d225342a7 100644 --- a/nx-X11/lib/X11/XKBGeom.c +++ b/nx-X11/lib/X11/XKBGeom.c @@ -37,8 +37,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_MAP_READERS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #ifndef MINSHORT diff --git a/nx-X11/lib/X11/XKBGetByName.c b/nx-X11/lib/X11/XKBGetByName.c index 2c6ff0849..87f405e50 100644 --- a/nx-X11/lib/X11/XKBGetByName.c +++ b/nx-X11/lib/X11/XKBGetByName.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBGetMap.c b/nx-X11/lib/X11/XKBGetMap.c index 2b9fb97f4..5f37f9571 100644 --- a/nx-X11/lib/X11/XKBGetMap.c +++ b/nx-X11/lib/X11/XKBGetMap.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static Status diff --git a/nx-X11/lib/X11/XKBList.c b/nx-X11/lib/X11/XKBList.c index 2f4a53490..ef265fdde 100644 --- a/nx-X11/lib/X11/XKBList.c +++ b/nx-X11/lib/X11/XKBList.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBMAlloc.c b/nx-X11/lib/X11/XKBMAlloc.c index d57d9a58d..31255091f 100644 --- a/nx-X11/lib/X11/XKBMAlloc.c +++ b/nx-X11/lib/X11/XKBMAlloc.c @@ -38,22 +38,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBMisc.c b/nx-X11/lib/X11/XKBMisc.c index 09f361c19..04ac0c7ea 100644 --- a/nx-X11/lib/X11/XKBMisc.c +++ b/nx-X11/lib/X11/XKBMisc.c @@ -38,22 +38,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c index 8483187c3..0bcd42b3d 100644 --- a/nx-X11/lib/X11/XKBNames.c +++ b/nx-X11/lib/X11/XKBNames.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBRdBuf.c b/nx-X11/lib/X11/XKBRdBuf.c index d0b7045d6..109618dd2 100644 --- a/nx-X11/lib/X11/XKBRdBuf.c +++ b/nx-X11/lib/X11/XKBRdBuf.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #include "Xlibint.h" #include "XKBlibint.h" -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBSetGeom.c b/nx-X11/lib/X11/XKBSetGeom.c index e27297c11..f13be8097 100644 --- a/nx-X11/lib/X11/XKBSetGeom.c +++ b/nx-X11/lib/X11/XKBSetGeom.c @@ -38,8 +38,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #ifndef MINSHORT #define MINSHORT -32768 diff --git a/nx-X11/lib/X11/XKBSetMap.c b/nx-X11/lib/X11/XKBSetMap.c index 4a3b15c70..784a241c2 100644 --- a/nx-X11/lib/X11/XKBSetMap.c +++ b/nx-X11/lib/X11/XKBSetMap.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static int diff --git a/nx-X11/lib/X11/XKBUse.c b/nx-X11/lib/X11/XKBUse.c index ad18bb6fc..95fba49ac 100644 --- a/nx-X11/lib/X11/XKBUse.c +++ b/nx-X11/lib/X11/XKBUse.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static Bool _XkbIgnoreExtension = False; diff --git a/nx-X11/lib/X11/XKBleds.c b/nx-X11/lib/X11/XKBleds.c index 89ab2e9ec..d026d84be 100644 --- a/nx-X11/lib/X11/XKBleds.c +++ b/nx-X11/lib/X11/XKBleds.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" Status diff --git a/nx-X11/lib/X11/XKBlib.h b/nx-X11/lib/X11/XKBlib.h index 6a5dc8a7c..a1ad7ccea 100644 --- a/nx-X11/lib/X11/XKBlib.h +++ b/nx-X11/lib/X11/XKBlib.h @@ -29,8 +29,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBLIB_H_ #define _XKBLIB_H_ -#include -#include +#include +#include typedef struct _XkbAnyEvent { int type; /* XkbAnyEvent */ diff --git a/nx-X11/lib/X11/XKBlibint.h b/nx-X11/lib/X11/XKBlibint.h index 0244e2ef3..9c6352769 100644 --- a/nx-X11/lib/X11/XKBlibint.h +++ b/nx-X11/lib/X11/XKBlibint.h @@ -29,8 +29,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBLIBINT_H_ #define _XKBLIBINT_H_ -#include -#include +#include +#include #define XkbMapPending (1<<0) #define XkbXlibNewKeyboard (1<<1) diff --git a/nx-X11/lib/X11/XYZ.c b/nx-X11/lib/X11/XYZ.c index f5f17f356..5408c4fbc 100644 --- a/nx-X11/lib/X11/XYZ.c +++ b/nx-X11/lib/X11/XYZ.c @@ -38,7 +38,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/Xcms.h b/nx-X11/lib/X11/Xcms.h index 779bc52ff..8ce81556d 100644 --- a/nx-X11/lib/X11/Xcms.h +++ b/nx-X11/lib/X11/Xcms.h @@ -31,7 +31,7 @@ #ifndef _XCMS_H_ #define _XCMS_H_ -#include +#include /* * XCMS Status Values diff --git a/nx-X11/lib/X11/Xcmsint.h b/nx-X11/lib/X11/Xcmsint.h index 1bf02ba2f..6bb44bbcf 100644 --- a/nx-X11/lib/X11/Xcmsint.h +++ b/nx-X11/lib/X11/Xcmsint.h @@ -34,7 +34,7 @@ #ifndef _XCMSINT_H_ #define _XCMSINT_H_ -#include +#include /* * DEFINES diff --git a/nx-X11/lib/X11/XimThai.h b/nx-X11/lib/X11/XimThai.h index 5b2666ebf..8d08eca6b 100644 --- a/nx-X11/lib/X11/XimThai.h +++ b/nx-X11/lib/X11/XimThai.h @@ -64,7 +64,7 @@ SOFTWARE. #ifndef _XIMTHAI_H_ #define _XIMTHAI_H_ -#include +#include /* Classification of characters in TIS620 according to WTT */ diff --git a/nx-X11/lib/X11/Ximint.h b/nx-X11/lib/X11/Ximint.h index e9bdda247..afd821c68 100644 --- a/nx-X11/lib/X11/Ximint.h +++ b/nx-X11/lib/X11/Ximint.h @@ -36,7 +36,7 @@ PERFORMANCE OF THIS SOFTWARE. #define _XIMINT_H #include -#include +#include #define Public /**/ #define Private static diff --git a/nx-X11/lib/X11/Xintatom.h b/nx-X11/lib/X11/Xintatom.h index f1e13568b..756d3445b 100644 --- a/nx-X11/lib/X11/Xintatom.h +++ b/nx-X11/lib/X11/Xintatom.h @@ -3,7 +3,7 @@ #ifndef _XINTATOM_H_ #define _XINTATOM_H_ 1 -#include +#include /* IntAtom.c */ diff --git a/nx-X11/lib/X11/Xintconn.h b/nx-X11/lib/X11/Xintconn.h index edea98302..ea272833a 100644 --- a/nx-X11/lib/X11/Xintconn.h +++ b/nx-X11/lib/X11/Xintconn.h @@ -3,7 +3,7 @@ #ifndef _XINTCONN_H_ #define _XINTCONN_H_ 1 -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/lib/X11/Xlcint.h b/nx-X11/lib/X11/Xlcint.h index fcc3a65f2..5a52cd36c 100644 --- a/nx-X11/lib/X11/Xlcint.h +++ b/nx-X11/lib/X11/Xlcint.h @@ -74,8 +74,8 @@ from The Open Group. #ifndef _XP_PRINT_SERVER_ -#include -#include +#include +#include #include typedef Bool (*XFilterEventProc)( diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h index 8ce7fb577..d4cecc7b5 100644 --- a/nx-X11/lib/X11/Xlib.h +++ b/nx-X11/lib/X11/Xlib.h @@ -57,11 +57,11 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include +#include /* applications should not depend on these two headers being included! */ -#include -#include +#include +#include #ifndef X_WCHAR #ifdef X_NOT_STDC_ENV diff --git a/nx-X11/lib/X11/XlibAsync.c b/nx-X11/lib/X11/XlibAsync.c index 81403ebc9..832371782 100644 --- a/nx-X11/lib/X11/XlibAsync.c +++ b/nx-X11/lib/X11/XlibAsync.c @@ -48,8 +48,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include /*ARGSUSED*/ Bool diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index 0514470dd..0aa890bbb 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -60,9 +60,9 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include -#include -#include +#include +#include +#include #include #ifdef WIN32 #include diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index bcd42b52b..854b64b22 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -58,9 +58,9 @@ from The Open Group. * Warning, there be dragons here.... */ -#include -#include /* to declare xEvent */ -#include /* for configured options like XTHREADS */ +#include +#include /* to declare xEvent */ +#include /* for configured options like XTHREADS */ #ifdef NX_TRANS_SOCKET @@ -233,14 +233,14 @@ typedef struct _XSQEvent #define NEED_EVENTS #define NEED_REPLIES -#include +#include #ifdef __sgi #define _SGI_MP_SOURCE /* turn this on to get MP safe errno */ #endif #include #define _XBCOPYFUNC _Xbcopy -#include -#include +#include +#include /* Utek leaves kernel macros around in include files (bleah) */ #ifdef dirty @@ -250,7 +250,7 @@ typedef struct _XSQEvent #include #include -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/lib/X11/Xlocale.h b/nx-X11/lib/X11/Xlocale.h index 61d2f7a84..4370d969e 100644 --- a/nx-X11/lib/X11/Xlocale.h +++ b/nx-X11/lib/X11/Xlocale.h @@ -31,8 +31,8 @@ from The Open Group. #ifndef _XLOCALE_H_ #define _XLOCALE_H_ -#include -#include +#include +#include #ifndef X_LOCALE #include diff --git a/nx-X11/lib/X11/Xresource.h b/nx-X11/lib/X11/Xresource.h index ce1213748..e46a5f467 100644 --- a/nx-X11/lib/X11/Xresource.h +++ b/nx-X11/lib/X11/Xresource.h @@ -52,7 +52,7 @@ SOFTWARE. #define _XRESOURCE_H_ #ifndef _XP_PRINT_SERVER_ -#include +#include #endif /**************************************************************** diff --git a/nx-X11/lib/X11/Xrm.c b/nx-X11/lib/X11/Xrm.c index a932a5ce2..f27f9d2e8 100644 --- a/nx-X11/lib/X11/Xrm.c +++ b/nx-X11/lib/X11/Xrm.c @@ -57,13 +57,13 @@ from The Open Group. #include #include #include "Xlibint.h" -#include +#include #include "Xlcint.h" #ifdef XTHREADS #include "locking.h" #endif #include "XrmI.h" -#include +#include #include "Xresinternal.h" #include "Xresource.h" diff --git a/nx-X11/lib/X11/Xutil.h b/nx-X11/lib/X11/Xutil.h index 82dab7d56..8c877e697 100644 --- a/nx-X11/lib/X11/Xutil.h +++ b/nx-X11/lib/X11/Xutil.h @@ -52,7 +52,7 @@ SOFTWARE. #define _XUTIL_H_ /* You must include before including this file */ -#include +#include /* * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding diff --git a/nx-X11/lib/X11/cmsColNm.c b/nx-X11/lib/X11/cmsColNm.c index d8c24cdff..63f166efe 100644 --- a/nx-X11/lib/X11/cmsColNm.c +++ b/nx-X11/lib/X11/cmsColNm.c @@ -39,12 +39,12 @@ #endif #include "Xlibint.h" #include "Xcmsint.h" -#include +#include #include #include #include #define XK_LATIN1 -#include +#include #include "Cv.h" /* forwards/locals */ diff --git a/nx-X11/lib/X11/cmsProp.c b/nx-X11/lib/X11/cmsProp.c index 81ea58ce9..e9158479e 100644 --- a/nx-X11/lib/X11/cmsProp.c +++ b/nx-X11/lib/X11/cmsProp.c @@ -36,7 +36,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/evtomask.c b/nx-X11/lib/X11/evtomask.c index fbbb998d3..c852c4608 100644 --- a/nx-X11/lib/X11/evtomask.c +++ b/nx-X11/lib/X11/evtomask.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include /* * This array can be used given an event type to determine the mask bits diff --git a/nx-X11/lib/X11/globals.c b/nx-X11/lib/X11/globals.c index 11965cb5f..cf270dc22 100644 --- a/nx-X11/lib/X11/globals.c +++ b/nx-X11/lib/X11/globals.c @@ -38,7 +38,7 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include /* diff --git a/nx-X11/lib/X11/imDefFlt.c b/nx-X11/lib/X11/imDefFlt.c index ccf3ba348..b5b107221 100644 --- a/nx-X11/lib/X11/imDefFlt.c +++ b/nx-X11/lib/X11/imDefFlt.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xutil.h" diff --git a/nx-X11/lib/X11/imDefIm.c b/nx-X11/lib/X11/imDefIm.c index 7581548e7..e963f3560 100644 --- a/nx-X11/lib/X11/imDefIm.c +++ b/nx-X11/lib/X11/imDefIm.c @@ -36,7 +36,7 @@ OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imDefLkup.c b/nx-X11/lib/X11/imDefLkup.c index aa1aaaf06..5bdcb77c3 100644 --- a/nx-X11/lib/X11/imDefLkup.c +++ b/nx-X11/lib/X11/imDefLkup.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imDispch.c b/nx-X11/lib/X11/imDispch.c index c0c4bc726..1e3287529 100644 --- a/nx-X11/lib/X11/imDispch.c +++ b/nx-X11/lib/X11/imDispch.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xutil.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imEvToWire.c b/nx-X11/lib/X11/imEvToWire.c index f407296df..211252a50 100644 --- a/nx-X11/lib/X11/imEvToWire.c +++ b/nx-X11/lib/X11/imEvToWire.c @@ -27,8 +27,8 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #undef NEED_EVENTS #include "Ximint.h" diff --git a/nx-X11/lib/X11/imExten.c b/nx-X11/lib/X11/imExten.c index 782d1c356..6cb663f66 100644 --- a/nx-X11/lib/X11/imExten.c +++ b/nx-X11/lib/X11/imExten.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imInt.c b/nx-X11/lib/X11/imInt.c index 5a047e4aa..9658eef58 100644 --- a/nx-X11/lib/X11/imInt.c +++ b/nx-X11/lib/X11/imInt.c @@ -31,9 +31,9 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcFlt.c b/nx-X11/lib/X11/imLcFlt.c index c3c64bf46..7ff642fae 100644 --- a/nx-X11/lib/X11/imLcFlt.c +++ b/nx-X11/lib/X11/imLcFlt.c @@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcIc.c b/nx-X11/lib/X11/imLcIc.c index 760e24c5f..475bbbef8 100644 --- a/nx-X11/lib/X11/imLcIc.c +++ b/nx-X11/lib/X11/imLcIc.c @@ -32,8 +32,8 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcIm.c b/nx-X11/lib/X11/imLcIm.c index 675b48224..0a9027e6f 100644 --- a/nx-X11/lib/X11/imLcIm.c +++ b/nx-X11/lib/X11/imLcIm.c @@ -39,11 +39,11 @@ THIS SOFTWARE. #endif #include /* -#include +#include */ -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" diff --git a/nx-X11/lib/X11/imLcLkup.c b/nx-X11/lib/X11/imLcLkup.c index 59025a529..b1db9f8f7 100644 --- a/nx-X11/lib/X11/imLcLkup.c +++ b/nx-X11/lib/X11/imLcLkup.c @@ -35,11 +35,11 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcPrs.c b/nx-X11/lib/X11/imLcPrs.c index 9736e135c..616d45186 100644 --- a/nx-X11/lib/X11/imLcPrs.c +++ b/nx-X11/lib/X11/imLcPrs.c @@ -35,9 +35,9 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcSIc.c b/nx-X11/lib/X11/imLcSIc.c index a32211ce2..e36c52269 100644 --- a/nx-X11/lib/X11/imLcSIc.c +++ b/nx-X11/lib/X11/imLcSIc.c @@ -31,9 +31,9 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imRm.c b/nx-X11/lib/X11/imRm.c index 7dbc385cb..1da1b2967 100644 --- a/nx-X11/lib/X11/imRm.c +++ b/nx-X11/lib/X11/imRm.c @@ -36,7 +36,7 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiFlt.c b/nx-X11/lib/X11/imThaiFlt.c index 18df0e1ff..41ab992b0 100644 --- a/nx-X11/lib/X11/imThaiFlt.c +++ b/nx-X11/lib/X11/imThaiFlt.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiIc.c b/nx-X11/lib/X11/imThaiIc.c index 67d7cc268..97a72ac81 100644 --- a/nx-X11/lib/X11/imThaiIc.c +++ b/nx-X11/lib/X11/imThaiIc.c @@ -38,8 +38,8 @@ THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiIm.c b/nx-X11/lib/X11/imThaiIm.c index e24715022..85e9df6d3 100644 --- a/nx-X11/lib/X11/imThaiIm.c +++ b/nx-X11/lib/X11/imThaiIm.c @@ -38,10 +38,10 @@ THIS SOFTWARE. #include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" diff --git a/nx-X11/lib/X11/imTrX.c b/nx-X11/lib/X11/imTrX.c index e2de05f28..7d00bb3f7 100644 --- a/nx-X11/lib/X11/imTrX.c +++ b/nx-X11/lib/X11/imTrX.c @@ -34,7 +34,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imTrans.c b/nx-X11/lib/X11/imTrans.c index a239219b7..e9715927b 100644 --- a/nx-X11/lib/X11/imTrans.c +++ b/nx-X11/lib/X11/imTrans.c @@ -34,18 +34,18 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "Xlcint.h" #include "Ximint.h" #include "XimTrans.h" #include "XimTrInt.h" #ifdef WIN32 -#include +#include #endif diff --git a/nx-X11/lib/X11/lcCT.c b/nx-X11/lib/X11/lcCT.c index 63608a3cd..41c7cf418 100644 --- a/nx-X11/lib/X11/lcCT.c +++ b/nx-X11/lib/X11/lcCT.c @@ -43,7 +43,7 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include +#include #include diff --git a/nx-X11/lib/X11/lcDB.c b/nx-X11/lib/X11/lcDB.c index ffa8f49ae..7a14d3d4f 100644 --- a/nx-X11/lib/X11/lcDB.c +++ b/nx-X11/lib/X11/lcDB.c @@ -37,8 +37,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xlibint.h" #include "XlcPubI.h" diff --git a/nx-X11/lib/X11/lcFile.c b/nx-X11/lib/X11/lcFile.c index 691daeb9e..2e0a49db4 100644 --- a/nx-X11/lib/X11/lcFile.c +++ b/nx-X11/lib/X11/lcFile.c @@ -33,7 +33,7 @@ #include #include "Xlibint.h" #include "XlcPubI.h" -#include +#include #if 0 #include /* in theory delivers getresuid/gid prototypes, * in practice only the Linux syscall wrapper is there. */ diff --git a/nx-X11/lib/X11/lcPrTxt.c b/nx-X11/lib/X11/lcPrTxt.c index 5a781280e..1a55d1cab 100644 --- a/nx-X11/lib/X11/lcPrTxt.c +++ b/nx-X11/lib/X11/lcPrTxt.c @@ -30,8 +30,8 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include -#include +#include +#include static XPointer * alloc_list( diff --git a/nx-X11/lib/X11/lcTxtPr.c b/nx-X11/lib/X11/lcTxtPr.c index 1f9765f6e..e214ac4e9 100644 --- a/nx-X11/lib/X11/lcTxtPr.c +++ b/nx-X11/lib/X11/lcTxtPr.c @@ -30,8 +30,8 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include -#include +#include +#include #include static int diff --git a/nx-X11/lib/X11/lcUtil.c b/nx-X11/lib/X11/lcUtil.c index ab1db0083..3e49fd08f 100644 --- a/nx-X11/lib/X11/lcUtil.c +++ b/nx-X11/lib/X11/lcUtil.c @@ -29,7 +29,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "XlcPublic.h" /* Don't use here because it is locale dependent. */ diff --git a/nx-X11/lib/X11/lcWrap.c b/nx-X11/lib/X11/lcWrap.c index ea2623191..b694425fe 100644 --- a/nx-X11/lib/X11/lcWrap.c +++ b/nx-X11/lib/X11/lcWrap.c @@ -61,12 +61,12 @@ from The Open Group. #include #include "Xlibint.h" #include "Xlcint.h" -#include -#include +#include +#include #ifdef WIN32 #undef close #endif -#include +#include #include "XlcPubI.h" #ifdef XTHREADS diff --git a/nx-X11/lib/X11/locking.h b/nx-X11/lib/X11/locking.h index 96c99b972..4b847ded6 100644 --- a/nx-X11/lib/X11/locking.h +++ b/nx-X11/lib/X11/locking.h @@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group. #define xmalloc(s) Xmalloc(s) #define xfree(s) Xfree(s) -#include +#include struct _XCVList { xcondition_t cv; diff --git a/nx-X11/lib/X11/mbWMProps.c b/nx-X11/lib/X11/mbWMProps.c index a5f7732e4..8b16bc990 100644 --- a/nx-X11/lib/X11/mbWMProps.c +++ b/nx-X11/lib/X11/mbWMProps.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include void XmbSetWMProperties ( diff --git a/nx-X11/lib/X11/omDefault.c b/nx-X11/lib/X11/omDefault.c index 57dd975ad..eaa75ff84 100644 --- a/nx-X11/lib/X11/omDefault.c +++ b/nx-X11/lib/X11/omDefault.c @@ -35,8 +35,8 @@ #endif #include "Xlibint.h" #include "XomGeneric.h" -#include -#include +#include +#include #include #define DefineLocalBuf char local_buf[BUFSIZ] diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c index e6c23f4e2..8f4942873 100644 --- a/nx-X11/lib/X11/omGeneric.c +++ b/nx-X11/lib/X11/omGeneric.c @@ -55,8 +55,8 @@ #include "Xlibint.h" #include "XomGeneric.h" #include "XlcGeneric.h" -#include -#include +#include +#include #include #include #include diff --git a/nx-X11/lib/X11/os2Stubs.c b/nx-X11/lib/X11/os2Stubs.c index 9d109025c..804d2e14e 100644 --- a/nx-X11/lib/X11/os2Stubs.c +++ b/nx-X11/lib/X11/os2Stubs.c @@ -37,7 +37,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include #include #define INCL_DOSSEMAPHORES diff --git a/nx-X11/lib/X11/utf8WMProps.c b/nx-X11/lib/X11/utf8WMProps.c index e3a329ac8..69366b6cb 100644 --- a/nx-X11/lib/X11/utf8WMProps.c +++ b/nx-X11/lib/X11/utf8WMProps.c @@ -53,10 +53,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include void Xutf8SetWMProperties ( diff --git a/nx-X11/lib/X11/util/makekeys.c b/nx-X11/lib/X11/util/makekeys.c index 0b0ad9e2c..d2a7b4aef 100644 --- a/nx-X11/lib/X11/util/makekeys.c +++ b/nx-X11/lib/X11/util/makekeys.c @@ -31,9 +31,9 @@ from The Open Group. /* Constructs hash tables for XStringToKeysym and XKeysymToString. */ -#include -#include -#include +#include +#include +#include #include #include #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ diff --git a/nx-X11/lib/X11/uvY.c b/nx-X11/lib/X11/uvY.c index d7c3e6ab2..c07fcfc39 100644 --- a/nx-X11/lib/X11/uvY.c +++ b/nx-X11/lib/X11/uvY.c @@ -40,7 +40,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/xyY.c b/nx-X11/lib/X11/xyY.c index 63e80bc59..ba0b06137 100644 --- a/nx-X11/lib/X11/xyY.c +++ b/nx-X11/lib/X11/xyY.c @@ -40,7 +40,7 @@ #include #endif #include -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/Xau/AuDispose.c b/nx-X11/lib/Xau/AuDispose.c index 58ffd61e7..dc2080f40 100644 --- a/nx-X11/lib/Xau/AuDispose.c +++ b/nx-X11/lib/Xau/AuDispose.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include void diff --git a/nx-X11/lib/Xau/AuFileName.c b/nx-X11/lib/Xau/AuFileName.c index a51fc3bff..6ab0138b8 100644 --- a/nx-X11/lib/Xau/AuFileName.c +++ b/nx-X11/lib/Xau/AuFileName.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include char * diff --git a/nx-X11/lib/Xau/AuGetAddr.c b/nx-X11/lib/Xau/AuGetAddr.c index ab13cb630..d68ceadc2 100644 --- a/nx-X11/lib/Xau/AuGetAddr.c +++ b/nx-X11/lib/Xau/AuGetAddr.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include static int binaryEqual (_Xconst char *a, _Xconst char *b, int len) diff --git a/nx-X11/lib/Xau/AuGetBest.c b/nx-X11/lib/Xau/AuGetBest.c index 5ff1c7cd3..eb27f24c1 100644 --- a/nx-X11/lib/Xau/AuGetBest.c +++ b/nx-X11/lib/Xau/AuGetBest.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #ifdef XTHREADS -#include +#include #endif #ifdef hpux #define X_INCLUDE_NETDB_H #define XOS_USE_NO_LOCKING -#include +#include #endif static int diff --git a/nx-X11/lib/Xau/AuLock.c b/nx-X11/lib/Xau/AuLock.c index 001235607..1813dc368 100644 --- a/nx-X11/lib/Xau/AuLock.c +++ b/nx-X11/lib/Xau/AuLock.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ in this Software without prior written authorization from The Open Group. #ifndef WIN32 extern unsigned sleep (); #else -#include +#include #define link rename #endif #endif diff --git a/nx-X11/lib/Xau/AuRead.c b/nx-X11/lib/Xau/AuRead.c index 60a0d747f..2e2509633 100644 --- a/nx-X11/lib/Xau/AuRead.c +++ b/nx-X11/lib/Xau/AuRead.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include #include diff --git a/nx-X11/lib/Xau/AuUnlock.c b/nx-X11/lib/Xau/AuUnlock.c index 460effe86..e40042104 100644 --- a/nx-X11/lib/Xau/AuUnlock.c +++ b/nx-X11/lib/Xau/AuUnlock.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include int XauUnlockAuth ( diff --git a/nx-X11/lib/Xau/AuWrite.c b/nx-X11/lib/Xau/AuWrite.c index f25abc9e6..5a9b44eb2 100644 --- a/nx-X11/lib/Xau/AuWrite.c +++ b/nx-X11/lib/Xau/AuWrite.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include static int write_short (unsigned short s, FILE *file) diff --git a/nx-X11/lib/Xau/Autest.c b/nx-X11/lib/Xau/Autest.c index 298464908..2352cf170 100644 --- a/nx-X11/lib/Xau/Autest.c +++ b/nx-X11/lib/Xau/Autest.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include main (argc, argv) char **argv; diff --git a/nx-X11/lib/Xau/Imakefile b/nx-X11/lib/Xau/Imakefile index 331d29c09..df80d28d4 100644 --- a/nx-X11/lib/Xau/Imakefile +++ b/nx-X11/lib/Xau/Imakefile @@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.5 1999/04/17 09:08:11 dawes Exp $ #define DoProfileLib ProfileLibXau #define LibName NX_Xau #define SoRev SOXAUTHREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #include diff --git a/nx-X11/lib/Xau/k5encode.c b/nx-X11/lib/Xau/k5encode.c index a3c6c09b1..c71222e1c 100644 --- a/nx-X11/lib/Xau/k5encode.c +++ b/nx-X11/lib/Xau/k5encode.c @@ -45,10 +45,10 @@ in this Software without prior written authorization from The Open Group. #undef BITS32 #undef xfree -#include -#include -#include -#include +#include +#include +#include +#include /* * XauKrb5Encode diff --git a/nx-X11/lib/Xcomposite/Imakefile b/nx-X11/lib/Xcomposite/Imakefile index a8e4077fa..24820c146 100644 --- a/nx-X11/lib/Xcomposite/Imakefile +++ b/nx-X11/lib/Xcomposite/Imakefile @@ -16,7 +16,7 @@ SOXCOMPOSITEREV=1.0.0 #define LibName NX_Xcomposite #define SoRev SOXCOMPOSITEREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #include diff --git a/nx-X11/lib/Xcomposite/Xcomposite.h b/nx-X11/lib/Xcomposite/Xcomposite.h index 3604141bb..c28cc6857 100644 --- a/nx-X11/lib/Xcomposite/Xcomposite.h +++ b/nx-X11/lib/Xcomposite/Xcomposite.h @@ -25,9 +25,9 @@ #ifndef _XCOMPOSITE_H_ #define _XCOMPOSITE_H_ -#include -#include -#include +#include +#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/lib/Xcomposite/xcompositeint.h b/nx-X11/lib/Xcomposite/xcompositeint.h index af5f57500..7b12e8d55 100644 --- a/nx-X11/lib/Xcomposite/xcompositeint.h +++ b/nx-X11/lib/Xcomposite/xcompositeint.h @@ -28,11 +28,11 @@ #define NEED_EVENTS #define NEED_REPLIES #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include typedef struct _XCompositeExtDisplayInfo { struct _XCompositeExtDisplayInfo *next; /* keep a linked list */ diff --git a/nx-X11/lib/Xext/DPMS.c b/nx-X11/lib/Xext/DPMS.c index 35b21b4ad..a2c0dc3c5 100644 --- a/nx-X11/lib/Xext/DPMS.c +++ b/nx-X11/lib/Xext/DPMS.c @@ -36,11 +36,11 @@ Equipment Corporation. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include static XExtensionInfo _dpms_info_data; diff --git a/nx-X11/lib/Xext/MITMisc.c b/nx-X11/lib/Xext/MITMisc.c index c0fa87209..8ba35dce1 100644 --- a/nx-X11/lib/Xext/MITMisc.c +++ b/nx-X11/lib/Xext/MITMisc.c @@ -32,11 +32,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static XExtensionInfo _mit_info_data; static XExtensionInfo *mit_info = &_mit_info_data; diff --git a/nx-X11/lib/Xext/XAppgroup.c b/nx-X11/lib/Xext/XAppgroup.c index 2ca3e4d21..abbf1c1b9 100644 --- a/nx-X11/lib/Xext/XAppgroup.c +++ b/nx-X11/lib/Xext/XAppgroup.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #endif #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/nx-X11/lib/Xext/XEVI.c b/nx-X11/lib/Xext/XEVI.c index a64b9c1ba..e5a811bdf 100644 --- a/nx-X11/lib/Xext/XEVI.c +++ b/nx-X11/lib/Xext/XEVI.c @@ -27,12 +27,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo *xevi_info;/* needs to move to globals.c */ static /* const */ char *xevi_extension_name = EVINAME; #define XeviCheckExtension(dpy,i,val) \ diff --git a/nx-X11/lib/Xext/XLbx.c b/nx-X11/lib/Xext/XLbx.c index 8c0cfad0b..450bd5bc5 100644 --- a/nx-X11/lib/Xext/XLbx.c +++ b/nx-X11/lib/Xext/XLbx.c @@ -30,11 +30,11 @@ #include #endif #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static XExtensionInfo _lbx_info_data; static XExtensionInfo *lbx_info = &_lbx_info_data; diff --git a/nx-X11/lib/Xext/XMultibuf.c b/nx-X11/lib/Xext/XMultibuf.c index 3e0049e92..570676def 100644 --- a/nx-X11/lib/Xext/XMultibuf.c +++ b/nx-X11/lib/Xext/XMultibuf.c @@ -32,11 +32,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include static XExtensionInfo _multibuf_info_data; static XExtensionInfo *multibuf_info = &_multibuf_info_data; diff --git a/nx-X11/lib/Xext/XSecurity.c b/nx-X11/lib/Xext/XSecurity.c index 161ade3b7..a9899916f 100644 --- a/nx-X11/lib/Xext/XSecurity.c +++ b/nx-X11/lib/Xext/XSecurity.c @@ -29,11 +29,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include static XExtensionInfo _Security_info_data; static XExtensionInfo *Security_info = &_Security_info_data; diff --git a/nx-X11/lib/Xext/XShape.c b/nx-X11/lib/Xext/XShape.c index 29a7f83f9..79b4b78f6 100644 --- a/nx-X11/lib/Xext/XShape.c +++ b/nx-X11/lib/Xext/XShape.c @@ -31,12 +31,12 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _shape_info_data; static XExtensionInfo *shape_info = &_shape_info_data; diff --git a/nx-X11/lib/Xext/XShm.c b/nx-X11/lib/Xext/XShm.c index f4e29a42b..ec3720732 100644 --- a/nx-X11/lib/Xext/XShm.c +++ b/nx-X11/lib/Xext/XShm.c @@ -36,12 +36,12 @@ in this Software without prior written authorization from The Open Group. #include #endif #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _shm_info_data; static XExtensionInfo *shm_info = &_shm_info_data; diff --git a/nx-X11/lib/Xext/XSync.c b/nx-X11/lib/Xext/XSync.c index 61f8600ce..39eb97cdd 100644 --- a/nx-X11/lib/Xext/XSync.c +++ b/nx-X11/lib/Xext/XSync.c @@ -58,10 +58,10 @@ PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _sync_info_data; static XExtensionInfo *sync_info = &_sync_info_data; diff --git a/nx-X11/lib/Xext/XTestExt1.c b/nx-X11/lib/Xext/XTestExt1.c index ee4a0bde0..00da036bd 100644 --- a/nx-X11/lib/Xext/XTestExt1.c +++ b/nx-X11/lib/Xext/XTestExt1.c @@ -64,9 +64,9 @@ University of California. #include #endif #include -#include -#include -#include +#include +#include +#include /****************************************************************************** * variables diff --git a/nx-X11/lib/Xext/Xcup.c b/nx-X11/lib/Xext/Xcup.c index 6315d32a4..8bf2bb29e 100644 --- a/nx-X11/lib/Xext/Xcup.c +++ b/nx-X11/lib/Xext/Xcup.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #endif #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _xcup_info_data; static XExtensionInfo *xcup_info = &_xcup_info_data; diff --git a/nx-X11/lib/Xext/Xdbe.c b/nx-X11/lib/Xext/Xdbe.c index 954c8f01d..05df171f6 100644 --- a/nx-X11/lib/Xext/Xdbe.c +++ b/nx-X11/lib/Xext/Xdbe.c @@ -38,11 +38,11 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #define NEED_DBE_PROTOCOL -#include +#include static XExtensionInfo _dbe_info_data; static XExtensionInfo *dbe_info = &_dbe_info_data; diff --git a/nx-X11/lib/Xext/extutil.c b/nx-X11/lib/Xext/extutil.c index d96b17f3f..bd79dbdb2 100644 --- a/nx-X11/lib/Xext/extutil.c +++ b/nx-X11/lib/Xext/extutil.c @@ -51,9 +51,9 @@ in this Software without prior written authorization from The Open Group. #include #endif #include -#include -#include -#include +#include +#include +#include /* diff --git a/nx-X11/lib/Xext/globals.c b/nx-X11/lib/Xext/globals.c index 0cd5d2690..53a18690d 100644 --- a/nx-X11/lib/Xext/globals.c +++ b/nx-X11/lib/Xext/globals.c @@ -34,8 +34,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include /* for definition of NULL */ /* diff --git a/nx-X11/lib/Xfixes/Imakefile b/nx-X11/lib/Xfixes/Imakefile index ca1fe046b..cc3e1631d 100644 --- a/nx-X11/lib/Xfixes/Imakefile +++ b/nx-X11/lib/Xfixes/Imakefile @@ -16,7 +16,7 @@ SOXFIXESREV=3.0.0 #define LibName NX_Xfixes #define SoRev SOXFIXESREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #include diff --git a/nx-X11/lib/Xfixes/Xfixes.h b/nx-X11/lib/Xfixes/Xfixes.h index 28ca28f1a..4cba47ca4 100644 --- a/nx-X11/lib/Xfixes/Xfixes.h +++ b/nx-X11/lib/Xfixes/Xfixes.h @@ -25,9 +25,9 @@ #ifndef _XFIXES_H_ #define _XFIXES_H_ -#include +#include -#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/lib/Xfixes/Xfixes.man b/nx-X11/lib/Xfixes/Xfixes.man index f081cc54e..563db15b5 100644 --- a/nx-X11/lib/Xfixes/Xfixes.man +++ b/nx-X11/lib/Xfixes/Xfixes.man @@ -31,7 +31,7 @@ .SH NAME XFixes \- Augmented versions of core protocol requests .SH SYNTAX -\&#include +\&#include .nf .sp Bool XFixesQueryExtension \^(\^Display *\fIdpy\fP, diff --git a/nx-X11/lib/Xfixes/Xfixesint.h b/nx-X11/lib/Xfixes/Xfixesint.h index e227571be..353dcae77 100644 --- a/nx-X11/lib/Xfixes/Xfixesint.h +++ b/nx-X11/lib/Xfixes/Xfixesint.h @@ -28,11 +28,11 @@ #define NEED_EVENTS #define NEED_REPLIES #include -#include -#include -#include +#include +#include +#include #include "Xfixes.h" -#include +#include extern char XFixesExtensionName[]; diff --git a/nx-X11/lib/Xinerama/Xinerama.c b/nx-X11/lib/Xinerama/Xinerama.c index fd717dd22..0256336be 100644 --- a/nx-X11/lib/Xinerama/Xinerama.c +++ b/nx-X11/lib/Xinerama/Xinerama.c @@ -27,13 +27,13 @@ Equipment Corporation. #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include static XExtensionInfo _panoramiX_ext_info_data; diff --git a/nx-X11/lib/Xrender/Imakefile b/nx-X11/lib/Xrender/Imakefile index 35d826b22..c5a0f89fc 100644 --- a/nx-X11/lib/Xrender/Imakefile +++ b/nx-X11/lib/Xrender/Imakefile @@ -71,7 +71,7 @@ clean:: #define SoRev SOXRENDERREV #ifdef XBuildIncDir -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions RENDERINCDIR = $(BUILDINCDIR) #else diff --git a/nx-X11/lib/Xrender/Picture.c b/nx-X11/lib/Xrender/Picture.c index 0b18f5c57..260eda05e 100644 --- a/nx-X11/lib/Xrender/Picture.c +++ b/nx-X11/lib/Xrender/Picture.c @@ -26,7 +26,7 @@ #include #endif #include "Xrenderint.h" -#include +#include static void _XRenderProcessPictureAttributes (Display *dpy, diff --git a/nx-X11/lib/Xrender/Xrender.h b/nx-X11/lib/Xrender/Xrender.h index 4d125cd81..a38f4cc3d 100644 --- a/nx-X11/lib/Xrender/Xrender.h +++ b/nx-X11/lib/Xrender/Xrender.h @@ -27,12 +27,12 @@ #define NX_CLEANUP -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef NX_CLEANUP #include "renderproto.h" diff --git a/nx-X11/lib/Xrender/Xrenderint.h b/nx-X11/lib/Xrender/Xrenderint.h index a90fe65d8..9744b0da4 100644 --- a/nx-X11/lib/Xrender/Xrenderint.h +++ b/nx-X11/lib/Xrender/Xrenderint.h @@ -28,9 +28,9 @@ #include "config.h" #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include +#include +#include +#include #include "Xrender.h" typedef struct { diff --git a/nx-X11/lib/Xtst/XRecord.c b/nx-X11/lib/Xtst/XRecord.c index 05cbda889..8e1823ef9 100644 --- a/nx-X11/lib/Xtst/XRecord.c +++ b/nx-X11/lib/Xtst/XRecord.c @@ -56,10 +56,10 @@ from The Open Group. #include #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _xrecord_info_data; static XExtensionInfo *xrecord_info = &_xrecord_info_data; diff --git a/nx-X11/lib/Xtst/XTest.c b/nx-X11/lib/Xtst/XTest.c index 2c3ae2b41..6b814aab4 100644 --- a/nx-X11/lib/Xtst/XTest.c +++ b/nx-X11/lib/Xtst/XTest.c @@ -33,13 +33,13 @@ from The Open Group. /* $XFree86: xc/lib/Xtst/XTest.c,v 1.5 2001/12/14 19:56:40 dawes Exp $ */ #define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _xtest_info_data; static XExtensionInfo *xtest_info = &_xtest_info_data; diff --git a/nx-X11/lib/oldX/Imakefile b/nx-X11/lib/oldX/Imakefile index 663d11019..e2ee75eb0 100644 --- a/nx-X11/lib/oldX/Imakefile +++ b/nx-X11/lib/oldX/Imakefile @@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.2 1998/12/20 11:57:19 dawes Exp $ #define DoProfileLib ProfileOldX #define LibName NX_oldX #define SoRev SOOLDXREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #ifdef SharedOldXReqs REQUIREDLIBS = SharedOldXReqs diff --git a/nx-X11/lib/xkbfile/Imakefile b/nx-X11/lib/xkbfile/Imakefile index d7693819e..6a675dc9a 100644 --- a/nx-X11/lib/xkbfile/Imakefile +++ b/nx-X11/lib/xkbfile/Imakefile @@ -13,7 +13,7 @@ XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.5 2003/10/15 21:23:38 herrb Exp $ #define HasSharedData NO #define LibName NX_xkbfile #define SoRev SOXKBFILEREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #ifdef SharedxkbfileReqs diff --git a/nx-X11/lib/xkbfile/XKMformat.h b/nx-X11/lib/xkbfile/XKMformat.h index 154da5694..ced5ea21d 100644 --- a/nx-X11/lib/xkbfile/XKMformat.h +++ b/nx-X11/lib/xkbfile/XKMformat.h @@ -29,9 +29,9 @@ #ifndef _XKMFORMAT_H_ #define _XKMFORMAT_H_ 1 -#include -#include -#include +#include +#include +#include typedef struct _xkmFileInfo { CARD8 type; diff --git a/nx-X11/lib/xkbfile/cout.c b/nx-X11/lib/xkbfile/cout.c index 161bd0f89..96b3ba411 100644 --- a/nx-X11/lib/xkbfile/cout.c +++ b/nx-X11/lib/xkbfile/cout.c @@ -32,10 +32,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/maprules.c b/nx-X11/lib/xkbfile/maprules.c index 53decdcad..75baf07ea 100644 --- a/nx-X11/lib/xkbfile/maprules.c +++ b/nx-X11/lib/xkbfile/maprules.c @@ -38,18 +38,18 @@ #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #include "XKBrules.h" @@ -57,18 +57,18 @@ #else #define NEED_EVENTS -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif diff --git a/nx-X11/lib/xkbfile/srvmisc.c b/nx-X11/lib/xkbfile/srvmisc.c index 3e4c73c98..d228389d9 100644 --- a/nx-X11/lib/xkbfile/srvmisc.c +++ b/nx-X11/lib/xkbfile/srvmisc.c @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbatom.c b/nx-X11/lib/xkbfile/xkbatom.c index 1a5dea0f8..d023d5410 100644 --- a/nx-X11/lib/xkbfile/xkbatom.c +++ b/nx-X11/lib/xkbfile/xkbatom.c @@ -79,9 +79,9 @@ SOFTWARE. #include #include #include -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbbells.c b/nx-X11/lib/xkbfile/xkbbells.c index 30b918fb4..8bf0885fe 100644 --- a/nx-X11/lib/xkbfile/xkbbells.c +++ b/nx-X11/lib/xkbfile/xkbbells.c @@ -29,8 +29,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "XKBbells.h" static char *_xkbStdBellNames[XkbBI_NumBells] = { diff --git a/nx-X11/lib/xkbfile/xkbconfig.c b/nx-X11/lib/xkbfile/xkbconfig.c index 7930979eb..8c31213a5 100644 --- a/nx-X11/lib/xkbfile/xkbconfig.c +++ b/nx-X11/lib/xkbfile/xkbconfig.c @@ -36,32 +36,32 @@ #include #include -#include +#include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include +#include +#include +#include +#include #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/xkbfile/xkbdraw.c b/nx-X11/lib/xkbfile/xkbdraw.c index c955f0321..865b2952e 100644 --- a/nx-X11/lib/xkbfile/xkbdraw.c +++ b/nx-X11/lib/xkbfile/xkbdraw.c @@ -33,12 +33,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbmisc.c b/nx-X11/lib/xkbfile/xkbmisc.c index cca31f778..52fca3d10 100644 --- a/nx-X11/lib/xkbfile/xkbmisc.c +++ b/nx-X11/lib/xkbfile/xkbmisc.c @@ -36,31 +36,31 @@ #include #include -#include -#include +#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include -#include +#include +#include #include "xkb.h" #endif diff --git a/nx-X11/lib/xkbfile/xkbout.c b/nx-X11/lib/xkbfile/xkbout.c index b69fdfbb4..8baf34b78 100644 --- a/nx-X11/lib/xkbfile/xkbout.c +++ b/nx-X11/lib/xkbfile/xkbout.c @@ -35,32 +35,32 @@ #include #include #include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include +#include -#include -#include +#include +#include #endif diff --git a/nx-X11/lib/xkbfile/xkbtext.c b/nx-X11/lib/xkbfile/xkbtext.c index 28592d242..41f2a8ff3 100644 --- a/nx-X11/lib/xkbfile/xkbtext.c +++ b/nx-X11/lib/xkbfile/xkbtext.c @@ -36,29 +36,29 @@ #include #include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include -#include +#include +#include #endif diff --git a/nx-X11/lib/xkbfile/xkmout.c b/nx-X11/lib/xkbfile/xkmout.c index 403e48810..7de4081af 100644 --- a/nx-X11/lib/xkbfile/xkmout.c +++ b/nx-X11/lib/xkbfile/xkmout.c @@ -32,10 +32,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkmread.c b/nx-X11/lib/xkbfile/xkmread.c index f22941f67..92ef05b86 100644 --- a/nx-X11/lib/xkbfile/xkmread.c +++ b/nx-X11/lib/xkbfile/xkmread.c @@ -34,33 +34,33 @@ #include -#include -#include +#include +#include #ifndef XKB_IN_SERVER #include -#include -#include +#include +#include -#include +#include -#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include Atom XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) diff --git a/nx-X11/lib/xtrans/Imakefile b/nx-X11/lib/xtrans/Imakefile index e29a38591..2cc880c39 100644 --- a/nx-X11/lib/xtrans/Imakefile +++ b/nx-X11/lib/xtrans/Imakefile @@ -1,6 +1,6 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ -#define IncSubdir X11 +#define IncSubdir nx-X11 all:: diff --git a/nx-X11/programs/Xserver/GL/glx/glxserver.h b/nx-X11/programs/Xserver/GL/glx/glxserver.h index 193ebcb6f..4238de537 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxserver.h +++ b/nx-X11/programs/Xserver/GL/glx/glxserver.h @@ -41,9 +41,9 @@ ** */ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c index 6441a4b4f..1889bdabd 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c @@ -39,7 +39,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "pixmapstr.h" #include "xf86glx_util.h" -#include +#include #include "GL/xf86glx.h" #ifdef ROUNDUP diff --git a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c index 3b9955eba..a3e1d08c6 100644 --- a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c +++ b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c @@ -8,7 +8,7 @@ #include "xf86Module.h" -#include +#include extern void DEC_XTRAPInit(INITARGS); diff --git a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c index 2dba356b7..1b4be39cd 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c @@ -44,7 +44,7 @@ SOFTWARE. #ifndef EXTMODULE #include -#include +#include #ifdef PC # include "fcntl.h" # include "io.h" @@ -56,7 +56,7 @@ SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS -#include /* From library include environment */ +#include /* From library include environment */ #include "input.h" /* From server include env. (must be before Xlib.h!) */ #ifdef PC # include "scrintst.h" /* Screen struct */ @@ -66,9 +66,9 @@ SOFTWARE. # include "scrnintstr.h" /* Screen struct */ #endif -#include -#include -#include +#include +#include +#include extern int XETrapErrorBase; extern xXTrapGetAvailReply XETrap_avail; diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdi.c b/nx-X11/programs/Xserver/XTrap/xtrapdi.c index bdddb6310..987d54e4f 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapdi.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapdi.c @@ -58,12 +58,12 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef EXTMODULE #include #include -#include +#include #else #include "xf86_ansic.h" #endif -#include -#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" /* Server swapping macros */ #include "dixstruct.h" /* Server ClientRec definitions */ @@ -77,9 +77,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "pixmapstr.h" /* DrawableRec */ #include "windowstr.h" /* Drawable Lookup structures */ -#include -#include -#include +#include +#include +#include #include "colormapst.h" #ifdef PANORAMIX #include "panoramiX.h" diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c index c43f6e332..ba8249c35 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c @@ -49,12 +49,12 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include -#include -#include +#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" #include "dixstruct.h" @@ -64,8 +64,8 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # include "extnsionst.h" /* Server ExtensionEntry definitions */ #endif # include "swapreq.h" /* Server SwapColorItem definition */ -#include -#include +#include +#include /* In-coming XTrap requests needing to be swapped to native format */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c index a9ceddb3d..10a070e9e 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c @@ -39,12 +39,12 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include -#include -#include +#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" #include "dixstruct.h" @@ -53,8 +53,8 @@ SOFTWARE. #else # include "extnsionst.h" /* Server ExtensionEntry definitions */ #endif -#include -#include +#include +#include globaldef void_function XETSwProcVector[256L] = { diff --git a/nx-X11/programs/Xserver/Xext/EVI.c b/nx-X11/programs/Xserver/Xext/EVI.c index 93ed19fa6..1eca62693 100644 --- a/nx-X11/programs/Xserver/Xext/EVI.c +++ b/nx-X11/programs/Xserver/Xext/EVI.c @@ -27,13 +27,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" #define _XEVI_SERVER_ -#include +#include #include "EVIstruct.h" #include "modinit.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/Xext/appgroup.c b/nx-X11/programs/Xserver/Xext/appgroup.c index e23ceca59..1dd4f1ae5 100644 --- a/nx-X11/programs/Xserver/Xext/appgroup.c +++ b/nx-X11/programs/Xserver/Xext/appgroup.c @@ -32,8 +32,8 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -42,14 +42,14 @@ from The Open Group. #include "colormapst.h" #include "servermd.h" #define _XAG_SERVER_ -#include -#include +#include +#include #define _SECURITY_SERVER -#include -#include +#include +#include #define XSERV_t -#include +#include #include "../os/osdep.h" #include diff --git a/nx-X11/programs/Xserver/Xext/bigreq.c b/nx-X11/programs/Xserver/Xext/bigreq.c index 3d6d49ca7..eba552cfe 100644 --- a/nx-X11/programs/Xserver/Xext/bigreq.c +++ b/nx-X11/programs/Xserver/Xext/bigreq.c @@ -33,13 +33,13 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include +#include #include "opaque.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/cup.c b/nx-X11/programs/Xserver/Xext/cup.c index 198aa801f..9b6d25c21 100644 --- a/nx-X11/programs/Xserver/Xext/cup.c +++ b/nx-X11/programs/Xserver/Xext/cup.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -42,8 +42,8 @@ in this Software without prior written authorization from The Open Group. #include "servermd.h" #include "swapreq.h" #define _XCUP_SERVER_ -#include -#include +#include +#include #ifndef EXTMODULE #include "../os/osdep.h" diff --git a/nx-X11/programs/Xserver/Xext/dgaproc.h b/nx-X11/programs/Xserver/Xext/dgaproc.h index eb9791098..4d3f224e6 100644 --- a/nx-X11/programs/Xserver/Xext/dgaproc.h +++ b/nx-X11/programs/Xserver/Xext/dgaproc.h @@ -3,7 +3,7 @@ #ifndef __DGAPROC_H #define __DGAPROC_H -#include +#include #include "pixmap.h" #define DGA_CONCURRENT_ACCESS 0x00000001 diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index 3e79602d1..fc40193e4 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -39,16 +39,16 @@ Equipment Corporation. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" #define DPMS_SERVER -#include -#include +#include +#include #include "dpmsproc.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.c b/nx-X11/programs/Xserver/Xext/extmod/modinit.c index f79204281..162f76ad8 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.c +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.c @@ -33,7 +33,7 @@ #include "xf86Module.h" #include "xf86Opt.h" -#include +#include #include "modinit.h" #include "globals.h" diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 2bafdb2b0..40e1828bb 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -12,26 +12,26 @@ #ifdef SHAPE extern void ShapeExtensionInit(INITARGS); #define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef MITMISC extern void MITMiscExtensionInit(INITARGS); #define _MITMISC_SERVER_ -#include +#include #endif #ifdef XTEST extern void XTestExtensionInit(INITARGS); #define _XTEST_SERVER_ -#include -#include +#include +#include #endif #if 1 @@ -40,49 +40,49 @@ extern void XTestExtension1Init(INITARGS); #ifdef BIGREQS extern void BigReqExtensionInit(INITARGS); -#include +#include #endif #ifdef XSYNC extern void SyncExtensionInit(INITARGS); #define _SYNC_SERVER -#include -#include +#include +#include #endif #ifdef SCREENSAVER extern void ScreenSaverExtensionInit (INITARGS); -#include +#include #endif #ifdef XCMISC extern void XCMiscExtensionInit(INITARGS); -#include +#include #endif #ifdef XF86VIDMODE extern void XFree86VidModeExtensionInit(INITARGS); #define _XF86VIDMODE_SERVER_ -#include +#include #endif #ifdef XF86MISC extern void XFree86MiscExtensionInit(INITARGS); #define _XF86MISC_SERVER_ #define _XF86MISC_SAVER_COMPAT_ -#include +#include #endif #ifdef XFreeXDGA extern void XFree86DGAExtensionInit(INITARGS); extern void XFree86DGARegister(INITARGS); #define _XF86DGA_SERVER_ -#include +#include #endif #ifdef DPMSExtension extern void DPMSExtensionInit(INITARGS); -#include +#include #endif #ifdef FONTCACHE @@ -95,31 +95,31 @@ extern void FontCacheExtensionInit(INITARGS); #ifdef TOGCUP extern void XcupExtensionInit(INITARGS); #define _XCUP_SERVER_ -#include +#include #endif #ifdef EVI extern void EVIExtensionInit(INITARGS); #define _XEVI_SERVER_ -#include +#include #endif #ifdef XV extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); extern void XvRegister(INITARGS); -#include -#include +#include +#include #endif #ifdef RES extern void ResExtensionInit(INITARGS); -#include +#include #endif #ifdef SHM extern void ShmExtensionInit(INITARGS); -#include +#include extern void ShmSetPixmapFormat( ScreenPtr pScreen, int format); diff --git a/nx-X11/programs/Xserver/Xext/fontcache.c b/nx-X11/programs/Xserver/Xext/fontcache.c index 9ab23a122..0956f9be9 100644 --- a/nx-X11/programs/Xserver/Xext/fontcache.c +++ b/nx-X11/programs/Xserver/Xext/fontcache.c @@ -37,8 +37,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -48,7 +48,7 @@ #define _FONTCACHE_SERVER_ #include "fontcacheP.h" #include "fontcachstr.h" -#include +#include #include "swaprep.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/mbuf.c b/nx-X11/programs/Xserver/Xext/mbuf.c index 37024da19..e6dec8f6f 100644 --- a/nx-X11/programs/Xserver/Xext/mbuf.c +++ b/nx-X11/programs/Xserver/Xext/mbuf.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "window.h" #include "os.h" #include "windowstr.h" @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. #include "opaque.h" #include "sleepuntil.h" #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/Xext/mbufbf.c b/nx-X11/programs/Xserver/Xext/mbufbf.c index 84e7ee839..318fa6756 100644 --- a/nx-X11/programs/Xserver/Xext/mbufbf.c +++ b/nx-X11/programs/Xserver/Xext/mbufbf.c @@ -34,8 +34,8 @@ in this Software without prior written authorization from The Open Group. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group. #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_BUFFER_ -#include +#include /* Support for doublebuffer hardare diff --git a/nx-X11/programs/Xserver/Xext/mbufpx.c b/nx-X11/programs/Xserver/Xext/mbufpx.c index 0973fc324..0e9ae1628 100644 --- a/nx-X11/programs/Xserver/Xext/mbufpx.c +++ b/nx-X11/programs/Xserver/Xext/mbufpx.c @@ -33,8 +33,8 @@ in this Software without prior written authorization from The Open Group. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -51,7 +51,7 @@ in this Software without prior written authorization from The Open Group. #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_PIXMAP_ -#include +#include static Bool NoopDDA_True() { return TRUE; } diff --git a/nx-X11/programs/Xserver/Xext/mitmisc.c b/nx-X11/programs/Xserver/Xext/mitmisc.c index f7b0ee55c..5c5183e69 100644 --- a/nx-X11/programs/Xserver/Xext/mitmisc.c +++ b/nx-X11/programs/Xserver/Xext/mitmisc.c @@ -34,14 +34,14 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #define _MITMISC_SERVER_ -#include +#include #include "modinit.h" extern Bool permitOldBugs; diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index 2dc011e70..000c4bf04 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -35,9 +35,9 @@ Equipment Corporation. #define NEED_REPLIES #include -#include -#include -#include +#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" @@ -50,7 +50,7 @@ Equipment Corporation. #include "windowstr.h" #include "pixmapstr.h" #include "panoramiX.h" -#include +#include #include "panoramiXsrv.h" #include "globals.h" #include "servermd.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h index 4178b985f..3f70b6473 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.h +++ b/nx-X11/programs/Xserver/Xext/panoramiX.h @@ -43,7 +43,7 @@ Equipment Corporation. #ifndef _PANORAMIX_H_ #define _PANORAMIX_H_ -#include +#include /*#include "gcstruct.h"*/ diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index e0548df7b..955b81ed1 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -30,8 +30,8 @@ Equipment Corporation. #endif #include -#include -#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" @@ -45,10 +45,10 @@ Equipment Corporation. #include "pixmapstr.h" #if 0 #include -#include +#include #endif #include "panoramiX.h" -#include +#include #include "panoramiXsrv.h" #include "globals.h" #include "panoramiXh.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 79a5a3290..2f2b2c63e 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -33,10 +33,10 @@ Equipment Corporation. #endif #include -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "dixfontstr.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/Xext/sampleEVI.c b/nx-X11/programs/Xserver/Xext/sampleEVI.c index 500a585c9..598992742 100644 --- a/nx-X11/programs/Xserver/Xext/sampleEVI.c +++ b/nx-X11/programs/Xserver/Xext/sampleEVI.c @@ -27,13 +27,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" #define _XEVI_SERVER_ -#include +#include #include "EVIstruct.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 4a7fc054c..ec91d080a 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -36,8 +36,8 @@ in this Software without prior written authorization from the X Consortium. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -47,7 +47,7 @@ in this Software without prior written authorization from the X Consortium. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#include +#include #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index 4bc49f408..bcc8574cb 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -57,19 +57,19 @@ in this Software without prior written authorization from The Open Group. #include "colormapst.h" #include "propertyst.h" #define _SECURITY_SERVER -#include +#include #include #include #ifdef LBX #define _XLBX_SERVER_ -#include +#include extern unsigned char LbxReqCode; #endif #ifdef XAPPGROUP -#include +#include #endif #include /* for file reading operations */ -#include /* for XA_STRING */ +#include /* for XA_STRING */ #ifdef NXAGENT_SERVER @@ -91,7 +91,7 @@ extern unsigned char LbxReqCode; #endif #if defined(WIN32) || defined(__CYGWIN__) -#include +#include #undef index #endif diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index 02182398a..78d3be319 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -33,8 +33,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #include "regionstr.h" #include "gcstruct.h" #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index d500e551c..6378a55a4 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -47,8 +47,8 @@ in this Software without prior written authorization from The Open Group. #include #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -60,8 +60,8 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #define _XSHM_SERVER_ -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" #endif diff --git a/nx-X11/programs/Xserver/Xext/sleepuntil.c b/nx-X11/programs/Xserver/Xext/sleepuntil.c index da93806f5..62f946cf8 100644 --- a/nx-X11/programs/Xserver/Xext/sleepuntil.c +++ b/nx-X11/programs/Xserver/Xext/sleepuntil.c @@ -34,8 +34,8 @@ in this Software without prior written authorization from The Open Group. #endif #include "sleepuntil.h" -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index 006cefa86..c122e2860 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -58,9 +58,9 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "os.h" #include "extnsionst.h" @@ -68,8 +68,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "resource.h" #include "opaque.h" #define _SYNC_SERVER -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index 0a9a09069..1d7ad0e09 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -34,14 +34,14 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include +#include #include "modinit.h" #if HAVE_STDINT_H diff --git a/nx-X11/programs/Xserver/Xext/xevie.c b/nx-X11/programs/Xserver/Xext/xevie.c index 354be121f..eb38d9223 100644 --- a/nx-X11/programs/Xserver/Xext/xevie.c +++ b/nx-X11/programs/Xserver/Xext/xevie.c @@ -38,8 +38,8 @@ of the copyright holder. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -47,13 +47,13 @@ of the copyright holder. #include "scrnintstr.h" #include "servermd.h" #define _XEVIE_SERVER_ -#include -#include +#include +#include #include "input.h" #include "inputstr.h" #include "windowstr.h" #include "cursorstr.h" -#include +#include #include "../os/osdep.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index 36af17622..c0cc7f938 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -64,8 +64,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -74,7 +74,7 @@ #include "extnsionst.h" #define _XF86BIGFONT_SERVER_ -#include +#include static void XF86BigfontResetProc( ExtensionEntry * /* extEntry */ diff --git a/nx-X11/programs/Xserver/Xext/xf86dga.c b/nx-X11/programs/Xserver/Xext/xf86dga.c index 9979bfb30..074118c18 100644 --- a/nx-X11/programs/Xserver/Xext/xf86dga.c +++ b/nx-X11/programs/Xserver/Xext/xf86dga.c @@ -13,8 +13,8 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -23,8 +23,8 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc #include "scrnintstr.h" #include "servermd.h" #define _XF86DGA_SERVER_ -#include -#include +#include +#include #include "swaprep.h" #include "dgaproc.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86dga2.c b/nx-X11/programs/Xserver/Xext/xf86dga2.c index 490554d9a..c2b64b048 100644 --- a/nx-X11/programs/Xserver/Xext/xf86dga2.c +++ b/nx-X11/programs/Xserver/Xext/xf86dga2.c @@ -12,8 +12,8 @@ #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "dixevents.h" @@ -24,8 +24,8 @@ #include "scrnintstr.h" #include "servermd.h" #define _XF86DGA_SERVER_ -#include -#include +#include +#include #include "swaprep.h" #include "dgaproc.h" #include "xf86dgaext.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86misc.c b/nx-X11/programs/Xserver/Xext/xf86misc.c index 6de794e1f..ccf983fae 100644 --- a/nx-X11/programs/Xserver/Xext/xf86misc.c +++ b/nx-X11/programs/Xserver/Xext/xf86misc.c @@ -12,8 +12,8 @@ #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -22,16 +22,16 @@ #include "servermd.h" #define _XF86MISC_SERVER_ #undef _XF86MISC_SAVER_COMPAT_ -#include +#include #include "swaprep.h" #include "xf86.h" -#include +#include #include "xf86miscproc.h" #if 0 -#include +#include #include "../os/osdep.h" -#include +#include #ifndef USL #ifndef Lynx #include diff --git a/nx-X11/programs/Xserver/Xext/xf86vmode.c b/nx-X11/programs/Xserver/Xext/xf86vmode.c index 979f55c00..0595343c9 100644 --- a/nx-X11/programs/Xserver/Xext/xf86vmode.c +++ b/nx-X11/programs/Xserver/Xext/xf86vmode.c @@ -39,15 +39,15 @@ from Kaleb S. KEITHLEY #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" #define _XF86VIDMODE_SERVER_ -#include +#include #include "swaprep.h" #include "xf86.h" #include "vidmodeproc.h" diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index dc4018dd7..7b3555452 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -10,14 +10,14 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include +#include #include "pixmapstr.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index 994b0c502..d9adc03c0 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -33,9 +33,9 @@ from The Open Group. #include #endif -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -46,11 +46,11 @@ from The Open Group. #include "dixevents.h" #include "sleepuntil.h" #define _XTEST_SERVER_ -#include -#include +#include +#include #ifdef XINPUT -#include -#include +#include +#include #define EXTENSION_EVENT_BASE 64 #include "extinit.h" /* LookupDeviceIntRec */ #endif /* XINPUT */ diff --git a/nx-X11/programs/Xserver/Xext/xtest1dd.c b/nx-X11/programs/Xserver/Xext/xtest1dd.c index c78cceed0..c945fd6bd 100644 --- a/nx-X11/programs/Xserver/Xext/xtest1dd.c +++ b/nx-X11/programs/Xserver/Xext/xtest1dd.c @@ -66,14 +66,14 @@ University of California. #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "dixstruct.h" #define XTestSERVER_SIDE -#include +#include #include "xtest1dd.h" diff --git a/nx-X11/programs/Xserver/Xext/xtest1di.c b/nx-X11/programs/Xserver/Xext/xtest1di.c index 985193a89..e7c3522ba 100644 --- a/nx-X11/programs/Xserver/Xext/xtest1di.c +++ b/nx-X11/programs/Xserver/Xext/xtest1di.c @@ -67,8 +67,8 @@ University of California. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "gcstruct.h" @@ -76,7 +76,7 @@ University of California. #include "dixstruct.h" #include "opaque.h" #define XTestSERVER_SIDE -#include +#include #include "modinit.h" #include "xtest1dd.h" diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index b361c0ff3..8037e6c45 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" @@ -63,12 +63,12 @@ SOFTWARE. #include "resource.h" #include "opaque.h" -#include -#include +#include +#include #include "xvdix.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/xvdix.h b/nx-X11/programs/Xserver/Xext/xvdix.h index 99d918406..6e6e07302 100644 --- a/nx-X11/programs/Xserver/Xext/xvdix.h +++ b/nx-X11/programs/Xserver/Xext/xvdix.h @@ -54,7 +54,7 @@ SOFTWARE. */ #include "scrnintstr.h" -#include +#include extern int XvScreenIndex; extern unsigned long XvExtensionGeneration; diff --git a/nx-X11/programs/Xserver/Xext/xvmain.c b/nx-X11/programs/Xserver/Xext/xvmain.c index bbbb34dcf..571bb9c46 100644 --- a/nx-X11/programs/Xserver/Xext/xvmain.c +++ b/nx-X11/programs/Xserver/Xext/xvmain.c @@ -79,8 +79,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "scrnintstr.h" @@ -95,8 +95,8 @@ SOFTWARE. #define GLOBAL -#include -#include +#include +#include #include "xvdix.h" #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index 30de35a2b..b1441fa1d 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -6,8 +6,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -15,11 +15,11 @@ #include "scrnintstr.h" #include "extnsionst.h" #include "servermd.h" -#include +#include #include "xvdix.h" -#include -#include -#include +#include +#include +#include #include "xvmcext.h" #ifdef HAS_XVMCSHM diff --git a/nx-X11/programs/Xserver/Xext/xvmcext.h b/nx-X11/programs/Xserver/Xext/xvmcext.h index 7cb8af24d..b92a53225 100644 --- a/nx-X11/programs/Xserver/Xext/xvmcext.h +++ b/nx-X11/programs/Xserver/Xext/xvmcext.h @@ -2,7 +2,7 @@ #ifndef _XVMC_H #define _XVMC_H -#include +#include #include "xvdix.h" typedef struct { diff --git a/nx-X11/programs/Xserver/Xext/xvmod.c b/nx-X11/programs/Xserver/Xext/xvmod.c index 7899f3a75..258023f65 100644 --- a/nx-X11/programs/Xserver/Xext/xvmod.c +++ b/nx-X11/programs/Xserver/Xext/xvmod.c @@ -4,12 +4,12 @@ #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" #include "gc.h" -#include -#include +#include +#include #include "xvdix.h" #include "xvmodproc.h" diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c index c1df7eb73..8073649f1 100644 --- a/nx-X11/programs/Xserver/Xi/allowev.c +++ b/nx-X11/programs/Xserver/Xi/allowev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c index 144a51ed4..c4fa46ba7 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.c +++ b/nx-X11/programs/Xserver/Xi/chgdctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* control constants */ +#include +#include /* control constants */ #include "XIstubs.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c index 3ffac39b3..d78b32a17 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.c +++ b/nx-X11/programs/Xserver/Xi/chgfctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* control constants */ +#include +#include /* control constants */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index a8a6024d8..136d257c6 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "globals.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 3df376d9a..88afd9df7 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c index 6e345d554..47db87293 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.c +++ b/nx-X11/programs/Xserver/Xi/chgprop.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c index bf2abd6b6..925d43c07 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.c +++ b/nx-X11/programs/Xserver/Xi/chgptr.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 8a57aeeee..ae46f50c6 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -59,13 +59,13 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/devbell.c b/nx-X11/programs/Xserver/Xi/devbell.c index 190e32086..12c444137 100644 --- a/nx-X11/programs/Xserver/Xi/devbell.c +++ b/nx-X11/programs/Xserver/Xi/devbell.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c index f0c9aea3d..ce5fe9ec9 100644 --- a/nx-X11/programs/Xserver/Xi/exevents.c +++ b/nx-X11/programs/Xserver/Xi/exevents.c @@ -59,10 +59,10 @@ SOFTWARE. #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include "inputstr.h" #include "windowstr.h" #include "miscstruct.h" diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c index 0b27b5cf7..750fa46cb 100644 --- a/nx-X11/programs/Xserver/Xi/extinit.c +++ b/nx-X11/programs/Xserver/Xi/extinit.c @@ -61,13 +61,13 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "inputstr.h" #include "gcstruct.h" /* pointer for extnsionst.h*/ #include "extnsionst.h" /* extension entry */ -#include -#include +#include +#include #include "dixevents.h" #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index a944d4cc8..ac2b69749 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c index 527273ac4..d8c310d92 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.c +++ b/nx-X11/programs/Xserver/Xi/getdctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c index 5652ad303..c6cb8457c 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.c +++ b/nx-X11/programs/Xserver/Xi/getfctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c index 3c1597cc9..61a98f1bf 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.c +++ b/nx-X11/programs/Xserver/Xi/getfocus.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 4e67d9c71..fe8fd9b22 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c index 6b2e38d0b..203799103 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.c +++ b/nx-X11/programs/Xserver/Xi/getmmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* Request macro */ +#include +#include /* Request macro */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 2b4de1f3e..ac37617ec 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structs */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c index c2ec2b9d5..7cd97b5ef 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.c +++ b/nx-X11/programs/Xserver/Xi/getselev.c @@ -59,10 +59,10 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include -#include +#include /* for inputstr.h */ +#include /* Request macro */ +#include +#include #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window struct */ #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index 3a335dd31..7743e797f 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c index 21e920a35..865263688 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.c +++ b/nx-X11/programs/Xserver/Xi/grabdev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c index ad43c29a0..9a20345be 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevb.c +++ b/nx-X11/programs/Xserver/Xi/grabdevb.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c index 952c5d89a..73b8690b9 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevk.c +++ b/nx-X11/programs/Xserver/Xi/grabdevk.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c index 02b1fee32..ec26ae407 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.c +++ b/nx-X11/programs/Xserver/Xi/gtmotion.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c index 6228352f5..e99584d0e 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.c +++ b/nx-X11/programs/Xserver/Xi/listdev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c index 520c6832a..054dae159 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.c +++ b/nx-X11/programs/Xserver/Xi/opendev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c index 34b140c8e..af2b4301d 100644 --- a/nx-X11/programs/Xserver/Xi/queryst.c +++ b/nx-X11/programs/Xserver/Xi/queryst.c @@ -40,12 +40,12 @@ from The Open Group. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/selectev.c b/nx-X11/programs/Xserver/Xi/selectev.c index a9b731864..de29fcf59 100644 --- a/nx-X11/programs/Xserver/Xi/selectev.c +++ b/nx-X11/programs/Xserver/Xi/selectev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/sendexev.c b/nx-X11/programs/Xserver/Xi/sendexev.c index 0b2a701bb..9decfadab 100644 --- a/nx-X11/programs/Xserver/Xi/sendexev.c +++ b/nx-X11/programs/Xserver/Xi/sendexev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* Window */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c index 37db5110d..74b8e3c05 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.c +++ b/nx-X11/programs/Xserver/Xi/setbmap.c @@ -62,11 +62,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c index 9b5b1e20d..04f55d4fc 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.c +++ b/nx-X11/programs/Xserver/Xi/setdval.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setfocus.c b/nx-X11/programs/Xserver/Xi/setfocus.c index a1dd09d71..b9a495612 100644 --- a/nx-X11/programs/Xserver/Xi/setfocus.c +++ b/nx-X11/programs/Xserver/Xi/setfocus.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "dixevents.h" diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c index 3fa2c7e7e..9fd8e7244 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.c +++ b/nx-X11/programs/Xserver/Xi/setmmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c index f95ef5514..17c46515d 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.c +++ b/nx-X11/programs/Xserver/Xi/setmode.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/stubs.c b/nx-X11/programs/Xserver/Xi/stubs.c index 2d9aad08b..33c55d3b7 100644 --- a/nx-X11/programs/Xserver/Xi/stubs.c +++ b/nx-X11/programs/Xserver/Xi/stubs.c @@ -62,11 +62,11 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "inputstr.h" -#include -#include +#include +#include #include "XIstubs.h" /*********************************************************************** diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c index 8de4cd225..b318fa044 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdev.c +++ b/nx-X11/programs/Xserver/Xi/ungrdev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/ungrdevb.c b/nx-X11/programs/Xserver/Xi/ungrdevb.c index 8927a5c6e..a76f9692c 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevb.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevb.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.c b/nx-X11/programs/Xserver/Xi/ungrdevk.c index 38cfa1b71..928b602f1 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevk.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevk.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/composite/compint.h b/nx-X11/programs/Xserver/composite/compint.h index 9a6a22f48..262d95108 100644 --- a/nx-X11/programs/Xserver/composite/compint.h +++ b/nx-X11/programs/Xserver/composite/compint.h @@ -50,7 +50,7 @@ #include "damage.h" #include "damageextint.h" #include "xfixes.h" -#include +#include #include /* diff --git a/nx-X11/programs/Xserver/damageext/damageextint.h b/nx-X11/programs/Xserver/damageext/damageextint.h index ab00effe3..d2f9d71ac 100644 --- a/nx-X11/programs/Xserver/damageext/damageextint.h +++ b/nx-X11/programs/Xserver/damageext/damageextint.h @@ -30,8 +30,8 @@ #define _DAMAGEEXTINT_H_ #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c index ad5294a4c..064987dec 100644 --- a/nx-X11/programs/Xserver/dbe/dbe.c +++ b/nx-X11/programs/Xserver/dbe/dbe.c @@ -41,8 +41,8 @@ #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "extnsionst.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/dbe/dbestruct.h b/nx-X11/programs/Xserver/dbe/dbestruct.h index 69135a837..43c4c525b 100644 --- a/nx-X11/programs/Xserver/dbe/dbestruct.h +++ b/nx-X11/programs/Xserver/dbe/dbestruct.h @@ -39,7 +39,7 @@ /* INCLUDES */ #define NEED_DBE_PROTOCOL -#include +#include #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/dbe/midbe.c b/nx-X11/programs/Xserver/dbe/midbe.c index 042f95953..b8383e11a 100644 --- a/nx-X11/programs/Xserver/dbe/midbe.c +++ b/nx-X11/programs/Xserver/dbe/midbe.c @@ -41,8 +41,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c index 207174280..583f2dafc 100644 --- a/nx-X11/programs/Xserver/dix/atom.c +++ b/nx-X11/programs/Xserver/dix/atom.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "resource.h" #include "dix.h" diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c index 32d9bae89..11a353f84 100644 --- a/nx-X11/programs/Xserver/dix/colormap.c +++ b/nx-X11/programs/Xserver/dix/colormap.c @@ -53,9 +53,9 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "dix.h" #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c index 187dd62c5..1e1dba36b 100644 --- a/nx-X11/programs/Xserver/dix/cursor.c +++ b/nx-X11/programs/Xserver/dix/cursor.c @@ -53,8 +53,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c index 917a3849a..91a92644c 100644 --- a/nx-X11/programs/Xserver/dix/devices.c +++ b/nx-X11/programs/Xserver/dix/devices.c @@ -54,12 +54,12 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -68,11 +68,11 @@ SOFTWARE. #include "site.h" #define XKB_IN_SERVER #ifdef XKB -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 71c22ae0e..b6010e627 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -109,15 +109,15 @@ int ProcInitialConnection(); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XAPPGROUP -#include +#include #endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index fac918963..6e515300d 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -56,9 +56,9 @@ Equipment Corporation. #include #endif -#include -#include -#include +#include +#include +#include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" @@ -139,7 +139,7 @@ _NXGetFontPathError: #ifdef XF86BIGFONT #define _XF86BIGFONT_SERVER_ -#include +#include #endif #define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c index f3b3373d0..8bcfce619 100644 --- a/nx-X11/programs/Xserver/dix/dixutils.c +++ b/nx-X11/programs/Xserver/dix/dixutils.c @@ -88,18 +88,18 @@ Author: Adobe Systems Incorporated #include #endif -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" #include "pixmapstr.h" #include "scrnintstr.h" #define XK_LATIN1 -#include +#include #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif /* diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index ab995a772..1166bf84b 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -115,12 +115,12 @@ of the copyright holder. #include #endif -#include +#include #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -134,13 +134,13 @@ of the copyright holder. #include "globals.h" #ifdef XKB -#include +#include extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XEVIE @@ -157,7 +157,7 @@ int xeviegrabState = 0; xEvent *xeviexE; #endif -#include +#include #include "exevents.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index 19333c151..dd6de9c63 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -63,7 +63,7 @@ SOFTWARE. #include "dispatch.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/gc.c b/nx-X11/programs/Xserver/dix/gc.c index 834919946..2c17de3d6 100644 --- a/nx-X11/programs/Xserver/dix/gc.c +++ b/nx-X11/programs/Xserver/dix/gc.c @@ -52,9 +52,9 @@ SOFTWARE. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "resource.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/dix/globals.c b/nx-X11/programs/Xserver/dix/globals.c index 15eedf602..e4f43fd01 100644 --- a/nx-X11/programs/Xserver/dix/globals.c +++ b/nx-X11/programs/Xserver/dix/globals.c @@ -53,8 +53,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/dix/grabs.c b/nx-X11/programs/Xserver/dix/grabs.c index e133c0dfc..839e930b1 100644 --- a/nx-X11/programs/Xserver/dix/grabs.c +++ b/nx-X11/programs/Xserver/dix/grabs.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "inputstr.h" #include "cursorstr.h" diff --git a/nx-X11/programs/Xserver/dix/initatoms.c b/nx-X11/programs/Xserver/dix/initatoms.c index a5972afd6..5f6244a76 100644 --- a/nx-X11/programs/Xserver/dix/initatoms.c +++ b/nx-X11/programs/Xserver/dix/initatoms.c @@ -7,8 +7,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "dix.h" void MakePredeclaredAtoms() diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c index 954c260c2..6a5b0021d 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -84,9 +84,9 @@ Equipment Corporation. #include #endif -#include -#include /* for unistd.h */ -#include +#include +#include /* for unistd.h */ +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" @@ -113,7 +113,7 @@ Equipment Corporation. #ifdef DPMSExtension #define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif diff --git a/nx-X11/programs/Xserver/dix/pixmap.c b/nx-X11/programs/Xserver/dix/pixmap.c index 7888cf90a..463e31598 100644 --- a/nx-X11/programs/Xserver/dix/pixmap.c +++ b/nx-X11/programs/Xserver/dix/pixmap.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/dix/privates.c b/nx-X11/programs/Xserver/dix/privates.c index 36bbc65d1..d08883d1d 100644 --- a/nx-X11/programs/Xserver/dix/privates.c +++ b/nx-X11/programs/Xserver/dix/privates.c @@ -33,7 +33,7 @@ from The Open Group. #include #endif -#include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c index f462a3ebd..51cbc1a0d 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "propertyst.h" #include "dixstruct.h" @@ -62,7 +62,7 @@ SOFTWARE. #include "swaprep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index e0fc2b997..ed8a255f5 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -106,7 +106,7 @@ Equipment Corporation. #include #endif -#include +#include #include "misc.h" #include "os.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/dix/swaprep.c b/nx-X11/programs/Xserver/dix/swaprep.c index 9776cd437..b8f245408 100644 --- a/nx-X11/programs/Xserver/dix/swaprep.c +++ b/nx-X11/programs/Xserver/dix/swaprep.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "misc.h" #include "dixstruct.h" #include diff --git a/nx-X11/programs/Xserver/dix/swapreq.c b/nx-X11/programs/Xserver/dix/swapreq.c index 7d57d551f..35a7e7527 100644 --- a/nx-X11/programs/Xserver/dix/swapreq.c +++ b/nx-X11/programs/Xserver/dix/swapreq.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" /* for SendEvent */ diff --git a/nx-X11/programs/Xserver/dix/tables.c b/nx-X11/programs/Xserver/dix/tables.c index 5196f0e85..eb4f4c8d2 100644 --- a/nx-X11/programs/Xserver/dix/tables.c +++ b/nx-X11/programs/Xserver/dix/tables.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "extnsionst.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 340ca50cc..5854f2e95 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -105,11 +105,11 @@ Equipment Corporation. #include "globals.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif /****** diff --git a/nx-X11/programs/Xserver/fb/fb.h b/nx-X11/programs/Xserver/fb/fb.h index 202638d32..b64f3a227 100644 --- a/nx-X11/programs/Xserver/fb/fb.h +++ b/nx-X11/programs/Xserver/fb/fb.h @@ -27,7 +27,7 @@ #ifndef _FB_H_ #define _FB_H_ -#include +#include #include "scrnintstr.h" #include "pixmap.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/fb/fbcmap.c b/nx-X11/programs/Xserver/fb/fbcmap.c index 762c51c9d..a7c8ca638 100644 --- a/nx-X11/programs/Xserver/fb/fbcmap.c +++ b/nx-X11/programs/Xserver/fb/fbcmap.c @@ -34,8 +34,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c index 83d556a0e..469f3ea08 100644 --- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c +++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c @@ -2,8 +2,8 @@ #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "glyphstr.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Agent.h b/nx-X11/programs/Xserver/hw/nxagent/Agent.h index dbed1e0d8..ec312bad2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Agent.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Agent.h @@ -103,8 +103,8 @@ typedef XID KeySym64; #define NX_TRANS_SOCKET #define GC XlibGC -#include "Xlib.h" -#include "X11/extensions/shape.h" +#include +#include #undef GC #ifdef _XSERVER64_tmp diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 557798e7f..21bcc60e5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -33,7 +33,7 @@ #include "gcstruct.h" #include "xfixeswire.h" -#include +#include /* * Use asyncronous get property replies. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c index 0fb9491a4..63c3b73c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c @@ -25,7 +25,7 @@ #include "scrnintstr.h" #include "Agent.h" -#include +#include #include "opaque.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 862ce57d0..abc6a9380 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -38,8 +38,8 @@ is" without express or implied warranty. #include #include -#include -#include +#include +#include #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index c33564092..d965d574c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -66,7 +66,7 @@ #define Window XlibWindow #define Atom XlibAtom #define Time XlibXID -#include +#include #undef Window #undef Atom #undef Time @@ -90,10 +90,10 @@ #undef KeySym #undef XID -#include +#include #include "Shadow.h" -#include +#include "X11/include/Xrandr_nxagent.h" #include "NXlib.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index c74fa151f..02b2b8cbe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -18,7 +18,7 @@ #ifndef __Events_H__ #define __Events_H__ -#include +#include #define ProcessedExpose (LASTEvent + 1) #define ProcessedNotify (LASTEvent + 2) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.c b/nx-X11/programs/Xserver/hw/nxagent/Holder.c index 4aca1ecdb..64ffb24a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Holder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.c @@ -33,7 +33,7 @@ #include "../../include/gc.h" #include "../../include/window.h" -#include +#include "X11/include/xpm_nxagent.h" #include "Agent.h" #include "Pixmaps.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h index 98e879662..b307f42e6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h @@ -19,7 +19,7 @@ #define __Icons_H__ #define Pixel XpmPixel -#include +#include "X11/include/xpm_nxagent.h" #undef Pixel #define NXAGENT_ICON_NAME "nxagent.xpm" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 835aebeb6..9ead48de1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -64,13 +64,13 @@ is" without express or implied warranty. #include "property.h" #include "Init.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include -#include "X11/extensions/XKBrules.h" +#include #include "Xatom.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h index d11561e18..a274b8a39 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h @@ -33,12 +33,12 @@ #else -#include -#include +#include +#include #endif -#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h index 8667ded16..b4433d6c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h @@ -27,7 +27,7 @@ #ifndef NXAGENT_SERVER -#include +#include #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index af76ed4c2..704bfcc0d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -109,12 +109,13 @@ int ProcInitialConnection(); #define True 1 #endif +#include + #define GC XlibGC -#include +#include #undef GC #include "windowstr.h" -#include #include "dixfontstr.h" #include "gcstruct.h" #include "selection.h" @@ -135,15 +136,15 @@ int ProcInitialConnection(); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XAPPGROUP -#include +#include #endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" -#include +#include #endif #include "Atoms.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 4f41ee228..2f3a75147 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -73,16 +73,16 @@ Equipment Corporation. #include #endif -#include -#include -#include +#include +#include +#include +#include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" #include "cursorstr.h" #include "misc.h" #include "opaque.h" -#include #include "dixfontstr.h" #include "closestr.h" @@ -172,7 +172,7 @@ _NXGetFontPathError: #ifdef XF86BIGFONT #define _XF86BIGFONT_SERVER_ -#include +#include #endif #define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index 5940fe7d1..11ff62947 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -132,13 +132,13 @@ of the copyright holder. #include #endif -#include +#include #include "Xlib.h" #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -152,13 +152,13 @@ of the copyright holder. #include "globals.h" #ifdef XKB -#include +#include extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XEVIE @@ -175,7 +175,7 @@ int xeviegrabState = 0; xEvent *xeviexE; #endif -#include +#include #include "exevents.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c index f964e2fd8..962367bf2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -80,7 +80,7 @@ SOFTWARE. #include "../../dix/dispatch.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h index e7bb2d841..5d7fcf640 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h @@ -50,7 +50,7 @@ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ -#include +#include #include "../../render/picture.h" #include "screenint.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index e1c6b6d8c..aa3c606f8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -97,10 +97,10 @@ Equipment Corporation. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "regionstr.h" @@ -112,7 +112,7 @@ Equipment Corporation. #include "dixstruct.h" #include "mi.h" -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c index 8132e9dd0..a720cafbf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c @@ -67,7 +67,7 @@ SOFTWARE. #include #endif -#include +#include #include "regionstr.h" #include "region.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index a2d4a8e52..d6c5aa4dd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "propertyst.h" #include "dixstruct.h" @@ -79,7 +79,7 @@ SOFTWARE. #include "swaprep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 260355c6e..dc1d2387e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -47,8 +47,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -59,9 +59,9 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" -#include -#include -#include +#include +#include +#include #include "cursorstr.h" #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c index 833a33fd3..39a1992de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c @@ -123,7 +123,7 @@ Equipment Corporation. #include #endif -#include +#include #include "misc.h" #include "os.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 3b40b82f7..95905fde7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -64,8 +64,8 @@ in this Software without prior written authorization from The Open Group. #include #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -77,8 +77,8 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #define _XSHM_SERVER_ -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 4017099e9..4552ad563 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -123,11 +123,11 @@ Equipment Corporation. #include "globals.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #include "Screen.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c index cfce34463..1724374a0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c @@ -71,8 +71,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" @@ -82,12 +82,12 @@ SOFTWARE. #include "resource.h" #include "opaque.h" -#include -#include +#include +#include #include "xvdix.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #include "Trap.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 095aa7b08..491a92c2f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -77,13 +77,13 @@ is" without express or implied warranty. #include "Shadow.h" #include "Utils.h" -#include +#include "X11/include/Xrandr_nxagent.h" #define GC XlibGC #define Font XlibFont #define KeySym XlibKeySym #define XID XlibXID -#include +#include #undef GC #undef Font #undef KeySym diff --git a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c index 6bce2eaeb..30fe1968e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c +++ b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c @@ -29,9 +29,9 @@ is" without express or implied warranty. */ -#include -#include -#include +#include +#include +#include #undef Bool #include "screenint.h" #include "input.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h new file mode 100644 index 000000000..acfc5834e --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * Copyright © 2006 Intel Corporation + * Copyright © 2008 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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. + * + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xrandr library header file only contains symbols + * required by nxagent and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in + * nxagent, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +#include +#include + +_XFUNCPROTOBEGIN + +typedef XID RRProvider; +typedef XID RRMode; + +/* + * Events. + */ + +typedef struct { + int type; /* event base */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window which selected for this event */ + Window root; /* Root window for changed screen */ + Time timestamp; /* when the screen change occurred */ + Time config_timestamp; /* when the last configuration change */ + SizeID size_index; + SubpixelOrder subpixel_order; + Rotation rotation; + int width; + int height; + int mwidth; + int mheight; +} XRRScreenChangeNotifyEvent; + +typedef unsigned long XRRModeFlags; + +typedef struct _XRRModeInfo { + RRMode id; + unsigned int width; + unsigned int height; + unsigned long dotClock; + unsigned int hSyncStart; + unsigned int hSyncEnd; + unsigned int hTotal; + unsigned int hSkew; + unsigned int vSyncStart; + unsigned int vSyncEnd; + unsigned int vTotal; + char *name; + unsigned int nameLength; + XRRModeFlags modeFlags; +} XRRModeInfo; + +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h new file mode 100644 index 000000000..b02e5a913 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h @@ -0,0 +1,259 @@ +/* + * Copyright (C) 1989-95 GROUPE BULL + * + * 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 + * GROUPE BULL 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 GROUPE BULL shall not be + * used in advertising or otherwise to promote the sale, use or other dealings + * in this Software without prior written authorization from GROUPE BULL. + */ + +/*****************************************************************************\ +* xpm.h: * +* * +* XPM library * +* Include file * +* * +* Developed by Arnaud Le Hors * +\*****************************************************************************/ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xpm library header file only contains symbols + * required by nxagent and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in nxagent, it will + * attempt pulling in the header file. + * However, the headers of the same name from should be + * used instead. + * + * FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef XPM_h +#define XPM_h + +/* + * first some identification numbers: + * the version and revision numbers are determined with the following rule: + * SO Major number = LIB minor version number. + * SO Minor number = LIB sub-minor version number. + * e.g: Xpm version 3.2f + * we forget the 3 which is the format number, 2 gives 2, and f gives 6. + * thus we have XpmVersion = 2 and XpmRevision = 6 + * which gives SOXPMLIBREV = 2.6 + * + * Then the XpmIncludeVersion number is built from these numbers. + */ +#define XpmFormat 3 +#define XpmVersion 4 +#define XpmRevision 11 +#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision) + +#ifndef XPM_NUMBERS + +/* let's define Pixel if it is not done yet */ +#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED) +typedef unsigned long Pixel; /* Index into colormap */ +# define PIXEL_ALREADY_TYPEDEFED +#endif + +/* include headers from instead of */ +#include +#include + +/* Return ErrorStatus codes: + * null if full success + * positive if partial success + * negative if failure + */ + +#define XpmColorError 1 +#define XpmSuccess 0 +#define XpmOpenFailed -1 +#define XpmFileInvalid -2 +#define XpmNoMemory -3 +#define XpmColorFailed -4 + +typedef struct { + char *name; /* Symbolic color name */ + char *value; /* Color value */ + Pixel pixel; /* Color pixel */ +} XpmColorSymbol; + +typedef struct { + char *name; /* name of the extension */ + unsigned int nlines; /* number of lines in this extension */ + char **lines; /* pointer to the extension array of strings */ +} XpmExtension; + +typedef struct { + char *string; /* characters string */ + char *symbolic; /* symbolic name */ + char *m_color; /* monochrom default */ + char *g4_color; /* 4 level grayscale default */ + char *g_color; /* other level grayscale default */ + char *c_color; /* color default */ +} XpmColor; + +typedef struct { + unsigned int width; /* image width */ + unsigned int height; /* image height */ + unsigned int cpp; /* number of characters per pixel */ + unsigned int ncolors; /* number of colors */ + XpmColor *colorTable; /* list of related colors */ + unsigned int *data; /* image data */ +} XpmImage; + +typedef struct { + unsigned long valuemask; /* Specifies which attributes are defined */ + char *hints_cmt; /* Comment of the hints section */ + char *colors_cmt; /* Comment of the colors section */ + char *pixels_cmt; /* Comment of the pixels section */ + unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ + unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ + unsigned int nextensions; /* number of extensions */ + XpmExtension *extensions; /* pointer to array of extensions */ +} XpmInfo; + +typedef int (*XpmAllocColorFunc)( + Display* /* display */, + Colormap /* colormap */, + char* /* colorname */, + XColor* /* xcolor */, + void* /* closure */ +); + +typedef int (*XpmFreeColorsFunc)( + Display* /* display */, + Colormap /* colormap */, + Pixel* /* pixels */, + int /* npixels */, + void* /* closure */ +); + + +/* required struct for hw/nxagent/Holder.c */ +typedef struct { + unsigned long valuemask; /* Specifies which attributes are + defined */ + + Visual *visual; /* Specifies the visual to use */ + Colormap colormap; /* Specifies the colormap to use */ + unsigned int depth; /* Specifies the depth */ + unsigned int width; /* Returns the width of the created + pixmap */ + unsigned int height; /* Returns the height of the created + pixmap */ + unsigned int x_hotspot; /* Returns the x hotspot's + coordinate */ + unsigned int y_hotspot; /* Returns the y hotspot's + coordinate */ + unsigned int cpp; /* Specifies the number of char per + pixel */ + Pixel *pixels; /* List of used color pixels */ + unsigned int npixels; /* Number of used pixels */ + XpmColorSymbol *colorsymbols; /* List of color symbols to override */ + unsigned int numsymbols; /* Number of symbols */ + char *rgb_fname; /* RGB text file name */ + unsigned int nextensions; /* Number of extensions */ + XpmExtension *extensions; /* List of extensions */ + + unsigned int ncolors; /* Number of colors */ + XpmColor *colorTable; /* List of colors */ +/* 3.2 backward compatibility code */ + char *hints_cmt; /* Comment of the hints section */ + char *colors_cmt; /* Comment of the colors section */ + char *pixels_cmt; /* Comment of the pixels section */ +/* end 3.2 bc */ + unsigned int mask_pixel; /* Color table index of transparent + color */ + + /* Color Allocation Directives */ + Bool exactColors; /* Only use exact colors for visual */ + unsigned int closeness; /* Allowable RGB deviation */ + unsigned int red_closeness; /* Allowable red deviation */ + unsigned int green_closeness; /* Allowable green deviation */ + unsigned int blue_closeness; /* Allowable blue deviation */ + int color_key; /* Use colors from this color set */ + + Pixel *alloc_pixels; /* Returns the list of alloc'ed color + pixels */ + int nalloc_pixels; /* Returns the number of alloc'ed + color pixels */ + + Bool alloc_close_colors; /* Specify whether close colors should + be allocated using XAllocColor + or not */ + int bitmap_format; /* Specify the format of 1bit depth + images: ZPixmap or XYBitmap */ + + /* Color functions */ + XpmAllocColorFunc alloc_color; /* Application color allocator */ + XpmFreeColorsFunc free_colors; /* Application color de-allocator */ + void *color_closure; /* Application private data to pass to + alloc_color and free_colors */ + +} XpmAttributes; + +/* XpmAttributes value masks bits */ + +/* required masks bits for hw/nxagent/Holder.c */ +#define XpmDepth (1L<<2) +#define XpmSize (1L<<3) /* width & height */ + +/* macros for forward declarations of functions with prototypes */ +#define FUNC(f, t, p) extern t f p +#define LFUNC(f, t, p) static t f p + + +/* + * functions declarations (for building nxagent against system wide libXpm4, + * but also against libNX_X11 (as opposed to system-wide libX11). + */ + +_XFUNCPROTOBEGIN + +/* Keep for hw/nxagent/Holder.c */ +FUNC(XpmCreatePixmapFromData, int, (Display *display, + Drawable d, + char **data, + Pixmap *pixmap_return, + Pixmap *shapemask_return, + XpmAttributes *attributes)); +/* Keep for hw/nxagent/Display.c */ +FUNC(XpmReadFileToPixmap, int, (Display *display, + Drawable d, + const char *filename, + Pixmap *pixmap_return, + Pixmap *shapemask_return, + XpmAttributes *attributes)); + +_XFUNCPROTOEND + +#endif /* XPM_NUMBERS */ +#endif diff --git a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h index c51e0ee14..ca68c1b63 100644 --- a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h +++ b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h @@ -45,7 +45,7 @@ #ifndef XF86_LIBC_H #define XF86_LIBC_H 1 -#include +#include #include /* diff --git a/nx-X11/programs/Xserver/include/Imakefile b/nx-X11/programs/Xserver/include/Imakefile index d68ef940c..4c9b169a4 100644 --- a/nx-X11/programs/Xserver/include/Imakefile +++ b/nx-X11/programs/Xserver/include/Imakefile @@ -63,5 +63,5 @@ InstallDriverSDKNonExecFile(validate.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(window.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(windowstr.h,$(DRIVERSDKINCLUDEDIR)) -BuildIncludes($(HEADERS),X11,..) -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) +BuildIncludes($(HEADERS),nx-X11,..) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11,$(INSTINCFLAGS)) diff --git a/nx-X11/programs/Xserver/include/closestr.h b/nx-X11/programs/Xserver/include/closestr.h index c06010113..31b5693f5 100644 --- a/nx-X11/programs/Xserver/include/closestr.h +++ b/nx-X11/programs/Xserver/include/closestr.h @@ -33,7 +33,7 @@ from The Open Group. #define CLOSESTR_H #define NEED_REPLIES -#include +#include #include "closure.h" #include "dix.h" #include "misc.h" diff --git a/nx-X11/programs/Xserver/include/colormap.h b/nx-X11/programs/Xserver/include/colormap.h index d519bb782..67f44193d 100644 --- a/nx-X11/programs/Xserver/include/colormap.h +++ b/nx-X11/programs/Xserver/include/colormap.h @@ -50,7 +50,7 @@ SOFTWARE. #ifndef CMAP_H #define CMAP_H 1 -#include +#include #include "screenint.h" #include "window.h" diff --git a/nx-X11/programs/Xserver/include/dixfontstr.h b/nx-X11/programs/Xserver/include/dixfontstr.h index 948bf1adb..09a162451 100644 --- a/nx-X11/programs/Xserver/include/dixfontstr.h +++ b/nx-X11/programs/Xserver/include/dixfontstr.h @@ -30,7 +30,7 @@ SOFTWARE. #include #include "closure.h" #define NEED_REPLIES -#include /* for xQueryFontReply */ +#include /* for xQueryFontReply */ #define FONTCHARSET(font) (font) #define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field diff --git a/nx-X11/programs/Xserver/include/dixstruct.h b/nx-X11/programs/Xserver/include/dixstruct.h index 53c78d2de..e4b5e9fe8 100644 --- a/nx-X11/programs/Xserver/include/dixstruct.h +++ b/nx-X11/programs/Xserver/include/dixstruct.h @@ -31,7 +31,7 @@ SOFTWARE. #include "cursor.h" #include "gc.h" #include "pixmap.h" -#include +#include /* * direct-mapped hash table, used by resource manager to store diff --git a/nx-X11/programs/Xserver/include/gc.h b/nx-X11/programs/Xserver/include/gc.h index 1c0c90d3e..1969e5cd7 100644 --- a/nx-X11/programs/Xserver/include/gc.h +++ b/nx-X11/programs/Xserver/include/gc.h @@ -50,15 +50,15 @@ SOFTWARE. #ifndef GC_H #define GC_H -#include /* for GContext, Mask */ +#include /* for GContext, Mask */ #ifndef _XTYPEDEF_POINTER /* Don't let Xdefs.h define 'pointer' */ #define _XTYPEDEF_POINTER 1 #endif /* _XTYPEDEF_POINTER */ -#include /* for Bool */ +#include /* for Bool */ -#include +#include #include "screenint.h" /* for ScreenPtr */ #include "pixmap.h" /* for DrawablePtr */ diff --git a/nx-X11/programs/Xserver/include/gcstruct.h b/nx-X11/programs/Xserver/include/gcstruct.h index 16779f692..71d3ace47 100644 --- a/nx-X11/programs/Xserver/include/gcstruct.h +++ b/nx-X11/programs/Xserver/include/gcstruct.h @@ -58,7 +58,7 @@ SOFTWARE. #include "region.h" #include "pixmap.h" #include "screenint.h" -#include +#include /* * functions which modify the state of the GC diff --git a/nx-X11/programs/Xserver/include/input.h b/nx-X11/programs/Xserver/include/input.h index 88cc98050..a7c8d0dfe 100644 --- a/nx-X11/programs/Xserver/include/input.h +++ b/nx-X11/programs/Xserver/include/input.h @@ -52,8 +52,8 @@ SOFTWARE. #include "misc.h" #include "screenint.h" -#include -#include +#include +#include #include "window.h" /* for WindowPtr */ #define DEVICE_INIT 0 diff --git a/nx-X11/programs/Xserver/include/misc.h b/nx-X11/programs/Xserver/include/misc.h index 1576f1433..cb3051c94 100644 --- a/nx-X11/programs/Xserver/include/misc.h +++ b/nx-X11/programs/Xserver/include/misc.h @@ -77,16 +77,16 @@ OF THIS SOFTWARE. extern unsigned long globalSerialNumber; extern unsigned long serverGeneration; -#include -#include -#include -#include +#include +#include +#include +#include #ifndef _XTYPEDEF_POINTER /* Don't let Xdefs.h define 'pointer' */ #define _XTYPEDEF_POINTER 1 #endif /* _XTYPEDEF_POINTER */ -#include +#include #ifndef IN_MODULE #ifndef NULL @@ -121,7 +121,7 @@ typedef struct _xReq *xReqPtr; #include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */ #ifndef IN_MODULE -#include /* for bcopy, bzero, and bcmp */ +#include /* for bcopy, bzero, and bcmp */ #endif #define NullBox ((BoxPtr)0) diff --git a/nx-X11/programs/Xserver/include/miscstruct.h b/nx-X11/programs/Xserver/include/miscstruct.h index 87874aae4..7df9240c9 100644 --- a/nx-X11/programs/Xserver/include/miscstruct.h +++ b/nx-X11/programs/Xserver/include/miscstruct.h @@ -51,7 +51,7 @@ SOFTWARE. #define MISCSTRUCT_H 1 #include "misc.h" -#include +#include #include "gc.h" typedef xPoint DDXPointRec; diff --git a/nx-X11/programs/Xserver/include/opaque.h b/nx-X11/programs/Xserver/include/opaque.h index ca29afdc0..749b6f5b9 100644 --- a/nx-X11/programs/Xserver/include/opaque.h +++ b/nx-X11/programs/Xserver/include/opaque.h @@ -31,7 +31,7 @@ from The Open Group. #ifndef OPAQUE_H #define OPAQUE_H -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h index 551b35097..e150e1e0b 100644 --- a/nx-X11/programs/Xserver/include/os.h +++ b/nx-X11/programs/Xserver/include/os.h @@ -54,7 +54,7 @@ SOFTWARE. #include "misc.h" #define ALLOCATE_LOCAL_FALLBACK(_size) Xalloc((unsigned long)(_size)) #define DEALLOCATE_LOCAL_FALLBACK(_ptr) Xfree((void *)(_ptr)) -#include +#include #ifndef IN_MODULE #include #else diff --git a/nx-X11/programs/Xserver/include/scrnintstr.h b/nx-X11/programs/Xserver/include/scrnintstr.h index 297227493..0539ca516 100644 --- a/nx-X11/programs/Xserver/include/scrnintstr.h +++ b/nx-X11/programs/Xserver/include/scrnintstr.h @@ -56,7 +56,7 @@ SOFTWARE. #include "colormap.h" #include "cursor.h" #include "validate.h" -#include +#include #include "dix.h" typedef struct _PixmapFormat { diff --git a/nx-X11/programs/Xserver/include/window.h b/nx-X11/programs/Xserver/include/window.h index cbfed645f..571115365 100644 --- a/nx-X11/programs/Xserver/include/window.h +++ b/nx-X11/programs/Xserver/include/window.h @@ -53,7 +53,7 @@ SOFTWARE. #include "misc.h" #include "region.h" #include "screenint.h" -#include +#include #define TOTALLY_OBSCURED 0 #define UNOBSCURED 1 diff --git a/nx-X11/programs/Xserver/include/windowstr.h b/nx-X11/programs/Xserver/include/windowstr.h index dab6fcf71..5c181bc51 100644 --- a/nx-X11/programs/Xserver/include/windowstr.h +++ b/nx-X11/programs/Xserver/include/windowstr.h @@ -58,7 +58,7 @@ SOFTWARE. #include "resource.h" /* for ROOT_WINDOW_ID_BASE */ #include "dix.h" #include "miscstruct.h" -#include +#include #include "opaque.h" #define GuaranteeNothing 0 diff --git a/nx-X11/programs/Xserver/mfb/maskbits.h b/nx-X11/programs/Xserver/mfb/maskbits.h index 7e2b74a18..94a7e8955 100644 --- a/nx-X11/programs/Xserver/mfb/maskbits.h +++ b/nx-X11/programs/Xserver/mfb/maskbits.h @@ -28,8 +28,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "servermd.h" diff --git a/nx-X11/programs/Xserver/mi/mi.h b/nx-X11/programs/Xserver/mi/mi.h index 0f3f5778f..6eea34b6c 100644 --- a/nx-X11/programs/Xserver/mi/mi.h +++ b/nx-X11/programs/Xserver/mi/mi.h @@ -49,7 +49,7 @@ SOFTWARE. #ifndef MI_H #define MI_H -#include +#include #include "region.h" #include "validate.h" #include "window.h" diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c index f06c4b51d..8db188a6e 100644 --- a/nx-X11/programs/Xserver/mi/miarc.c +++ b/nx-X11/programs/Xserver/mi/miarc.c @@ -62,8 +62,8 @@ SOFTWARE. #include #undef _XOPEN_SOURCE #endif -#include -#include +#include +#include #include "misc.h" #include "gcstruct.h" #include "scrnintstr.h" @@ -72,7 +72,7 @@ SOFTWARE. #include "mifpoly.h" #include "mi.h" #include "mifillarc.h" -#include +#include static double miDsin(double a); static double miDcos(double a); diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c index 0caad083f..60318a046 100644 --- a/nx-X11/programs/Xserver/mi/mibitblt.c +++ b/nx-X11/programs/Xserver/mi/mibitblt.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "gcstruct.h" @@ -62,7 +62,7 @@ SOFTWARE. #include "scrnintstr.h" #include "mi.h" #include "regionstr.h" -#include +#include #include "servermd.h" #ifndef HAS_FFS diff --git a/nx-X11/programs/Xserver/mi/mibstore.c b/nx-X11/programs/Xserver/mi/mibstore.c index f18648f66..875ec87f3 100644 --- a/nx-X11/programs/Xserver/mi/mibstore.c +++ b/nx-X11/programs/Xserver/mi/mibstore.c @@ -49,9 +49,9 @@ implied warranty. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "regionstr.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/mi/miclipn.c b/nx-X11/programs/Xserver/mi/miclipn.c index 14ff0d69a..913b0e47a 100644 --- a/nx-X11/programs/Xserver/mi/miclipn.c +++ b/nx-X11/programs/Xserver/mi/miclipn.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "windowstr.h" #include "scrnintstr.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/mi/micmap.c b/nx-X11/programs/Xserver/mi/micmap.c index 98f3e521d..15d3f7f46 100644 --- a/nx-X11/programs/Xserver/mi/micmap.c +++ b/nx-X11/programs/Xserver/mi/micmap.c @@ -40,8 +40,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index f3dae5768..782ddad49 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -80,10 +80,10 @@ Equipment Corporation. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "regionstr.h" @@ -95,7 +95,7 @@ Equipment Corporation. #include "dixstruct.h" #include "mi.h" -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/mi/mifillarc.c b/nx-X11/programs/Xserver/mi/mifillarc.c index 0dcf25d05..533bfe996 100644 --- a/nx-X11/programs/Xserver/mi/mifillarc.c +++ b/nx-X11/programs/Xserver/mi/mifillarc.c @@ -34,8 +34,8 @@ Author: Bob Scheifler, MIT X Consortium #endif #include -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mifillrct.c b/nx-X11/programs/Xserver/mi/mifillrct.c index 9f68db720..8a8f2b4f3 100644 --- a/nx-X11/programs/Xserver/mi/mifillrct.c +++ b/nx-X11/programs/Xserver/mi/mifillrct.c @@ -51,8 +51,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mifpolycon.c b/nx-X11/programs/Xserver/mi/mifpolycon.c index 40b83586f..95b81bbb6 100644 --- a/nx-X11/programs/Xserver/mi/mifpolycon.c +++ b/nx-X11/programs/Xserver/mi/mifpolycon.c @@ -51,7 +51,7 @@ SOFTWARE. #endif #include -#include +#include #include "gcstruct.h" #include "windowstr.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index b70a6a67e..f4ff4c243 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -191,35 +191,35 @@ typedef void (*InitExtension)(INITARGS); #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef XTEST #define _XTEST_SERVER_ -#include +#include #endif #ifdef XKB -#include +#include #endif #ifdef LBX #define _XLBX_SERVER_ -#include +#include #endif #ifdef XAPPGROUP #define _XAG_SERVER_ -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef PANORAMIX -#include +#include #endif #ifdef XF86BIGFONT -#include +#include #endif #ifdef RES -#include +#include #endif /* FIXME: this whole block of externs should be from the appropriate headers */ diff --git a/nx-X11/programs/Xserver/mi/mioverlay.c b/nx-X11/programs/Xserver/mi/mioverlay.c index 732e47af0..f67704e11 100644 --- a/nx-X11/programs/Xserver/mi/mioverlay.c +++ b/nx-X11/programs/Xserver/mi/mioverlay.c @@ -4,7 +4,7 @@ #include #endif -#include +#include #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipoly.c b/nx-X11/programs/Xserver/mi/mipoly.c index 403d3da56..11214a732 100644 --- a/nx-X11/programs/Xserver/mi/mipoly.c +++ b/nx-X11/programs/Xserver/mi/mipoly.c @@ -60,7 +60,7 @@ SOFTWARE. #include #endif -#include +#include #include "windowstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipolygen.c b/nx-X11/programs/Xserver/mi/mipolygen.c index c3d9ef397..98fe21d50 100644 --- a/nx-X11/programs/Xserver/mi/mipolygen.c +++ b/nx-X11/programs/Xserver/mi/mipolygen.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "gcstruct.h" #include "miscanfill.h" #include "mipoly.h" diff --git a/nx-X11/programs/Xserver/mi/mipolypnt.c b/nx-X11/programs/Xserver/mi/mipolypnt.c index 5d615c28d..dcbdf85d0 100644 --- a/nx-X11/programs/Xserver/mi/mipolypnt.c +++ b/nx-X11/programs/Xserver/mi/mipolypnt.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "pixmapstr.h" #include "gcstruct.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipolyrect.c b/nx-X11/programs/Xserver/mi/mipolyrect.c index 98e467f9f..9b21bb032 100644 --- a/nx-X11/programs/Xserver/mi/mipolyrect.c +++ b/nx-X11/programs/Xserver/mi/mipolyrect.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mipolyseg.c b/nx-X11/programs/Xserver/mi/mipolyseg.c index dcf3d815a..bd3c93ed6 100644 --- a/nx-X11/programs/Xserver/mi/mipolyseg.c +++ b/nx-X11/programs/Xserver/mi/mipolyseg.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mipushpxl.c b/nx-X11/programs/Xserver/mi/mipushpxl.c index 5fce1cae7..44834db50 100644 --- a/nx-X11/programs/Xserver/mi/mipushpxl.c +++ b/nx-X11/programs/Xserver/mi/mipushpxl.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/miregion.c b/nx-X11/programs/Xserver/mi/miregion.c index 5ec4ec55a..1df0dcc46 100644 --- a/nx-X11/programs/Xserver/mi/miregion.c +++ b/nx-X11/programs/Xserver/mi/miregion.c @@ -82,7 +82,7 @@ Equipment Corporation. #endif #include "regionstr.h" -#include +#include #include "gc.h" #include "mi.h" #include "mispans.h" diff --git a/nx-X11/programs/Xserver/mi/miscrinit.c b/nx-X11/programs/Xserver/mi/miscrinit.c index 78e2af5a4..4950eaa93 100644 --- a/nx-X11/programs/Xserver/mi/miscrinit.c +++ b/nx-X11/programs/Xserver/mi/miscrinit.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "servermd.h" #include "misc.h" #include "mi.h" @@ -42,7 +42,7 @@ from The Open Group. #include "miline.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif /* We use this structure to propogate some information from miScreenInit to diff --git a/nx-X11/programs/Xserver/mi/miwideline.c b/nx-X11/programs/Xserver/mi/miwideline.c index 44cf18f2e..fa9ef4591 100644 --- a/nx-X11/programs/Xserver/mi/miwideline.c +++ b/nx-X11/programs/Xserver/mi/miwideline.c @@ -47,7 +47,7 @@ from The Open Group. #include #undef _XOPEN_SOURCE #endif -#include +#include #include "windowstr.h" #include "gcstruct.h" #include "regionstr.h" diff --git a/nx-X11/programs/Xserver/mi/miwindow.c b/nx-X11/programs/Xserver/mi/miwindow.c index 179c6e31e..44b7ada60 100644 --- a/nx-X11/programs/Xserver/mi/miwindow.c +++ b/nx-X11/programs/Xserver/mi/miwindow.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "regionstr.h" #include "region.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/mi/mizerarc.c b/nx-X11/programs/Xserver/mi/mizerarc.c index 62402f41b..4b4d724a6 100644 --- a/nx-X11/programs/Xserver/mi/mizerarc.c +++ b/nx-X11/programs/Xserver/mi/mizerarc.c @@ -40,8 +40,8 @@ Author: Bob Scheifler, MIT X Consortium #endif #include -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mizerclip.c b/nx-X11/programs/Xserver/mi/mizerclip.c index e648b21d4..6acfc7fe0 100644 --- a/nx-X11/programs/Xserver/mi/mizerclip.c +++ b/nx-X11/programs/Xserver/mi/mizerclip.c @@ -49,7 +49,7 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/mi/mizerline.c b/nx-X11/programs/Xserver/mi/mizerline.c index 8e62a8c94..5a61ff5d6 100644 --- a/nx-X11/programs/Xserver/mi/mizerline.c +++ b/nx-X11/programs/Xserver/mi/mizerline.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c index d97d44ab6..0a18c28c8 100644 --- a/nx-X11/programs/Xserver/os/WaitFor.c +++ b/nx-X11/programs/Xserver/os/WaitFor.c @@ -78,19 +78,19 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif -#include /* for strings, fcntl, time */ +#include /* for strings, fcntl, time */ #include #include -#include +#include #include "misc.h" #ifdef __UNIXOS2__ #define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) #endif #include "osdep.h" -#include +#include #include "dixstruct.h" #include "opaque.h" #ifdef DPMSExtension @@ -138,7 +138,7 @@ mffs(fd_mask mask) #ifdef DPMSExtension #define DPMS_SERVER -#include +#include #endif #ifdef XTESTEXT1 diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index 07b460f40..05dfaf38a 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -62,15 +62,15 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "site.h" #include @@ -197,14 +197,14 @@ SOFTWARE. #endif #define X_INCLUDE_NETDB_H -#include +#include #include "dixstruct.h" #include "osdep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifndef PATH_MAX diff --git a/nx-X11/programs/Xserver/os/auth.c b/nx-X11/programs/Xserver/os/auth.c index dfb6f8899..c14c1e874 100644 --- a/nx-X11/programs/Xserver/os/auth.c +++ b/nx-X11/programs/Xserver/os/auth.c @@ -57,8 +57,8 @@ from The Open Group. #ifdef K5AUTH # include #endif -# include -# include +# include +# include # include "misc.h" # include "osdep.h" # include "dixstruct.h" @@ -66,10 +66,10 @@ from The Open Group. # include #ifdef XCSECURITY #define _SECURITY_SERVER -# include +# include #endif #ifdef WIN32 -#include +#include #endif struct protocol { diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 0f846d084..ef71cd540 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -68,14 +68,14 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif -#include -#include +#include +#include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN -#include +#include #include #include #include @@ -144,15 +144,15 @@ extern __const__ int _nfiles; #endif /* WIN32 */ #include "misc.h" #include "osdep.h" -#include +#include #include "opaque.h" #include "dixstruct.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index b92e7c4ae..ccfc01dfe 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -63,11 +63,11 @@ SOFTWARE. #define DEBUG_COMMUNICATION #endif #ifdef WIN32 -#include +#include #endif #include -#include -#include +#include +#include #include #if !defined(__UNIXOS2__) && !defined(WIN32) #ifndef Lynx @@ -76,12 +76,12 @@ SOFTWARE. #include #endif #endif -#include +#include #define NEED_REPLIES -#include +#include #include "os.h" #include "osdep.h" -#include +#include #include "opaque.h" #include "dixstruct.h" #include "misc.h" @@ -125,7 +125,7 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL; lswaps((req)->length) : (req)->length) #ifdef BIGREQS -#include +#include #define get_big_req_len(req,cli) ((cli)->swapped ? \ lswapl(((xBigReq *)(req))->length) : \ diff --git a/nx-X11/programs/Xserver/os/k5auth.c b/nx-X11/programs/Xserver/os/k5auth.c index 3c50de032..f2ed5369d 100644 --- a/nx-X11/programs/Xserver/os/k5auth.c +++ b/nx-X11/programs/Xserver/os/k5auth.c @@ -54,11 +54,11 @@ from The Open Group. #undef BITS32 #undef xfree #include -#include +#include #include "os.h" #include "osdep.h" -#include -#include +#include +#include #include "dixstruct.h" #include #include "Xauth.h" diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c index 9af39800f..2444cd333 100644 --- a/nx-X11/programs/Xserver/os/log.c +++ b/nx-X11/programs/Xserver/os/log.c @@ -99,7 +99,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include +#include #include #include #include diff --git a/nx-X11/programs/Xserver/os/mitauth.c b/nx-X11/programs/Xserver/os/mitauth.c index 2f42fd41f..abf7976af 100644 --- a/nx-X11/programs/Xserver/os/mitauth.c +++ b/nx-X11/programs/Xserver/os/mitauth.c @@ -37,7 +37,7 @@ from The Open Group. #include #endif -#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h index e8c2d5959..e0c5de3a8 100644 --- a/nx-X11/programs/Xserver/os/osdep.h +++ b/nx-X11/programs/Xserver/os/osdep.h @@ -103,7 +103,7 @@ SOFTWARE. #endif #endif -#include +#include /* * MAXSOCKS is used only for initialising MaxClients when no other method diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c index ea99ace21..ca707d4b2 100644 --- a/nx-X11/programs/Xserver/os/osinit.c +++ b/nx-X11/programs/Xserver/os/osinit.c @@ -52,10 +52,10 @@ SOFTWARE. #endif #include -#include +#include #include "os.h" #include "osdep.h" -#include +#include #ifdef SMART_SCHEDULE #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/os/rpcauth.c b/nx-X11/programs/Xserver/os/rpcauth.c index 896291e59..94c26651b 100644 --- a/nx-X11/programs/Xserver/os/rpcauth.c +++ b/nx-X11/programs/Xserver/os/rpcauth.c @@ -40,7 +40,7 @@ from The Open Group. #ifdef SECURE_RPC -#include +#include #include "Xauth.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/os/secauth.c b/nx-X11/programs/Xserver/os/secauth.c index 1000b4e79..eadb17b40 100644 --- a/nx-X11/programs/Xserver/os/secauth.c +++ b/nx-X11/programs/Xserver/os/secauth.c @@ -30,7 +30,7 @@ from The Open Group. #include #endif -#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" @@ -38,7 +38,7 @@ from The Open Group. #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif static char InvalidPolicyReason[] = "invalid policy specification"; diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index b09190c4e..3ab08897a 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -79,13 +79,13 @@ OR PERFORMANCE OF THIS SOFTWARE. #endif #if defined(WIN32) && !defined(__CYGWIN__) -#include +#include #endif -#include +#include #include #include "misc.h" -#include -#include +#include +#include #include "input.h" #include "dixfont.h" #include "osdep.h" @@ -136,11 +136,11 @@ OR PERFORMANCE OF THIS SOFTWARE. #endif #ifdef XKB -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef RENDER @@ -258,7 +258,7 @@ Bool noXvExtension = FALSE; #endif #define X_INCLUDE_NETDB_H -#include +#include #include diff --git a/nx-X11/programs/Xserver/os/xalloc.c b/nx-X11/programs/Xserver/os/xalloc.c index a2487d4bc..4d2d3f1ee 100644 --- a/nx-X11/programs/Xserver/os/xalloc.c +++ b/nx-X11/programs/Xserver/os/xalloc.c @@ -39,9 +39,9 @@ Pascal Haible. #include /* for malloc() etc. */ -#include +#include #include "misc.h" -#include +#include #ifdef XALLOC_LOG #include diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c index e02ca349c..92fbde478 100644 --- a/nx-X11/programs/Xserver/os/xdmauth.c +++ b/nx-X11/programs/Xserver/os/xdmauth.c @@ -40,8 +40,8 @@ from The Open Group. #endif #include -#include -#include +#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" @@ -51,7 +51,7 @@ from The Open Group. static Bool authFromXDMCP; #ifdef XDMCP -#include +#include #undef REQUEST #include diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c index 675e9c456..4181e52ce 100644 --- a/nx-X11/programs/Xserver/os/xdmcp.c +++ b/nx-X11/programs/Xserver/os/xdmcp.c @@ -21,10 +21,10 @@ #endif #ifdef WIN32 -#include +#include #endif -#include +#include #if !defined(WIN32) #ifndef Lynx @@ -39,10 +39,10 @@ #include #include -#include -#include +#include +#include #include "misc.h" -#include +#include #include "osdep.h" #include "input.h" #include "dixstruct.h" @@ -76,7 +76,7 @@ #include #define X_INCLUDE_NETDB_H -#include +#include #ifdef NX_TRANS_SOCKET diff --git a/nx-X11/programs/Xserver/os/xprintf.c b/nx-X11/programs/Xserver/os/xprintf.c index 54bbeefe2..4423208ff 100644 --- a/nx-X11/programs/Xserver/os/xprintf.c +++ b/nx-X11/programs/Xserver/os/xprintf.c @@ -30,7 +30,7 @@ #include #endif -#include +#include #include "os.h" #include #include diff --git a/nx-X11/programs/Xserver/randr/randrproto.h b/nx-X11/programs/Xserver/randr/randrproto.h index 7d5c139e9..bded957fa 100644 --- a/nx-X11/programs/Xserver/randr/randrproto.h +++ b/nx-X11/programs/Xserver/randr/randrproto.h @@ -30,7 +30,7 @@ #ifndef _XRANDRP_H_ #define _XRANDRP_H_ -/*#include */ +/*#include */ #include "randr.h" #define Window CARD32 diff --git a/nx-X11/programs/Xserver/randr/randrstr.h b/nx-X11/programs/Xserver/randr/randrstr.h index 3c3db2c13..bab784b8f 100644 --- a/nx-X11/programs/Xserver/randr/randrstr.h +++ b/nx-X11/programs/Xserver/randr/randrstr.h @@ -32,8 +32,8 @@ #ifndef _RANDRSTR_H_ #define _RANDRSTR_H_ -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -44,17 +44,17 @@ #include "extnsionst.h" #include "servermd.h" #ifndef NXAGENT_SERVER -#include -#include +#include +#include #else #include "randr.h" #include "randrproto.h" #endif #ifdef RENDER -#include /* we share subpixel order information */ +#include /* we share subpixel order information */ #include "picturestr.h" #endif -#include +#include /* required for ABI compatibility for now */ #define RANDR_10_INTERFACE 1 diff --git a/nx-X11/programs/Xserver/randr/rrxinerama.c b/nx-X11/programs/Xserver/randr/rrxinerama.c index 5441f8abc..2bc17cf21 100644 --- a/nx-X11/programs/Xserver/randr/rrxinerama.c +++ b/nx-X11/programs/Xserver/randr/rrxinerama.c @@ -88,7 +88,7 @@ #include "randrstr.h" #include "swaprep.h" #ifndef NXAGENT_SERVER -#include +#include #else #include "panoramiXproto.h" #endif diff --git a/nx-X11/programs/Xserver/record/record.c b/nx-X11/programs/Xserver/record/record.c index aa1cd7543..2c5b867b4 100644 --- a/nx-X11/programs/Xserver/record/record.c +++ b/nx-X11/programs/Xserver/record/record.c @@ -43,7 +43,7 @@ and Jim Haggerty of Metheus. #include "dixstruct.h" #include "extnsionst.h" #define _XRECORD_SERVER_ -#include +#include #include "set.h" #ifndef XFree86LOADER diff --git a/nx-X11/programs/Xserver/render/animcur.c b/nx-X11/programs/Xserver/render/animcur.c index 15293af64..27e5ab949 100644 --- a/nx-X11/programs/Xserver/render/animcur.c +++ b/nx-X11/programs/Xserver/render/animcur.c @@ -36,8 +36,8 @@ #include #endif -#include -#include +#include +#include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/render/glyphstr.h b/nx-X11/programs/Xserver/render/glyphstr.h index e9bbd19b0..f27a73fbb 100644 --- a/nx-X11/programs/Xserver/render/glyphstr.h +++ b/nx-X11/programs/Xserver/render/glyphstr.h @@ -26,7 +26,7 @@ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ -#include +#include #include "picture.h" #include "screenint.h" diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 8d644b35e..2dedbc9c4 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -30,8 +30,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -42,11 +42,11 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" -#include -#include +#include +#include #include "picturestr.h" #include "glyphstr.h" -#include +#include #include "cursorstr.h" #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/xfixes/xfixesint.h b/nx-X11/programs/Xserver/xfixes/xfixesint.h index 4892654be..a883acaec 100755 --- a/nx-X11/programs/Xserver/xfixes/xfixesint.h +++ b/nx-X11/programs/Xserver/xfixes/xfixesint.h @@ -30,13 +30,13 @@ #define _XFIXESINT_H_ #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include +#include #include "windowstr.h" #include "selection.h" #include "xfixes.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxBeep.c b/nx-X11/programs/Xserver/xkb/ddxBeep.c index 22d62a502..e99e4c2dd 100644 --- a/nx-X11/programs/Xserver/xkb/ddxBeep.c +++ b/nx-X11/programs/Xserver/xkb/ddxBeep.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #if (defined(__osf__) && defined(__alpha)) #include diff --git a/nx-X11/programs/Xserver/xkb/ddxConfig.c b/nx-X11/programs/Xserver/xkb/ddxConfig.c index b023531dc..8ffd344ca 100644 --- a/nx-X11/programs/Xserver/xkb/ddxConfig.c +++ b/nx-X11/programs/Xserver/xkb/ddxConfig.c @@ -32,16 +32,16 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "os.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include Bool XkbDDXApplyConfig(XPointer cfg_in,XkbSrvInfoPtr info) diff --git a/nx-X11/programs/Xserver/xkb/ddxCtrls.c b/nx-X11/programs/Xserver/xkb/ddxCtrls.c index 2e4e106ce..9fee8aa30 100644 --- a/nx-X11/programs/Xserver/xkb/ddxCtrls.c +++ b/nx-X11/programs/Xserver/xkb/ddxCtrls.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXKeybdCtrlProc(DeviceIntPtr dev,KeybdCtrl *ctrl) diff --git a/nx-X11/programs/Xserver/xkb/ddxDevBtn.c b/nx-X11/programs/Xserver/xkb/ddxDevBtn.c index d0e37f263..04094e787 100644 --- a/nx-X11/programs/Xserver/xkb/ddxDevBtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxDevBtn.c @@ -32,15 +32,15 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include -#include +#include +#include +#include extern int DeviceValuator; diff --git a/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c b/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c index 73c8a2415..b77d040ff 100644 --- a/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXFakePointerButton(int event,int button) diff --git a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c index ffd6f5d79..33fa49ae7 100644 --- a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c @@ -33,14 +33,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef PANORAMIX #include "panoramiX.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxInit.c b/nx-X11/programs/Xserver/xkb/ddxInit.c index 8b76b7cb1..00ffea14e 100644 --- a/nx-X11/programs/Xserver/xkb/ddxInit.c +++ b/nx-X11/programs/Xserver/xkb/ddxInit.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include int XkbDDXInitDevice(DeviceIntPtr dev) diff --git a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c b/nx-X11/programs/Xserver/xkb/ddxKeyClick.c index c940e5321..e56377ca5 100644 --- a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c +++ b/nx-X11/programs/Xserver/xkb/ddxKeyClick.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) diff --git a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c index b78dc420d..44fad85ca 100644 --- a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c +++ b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c @@ -36,14 +36,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxLEDs.c b/nx-X11/programs/Xserver/xkb/ddxLEDs.c index fb5f72bf8..92ab12ee8 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLEDs.c +++ b/nx-X11/programs/Xserver/xkb/ddxLEDs.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXUpdateIndicators(DeviceIntPtr dev,CARD32 new) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index 9c961e934..3dfb85644 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -33,17 +33,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #ifndef PATH_MAX #ifdef MAXPATHLEN diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index 7caf9b1cb..16343fc9c 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -44,17 +44,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #include "xkb.h" #if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__) @@ -94,7 +94,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef WIN32 -#include +#include const char* Win32TempDir() { diff --git a/nx-X11/programs/Xserver/xkb/ddxPrivate.c b/nx-X11/programs/Xserver/xkb/ddxPrivate.c index 5c0bca4cd..c71216d70 100644 --- a/nx-X11/programs/Xserver/xkb/ddxPrivate.c +++ b/nx-X11/programs/Xserver/xkb/ddxPrivate.c @@ -10,10 +10,10 @@ #include #define NEED_EVENTS 1 -#include +#include #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxVT.c b/nx-X11/programs/Xserver/xkb/ddxVT.c index 1b7853fa0..1806ed257 100644 --- a/nx-X11/programs/Xserver/xkb/ddxVT.c +++ b/nx-X11/programs/Xserver/xkb/ddxVT.c @@ -36,14 +36,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 441d88a5c..4a1561db3 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -31,18 +31,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #include "extnsionst.h" #include "xkb.h" -#include +#include int XkbEventBase; int XkbErrorBase; @@ -3916,7 +3916,7 @@ ProcXkbSetNames(ClientPtr client) /***====================================================================***/ -#include +#include #define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4) diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index 75e46dc32..ac5713d05 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -36,11 +36,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" -#include +#include #if !defined(WIN32) && !defined(Lynx) #include #endif diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index b7f3e13a5..eb1c80448 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -34,12 +34,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #include "xkb.h" #include diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index ca201c6f0..6c0aa0761 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -32,13 +32,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "inputstr.h" #include "windowstr.h" -#include +#include #include "xkb.h" /***====================================================================***/ diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index ef7e6a4f7..9afe0dacc 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -41,19 +41,19 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "inputstr.h" #include "opaque.h" #include "property.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include -#include -#include +#include +#include +#include +#include #include "xkb.h" #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) diff --git a/nx-X11/programs/Xserver/xkb/xkbLEDs.c b/nx-X11/programs/Xserver/xkb/xkbLEDs.c index e04c05f14..20203ef2c 100644 --- a/nx-X11/programs/Xserver/xkb/xkbLEDs.c +++ b/nx-X11/programs/Xserver/xkb/xkbLEDs.c @@ -34,13 +34,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #include "xkb.h" /***====================================================================***/ diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c index 713995d16..330fd2800 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c @@ -33,12 +33,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #include diff --git a/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c b/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c index 82f476790..ac601c525 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c @@ -33,15 +33,15 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include -#include -#include +#include +#include extern void ProcessOtherEvent( xEvent * /* xE */, diff --git a/nx-X11/programs/Xserver/xkb/xkbSwap.c b/nx-X11/programs/Xserver/xkb/xkbSwap.c index be1cd94fc..c16209153 100644 --- a/nx-X11/programs/Xserver/xkb/xkbSwap.c +++ b/nx-X11/programs/Xserver/xkb/xkbSwap.c @@ -31,14 +31,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "stdio.h" -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #include "extnsionst.h" #include "xkb.h" diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index f3c3ff8ca..465644f16 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -34,16 +34,16 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include +#include +#include #define XK_CYRILLIC -#include +#include #include "misc.h" #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #include "xkb.h" #ifdef MODE_SWITCH diff --git a/nx-X11/programs/nxauth/gethost.c b/nx-X11/programs/nxauth/gethost.c index cab2aea9f..fa889f29b 100644 --- a/nx-X11/programs/nxauth/gethost.c +++ b/nx-X11/programs/nxauth/gethost.c @@ -36,10 +36,10 @@ in this Software without prior written authorization from The Open Group. #endif #ifdef WIN32 -#include +#include #define EPROTOTYPE WSAEPROTOTYPE #endif -#include +#include #include #include #include diff --git a/nx-X11/programs/nxauth/parsedpy.c b/nx-X11/programs/nxauth/parsedpy.c index 8ce46815c..d0f022574 100644 --- a/nx-X11/programs/nxauth/parsedpy.c +++ b/nx-X11/programs/nxauth/parsedpy.c @@ -49,12 +49,12 @@ in this Software without prior written authorization from The Open Group. #include /* for NULL */ #include /* for isascii() and isdigit() */ -#include /* for strchr() and string routines */ -#include /* for Family contants */ +#include /* for strchr() and string routines */ +#include /* for Family contants */ #ifdef hpux #include /* for struct utsname */ #endif -#include /* for FamilyLocal */ +#include /* for FamilyLocal */ #if defined(UNIXCONN) || defined(LOCALCONN) #define UNIX_CONNECTION "unix" diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c index 76259d76a..86aba2b2a 100644 --- a/nx-X11/programs/nxauth/process.c +++ b/nx-X11/programs/nxauth/process.c @@ -55,10 +55,10 @@ from The Open Group. #include #include -/*#include */ /* for Family constants */ +/*#include */ /* for Family constants */ /* -#include -#include +#include +#include */ /*FIXME*/ diff --git a/nx-X11/programs/nxauth/xauth.h b/nx-X11/programs/nxauth/xauth.h index 33a6c4e3b..4f8490070 100644 --- a/nx-X11/programs/nxauth/xauth.h +++ b/nx-X11/programs/nxauth/xauth.h @@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group. /* $XFree86: xc/programs/xauth/xauth.h,v 1.6 2001/12/14 20:01:15 dawes Exp $ */ #include -#include -#include -#include +#include +#include +#include #ifndef True typedef int Bool; diff --git a/nx-libs.spec b/nx-libs.spec index 6eed3691a..a9afb7ec8 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -616,11 +616,11 @@ ln -sf ../../nx/bin/nxagent %{buildroot}%{_libdir}/x2go/bin/x2goagent chmod 755 %{buildroot}%{_libdir}/lib*.so* #Remove extras, GL, and other unneeded headers -rm -r %{buildroot}%{_includedir}/nx/GL -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XInput.h -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XK*.h -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/*Xv*.h -rm -r %{buildroot}%{_includedir}/nx/X11/Xtrans +rm -r %{buildroot}%{_includedir}/GL +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XInput.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h +rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans # Needed for Xinerama support ln -s -f ../../../../%{_lib}/libX11.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6 @@ -673,23 +673,23 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_X11.so %dir %{_includedir}/nx -%dir %{_includedir}/nx/X11 -%{_includedir}/nx/X11/ImUtil.h -%{_includedir}/nx/X11/XKBlib.h -%{_includedir}/nx/X11/Xcms.h -%{_includedir}/nx/X11/Xlib.h -%{_includedir}/nx/X11/XlibConf.h -%{_includedir}/nx/X11/Xlibint.h -%{_includedir}/nx/X11/Xlocale.h -%{_includedir}/nx/X11/Xregion.h -%{_includedir}/nx/X11/Xresource.h -%{_includedir}/nx/X11/Xutil.h -%{_includedir}/nx/X11/cursorfont.h +%dir %{_includedir}/nx-X11 +%{_includedir}/nx-X11/ImUtil.h +%{_includedir}/nx-X11/XKBlib.h +%{_includedir}/nx-X11/Xcms.h +%{_includedir}/nx-X11/Xlib.h +%{_includedir}/nx-X11/XlibConf.h +%{_includedir}/nx-X11/Xlibint.h +%{_includedir}/nx-X11/Xlocale.h +%{_includedir}/nx-X11/Xregion.h +%{_includedir}/nx-X11/Xresource.h +%{_includedir}/nx-X11/Xutil.h +%{_includedir}/nx-X11/cursorfont.h %files -n libNX_Xau-devel %defattr(-,root,root) %{_libdir}/libNX_Xau.so -%{_includedir}/nx/X11/Xauth.h +%{_includedir}/nx-X11/Xauth.h %files -n libNX_Xau6 %defattr(-,root,root) @@ -702,33 +702,33 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files -n libNX_Xext-devel %defattr(-,root,root) %{_libdir}/libNX_Xext.so -%dir %{_includedir}/nx/X11/extensions -%{_includedir}/nx/X11/extensions/MITMisc.h -%{_includedir}/nx/X11/extensions/XEVI.h -%{_includedir}/nx/X11/extensions/XEVIstr.h -%{_includedir}/nx/X11/extensions/XLbx.h -%{_includedir}/nx/X11/extensions/XShm.h -%{_includedir}/nx/X11/extensions/Xag.h -%{_includedir}/nx/X11/extensions/Xagsrv.h -%{_includedir}/nx/X11/extensions/Xagstr.h -%{_includedir}/nx/X11/extensions/Xcup.h -%{_includedir}/nx/X11/extensions/Xcupstr.h -%{_includedir}/nx/X11/extensions/Xdbe.h -%{_includedir}/nx/X11/extensions/Xdbeproto.h -%{_includedir}/nx/X11/extensions/Xext.h -%{_includedir}/nx/X11/extensions/dpms.h -%{_includedir}/nx/X11/extensions/dpmsstr.h -%{_includedir}/nx/X11/extensions/extutil.h -%{_includedir}/nx/X11/extensions/lbxstr.h -%{_includedir}/nx/X11/extensions/mitmiscstr.h -%{_includedir}/nx/X11/extensions/multibuf.h -%{_includedir}/nx/X11/extensions/multibufst.h -%{_includedir}/nx/X11/extensions/security.h -%{_includedir}/nx/X11/extensions/securstr.h -%{_includedir}/nx/X11/extensions/shape.h -%{_includedir}/nx/X11/extensions/sync.h -%{_includedir}/nx/X11/extensions/xtestext1.h -%{_includedir}/nx/X11/extensions/xteststr.h +%dir %{_includedir}/nx-X11/extensions +%{_includedir}/nx-X11/extensions/MITMisc.h +%{_includedir}/nx-X11/extensions/XEVI.h +%{_includedir}/nx-X11/extensions/XEVIstr.h +%{_includedir}/nx-X11/extensions/XLbx.h +%{_includedir}/nx-X11/extensions/XShm.h +%{_includedir}/nx-X11/extensions/Xag.h +%{_includedir}/nx-X11/extensions/Xagsrv.h +%{_includedir}/nx-X11/extensions/Xagstr.h +%{_includedir}/nx-X11/extensions/Xcup.h +%{_includedir}/nx-X11/extensions/Xcupstr.h +%{_includedir}/nx-X11/extensions/Xdbe.h +%{_includedir}/nx-X11/extensions/Xdbeproto.h +%{_includedir}/nx-X11/extensions/Xext.h +%{_includedir}/nx-X11/extensions/dpms.h +%{_includedir}/nx-X11/extensions/dpmsstr.h +%{_includedir}/nx-X11/extensions/extutil.h +%{_includedir}/nx-X11/extensions/lbxstr.h +%{_includedir}/nx-X11/extensions/mitmiscstr.h +%{_includedir}/nx-X11/extensions/multibuf.h +%{_includedir}/nx-X11/extensions/multibufst.h +%{_includedir}/nx-X11/extensions/security.h +%{_includedir}/nx-X11/extensions/securstr.h +%{_includedir}/nx-X11/extensions/shape.h +%{_includedir}/nx-X11/extensions/sync.h +%{_includedir}/nx-X11/extensions/xtestext1.h +%{_includedir}/nx-X11/extensions/xteststr.h %files -n libNX_Xext6 %defattr(-,root,root) @@ -737,7 +737,7 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files -n libNX_Xfixes-devel %defattr(-,root,root) %{_libdir}/libNX_Xfixes.so -%{_includedir}/nx/X11/extensions/Xfixes.h +%{_includedir}/nx-X11/extensions/Xfixes.h %files -n libNX_Xfixes3 %defattr(-,root,root) @@ -818,83 +818,83 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_libdir}/libNX_Xcomposite.so %{_libdir}/libNX_Xinerama.so %{_libdir}/libNX_Xtst.so -%{_includedir}/nx/X11/X10.h -%dir %{_includedir}/nx/X11/extensions -%{_includedir}/nx/X11/extensions/XTest.h -%{_includedir}/nx/X11/extensions/Xcomposite.h -%{_includedir}/nx/X11/extensions/Xevie.h -%{_includedir}/nx/X11/extensions/Xinerama.h -%{_includedir}/nx/X11/extensions/lbxbuf.h -%{_includedir}/nx/X11/extensions/lbxbufstr.h -%{_includedir}/nx/X11/extensions/lbxdeltastr.h -%{_includedir}/nx/X11/extensions/lbximage.h -%{_includedir}/nx/X11/extensions/lbxopts.h -%{_includedir}/nx/X11/extensions/lbxzlib.h -%{_includedir}/nx/X11/extensions/panoramiXext.h -%{_includedir}/nx/X11/extensions/record.h -%{_includedir}/nx/X11/extensions/xf86dga1.h -%{_includedir}/nx/X11/extensions/xf86vmode.h -%{_includedir}/nx/X11/misc.h -%{_includedir}/nx/X11/os.h +%{_includedir}/nx-X11/X10.h +%dir %{_includedir}/nx-X11/extensions +%{_includedir}/nx-X11/extensions/XTest.h +%{_includedir}/nx-X11/extensions/Xcomposite.h +%{_includedir}/nx-X11/extensions/Xevie.h +%{_includedir}/nx-X11/extensions/Xinerama.h +%{_includedir}/nx-X11/extensions/lbxbuf.h +%{_includedir}/nx-X11/extensions/lbxbufstr.h +%{_includedir}/nx-X11/extensions/lbxdeltastr.h +%{_includedir}/nx-X11/extensions/lbximage.h +%{_includedir}/nx-X11/extensions/lbxopts.h +%{_includedir}/nx-X11/extensions/lbxzlib.h +%{_includedir}/nx-X11/extensions/panoramiXext.h +%{_includedir}/nx-X11/extensions/record.h +%{_includedir}/nx-X11/extensions/xf86dga1.h +%{_includedir}/nx-X11/extensions/xf86vmode.h +%{_includedir}/nx-X11/misc.h +%{_includedir}/nx-X11/os.h %files -n nx-proto-devel %defattr(-,root,root) -%dir %{_includedir}/nx/X11 -%{_includedir}/nx/X11/DECkeysym.h -%{_includedir}/nx/X11/HPkeysym.h -%{_includedir}/nx/X11/Sunkeysym.h -%{_includedir}/nx/X11/X.h -%{_includedir}/nx/X11/XF86keysym.h -%{_includedir}/nx/X11/XWDFile.h -%{_includedir}/nx/X11/Xalloca.h -%{_includedir}/nx/X11/Xarch.h -%{_includedir}/nx/X11/Xatom.h -%{_includedir}/nx/X11/Xdefs.h -%{_includedir}/nx/X11/Xfuncproto.h -%{_includedir}/nx/X11/Xfuncs.h -%{_includedir}/nx/X11/Xmd.h -%{_includedir}/nx/X11/Xos.h -%{_includedir}/nx/X11/Xos_r.h -%{_includedir}/nx/X11/Xosdefs.h -%{_includedir}/nx/X11/Xpoll.h -%{_includedir}/nx/X11/Xproto.h -%{_includedir}/nx/X11/Xprotostr.h -%{_includedir}/nx/X11/Xthreads.h -%{_includedir}/nx/X11/ap_keysym.h -%{_includedir}/nx/X11/keysym.h -%{_includedir}/nx/X11/keysymdef.h -%{_includedir}/nx/X11/extensions/XI.h -%{_includedir}/nx/X11/extensions/XIproto.h -%{_includedir}/nx/X11/extensions/XResproto.h -%{_includedir}/nx/X11/extensions/Xeviestr.h -%{_includedir}/nx/X11/extensions/bigreqstr.h -%{_includedir}/nx/X11/extensions/composite.h -%{_includedir}/nx/X11/extensions/compositeproto.h -%{_includedir}/nx/X11/extensions/panoramiXproto.h -%{_includedir}/nx/X11/extensions/recordstr.h -%{_includedir}/nx/X11/extensions/render.h -%{_includedir}/nx/X11/extensions/renderproto.h -%{_includedir}/nx/X11/extensions/shapestr.h -%{_includedir}/nx/X11/extensions/shmstr.h -%{_includedir}/nx/X11/extensions/syncstr.h -%{_includedir}/nx/X11/extensions/xcmiscstr.h -%{_includedir}/nx/X11/extensions/xf86bigfont.h -%{_includedir}/nx/X11/extensions/xf86bigfstr.h -%{_includedir}/nx/X11/extensions/xf86dga.h -%{_includedir}/nx/X11/extensions/xf86dga1str.h -%{_includedir}/nx/X11/extensions/xf86dgastr.h -%{_includedir}/nx/X11/extensions/xf86misc.h -%{_includedir}/nx/X11/extensions/xf86mscstr.h -%{_includedir}/nx/X11/extensions/xf86vmstr.h -%{_includedir}/nx/X11/extensions/xfixesproto.h -%{_includedir}/nx/X11/extensions/xfixeswire.h -%{_includedir}/nx/X11/extensions/xtrapbits.h -%{_includedir}/nx/X11/extensions/xtrapddmi.h -%{_includedir}/nx/X11/extensions/xtrapdi.h -%{_includedir}/nx/X11/extensions/xtrapemacros.h -%{_includedir}/nx/X11/extensions/xtraplib.h -%{_includedir}/nx/X11/extensions/xtraplibp.h -%{_includedir}/nx/X11/extensions/xtrapproto.h +%dir %{_includedir}/nx-X11 +%{_includedir}/nx-X11/DECkeysym.h +%{_includedir}/nx-X11/HPkeysym.h +%{_includedir}/nx-X11/Sunkeysym.h +%{_includedir}/nx-X11/X.h +%{_includedir}/nx-X11/XF86keysym.h +%{_includedir}/nx-X11/XWDFile.h +%{_includedir}/nx-X11/Xalloca.h +%{_includedir}/nx-X11/Xarch.h +%{_includedir}/nx-X11/Xatom.h +%{_includedir}/nx-X11/Xdefs.h +%{_includedir}/nx-X11/Xfuncproto.h +%{_includedir}/nx-X11/Xfuncs.h +%{_includedir}/nx-X11/Xmd.h +%{_includedir}/nx-X11/Xos.h +%{_includedir}/nx-X11/Xos_r.h +%{_includedir}/nx-X11/Xosdefs.h +%{_includedir}/nx-X11/Xpoll.h +%{_includedir}/nx-X11/Xproto.h +%{_includedir}/nx-X11/Xprotostr.h +%{_includedir}/nx-X11/Xthreads.h +%{_includedir}/nx-X11/ap_keysym.h +%{_includedir}/nx-X11/keysym.h +%{_includedir}/nx-X11/keysymdef.h +%{_includedir}/nx-X11/extensions/XI.h +%{_includedir}/nx-X11/extensions/XIproto.h +%{_includedir}/nx-X11/extensions/XResproto.h +%{_includedir}/nx-X11/extensions/Xeviestr.h +%{_includedir}/nx-X11/extensions/bigreqstr.h +%{_includedir}/nx-X11/extensions/composite.h +%{_includedir}/nx-X11/extensions/compositeproto.h +%{_includedir}/nx-X11/extensions/panoramiXproto.h +%{_includedir}/nx-X11/extensions/recordstr.h +%{_includedir}/nx-X11/extensions/render.h +%{_includedir}/nx-X11/extensions/renderproto.h +%{_includedir}/nx-X11/extensions/shapestr.h +%{_includedir}/nx-X11/extensions/shmstr.h +%{_includedir}/nx-X11/extensions/syncstr.h +%{_includedir}/nx-X11/extensions/xcmiscstr.h +%{_includedir}/nx-X11/extensions/xf86bigfont.h +%{_includedir}/nx-X11/extensions/xf86bigfstr.h +%{_includedir}/nx-X11/extensions/xf86dga.h +%{_includedir}/nx-X11/extensions/xf86dga1str.h +%{_includedir}/nx-X11/extensions/xf86dgastr.h +%{_includedir}/nx-X11/extensions/xf86misc.h +%{_includedir}/nx-X11/extensions/xf86mscstr.h +%{_includedir}/nx-X11/extensions/xf86vmstr.h +%{_includedir}/nx-X11/extensions/xfixesproto.h +%{_includedir}/nx-X11/extensions/xfixeswire.h +%{_includedir}/nx-X11/extensions/xtrapbits.h +%{_includedir}/nx-X11/extensions/xtrapddmi.h +%{_includedir}/nx-X11/extensions/xtrapdi.h +%{_includedir}/nx-X11/extensions/xtrapemacros.h +%{_includedir}/nx-X11/extensions/xtraplib.h +%{_includedir}/nx-X11/extensions/xtraplibp.h +%{_includedir}/nx-X11/extensions/xtrapproto.h %files -n nxagent %defattr(-,root,root) diff --git a/nxcompext/Jpeg.c b/nxcompext/Jpeg.c index cb854bc6c..d6a94cc80 100644 --- a/nxcompext/Jpeg.c +++ b/nxcompext/Jpeg.c @@ -19,9 +19,9 @@ #include #include -#include "X11/X.h" -#include "X11/Xlib.h" -#include "X11/Xmd.h" +#include +#include +#include #include diff --git a/nxcompext/NXlib.h b/nxcompext/NXlib.h index d77ff6046..15661b439 100644 --- a/nxcompext/NXlib.h +++ b/nxcompext/NXlib.h @@ -22,8 +22,8 @@ extern "C" { #endif -#include -#include +#include +#include #include "NX.h" #include "NXpack.h" diff --git a/nxcompext/Pgn.h b/nxcompext/Pgn.h index 999e8ea01..075d2bc1e 100644 --- a/nxcompext/Pgn.h +++ b/nxcompext/Pgn.h @@ -22,9 +22,9 @@ extern "C" { #endif -#include "X11/X.h" -#include "X11/Xlib.h" -#include "X11/Xmd.h" +#include +#include +#include #include diff --git a/nxcompshad/Input.h b/nxcompshad/Input.h index 6250e790b..88217c9b1 100644 --- a/nxcompshad/Input.h +++ b/nxcompshad/Input.h @@ -18,7 +18,7 @@ #ifndef Input_H #define Input_H -#include +#include typedef struct Event { diff --git a/nxcompshad/Manager.cpp b/nxcompshad/Manager.cpp index ba9260a13..3b5504a1f 100644 --- a/nxcompshad/Manager.cpp +++ b/nxcompshad/Manager.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include -#include -#include +#include +#include +#include #include #define PANIC diff --git a/nxcompshad/Manager.h b/nxcompshad/Manager.h index 267754906..56b7e0aa5 100644 --- a/nxcompshad/Manager.h +++ b/nxcompshad/Manager.h @@ -18,7 +18,7 @@ #ifndef UpdateManager_H #define UpdateManager_H -#include +#include #include "Updater.h" #include "Regions.h" diff --git a/nxcompshad/Regions.h b/nxcompshad/Regions.h index b9303dcb7..d46d11a72 100644 --- a/nxcompshad/Regions.h +++ b/nxcompshad/Regions.h @@ -18,8 +18,8 @@ #ifndef Region_H #define Region_H -#include -#include +#include +#include typedef struct { short x1, x2, y1, y2; diff --git a/nxcompshad/Shadow.h b/nxcompshad/Shadow.h index e1eddb95c..99824b0aa 100644 --- a/nxcompshad/Shadow.h +++ b/nxcompshad/Shadow.h @@ -18,7 +18,7 @@ #ifndef Shadow_H #define Shadow_H -#include +#include #define NXShadowCorrectColor(length, buffer) \ \ diff --git a/nxcompshad/Updater.cpp b/nxcompshad/Updater.cpp index 245c6ce31..eee81bf16 100644 --- a/nxcompshad/Updater.cpp +++ b/nxcompshad/Updater.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include -#include -#include +#include +#include +#include #include #define PANIC diff --git a/nxcompshad/Updater.h b/nxcompshad/Updater.h index daa26c10b..cb8b15aa6 100644 --- a/nxcompshad/Updater.h +++ b/nxcompshad/Updater.h @@ -18,7 +18,7 @@ #ifndef Updater_H #define Updater_H -#include +#include #include "Regions.h" #include "Input.h" diff --git a/nxcompshad/Win.cpp b/nxcompshad/Win.cpp index 481cbcac0..77a9694bd 100644 --- a/nxcompshad/Win.cpp +++ b/nxcompshad/Win.cpp @@ -17,7 +17,7 @@ #if defined(__CYGWIN32__) || defined(WIN32) -#include +#include #define PANIC #define WARNING diff --git a/nxcompshad/Win.h b/nxcompshad/Win.h index fe591ff02..1069fa9ee 100644 --- a/nxcompshad/Win.h +++ b/nxcompshad/Win.h @@ -20,7 +20,7 @@ #ifndef Win32Poller_H #define Win32Poller_H -//#include +//#include #include #include diff --git a/nxcompshad/X11.cpp b/nxcompshad/X11.cpp index 2d1140f11..5a18e0a69 100644 --- a/nxcompshad/X11.cpp +++ b/nxcompshad/X11.cpp @@ -22,10 +22,10 @@ #undef TEST #undef DEBUG -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/nxcompshad/X11.h b/nxcompshad/X11.h index 21275420c..d7b858100 100644 --- a/nxcompshad/X11.h +++ b/nxcompshad/X11.h @@ -18,10 +18,10 @@ #ifndef X11Poller_H #define X11Poller_H -#include -#include -#include -#include +#include +#include +#include "X11/include/Xdamage_nxcompshad.h" +#include "X11/include/Xrandr_nxcompshad.h" #include "Core.h" diff --git a/nxcompshad/X11/include/Xdamage_nxcompshad.h b/nxcompshad/X11/include/Xdamage_nxcompshad.h new file mode 100644 index 000000000..8e5e0fbbd --- /dev/null +++ b/nxcompshad/X11/include/Xdamage_nxcompshad.h @@ -0,0 +1,92 @@ +/* + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xdamage library header file only contains symbols + * required by nxcompshad and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in + * nxcompshad, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXfixes from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + + +#ifndef _XDAMAGE_H_ +#define _XDAMAGE_H_ + +#include +#include + +/* from */ +typedef XID XserverRegion; + +#define XDAMAGE_1_1_INTERFACE + +typedef XID Damage; + +typedef struct { + int type; /* event base */ + unsigned long serial; + Bool send_event; + Display *display; + Drawable drawable; + Damage damage; + int level; + Bool more; /* more events will be delivered immediately */ + Time timestamp; + XRectangle area; + XRectangle geometry; +} XDamageNotifyEvent; + +_XFUNCPROTOBEGIN + +Bool XDamageQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); + +Status XDamageQueryVersion (Display *dpy, + int *major_version_return, + int *minor_version_return); + +Damage +XDamageCreate (Display *dpy, Drawable drawable, int level); + +void +XDamageSubtract (Display *dpy, Damage damage, + XserverRegion repair, XserverRegion parts); + +_XFUNCPROTOEND + +#endif /* _XDAMAGE_H_ */ diff --git a/nxcompshad/X11/include/Xrandr_nxcompshad.h b/nxcompshad/X11/include/Xrandr_nxcompshad.h new file mode 100644 index 000000000..4feb01685 --- /dev/null +++ b/nxcompshad/X11/include/Xrandr_nxcompshad.h @@ -0,0 +1,80 @@ +/* + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * Copyright © 2006 Intel Corporation + * Copyright © 2008 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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. + * + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xrandr library header file only contains symbols + * required by nxcompshad and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in + * nxcompshad, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +/* from */ +#define RRScreenChangeNotify 0 +#define RRScreenChangeNotifyMask (1L << 0) + +#include + +_XFUNCPROTOBEGIN + +/* internal representation is private to the library */ +typedef struct _XRRScreenConfiguration XRRScreenConfiguration; + +Bool XRRQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); + +void XRRSelectInput(Display *dpy, Window window, int mask); + + +/* + * intended to take RRScreenChangeNotify, or + * ConfigureNotify (on the root window) + * returns 1 if it is an event type it understands, 0 if not + */ +int XRRUpdateConfiguration(XEvent *event); +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ -- cgit v1.2.3 From 27e06a5e2999e4c68d0292c3f4213c956625593d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 28 Dec 2015 19:55:38 +0100 Subject: library clean-up: Don't build libNX_Xcomposite anymore. Use system's libXcomposite shared library. --- debian/control | 44 ++--- debian/libnx-xcomposite-dev.install.in | 2 - debian/libnx-xcomposite1.install.in | 1 - debian/libnx-xcomposite1.symbols | 13 -- debian/rules | 1 - nx-X11/config/cf/X11.tmpl | 34 ---- nx-X11/config/cf/host.def | 2 - nx-X11/include/extensions/Imakefile | 2 +- nx-X11/lib/Imakefile | 5 - nx-X11/lib/Xcomposite/Imakefile | 56 ------ nx-X11/lib/Xcomposite/Xcomposite.c | 333 --------------------------------- nx-X11/lib/Xcomposite/Xcomposite.h | 71 ------- nx-X11/lib/Xcomposite/xcompositeint.h | 66 ------- nx-X11/programs/Xserver/Imakefile | 6 +- nx-libs.spec | 30 +-- 15 files changed, 23 insertions(+), 643 deletions(-) delete mode 100644 debian/libnx-xcomposite-dev.install.in delete mode 100644 debian/libnx-xcomposite1.install.in delete mode 100644 debian/libnx-xcomposite1.symbols delete mode 100644 nx-X11/lib/Xcomposite/Imakefile delete mode 100644 nx-X11/lib/Xcomposite/Xcomposite.c delete mode 100644 nx-X11/lib/Xcomposite/Xcomposite.h delete mode 100644 nx-X11/lib/Xcomposite/xcompositeint.h (limited to 'debian') diff --git a/debian/control b/debian/control index 8cbb4bc54..ecfd5d82a 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,7 @@ Build-Depends: libxfont-dev, libxdmcp-dev, libxdamage-dev, + libxcomposite-dev, libxrandr-dev, autoconf, pkg-config, @@ -199,20 +200,17 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Composite extension library +Description: nx-X11 Composite extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xcomposite provides an X Window System client interface to the Composite - extension to the X protocol + This package removes the obsoleted libNX_Xcomposite.so.1 library. With + recent versions of NX, the system-wide installed libXcomposite gets + used. . - The Composite extension allows clients called compositing managers to control - the final drawing of the screen. Rendering is done into an off-screen buffer. + This package can be safely removed. Package: libnx-xcomposite-dev Provides: libnx-xcomposite1-dev @@ -220,23 +218,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xcomposite1 (= ${binary:Version}), - nx-x11proto-composite-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Composite extension library (development headers) +Description: nx-X11 Composite extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xcomposite provides an X Window System client interface to the Composite - extension to the X protocol - . - The Composite extension allows clients called compositing managers to control - the final drawing of the screen. Rendering is done into an off-screen buffer. + This package removes the obsoleted headers for the libNX_Xcomposite.so.1 + library. With recent versions of NX, the system-wide installed + libXcomposite gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-composite-dev Section: libdevel @@ -261,22 +253,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xcomposite1 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Composite extension library (debug package) +Description: nx-X11 Composite extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xcomposite provides an X Window System client interface to the Composite - extension to the X protocol + This package removes the debug symbols for the obsoleted + libNX_Xcomposite.so.1 library. With recent versions of NX, the + system-wide installed libXcomposite gets used. . - The Composite extension allows clients called compositing managers to control - the final drawing of the screen. Rendering is done into an off-screen buffer. - . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xdamage1 Architecture: any diff --git a/debian/libnx-xcomposite-dev.install.in b/debian/libnx-xcomposite-dev.install.in deleted file mode 100644 index 71451dbcc..000000000 --- a/debian/libnx-xcomposite-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xcomposite.so -usr/include/*/nx-X11/extensions/Xcomposite.h diff --git a/debian/libnx-xcomposite1.install.in b/debian/libnx-xcomposite1.install.in deleted file mode 100644 index ecc2f4237..000000000 --- a/debian/libnx-xcomposite1.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xcomposite.so.* diff --git a/debian/libnx-xcomposite1.symbols b/debian/libnx-xcomposite1.symbols deleted file mode 100644 index 22ddc889f..000000000 --- a/debian/libnx-xcomposite1.symbols +++ /dev/null @@ -1,13 +0,0 @@ -libNX_Xcomposite.so.1 libnx-xcomposite1 #MINVER# - XCompositeCreateRegionFromBorderClip@Base 3.5.0.29 - XCompositeExtensionInfo@Base 3.5.0.29 - XCompositeExtensionName@Base 3.5.0.29 - XCompositeFindDisplay@Base 3.5.0.29 - XCompositeNameWindowPixmap@Base 3.5.0.29 - XCompositeQueryExtension@Base 3.5.0.29 - XCompositeQueryVersion@Base 3.5.0.29 - XCompositeRedirectSubwindows@Base 3.5.0.29 - XCompositeRedirectWindow@Base 3.5.0.29 - XCompositeUnredirectSubwindows@Base 3.5.0.29 - XCompositeUnredirectWindow@Base 3.5.0.29 - XCompositeVersion@Base 3.5.0.29 diff --git a/debian/rules b/debian/rules index b78855033..791b99cf3 100755 --- a/debian/rules +++ b/debian/rules @@ -80,7 +80,6 @@ override_dh_auto_build: override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg - dh_strip -plibnx-xcomposite1 --dbg-package=libnx-xcomposite1-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index f54ff84cc..6f226c3fa 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1396,30 +1396,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #define ProfileLibXfixes NO #endif -#if BuildCompositeLibrary -#ifndef SharedLibXcomposite -#define SharedLibXcomposite HasSharedLibraries -#endif -#ifndef NormalLibXcomposite -#define NormalLibXcomposite (!SharedLibXcomposite || ForceNormalLib) -#endif -#ifndef DebugLibXcomposite -#define DebugLibXcomposite NO -#endif -#ifndef ProfileLibXcomposite -#define ProfileLibXcomposite NO -#endif -#else -#undef SharedLibXcomposite -#define SharedLibXcomposite NO -#undef NormalLibXcomposite -#define NormalLibXcomposite NO -#undef DebugLibXcomposite -#define DebugLibXcomposite NO -#undef ProfileLibXcomposite -#define ProfileLibXcomposite NO -#endif - #ifndef SharedLibXext #define SharedLibXext HasSharedLibraries #endif @@ -1476,16 +1452,6 @@ SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) #endif -XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite -#if SharedLibXcomposite -#ifndef SharedXcompositeRev -#define SharedXcompositeRev 1.0 -#endif -SharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev) -#else -ProjectUnsharedLibReferences(XCOMPOSITE,NX_Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir) -#endif - #ifndef SharedLibXau #define SharedLibXau YES #endif diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 1edf85de9..9e017d189 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -125,8 +125,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildXfixesLibrary YES -#define BuildCompositeLibrary YES - #define BuildDocs NO #define BuildComposite YES diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index b7ed23120..7cb4d2c7b 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -44,7 +44,7 @@ RENDERHEADERS = render.h renderproto.h #if BuildXfixes || BuildXfixesLibrary XFIXESHEADERS = xfixeswire.h xfixesproto.h #endif -#if BuildComposite || BuildCompositeLibrary +#if BuildComposite COMPOSITEHEADERS = composite.h compositeproto.h #endif #if BuildXTrap diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 20c68f97e..f498baf04 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -27,10 +27,6 @@ RENDERLIBDIR = Xrender XFIXESLIBDIR = Xfixes #endif -#if BuildCompositeLibrary -COMPOSITELIBDIR = Xcomposite -#endif - #if BuildXauLib XAULIBDIR = Xau #endif @@ -59,7 +55,6 @@ LINTSUBDIRS = \ $(XINERAMADIR) \ $(RENDERLIBDIR) \ $(XFIXESLIBDIR) \ - $(COMPOSITELIBDIR) \ $(NULL) SUBDIRS = xtrans $(LINTSUBDIRS) diff --git a/nx-X11/lib/Xcomposite/Imakefile b/nx-X11/lib/Xcomposite/Imakefile deleted file mode 100644 index 24820c146..000000000 --- a/nx-X11/lib/Xcomposite/Imakefile +++ /dev/null @@ -1,56 +0,0 @@ -XCOMM $XdotOrg: xc/lib/Xcomposite/Imakefile,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -#ifndef NormalLibXcomposite -#define NormalLibXcomposite YES -SOXCOMPOSITEREV=1.0.0 -#endif - -#ifndef SharedLibXcomposite -#define SharedLibXcomposite YES -#endif - -#define DoNormalLib NormalLibXcomposite -#define DoSharedLib SharedLibXcomposite -#define DoDebugLib DebugLibXcomposite -#define DoProfileLib ProfileLibXcomposite - -#define LibName NX_Xcomposite -#define SoRev SOXCOMPOSITEREV -#define IncSubdir nx-X11 -#define IncSubSubdir extensions - -#include - -#ifdef SharedXcompositeReqs -REQUIREDLIBS = SharedXcompositeReqs -#endif - -XCOMPOSITE_VERSION=1.0.0 - -X_LIBS=-L$(SHLIBDIR) $(XONLYLIB) -X_CFLAGS=-I$(INCROOT) $(THREADS_DEFINES) -XCOMPOSITE_LIBS = $(XFIXESLIB) $(XDAMAGELIB) -XCOMPOSITE_CFLAGS = - -RPATH_CFLAG = HardCodeLibdirFlag - -SRCS = Xcomposite.c - -OBJS = Xcomposite.o - -HEADERS = Xcomposite.h - -SUBSTVARS=prefix="$(PROJECTROOT)" \ - exec_prefix="$(BINDIR)" \ - libdir="$(USRLIBDIR)" \ - hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \ - includedir="$(INCROOT)" \ - X_LIBS="$(X_LIBS)" \ - X_CFLAGS="$(X_CFLAGS)" \ - XCOMPOSITE_LIBS="$(XCOMPOSITE_LIBS)" \ - XCOMPOSITE_CFLAGS="$(XCOMPOSITE_CFLAGS)" \ - VERSION="$(XCOMPOSITE_VERSION)" - -#include - -DependTarget() diff --git a/nx-X11/lib/Xcomposite/Xcomposite.c b/nx-X11/lib/Xcomposite/Xcomposite.c deleted file mode 100644 index cd10f8ed6..000000000 --- a/nx-X11/lib/Xcomposite/Xcomposite.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * $Id: Xcomposite.c,v 1.2 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#include "xcompositeint.h" - -XCompositeExtInfo XCompositeExtensionInfo; - -const char XCompositeExtensionName[] = COMPOSITE_NAME; - -/* - * XCompositeExtRemoveDisplay - remove the indicated display from the - * extension object. (Replaces XextRemoveDisplay.) - */ -static int -XCompositeExtRemoveDisplay (XCompositeExtInfo *extinfo, Display *dpy) -{ - XCompositeExtDisplayInfo *info, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) break; - prev = info; - } - if (!info) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = info->next; - else - extinfo->head = info->next; - - extinfo->ndisplays--; - if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) info); - return 1; -} - -static int -XCompositeCloseDisplay (Display *dpy, XExtCodes *codes) -{ - return XCompositeExtRemoveDisplay (&XCompositeExtensionInfo, dpy); -} - -/* - * XCompositeExtAddDisplay - add a display to this extension. (Replaces - * XextAddDisplay) - */ -static XCompositeExtDisplayInfo * -XCompositeExtAddDisplay (XCompositeExtInfo *extinfo, - Display *dpy, - const char *ext_name) -{ - XCompositeExtDisplayInfo *info; - int ev; - - info = (XCompositeExtDisplayInfo *) Xmalloc (sizeof (XCompositeExtDisplayInfo)); - if (!info) return NULL; - info->display = dpy; - - info->codes = XInitExtension (dpy, ext_name); - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (info->codes) { - xCompositeQueryVersionReply rep; - xCompositeQueryVersionReq *req; - XESetCloseDisplay (dpy, info->codes->extension, - XCompositeCloseDisplay); - /* - * Get the version info - */ - LockDisplay (dpy); - GetReq (CompositeQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeQueryVersion; - req->majorVersion = COMPOSITE_MAJOR; - req->minorVersion = COMPOSITE_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - info->major_version = rep.majorVersion; - info->minor_version = rep.minorVersion; - UnlockDisplay (dpy); - } else { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(info); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, XCompositeCloseDisplay); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - info->next = extinfo->head; - extinfo->head = info; - extinfo->cur = info; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return info; -} - -/* - * XCompositeExtFindDisplay - look for a display in this extension; keeps a - * cache of the most-recently used for efficiency. (Replaces - * XextFindDisplay.) - */ -static XCompositeExtDisplayInfo * -XCompositeExtFindDisplay (XCompositeExtInfo *extinfo, - Display *dpy) -{ - XCompositeExtDisplayInfo *info; - - /* - * see if this was the most recently accessed display - */ - if ((info = extinfo->cur) && info->display == dpy) - return info; - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) { - extinfo->cur = info; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return info; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - -XCompositeExtDisplayInfo * -XCompositeFindDisplay (Display *dpy) -{ - XCompositeExtDisplayInfo *info; - - info = XCompositeExtFindDisplay (&XCompositeExtensionInfo, dpy); - if (!info) - info = XCompositeExtAddDisplay (&XCompositeExtensionInfo, dpy, - XCompositeExtensionName); - return info; -} - - -Bool -XCompositeQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - - if (XCompositeHasExtension(info)) - { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } - else - return False; -} - -Status -XCompositeQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - - XCompositeCheckExtension (dpy, info, 0); - *major_versionp = info->major_version; - *minor_versionp = info->minor_version; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -int -XCompositeVersion (void) -{ - return XCOMPOSITE_VERSION; -} - -void -XCompositeRedirectWindow (Display *dpy, Window window, int update) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeRedirectWindowReq *req; - - XCompositeSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (CompositeRedirectWindow, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeRedirectWindow; - req->window = window; - req->update = update; - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XCompositeRedirectSubwindows (Display *dpy, Window window, int update) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeRedirectSubwindowsReq *req; - - XCompositeSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (CompositeRedirectSubwindows, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeRedirectSubwindows; - req->window = window; - req->update = update; - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XCompositeUnredirectWindow (Display *dpy, Window window, int update) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeUnredirectWindowReq *req; - - XCompositeSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (CompositeUnredirectWindow, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeUnredirectWindow; - req->window = window; - req->update = update; - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XCompositeUnredirectSubwindows (Display *dpy, Window window, int update) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeUnredirectSubwindowsReq *req; - - XCompositeSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (CompositeUnredirectSubwindows, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeUnredirectSubwindows; - req->window = window; - req->update = update; - UnlockDisplay (dpy); - SyncHandle (); -} - -XserverRegion -XCompositeCreateRegionFromBorderClip (Display *dpy, Window window) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeCreateRegionFromBorderClipReq *req; - XserverRegion region; - - XCompositeCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (CompositeCreateRegionFromBorderClip, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeCreateRegionFromBorderClip; - req->window = window; - region = req->region = XAllocID (dpy); - UnlockDisplay (dpy); - SyncHandle (); - return region; -} - -Pixmap -XCompositeNameWindowPixmap (Display *dpy, Window window) -{ - XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); - xCompositeNameWindowPixmapReq *req; - Pixmap pixmap; - - XCompositeCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (CompositeNameWindowPixmap, req); - req->reqType = info->codes->major_opcode; - req->compositeReqType = X_CompositeNameWindowPixmap; - req->window = window; - pixmap = req->pixmap = XAllocID (dpy); - UnlockDisplay (dpy); - SyncHandle (); - return pixmap; -} diff --git a/nx-X11/lib/Xcomposite/Xcomposite.h b/nx-X11/lib/Xcomposite/Xcomposite.h deleted file mode 100644 index c28cc6857..000000000 --- a/nx-X11/lib/Xcomposite/Xcomposite.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id: Xcomposite.h,v 1.5 2005/11/09 21:31:19 kem Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XCOMPOSITE_H_ -#define _XCOMPOSITE_H_ - -#include -#include -#include - -/* - * This revision number also appears in configure.ac, they have - * to be manually synchronized - */ -#define XCOMPOSITE_MAJOR COMPOSITE_MAJOR -#define XCOMPOSITE_MINOR COMPOSITE_MINOR -#define XCOMPOSITE_REVISION 2 -#define XCOMPOSITE_VERSION ((XCOMPOSITE_MAJOR * 10000) + (XCOMPOSITE_MINOR * 100) + (XCOMPOSITE_REVISION)) - -_XFUNCPROTOBEGIN - -Bool XCompositeQueryExtension (Display *dpy, int *event_basep, int *error_basep); - -Status XCompositeQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -int XCompositeVersion (void); - -void -XCompositeRedirectWindow (Display *dpy, Window window, int update); - -void -XCompositeRedirectSubwindows (Display *dpy, Window window, int update); - -void -XCompositeUnredirectWindow (Display *dpy, Window window, int update); - -void -XCompositeUnredirectSubwindows (Display *dpy, Window window, int update); - -XserverRegion -XCompositeCreateRegionFromBorderClip (Display *dpy, Window window); - -Pixmap -XCompositeNameWindowPixmap (Display *dpy, Window window); - -_XFUNCPROTOEND - -#endif /* _XCOMPOSITE_H_ */ diff --git a/nx-X11/lib/Xcomposite/xcompositeint.h b/nx-X11/lib/Xcomposite/xcompositeint.h deleted file mode 100644 index 7b12e8d55..000000000 --- a/nx-X11/lib/Xcomposite/xcompositeint.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: xcompositeint.h,v 1.3 2005/07/12 03:10:35 keithp Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XDAMAGEINT_H_ -#define _XDAMAGEINT_H_ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include -#include -#include - -typedef struct _XCompositeExtDisplayInfo { - struct _XCompositeExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - int major_version; /* -1 means we don't know */ - int minor_version; /* -1 means we don't know */ -} XCompositeExtDisplayInfo; - -/* replaces XExtensionInfo */ -typedef struct _XCompositeExtInfo { - XCompositeExtDisplayInfo *head; /* start of the list */ - XCompositeExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XCompositeExtInfo; - -extern XCompositeExtInfo XCompositeExtensionInfo; -extern const char XCompositeExtensionName[]; - -XCompositeExtDisplayInfo * -XCompositeFindDisplay (Display *dpy); - -#define XCompositeHasExtension(i) ((i) && ((i)->codes)) - -#define XCompositeCheckExtension(dpy,i,val) \ - if (!XCompositeHasExtension(i)) { return val; } - -#define XCompositeSimpleCheckExtension(dpy,i) \ - if (!XCompositeHasExtension(i)) { return; } - -#endif /* _XDAMAGEINT_H_ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 43d49d085..18e0d47f2 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -403,17 +403,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lNX_Xcomposite -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes -lXfont \ + -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lNX_Xfixes -lXfont \ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lXdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-libs.spec b/nx-libs.spec index a9afb7ec8..af9753fdd 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -35,6 +35,7 @@ BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xfont) BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xrandr) %else BuildRequires: libexpat-devel @@ -46,6 +47,7 @@ BuildRequires: xorg-x11-libXpm-devel BuildRequires: xorg-x11-libXfont-devel BuildRequires: xorg-x11-libXdmcp-devel BuildRequires: xorg-x11-libXdamage-devel +BuildRequires: xorg-x11-libXcomposite-devel BuildRequires: xorg-x11-libXrandr-devel %endif BuildRequires: xorg-x11-util-devel @@ -57,7 +59,7 @@ BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: libXfont-devel BuildRequires: libXdmcp-devel -BuildRequires: libXdamage-devel +BuildRequires: libXcomposite-devel BuildRequires: libXrandr-devel %endif @@ -190,24 +192,6 @@ restrict use of the display to only those clients that show that they know a server-specific key called a "magic cookie". -%package -n libNX_Xcomposite1 -Group: System Environment/Libraries -Summary: NX protocol Composite extension client library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xcomposite - -%description -n libNX_Xcomposite1 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The Composite extension causes a entire sub-tree of the window -hierarchy to be rendered to an off-screen buffer. Applications can -then take the contents of that buffer and do whatever they like. The -off-screen buffer can be automatically merged into the parent window -or merged by external programs, called compositing managers. - - %package -n libNX_Xext-devel Group: Development/Libraries Summary: Development files for the NX Common Extensions library @@ -634,7 +618,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -p /sbin/ldconfig %post -n libNX_X11-6 -p /sbin/ldconfig %post -n libNX_Xau6 -p /sbin/ldconfig -%post -n libNX_Xcomposite1 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig @@ -646,7 +629,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -p /sbin/ldconfig %postun -n libNX_X11-6 -p /sbin/ldconfig %postun -n libNX_Xau6 -p /sbin/ldconfig -%postun -n libNX_Xcomposite1 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig @@ -695,10 +677,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xau.so.6* -%files -n libNX_Xcomposite1 -%defattr(-,root,root) -%{_libdir}/libNX_Xcomposite.so.1* - %files -n libNX_Xext-devel %defattr(-,root,root) %{_libdir}/libNX_Xext.so @@ -815,13 +793,11 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files devel %defattr(-,root,root) -%{_libdir}/libNX_Xcomposite.so %{_libdir}/libNX_Xinerama.so %{_libdir}/libNX_Xtst.so %{_includedir}/nx-X11/X10.h %dir %{_includedir}/nx-X11/extensions %{_includedir}/nx-X11/extensions/XTest.h -%{_includedir}/nx-X11/extensions/Xcomposite.h %{_includedir}/nx-X11/extensions/Xevie.h %{_includedir}/nx-X11/extensions/Xinerama.h %{_includedir}/nx-X11/extensions/lbxbuf.h -- cgit v1.2.3 From 6217812c8bf7a7806b776c6e2d28be082cd3e902 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 28 Dec 2015 19:09:42 +0100 Subject: library clean-up: Don't build libNX_Xfixes anymore. Use system's libXfixes shared library. --- debian/control | 40 ++-- debian/libnx-xfixes-dev.install.in | 2 - debian/libnx-xfixes3.install.in | 1 - debian/libnx-xfixes3.symbols | 35 --- debian/rules | 1 - nx-X11/config/cf/X11.tmpl | 37 --- nx-X11/config/cf/host.def | 2 - nx-X11/include/extensions/Imakefile | 2 +- nx-X11/lib/Imakefile | 5 - nx-X11/lib/Xfixes/Cursor.c | 220 ------------------ nx-X11/lib/Xfixes/Imakefile | 63 ------ nx-X11/lib/Xfixes/Region.c | 441 ------------------------------------ nx-X11/lib/Xfixes/SaveSet.c | 48 ---- nx-X11/lib/Xfixes/Selection.c | 50 ---- nx-X11/lib/Xfixes/Xfixes-def.cpp | 10 - nx-X11/lib/Xfixes/Xfixes.c | 333 --------------------------- nx-X11/lib/Xfixes/Xfixes.h | 220 ------------------ nx-X11/lib/Xfixes/Xfixes.man | 76 ------- nx-X11/lib/Xfixes/Xfixesint.h | 68 ------ nx-X11/programs/Xserver/Imakefile | 6 +- nx-libs.spec | 49 +--- 21 files changed, 22 insertions(+), 1687 deletions(-) delete mode 100644 debian/libnx-xfixes-dev.install.in delete mode 100644 debian/libnx-xfixes3.install.in delete mode 100644 debian/libnx-xfixes3.symbols delete mode 100644 nx-X11/lib/Xfixes/Cursor.c delete mode 100644 nx-X11/lib/Xfixes/Imakefile delete mode 100644 nx-X11/lib/Xfixes/Region.c delete mode 100644 nx-X11/lib/Xfixes/SaveSet.c delete mode 100644 nx-X11/lib/Xfixes/Selection.c delete mode 100644 nx-X11/lib/Xfixes/Xfixes-def.cpp delete mode 100644 nx-X11/lib/Xfixes/Xfixes.c delete mode 100644 nx-X11/lib/Xfixes/Xfixes.h delete mode 100644 nx-X11/lib/Xfixes/Xfixes.man delete mode 100644 nx-X11/lib/Xfixes/Xfixesint.h (limited to 'debian') diff --git a/debian/control b/debian/control index ecfd5d82a..102d1535b 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Build-Depends: libxdamage-dev, libxcomposite-dev, libxrandr-dev, + libxfixes-dev, autoconf, pkg-config, x11proto-core-dev, @@ -477,19 +478,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 miscellaneous 'fixes' extension library +Description: nx-X11 miscellaneous 'fixes' extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xfixes provides an X Window System client interface to the - 'XFIXES' extension to the X protocol. + This package removes the obsoleted libNX_Xfixes.so.3 library. With + recent versions of NX, the system-wide installed libXfixes gets used. . - It provides support for Region types, and some cursor functions. + This package can be safely removed. Package: libnx-xfixes-dev Provides: libnx-xfixes3-dev @@ -497,22 +495,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xfixes3 (= ${binary:Version}), - nx-x11proto-xfixes-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 miscellaneous 'fixes' extension library (development headers) +Description: nx-X11 miscellaneous 'fixes' extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xfixes provides an X Window System client interface to the - 'XFIXES' extension to the X protocol. - . - It provides support for Region types, and some cursor functions. + This package removes the obsoleted headers for the libNX_Xfixes.so.3 + library. With recent versions of NX, the system-wide installed + libXfixes gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-xfixes-dev Section: libdevel @@ -536,21 +529,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xfixes3 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 miscellaneous 'fixes' extension library (debug package) +Description: nx-X11 miscellaneous 'fixes' extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xfixes provides an X Window System client interface to the - 'XFIXES' extension to the X protocol. - . - It provides support for Region types, and some cursor functions. + This package removes the obsoleted debug symbols for the libNX_Xfixes.so.3 + library. With recent versions of NX, the system-wide installed libXfixes + gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xinerama1 Architecture: any diff --git a/debian/libnx-xfixes-dev.install.in b/debian/libnx-xfixes-dev.install.in deleted file mode 100644 index 475c78d0a..000000000 --- a/debian/libnx-xfixes-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xfixes.so -usr/include/*/nx-X11/extensions/Xfixes.h diff --git a/debian/libnx-xfixes3.install.in b/debian/libnx-xfixes3.install.in deleted file mode 100644 index b86ea4ae1..000000000 --- a/debian/libnx-xfixes3.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xfixes.so.* diff --git a/debian/libnx-xfixes3.symbols b/debian/libnx-xfixes3.symbols deleted file mode 100644 index 2322e490e..000000000 --- a/debian/libnx-xfixes3.symbols +++ /dev/null @@ -1,35 +0,0 @@ -libNX_Xfixes.so.3 libnx-xfixes3 #MINVER# - XFixesChangeCursor@Base 3.5.0.29 - XFixesChangeCursorByName@Base 3.5.0.29 - XFixesChangeSaveSet@Base 3.5.0.29 - XFixesCopyRegion@Base 3.5.0.29 - XFixesCreateRegion@Base 3.5.0.29 - XFixesCreateRegionFromBitmap@Base 3.5.0.29 - XFixesCreateRegionFromGC@Base 3.5.0.29 - XFixesCreateRegionFromPicture@Base 3.5.0.29 - XFixesCreateRegionFromWindow@Base 3.5.0.29 - XFixesDestroyRegion@Base 3.5.0.29 - XFixesExpandRegion@Base 3.5.0.29 - XFixesExtensionInfo@Base 3.5.0.29 - XFixesExtensionName@Base 3.5.0.29 - XFixesFetchRegion@Base 3.5.0.29 - XFixesFetchRegionAndBounds@Base 3.5.0.29 - XFixesFindDisplay@Base 3.5.0.29 - XFixesGetCursorImage@Base 3.5.0.29 - XFixesGetCursorName@Base 3.5.0.29 - XFixesIntersectRegion@Base 3.5.0.29 - XFixesInvertRegion@Base 3.5.0.29 - XFixesQueryExtension@Base 3.5.0.29 - XFixesQueryVersion@Base 3.5.0.29 - XFixesRegionExtents@Base 3.5.0.29 - XFixesSelectCursorInput@Base 3.5.0.29 - XFixesSelectSelectionInput@Base 3.5.0.29 - XFixesSetCursorName@Base 3.5.0.29 - XFixesSetGCClipRegion@Base 3.5.0.29 - XFixesSetPictureClipRegion@Base 3.5.0.29 - XFixesSetRegion@Base 3.5.0.29 - XFixesSetWindowShapeRegion@Base 3.5.0.29 - XFixesSubtractRegion@Base 3.5.0.29 - XFixesTranslateRegion@Base 3.5.0.29 - XFixesUnionRegion@Base 3.5.0.29 - XFixesVersion@Base 3.5.0.29 diff --git a/debian/rules b/debian/rules index 791b99cf3..4fb1cf1bc 100755 --- a/debian/rules +++ b/debian/rules @@ -81,7 +81,6 @@ override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg - dh_strip -plibnx-xfixes3 --dbg-package=libnx-xfixes3-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg dh_strip -plibnx-xtst6 --dbg-package=libnx-xtst6-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 6f226c3fa..f32cdadbf 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -295,9 +295,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXfixes #define BuildXfixes YES #endif -#ifndef BuildXfixesLibrary -#define BuildXfixesLibrary !BuildServersOnly -#endif #ifndef BuildDamage #define BuildDamage BuildXfixes @@ -1372,30 +1369,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #define ProfileLibXrender NO #endif -#if BuildXfixesLibrary -#ifndef SharedLibXfixes -#define SharedLibXfixes HasSharedLibraries -#endif -#ifndef NormalLibXfixes -#define NormalLibXfixes (!SharedLibXfixes || ForceNormalLib) -#endif -#ifndef DebugLibXfixes -#define DebugLibXfixes NO -#endif -#ifndef ProfileLibXfixes -#define ProfileLibXfixes NO -#endif -#else -#undef SharedLibXfixes -#define SharedLibXfixes NO -#undef NormalLibXfixes -#define NormalLibXfixes NO -#undef DebugLibXfixes -#define DebugLibXfixes NO -#undef ProfileLibXfixes -#define ProfileLibXfixes NO -#endif - #ifndef SharedLibXext #define SharedLibXext HasSharedLibraries #endif @@ -1440,16 +1413,6 @@ ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) #else ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir) -#endif - - XFIXESLIBSRC = $(LIBSRC)/Xfixes -#if SharedLibXfixes -#ifndef SharedXfixesRev -#define SharedXfixesRev 3.0 -#endif -SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev) -#else -ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) #endif #ifndef SharedLibXau diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 9e017d189..f1737a998 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -123,8 +123,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildLibraries YES #endif -#define BuildXfixesLibrary YES - #define BuildDocs NO #define BuildComposite YES diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 7cb4d2c7b..c31e8531f 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -41,7 +41,7 @@ XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h #if BuildRender RENDERHEADERS = render.h renderproto.h #endif -#if BuildXfixes || BuildXfixesLibrary +#if BuildXfixes XFIXESHEADERS = xfixeswire.h xfixesproto.h #endif #if BuildComposite diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index f498baf04..7cfffa6d9 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -23,10 +23,6 @@ XINERAMADIR=Xinerama RENDERLIBDIR = Xrender #endif -#if BuildXfixesLibrary -XFIXESLIBDIR = Xfixes -#endif - #if BuildXauLib XAULIBDIR = Xau #endif @@ -54,7 +50,6 @@ LINTSUBDIRS = \ $(XKBLIBDIR) \ $(XINERAMADIR) \ $(RENDERLIBDIR) \ - $(XFIXESLIBDIR) \ $(NULL) SUBDIRS = xtrans $(LINTSUBDIRS) diff --git a/nx-X11/lib/Xfixes/Cursor.c b/nx-X11/lib/Xfixes/Cursor.c deleted file mode 100644 index ada8a681a..000000000 --- a/nx-X11/lib/Xfixes/Cursor.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/Cursor.c,v 1.1 2002/11/30 06:21:44 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xfixesint.h" - -void -XFixesSelectCursorInput (Display *dpy, - Window win, - unsigned long eventMask) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSelectCursorInputReq *req; - - XFixesSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - GetReq (XFixesSelectCursorInput, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSelectCursorInput; - req->window = win; - req->eventMask = eventMask; - UnlockDisplay (dpy); - SyncHandle (); -} - -XFixesCursorImage * -XFixesGetCursorImage (Display *dpy) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesGetCursorImageAndNameReq *req; - xXFixesGetCursorImageAndNameReply rep; - int npixels; - int nbytes_name; - int nbytes, nread, rlength; - XFixesCursorImage *image; - char *name; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesGetCursorImageAndName, req); - req->reqType = info->codes->major_opcode; - if (info->major_version >= 2) - req->xfixesReqType = X_XFixesGetCursorImageAndName; - else - req->xfixesReqType = X_XFixesGetCursorImage; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - if (info->major_version < 2) - { - rep.cursorName = None; - rep.nbytes = 0; - } - npixels = rep.width * rep.height; - nbytes_name = rep.nbytes; - /* reply data length */ - nbytes = (long) rep.length << 2; - /* bytes of actual data in the reply */ - nread = (npixels << 2) + nbytes_name; - /* size of data returned to application */ - rlength = (sizeof (XFixesCursorImage) + - npixels * sizeof (unsigned long) + - nbytes_name + 1); - - image = (XFixesCursorImage *) Xmalloc (rlength); - if (!image) - { - _XEatData (dpy, nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - image->x = rep.x; - image->y = rep.y; - image->width = rep.width; - image->height = rep.height; - image->xhot = rep.xhot; - image->yhot = rep.yhot; - image->cursor_serial = rep.cursorSerial; - image->pixels = (unsigned long *) (image + 1); - image->atom = rep.cursorName; - name = (char *) (image->pixels + npixels); - image->name = name; - _XRead32 (dpy, image->pixels, npixels << 2); - _XRead (dpy, name, nbytes_name); - name[nbytes_name] = '\0'; /* null-terminate */ - /* skip any padding */ - if(nbytes > nread) - { - _XEatData (dpy, (unsigned long) (nbytes - nread)); - } - UnlockDisplay (dpy); - SyncHandle (); - return image; -} - -void -XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSetCursorNameReq *req; - int nbytes = strlen (name); - - XFixesSimpleCheckExtension (dpy, info); - if (info->major_version < 2) - return; - LockDisplay (dpy); - GetReq (XFixesSetCursorName, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSetCursorName; - req->cursor = cursor; - req->nbytes = nbytes; - req->length += (nbytes + 3) >> 2; - Data (dpy, name, nbytes); - UnlockDisplay (dpy); - SyncHandle (); -} - -const char * -XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesGetCursorNameReq *req; - xXFixesGetCursorNameReply rep; - char *name; - - XFixesCheckExtension (dpy, info, 0); - if (info->major_version < 2) - return 0; - LockDisplay (dpy); - GetReq (XFixesGetCursorName, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesGetCursorName; - req->cursor = cursor; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *atom = rep.atom; - if ((name = (char *) Xmalloc(rep.nbytes+1))) { - _XReadPad(dpy, name, (long)rep.nbytes); - name[rep.nbytes] = '\0'; - } else { - _XEatData(dpy, (unsigned long) (rep.nbytes + 3) & ~3); - name = (char *) NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - return(name); -} - -void -XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesChangeCursorReq *req; - - XFixesSimpleCheckExtension (dpy, info); - if (info->major_version < 2) - return; - LockDisplay (dpy); - GetReq (XFixesChangeCursor, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesChangeCursor; - req->source = source; - req->destination = destination; - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesChangeCursorByNameReq *req; - int nbytes = strlen (name); - - XFixesSimpleCheckExtension (dpy, info); - if (info->major_version < 2) - return; - LockDisplay (dpy); - GetReq (XFixesChangeCursorByName, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesChangeCursorByName; - req->source = source; - req->nbytes = nbytes; - req->length += (nbytes + 3) >> 2; - Data (dpy, name, nbytes); - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xfixes/Imakefile b/nx-X11/lib/Xfixes/Imakefile deleted file mode 100644 index cc3e1631d..000000000 --- a/nx-X11/lib/Xfixes/Imakefile +++ /dev/null @@ -1,63 +0,0 @@ -XCOMM $XdotOrg: xc/lib/Xfixes/Imakefile,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -#ifndef NormalLibXfixes -#define NormalLibXfixes YES -SOXFIXESREV=3.0.0 -#endif - -#ifndef SharedLibXfixes -#define SharedLibXfixes YES -#endif - -#define DoNormalLib NormalLibXfixes -#define DoSharedLib SharedLibXfixes -#define DoDebugLib DebugLibXfixes -#define DoProfileLib ProfileLibXfixes - -#define LibName NX_Xfixes -#define SoRev SOXFIXESREV -#define IncSubdir nx-X11 -#define IncSubSubdir extensions - -#include - -#ifdef SharedXfixesReqs -REQUIREDLIBS = SharedXfixesReqs -#endif - -XFIXES_VERSION=3.0.0 - -X_LIBS=-L$(SHLIBDIR) $(XONLYLIB) -X_CFLAGS=-I$(INCROOT) $(THREADS_DEFINES) - -RPATH_CFLAG = HardCodeLibdirFlag - -SRCS = Cursor.c \ - Region.c \ - SaveSet.c \ - Selection.c \ - Xfixes.c - -OBJS = Cursor.o \ - Region.o \ - SaveSet.o \ - Selection.o \ - Xfixes.o - -HEADERS = Xfixes.h - -SUBSTVARS=prefix="$(PROJECTROOT)" \ - exec_prefix="$(BINDIR)" \ - libdir="$(USRLIBDIR)" \ - hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \ - includedir="$(INCROOT)" \ - X_LIBS="$(X_LIBS)" \ - X_CFLAGS="$(X_CFLAGS)" \ - VERSION="$(XFIXES_VERSION)" - -#include - -MANSUFFIX=$(LIBMANSUFFIX) -InstallManPage(Xfixes,$(LIBMANDIR)) - -DependTarget() diff --git a/nx-X11/lib/Xfixes/Region.c b/nx-X11/lib/Xfixes/Region.c deleted file mode 100644 index f4781fe9b..000000000 --- a/nx-X11/lib/Xfixes/Region.c +++ /dev/null @@ -1,441 +0,0 @@ -/* - * $Id: Region.c,v 1.3 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xfixesint.h" - -XserverRegion -XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCreateRegionReq *req; - long len; - XserverRegion region; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesCreateRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCreateRegion; - region = req->region = XAllocID (dpy); - len = ((long) nrectangles) << 1; - SetReqLen (req, len, len); - len <<= 2; - Data16 (dpy, (short *) rectangles, len); - UnlockDisplay (dpy); - SyncHandle(); - return region; -} - -XserverRegion -XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCreateRegionFromBitmapReq *req; - XserverRegion region; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesCreateRegionFromBitmap, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCreateRegionFromBitmap; - region = req->region = XAllocID (dpy); - req->bitmap = bitmap; - UnlockDisplay (dpy); - SyncHandle(); - return region; -} - -XserverRegion -XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCreateRegionFromWindowReq *req; - XserverRegion region; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesCreateRegionFromWindow, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCreateRegionFromWindow; - region = req->region = XAllocID (dpy); - req->window = window; - req->kind = kind; - UnlockDisplay (dpy); - SyncHandle(); - return region; -} - -XserverRegion -XFixesCreateRegionFromGC (Display *dpy, GC gc) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCreateRegionFromGCReq *req; - XserverRegion region; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesCreateRegionFromGC, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCreateRegionFromGC; - region = req->region = XAllocID (dpy); - req->gc = gc->gid; - UnlockDisplay (dpy); - SyncHandle(); - return region; -} - -XserverRegion -XFixesCreateRegionFromPicture (Display *dpy, XID picture) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCreateRegionFromPictureReq *req; - XserverRegion region; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesCreateRegionFromPicture, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCreateRegionFromPicture; - region = req->region = XAllocID (dpy); - req->picture = picture; - UnlockDisplay (dpy); - SyncHandle(); - return region; -} - -void -XFixesDestroyRegion (Display *dpy, XserverRegion region) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesDestroyRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesDestroyRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesDestroyRegion; - req->region = region; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesSetRegion (Display *dpy, XserverRegion region, - XRectangle *rectangles, int nrectangles) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSetRegionReq *req; - long len; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesSetRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSetRegion; - req->region = region; - len = ((long) nrectangles) << 1; - SetReqLen (req, len, len); - len <<= 2; - Data16 (dpy, (short *) rectangles, len); - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesCopyRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesCopyRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesCopyRegion; - req->source = src; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesUnionRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesUnionRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesUnionRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesUnionRegion; - req->source1 = src1; - req->source2 = src2; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesIntersectRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesIntersectRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesIntersectRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesIntersectRegion; - req->source1 = src1; - req->source2 = src2; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesSubtractRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSubtractRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesSubtractRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSubtractRegion; - req->source1 = src1; - req->source2 = src2; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesInvertRegion (Display *dpy, XserverRegion dst, - XRectangle *rect, XserverRegion src) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesInvertRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesInvertRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesInvertRegion; - req->source = src; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesTranslateRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesTranslateRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesTranslateRegion; - req->region = region; - req->dx = dx; - req->dy = dy; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesRegionExtentsReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesRegionExtents, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesRegionExtents; - req->source = src; - req->destination = dst; - UnlockDisplay (dpy); - SyncHandle(); -} - -XRectangle * -XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet) -{ - XRectangle bounds; - - return XFixesFetchRegionAndBounds (dpy, region, nrectanglesRet, &bounds); -} - -XRectangle * -XFixesFetchRegionAndBounds (Display *dpy, - XserverRegion region, - int *nrectanglesRet, - XRectangle *bounds) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesFetchRegionReq *req; - xXFixesFetchRegionReply rep; - XRectangle *rects; - int nrects; - long nbytes; - long nread; - - XFixesCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XFixesFetchRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesFetchRegion; - req->region = region; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - bounds->x = rep.x; - bounds->y = rep.y; - bounds->width = rep.width; - bounds->height = rep.height; - nbytes = (long) rep.length << 2; - nrects = rep.length >> 1; - nread = nrects << 3; - rects = Xmalloc (nrects * sizeof (XRectangle)); - if (!rects) - { - _XEatData (dpy, nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - _XRead16 (dpy, (short *) rects, nrects << 3); - /* skip any padding */ - if(nbytes > nread) - { - _XEatData (dpy, (unsigned long) (nbytes - nread)); - } - UnlockDisplay (dpy); - SyncHandle(); - *nrectanglesRet = nrects; - return rects; -} - -void -XFixesSetGCClipRegion (Display *dpy, GC gc, - int clip_x_origin, int clip_y_origin, - XserverRegion region) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSetGCClipRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesSetGCClipRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSetGCClipRegion; - req->gc = gc->gid; - req->region = region; - req->xOrigin = clip_x_origin; - req->yOrigin = clip_y_origin; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind, - int x_off, int y_off, XserverRegion region) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSetWindowShapeRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesSetWindowShapeRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSetWindowShapeRegion; - req->dest = win; - req->destKind = shape_kind; - req->xOff = x_off; - req->yOff = y_off; - req->region = region; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesSetPictureClipRegion (Display *dpy, XID picture, - int clip_x_origin, int clip_y_origin, - XserverRegion region) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSetPictureClipRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesSetPictureClipRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSetPictureClipRegion; - req->picture = picture; - req->region = region; - req->xOrigin = clip_x_origin; - req->yOrigin = clip_y_origin; - UnlockDisplay (dpy); - SyncHandle(); -} - -void -XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src, - unsigned left, unsigned right, - unsigned top, unsigned bottom) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesExpandRegionReq *req; - - XFixesSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (XFixesExpandRegion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesExpandRegion; - req->source = src; - req->destination = dst; - req->left = left; - req->right = right; - req->top = top; - req->bottom = bottom; - UnlockDisplay (dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xfixes/SaveSet.c b/nx-X11/lib/Xfixes/SaveSet.c deleted file mode 100644 index c5b73f9c9..000000000 --- a/nx-X11/lib/Xfixes/SaveSet.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/SaveSet.c,v 1.1 2002/11/30 18:41:33 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xfixesint.h" - -void -XFixesChangeSaveSet (Display *dpy, Window win, int mode, int target, int map) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesChangeSaveSetReq *req; - - XFixesSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - GetReq (XFixesChangeSaveSet, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesChangeSaveSet; - req->mode = mode; - req->target = target; - req->map = map; - req->window = win; - UnlockDisplay (dpy); - SyncHandle (); -} diff --git a/nx-X11/lib/Xfixes/Selection.c b/nx-X11/lib/Xfixes/Selection.c deleted file mode 100644 index 888dc84f0..000000000 --- a/nx-X11/lib/Xfixes/Selection.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/Selection.c,v 1.1 2002/11/30 06:21:45 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xfixesint.h" - -void -XFixesSelectSelectionInput (Display *dpy, - Window win, - Atom selection, - unsigned long eventMask) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - xXFixesSelectSelectionInputReq *req; - - XFixesSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - GetReq (XFixesSelectSelectionInput, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesSelectSelectionInput; - req->window = win; - req->selection = selection; - req->eventMask = eventMask; - UnlockDisplay (dpy); - SyncHandle (); -} diff --git a/nx-X11/lib/Xfixes/Xfixes-def.cpp b/nx-X11/lib/Xfixes/Xfixes-def.cpp deleted file mode 100644 index bbab58858..000000000 --- a/nx-X11/lib/Xfixes/Xfixes-def.cpp +++ /dev/null @@ -1,10 +0,0 @@ -LIBRARY Xfixes -VERSION LIBRARY_VERSION -EXPORTS - XFixesQueryExtension - XFixesQueryVersion - XFixesChangeSaveSet - XFixesSelectSelectionInput - XFixesSelectCursorInput - XFixesGetCursorImage -/* $XFree86: xc/lib/Xfixes/Xfixes-def.cpp,v 1.1 2002/11/30 06:21:45 keithp Exp $ */ diff --git a/nx-X11/lib/Xfixes/Xfixes.c b/nx-X11/lib/Xfixes/Xfixes.c deleted file mode 100644 index e4dfd05de..000000000 --- a/nx-X11/lib/Xfixes/Xfixes.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/Xfixes.c,v 1.1 2002/11/30 06:21:45 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xfixesint.h" - -XFixesExtInfo XFixesExtensionInfo; -char XFixesExtensionName[] = XFIXES_NAME; - -static int -XFixesCloseDisplay (Display *dpy, XExtCodes *codes); - -static Bool -XFixesWireToEvent(Display *dpy, XEvent *event, xEvent *wire); - -static Status -XFixesEventToWire(Display *dpy, XEvent *event, xEvent *wire); - -/* - * XFixesExtAddDisplay - add a display to this extension. (Replaces - * XextAddDisplay) - */ -static XFixesExtDisplayInfo * -XFixesExtAddDisplay (XFixesExtInfo *extinfo, - Display *dpy, - char *ext_name) -{ - XFixesExtDisplayInfo *info; - int ev; - - info = (XFixesExtDisplayInfo *) Xmalloc (sizeof (XFixesExtDisplayInfo)); - if (!info) return NULL; - info->display = dpy; - - info->codes = XInitExtension (dpy, ext_name); - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (info->codes) { - xXFixesQueryVersionReply rep; - xXFixesQueryVersionReq *req; - XESetCloseDisplay (dpy, info->codes->extension, - XFixesCloseDisplay); - for (ev = info->codes->first_event; - ev < info->codes->first_event + XFixesNumberEvents; - ev++) - { - XESetWireToEvent (dpy, ev, XFixesWireToEvent); - XESetEventToWire (dpy, ev, XFixesEventToWire); - } - /* - * Get the version info - */ - LockDisplay (dpy); - GetReq (XFixesQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xfixesReqType = X_XFixesQueryVersion; - req->majorVersion = XFIXES_MAJOR; - req->minorVersion = XFIXES_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - info->major_version = rep.majorVersion; - info->minor_version = rep.minorVersion; - UnlockDisplay (dpy); - } else { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(info); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, XFixesCloseDisplay); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - info->next = extinfo->head; - extinfo->head = info; - extinfo->cur = info; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return info; -} - - -/* - * XFixesExtRemoveDisplay - remove the indicated display from the - * extension object. (Replaces XextRemoveDisplay.) - */ -static int -XFixesExtRemoveDisplay (XFixesExtInfo *extinfo, Display *dpy) -{ - XFixesExtDisplayInfo *info, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) break; - prev = info; - } - if (!info) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = info->next; - else - extinfo->head = info->next; - - extinfo->ndisplays--; - if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) info); - return 1; -} - -/* - * XFixesExtFindDisplay - look for a display in this extension; keeps a - * cache of the most-recently used for efficiency. (Replaces - * XextFindDisplay.) - */ -static XFixesExtDisplayInfo * -XFixesExtFindDisplay (XFixesExtInfo *extinfo, - Display *dpy) -{ - XFixesExtDisplayInfo *info; - - /* - * see if this was the most recently accessed display - */ - if ((info = extinfo->cur) && info->display == dpy) - return info; - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) { - extinfo->cur = info; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return info; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - -XFixesExtDisplayInfo * -XFixesFindDisplay (Display *dpy) -{ - XFixesExtDisplayInfo *info; - - info = XFixesExtFindDisplay (&XFixesExtensionInfo, dpy); - if (!info) - info = XFixesExtAddDisplay (&XFixesExtensionInfo, dpy, - XFixesExtensionName); - return info; -} - -static int -XFixesCloseDisplay (Display *dpy, XExtCodes *codes) -{ - return XFixesExtRemoveDisplay (&XFixesExtensionInfo, dpy); -} - -static Bool -XFixesWireToEvent(Display *dpy, XEvent *event, xEvent *wire) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay(dpy); - - XFixesCheckExtension(dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case XFixesSelectionNotify: { - XFixesSelectionNotifyEvent *aevent; - xXFixesSelectionNotifyEvent *awire; - awire = (xXFixesSelectionNotifyEvent *) wire; - aevent = (XFixesSelectionNotifyEvent *) event; - aevent->type = awire->type & 0x7F; - aevent->subtype = awire->subtype; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->window = awire->window; - aevent->owner = awire->owner; - aevent->selection = awire->selection; - aevent->timestamp = awire->timestamp; - aevent->selection_timestamp = awire->selectionTimestamp; - return True; - } - case XFixesCursorNotify: { - XFixesCursorNotifyEvent *aevent; - xXFixesCursorNotifyEvent *awire; - awire = (xXFixesCursorNotifyEvent *) wire; - aevent = (XFixesCursorNotifyEvent *) event; - aevent->type = awire->type & 0x7F; - aevent->subtype = awire->subtype; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->window = awire->window; - aevent->cursor_serial = awire->cursorSerial; - aevent->timestamp = awire->timestamp; - aevent->cursor_name = awire->name; - return True; - } - } - return False; -} - -static Status -XFixesEventToWire(Display *dpy, XEvent *event, xEvent *wire) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay(dpy); - - XFixesCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case XFixesSelectionNotify: { - XFixesSelectionNotifyEvent *aevent; - xXFixesSelectionNotifyEvent *awire; - awire = (xXFixesSelectionNotifyEvent *) wire; - aevent = (XFixesSelectionNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->subtype = aevent->subtype; - awire->window = aevent->window; - awire->owner = aevent->owner; - awire->selection = aevent->selection; - awire->timestamp = aevent->timestamp; - awire->selectionTimestamp = aevent->selection_timestamp; - return True; - } - case XFixesCursorNotify: { - XFixesCursorNotifyEvent *aevent; - xXFixesCursorNotifyEvent *awire; - awire = (xXFixesCursorNotifyEvent *) wire; - aevent = (XFixesCursorNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->subtype = aevent->subtype; - awire->window = aevent->window; - awire->timestamp = aevent->timestamp; - awire->cursorSerial = aevent->cursor_serial; - awire->name = aevent->cursor_name; - } - } - return False; -} - -Bool -XFixesQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - - if (XFixesHasExtension(info)) - { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } - else - return False; -} - -Status -XFixesQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy); - - XFixesCheckExtension (dpy, info, 0); - - *major_versionp = info->major_version; - *minor_versionp = info->minor_version; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -int -XFixesVersion (void) -{ - return XFIXES_VERSION; -} diff --git a/nx-X11/lib/Xfixes/Xfixes.h b/nx-X11/lib/Xfixes/Xfixes.h deleted file mode 100644 index 4cba47ca4..000000000 --- a/nx-X11/lib/Xfixes/Xfixes.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/Xfixes.h,v 1.1 2002/11/30 06:21:45 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XFIXES_H_ -#define _XFIXES_H_ - -#include - -#include - -/* - * This revision number also appears in configure.ac, they have - * to be manually synchronized - */ -#define XFIXES_REVISION 1 -#define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION)) - -typedef struct { - int type; /* event base */ - unsigned long serial; - Bool send_event; - Display *display; - Window window; - int subtype; - Window owner; - Atom selection; - Time timestamp; - Time selection_timestamp; -} XFixesSelectionNotifyEvent; - -typedef struct { - int type; /* event base */ - unsigned long serial; - Bool send_event; - Display *display; - Window window; - int subtype; - unsigned long cursor_serial; - Time timestamp; - Atom cursor_name; -} XFixesCursorNotifyEvent; - -typedef struct { - short x, y; - unsigned short width, height; - unsigned short xhot, yhot; - unsigned long cursor_serial; - unsigned long *pixels; -#if XFIXES_MAJOR >= 2 - Atom atom; /* Version >= 2 only */ - const char *name; /* Version >= 2 only */ -#endif -} XFixesCursorImage; - -#if XFIXES_MAJOR >= 2 -/* Version 2 types */ - -typedef XID XserverRegion; - -typedef struct { - short x, y; - unsigned short width, height; - unsigned short xhot, yhot; - unsigned long cursor_serial; - unsigned long *pixels; - Atom atom; - const char *name; -} XFixesCursorImageAndName; - -#endif - -_XFUNCPROTOBEGIN - -Bool XFixesQueryExtension (Display *dpy, int *event_basep, int *error_basep); -Status XFixesQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -int XFixesVersion (void); - -void -XFixesChangeSaveSet (Display *dpy, - Window win, - int mode, - int target, - int map); - -void -XFixesSelectSelectionInput (Display *dpy, - Window win, - Atom selection, - unsigned long eventMask); - -void -XFixesSelectCursorInput (Display *dpy, - Window win, - unsigned long eventMask); - -XFixesCursorImage * -XFixesGetCursorImage (Display *dpy); - -#if XFIXES_MAJOR >= 2 -/* Version 2 functions */ - -XserverRegion -XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles); - -XserverRegion -XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap); - -XserverRegion -XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind); - -XserverRegion -XFixesCreateRegionFromGC (Display *dpy, GC gc); - -XserverRegion -XFixesCreateRegionFromPicture (Display *dpy, XID picture); - -void -XFixesDestroyRegion (Display *dpy, XserverRegion region); - -void -XFixesSetRegion (Display *dpy, XserverRegion region, - XRectangle *rectangles, int nrectangles); - -void -XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src); - -void -XFixesUnionRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2); - -void -XFixesIntersectRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2); - -void -XFixesSubtractRegion (Display *dpy, XserverRegion dst, - XserverRegion src1, XserverRegion src2); - -void -XFixesInvertRegion (Display *dpy, XserverRegion dst, - XRectangle *rect, XserverRegion src); - -void -XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy); - -void -XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src); - -XRectangle * -XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet); - -XRectangle * -XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region, - int *nrectanglesRet, - XRectangle *bounds); - -void -XFixesSetGCClipRegion (Display *dpy, GC gc, - int clip_x_origin, int clip_y_origin, - XserverRegion region); - -void -XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind, - int x_off, int y_off, XserverRegion region); - -void -XFixesSetPictureClipRegion (Display *dpy, XID picture, - int clip_x_origin, int clip_y_origin, - XserverRegion region); - -void -XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name); - -const char * -XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom); - -void -XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination); - -void -XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name); - -#endif /* XFIXES_MAJOR >= 2 */ - -#if XFIXES_MAJOR >= 3 - -void -XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src, - unsigned left, unsigned right, - unsigned top, unsigned bottom); - -#endif /* XFIXES_MAJOR >= 3 */ - -_XFUNCPROTOEND - -#endif /* _XFIXES_H_ */ diff --git a/nx-X11/lib/Xfixes/Xfixes.man b/nx-X11/lib/Xfixes/Xfixes.man deleted file mode 100644 index 563db15b5..000000000 --- a/nx-X11/lib/Xfixes/Xfixes.man +++ /dev/null @@ -1,76 +0,0 @@ -.\" -.\" $XFree86: xc/lib/Xfixes/Xfixes.man,v 1.1 2002/11/30 06:21:45 keithp Exp $ -.\" -.\" Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and its -.\" documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in -.\" advertising or publicity pertaining to distribution of the software without -.\" specific, written prior permission. Keith Packard makes no -.\" representations about the suitability of this software for any purpose. It -.\" is provided "as is" without express or implied warranty. -.\" -.\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -.\" EVENT SHALL KEITH PACKARD 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. -.\" -.de TQ -.br -.ns -.TP \\$1 -.. -.TH XFIXES 3 "Version 1.0" "XFree86" - -.SH NAME -XFixes \- Augmented versions of core protocol requests -.SH SYNTAX -\&#include -.nf -.sp -Bool XFixesQueryExtension \^(\^Display *\fIdpy\fP, - int *\fIevent_basep\fP, int *\fIerror_basep\fP\^); -.sp -Status XFixesQueryVersion \^(\^Display *\fIdpy\fP, - int *\fImajor_versionp\fP, - int *\fIminor_versionp\fP\^); -.sp -void XFixesChangeSaveSet \^(\^Display *dpy, - Window \fIwindow\fP, - int \fImode\fP, - int \fItarget\fP, - int \fImap\fP); -.fi -.SH ARGUMENTS -.IP \fIdisplay\fP 1i -Specifies the connection to the X server. -.IP \fIwindow\fP 1i -Specifies which window. -.IP \fImode\fP 1i -Specifies the save set operation (SetModeInsert/SetModeDelete). -.IP \fItarget\fP 1i -Specifies the target when executing the save set -(SaveSetNearest/SaveSetRoot). In SaveSetNearest mode, the save set member -window will be reparented to the nearest window not owned by the save set -client. In SaveSetRoot mode, the save set member window will be reparented -to the root window. -.IP \fImap\fP 1i -Specifies the map mode (SaveSetMap/SaveSetUnmap) which selects whether the -save setmember window will be mapped or unmapped during save set processing. -.SH DESCRIPTION -.B Xfixes -is a simple library designed to interface the X Fixes -Extension. This extension provides application with work arounds for -various limitations in the core protocol. -.SH RESTRICTIONS -.B Xfixes -will remain upward compatible after the current 1.0 release. -.SH AUTHORS -Keith Packard, member of the XFree86 Project, Inc. and -HP, Owen Taylor, member of the Gnome Foundation and Redhat, Inc. diff --git a/nx-X11/lib/Xfixes/Xfixesint.h b/nx-X11/lib/Xfixes/Xfixesint.h deleted file mode 100644 index 353dcae77..000000000 --- a/nx-X11/lib/Xfixes/Xfixesint.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $XFree86: xc/lib/Xfixes/Xfixesint.h,v 1.1 2002/11/30 06:21:45 keithp Exp $ - * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifndef _XFIXESINT_H_ -#define _XFIXESINT_H_ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include -#include "Xfixes.h" -#include - -extern char XFixesExtensionName[]; - -typedef struct _XFixesExtDisplayInfo { - struct _XFixesExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - int major_version; /* -1 means we don't know */ - int minor_version; /* -1 means we don't know */ -} XFixesExtDisplayInfo; - -/* replaces XExtensionInfo */ -typedef struct _XFixesExtInfo { - XFixesExtDisplayInfo *head; /* start of the list */ - XFixesExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XFixesExtInfo; - -extern XFixesExtInfo XFixesExtensionInfo; -extern char XFixesExtensionName[]; - -XFixesExtDisplayInfo * -XFixesFindDisplay (Display *dpy); - -#define XFixesHasExtension(i) ((i) && ((i)->codes)) - -#define XFixesCheckExtension(dpy,i,val) \ - if (!XFixesHasExtension(i)) { return val; } - -#define XFixesSimpleCheckExtension(dpy,i) \ - if (!XFixesHasExtension(i)) { return; } - -#endif /* _XFIXESINT_H_ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 18e0d47f2..93a676390 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -402,17 +402,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ + -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lXfixes -lXfont \ -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lNX_Xfixes -lXfont \ + -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lXdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ + -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-libs.spec b/nx-libs.spec index af9753fdd..b0f2abce7 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -37,6 +37,7 @@ BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xfixes) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -49,6 +50,7 @@ BuildRequires: xorg-x11-libXdmcp-devel BuildRequires: xorg-x11-libXdamage-devel BuildRequires: xorg-x11-libXcomposite-devel BuildRequires: xorg-x11-libXrandr-devel +BuildRequires: xorg-x11-libXfixes-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -61,6 +63,7 @@ BuildRequires: libXfont-devel BuildRequires: libXdmcp-devel BuildRequires: libXcomposite-devel BuildRequires: libXrandr-devel +BuildRequires: libXfixes-devel %endif # For imake @@ -238,40 +241,6 @@ The NX_Xext library contains a handful of X11 extensions: - X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) -%package -n libNX_Xfixes-devel -Group: Development/Libraries -Summary: Development files for the NX Xfixes extension library -Requires: libNX_Xfixes3%{?_isa} = %{version}-%{release} -Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} -Requires: nx-proto-devel%{?_isa} = %{version}-%{release} - -%description -n libNX_Xfixes-devel -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The nx-X11 Fixes extension provides applications with work-arounds for -various limitations in the core protocol. - -This package contains all necessary include files and libraries -needed to develop applications that require these. - - -%package -n libNX_Xfixes3 -Group: System Environment/Libraries -Summary: NX miscellaneous "fixes" extension library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xfixes - -%description -n libNX_Xfixes3 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The nx_X11 Fixes extension provides applications with work-arounds for -various limitations in the core protocol. - - %package -n libNX_Xinerama1 Group: System Environment/Libraries Summary: Xinerama extension to the NX Protocol @@ -437,7 +406,6 @@ Summary: Include files and libraries for NX development Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xau-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xfixes-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xrender-devel%{?_isa} = %{version}-%{release} Requires: nx-proto-devel%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -619,7 +587,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -n libNX_X11-6 -p /sbin/ldconfig %post -n libNX_Xau6 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig -%post -n libNX_Xfixes3 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig %post -n libNX_Xrender1 -p /sbin/ldconfig %post -n libNX_Xtst6 -p /sbin/ldconfig @@ -630,7 +597,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -n libNX_X11-6 -p /sbin/ldconfig %postun -n libNX_Xau6 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig -%postun -n libNX_Xfixes3 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig %postun -n libNX_Xrender1 -p /sbin/ldconfig %postun -n libNX_Xtst6 -p /sbin/ldconfig @@ -712,15 +678,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xext.so.6* -%files -n libNX_Xfixes-devel -%defattr(-,root,root) -%{_libdir}/libNX_Xfixes.so -%{_includedir}/nx-X11/extensions/Xfixes.h - -%files -n libNX_Xfixes3 -%defattr(-,root,root) -%{_libdir}/libNX_Xfixes.so.3* - %files -n libNX_Xinerama1 %defattr(-,root,root) %{_libdir}/libNX_Xinerama.so.1* -- cgit v1.2.3 From b768e8124b8c76a7617a51fee56bc85c1d54e8c5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 29 Dec 2015 17:34:36 +0100 Subject: Fix for too overall Xdamage and Xrandr client lib removal: Bring back the nx-x11proto-{randr,damage} header files and use those at compile time. --- debian/nx-x11proto-damage-dev.install.in | 2 + debian/nx-x11proto-randr-dev.install.in | 2 + nx-X11/include/extensions/Imakefile | 8 ++ nx-X11/include/extensions/damageproto.h | 149 ++++++++++++++++++++++ nx-X11/include/extensions/damagewire.h | 57 +++++++++ nx-X11/include/extensions/randr.h | 74 +++++++++++ nx-X11/include/extensions/randrproto.h | 209 +++++++++++++++++++++++++++++++ nx-libs.spec | 4 + 8 files changed, 505 insertions(+) create mode 100644 debian/nx-x11proto-damage-dev.install.in create mode 100644 debian/nx-x11proto-randr-dev.install.in create mode 100644 nx-X11/include/extensions/damageproto.h create mode 100644 nx-X11/include/extensions/damagewire.h create mode 100644 nx-X11/include/extensions/randr.h create mode 100644 nx-X11/include/extensions/randrproto.h (limited to 'debian') diff --git a/debian/nx-x11proto-damage-dev.install.in b/debian/nx-x11proto-damage-dev.install.in new file mode 100644 index 000000000..1503260cf --- /dev/null +++ b/debian/nx-x11proto-damage-dev.install.in @@ -0,0 +1,2 @@ +usr/include/*/nx-X11/extensions/damagewire.h +usr/include/*/nx-X11/extensions/damageproto.h diff --git a/debian/nx-x11proto-randr-dev.install.in b/debian/nx-x11proto-randr-dev.install.in new file mode 100644 index 000000000..3b30f71d0 --- /dev/null +++ b/debian/nx-x11proto-randr-dev.install.in @@ -0,0 +1,2 @@ +usr/include/*/nx-X11/extensions/randr.h +usr/include/*/nx-X11/extensions/randrproto.h diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index c31e8531f..04c13cdb5 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -38,6 +38,9 @@ FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h #if BuildXinerama || BuildXineramaLibrary XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h #endif +#if BuildRandR +RANDRHEADERS = randr.h randrproto.h +#endif #if BuildRender RENDERHEADERS = render.h renderproto.h #endif @@ -47,6 +50,9 @@ XFIXESHEADERS = xfixeswire.h xfixesproto.h #if BuildComposite COMPOSITEHEADERS = composite.h compositeproto.h #endif +#if BuildDamage +DAMAGEHEADERS = damagewire.h damageproto.h +#endif #if BuildXTrap XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ xtraplibp.h xtrapproto.h @@ -69,9 +75,11 @@ EXTRAHEADERS = \ $(XVHEADERS) \ $(XVMCHEADERS) \ $(FONTCACHEHEADERS) \ + $(RANDRHEADERS) \ $(RENDERHEADERS) \ $(XFIXESHEADERS) \ $(COMPOSITEHEADERS) \ + $(DAMAGEHEADERS) \ $(XEVIEHEADERS) \ $(XTRAPHEADERS) \ $(XRESHEADERS) \ diff --git a/nx-X11/include/extensions/damageproto.h b/nx-X11/include/extensions/damageproto.h new file mode 100644 index 000000000..b190d68c7 --- /dev/null +++ b/nx-X11/include/extensions/damageproto.h @@ -0,0 +1,149 @@ +/* + * $Id: damageproto.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _DAMAGEPROTO_H_ +#define _DAMAGEPROTO_H_ + +#include +#include +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 +#define Region CARD32 +#define Damage CARD32 + +/************** Version 0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; +} xDamageReq; + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDamageQueryVersionReq; + +#define sz_xDamageQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDamageQueryVersionReply; + +#define sz_xDamageQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Drawable drawable B32; + CARD8 level; + CARD8 pad1; + CARD16 pad2 B16; +} xDamageCreateReq; + +#define sz_xDamageCreateReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; +} xDamageDestroyReq; + +#define sz_xDamageDestroyReq 8 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Region repair B32; + Region parts B32; +} xDamageSubtractReq; + +#define sz_xDamageSubtractReq 16 + +/* Events */ + +#define DamageNotifyMore 0x80 + +typedef struct { + CARD8 type; + CARD8 level; + CARD16 sequenceNumber B16; + Drawable drawable B32; + Damage damage B32; + Time timestamp B32; + xRectangle area; + xRectangle geometry; +} xDamageNotifyEvent; + +#undef Damage +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _DAMAGEPROTO_H_ */ diff --git a/nx-X11/include/extensions/damagewire.h b/nx-X11/include/extensions/damagewire.h new file mode 100644 index 000000000..d523cea98 --- /dev/null +++ b/nx-X11/include/extensions/damagewire.h @@ -0,0 +1,57 @@ +/* + * $Id: damagewire.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _DAMAGEWIRE_H_ +#define _DAMAGEWIRE_H_ + +#define DAMAGE_NAME "DAMAGE" +#define DAMAGE_MAJOR 1 +#define DAMAGE_MINOR 0 + +/************* Version 1 ****************/ + +/* Constants */ +#define XDamageReportRawRectangles 0 +#define XDamageReportDeltaRectangles 1 +#define XDamageReportBoundingBox 2 +#define XDamageReportNonEmpty 3 + +/* Requests */ +#define X_DamageQueryVersion 0 +#define X_DamageCreate 1 +#define X_DamageDestroy 2 +#define X_DamageSubtract 3 + +#define XDamageNumberRequests (X_DamageSubtract + 1) + +/* Events */ +#define XDamageNotify 0 + +#define XDamageNumberEvents (XDamageNotify + 1) + +/* Errors */ +#define BadDamage 0 +#define XDamageNumberErrors (BadDamage + 1) + +#endif /* _DAMAGEWIRE_H_ */ diff --git a/nx-X11/include/extensions/randr.h b/nx-X11/include/extensions/randr.h new file mode 100644 index 000000000..864ddd4fa --- /dev/null +++ b/nx-X11/include/extensions/randr.h @@ -0,0 +1,74 @@ +/* + * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ + * + * Copyright © 2000, Compaq Computer Corporation, + * Copyright © 2002, Hewlett Packard, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. HP makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP + * 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. + * + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + */ + +#ifndef _RANDR_H_ +#define _RANDR_H_ + +typedef unsigned short Rotation; +typedef unsigned short SizeID; +typedef unsigned short SubpixelOrder; + +#define RANDR_NAME "RANDR" +#define RANDR_MAJOR 1 +#define RANDR_MINOR 1 + +#define RRNumberErrors 0 +#define RRNumberEvents 1 + +#define X_RRQueryVersion 0 +/* we skip 1 to make old clients fail pretty immediately */ +#define X_RROldGetScreenInfo 1 +#define X_RR1_0SetScreenConfig 2 +/* V1.0 apps share the same set screen config request id */ +#define X_RRSetScreenConfig 2 +#define X_RROldScreenChangeSelectInput 3 +/* 3 used to be ScreenChangeSelectInput; deprecated */ +#define X_RRSelectInput 4 +#define X_RRGetScreenInfo 5 + +/* used in XRRSelectInput */ + +#define RRScreenChangeNotifyMask (1L << 0) + +#define RRScreenChangeNotify 0 + +/* used in the rotation field; rotation and reflection in 0.1 proto. */ +#define RR_Rotate_0 1 +#define RR_Rotate_90 2 +#define RR_Rotate_180 4 +#define RR_Rotate_270 8 + +/* new in 1.0 protocol, to allow reflection of screen */ + +#define RR_Reflect_X 16 +#define RR_Reflect_Y 32 + +#define RRSetConfigSuccess 0 +#define RRSetConfigInvalidConfigTime 1 +#define RRSetConfigInvalidTime 2 +#define RRSetConfigFailed 3 + +#endif /* _RANDR_H_ */ diff --git a/nx-X11/include/extensions/randrproto.h b/nx-X11/include/extensions/randrproto.h new file mode 100644 index 000000000..04d62fc04 --- /dev/null +++ b/nx-X11/include/extensions/randrproto.h @@ -0,0 +1,209 @@ +/* + * $XFree86: xc/include/extensions/randrproto.h,v 1.6 2002/09/29 23:39:43 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation + * Copyright © 2002 Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq and HP makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * 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. + * + * Author: Jim Gettys, Hewlett-Packard Company, Inc. + */ + +/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ +/* V1.0 removes depth switching from the protocol */ +#ifndef _XRANDRP_H_ +#define _XRANDRP_H_ + +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define Rotation CARD16 +#define SizeID CARD16 +#define SubpixelOrder CARD16 + +/* + * data structures + */ + +typedef struct { + CARD16 widthInPixels B16; + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; +} xScreenSizes; +#define sz_xScreenSizes 8 + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xRRQueryVersionReq; +#define sz_xRRQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRQueryVersionReply; +#define sz_xRRQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetScreenInfoReq; +#define sz_xRRGetScreenInfoReq 8 + +/* + * the xRRScreenInfoReply structure is followed by: + * + * the size information + */ + + +typedef struct { + BYTE type; /* X_Reply */ + BYTE setOfRotations; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window root B32; + Time timestamp B32; + Time configTimestamp B32; + CARD16 nSizes B16; + SizeID sizeID B16; + Rotation rotation B16; + CARD16 rate B16; + CARD16 nrateEnts B16; + CARD16 pad B16; +} xRRGetScreenInfoReply; +#define sz_xRRGetScreenInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; + Rotation rotation B16; +} xRR1_0SetScreenConfigReq; +#define sz_xRR1_0SetScreenConfigReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; + Rotation rotation B16; + CARD16 rate B16; + CARD16 pad B16; +} xRRSetScreenConfigReq; +#define sz_xRRSetScreenConfigReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time newTimestamp B32; + Time newConfigTimestamp B32; + Window root; + CARD16 subpixelOrder B16; + CARD16 pad4 B16; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRSetScreenConfigReply; +#define sz_xRRSetScreenConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + CARD16 enable B16; + CARD16 pad2 B16; +} xRRSelectInputReq; +#define sz_xRRSelectInputReq 12 + +#define sz_xRRSelectInputReq 12 + +/* + * event + */ +typedef struct { + CARD8 type; /* always evBase + ScreenChangeNotify */ + CARD8 rotation; /* new rotation */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time screen was changed */ + Time configTimestamp B32; /* time config data was changed */ + Window root B32; /* root window */ + Window window B32; /* window requesting notification */ + SizeID sizeID B16; /* new size ID */ + CARD16 subpixelOrder B16; /* subpixel order */ + CARD16 widthInPixels B16; /* new size */ + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; +} xRRScreenChangeNotifyEvent; +#define sz_xRRScreenChangeNotifyEvent 32 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef Time +#undef KeyCode +#undef KeySym +#undef Rotation +#undef SizeID +#undef SubpixelOrder + +#endif /* _XRANDRP_H_ */ diff --git a/nx-libs.spec b/nx-libs.spec index b0f2abce7..abe41d160 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -803,7 +803,11 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx-X11/extensions/bigreqstr.h %{_includedir}/nx-X11/extensions/composite.h %{_includedir}/nx-X11/extensions/compositeproto.h +%{_includedir}/nx-X11/extensions/damagewire.h +%{_includedir}/nx-X11/extensions/damageproto.h %{_includedir}/nx-X11/extensions/panoramiXproto.h +%{_includedir}/nx-X11/extensions/randr.h +%{_includedir}/nx-X11/extensions/randrproto.h %{_includedir}/nx-X11/extensions/recordstr.h %{_includedir}/nx-X11/extensions/render.h %{_includedir}/nx-X11/extensions/renderproto.h -- cgit v1.2.3 From bd592c2e7edb7cd3dd06dd6c13b559bd6c498596 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 21 Jun 2015 18:12:11 +0200 Subject: library clean-up: Don't build libNX_Xtst anymore. Use system's libXtst shared library. (Fixes ArcticaProject/nx-libs#32). --- debian/control | 43 +- debian/libnx-xtst-dev.install.in | 2 - debian/libnx-xtst6.install.in | 1 - debian/libnx-xtst6.symbols | 30 - debian/nx-x11proto-xext-dev.install.in | 1 + nx-X11/config/cf/README | 6 - nx-X11/config/cf/X11.tmpl | 22 - nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/extensions/XTest.h | 164 ---- nx-X11/include/extensions/xtestconst.h | 46 ++ nx-X11/lib/Imakefile | 2 - nx-X11/lib/Xtst/Imakefile | 32 - nx-X11/lib/Xtst/XRecord.c | 1075 ------------------------- nx-X11/lib/Xtst/XTest.c | 498 ------------ nx-X11/lib/Xtst/Xtst-def.cpp | 32 - nx-X11/programs/Xserver/Imakefile | 6 +- nx-X11/programs/Xserver/Xext/extmod/modinit.h | 2 +- nx-X11/programs/Xserver/Xext/xtest.c | 2 +- nx-X11/programs/Xserver/mi/miinitext.c | 2 +- nx-libs.spec | 38 +- nxcompshad/Makefile.in | 2 +- nxcompshad/X11.cpp | 2 +- nxcompshad/X11/include/XTest_nxcompshad.h | 71 ++ 23 files changed, 147 insertions(+), 1934 deletions(-) delete mode 100644 debian/libnx-xtst-dev.install.in delete mode 100644 debian/libnx-xtst6.install.in delete mode 100644 debian/libnx-xtst6.symbols delete mode 100644 nx-X11/include/extensions/XTest.h create mode 100644 nx-X11/include/extensions/xtestconst.h delete mode 100644 nx-X11/lib/Xtst/Imakefile delete mode 100644 nx-X11/lib/Xtst/XRecord.c delete mode 100644 nx-X11/lib/Xtst/XTest.c delete mode 100644 nx-X11/lib/Xtst/Xtst-def.cpp create mode 100644 nxcompshad/X11/include/XTest_nxcompshad.h (limited to 'debian') diff --git a/debian/control b/debian/control index 102d1535b..946dd4b2a 100644 --- a/debian/control +++ b/debian/control @@ -21,12 +21,12 @@ Build-Depends: libxcomposite-dev, libxrandr-dev, libxfixes-dev, + libxtst-dev, autoconf, pkg-config, x11proto-core-dev, expat, Build-Conflicts: - x11proto-record-dev, x11proto-xinerama-dev, Standards-Version: 3.9.6 Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary @@ -851,20 +851,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Testing -- Record extension library +Description: nx-X11 Testing -- Record extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xtst provides an X Window System client interface to the Record - extension to the X protocol. + This package removes the obsoleted libNX_Xtst.so.6 library. With + recent versions of NX, the system-wide installed libXtst gets used. . - The Record extension allows X clients to synthesise input events, which - is useful for automated testing. + This package can be safely removed. Package: libnx-xtst-dev Provides: libnx-xtst6-dev @@ -872,22 +868,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xtst6 (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Testing -- Record extension library (development headers) +Description: nx-X11 Testing -- Record extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xtst provides an X Window System client interface to the Record - extension to the X protocol. - . - The Record extension allows X clients to synthesise input events, which - is useful for automated testing. + This package removes the obsoleted headers for the libNX_Xtst.so.6 + library. With recent versions of NX, the system-wide installed libXtst + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: libnx-xtst6-dbg Architecture: any @@ -895,22 +886,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xtst6 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Testing -- Record extension library (debug package) +Description: nx-X11 Testing -- Record extension library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xtst provides an X Window System client interface to the Record - extension to the X protocol. - . - The Record extension allows X clients to synthesise input events, which - is useful for automated testing. + This package removes the obsoleted wire protocol headers for the + libNX_Xtst.so.6 library. With recent versions of NX, the system-wide + installed libXtst gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-mesa-extras-dev Section: libdevel diff --git a/debian/libnx-xtst-dev.install.in b/debian/libnx-xtst-dev.install.in deleted file mode 100644 index 5acca96cf..000000000 --- a/debian/libnx-xtst-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xtst.so -usr/include/*/nx-X11/extensions/XTest.h diff --git a/debian/libnx-xtst6.install.in b/debian/libnx-xtst6.install.in deleted file mode 100644 index 85350d830..000000000 --- a/debian/libnx-xtst6.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xtst.so.* diff --git a/debian/libnx-xtst6.symbols b/debian/libnx-xtst6.symbols deleted file mode 100644 index a3f9bcc2d..000000000 --- a/debian/libnx-xtst6.symbols +++ /dev/null @@ -1,30 +0,0 @@ -libNX_Xtst.so.6 libnx-xtst6 #MINVER# - XRecordAllocRange@Base 3.5.0.29 - XRecordCreateContext@Base 3.5.0.29 - XRecordDisableContext@Base 3.5.0.29 - XRecordEnableContext@Base 3.5.0.29 - XRecordEnableContextAsync@Base 3.5.0.29 - XRecordFreeContext@Base 3.5.0.29 - XRecordFreeData@Base 3.5.0.29 - XRecordFreeState@Base 3.5.0.29 - XRecordGetContext@Base 3.5.0.29 - XRecordIdBaseMask@Base 3.5.0.29 - XRecordProcessReplies@Base 3.5.0.29 - XRecordQueryVersion@Base 3.5.0.29 - XRecordRegisterClients@Base 3.5.0.29 - XRecordUnregisterClients@Base 3.5.0.29 - XTestCompareCurrentCursorWithWindow@Base 3.5.0.29 - XTestCompareCursorWithWindow@Base 3.5.0.29 - XTestDiscard@Base 3.5.0.29 - XTestFakeButtonEvent@Base 3.5.0.29 - XTestFakeDeviceButtonEvent@Base 3.5.0.29 - XTestFakeDeviceKeyEvent@Base 3.5.0.29 - XTestFakeDeviceMotionEvent@Base 3.5.0.29 - XTestFakeKeyEvent@Base 3.5.0.29 - XTestFakeMotionEvent@Base 3.5.0.29 - XTestFakeProximityEvent@Base 3.5.0.29 - XTestFakeRelativeMotionEvent@Base 3.5.0.29 - XTestGrabControl@Base 3.5.0.29 - XTestQueryExtension@Base 3.5.0.29 - XTestSetGContextOfGC@Base 3.5.0.29 - XTestSetVisualIDOfVisual@Base 3.5.0.29 diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index 0d1f8699b..61829cf29 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -1,4 +1,5 @@ usr/include/*/nx-X11/extensions/xteststr.h +usr/include/*/nx-X11/extensions/xtestconst.h usr/include/*/nx-X11/extensions/shapestr.h usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 66d9639f9..3e1fe95a3 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -196,7 +196,6 @@ X11.tmpl provides defaults for the following variables: DebugLibX11 build libX11_d.a DebugLibXau build libXau_d.a DebugLibXext build libXext_d.a - DebugLibXtst build libXtst_d.a DebugOldX build liboldX_d.a DefaultCursorTheme name of default cursor theme DefaultFontPath default server font path @@ -232,14 +231,12 @@ X11.tmpl provides defaults for the following variables: NormalLibX11 build libX11.a NormalLibXau build libXau.a NormalLibXext build libXext.a - NormalLibXtst build libXtst.a NormalOldX build liboldX.a OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName PrimaryScreenResolution resolution of default server screen ProfileLibX11 build libX11_p.a ProfileLibXau build libXau_p.a ProfileLibXext build libXext_p.a - ProfileLibXtst build libXtst_p.a ProfileOldX build liboldX_p.a ProjectX version indicating this is the X Window System RemoveTargetProgramByMoving boolean for rm -f that doesn't @@ -252,7 +249,6 @@ X11.tmpl provides defaults for the following variables: SharedLibX11 boolean for making sharable libX11.so SharedLibXau boolean for making sharable libXau.so SharedLibXext boolean for making sharable libXext.so - SharedLibXtst boolean for making sharable libXtst.so SharedOldX boolean for making sharable liboldX.so ShmDefines MIT-SHM define TwmDir directory in which to install twm config files @@ -330,8 +326,6 @@ An Lib.tmpl file provides defaults for the following variables: SharedXauRev version number for libXau.so SharedXextReqs required libs for libXext.so SharedXextRev version number for libXext.so - SharedXtstReqs required libs for libXtst.so - SharedXtstRev version number for libXtst.so Vendor.cf files and/or site/host specific .def files may define the following variables: diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index f32cdadbf..af466b47f 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1463,28 +1463,6 @@ SharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev) ProjectUnsharedLibReferences(OLDX,NX_oldX,$(OLDXLIBSRC),XBuildLibDir) #endif -#ifndef SharedLibXtst -#define SharedLibXtst HasSharedLibraries -#endif -#ifndef NormalLibXtst -#define NormalLibXtst (!SharedLibXtst | ForceNormalLib) -#endif -#ifndef DebugLibXtst -#define DebugLibXtst NO /* debugged Xtst library */ -#endif -#ifndef ProfileLibXtst -#define ProfileLibXtst NO /* profiled Xtst library */ -#endif - XTESTLIBSRC = $(LIBSRC)/Xtst -#if SharedLibXtst -#ifndef SharedXtstRev -#define SharedXtstRev 6.1 -#endif -SharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) -#else -ProjectUnsharedLibReferences(XTEST,NX_Xtst,$(XTESTLIBSRC),XBuildLibDir) -#endif - #if HasMotif #ifndef MotifDir diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 04c13cdb5..33e854058 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -91,7 +91,7 @@ HEADERS = Xext.h \ bigreqstr.h \ extutil.h \ XI.h XInput.h XIproto.h \ - XTest.h xtestext1.h xteststr.h \ + xtestconst.h xtestext1.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ Xdbe.h Xdbeproto.h \ Xag.h Xagstr.h Xagsrv.h \ diff --git a/nx-X11/include/extensions/XTest.h b/nx-X11/include/extensions/XTest.h deleted file mode 100644 index 4817ef132..000000000 --- a/nx-X11/include/extensions/XTest.h +++ /dev/null @@ -1,164 +0,0 @@ -/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ -/* - -Copyright 1992, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _XTEST_H_ -#define _XTEST_H_ - -#include - -#define X_XTestGetVersion 0 -#define X_XTestCompareCursor 1 -#define X_XTestFakeInput 2 -#define X_XTestGrabControl 3 - -#define XTestNumberEvents 0 - -#define XTestNumberErrors 0 - -#define XTestMajorVersion 2 -#define XTestMinorVersion 2 - -#define XTestExtensionName "XTEST" - -#ifndef _XTEST_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -Bool XTestQueryExtension( - Display* /* dpy */, - int* /* event_basep */, - int* /* error_basep */, - int* /* majorp */, - int* /* minorp */ -); - -Bool XTestCompareCursorWithWindow( - Display* /* dpy */, - Window /* window */, - Cursor /* cursor */ -); - -Bool XTestCompareCurrentCursorWithWindow( - Display* /* dpy */, - Window /* window */ -); - -extern int XTestFakeKeyEvent( - Display* /* dpy */, - unsigned int /* keycode */, - Bool /* is_press */, - unsigned long /* delay */ -); - -extern int XTestFakeButtonEvent( - Display* /* dpy */, - unsigned int /* button */, - Bool /* is_press */, - unsigned long /* delay */ -); - -extern int XTestFakeMotionEvent( - Display* /* dpy */, - int /* screen */, - int /* x */, - int /* y */, - unsigned long /* delay */ -); - -extern int XTestFakeRelativeMotionEvent( - Display* /* dpy */, - int /* x */, - int /* y */, - unsigned long /* delay */ -); - -extern int XTestFakeDeviceKeyEvent( - Display* /* dpy */, - XDevice* /* dev */, - unsigned int /* keycode */, - Bool /* is_press */, - int* /* axes */, - int /* n_axes */, - unsigned long /* delay */ -); - -extern int XTestFakeDeviceButtonEvent( - Display* /* dpy */, - XDevice* /* dev */, - unsigned int /* button */, - Bool /* is_press */, - int* /* axes */, - int /* n_axes */, - unsigned long /* delay */ -); - -extern int XTestFakeProximityEvent( - Display* /* dpy */, - XDevice* /* dev */, - Bool /* in_prox */, - int* /* axes */, - int /* n_axes */, - unsigned long /* delay */ -); - -extern int XTestFakeDeviceMotionEvent( - Display* /* dpy */, - XDevice* /* dev */, - Bool /* is_relative */, - int /* first_axis */, - int* /* axes */, - int /* n_axes */, - unsigned long /* delay */ -); - -extern int XTestGrabControl( - Display* /* dpy */, - Bool /* impervious */ -); - -void XTestSetGContextOfGC( - GC /* gc */, - GContext /* gid */ -); - -void XTestSetVisualIDOfVisual( - Visual* /* visual */, - VisualID /* visualid */ -); - -Status XTestDiscard( - Display* /* dpy */ -); - -_XFUNCPROTOEND - -#endif /* _XTEST_SERVER_ */ - -#endif diff --git a/nx-X11/include/extensions/xtestconst.h b/nx-X11/include/extensions/xtestconst.h new file mode 100644 index 000000000..4f69966a4 --- /dev/null +++ b/nx-X11/include/extensions/xtestconst.h @@ -0,0 +1,46 @@ +/* + +Copyright 1992, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +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 +OPEN GROUP 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 Open Group 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 Open Group. + +*/ + +#ifndef _XTEST_H_ +#define _XTEST_H_ + +#include + +#define X_XTestGetVersion 0 +#define X_XTestCompareCursor 1 +#define X_XTestFakeInput 2 +#define X_XTestGrabControl 3 + +#define XTestNumberEvents 0 + +#define XTestNumberErrors 0 + +#define XTestMajorVersion 2 +#define XTestMinorVersion 2 + +#define XTestExtensionName "XTEST" + +#endif diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 7cfffa6d9..b97ef6b22 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -37,7 +37,6 @@ XEXTLIBDIR = Xext #if BuildLibraries OLDXLIBDIR = oldX -XTSTLIBDIR = Xtst #endif @@ -46,7 +45,6 @@ LINTSUBDIRS = \ $(X11LIBDIR) \ $(OLDXLIBDIR) \ $(XEXTLIBDIR) \ - $(XTSTLIBDIR) \ $(XKBLIBDIR) \ $(XINERAMADIR) \ $(RENDERLIBDIR) \ diff --git a/nx-X11/lib/Xtst/Imakefile b/nx-X11/lib/Xtst/Imakefile deleted file mode 100644 index f32129436..000000000 --- a/nx-X11/lib/Xtst/Imakefile +++ /dev/null @@ -1,32 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/lib/Xtst/Imakefile,v 1.2 1998/12/20 11:57:12 dawes Exp $ - -#define DoNormalLib NormalLibXtst -#define DoSharedLib SharedLibXtst -#define DoExtraLib SharedLibXtst -#define DoDebugLib DebugLibXtst -#define DoProfileLib ProfileLibXtst -#define LibName NX_Xtst -#define SoRev SOXTESTREV -#define LibHeaders NO - -#include - -#ifdef SharedXtstReqs -REQUIREDLIBS = SharedXtstReqs -#endif - -INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) - -SRCS = XTest.c XRecord.c -OBJS = XTest.o XRecord.o - -LINTLIBS = $(LINTXLIB) - -#include - -DependTarget() diff --git a/nx-X11/lib/Xtst/XRecord.c b/nx-X11/lib/Xtst/XRecord.c deleted file mode 100644 index 8e1823ef9..000000000 --- a/nx-X11/lib/Xtst/XRecord.c +++ /dev/null @@ -1,1075 +0,0 @@ -/* -$Xorg: XRecord.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ - -XRecord.c - client-side library for RECORD extension - -Copyright 1995, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/*************************************************************************** - * Copyright 1995 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. - **************************************************************************/ -/* - * By Stephen Gildea, X Consortium, and Martha Zimet, NCD. - */ -/* $XFree86: xc/lib/Xtst/XRecord.c,v 1.6 2002/10/16 00:37:33 dawes Exp $ */ - -#include -#include -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -static XExtensionInfo _xrecord_info_data; -static XExtensionInfo *xrecord_info = &_xrecord_info_data; -static /* const */ char *xrecord_extension_name = RECORD_NAME; - -#define XRecordCheckExtension(dpy,i,val) \ - XextCheckExtension(dpy, i, xrecord_extension_name, val) - -/************************************************************************** - * * - * private utility routines * - * * - **************************************************************************/ - -static XExtDisplayInfo *find_display(); - -/* - * A reply buffer holds a reply from RecordEnableContext. - * Pieces of that buffer are passed to the XRecordEnableContext callback. - * ref_count is incremented each time we do that. - * ref_count is decremented each time XRecordFreeData is called on - * the buffer. When ref_count is 0, we can free or reuse the buffer. - */ -struct reply_buffer -{ - struct reply_buffer *next; /* next in list or NULL */ - unsigned char *buf; /* pointer to malloc'd buffer */ - int nbytes; /* size of buf */ - int ref_count; /* callback uses pending */ -}; - - -/* - * There's some extra information the implementation finds useful - * to attach to an XRecordInterceptData packet to handle memory - * management. So we really allocate one of these. - */ -struct intercept_queue -{ - /* this struct gets passed to the user as an XRecordInterceptData, - so the data field must come first so we can cast the address - back and forth */ - XRecordInterceptData data; - struct intercept_queue *next; /* next in free list or NULL */ - struct mem_cache_str *cache; /* contains head of free list */ -}; - -/* - * per-display pointers to cache of malloc'd but unused memory - */ -struct mem_cache_str -{ - struct intercept_queue *inter_data; /* free structs only */ - struct reply_buffer *reply_buffers; /* all reply buffers */ - int inter_data_count; /* total allocated, free and in use */ - Bool display_closed; /* so we know when to free ourself */ -}; - -static int close_display(dpy, codes) - Display *dpy; - XExtCodes *codes; /* not used */ -{ - XExtDisplayInfo *info = find_display (dpy); - - LockDisplay(dpy); - if (info && info->data) { - struct mem_cache_str *cache = (struct mem_cache_str *)info->data; - struct intercept_queue *iq, *iq_next; - struct reply_buffer *rbp, **rbp_next_p; - - for (iq=cache->inter_data; iq; iq=iq_next) { - iq_next = iq->next; - XFree(iq); - cache->inter_data_count--; - } - - /* this is a little trickier, because some of these - might still be in use */ - for (rbp_next_p = &cache->reply_buffers; *rbp_next_p; ) { - rbp = *rbp_next_p; - if (rbp->ref_count == 0) { - *rbp_next_p = rbp->next; - XFree(rbp->buf); - XFree(rbp); - } else { - rbp_next_p = &rbp->next; - } - } - - if (cache->reply_buffers == NULL && cache->inter_data_count == 0) { - /* every thing has been freed, can free ourselves, too */ - XFree(cache); - } else { - cache->display_closed = True; - cache->inter_data = NULL; /* neatness only; won't be used */ - } - } - UnlockDisplay(dpy); - return XextRemoveDisplay(xrecord_info, dpy); -} - -static XPointer alloc_mem_cache() -{ - struct mem_cache_str *cache; - - /* note that an error will go unnoticed */ - cache = (struct mem_cache_str *) Xmalloc(sizeof(struct mem_cache_str)); - if (cache) { - cache->display_closed = False; - cache->inter_data = NULL; - cache->inter_data_count = 0; - cache->reply_buffers = NULL; - } - return (XPointer) cache; -} - -static char *xrecord_error_list[] = { - "XRecordBadContext (Not a defined RECORD context)", -}; - -static XEXT_GENERATE_ERROR_STRING (error_string, xrecord_extension_name, - RecordNumErrors, xrecord_error_list) - -static XExtensionHooks xrecord_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - error_string /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xrecord_info, - xrecord_extension_name, &xrecord_extension_hooks, RecordNumEvents, - alloc_mem_cache()) - -/************************************************************************** - * * - * private library routines * - * * - **************************************************************************/ - -static void -SendRange(dpy, range_item, nranges) - Display *dpy; - XRecordRange **range_item; - int nranges; -{ - int rlen = SIZEOF(xRecordRange); - while(nranges--) - { - xRecordRange xrange; - - xrange.coreRequestsFirst = (*range_item)->core_requests.first; - xrange.coreRequestsLast = (*range_item)->core_requests.last; - xrange.coreRepliesFirst = (*range_item)->core_replies.first; - xrange.coreRepliesLast = (*range_item)->core_replies.last; - xrange.extRequestsMajorFirst = (*range_item)->ext_requests.ext_major.first; - xrange.extRequestsMajorLast = (*range_item)->ext_requests.ext_major.last; - xrange.extRequestsMinorFirst = (*range_item)->ext_requests.ext_minor.first; - xrange.extRequestsMinorLast = (*range_item)->ext_requests.ext_minor.last; - xrange.extRepliesMajorFirst = (*range_item)->ext_replies.ext_major.first; - xrange.extRepliesMajorLast = (*range_item)->ext_replies.ext_major.last; - xrange.extRepliesMinorFirst = (*range_item)->ext_replies.ext_minor.first; - xrange.extRepliesMinorLast = (*range_item)->ext_replies.ext_minor.last; - xrange.deliveredEventsFirst = (*range_item)->delivered_events.first; - xrange.deliveredEventsLast = (*range_item)->delivered_events.last; - xrange.deviceEventsFirst = (*range_item)->device_events.first; - xrange.deviceEventsLast = (*range_item)->device_events.last; - xrange.errorsFirst = (*range_item)->errors.first; - xrange.errorsLast = (*range_item)->errors.last; - xrange.clientStarted = (*range_item)->client_started; - xrange.clientDied = (*range_item)->client_died; - - Data(dpy, (char *)&xrange, rlen); - range_item++; - } -} - -/************************************************************************** - * * - * public routines * - * * - **************************************************************************/ - -XID -XRecordIdBaseMask(dpy) - Display *dpy; -{ - return 0x1fffffff & ~dpy->resource_mask; -} - -Status -XRecordQueryVersion (dpy, cmajor_return, cminor_return) - Display *dpy; - int *cmajor_return, *cminor_return; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordQueryVersionReq *req; - xRecordQueryVersionReply rep; - - XRecordCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(RecordQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordQueryVersion; - req->majorVersion = RECORD_MAJOR_VERSION; - req->minorVersion = RECORD_MINOR_VERSION; - if (!_XReply(dpy,(xReply *)&rep, 0, True)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - *cmajor_return = rep.majorVersion; - *cminor_return = rep.minorVersion; - return ((rep.majorVersion == RECORD_MAJOR_VERSION) && - (rep.minorVersion >= RECORD_LOWEST_MINOR_VERSION)); -} - -XRecordContext -XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordCreateContextReq *req; - int clen = 4 * nclients; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordCreateContext, req); - - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordCreateContext; - req->context = XAllocID(dpy); - req->length += (nclients * 4 + - nranges * SIZEOF(xRecordRange)) >> 2; - req->elementHeader = datum_flags; - req->nClients = nclients; - req->nRanges = nranges; - - Data32(dpy, (long *)clients, clen); - SendRange(dpy, ranges, nranges); - - UnlockDisplay(dpy); - SyncHandle(); - return req->context; -} - -XRecordRange * -XRecordAllocRange() -{ - return (XRecordRange*)Xcalloc(1, sizeof(XRecordRange)); -} - -Status -XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - XRecordContext context; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordRegisterClientsReq *req; - int clen = 4 * nclients; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordRegisterClients, req); - - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordRegisterClients; - req->context = context; - req->length += (nclients * 4 + - nranges * SIZEOF(xRecordRange)) >> 2; - req->elementHeader = datum_flags; - req->nClients = nclients; - req->nRanges = nranges; - - Data32(dpy, (long *)clients, clen); - SendRange(dpy, ranges, nranges); - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Status -XRecordUnregisterClients(dpy, context, clients, nclients) - Display *dpy; - XRecordContext context; - XRecordClientSpec *clients; - int nclients; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordUnregisterClientsReq *req; - int clen = 4 * nclients; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordUnregisterClients, req); - - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordUnregisterClients; - req->context = context; - req->length += nclients; - req->nClients = nclients; - - Data32(dpy, (long *)clients, clen); - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -static void -WireToLibRange(wire_range, lib_range) - xRecordRange *wire_range; - XRecordRange *lib_range; -{ - lib_range->core_requests.first = wire_range->coreRequestsFirst; - lib_range->core_requests.last = wire_range->coreRequestsLast; - lib_range->core_replies.first = wire_range->coreRepliesFirst; - lib_range->core_replies.last = wire_range->coreRepliesLast; - lib_range->ext_requests.ext_major.first = wire_range->extRequestsMajorFirst; - lib_range->ext_requests.ext_major.last = wire_range->extRequestsMajorLast; - lib_range->ext_requests.ext_minor.first = wire_range->extRequestsMinorFirst; - lib_range->ext_requests.ext_minor.last = wire_range->extRequestsMinorLast; - lib_range->ext_replies.ext_major.first = wire_range->extRepliesMajorFirst; - lib_range->ext_replies.ext_major.last = wire_range->extRepliesMajorLast; - lib_range->ext_replies.ext_minor.first = wire_range->extRepliesMinorFirst; - lib_range->ext_replies.ext_minor.last = wire_range->extRepliesMinorLast; - lib_range->delivered_events.first = wire_range->deliveredEventsFirst; - lib_range->delivered_events.last = wire_range->deliveredEventsLast; - lib_range->device_events.first = wire_range->deviceEventsFirst; - lib_range->device_events.last = wire_range->deviceEventsLast; - lib_range->errors.first = wire_range->errorsFirst; - lib_range->errors.last = wire_range->errorsLast; - lib_range->client_started = wire_range->clientStarted; - lib_range->client_died = wire_range->clientDied; -} - -Status -XRecordGetContext(dpy, context, state_return) - Display *dpy; - XRecordContext context; - XRecordState **state_return; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordGetContextReq *req; - xRecordGetContextReply rep; - int count, i, rn; - xRecordRange xrange; - XRecordRange *ranges; - xRecordClientInfo xclient_inf; - XRecordClientInfo **client_inf, *client_inf_str; - XRecordState *ret; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordGetContext, req); - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordGetContext; - req->context = context; - if (!_XReply(dpy,(xReply *)&rep, 0, False)) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - count = rep.nClients; - - ret = (XRecordState*)Xmalloc(sizeof(XRecordState)); - if (!ret) { - /* XXX - eat data */ - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - ret->enabled = rep.enabled; - ret->datum_flags = rep.elementHeader; - ret->nclients = count; - - if (count) - { - client_inf = (XRecordClientInfo **) Xcalloc(count, sizeof(XRecordClientInfo*)); - ret->client_info = client_inf; - client_inf_str = (XRecordClientInfo *) Xmalloc(count*sizeof(XRecordClientInfo)); - if (!client_inf || !client_inf_str) - { - for(i = 0; i < count; i++) - { - _XEatData (dpy, sizeof(xRecordClientInfo)); - _XEatData (dpy, SIZEOF(xRecordRange)); /* XXX - don't know how many */ - } - UnlockDisplay(dpy); - XRecordFreeState(ret); - SyncHandle(); - return 0; - } - for(i = 0; i < count; i++) - { - client_inf[i] = &(client_inf_str[i]); - _XRead(dpy, (char *)&xclient_inf, (long)sizeof(xRecordClientInfo)); - client_inf_str[i].client = xclient_inf.clientResource; - client_inf_str[i].nranges = xclient_inf.nRanges; - - if (xclient_inf.nRanges) - { - client_inf_str[i].ranges = (XRecordRange**) Xcalloc(xclient_inf.nRanges, sizeof(XRecordRange*)); - ranges = (XRecordRange*) Xmalloc(xclient_inf.nRanges * sizeof(XRecordRange)); - if (!client_inf_str[i].ranges || !ranges) { - /* XXX eat data */ - UnlockDisplay(dpy); - XRecordFreeState(ret); - SyncHandle(); - return 0; - } - for (rn=0; rnclient_info = NULL; - } - - *state_return = ret; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -void -XRecordFreeState(state) - XRecordState *state; -{ - int i; - - for(i=0; inclients; i++) { - if (state->client_info[i]->ranges) { - if (state->client_info[i]->ranges[0]) - Xfree(state->client_info[i]->ranges[0]); - Xfree(state->client_info[i]->ranges); - } - } - if (state->client_info) { - if (state->client_info[0]) - Xfree(state->client_info[0]); - Xfree(state->client_info); - } - Xfree(state); -} - -static struct reply_buffer *alloc_reply_buffer(info, nbytes) - XExtDisplayInfo *info; - int nbytes; -{ - struct mem_cache_str *cache = (struct mem_cache_str *)info->data; - struct reply_buffer *rbp; - struct reply_buffer *saved_rb = NULL; - /* - * First look for an allocated buffer that is not in use. - * If we have a big enough buffer, use that, otherwise - * realloc an existing one. - */ - for (rbp = cache->reply_buffers; rbp; rbp = rbp->next) { - if (rbp->ref_count == 0) { - if (rbp->nbytes >= nbytes) - return rbp; - else - saved_rb = rbp; - } - } - if (saved_rb) { - saved_rb->buf = (unsigned char *)Xrealloc(saved_rb->buf, nbytes); - if (!saved_rb->buf) { - saved_rb->nbytes = 0; - return NULL; - } - saved_rb->nbytes = nbytes; - return saved_rb; - } - - /* - * nothing available; malloc a new struct - */ - rbp = (struct reply_buffer *)Xmalloc(sizeof(struct reply_buffer)); - if (!rbp) - return NULL; - rbp->buf = (unsigned char *)Xmalloc(nbytes); - if (!rbp->buf) { - Xfree(rbp); - return NULL; - } - rbp->nbytes = nbytes; - rbp->ref_count = 0; - rbp->next = cache->reply_buffers; - cache->reply_buffers = rbp; - return rbp; -} - -static XRecordInterceptData *alloc_inter_data(info) - XExtDisplayInfo *info; -{ - struct mem_cache_str *cache = (struct mem_cache_str *)info->data; - struct intercept_queue *iq; - - /* if there is one on the free list, pop it */ - if (cache->inter_data) { - iq = cache->inter_data; - cache->inter_data = iq->next; - return &iq->data; - } - /* allocate a new one */ - iq = (struct intercept_queue *)Xmalloc(sizeof(struct intercept_queue)); - if (!iq) - return NULL; - iq->cache = cache; - cache->inter_data_count++; - return &iq->data; -} - -void -XRecordFreeData(data) - XRecordInterceptData *data; -{ - /* we can do this cast because that is what we really allocated */ - struct intercept_queue *iq = (struct intercept_queue *)data; - struct reply_buffer *rbp = NULL; - struct mem_cache_str *cache = iq->cache; - - /* - * figure out what reply_buffer this points at - * and decrement its ref_count. - */ - if (data->data) { - - for (rbp = cache->reply_buffers; rbp; rbp = rbp->next) { - if (data->data >= rbp->buf - && data->data < rbp->buf + rbp->nbytes) - { - assert(rbp->ref_count > 0); - rbp->ref_count--; - break; - } - } - /* it's an error if we didn't find something to free */ - assert(rbp); - } - /* - * If the display is still open, put this back on the free queue. - * - * Otherwise the display is closed and we won't reuse this, so free it. - * See if we can free the reply buffer, too. - * If we can, see if this is the last reply buffer and if so - * free the list of reply buffers. - */ - if (cache->display_closed == False) { - iq->next = cache->inter_data; - cache->inter_data = iq; - } else { - if (rbp && rbp->ref_count == 0) { - struct reply_buffer *rbp2, **rbp_next_p; - - /* Have to search the list again to find the prev element. - This is not the common case, so don't slow down the code - above by doing it then. */ - for (rbp_next_p = &cache->reply_buffers; *rbp_next_p; ) { - rbp2 = *rbp_next_p; - if (rbp == rbp2) { - *rbp_next_p = rbp2->next; - break; - } else { - rbp_next_p = &rbp2->next; - } - } - XFree(rbp->buf); - XFree(rbp); - } - - XFree(iq); - cache->inter_data_count--; - - if (cache->reply_buffers == NULL && cache->inter_data_count == 0) { - XFree(cache); /* all finished */ - } - } -} - -/* the EXTRACT macros are adapted from ICElibint.h */ - -#define EXTRACT_CARD16(swap, src, dst) \ -{ \ - (dst) = *((CARD16 *) (src)); \ - if (swap) \ - (dst) = lswaps (dst); \ -} - -#define EXTRACT_CARD32(swap, src, dst) \ -{ \ - (dst) = *((CARD32 *) (src)); \ - if (swap) \ - (dst) = lswapl (dst); \ -} - -/* byte swapping macros from xfs/include/misc.h */ - -/* byte swap a long literal */ -#define lswapl(x) ((((x) & 0xff) << 24) |\ - (((x) & 0xff00) << 8) |\ - (((x) & 0xff0000) >> 8) |\ - (((x) >> 24) & 0xff)) - -/* byte swap a short literal */ -#define lswaps(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff)) - -enum parser_return { Continue, End, Error }; - -static enum parser_return -parse_reply_call_callback(dpy, info, rep, reply, callback, closure) - Display *dpy; - XExtDisplayInfo *info; - xRecordEnableContextReply *rep; - struct reply_buffer *reply; - XRecordInterceptProc callback; - XPointer closure; -{ - int current_index; - int datum_bytes = 0; - XRecordInterceptData *data; - - /* call the callback for each protocol element in the reply */ - current_index = 0; - do { - data = alloc_inter_data(info); - if (!data) - return Error; - - data->id_base = rep->idBase; - data->category = rep->category; - data->client_swapped = rep->clientSwapped; - data->server_time = rep->serverTime; - data->client_seq = rep->recordedSequenceNumber; - /* - * compute the size of this protocol element. - */ - switch (rep->category) { - case XRecordFromServer: - if (rep->elementHeader&XRecordFromServerTime) { - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index, - data->server_time); - current_index += 4; - } - switch (reply->buf[current_index]) { - case X_Reply: /* reply */ - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index+4, datum_bytes); - datum_bytes = (datum_bytes+8) << 2; - break; - default: /* error or event */ - datum_bytes = 32; - } - break; - case XRecordFromClient: - if (rep->elementHeader&XRecordFromClientTime) { - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index, - data->server_time); - current_index += 4; - } - if (rep->elementHeader&XRecordFromClientSequence) { - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index, - data->client_seq); - current_index += 4; - } - if (reply->buf[current_index+2] == 0 - && reply->buf[current_index+3] == 0) /* needn't swap 0 */ - { /* BIG-REQUESTS */ - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index+4, datum_bytes); - } else { - EXTRACT_CARD16(rep->clientSwapped, - reply->buf+current_index+2, datum_bytes); - } - datum_bytes <<= 2; - break; - case XRecordClientStarted: - EXTRACT_CARD16(rep->clientSwapped, - reply->buf+current_index+6, datum_bytes); - datum_bytes = (datum_bytes+2) << 2; - break; - case XRecordClientDied: - if (rep->elementHeader&XRecordFromClientSequence) { - EXTRACT_CARD32(rep->clientSwapped, - reply->buf+current_index, - data->client_seq); - current_index += 4; - } - /* fall through */ - case XRecordStartOfData: - case XRecordEndOfData: - datum_bytes = 0; - } - - if (datum_bytes > 0) { - if (current_index + datum_bytes > rep->length << 2) - fprintf(stderr, - "XRecord: %lu-byte reply claims %d-byte element (seq %lu)\n", - (long)rep->length << 2, current_index + datum_bytes, - dpy->last_request_read); - /* - * This assignment (and indeed the whole buffer sharing - * scheme) assumes arbitrary 4-byte boundaries are - * addressable. - */ - data->data = reply->buf+current_index; - reply->ref_count++; - } else { - data->data = NULL; - } - data->data_len = datum_bytes >> 2; - - (*callback)(closure, data); - - current_index += datum_bytes; - } while (current_indexlength<<2); - - if (rep->category == XRecordEndOfData) - return End; - - return Continue; -} - -Status -XRecordEnableContext(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordEnableContextReq *req; - xRecordEnableContextReply rep; - struct reply_buffer *reply; - enum parser_return status; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordEnableContext, req); - - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordEnableContext; - req->context = context; - - while (1) - { - /* This code should match that in XRecordEnableContextAsync */ - if (!_XReply (dpy, (xReply *)&rep, 0, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - if (rep.length > 0) { - reply = alloc_reply_buffer(info, rep.length<<2); - if (!reply) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - _XRead (dpy, (char *)reply->buf, rep.length<<2); - } else { - reply = NULL; - } - - status = parse_reply_call_callback(dpy, info, &rep, reply, - callback, closure); - switch (status) { - case Continue: - break; - case End: - UnlockDisplay(dpy); - SyncHandle(); - return 1; - case Error: - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - } -} - - -typedef struct _record_async_state -{ - unsigned long enable_seq; - _XAsyncHandler *async; - _XAsyncErrorState *error_state; - XExtDisplayInfo *info; - XRecordInterceptProc callback; - XPointer closure; -} record_async_state; - -static Bool -record_async_handler(dpy, rep, buf, len, adata) - register Display *dpy; - register xReply *rep; - char *buf; - int len; - XPointer adata; -{ - register record_async_state *state = (record_async_state *)adata; - struct reply_buffer *reply; - enum parser_return status; - - if (dpy->last_request_read != state->enable_seq) - { - if (dpy->last_request_read > state->enable_seq) { - /* it is an error that we are still on the handler list */ - fprintf(stderr, "XRecord: handler for seq %lu never saw XRecordEndOfData. (seq now %lu)\n", - state->enable_seq, dpy->last_request_read); - DeqAsyncHandler(dpy, state->async); - Xfree(state->async); - } - return False; - } - if (rep->generic.type == X_Error) - { - DeqAsyncHandler(dpy, state->async); - Xfree(state->async); - return False; - } - - if (rep->generic.length > 0) { - reply = alloc_reply_buffer(state->info, rep->generic.length<<2); - - if (!reply) { - DeqAsyncHandler(dpy, state->async); - Xfree(state->async); - return False; - } - - _XGetAsyncData(dpy, (char *)reply->buf, buf, len, - SIZEOF(xRecordEnableContextReply), - rep->generic.length << 2, 0); - } else { - reply = NULL; - } - - status = parse_reply_call_callback(dpy, state->info, - (xRecordEnableContextReply*) rep, - reply, state->callback, state->closure); - - if (status != Continue) - { - DeqAsyncHandler(dpy, state->async); - Xfree(state->async); - if (status == Error) - return False; - } - - return True; -} - -/* - * reads the first reply, StartOfData, synchronously, - * then returns allowing the app to call XRecordProcessReplies - * to get the rest. - */ -Status -XRecordEnableContextAsync(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordEnableContextReq *req; - xRecordEnableContextReply rep; - struct reply_buffer *reply; - enum parser_return status; - _XAsyncHandler *async; - record_async_state *async_state; - - XRecordCheckExtension (dpy, info, 0); - async = (_XAsyncHandler *)Xmalloc(sizeof(_XAsyncHandler) + - sizeof(record_async_state)); - if (!async) - return 0; - async_state = (record_async_state *)(async + 1); - - LockDisplay(dpy); - GetReq(RecordEnableContext, req); - - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordEnableContext; - req->context = context; - - /* Get the StartOfData reply. */ - /* This code should match that in XRecordEnableContext */ - if (!_XReply (dpy, (xReply *)&rep, 0, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - Xfree(async); - return 0; - } - - /* this had better be a StartOfData, which has no extra data. */ - if (rep.length != 0) { - fprintf(stderr, "XRecord: malformed StartOfData for sequence %lu\n", - dpy->last_request_read); - } - reply = NULL; - - status = parse_reply_call_callback(dpy, info, &rep, reply, - callback, closure); - if (status != Continue) - { - UnlockDisplay(dpy); - Xfree(async); - return 0; - } - - /* hook in the async handler for the rest of the replies */ - async_state->enable_seq = dpy->request; - async_state->async = async; - async_state->info = info; - async_state->callback = callback; - async_state->closure = closure; - - async->next = dpy->async_handlers; - async->handler = record_async_handler; - async->data = (XPointer)async_state; - dpy->async_handlers = async; - - UnlockDisplay(dpy); - /* Don't invoke SyncHandle here, since this is an async - function. Does this break XSetAfterFunction() ? */ - return 1; -} - -void -XRecordProcessReplies(dpy) - Display *dpy; -{ - (void) XPending(dpy); -} - -Status -XRecordDisableContext(dpy, context) - Display *dpy; - XRecordContext context; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordDisableContextReq *req; - - XRecordCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RecordDisableContext, req); - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordDisableContext; - req->context = context; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Status -XRecordFreeContext(dpy, context) - Display *dpy; - XRecordContext context; -{ - XExtDisplayInfo *info = find_display (dpy); - register xRecordFreeContextReq *req; - - XRecordCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(RecordFreeContext, req); - req->reqType = info->codes->major_opcode; - req->recordReqType = X_RecordFreeContext; - req->context = context; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} diff --git a/nx-X11/lib/Xtst/XTest.c b/nx-X11/lib/Xtst/XTest.c deleted file mode 100644 index 6b814aab4..000000000 --- a/nx-X11/lib/Xtst/XTest.c +++ /dev/null @@ -1,498 +0,0 @@ -/* $Xorg: XTest.c,v 1.5 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* -Copyright 1990, 1991 by UniSoft Group Limited -*/ - -/* - -Copyright 1992, 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/Xtst/XTest.c,v 1.5 2001/12/14 19:56:40 dawes Exp $ */ - -#define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _xtest_info_data; -static XExtensionInfo *xtest_info = &_xtest_info_data; -static /* const */ char *xtest_extension_name = XTestExtensionName; - -#define XTestCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xtest_extension_name, val) - -#define XTestICheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xtest_extension_name, val); \ - if (!i->data) return val - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(); -static /* const */ XExtensionHooks xtest_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL /* error_string */ -}; - -static XPointer -get_xinput_base(dpy) - Display *dpy; -{ - int major_opcode, first_event, first_error; - first_event = 0; - - XQueryExtension(dpy, INAME, &major_opcode, &first_event, &first_error); - return (XPointer)(long)first_event; -} - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xtest_info, - xtest_extension_name, - &xtest_extension_hooks, XTestNumberEvents, - get_xinput_base(dpy)) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xtest_info) - -/***************************************************************************** - * * - * public routines * - * * - *****************************************************************************/ - -Bool -XTestQueryExtension (dpy, event_basep, error_basep, majorp, minorp) - Display *dpy; - int *event_basep, *error_basep; - int *majorp, *minorp; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestGetVersionReq *req; - xXTestGetVersionReply rep; - - if (XextHasExtension(info)) { - LockDisplay(dpy); - GetReq(XTestGetVersion, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestGetVersion; - req->majorVersion = XTestMajorVersion; - req->minorVersion = XTestMinorVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - *majorp = rep.majorVersion; - *minorp = rep.minorVersion; - return True; - } else { - return False; - } -} - -Bool -XTestCompareCursorWithWindow(dpy, window, cursor) - Display *dpy; - Window window; - Cursor cursor; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestCompareCursorReq *req; - xXTestCompareCursorReply rep; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestCompareCursor, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestCompareCursor; - req->window = window; - req->cursor = cursor; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.same; -} - -Bool -XTestCompareCurrentCursorWithWindow(dpy, window) - Display *dpy; - Window window; -{ - return XTestCompareCursorWithWindow(dpy, window, XTestCurrentCursor); -} - -int -XTestFakeKeyEvent(dpy, keycode, is_press, delay) - Display *dpy; - unsigned int keycode; - Bool is_press; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = is_press ? KeyPress : KeyRelease; - req->detail = keycode; - req->time = delay; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeButtonEvent(dpy, button, is_press, delay) - Display *dpy; - unsigned int button; - Bool is_press; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = is_press ? ButtonPress : ButtonRelease; - req->detail = button; - req->time = delay; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeMotionEvent(dpy, screen, x, y, delay) - Display *dpy; - int screen; - int x, y; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = MotionNotify; - req->detail = False; - if (screen == -1) - req->root = None; - else - req->root = RootWindow(dpy, screen); - req->rootX = x; - req->rootY = y; - req->time = delay; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeRelativeMotionEvent(dpy, dx, dy, delay) - Display *dpy; - int dx, dy; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = MotionNotify; - req->detail = True; - req->root = None; - req->rootX = dx; - req->rootY = dy; - req->time = delay; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -static void -send_axes(dpy, info, req, dev, first_axis, axes, n_axes) - Display *dpy; - XExtDisplayInfo *info; - xXTestFakeInputReq *req; - XDevice *dev; - int first_axis; - int *axes; - int n_axes; -{ - deviceValuator ev; - int n; - - req->deviceid |= MORE_EVENTS; - req->length += ((n_axes + 5) / 6) * (SIZEOF(xEvent) >> 2); - ev.type = XI_DeviceValuator + (long)info->data; - ev.deviceid = dev->device_id; - ev.num_valuators = n_axes; - ev.first_valuator = first_axis; - while (n_axes > 0) { - n = n_axes; - if (n > 6) - n = 6; - switch (n) { - case 6: - ev.valuator5 = *(axes+5); - case 5: - ev.valuator4 = *(axes+4); - case 4: - ev.valuator3 = *(axes+3); - case 3: - ev.valuator2 = *(axes+2); - case 2: - ev.valuator1 = *(axes+1); - case 1: - ev.valuator0 = *axes; - } - Data(dpy, (char *)&ev, SIZEOF(xEvent)); - axes += n; - n_axes -= n; - ev.first_valuator += n; - } -} - -int -XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int keycode; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestICheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = is_press ? XI_DeviceKeyPress : XI_DeviceKeyRelease; - req->type += (int)(long)info->data; - req->detail = keycode; - req->time = delay; - req->deviceid = dev->device_id; - if (n_axes) - send_axes(dpy, info, req, dev, 0, axes, n_axes); - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int button; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestICheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = is_press ? XI_DeviceButtonPress : XI_DeviceButtonRelease; - req->type += (int)(long)info->data; - req->detail = button; - req->time = delay; - req->deviceid = dev->device_id; - if (n_axes) - send_axes(dpy, info, req, dev, 0, axes, n_axes); - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool in_prox; - int *axes; - int n_axes; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestICheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = in_prox ? XI_ProximityIn : XI_ProximityOut; - req->type += (int)(long)info->data; - req->time = delay; - req->deviceid = dev->device_id; - if (n_axes) - send_axes(dpy, info, req, dev, 0, axes, n_axes); - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestFakeDeviceMotionEvent(dpy, dev, is_relative, - first_axis, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool is_relative; - int first_axis; - int *axes; - int n_axes; - unsigned long delay; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestFakeInputReq *req; - - XTestICheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestFakeInput, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestFakeInput; - req->type = XI_DeviceMotionNotify + (int)(long)info->data; - req->detail = is_relative; - req->time = delay; - req->deviceid = dev->device_id; - send_axes(dpy, info, req, dev, first_axis, axes, n_axes); - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -int -XTestGrabControl(dpy, impervious) - Display *dpy; - Bool impervious; -{ - XExtDisplayInfo *info = find_display (dpy); - register xXTestGrabControlReq *req; - - XTestCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XTestGrabControl, req); - req->reqType = info->codes->major_opcode; - req->xtReqType = X_XTestGrabControl; - req->impervious = impervious; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -void -XTestSetGContextOfGC(gc, gid) - GC gc; - GContext gid; -{ - gc->gid = gid; -} - -void -XTestSetVisualIDOfVisual(visual, visualid) - Visual *visual; - VisualID visualid; -{ - visual->visualid = visualid; -} - -static xReq _dummy_request = { - 0, 0, 0 -}; - -Status -XTestDiscard(dpy) - Display *dpy; -{ - Bool something; - register char *ptr; - - LockDisplay(dpy); - if ((something = (dpy->bufptr != dpy->buffer))) { - for (ptr = dpy->buffer; - ptr < dpy->bufptr; - ptr += (((xReq *)ptr)->length << 2)) - dpy->request--; - dpy->bufptr = dpy->buffer; - dpy->last_req = (char *)&_dummy_request; - } - UnlockDisplay(dpy); - SyncHandle(); - return something; -} diff --git a/nx-X11/lib/Xtst/Xtst-def.cpp b/nx-X11/lib/Xtst/Xtst-def.cpp deleted file mode 100644 index a103ad497..000000000 --- a/nx-X11/lib/Xtst/Xtst-def.cpp +++ /dev/null @@ -1,32 +0,0 @@ -LIBRARY XTST -VERSION LIBRARY_VERSION -EXPORTS - XTestCompareCurrentCursorWithWindow - XTestCompareCursorWithWindow - XTestDiscard - XTestFakeButtonEvent - XTestFakeDeviceButtonEvent - XTestFakeDeviceKeyEvent - XTestFakeDeviceMotionEvent - XTestFakeKeyEvent - XTestFakeMotionEvent - XTestFakeProximityEvent - XTestFakeRelativeMotionEvent - XTestGrabControl - XTestQueryExtension - XTestSetGContextOfGC - XTestSetVisualIDOfVisual - XRecordQueryVersion - XRecordCreateContext - XRecordAllocRange - XRecordRegisterClients - XRecordUnregisterClients - XRecordGetContext - XRecordFreeState - XRecordEnableContext - XRecordEnableContextAsync - XRecordProcessReplies - XRecordFreeData - XRecordDisableContext - XRecordFreeContext -/* $Xorg: Xtst-def.cpp,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 93a676390..309d5d98f 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -403,17 +403,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lXfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lXdmcp \ + -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lXdmcp \ + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 40e1828bb..672586fdd 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -30,7 +30,7 @@ extern void MITMiscExtensionInit(INITARGS); #ifdef XTEST extern void XTestExtensionInit(INITARGS); #define _XTEST_SERVER_ -#include +#include #include #endif diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index d9adc03c0..482ad91d4 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -46,7 +46,7 @@ from The Open Group. #include "dixevents.h" #include "sleepuntil.h" #define _XTEST_SERVER_ -#include +#include #include #ifdef XINPUT #include diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index f4ff4c243..47ff26127 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -195,7 +195,7 @@ typedef void (*InitExtension)(INITARGS); #endif #ifdef XTEST #define _XTEST_SERVER_ -#include +#include #endif #ifdef XKB #include diff --git a/nx-libs.spec b/nx-libs.spec index abe41d160..22094c2a5 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -38,6 +38,7 @@ BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xtst) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -51,6 +52,7 @@ BuildRequires: xorg-x11-libXdamage-devel BuildRequires: xorg-x11-libXcomposite-devel BuildRequires: xorg-x11-libXrandr-devel BuildRequires: xorg-x11-libXfixes-devel +BuildRequires: xorg-x11-libXtst-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -64,6 +66,7 @@ BuildRequires: libXdmcp-devel BuildRequires: libXcomposite-devel BuildRequires: libXrandr-devel BuildRequires: libXfixes-devel +BuildRequires: libXtst-devel %endif # For imake @@ -291,26 +294,6 @@ The Xrender library is designed as a lightweight library interface to the Render extension. -%package -n libNX_Xtst6 -Group: System Environment/Libraries -Summary: Xlib-based client API for the XTEST and RECORD extensions on NX -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xtst - -%description -n libNX_Xtst6 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The XTEST extension is a minimal set of client and server extensions -required to completely test the X11 server with no user intervention. -This extension is not intended to support general journaling and -playback of user actions. - -The RECORD extension supports the recording and reporting of all core -X protocol and arbitrary X extension protocol. - - %package -n libXcomp-devel Group: Development/Libraries Summary: Development files for the NX differential compression library @@ -443,10 +426,6 @@ Provides: nx%{?_isa} = %{version}-%{release} Requires: xorg-x11-fonts-core %endif -# Should be a weak dependency, because this package -# works without the dependency. -Requires: xkeyboard-config - %description -n nxagent NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X @@ -589,7 +568,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -n libNX_Xext6 -p /sbin/ldconfig %post -n libNX_Xinerama1 -p /sbin/ldconfig %post -n libNX_Xrender1 -p /sbin/ldconfig -%post -n libNX_Xtst6 -p /sbin/ldconfig %post -n libXcomp3 -p /sbin/ldconfig %post -n libXcompext3 -p /sbin/ldconfig %post -n libXcompshad3 -p /sbin/ldconfig @@ -599,7 +577,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libNX_Xinerama1 -p /sbin/ldconfig %postun -n libNX_Xrender1 -p /sbin/ldconfig -%postun -n libNX_Xtst6 -p /sbin/ldconfig %postun -n libXcomp3 -p /sbin/ldconfig %postun -n libXcompext3 -p /sbin/ldconfig %postun -n libXcompshad3 -p /sbin/ldconfig @@ -672,7 +649,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx-X11/extensions/shape.h %{_includedir}/nx-X11/extensions/sync.h %{_includedir}/nx-X11/extensions/xtestext1.h -%{_includedir}/nx-X11/extensions/xteststr.h %files -n libNX_Xext6 %defattr(-,root,root) @@ -691,10 +667,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xrender.so.1* -%files -n libNX_Xtst6 -%defattr(-,root,root) -%{_libdir}/libNX_Xtst.so.6* - %files -n libXcomp-devel %defattr(-,root,root) %_libdir/libXcomp.so @@ -751,10 +723,8 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files devel %defattr(-,root,root) %{_libdir}/libNX_Xinerama.so -%{_libdir}/libNX_Xtst.so %{_includedir}/nx-X11/X10.h %dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/XTest.h %{_includedir}/nx-X11/extensions/Xevie.h %{_includedir}/nx-X11/extensions/Xinerama.h %{_includedir}/nx-X11/extensions/lbxbuf.h @@ -825,6 +795,8 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_includedir}/nx-X11/extensions/xf86vmstr.h %{_includedir}/nx-X11/extensions/xfixesproto.h %{_includedir}/nx-X11/extensions/xfixeswire.h +%{_includedir}/nx-X11/extensions/xtestconst.h +%{_includedir}/nx-X11/extensions/xteststr.h %{_includedir}/nx-X11/extensions/xtrapbits.h %{_includedir}/nx-X11/extensions/xtrapddmi.h %{_includedir}/nx-X11/extensions/xtrapdi.h diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 7614d55b9..f3b68b45a 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -151,7 +151,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL) else -EXTRALIBS = -lNX_Xext -lNX_Xtst -lXrandr -lXdamage +EXTRALIBS = -lNX_Xext -lXtst -lXrandr -lXdamage all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) diff --git a/nxcompshad/X11.cpp b/nxcompshad/X11.cpp index 5a18e0a69..b5383816a 100644 --- a/nxcompshad/X11.cpp +++ b/nxcompshad/X11.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include "X11/include/XTest_nxcompshad.h" #include #include #include diff --git a/nxcompshad/X11/include/XTest_nxcompshad.h b/nxcompshad/X11/include/XTest_nxcompshad.h new file mode 100644 index 000000000..91a2ba40b --- /dev/null +++ b/nxcompshad/X11/include/XTest_nxcompshad.h @@ -0,0 +1,71 @@ +/* + +Copyright 1992, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +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 +OPEN GROUP 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 Open Group 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 Open Group. + +*/ + +#ifndef _XTEST_H_ +#define _XTEST_H_ + +#include + +_XFUNCPROTOBEGIN + +Bool XTestQueryExtension( + Display* /* dpy */, + int* /* event_basep */, + int* /* error_basep */, + int* /* majorp */, + int* /* minorp */ +); + +extern int XTestFakeKeyEvent( + Display* /* dpy */, + unsigned int /* keycode */, + Bool /* is_press */, + unsigned long /* delay */ +); + +extern int XTestFakeButtonEvent( + Display* /* dpy */, + unsigned int /* button */, + Bool /* is_press */, + unsigned long /* delay */ +); + +extern int XTestFakeMotionEvent( + Display* /* dpy */, + int /* screen */, + int /* x */, + int /* y */, + unsigned long /* delay */ +); + +extern int XTestGrabControl( + Display* /* dpy */, + Bool /* impervious */ +); + +_XFUNCPROTOEND + +#endif -- cgit v1.2.3 From e4763fb4879ce8782e50c784ed9e7d8c5a1b7322 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 29 Dec 2015 22:34:04 +0100 Subject: debian/rules: Don't strips symbols from not-build-anymore libNX_Xtst.so. --- debian/rules | 1 - 1 file changed, 1 deletion(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 4fb1cf1bc..729a2c6f4 100755 --- a/debian/rules +++ b/debian/rules @@ -83,7 +83,6 @@ override_dh_strip: dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg - dh_strip -plibnx-xtst6 --dbg-package=libnx-xtst6-dbg dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg -- cgit v1.2.3 From 2d776b14fddc5ec70c97aa82672f3a7c9caef6a3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 5 May 2015 10:24:24 +0200 Subject: library clean-up: Don't build libNX_Xinerama anymore. Use system's libXinerama shared library. (Fixes ArcticaProject/nx-libs#49). This commit goes along with a patch from Ulrich Sibiller who managed to move the Xinerama awareness for NX sessions into the Xserver code. This makes Xinerama support for NX in libNX_Xinerama.so obsolete. Fixes ArcticaProject/nx-libs#49 --- Makefile | 8 - debian/control | 46 ++-- debian/libnx-xinerama-dev.install.in | 3 - debian/libnx-xinerama1.install.in | 1 - debian/libnx-xinerama1.symbols | 11 - debian/nx-x11-common.install | 1 - debian/nx-x11proto-xinerama-dev.install.in | 1 - debian/nxagent.postinst.in | 57 ----- debian/nxagent.prerm | 53 ---- debian/rules | 5 - nx-X11/config/cf/X11.tmpl | 37 --- nx-X11/include/extensions/Imakefile | 4 +- nx-X11/lib/Imakefile | 4 - nx-X11/lib/Xinerama/Imakefile | 30 --- nx-X11/lib/Xinerama/Xinerama-def.cpp | 14 -- nx-X11/lib/Xinerama/Xinerama.c | 361 ---------------------------- nx-X11/programs/Xserver/Imakefile | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 + nx-libs.spec | 45 +--- 19 files changed, 25 insertions(+), 662 deletions(-) delete mode 100644 debian/libnx-xinerama-dev.install.in delete mode 100644 debian/libnx-xinerama1.install.in delete mode 100644 debian/libnx-xinerama1.symbols delete mode 100644 debian/nx-x11proto-xinerama-dev.install.in delete mode 100755 debian/nxagent.postinst.in delete mode 100755 debian/nxagent.prerm delete mode 100644 nx-X11/lib/Xinerama/Imakefile delete mode 100644 nx-X11/lib/Xinerama/Xinerama-def.cpp delete mode 100644 nx-X11/lib/Xinerama/Xinerama.c (limited to 'debian') diff --git a/Makefile b/Makefile index 2b5b4946a..14f6e4266 100644 --- a/Makefile +++ b/Makefile @@ -154,14 +154,6 @@ install-full: "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"/ || true; \ done; \ - # Provide means for Xinerama support in NX/X2Go sessions. This - # This also requires three post-install symlinks created by libnx-xinerama1: - # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr//libX11.so.6 - # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr//libXext.so.6 - # $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 -> /usr//libNX_Xinerama.so.1 - # Only create the owned directory here for nx-x11-common. - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama - $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/ diff --git a/debian/control b/debian/control index 946dd4b2a..94aa64014 100644 --- a/debian/control +++ b/debian/control @@ -22,12 +22,11 @@ Build-Depends: libxrandr-dev, libxfixes-dev, libxtst-dev, + libxinerama-dev, autoconf, pkg-config, x11proto-core-dev, expat, -Build-Conflicts: - x11proto-xinerama-dev, Standards-Version: 3.9.6 Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary Vcs-Git: git://code.x2go.org/nx-libs.git @@ -548,21 +547,17 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), Description: nx-X11 Xinerama extension library NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xinerama provides an X Window System client interface to the XINERAMA - extension to the X protocol. + This package removes the obsoleted libNX_Xinerama.so.1 library. + Xinerama support in NX has been moved into nxagent whereas X-Clients + can now use the libXinerama library shipped with X.Org. . - The Xinerama (also known as panoramiX) extension allows for multiple screens - attached to a single display to be treated as belonging together, and to give - desktop applications a better idea of the monitor layout. + This package can be safely removed. Package: libnx-xinerama-dev Provides: libnx-xinerama1-dev @@ -570,24 +565,16 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xinerama1 (= ${binary:Version}), - nx-x11proto-xinerama-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), Description: nx-X11 Xinerama extension library (development headers) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xinerama provides an X Window System client interface to the XINERAMA - extension to the X protocol. + This package removes the obsoleted headers for the libNX_Xinerama.so.1 + library. . - The Xinerama (also known as panoramiX) extension allows for multiple screens - attached to a single display to be treated as belonging together, and to give - desktop applications a better idea of the monitor layout. - . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-xinerama-dev Section: libdevel @@ -595,16 +582,15 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), Description: nx-X11 Xinerama extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - This package provides development headers describing the wire protocol - for the XINERAMA extension, used to use and manage a multiple-screen - display. + This package removes the obsoleted headers for the libNX_Xinerama.so.1 + library. + . + This package can be safely removed. Package: libnx-xinerama1-dbg Architecture: any @@ -624,12 +610,10 @@ Description: nx-X11 Xinerama extension library (debug package) libNX_Xinerama provides an X Window System client interface to the XINERAMA extension to the X protocol. . - The Xinerama (also known as panoramiX) extension allows for multiple - screens attached to a single display to be treated as belonging - together, and to give desktop applications a better idea of the monitor - layout. + This package removes the obsoleted debug symbols for the libNX_Xinerama.so.1 + library. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xpm4 Architecture: any diff --git a/debian/libnx-xinerama-dev.install.in b/debian/libnx-xinerama-dev.install.in deleted file mode 100644 index 59c0456aa..000000000 --- a/debian/libnx-xinerama-dev.install.in +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/*/libNX_Xinerama.so -usr/include/*/nx-X11/extensions/Xinerama.h -usr/include/*/nx-X11/extensions/panoramiXext.h diff --git a/debian/libnx-xinerama1.install.in b/debian/libnx-xinerama1.install.in deleted file mode 100644 index d53de9c4f..000000000 --- a/debian/libnx-xinerama1.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xinerama.so.* diff --git a/debian/libnx-xinerama1.symbols b/debian/libnx-xinerama1.symbols deleted file mode 100644 index f8f73a3fd..000000000 --- a/debian/libnx-xinerama1.symbols +++ /dev/null @@ -1,11 +0,0 @@ -libNX_Xinerama.so.1 libnx-xinerama1 #MINVER# - XPanoramiXAllocInfo@Base 3.5.0.29 - XPanoramiXGetScreenCount@Base 3.5.0.29 - XPanoramiXGetScreenSize@Base 3.5.0.29 - XPanoramiXGetState@Base 3.5.0.29 - XPanoramiXQueryExtension@Base 3.5.0.29 - XPanoramiXQueryVersion@Base 3.5.0.29 - XineramaIsActive@Base 3.5.0.29 - XineramaQueryExtension@Base 3.5.0.29 - XineramaQueryScreens@Base 3.5.0.29 - XineramaQueryVersion@Base 3.5.0.29 diff --git a/debian/nx-x11-common.install b/debian/nx-x11-common.install index 1131e7291..b6fc46613 100644 --- a/debian/nx-x11-common.install +++ b/debian/nx-x11-common.install @@ -1,2 +1 @@ usr/share/nx/SecurityPolicy -usr/lib/nx/X11/ diff --git a/debian/nx-x11proto-xinerama-dev.install.in b/debian/nx-x11proto-xinerama-dev.install.in deleted file mode 100644 index dca06ddee..000000000 --- a/debian/nx-x11proto-xinerama-dev.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/include/*/nx-X11/extensions/panoramiXproto.h \ No newline at end of file diff --git a/debian/nxagent.postinst.in b/debian/nxagent.postinst.in deleted file mode 100755 index 95879b943..000000000 --- a/debian/nxagent.postinst.in +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# postinst script for nxagent -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ### FIXME: this is a work-around while we have not implemented - ### multiarch support into the Debian source package of - ### nx-libs. - - libdir=/usr/lib/#DEB_BUILD_MULTIARCH# - - mkdir -p /usr/lib/nx/X11/Xinerama/ - # Already existent files are not removed. - # Users will need to explicitly remove them and (re-) configure this package. - if test -e $libdir/libX11.so.6; then - ln -sf $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - fi - if test -e $libdir/libXext.so.6; then - ln -sf $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 - fi - if test -e $libdir/libNX_Xinerama.so.1; then - ln -sf $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1 - fi - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/nxagent.prerm b/debian/nxagent.prerm deleted file mode 100755 index 019284a16..000000000 --- a/debian/nxagent.prerm +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# prerm script for nxagent -# -# see: dh_installdeb(1) -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -set -e - - - -case "$1" in - remove) - if test -d /usr/lib/nx/X11/Xinerama; then - if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6 - fi - - if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then - rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6 - fi - - if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then - rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1 - fi - - rmdir --ignore-fail-on-non-empty /usr/lib/nx/X11/Xinerama - - fi - ;; - deconfigure|upgrade|failed-upgrade) - : - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 729a2c6f4..c90bb6451 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,6 @@ override_dh_auto_clean: override_dh_clean: rm -f nx*/configure . ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done - rm -f debian/nxagent.postinst rm -fR .preserve/ dh_clean @@ -72,16 +71,12 @@ override_dh_auto_install: override_dh_auto_build: - # let's prep the nxagent.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable - sed debian/nxagent.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/nxagent.postinst - LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS="$(LDFLAGS)" SHLIBDIR="$(LIBDIR)" PREFIX=/usr dh_auto_build --parallel override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg - dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index af466b47f..3e7423040 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -226,9 +226,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXinerama #define BuildXinerama NO #endif -#ifndef BuildXineramaLibrary -#define BuildXineramaLibrary (BuildXinerama) -#endif #ifndef BuildXCSecurity #define BuildXCSecurity YES #endif @@ -1321,30 +1318,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) XLIBONLY = $(XONLYLIB) LINTXONLYLIB = $(LINTXONLY) -#if BuildXineramaLibrary -#ifndef SharedLibXinerama -#define SharedLibXinerama HasSharedLibraries -#endif -#ifndef NormalLibXinerama -#define NormalLibXinerama (!SharedLibXinerama || ForceNormalLib) -#endif -#ifndef DebugLibXinerama -#define DebugLibXinerama NO -#endif -#ifndef ProfileLibXinerama -#define ProfileLibXinerama NO -#endif -#else -#undef SharedLibXinerama -#define SharedLibXinerama NO -#undef NormalLibXinerama -#define NormalLibXinerama NO -#undef DebugLibXinerama -#define DebugLibXinerama NO -#undef ProfileLibXinerama -#define ProfileLibXinerama NO -#endif - #if BuildRenderLibrary #ifndef SharedLibXrender #define SharedLibXrender HasSharedLibraries @@ -1395,16 +1368,6 @@ LINTEXTENSIONLIB = $(LINTEXTENSION) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) - XINERAMALIBSRC = $(LIBSRC)/Xinerama -#if SharedLibXinerama -#ifndef SharedXineramaRev -#define SharedXineramaRev 1.0 -#endif -SharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev) -#else -ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir) -#endif - XRENDERLIBSRC = $(LIBSRC)/Xrender #if SharedLibXrender #ifndef SharedXrenderRev diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 33e854058..eb7763535 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -35,8 +35,8 @@ XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h vldXvMC.h #if BuildFontCache FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h #endif -#if BuildXinerama || BuildXineramaLibrary -XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h +#if BuildXinerama +XINERAMAHEADERS = panoramiXext.h panoramiXproto.h #endif #if BuildRandR RANDRHEADERS = randr.h randrproto.h diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index b97ef6b22..dbe4e4280 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -15,10 +15,6 @@ NULL = XKBLIBDIR = xkbfile #endif -#if BuildXineramaLibrary -XINERAMADIR=Xinerama -#endif - #if BuildRenderLibrary RENDERLIBDIR = Xrender #endif diff --git a/nx-X11/lib/Xinerama/Imakefile b/nx-X11/lib/Xinerama/Imakefile deleted file mode 100644 index 910f98da6..000000000 --- a/nx-X11/lib/Xinerama/Imakefile +++ /dev/null @@ -1,30 +0,0 @@ -XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.4 2002/10/16 00:37:31 dawes Exp $ - -#define DoNormalLib NormalLibXinerama -#define DoSharedLib SharedLibXinerama -#define DoDebugLib DebugLibXinerama -#define DoProfileLib ProfileLibXinerama -#define LibName NX_Xinerama -#define SoRev SOXINERAMAREV -#define LibHeaders NO - -#include - -#ifdef SharedXineramaReqs -REQUIREDLIBS = SharedXineramaReqs -#endif - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - - DEFINES = $(ALLOC_DEFINES) - SRCS = Xinerama.c - OBJS = Xinerama.o - LINTLIBS = $(LINTXLIB) - -#define IncludeSharedObjectInNormalLib - -#include - -DependTarget() diff --git a/nx-X11/lib/Xinerama/Xinerama-def.cpp b/nx-X11/lib/Xinerama/Xinerama-def.cpp deleted file mode 100644 index 01449d15b..000000000 --- a/nx-X11/lib/Xinerama/Xinerama-def.cpp +++ /dev/null @@ -1,14 +0,0 @@ -LIBRARY Xinerama -VERSION LIBRARY_VERSION -EXPORTS - XPanoramiXAllocInfo - XPanoramiXGetScreenCount - XPanoramiXGetScreenSize - XPanoramiXGetState - XPanoramiXQueryExtension - XPanoramiXQueryVersion - XineramaIsActive - XineramaQueryExtension - XineramaQueryScreens - XineramaQueryVersion -/* $XFree86$ */ diff --git a/nx-X11/lib/Xinerama/Xinerama.c b/nx-X11/lib/Xinerama/Xinerama.c deleted file mode 100644 index 0256336be..000000000 --- a/nx-X11/lib/Xinerama/Xinerama.c +++ /dev/null @@ -1,361 +0,0 @@ -/* $Xorg: XPanoramiX.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */ -/***************************************************************** -Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. -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. - -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 -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. -******************************************************************/ -/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _panoramiX_ext_info_data; -static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; -static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; - -#define PanoramiXCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, panoramiX_extension_name, val) -#define PanoramiXSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, panoramiX_extension_name) - -static int close_display(); -static /* const */ XExtensionHooks panoramiX_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, panoramiX_ext_info, - panoramiX_extension_name, - &panoramiX_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info) - - - -/**************************************************************************** - * * - * PanoramiX public interfaces * - * * - ****************************************************************************/ - -Bool XPanoramiXQueryExtension ( - Display *dpy, - int *event_basep, - int *error_basep -) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status XPanoramiXQueryVersion( - Display *dpy, - int *major_versionp, - int *minor_versionp -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXQueryVersionReply rep; - register xPanoramiXQueryVersionReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXQueryVersion; - req->clientMajor = PANORAMIX_MAJOR_VERSION; - req->clientMinor = PANORAMIX_MINOR_VERSION; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -XPanoramiXInfo *XPanoramiXAllocInfo(void) -{ - return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo)); -} - -Status XPanoramiXGetState ( - Display *dpy, - Drawable drawable, - XPanoramiXInfo *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetStateReply rep; - register xPanoramiXGetStateReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetState, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetState; - req->window = drawable; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->State = rep.state; - return 1; -} - -Status XPanoramiXGetScreenCount ( - Display *dpy, - Drawable drawable, - XPanoramiXInfo *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetScreenCountReply rep; - register xPanoramiXGetScreenCountReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetScreenCount, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetScreenCount; - req->window = drawable; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->ScreenCount = rep.ScreenCount; - return 1; -} - -Status XPanoramiXGetScreenSize ( - Display *dpy, - Drawable drawable, - int screen_num, - XPanoramiXInfo *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetScreenSizeReply rep; - register xPanoramiXGetScreenSizeReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetScreenSize, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetScreenSize; - req->window = drawable; - req->screen = screen_num; /* need to define */ - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->screen = rep.screen; - panoramiX_info->width = rep.width; - panoramiX_info->height = rep.height; - return 1; -} - -/*******************************************************************\ - Alternate interface to make up for shortcomings in the original, - namely, the omission of the screen origin. The new interface is - in the "Xinerama" namespace instead of "PanoramiX". -\*******************************************************************/ - -Bool XineramaQueryExtension ( - Display *dpy, - int *event_base, - int *error_base -) -{ - return XPanoramiXQueryExtension(dpy, event_base, error_base); -} - -Status XineramaQueryVersion( - Display *dpy, - int *major, - int *minor -) -{ - return XPanoramiXQueryVersion(dpy, major, minor); -} - -Bool XineramaIsActive(Display *dpy) -{ - xXineramaIsActiveReply rep; - xXineramaIsActiveReq *req; - XExtDisplayInfo *info = find_display (dpy); - - - FILE* fptr; - if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))!=NULL) { - fclose (fptr); - return True; - } - else { - return False; - } - - if(!XextHasExtension(info)) - return False; /* server doesn't even have the extension */ - - LockDisplay (dpy); - GetReq (XineramaIsActive, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_XineramaIsActive; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - UnlockDisplay (dpy); - SyncHandle (); - return rep.state; -} - - -XineramaScreenInfo * -XineramaQueryScreens( - Display *dpy, - int *number -) -{ - XExtDisplayInfo *info = find_display (dpy); - xXineramaQueryScreensReply rep; - xXineramaQueryScreensReq *req; - XineramaScreenInfo *scrnInfo = NULL; - - int i; - int x,y,w,h; - FILE* fptr; - if((fptr=fopen(getenv("NX_XINERAMA_CONF"),"r"))==NULL) { - PanoramiXCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (XineramaQueryScreens, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_XineramaQueryScreens; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - if(rep.number) { - if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { - xXineramaScreenInfo scratch; - int i; - - for(i = 0; i < rep.number; i++) { - _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); - scrnInfo[i].screen_number = i; - scrnInfo[i].x_org = scratch.x_org; - scrnInfo[i].y_org = scratch.y_org; - scrnInfo[i].width = scratch.width; - scrnInfo[i].height = scratch.height; - } - - *number = rep.number; - } else { - _XEatData(dpy, rep.length << 2); - } - } - - UnlockDisplay (dpy); - SyncHandle (); - - } else { - - i=0; - while(!feof(fptr)) { - w=h=0; - fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); - if(w&&h) - i++; - } - rewind(fptr); - *number=i; - if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * i))) { - i=0; - while(!feof(fptr)){ - w=h=0; - fscanf(fptr,"%d %d %d %d",&x,&y,&w,&h); - if(w&&h){ - scrnInfo[i].screen_number=i; - scrnInfo[i].x_org=x; - scrnInfo[i].y_org=y; - scrnInfo[i].width=w; - scrnInfo[i].height=h; - i++; - } - } - } - fclose(fptr); - } - - return scrnInfo; -} - - - diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 309d5d98f..d034c2672 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -413,7 +413,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ - -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 491a92c2f..2f70334d4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -79,6 +79,10 @@ is" without express or implied warranty. #include "X11/include/Xrandr_nxagent.h" +#include +#include "X11/include/Xinerama_nxagent.h" + + #define GC XlibGC #define Font XlibFont #define KeySym XlibKeySym diff --git a/nx-libs.spec b/nx-libs.spec index 22094c2a5..01341a4ca 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -39,6 +39,7 @@ BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(xinerama) %else BuildRequires: libexpat-devel BuildRequires: libpng-devel @@ -53,6 +54,7 @@ BuildRequires: xorg-x11-libXcomposite-devel BuildRequires: xorg-x11-libXrandr-devel BuildRequires: xorg-x11-libXfixes-devel BuildRequires: xorg-x11-libXtst-devel +BuildRequires: xorg-x11-libXinerama-devel %endif BuildRequires: xorg-x11-util-devel %endif @@ -67,6 +69,7 @@ BuildRequires: libXcomposite-devel BuildRequires: libXrandr-devel BuildRequires: libXfixes-devel BuildRequires: libXtst-devel +BuildRequires: libXinerama-devel %endif # For imake @@ -84,20 +87,6 @@ Provides: nx = %{version}-%{release} Obsoletes: nx%{?_isa} < 3.5.0-19 Provides: nx%{?_isa} = %{version}-%{release} -# for Xinerama in NX to work: -%if 0%{?suse_version} -%if 0%{?suse_version} < 1140 -Requires: xorg-x11-libX11%{?_isa} -Requires: xorg-x11-libXext%{?_isa} -%else -Requires: libX11-6%{?_isa} -Requires: libXext6%{?_isa} -%endif -%else -Requires: libX11%{?_isa} -Requires: libXext%{?_isa} -%endif - %if 0%{?el5} # For compatibility with EPEL5 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -244,22 +233,6 @@ The NX_Xext library contains a handful of X11 extensions: - X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) -%package -n libNX_Xinerama1 -Group: System Environment/Libraries -Summary: Xinerama extension to the NX Protocol -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xinerama - -%description -n libNX_Xinerama1 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -Xinerama is an extension to the X Window System which enables -multi-headed X applications and window managers to use two or more -physical displays as one large virtual display. - - %package -n libNX_Xrender-devel Group: Development/Libraries Summary: Development files for the NX Render Extension library @@ -553,11 +526,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans -# Needed for Xinerama support -ln -s -f ../../../../%{_lib}/libX11.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6 -ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_Xext.so.6 -ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/Xinerama/libXinerama.so.1 - %if 0%{?fdupes:1} %fdupes %buildroot/%_prefix %endif @@ -566,7 +534,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %post -n libNX_X11-6 -p /sbin/ldconfig %post -n libNX_Xau6 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig -%post -n libNX_Xinerama1 -p /sbin/ldconfig %post -n libNX_Xrender1 -p /sbin/ldconfig %post -n libXcomp3 -p /sbin/ldconfig %post -n libXcompext3 -p /sbin/ldconfig @@ -575,7 +542,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %postun -n libNX_X11-6 -p /sbin/ldconfig %postun -n libNX_Xau6 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig -%postun -n libNX_Xinerama1 -p /sbin/ldconfig %postun -n libNX_Xrender1 -p /sbin/ldconfig %postun -n libXcomp3 -p /sbin/ldconfig %postun -n libXcompext3 -p /sbin/ldconfig @@ -654,10 +620,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_Xext.so.6* -%files -n libNX_Xinerama1 -%defattr(-,root,root) -%{_libdir}/libNX_Xinerama.so.1* - %files -n libNX_Xrender-devel %defattr(-,root,root) %{_libdir}/libNX_Xrender.so @@ -722,7 +684,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files devel %defattr(-,root,root) -%{_libdir}/libNX_Xinerama.so %{_includedir}/nx-X11/X10.h %dir %{_includedir}/nx-X11/extensions %{_includedir}/nx-X11/extensions/Xevie.h -- cgit v1.2.3 From 522cf0089e4db707346c25d826c33e92ef09db8a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 7 Oct 2015 21:33:55 +0200 Subject: X2Go Agent: Add x2goagent.features file that informs X2Go clients about the new RandR based Xinerama feature. --- Makefile | 9 +++++++++ debian/x2goagent.install | 1 + x2goagent.features | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 x2goagent.features (limited to 'debian') diff --git a/Makefile b/Makefile index 14f6e4266..c9a52ac02 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ USRLIBDIR ?= $(LIBDIR) INCLUDEDIR ?= $(PREFIX)/include NXLIBDIR ?= $(PREFIX)/lib/nx X2GOLIBDIR ?= $(PREFIX)/lib/x2go +X2GODATADIR ?= $(PREFIX)/share/x2go CONFIGURE ?= ./configure NX_VERSION_MAJOR=$(shell ./version.sh 1) @@ -163,6 +164,10 @@ install-full: $(INSTALL_FILE) etc/nxagent.keyboard $(DESTDIR)$(ETCDIR_NX)/ $(INSTALL_FILE) etc/x2goagent.keyboard $(DESTDIR)$(ETCDIR_X2GO)/ + # x2goagent.features file for X2Go + $(INSTALL_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ + $(INSTALL_FILE) x2goagent.features $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go $(INSTALL_SYMLINK) $(ETCDIR_X2GO)/rgb $(DESTDIR)$(PREFIX)/share/x2go/rgb @@ -191,6 +196,10 @@ uninstall-full: $(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent $(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ + # x2goagent.features file for X2Go + $(RM_FILE) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/x2goagent.features + $(RM_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ + if test -d nx-X11; then \ if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ diff --git a/debian/x2goagent.install b/debian/x2goagent.install index 9ef17d9c6..0603507ef 100644 --- a/debian/x2goagent.install +++ b/debian/x2goagent.install @@ -5,5 +5,6 @@ usr/share/x2go/rgb usr/share/man/man1/x2goagent.1* etc/x2go/rgb usr/share/x2go/versions/VERSION.x2goagent +usr/share/x2go/x2gofeature.d/x2goagent.features etc/x2go/keystrokes.cfg etc/x2go/x2goagent.keyboard diff --git a/x2goagent.features b/x2goagent.features new file mode 100644 index 000000000..12d62e01c --- /dev/null +++ b/x2goagent.features @@ -0,0 +1,37 @@ +#!/bin/bash + +# Copyright (C) 2015, Mike Gabriel +# +# 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., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +# silently bail out if X2Go Server is not installed +if ! which x2gopath 1>/dev/null; then + exit 0 +fi + +X2GO_LIB_PATH="$(x2gopath libexec)"; + +$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@" + +X2GO_FEATURE=$1 + +# check for X2Go Agent features +case "$X2GO_FEATURE" in + + "X2GOAGENT_RANDRXINERAMA") echo "ok"; exit 0;; + *) exit -1;; + +esac -- cgit v1.2.3 From e794be341e7ca63ff9e0397c60e408c610d63067 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 2 Jan 2016 07:30:02 +0100 Subject: debian/nx-x11proto-xinerama-dev.install.in: Install PANORAMIX extension header files into its own nx-x11proto bin:package. (more Xinerama clean-up, fix FTBFS during dh_install). --- debian/nx-x11proto-xinerama-dev.install.in | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 debian/nx-x11proto-xinerama-dev.install.in (limited to 'debian') diff --git a/debian/nx-x11proto-xinerama-dev.install.in b/debian/nx-x11proto-xinerama-dev.install.in new file mode 100644 index 000000000..2e1efbc63 --- /dev/null +++ b/debian/nx-x11proto-xinerama-dev.install.in @@ -0,0 +1,2 @@ +usr/include/*/nx-X11/extensions/panoramiXext.h +usr/include/*/nx-X11/extensions/panoramiXproto.h -- cgit v1.2.3 From af923fba314b0f7336125758ec57f37401d824ee Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 17 Mar 2016 16:46:13 +0100 Subject: debian/patches/401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch: Move into debian/patches-pending-evaluation/. --- ...sts-and-genericevent-extensions.full+lite.patch | 1870 ++++++++++++++++++++ 1 file changed, 1870 insertions(+) create mode 100644 debian/patches-pending-evaluation/401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch (limited to 'debian') diff --git a/debian/patches-pending-evaluation/401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch b/debian/patches-pending-evaluation/401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch new file mode 100644 index 000000000..ab16864df --- /dev/null +++ b/debian/patches-pending-evaluation/401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch @@ -0,0 +1,1870 @@ +--- a/nxcomp/ClientChannel.cpp ++++ b/nxcomp/ClientChannel.cpp +@@ -447,6 +447,26 @@ + } + } + ++ // Get other bits of the header, so will not need to refer to them again ++ unsigned char inputDataByte = inputMessage[1]; ++ unsigned int buffer2 = GetUINT(inputMessage + 2, bigEndian_); ++ unsigned int inputDataSize = buffer2 - 1; ++ if (buffer2 == 0) ++ { ++ // BIG-REQUESTS ++ inputMessage += 4; ++ inputLength -= 4; ++ inputDataSize = GetULONG(inputMessage, bigEndian_) - 2; ++ } ++ if (inputLength != (4 * (inputDataSize + 1))) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead: inputLength=" << inputLength ++ << " mismatch inputDataSize=" << inputDataSize ++ << ".\n" << logofs_flush; ++ #endif ++ } ++ + // + // Go to the message's specific encoding. + // +@@ -455,6 +475,11 @@ + { + case X_AllocColor: + { ++ #ifdef WARNING ++ if (inputLength < 14) ++ *logofs << "handleRead: X_AllocColor inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> colormapCache); + const unsigned char *nextSrc = inputMessage + 8; +@@ -476,6 +501,11 @@ + break; + case X_ReparentWindow: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_ReparentWindow inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, bigEndian_), +@@ -486,6 +516,11 @@ + break; + case X_ChangeProperty: + { ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: X_ChangeProperty inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_ChangeProperty); + +@@ -501,8 +536,36 @@ + encodeBuffer.encodeCachedValue(format, 8, + clientCache_ -> changePropertyFormatCache); + unsigned int dataLength = GetULONG(inputMessage + 20, bigEndian_); ++ ++ // Self-preserving sanity check (otherwise we crash and dump core): ++ // some clients do this when not getting their beloved BIG-REQUESTS. ++ unsigned int maxLength = 0; ++ if (format == 8) ++ { ++ maxLength = inputLength - 24; ++ } ++ else if (format == 32) ++ { ++ maxLength = (inputLength - 24) >> 2; ++ } ++ else if (format == 16) ++ { ++ maxLength = (inputLength - 24) >> 1; ++ } ++ if (dataLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_ChangeProperty bogus dataLength=" << dataLength ++ << " set to " << maxLength ++ << " when format=" << (int)format ++ << " inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ dataLength = maxLength; ++ } ++ + encodeBuffer.encodeValue(dataLength, 32, 6); +- encodeBuffer.encodeValue(inputMessage[1], 2); ++ encodeBuffer.encodeValue(inputDataByte, 2); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 8, bigEndian_), 29, +@@ -533,7 +596,7 @@ + nextSrc += 4; + } + } +- else ++ else if (format == 16) + { + for (unsigned int i = 0; i < dataLength; i++) + { +@@ -541,6 +604,13 @@ + nextSrc += 2; + } + } ++ else ++ { ++ #ifdef WARNING ++ *logofs << "ChangeProperty bogus format=" << (int)format ++ << ".\n" << logofs_flush; ++ #endif ++ } + } + break; + case X_SendEvent: +@@ -551,6 +621,11 @@ + // ratio. + // + ++ #ifdef WARNING ++ if (inputLength < 44) ++ *logofs << "handleRead: X_SendEvent inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_SendEvent); + +@@ -562,7 +637,7 @@ + break; + } + +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + unsigned int window = GetULONG(inputMessage + 4, bigEndian_); + + if (window == 0 || window == 1) +@@ -599,7 +674,12 @@ + break; + case X_ChangeWindowAttributes: + { +- encodeBuffer.encodeValue((inputLength - 12) >> 2, 4); ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_ChangeWindowAttributes inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeValue(inputDataSize - 2, 4); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + unsigned int bitmask = GetULONG(inputMessage + 8, bigEndian_); +@@ -621,6 +701,11 @@ + break; + case X_ClearArea: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_ClearArea inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -654,7 +739,7 @@ + break; + } + +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + const unsigned char *nextSrc = inputMessage + 8; +@@ -668,6 +753,11 @@ + break; + case X_CloseFont: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_CloseFont inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int font = GetULONG(inputMessage + 4, bigEndian_); + encodeBuffer.encodeValue(font - clientCache_ -> lastFont, 29, 5); + clientCache_ -> lastFont = font; +@@ -675,6 +765,11 @@ + break; + case X_ConfigureWindow: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_ConfigureWindow inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_ConfigureWindow); + +@@ -708,6 +803,11 @@ + break; + case X_ConvertSelection: + { ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: X_ConvertSelection inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> convertSelectionRequestorCache, 9); + const unsigned char* nextSrc = inputMessage + 8; +@@ -725,6 +825,11 @@ + break; + case X_CopyArea: + { ++ #ifdef WARNING ++ if (inputLength < 28) ++ *logofs << "handleRead: X_CopyArea inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -793,6 +898,11 @@ + break; + case X_CopyGC: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_CopyGC inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int s_g_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -814,6 +924,11 @@ + break; + case X_CopyPlane: + { ++ #ifdef WARNING ++ if (inputLength < 32) ++ *logofs << "handleRead: X_CopyPlane inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, +@@ -833,6 +948,11 @@ + break; + case X_CreateGC: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_CreateGC inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int g_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -917,6 +1037,11 @@ + break; + case X_ChangeGC: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_ChangeGC inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int g_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -998,14 +1123,19 @@ + break; + case X_CreatePixmap: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_CreatePixmap inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + +- *logofs << "handleRead: X_CreatePixmap depth " << (unsigned) inputMessage[1] ++ *logofs << "handleRead: X_CreatePixmap depth " << (unsigned) inputDataByte + << ", pixmap id " << GetULONG(inputMessage + 4, bigEndian_) + << ", drawable " << GetULONG(inputMessage + 8, bigEndian_) + << ", width " << GetUINT(inputMessage + 12, bigEndian_) + << ", height " << GetUINT(inputMessage + 14, bigEndian_) +- << ", size " << GetUINT(inputMessage + 2, bigEndian_) << 2 ++ << ", length " << inputLength + << ".\n" << logofs_flush; + + unsigned int p_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1042,6 +1172,11 @@ + break; + case X_CreateWindow: + { ++ #ifdef WARNING ++ if (inputLength < 32) ++ *logofs << "handleRead: X_CreateWindow inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int w_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1054,7 +1189,7 @@ + #endif + + unsigned bitmask = GetULONG(inputMessage + 28, bigEndian_); +- encodeBuffer.encodeCachedValue((unsigned int) inputMessage[1], 8, ++ encodeBuffer.encodeCachedValue((unsigned int) inputDataByte, 8, + clientCache_ -> depthCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, bigEndian_), + clientCache_ -> windowCache); +@@ -1098,6 +1233,11 @@ + break; + case X_DeleteProperty: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_DeleteProperty inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + encodeBuffer.encodeValue(GetULONG(inputMessage + 8, bigEndian_), 29, 9); +@@ -1105,6 +1245,11 @@ + break; + case X_FillPoly: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_FillPoly inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1138,7 +1283,7 @@ + break; + } + +- unsigned int numPoints = ((inputLength - 16) >> 2); ++ unsigned int numPoints = (inputDataSize - 3); + + if (control -> isProtoStep10() == 1) + { +@@ -1209,7 +1354,12 @@ + break; + case X_FreeColors: + { +- unsigned int numPixels = GetUINT(inputMessage + 2, bigEndian_) - 3; ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_FreeColors inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ unsigned int numPixels = inputDataSize - 2; + encodeBuffer.encodeValue(numPixels, 16, 4); + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> colormapCache); +@@ -1225,12 +1375,22 @@ + break; + case X_FreeCursor: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_FreeCursor inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), + 29, clientCache_ -> cursorCache, 9); + } + break; + case X_FreeGC: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_FreeGC inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int g_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1284,6 +1444,11 @@ + break; + case X_FreePixmap: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_FreePixmap inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int p_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1318,6 +1483,11 @@ + break; + case X_GetAtomName: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_GetAtomName inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeValue(GetULONG(inputMessage + 4, bigEndian_), 29, 9); + + sequenceQueue_.push(clientSequence_, inputOpcode); +@@ -1327,6 +1497,11 @@ + break; + case X_GetGeometry: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_GetGeometry inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> drawableCache); + +@@ -1351,6 +1526,11 @@ + break; + case X_GetKeyboardMapping: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_GetKeyboardMapping inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeValue((unsigned int) inputMessage[4], 8); + encodeBuffer.encodeValue((unsigned int) inputMessage[5], 8); + +@@ -1361,6 +1541,11 @@ + break; + case X_GetProperty: + { ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: X_GetProperty inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_GetProperty); + +@@ -1378,7 +1563,7 @@ + break; + } + +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + unsigned int property = GetULONG(inputMessage + 8, bigEndian_); +@@ -1394,6 +1579,11 @@ + break; + case X_GetSelectionOwner: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_GetSelectionOwner inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> getSelectionOwnerSelectionCache, 9); + +@@ -1404,7 +1594,12 @@ + break; + case X_GrabButton: + { +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: X_GrabButton inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + encodeBuffer.encodeCachedValue(GetUINT(inputMessage + 8, bigEndian_), 16, +@@ -1423,7 +1618,12 @@ + break; + case X_GrabPointer: + { +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: X_GrabPointer inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + encodeBuffer.encodeCachedValue(GetUINT(inputMessage + 8, bigEndian_), 16, +@@ -1448,7 +1648,12 @@ + break; + case X_GrabKeyboard: + { +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_GrabKeyboard inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> windowCache); + unsigned int timestamp = GetULONG(inputMessage + 8, bigEndian_); +@@ -1471,6 +1676,11 @@ + break; + case X_PolyText8: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_PolyText8 inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1555,6 +1765,11 @@ + break; + case X_PolyText16: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_PolyText16 inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1639,6 +1854,11 @@ + break; + case X_ImageText8: + { ++ #ifdef WARNING ++ if (inputLength < 16 + (unsigned int)inputDataByte) ++ *logofs << "handleRead: X_ImageText8 inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1673,7 +1893,7 @@ + break; + } + +- unsigned int textLength = (unsigned int) inputMessage[1]; ++ unsigned int textLength = (unsigned int) inputDataByte; + encodeBuffer.encodeCachedValue(textLength, 8, + clientCache_ -> imageTextLengthCache, 4); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, +@@ -1706,6 +1926,11 @@ + break; + case X_ImageText16: + { ++ #ifdef WARNING ++ if (inputLength < 16 + (unsigned int)inputDataByte) ++ *logofs << "handleRead: X_ImageText16 inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -1740,7 +1965,7 @@ + break; + } + +- unsigned int textLength = (unsigned int) inputMessage[1]; ++ unsigned int textLength = (unsigned int) inputDataByte; + encodeBuffer.encodeCachedValue(textLength, 8, + clientCache_ -> imageTextLengthCache, 4); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, +@@ -1773,6 +1998,11 @@ + break; + case X_InternAtom: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_InternAtom inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_InternAtom); + +@@ -1796,8 +2026,18 @@ + } + + unsigned int nameLength = GetUINT(inputMessage + 4, bigEndian_); ++ unsigned int maxLength = inputLength - 8; ++ if (nameLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_InternAtom bogus nameLength=" << nameLength ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ nameLength = maxLength; ++ } + encodeBuffer.encodeValue(nameLength, 16, 6); +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + const unsigned char *nextSrc = inputMessage + 8; + + if (control -> isProtoStep7() == 1) +@@ -1827,7 +2067,22 @@ + break; + case X_ListFonts: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_ListFonts inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int textLength = GetUINT(inputMessage + 6, bigEndian_); ++ unsigned int maxLength = inputLength - 8; ++ if (textLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_ListFonts bogus textLength=" << textLength ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ textLength = maxLength; ++ } + encodeBuffer.encodeValue(textLength, 16, 6); + encodeBuffer.encodeValue(GetUINT(inputMessage + 4, bigEndian_), 16, 6); + const unsigned char* nextSrc = inputMessage + 8; +@@ -1853,7 +2108,22 @@ + case X_LookupColor: + case X_AllocNamedColor: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_AllocNamedColor inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int textLength = GetUINT(inputMessage + 8, bigEndian_); ++ unsigned int maxLength = inputLength - 12; ++ if (textLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_AllocNamedColor bogus textLength=" << textLength ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ textLength = maxLength; ++ } + encodeBuffer.encodeValue(textLength, 16, 6); + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), + 29, clientCache_ -> colormapCache); +@@ -1886,6 +2156,11 @@ + case X_QueryPointer: + case X_QueryTree: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_MapWindow...X_QueryTree inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + if (inputOpcode == X_DestroyWindow) +@@ -1923,7 +2198,22 @@ + break; + case X_OpenFont: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_OpenFont inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int nameLength = GetUINT(inputMessage + 8, bigEndian_); ++ unsigned int maxLength = inputLength - 12; ++ if (nameLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_InternAtom bogus nameLength=" << nameLength ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ nameLength = maxLength; ++ } + encodeBuffer.encodeValue(nameLength, 16, 7); + unsigned int font = GetULONG(inputMessage + 4, bigEndian_); + encodeBuffer.encodeValue(font - clientCache_ -> lastFont, 29, 5); +@@ -1947,6 +2237,11 @@ + break; + case X_PolyFillRectangle: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyFillRectangle inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2034,6 +2329,11 @@ + break; + case X_PolyFillArc: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyFillArc inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2135,6 +2435,11 @@ + break; + case X_PolyArc: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyArc inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2236,6 +2541,11 @@ + break; + case X_PolyPoint: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyPoint inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2269,8 +2579,8 @@ + break; + } + +- encodeBuffer.encodeValue(GetUINT(inputMessage + 2, bigEndian_) - 3, 16, 4); +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeValue(inputDataSize - 2, 32, 4); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> drawableCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, bigEndian_), +@@ -2303,6 +2613,11 @@ + break; + case X_PolyLine: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyLine inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2336,8 +2651,8 @@ + break; + } + +- encodeBuffer.encodeValue(GetUINT(inputMessage + 2, bigEndian_) - 3, 16, 4); +- encodeBuffer.encodeBoolValue((unsigned int) inputMessage[1]); ++ encodeBuffer.encodeValue(inputDataSize - 2, 32, 4); ++ encodeBuffer.encodeBoolValue((unsigned int) inputDataByte); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, +@@ -2370,8 +2685,12 @@ + break; + case X_PolyRectangle: + { +- encodeBuffer.encodeValue((GetUINT(inputMessage + 2, +- bigEndian_) - 3) >> 1, 16, 3); ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolyRectangle inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeValue((inputDataSize - 2) >> 1, 32, 3); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, +@@ -2391,6 +2710,11 @@ + break; + case X_PolySegment: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_PolySegment inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2424,8 +2748,7 @@ + break; + } + +- encodeBuffer.encodeValue((GetUINT(inputMessage + 2, +- bigEndian_) - 3) >> 1, 16, 4); ++ encodeBuffer.encodeValue((inputDataSize - 2) >> 1, 32, 4); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 8, +@@ -2491,6 +2814,11 @@ + break; + case X_PutImage: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_PutImage inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2522,7 +2850,12 @@ + break; + case X_QueryBestSize: + { +- encodeBuffer.encodeValue((unsigned int)inputMessage[1], 2); ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_QueryBestSize inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif ++ encodeBuffer.encodeValue((unsigned int)inputDataByte, 2); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); + encodeBuffer.encodeValue(GetUINT(inputMessage + 8, bigEndian_), 16, 8); +@@ -2535,10 +2868,15 @@ + break; + case X_QueryColors: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_QueryColors inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + // Differential encoding. + encodeBuffer.encodeBoolValue(1); + +- unsigned int numColors = ((inputLength - 8) >> 2); ++ unsigned int numColors = (inputDataSize - 1); + encodeBuffer.encodeValue(numColors, 16, 5); + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> colormapCache); +@@ -2567,15 +2905,20 @@ + break; + case X_QueryExtension: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_QueryExtension inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TEST + + char data[256]; + + int length = GetUINT(inputMessage + 4, bigEndian_); + +- if (length > 256) ++ if (length > 255) + { +- length = 256; ++ length = 255; + } + + strncpy(data, (char *) inputMessage + 8, length); +@@ -2588,6 +2931,16 @@ + #endif + + unsigned int nameLength = GetUINT(inputMessage + 4, bigEndian_); ++ unsigned int maxLength = inputLength - 8; ++ if (nameLength > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_QueryExtension bogus nameLength=" << nameLength ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ nameLength = maxLength; ++ } + encodeBuffer.encodeValue(nameLength, 16, 6); + const unsigned char *nextSrc = inputMessage + 8; + +@@ -2614,6 +2967,11 @@ + break; + case X_QueryFont: + { ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: X_QueryFont inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int font = GetULONG(inputMessage + 4, bigEndian_); + encodeBuffer.encodeValue(font - clientCache_ -> lastFont, 29, 5); + clientCache_ -> lastFont = font; +@@ -2625,6 +2983,11 @@ + break; + case X_SetClipRectangles: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_SetClipRectangles inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + MessageStore *messageStore = clientStore_ -> + getRequestStore(X_SetClipRectangles); + +@@ -2636,7 +2999,7 @@ + break; + } + +- unsigned int numRectangles = ((inputLength - 12) >> 3); ++ unsigned int numRectangles = ((inputDataSize - 2) >> 1); + + if (control -> isProtoStep9() == 1) + { +@@ -2647,7 +3010,7 @@ + encodeBuffer.encodeValue(numRectangles, 13, 4); + } + +- encodeBuffer.encodeValue((unsigned int) inputMessage[1], 2); ++ encodeBuffer.encodeValue((unsigned int) inputDataByte, 2); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), + clientCache_ -> gcCache); + encodeBuffer.encodeCachedValue(GetUINT(inputMessage + 8, bigEndian_), 16, +@@ -2668,7 +3031,22 @@ + break; + case X_SetDashes: + { ++ #ifdef WARNING ++ if (inputLength < 12) ++ *logofs << "handleRead: X_SetDashes inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + unsigned int numDashes = GetUINT(inputMessage + 10, bigEndian_); ++ unsigned int maxLength = inputLength - 12; ++ if (numDashes > maxLength) ++ { ++ #ifdef WARNING ++ *logofs << "handleRead X_SetDashes bogus numDashes=" << numDashes ++ << " set to " << maxLength ++ << ".\n" << logofs_flush; ++ #endif ++ numDashes = maxLength; ++ } + encodeBuffer.encodeCachedValue(numDashes, 16, + clientCache_ -> setDashesLengthCache, 5); + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, bigEndian_), +@@ -2683,6 +3061,11 @@ + break; + case X_SetSelectionOwner: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_SetSelectionOwner inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 4, bigEndian_), 29, + clientCache_ -> setSelectionOwnerCache, 9); + encodeBuffer.encodeCachedValue(GetULONG(inputMessage + 8, bigEndian_), 29, +@@ -2693,6 +3076,11 @@ + break; + case X_TranslateCoords: + { ++ #ifdef WARNING ++ if (inputLength < 16) ++ *logofs << "handleRead: X_TranslateCoords inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2764,6 +3152,11 @@ + break; + case X_GetImage: + { ++ #ifdef WARNING ++ if (inputLength < 20) ++ *logofs << "handleRead: X_GetImage inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -2802,7 +3195,7 @@ + } + + // Format. +- encodeBuffer.encodeValue((unsigned int) inputMessage[1], 2); ++ encodeBuffer.encodeValue((unsigned int) inputDataByte, 2); + // Drawable. + encodeBuffer.encodeXidValue(GetULONG(inputMessage + 4, + bigEndian_), clientCache_ -> drawableCache); +@@ -2869,6 +3262,11 @@ + } + else if (inputOpcode == opcodeStore_ -> putPackedImage) + { ++ #ifdef WARNING ++ if (inputLength < 24) ++ *logofs << "handleRead: putPackedImage inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + #ifdef TARGETS + + unsigned int t_id = GetULONG(inputMessage + 4, bigEndian_); +@@ -3004,7 +3402,7 @@ + << ".\n" << logofs_flush; + #endif + +- encodeBuffer.encodeCachedValue(*(inputMessage + 1), 8, ++ encodeBuffer.encodeCachedValue(inputDataByte, 8, + clientCache_ -> resourceCache); + } + else if (inputOpcode == opcodeStore_ -> freeUnpack) +@@ -3015,7 +3413,7 @@ + << ".\n" << logofs_flush; + #endif + +- encodeBuffer.encodeCachedValue(*(inputMessage + 1), 8, ++ encodeBuffer.encodeCachedValue(inputDataByte, 8, + clientCache_ -> resourceCache); + } + else if (inputOpcode == opcodeStore_ -> getControlParameters) +@@ -3130,6 +3528,11 @@ + // Enable or disable expose events + // coming from the real server. + // ++ #ifdef WARNING ++ if (inputLength < 8) ++ *logofs << "handleRead: setExposeParameters inputLength=" << inputLength ++ << ".\n" << logofs_flush; ++ #endif + + encodeBuffer.encodeBoolValue(*(inputMessage + 4)); + encodeBuffer.encodeBoolValue(*(inputMessage + 5)); +@@ -3198,10 +3601,10 @@ + { + if (hit) + { +- statistics -> addRenderCachedRequest(*(inputMessage + 1)); ++ statistics -> addRenderCachedRequest(inputDataByte); + } + +- statistics -> addRenderRequestBits(*(inputMessage + 1), inputLength << 3, bits); ++ statistics -> addRenderRequestBits(inputDataByte, inputLength << 3, bits); + } + + } // End if (firstRequest_)... else ... +@@ -4548,10 +4951,10 @@ + // + + /* +-FIXME: Recover the sequence number if the proxy ++Fixed as below? - FIXME: Recover the sequence number if the proxy + is not connected to an agent. + */ +- if (serverSequence_ > lastSequence_ || ++ if (SequenceNumber_x_gt_y(serverSequence_, lastSequence_) || + control -> SessionMode != session_proxy) + { + #ifdef DEBUG +@@ -4564,7 +4967,7 @@ + lastSequence_ = serverSequence_; + } + #ifdef DEBUG +- else if (serverSequence_ < lastSequence_) ++ else if (SequenceNumber_x_gt_y(lastSequence_, serverSequence_)) + { + // + // Use our last auto-generated sequence. +@@ -5003,6 +5406,12 @@ + break; + default: + { ++ // BEWARE: not only inputOpcode == GenericEvent but also ++ // others not handled above, at least: ++ // GraphicsExpose 13 ++ // MapRequest 20 ++ // ConfigureRequest 23 ++ // and any beyond LASTEvent. + #ifdef TEST + *logofs << "handleWrite: Using generic event compression " + << "for OPCODE#" << (unsigned int) outputOpcode +@@ -5014,11 +5423,51 @@ + + for (unsigned int i = 0; i < 14; i++) + { +- decodeBuffer.decodeCachedValue(value, 16, +- *serverCache_ -> genericEventIntCache[i]); ++ //decodeBuffer.decodeCachedValue(value, 16, ++ // *serverCache_ -> genericEventIntCache[i]); ++ if ( ! (decodeBuffer.decodeCachedValue(value, 16, ++ *serverCache_ -> genericEventIntCache[i])) ) ++ { ++ #ifdef WARNING ++ *logofs << "decodeCachedValue failed for GenEvt:" ++ << " buffer length=" << length ++ << " i=" << i ++ << "\n" << logofs_flush; ++ #endif ++ break; ++ } + + PutUINT(value, outputMessage + i * 2 + 4, bigEndian_); + } ++ // Handle "X Generic Event Extension" ++ // Extra data is not cached... ++ if (outputOpcode == GenericEvent && *(outputMessage+1) != 0 && outputLength == 32) ++ { ++ unsigned int extraOutputLength = (GetULONG(outputMessage + 4, bigEndian_) << 2); ++ if (extraOutputLength > 0 && extraOutputLength < 100*1024*1024) ++ { ++ // Extend buffer for the extra data ++ outputMessage = writeBuffer_.addMessage(extraOutputLength); ++ // Decode data and write into buffer at new position ++ for (unsigned int i = 0; i < (extraOutputLength>>1); i++) ++ { ++ //decodeBuffer.decodeValue(value, 16); ++ if ( ! (decodeBuffer.decodeValue(value, 16)) ) ++ { ++ #ifdef WARNING ++ *logofs << "decodeValue failed for GenEvt:" ++ << " extraOutputLength=" << extraOutputLength ++ << " buffer length=" << length ++ << " i=" << i ++ << "\n" << logofs_flush; ++ #endif ++ break; ++ } ++ PutUINT(value, outputMessage + i * 2, bigEndian_); ++ } ++ } ++ } ++ + } + } // End of switch (outputOpcode)... + +@@ -6892,7 +7341,7 @@ + } + else + { +- if (serverSequence_ > lastSequence_) ++ if (SequenceNumber_x_gt_y(serverSequence_, lastSequence_)) + { + #ifdef DEBUG + *logofs << "handleNotify: Updating last event's sequence " +@@ -6904,7 +7353,7 @@ + lastSequence_ = serverSequence_; + } + #ifdef DEBUG +- else if (serverSequence_ < lastSequence_) ++ else if (SequenceNumber_x_gt_y(lastSequence_, serverSequence_)) + { + // + // Use our last auto-generated sequence. +--- a/nxcomp/ClientReadBuffer.cpp ++++ b/nxcomp/ClientReadBuffer.cpp +@@ -119,15 +119,34 @@ + + dataLength = (GetUINT(start + 2, bigEndian_) << 2); + +- if (dataLength < 4) ++ if (dataLength == 0) // or equivalently (dataLength < 4) + { +- #ifdef TEST +- *logofs << "ClientReadBuffer: WARNING! Assuming length 4 " +- << "for suspicious message of length " << dataLength +- << ".\n" << logofs_flush; +- #endif ++ // BIG-REQUESTS extension ++ if (size < 8) ++ { ++ remaining_ = 8 - size; ++ return 0; ++ } + +- dataLength = 4; ++ dataLength = (GetULONG(start + 4, bigEndian_) << 2); ++ ++// See WRITE_BUFFER_OVERFLOW_SIZE elsewhere ++// and also ENCODE_BUFFER_OVERFLOW_SIZE DECODE_BUFFER_OVERFLOW_SIZE. ++ if (dataLength < 8 || dataLength > 100*1024*1024) ++ { ++ #ifdef WARNING ++ *logofs << "BIG-REQUESTS with unacceptable dataLength=" ++ << dataLength << ", now set to 8.\n" << logofs_flush; ++ #endif ++ dataLength = 8; ++ } ++ else if (dataLength < 4*64*1024) ++ { ++ #ifdef WARNING ++ *logofs << "BIG-REQUESTS with silly dataLength=" ++ << dataLength << ".\n" << logofs_flush; ++ #endif ++ } + } + } + +--- a/nxcomp/DecodeBuffer.cpp ++++ b/nxcomp/DecodeBuffer.cpp +@@ -78,34 +78,45 @@ + { + if (!endOkay) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [A] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [A] in decodeValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- // +- // Label "context" is just used to identify +- // the routine which detected the problem in +- // present source file. +- // +- +- cerr << "Error" << ": Failure decoding data in context [A].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [A] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //// ++ //// Label "context" is just used to identify ++ //// the routine which detected the problem in ++ //// present source file. ++ //// ++ //cerr << "Error" << ": Failure decoding data in context [A].\n"; ++ //HandleAbort(); + } + +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [B] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [B] in decodeValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [B].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [B] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [B].\n"; ++ //HandleAbort(); + } + + lastBit = (nextSrcChar & srcMask_); +@@ -134,28 +145,40 @@ + { + if (!endOkay) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [C] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [C] in decodeValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [C].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [C] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [C].\n"; ++ //HandleAbort(); + } + +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [D] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [D] in decodeValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [D].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [D] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [D].\n"; ++ //HandleAbort(); + } + + unsigned char moreData = (nextSrcChar & srcMask_); +@@ -212,16 +235,24 @@ + + if (nextSrc_ >= end_) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [E] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [E] in decodeCachedValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [E].\n"; +- +- HandleAbort(); ++ // Failed: return value 0 ++ value = 0; ++ // Failed: return 0, though our callers do not check that... ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [E] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [E].\n"; ++ //HandleAbort(); + } + + unsigned int index = 0; +@@ -237,30 +268,33 @@ + nextSrc_++; + if (nextSrc_ >= end_) + { +- if (!endOkay) +- { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [F] " +- << "in decodeCachedValue() nextSrc_ = " +- << (nextSrc_ - buffer_) << " end_ = " +- << (end_ - buffer_) << ".\n" << logofs_flush; +- #endif +- +- cerr << "Error" << ": Failure decoding data in context [F].\n"; +- +- HandleAbort(); +- } +- +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [G] " +- << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) +- << " end_ = " << (end_ - buffer_) << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [G] in decodeCachedValue(), returning 0:" ++ << " nextSrc_ = " << (nextSrc_ - buffer_) ++ << " end_ = " << (end_ - buffer_) ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [G].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //if (!endOkay) ++ //{ ++ // #ifdef PANIC ++ // *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [F] " ++ // << "in decodeCachedValue() nextSrc_ = " ++ // << (nextSrc_ - buffer_) << " end_ = " ++ // << (end_ - buffer_) << ".\n" << logofs_flush; ++ // #endif ++ // cerr << "Error" << ": Failure decoding data in context [F].\n"; ++ // HandleAbort(); ++ //} ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [G] " ++ // << "in decodeValue() nextSrc_ = " << (nextSrc_ - buffer_) ++ // << " end_ = " << (end_ - buffer_) << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [G].\n"; ++ //HandleAbort(); + } + + nextSrcChar = *nextSrc_; +@@ -288,15 +322,20 @@ + return 1; + } + +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [H] " +- << "in decodeCacheValue() with no value found.\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [H] in decodeCachedValue(), returning 0:" ++ << " no value found" ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [H].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [H] " ++ // << "in decodeCacheValue() with no value found.\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [H].\n"; ++ //HandleAbort(); + } + else + { +@@ -323,15 +362,20 @@ + return 1; + } + +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [H] " +- << "in decodeCacheValue() with no value found.\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [F] in decodeCachedValue(), returning 0:" ++ << " no value found" ++ << " .\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [H].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [H] " ++ // << "in decodeCacheValue() with no value found.\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [H].\n"; ++ //HandleAbort(); + } + } + } +@@ -344,16 +388,22 @@ + + if (index > cache.getSize()) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [I] " +- << "in decodeCachedValue() index = " << index +- << " cache size = " << cache.getSize() << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [I] in decodeCachedValue(), returning 0:" ++ << " index = " << index ++ << " cache size = " << cache.getSize() ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [I].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [I] " ++ // << "in decodeCachedValue() index = " << index ++ // << " cache size = " << cache.getSize() << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [I].\n"; ++ //HandleAbort(); + } + + value = cache.get(index); +@@ -401,16 +451,22 @@ + { + if (!endOkay) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [K] " +- << "in decodeCachedValue() nextSrc_ " +- << (nextSrc_ - buffer_) << " end_ " << (end_ - buffer_) ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [K] in decodeCachedValue(), returning 0:" ++ << " nextSrc_ " << (nextSrc_ - buffer_) ++ << " end_ " << (end_ - buffer_) + << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [K].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [K] " ++ // << "in decodeCachedValue() nextSrc_ " ++ // << (nextSrc_ - buffer_) << " end_ " << (end_ - buffer_) ++ // << ".\n" << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [K].\n"; ++ //HandleAbort(); + } + + #ifdef TEST +@@ -446,15 +502,20 @@ + } + else + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [M] " +- << "in decodeValue() with index = 2.\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [M] in decodeCachedValue(), returning 0:" ++ << "with index = 2" ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [M].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [M] " ++ // << "in decodeValue() with index = 2.\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [M].\n"; ++ //HandleAbort(); + } + } + else +@@ -466,16 +527,22 @@ + + if (index > cache.getSize()) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [N] " +- << "in decodeCachedValue() " << "index = " << index +- << " cache size = " << cache.getSize() << ".\n" +- << logofs_flush; ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [N] in decodeCachedValue(), returning 0:" ++ << " index = " << index ++ << " cache size = " << cache.getSize() ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [N].\n"; +- +- HandleAbort(); ++ value = 0; ++ return 0; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [N] " ++ // << "in decodeCachedValue() " << "index = " << index ++ // << " cache size = " << cache.getSize() << ".\n" ++ // << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [N].\n"; ++ //HandleAbort(); + } + + value = cache.get(index); +@@ -538,16 +605,22 @@ + } + else if (end_ - nextSrc_ < (int) numBytes) + { +- #ifdef PANIC +- *logofs << "DecodeBuffer: PANIC! Assertion failed. Error [P] " +- << "in decodeMemory() " << "with length " << numBytes ++ #ifdef WARNING ++ *logofs << "DecodeBuffer: Error [P] in decodeMemory(), returning NULL:" ++ << " with length " << numBytes + << " and " << (end_ - nextSrc_) +- << " bytes remaining.\n" << logofs_flush; ++ << " bytes remaining" ++ << ".\n" << logofs_flush; + #endif +- +- cerr << "Error" << ": Failure decoding data in context [P].\n"; +- +- HandleAbort(); ++ return NULL; ++ //#ifdef PANIC ++ //*logofs << "DecodeBuffer: PANIC! Assertion failed. Error [P] " ++ // << "in decodeMemory() " << "with length " << numBytes ++ // << " and " << (end_ - nextSrc_) ++ // << " bytes remaining.\n" << logofs_flush; ++ //#endif ++ //cerr << "Error" << ": Failure decoding data in context [P].\n"; ++ //HandleAbort(); + } + + nextSrc_ += numBytes; +--- a/nxcomp/DecodeBuffer.h ++++ b/nxcomp/DecodeBuffer.h +@@ -30,7 +30,8 @@ + #include "ActionCacheCompat.h" + #include "PositionCacheCompat.h" + +-#define DECODE_BUFFER_OVERFLOW_SIZE 4194304 ++// See WriteBuffer.h and EncodeBuffer.h ++#define DECODE_BUFFER_OVERFLOW_SIZE 104857600 + + #define DECODE_BUFFER_POSTFIX_SIZE 1 + +--- a/nxcomp/EncodeBuffer.h ++++ b/nxcomp/EncodeBuffer.h +@@ -33,10 +33,10 @@ + // + // This should match the maximum size of + // a single message added to write buffer +-// (see WriteBuffer.h). ++// (see WriteBuffer.h and DecodeBuffer.h). + // + +-#define ENCODE_BUFFER_OVERFLOW_SIZE 4194304 ++#define ENCODE_BUFFER_OVERFLOW_SIZE 104857600 + + // + // Adjust for the control messages and the +--- a/nxcomp/SequenceQueue.h ++++ b/nxcomp/SequenceQueue.h +@@ -18,6 +18,22 @@ + #ifndef SequenceQueue_H + #define SequenceQueue_H + ++inline int SequenceNumber_x_gt_y(unsigned int x, unsigned int y) ++{ ++ // For two sequence numbers x and y, determine whether (x > y). ++ // Sequence numbers are the trailing 16 bits of a bigger number: ++ // need to handle wraparound, e.g. 0 is 65536, just after 65535. ++ if (x != (x & 0x00ffff)) return 0; ++ if (y != (y & 0x00ffff)) return 0; ++ // Closeness when comparison makes sense: arbitrarily set at 16*1024 ++ if ((x > y) && ((x-y) < 16*1024)) return 1; ++ // Wrapped value ++ unsigned int w = x + 64*1024; ++ // We know that w>y but test left for symmetry ++ if ((w > y) && ((w-y) < 16*1024)) return 1; ++ return 0; ++} ++ + // + // List of outstanding request messages which + // are waiting for a reply. This class is used +--- a/nxcomp/ServerChannel.cpp ++++ b/nxcomp/ServerChannel.cpp +@@ -104,7 +104,8 @@ + // + + #define HIDE_MIT_SHM_EXTENSION +-#define HIDE_BIG_REQUESTS_EXTENSION ++// HIDE_BIG_REQUESTS_EXTENSION : No good to hide, some clients may send crap instead... ++#undef HIDE_BIG_REQUESTS_EXTENSION + #define HIDE_XFree86_Bigfont_EXTENSION + #undef HIDE_SHAPE_EXTENSION + #undef HIDE_XKEYBOARD_EXTENSION +@@ -1412,6 +1413,9 @@ + + unsigned int inputSequence = GetUINT(inputMessage + 2, bigEndian_); + ++ // Sometimes we get inputSequence=0 or =256 when inputOpcode=11=X_UnmapSubwindows ++ // Seems weird... but is "normal" and is to be accepted. ++ + // + // Check if this is an event which we can discard. + // +@@ -1905,6 +1909,12 @@ + break; + default: + { ++ // BEWARE: not only inputOpcode == GenericEvent but also ++ // others not handled above, at least: ++ // GraphicsExpose 13 ++ // MapRequest 20 ++ // ConfigureRequest 23 ++ // and any beyond LASTEvent. + #ifdef TEST + *logofs << "handleRead: Using generic event compression " + << "for OPCODE#" << (unsigned int) inputOpcode +@@ -1919,6 +1929,16 @@ + encodeBuffer.encodeCachedValue(GetUINT(inputMessage + i * 2 + 4, bigEndian_), + 16, *serverCache_ -> genericEventIntCache[i]); + } ++ // Handle "X Generic Event Extension" ++ // Cannot cache extra data... ++// FIXME: BUG ALERT: is it OK to have the first 32 bytes cached, but not the rest? ++ if (inputOpcode == GenericEvent && inputLength > 32) ++ { ++ for (unsigned int i = 14; i < ((inputLength-4)>>1); i++) ++ { ++ encodeBuffer.encodeValue(GetUINT(inputMessage + i * 2 + 4, bigEndian_), 16); ++ } ++ } + } + + } // switch (inputOpcode)... +@@ -3756,7 +3776,7 @@ + } + + unsigned int numPoints; +- decodeBuffer.decodeValue(numPoints, 16, 4); ++ decodeBuffer.decodeValue(numPoints, 32, 4); + outputLength = (numPoints << 2) + 12; + outputMessage = writeBuffer_.addMessage(outputLength); + unsigned int relativeCoordMode; +@@ -3802,7 +3822,7 @@ + } + + unsigned int numPoints; +- decodeBuffer.decodeValue(numPoints, 16, 4); ++ decodeBuffer.decodeValue(numPoints, 32, 4); + outputLength = (numPoints << 2) + 12; + outputMessage = writeBuffer_.addMessage(outputLength); + unsigned int relativeCoordMode; +@@ -3839,7 +3859,7 @@ + case X_PolyRectangle: + { + unsigned int numRectangles; +- decodeBuffer.decodeValue(numRectangles, 16, 3); ++ decodeBuffer.decodeValue(numRectangles, 32, 3); + outputLength = (numRectangles << 3) + 12; + outputMessage = writeBuffer_.addMessage(outputLength); + decodeBuffer.decodeXidValue(value, clientCache_ -> drawableCache); +@@ -3869,7 +3889,7 @@ + } + + unsigned int numSegments; +- decodeBuffer.decodeValue(numSegments, 16, 4); ++ decodeBuffer.decodeValue(numSegments, 32, 4); + outputLength = (numSegments << 3) + 12; + outputMessage = writeBuffer_.addMessage(outputLength); + decodeBuffer.decodeXidValue(value, clientCache_ -> drawableCache); +@@ -4590,7 +4610,29 @@ + + *outputMessage = (unsigned char) outputOpcode; + +- PutUINT(outputLength >> 2, outputMessage + 2, bigEndian_); ++ if (outputLength < 4*64*1024) ++ PutUINT(outputLength >> 2, outputMessage + 2, bigEndian_); ++ else ++ { ++ // Handle BIG-REQUESTS ++ PutUINT(0, outputMessage + 2, bigEndian_); ++// FIXME: BUG ALERT: following write may not work well, ++// particularly with un-flushed messages. ++if (outputMessage != writeBuffer_.getData()) ++{ ++*logofs << "PSz BUG handleWrite BIG-REQUESTS:" ++ << " have " << (unsigned int)(outputMessage - writeBuffer_.getData()) ++ << " bytes in buffer" ++ << ", write immediate of 4-byte header will not work well" ++ << "\n" << logofs_flush; ++} ++// But, it works well enough in my testing... ++ // Write first four bytes ++ if (transport_ -> write(write_immediate, outputMessage, 4) < 0) ++ return -1; ++ // Replace with new 4-byte length ++ PutULONG(1 + (outputLength >> 2), outputMessage, bigEndian_); ++ } + + #if defined(TEST) || defined(OPCODES) + *logofs << "handleWrite: Handled request OPCODE#" +@@ -5912,7 +5954,7 @@ + unsigned char opcode = *lastMotion_; + unsigned int size = 32; + +- if (GetUINT(buffer + 2, bigEndian_) < serverSequence_) ++ if (SequenceNumber_x_gt_y(serverSequence_, GetUINT(buffer + 2, bigEndian_))) + { + PutUINT(serverSequence_, (unsigned char *) buffer + 2, bigEndian_); + } +--- a/nxcomp/ServerReadBuffer.cpp ++++ b/nxcomp/ServerReadBuffer.cpp +@@ -108,14 +108,21 @@ + { + dataLength = 32 + (GetULONG(start + 4, bigEndian_) << 2); + } ++ else if (*start == GenericEvent && *(start+1) != 0) ++ { ++ // X Generic Event Extension ++ dataLength = 32 + (GetULONG(start + 4, bigEndian_) << 2); ++ } + else + { + dataLength = 32; + } + +- if (dataLength < 32) ++// See WRITE_BUFFER_OVERFLOW_SIZE elsewhere ++// and also ENCODE_BUFFER_OVERFLOW_SIZE DECODE_BUFFER_OVERFLOW_SIZE. ++ if (dataLength < 32 || dataLength > 100*1024*1024) + { +- #ifdef TEST ++ #ifdef WARNING + *logofs << "ServerReadBuffer: WARNING! Assuming length 32 " + << "for suspicious message of length " << dataLength + << ".\n" << logofs_flush; +--- a/nxcomp/WriteBuffer.h ++++ b/nxcomp/WriteBuffer.h +@@ -32,8 +32,14 @@ + // This is likely to be a reply to a X_ListFonts where + // user has a large amount of installed fonts. + // ++// Used also for messages sent, and should accommodate any BIG-REQUESTS. ++// Value was 4MB = 4194304, changed to 100MB = 104857600. ++// See also sanity check limits (set same, to 100*1024*1024) in ++// ClientReadBuffer.cpp ServerReadBuffer.cpp and ClientChannel.cpp, and ++// ENCODE_BUFFER_OVERFLOW_SIZE DECODE_BUFFER_OVERFLOW_SIZE elsewhere. ++// + +-#define WRITE_BUFFER_OVERFLOW_SIZE 4194304 ++#define WRITE_BUFFER_OVERFLOW_SIZE 104857600 + + class WriteBuffer + { -- cgit v1.2.3 From 134648169cd0a9359e1a8a31a5bb55a307b0a801 Mon Sep 17 00:00:00 2001 From: Fernando Carvajal Date: Tue, 12 Apr 2016 16:03:37 +0200 Subject: Remove obsolete compatibility files from nxcomp This commit removes obsolete compatibility files whose components were only used to handle compatibility with old protocol versions that are no longer supported. Refs: ArcticaProject/nx-libs#108 --- debian/copyright.in | 23 -- nxcomp/ActionCacheCompat.h | 45 --- nxcomp/ChangeGCCompat.cpp | 131 ------- nxcomp/ChangeGCCompat.h | 170 ---------- nxcomp/CreatePixmapCompat.cpp | 272 --------------- nxcomp/CreatePixmapCompat.h | 154 --------- nxcomp/Makefile.in | 13 +- nxcomp/PositionCacheCompat.cpp | 28 -- nxcomp/PositionCacheCompat.h | 41 --- nxcomp/RenderCompositeCompat.cpp | 320 ------------------ nxcomp/RenderCompositeCompat.h | 80 ----- nxcomp/RenderCompositeGlyphsCompat.cpp | 602 --------------------------------- nxcomp/RenderCompositeGlyphsCompat.h | 80 ----- nxcomp/RenderCreateGlyphSetCompat.cpp | 231 ------------- nxcomp/RenderCreateGlyphSetCompat.h | 80 ----- nxcomp/RenderCreatePictureCompat.cpp | 262 -------------- nxcomp/RenderCreatePictureCompat.h | 80 ----- nxcomp/RenderExtension.h | 7 - nxcomp/RenderFreePictureCompat.cpp | 158 --------- nxcomp/RenderFreePictureCompat.h | 80 ----- nxcomp/RenderPictureClipCompat.cpp | 237 ------------- nxcomp/RenderPictureClipCompat.h | 80 ----- nxcomp/SetUnpackAlphaCompat.cpp | 250 -------------- nxcomp/SetUnpackAlphaCompat.h | 149 -------- nxcomp/SetUnpackColormapCompat.cpp | 262 -------------- nxcomp/SetUnpackColormapCompat.h | 149 -------- 26 files changed, 1 insertion(+), 3983 deletions(-) delete mode 100644 nxcomp/ActionCacheCompat.h delete mode 100644 nxcomp/ChangeGCCompat.cpp delete mode 100644 nxcomp/ChangeGCCompat.h delete mode 100644 nxcomp/CreatePixmapCompat.cpp delete mode 100644 nxcomp/CreatePixmapCompat.h delete mode 100644 nxcomp/PositionCacheCompat.cpp delete mode 100644 nxcomp/PositionCacheCompat.h delete mode 100644 nxcomp/RenderCompositeCompat.cpp delete mode 100644 nxcomp/RenderCompositeCompat.h delete mode 100644 nxcomp/RenderCompositeGlyphsCompat.cpp delete mode 100644 nxcomp/RenderCompositeGlyphsCompat.h delete mode 100644 nxcomp/RenderCreateGlyphSetCompat.cpp delete mode 100644 nxcomp/RenderCreateGlyphSetCompat.h delete mode 100644 nxcomp/RenderCreatePictureCompat.cpp delete mode 100644 nxcomp/RenderCreatePictureCompat.h delete mode 100644 nxcomp/RenderFreePictureCompat.cpp delete mode 100644 nxcomp/RenderFreePictureCompat.h delete mode 100644 nxcomp/RenderPictureClipCompat.cpp delete mode 100644 nxcomp/RenderPictureClipCompat.h delete mode 100644 nxcomp/SetUnpackAlphaCompat.cpp delete mode 100644 nxcomp/SetUnpackAlphaCompat.h delete mode 100644 nxcomp/SetUnpackColormapCompat.cpp delete mode 100644 nxcomp/SetUnpackColormapCompat.h (limited to 'debian') diff --git a/debian/copyright.in b/debian/copyright.in index 854ab4e73..8f85b292f 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -923,7 +923,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nx-X11/programs/Xserver/hw/nxagent/Windows.h nxcomp/ActionCache.cpp nxcomp/ActionCache.h - nxcomp/ActionCacheCompat.h nxcomp/Agent.cpp nxcomp/Agent.h nxcomp/Alpha.cpp @@ -938,8 +937,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/BlockCacheSet.h nxcomp/ChangeGC.cpp nxcomp/ChangeGC.h - nxcomp/ChangeGCCompat.cpp - nxcomp/ChangeGCCompat.h nxcomp/ChangeProperty.cpp nxcomp/ChangeProperty.h nxcomp/Channel.cpp @@ -974,8 +971,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/CreateGC.h nxcomp/CreatePixmap.cpp nxcomp/CreatePixmap.h - nxcomp/CreatePixmapCompat.cpp - nxcomp/CreatePixmapCompat.h nxcomp/DecodeBuffer.cpp nxcomp/DecodeBuffer.h nxcomp/EncodeBuffer.cpp @@ -1053,8 +1048,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/PolyText16.h nxcomp/PolyText8.cpp nxcomp/PolyText8.h - nxcomp/PositionCacheCompat.cpp - nxcomp/PositionCacheCompat.h nxcomp/Proxy.cpp nxcomp/Proxy.h nxcomp/ProxyReadBuffer.cpp @@ -1073,20 +1066,12 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/RenderChangePicture.h nxcomp/RenderComposite.cpp nxcomp/RenderComposite.h - nxcomp/RenderCompositeCompat.cpp - nxcomp/RenderCompositeCompat.h nxcomp/RenderCompositeGlyphs.cpp nxcomp/RenderCompositeGlyphs.h - nxcomp/RenderCompositeGlyphsCompat.cpp - nxcomp/RenderCompositeGlyphsCompat.h nxcomp/RenderCreateGlyphSet.cpp nxcomp/RenderCreateGlyphSet.h - nxcomp/RenderCreateGlyphSetCompat.cpp - nxcomp/RenderCreateGlyphSetCompat.h nxcomp/RenderCreatePicture.cpp nxcomp/RenderCreatePicture.h - nxcomp/RenderCreatePictureCompat.cpp - nxcomp/RenderCreatePictureCompat.h nxcomp/RenderExtension.cpp nxcomp/RenderExtension.h nxcomp/RenderFillRectangles.cpp @@ -1095,8 +1080,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/RenderFreeGlyphSet.h nxcomp/RenderFreePicture.cpp nxcomp/RenderFreePicture.h - nxcomp/RenderFreePictureCompat.cpp - nxcomp/RenderFreePictureCompat.h nxcomp/RenderGenericRequest.cpp nxcomp/RenderGenericRequest.h nxcomp/RenderMinorExtensionHeaders.h @@ -1104,8 +1087,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/RenderMinorExtensionTags.h nxcomp/RenderPictureClip.cpp nxcomp/RenderPictureClip.h - nxcomp/RenderPictureClipCompat.cpp - nxcomp/RenderPictureClipCompat.h nxcomp/RenderPictureFilter.cpp nxcomp/RenderPictureFilter.h nxcomp/RenderPictureTransform.cpp @@ -1136,12 +1117,8 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/SetClipRectangles.h nxcomp/SetUnpackAlpha.cpp nxcomp/SetUnpackAlpha.h - nxcomp/SetUnpackAlphaCompat.cpp - nxcomp/SetUnpackAlphaCompat.h nxcomp/SetUnpackColormap.cpp nxcomp/SetUnpackColormap.h - nxcomp/SetUnpackColormapCompat.cpp - nxcomp/SetUnpackColormapCompat.h nxcomp/SetUnpackGeometry.cpp nxcomp/SetUnpackGeometry.h nxcomp/ShapeExtension.cpp diff --git a/nxcomp/ActionCacheCompat.h b/nxcomp/ActionCacheCompat.h deleted file mode 100644 index 8281db826..000000000 --- a/nxcomp/ActionCacheCompat.h +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef ActionCacheCompat_H -#define ActionCacheCompat_H - -#include "CharCache.h" - -class ActionCacheCompat -{ - friend class EncodeBuffer; - friend class DecodeBuffer; - - public: - - ActionCacheCompat() - { - slot_ = 0; - } - - ~ActionCacheCompat() - { - } - - private: - - CharCache base_[4]; - unsigned char slot_; -}; - -#endif /* ActionCacheCompat_H */ diff --git a/nxcomp/ChangeGCCompat.cpp b/nxcomp/ChangeGCCompat.cpp deleted file mode 100644 index ca2973774..000000000 --- a/nxcomp/ChangeGCCompat.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "ChangeGCCompat.h" - -#include "ClientCache.h" - -#include "EncodeBuffer.h" -#include "DecodeBuffer.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Here are the methods to handle messages' content. -// - -int ChangeGCCompatStore::parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - ChangeGCCompatMessage *changeGC = (ChangeGCCompatMessage *) message; - - // - // Here is the fingerprint. - // - - changeGC -> gcontext = GetULONG(buffer + 4, bigEndian); - changeGC -> value_mask = GetULONG(buffer + 8, bigEndian); - - // - // Clear the unused bytes carried in the - // payload to increase the effectiveness - // of the caching algorithm. - // - - if ((int) size > dataOffset) - { - #ifdef DEBUG - *logofs << name() << ": Removing unused bytes from the " - << "data payload.\n" << logofs_flush; - #endif - - changeGC -> value_mask &= (1 << 23) - 1; - - unsigned int mask = 0x1; - unsigned char *source = (unsigned char *) buffer + CHANGEGC_DATA_OFFSET; - unsigned long value = 0; - - for (unsigned int i = 0; i < 23; i++) - { - if (changeGC -> value_mask & mask) - { - value = GetULONG(source, bigEndian); - - value &= (0xffffffff >> (32 - CREATEGC_FIELD_WIDTH[i])); - - PutULONG(value, source, bigEndian); - - source += 4; - } - - mask <<= 1; - } - } - - #ifdef DEBUG - *logofs << name() << ": Parsed Identity for message at " - << this << ".\n" << logofs_flush; - #endif - - return 1; -} - -int ChangeGCCompatStore::unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - ChangeGCCompatMessage *changeGC = (ChangeGCCompatMessage *) message; - - // - // Fill all the message's fields. - // - - PutULONG(changeGC -> gcontext, buffer + 4, bigEndian); - PutULONG(changeGC -> value_mask, buffer + 8, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Unparsed identity for message at " - << this << ".\n" << logofs_flush; - #endif - - return 1; -} - -void ChangeGCCompatStore::dumpIdentity(const Message *message) const -{ - #ifdef DUMP - - ChangeGCCompatMessage *changeGC = (ChangeGCCompatMessage *) message; - - *logofs << name() << ": Identity gcontext " << changeGC -> gcontext - << ", mask " << changeGC -> value_mask << ", size " - << changeGC -> size_ << ".\n" << logofs_flush; - #endif -} - -void ChangeGCCompatStore::identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - md5_append(md5_state_, buffer + 4, 8); -} diff --git a/nxcomp/ChangeGCCompat.h b/nxcomp/ChangeGCCompat.h deleted file mode 100644 index 3a7b0c0a9..000000000 --- a/nxcomp/ChangeGCCompat.h +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef ChangeGCCompat_H -#define ChangeGCCompat_H - -#include "Message.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Set default values. -// - -#define CHANGEGC_ENABLE_CACHE 1 -#define CHANGEGC_ENABLE_DATA 0 -#define CHANGEGC_ENABLE_SPLIT 0 -#define CHANGEGC_ENABLE_COMPRESS 0 - -#define CHANGEGC_DATA_LIMIT 144 -#define CHANGEGC_DATA_OFFSET 12 - -#define CHANGEGC_CACHE_SLOTS 3000 -#define CHANGEGC_CACHE_THRESHOLD 3 -#define CHANGEGC_CACHE_LOWER_THRESHOLD 1 - -// -// The message class. -// - -class ChangeGCCompatMessage : public Message -{ - friend class ChangeGCCompatStore; - - public: - - ChangeGCCompatMessage() - { - } - - ~ChangeGCCompatMessage() - { - } - - // - // Put here the fields which constitute - // the 'identity' part of the message. - // - - private: - - unsigned int gcontext; - unsigned int value_mask; -}; - -class ChangeGCCompatStore : public MessageStore -{ - // - // Constructors and destructors. - // - - public: - - ChangeGCCompatStore() : MessageStore() - { - enableCache = CHANGEGC_ENABLE_CACHE; - enableData = CHANGEGC_ENABLE_DATA; - enableSplit = CHANGEGC_ENABLE_SPLIT; - enableCompress = CHANGEGC_ENABLE_COMPRESS; - - dataLimit = CHANGEGC_DATA_LIMIT; - dataOffset = CHANGEGC_DATA_OFFSET; - - cacheSlots = CHANGEGC_CACHE_SLOTS; - cacheThreshold = CHANGEGC_CACHE_THRESHOLD; - cacheLowerThreshold = CHANGEGC_CACHE_LOWER_THRESHOLD; - - messages_ -> resize(cacheSlots); - - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - *i = NULL; - } - - temporary_ = NULL; - } - - virtual ~ChangeGCCompatStore() - { - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - destroy(*i); - } - - destroy(temporary_); - } - - virtual const char *name() const - { - return "ChangeGCCompat"; - } - - virtual unsigned char opcode() const - { - return X_ChangeGC; - } - - virtual unsigned int storage() const - { - return sizeof(ChangeGCCompatMessage); - } - - // - // Message handling methods. - // - - public: - - virtual Message *create() const - { - return new ChangeGCCompatMessage(); - } - - virtual Message *create(const Message &message) const - { - return new ChangeGCCompatMessage((const ChangeGCCompatMessage &) message); - } - - virtual void destroy(Message *message) const - { - delete (ChangeGCCompatMessage *) message; - } - - virtual int parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual int unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void dumpIdentity(const Message *message) const; -}; - -#endif /* ChangeGCCompat_H */ diff --git a/nxcomp/CreatePixmapCompat.cpp b/nxcomp/CreatePixmapCompat.cpp deleted file mode 100644 index 6ea346ee1..000000000 --- a/nxcomp/CreatePixmapCompat.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "CreatePixmapCompat.h" - -#include "ClientCache.h" - -#include "EncodeBuffer.h" -#include "DecodeBuffer.h" - -#include "WriteBuffer.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -// -// Constructors and destructors. -// - -CreatePixmapCompatStore::CreatePixmapCompatStore() - - : MessageStore() -{ - enableCache = CREATEPIXMAP_ENABLE_CACHE; - enableData = CREATEPIXMAP_ENABLE_DATA; - enableSplit = CREATEPIXMAP_ENABLE_SPLIT; - enableCompress = CREATEPIXMAP_ENABLE_COMPRESS; - - dataLimit = CREATEPIXMAP_DATA_LIMIT; - dataOffset = CREATEPIXMAP_DATA_OFFSET; - - cacheSlots = CREATEPIXMAP_CACHE_SLOTS; - cacheThreshold = CREATEPIXMAP_CACHE_THRESHOLD; - cacheLowerThreshold = CREATEPIXMAP_CACHE_LOWER_THRESHOLD; - - messages_ -> resize(cacheSlots); - - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - *i = NULL; - } - - temporary_ = NULL; -} - -CreatePixmapCompatStore::~CreatePixmapCompatStore() -{ - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - destroy(*i); - } - - destroy(temporary_); -} - -// -// Here are the methods to handle messages' content. -// - -int CreatePixmapCompatStore::encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue(*(buffer + 1), 8, - clientCache -> depthCache); - - encodeBuffer.encodeDiffCachedValue(GetULONG(buffer + 4, bigEndian), - clientCache -> createPixmapLastId, 29, - clientCache -> createPixmapIdCache, 4); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 8, bigEndian), - clientCache -> drawableCache); - - encodeBuffer.encodeCachedValue(GetUINT(buffer + 12, bigEndian), 16, - clientCache -> createPixmapXCache, 8); - - encodeBuffer.encodeCachedValue(GetUINT(buffer + 14, bigEndian), 16, - clientCache -> createPixmapYCache, 8); - - #ifdef TEST - *logofs << name() << ": Encoded message. Size is " - << size << ".\n" << logofs_flush; - #endif - - return 1; -} - -int CreatePixmapCompatStore::decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned char cValue; - unsigned int value; - - size = 16; - - buffer = writeBuffer -> addMessage(size); - - decodeBuffer.decodeCachedValue(cValue, 8, - clientCache -> depthCache); - - *(buffer + 1) = cValue; - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> createPixmapLastId, 29, - clientCache -> createPixmapIdCache, 4); - - PutULONG(value, buffer + 4, bigEndian); - - decodeBuffer.decodeXidValue(value, - clientCache -> drawableCache); - - PutULONG(value, buffer + 8, bigEndian); - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> createPixmapXCache, 8); - - PutUINT(value, buffer + 12, bigEndian); - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> createPixmapYCache, 8); - - PutUINT(value, buffer + 14, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Size is " - << size << ".\n" << logofs_flush; - #endif - - return 1; -} - -int CreatePixmapCompatStore::parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - CreatePixmapCompatMessage *createPixmap = (CreatePixmapCompatMessage *) message; - - createPixmap -> depth = *(buffer + 1); - - createPixmap -> id = GetULONG(buffer + 4, bigEndian); - createPixmap -> drawable = GetULONG(buffer + 8, bigEndian); - - createPixmap -> width = GetUINT(buffer + 12, bigEndian); - createPixmap -> height = GetUINT(buffer + 14, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Size is " - << createPixmap -> size_ << " identity is " - << createPixmap -> i_size_ << ".\n" - << logofs_flush; - #endif - - return 1; -} - -int CreatePixmapCompatStore::unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - CreatePixmapCompatMessage *createPixmap = (CreatePixmapCompatMessage *) message; - - *(buffer + 1) = createPixmap -> depth; - - PutULONG(createPixmap -> id, buffer + 4, bigEndian); - PutULONG(createPixmap -> drawable, buffer + 8, bigEndian); - - PutUINT(createPixmap -> width, buffer + 12, bigEndian); - PutUINT(createPixmap -> height, buffer + 14, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Size is " - << createPixmap -> size_ << " identity is " - << createPixmap -> i_size_ << ".\n" - << logofs_flush; - #endif - - return 1; -} - -void CreatePixmapCompatStore::dumpIdentity(const Message *message) const -{ - #ifdef DUMP - - #ifdef WARNING - *logofs << name() << ": WARNING! Dump of identity not implemented.\n" - << logofs_flush; - #endif - - #endif -} - -void CreatePixmapCompatStore::identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - md5_append(md5_state_, buffer + 1, 1); - md5_append(md5_state_, buffer + 8, 8); -} - -void CreatePixmapCompatStore::updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const -{ - CreatePixmapCompatMessage *createPixmap = (CreatePixmapCompatMessage *) message; - CreatePixmapCompatMessage *cachedCreatePixmap = (CreatePixmapCompatMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(createPixmap -> id, - clientCache -> createPixmapLastId, 29, - clientCache -> createPixmapIdCache, 4); - - cachedCreatePixmap -> id = createPixmap -> id; - - encodeBuffer.encodeXidValue(createPixmap -> drawable, - clientCache -> drawableCache); - - cachedCreatePixmap -> drawable = createPixmap -> drawable; - - #ifdef TEST - *logofs << name() << ": Encoded update. Size is " - << createPixmap -> size_ << " identity is " - << createPixmap -> i_size_ << ".\n" - << logofs_flush; - #endif -} - -void CreatePixmapCompatStore::updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const -{ - CreatePixmapCompatMessage *createPixmap = (CreatePixmapCompatMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeDiffCachedValue(createPixmap -> id, - clientCache -> createPixmapLastId, 29, - clientCache -> createPixmapIdCache, 4); - - decodeBuffer.decodeXidValue(createPixmap -> drawable, - clientCache -> drawableCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Size is " - << createPixmap -> size_ << " identity is " - << createPixmap -> i_size_ << ".\n" - << logofs_flush; - #endif -} diff --git a/nxcomp/CreatePixmapCompat.h b/nxcomp/CreatePixmapCompat.h deleted file mode 100644 index e8cf8d99f..000000000 --- a/nxcomp/CreatePixmapCompat.h +++ /dev/null @@ -1,154 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef CreatePixmapCompat_H -#define CreatePixmapCompat_H - -#include "Message.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Set default values. -// - -#define CREATEPIXMAP_ENABLE_CACHE 1 -#define CREATEPIXMAP_ENABLE_DATA 0 -#define CREATEPIXMAP_ENABLE_SPLIT 0 -#define CREATEPIXMAP_ENABLE_COMPRESS 0 - -#define CREATEPIXMAP_DATA_LIMIT 16 -#define CREATEPIXMAP_DATA_OFFSET 16 - -#define CREATEPIXMAP_CACHE_SLOTS 1000 -#define CREATEPIXMAP_CACHE_THRESHOLD 2 -#define CREATEPIXMAP_CACHE_LOWER_THRESHOLD 1 - -// -// The message class. -// - -class CreatePixmapCompatMessage : public Message -{ - friend class CreatePixmapCompatStore; - - public: - - CreatePixmapCompatMessage() - { - } - - ~CreatePixmapCompatMessage() - { - } - - // - // Put here the fields which constitute - // the 'identity' part of the message. - // - - private: - - unsigned char depth; - - unsigned int id; - unsigned int drawable; - - unsigned short width; - unsigned short height; -}; - -class CreatePixmapCompatStore : public MessageStore -{ - public: - - CreatePixmapCompatStore(); - - virtual ~CreatePixmapCompatStore(); - - virtual const char *name() const - { - return "CreatePixmapCompat"; - } - - virtual unsigned char opcode() const - { - return X_CreatePixmap; - } - - virtual unsigned int storage() const - { - return sizeof(CreatePixmapCompatMessage); - } - - // - // Message handling methods. - // - - protected: - - virtual Message *create() const - { - return new CreatePixmapCompatMessage(); - } - - virtual Message *create(const Message &message) const - { - return new CreatePixmapCompatMessage((const CreatePixmapCompatMessage &) message); - } - - virtual void destroy(Message *message) const - { - delete (CreatePixmapCompatMessage *) message; - } - - virtual int encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const; - - virtual int decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const; - - virtual int parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual int unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const; - - virtual void updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const; - - virtual void identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void dumpIdentity(const Message *message) const; -}; - -#endif /* CreatePixmapCompat_H */ diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index d309c4949..93b644079 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -226,18 +226,7 @@ CXXSRC = Loop.cpp \ RenderCompositeGlyphs.cpp \ RenderFillRectangles.cpp \ RenderTrapezoids.cpp \ - RenderTriangles.cpp \ - PositionCacheCompat.cpp \ - ChangeGCCompat.cpp \ - CreatePixmapCompat.cpp \ - SetUnpackColormapCompat.cpp \ - SetUnpackAlphaCompat.cpp \ - RenderCreatePictureCompat.cpp \ - RenderFreePictureCompat.cpp \ - RenderPictureClipCompat.cpp \ - RenderCreateGlyphSetCompat.cpp \ - RenderCompositeCompat.cpp \ - RenderCompositeGlyphsCompat.cpp + RenderTriangles.cpp MOBJ = $(MSRC:.c=.o) COBJ = $(CSRC:.c=.o) diff --git a/nxcomp/PositionCacheCompat.cpp b/nxcomp/PositionCacheCompat.cpp deleted file mode 100644 index dd301a0a4..000000000 --- a/nxcomp/PositionCacheCompat.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "Control.h" - -#include "PositionCacheCompat.h" - -PositionCacheCompat::PositionCacheCompat() -{ -} - -PositionCacheCompat::~PositionCacheCompat() -{ -} diff --git a/nxcomp/PositionCacheCompat.h b/nxcomp/PositionCacheCompat.h deleted file mode 100644 index 983e45382..000000000 --- a/nxcomp/PositionCacheCompat.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef PositionCacheCompat_H -#define PositionCacheCompat_H - -#include "IntCache.h" - -class PositionCacheCompat -{ - friend class EncodeBuffer; - friend class DecodeBuffer; - - public: - - PositionCacheCompat(); - ~PositionCacheCompat(); - - private: - - IntCache *base_[32]; - - unsigned int slot_; - short int last_; -}; - -#endif /* PositionCacheCompat_H */ diff --git a/nxcomp/RenderCompositeCompat.cpp b/nxcomp/RenderCompositeCompat.cpp deleted file mode 100644 index 5a1eff213..000000000 --- a/nxcomp/RenderCompositeCompat.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderCompositeCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_SIZE -{ - // - // Strictly speaking this request doesn't have - // a data part. We just encode the field from - // offset 24 to 36 as they were data using an - // int cache. - // - - #ifdef TEST - *logofs << name() << ": Encoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_SIZE - -MESSAGE_BEGIN_DECODE_SIZE -{ - size = MESSAGE_OFFSET + 12; - - buffer = writeBuffer -> addMessage(size); - - #ifdef TEST - *logofs << name() << ": Decoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_SIZE - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue(*(buffer + 4), 8, - clientCache -> renderOpCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 8, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 12, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 16, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 20, bigEndian), - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 22, bigEndian), - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - *(buffer + 1) = type; - - decodeBuffer.decodeCachedValue(*(buffer + 4), 8, - clientCache -> renderOpCache); - - decodeBuffer.decodeXidValue(value, clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 8, bigEndian); - - decodeBuffer.decodeXidValue(value, clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 12, bigEndian); - - decodeBuffer.decodeXidValue(value, clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 16, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - PutUINT(clientCache -> renderLastX, buffer + 20, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - PutUINT(clientCache -> renderLastY, buffer + 22, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_ENCODE_DATA -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - for (unsigned int i = MESSAGE_OFFSET, c = 0; i < size; i += 4) - { - #ifdef DEBUG - *logofs << name() << ": Encoding long value " - << GetULONG(buffer + i, bigEndian) << " with i = " - << i << " c = " << c << ".\n" << logofs_flush; - #endif - - encodeBuffer.encodeCachedValue(GetULONG(buffer + i, bigEndian), 32, - *clientCache -> renderCompositeDataCache[c]); - - if (++c == 3) c = 0; - } - - #ifdef TEST - *logofs << name() << ": Encoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_DATA - -MESSAGE_BEGIN_DECODE_DATA -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - for (unsigned int i = MESSAGE_OFFSET, c = 0; i < size; i += 4) - { - decodeBuffer.decodeCachedValue(value, 32, - *clientCache -> renderCompositeDataCache[c]); - - #ifdef DEBUG - *logofs << name() << ": Decoded long value " << value - << " with i = " << i << " c = " << c << ".\n" - << logofs_flush; - #endif - - PutULONG(value, buffer + i, bigEndian); - - if (++c == 3) c = 0; - } - - #ifdef TEST - *logofs << name() << ": Decoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_DATA - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.composite.type = *(buffer + 1); - renderExtension -> data.composite.op = *(buffer + 4); - - renderExtension -> data.composite.src_id = GetULONG(buffer + 8, bigEndian); - renderExtension -> data.composite.msk_id = GetULONG(buffer + 12, bigEndian); - renderExtension -> data.composite.dst_id = GetULONG(buffer + 16, bigEndian); - - renderExtension -> data.composite.src_x = GetUINT(buffer + 20, bigEndian); - renderExtension -> data.composite.src_y = GetUINT(buffer + 22, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.composite.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.composite.type; - *(buffer + 4) = renderExtension -> data.composite.op; - - PutULONG(renderExtension -> data.composite.src_id, buffer + 8, bigEndian); - PutULONG(renderExtension -> data.composite.msk_id, buffer + 12, bigEndian); - PutULONG(renderExtension -> data.composite.dst_id, buffer + 16, bigEndian); - - PutUINT(renderExtension -> data.composite.src_x, buffer + 20, bigEndian); - PutUINT(renderExtension -> data.composite.src_y, buffer + 22, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.composite.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - // - // Include minor opcode, size and - // operator in the identity, plus - // the x and y of the source. - // - - md5_append(md5_state, buffer + 1, 4); - md5_append(md5_state, buffer + 20, 4); -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Source " << renderExtension -> - data.composite.src_id << " mask " << renderExtension -> - data.composite.msk_id << " destination " << renderExtension -> - data.composite.msk_id << ".\n" << logofs_flush; - #endif - - encodeBuffer.encodeXidValue(renderExtension -> data.composite.src_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.composite.src_id = - renderExtension -> data.composite.src_id; - - encodeBuffer.encodeXidValue(renderExtension -> data.composite.msk_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.composite.msk_id = - renderExtension -> data.composite.msk_id; - - encodeBuffer.encodeXidValue(renderExtension -> data.composite.dst_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.composite.dst_id = - renderExtension -> data.composite.dst_id; - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.composite.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeXidValue(renderExtension -> data.composite.src_id, - clientCache -> renderSrcPictureCache); - - decodeBuffer.decodeXidValue(renderExtension -> data.composite.msk_id, - clientCache -> renderSrcPictureCache); - - decodeBuffer.decodeXidValue(renderExtension -> data.composite.dst_id, - clientCache -> renderSrcPictureCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.composite.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderCompositeCompat.h b/nxcomp/RenderCompositeCompat.h deleted file mode 100644 index a26db35ba..000000000 --- a/nxcomp/RenderCompositeCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderCompositeCompat_H -#define RenderCompositeCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderCompositeCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderCompositeCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 24 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 1 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 1 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return MESSAGE_OFFSET; - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderCompositeCompat_H */ diff --git a/nxcomp/RenderCompositeGlyphsCompat.cpp b/nxcomp/RenderCompositeGlyphsCompat.cpp deleted file mode 100644 index 3fe10fafb..000000000 --- a/nxcomp/RenderCompositeGlyphsCompat.cpp +++ /dev/null @@ -1,602 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderCompositeGlyphsCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - // - // The offset points 8 bytes after - // the beginning of the data part. - // - - #ifdef DEBUG - *logofs << name() << ": Encoding value " - << ((size - (MESSAGE_OFFSET - 8)) >> 2) - << ".\n" << logofs_flush; - #endif - - encodeBuffer.encodeCachedValue((size - (MESSAGE_OFFSET - 8)) >> 2, 16, - clientCache -> renderLengthCache, 5); - - #ifdef TEST - *logofs << name() << ": Encoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_SIZE - -MESSAGE_BEGIN_DECODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeCachedValue(size, 16, - clientCache -> renderLengthCache, 5); - - #ifdef DEBUG - *logofs << name() << ": Decoded value " << size - << ".\n" << logofs_flush; - #endif - - size = (MESSAGE_OFFSET - 8) + (size << 2); - - buffer = writeBuffer -> addMessage(size); - - #ifdef TEST - *logofs << name() << ": Decoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_SIZE - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue(*(buffer + 4), 8, - clientCache -> renderOpCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 8, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 12, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeCachedValue(GetULONG(buffer + 16, bigEndian), 32, - clientCache -> renderFormatCache); - - encodeBuffer.encodeCachedValue(GetULONG(buffer + 20, bigEndian), 29, - clientCache -> renderGlyphSetCache); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 24, bigEndian), - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 26, bigEndian), - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - // - // Try to save as many bits as possible by - // encoding the information about the first - // set of glyphs. - // - - if (size >= MESSAGE_OFFSET) - { - unsigned int numGlyphs = *(buffer + 28); - - encodeBuffer.encodeCachedValue(numGlyphs, 8, - clientCache -> renderNumGlyphsCache); - - encodeBuffer.encodeCachedValue(GetUINT(buffer + 32, bigEndian), 16, - clientCache -> renderWidthCache, 11); - - encodeBuffer.encodeCachedValue(GetUINT(buffer + 34, bigEndian), 16, - clientCache -> renderHeightCache, 11); - - // - // Only manage the first set of glyphs, - // that is in most cases the only one. - // - - switch (*(buffer + 1)) - { - case X_RenderCompositeGlyphs8: - { - if (numGlyphs & 0x03) - { - memset((unsigned char *) buffer + MESSAGE_OFFSET + numGlyphs, '\0', - RoundUp4(numGlyphs) - numGlyphs); - } - - break; - } - case X_RenderCompositeGlyphs16: - { - if (numGlyphs & 0x01) - { - memset((unsigned char *) buffer + MESSAGE_OFFSET + (numGlyphs * 2), '\0', - RoundUp4(numGlyphs * 2) - numGlyphs * 2); - } - - break; - } - } - - #ifdef TEST - if (*(buffer + (size - 1)) != '\0') - { - *logofs << name() << ": WARNING! Final byte is non-zero with size " - << size << " and " << (unsigned int) *(buffer + 28) - << " glyphs.\n" << logofs_flush; - } - else - { - *logofs << name() << ": Final byte is zero with size " - << size << " and " << (unsigned int) *(buffer + 28) - << " glyphs.\n" << logofs_flush; - } - #endif - } - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - *(buffer + 1) = type; - - decodeBuffer.decodeCachedValue(*(buffer + 4), 8, - clientCache -> renderOpCache); - - decodeBuffer.decodeXidValue(value, - clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 8, bigEndian); - - decodeBuffer.decodeXidValue(value, - clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 12, bigEndian); - - decodeBuffer.decodeCachedValue(value, 32, - clientCache -> renderFormatCache); - - PutULONG(value, buffer + 16, bigEndian); - - decodeBuffer.decodeCachedValue(value, 29, - clientCache -> renderGlyphSetCache); - - PutULONG(value, buffer + 20, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - PutUINT(clientCache -> renderLastX, buffer + 24, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - PutUINT(clientCache -> renderLastY, buffer + 26, bigEndian); - - if (size >= MESSAGE_OFFSET) - { - decodeBuffer.decodeCachedValue(value, 8, - clientCache -> renderNumGlyphsCache); - - *(buffer + 28) = value; - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> renderWidthCache, 11); - - PutUINT(value, buffer + 32, bigEndian); - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> renderHeightCache, 11); - - PutUINT(value, buffer + 34, bigEndian); - } - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_ENCODE_DATA -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - switch (*(buffer + 1)) - { - case X_RenderCompositeGlyphs8: - { - clientCache -> renderTextCompressor.reset(); - - const unsigned char *next = buffer + MESSAGE_OFFSET; - - for (unsigned int i = MESSAGE_OFFSET; i < size; i++) - { - #ifdef DEBUG - *logofs << name() << ": Encoding char with i = " << i - << ".\n" << logofs_flush; - #endif - - clientCache -> renderTextCompressor. - encodeChar(*next++, encodeBuffer); - } - - break; - } - case X_RenderCompositeGlyphs16: - { - for (unsigned int i = MESSAGE_OFFSET; i < size; i += 2) - { - value = GetUINT(buffer + i, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Encoding short with i = " << i - << ".\n" << logofs_flush; - #endif - - encodeBuffer.encodeCachedValue(value, 16, - *clientCache -> renderCompositeGlyphsDataCache[clientCache -> - renderLastCompositeGlyphsData]); - - clientCache -> renderLastCompositeGlyphsData = value % 16; - } - - break; - } - default: - { - for (unsigned int i = MESSAGE_OFFSET; i < size; i += 4) - { - value = GetULONG(buffer + i, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Encoding long with i = " << i - << ".\n" << logofs_flush; - #endif - - encodeBuffer.encodeCachedValue(value, 32, - *clientCache -> renderCompositeGlyphsDataCache[clientCache -> - renderLastCompositeGlyphsData]); - - clientCache -> renderLastCompositeGlyphsData = value % 16; - } - - break; - } - } - - #ifdef TEST - *logofs << name() << ": Encoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_DATA - -MESSAGE_BEGIN_DECODE_DATA -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - switch (*(buffer + 1)) - { - case X_RenderCompositeGlyphs8: - { - clientCache -> renderTextCompressor.reset(); - - unsigned char *next = buffer + MESSAGE_OFFSET; - - for (unsigned int i = MESSAGE_OFFSET; i < size; i++) - { - #ifdef DEBUG - *logofs << name() << ": Decoding char with i = " << i - << ".\n" << logofs_flush; - #endif - - *next++ = clientCache -> renderTextCompressor. - decodeChar(decodeBuffer); - } - - break; - } - case X_RenderCompositeGlyphs16: - { - for (unsigned int i = MESSAGE_OFFSET; i < size; i += 2) - { - #ifdef DEBUG - *logofs << name() << ": Decoding short with i = " << i - << ".\n" << logofs_flush; - #endif - - decodeBuffer.decodeCachedValue(value, 16, - *clientCache -> renderCompositeGlyphsDataCache[clientCache -> - renderLastCompositeGlyphsData]); - - PutUINT(value, buffer + i, bigEndian); - - clientCache -> renderLastCompositeGlyphsData = value % 16; - } - - break; - } - default: - { - for (unsigned int i = MESSAGE_OFFSET; i < size; i += 4) - { - #ifdef DEBUG - *logofs << name() << ": Decoding long with i = " << i - << ".\n" << logofs_flush; - #endif - - decodeBuffer.decodeCachedValue(value, 32, - *clientCache -> renderCompositeGlyphsDataCache[clientCache -> - renderLastCompositeGlyphsData]); - - PutULONG(value, buffer + i, bigEndian); - - clientCache -> renderLastCompositeGlyphsData = value % 16; - } - - break; - } - } - - #ifdef TEST - *logofs << name() << ": Decoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_DATA - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.composite_glyphs_compat.type = *(buffer + 1); - renderExtension -> data.composite_glyphs_compat.op = *(buffer + 4); - - renderExtension -> data.composite_glyphs_compat.src_id = GetULONG(buffer + 8, bigEndian); - renderExtension -> data.composite_glyphs_compat.dst_id = GetULONG(buffer + 12, bigEndian); - - renderExtension -> data.composite_glyphs_compat.format = GetULONG(buffer + 16, bigEndian); - renderExtension -> data.composite_glyphs_compat.set_id = GetULONG(buffer + 20, bigEndian); - - renderExtension -> data.composite_glyphs_compat.src_x = GetUINT(buffer + 24, bigEndian); - renderExtension -> data.composite_glyphs_compat.src_y = GetUINT(buffer + 26, bigEndian); - - if (size >= MESSAGE_OFFSET) - { - renderExtension -> data.composite_glyphs_compat.num_elm = *(buffer + 28); - - renderExtension -> data.composite_glyphs_compat.delta_x = GetUINT(buffer + 32, bigEndian); - renderExtension -> data.composite_glyphs_compat.delta_y = GetUINT(buffer + 34, bigEndian); - } - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.composite_glyphs_compat.type - << " size is " << renderExtension -> size_ << " identity size " - << renderExtension -> i_size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.composite_glyphs_compat.type; - *(buffer + 4) = renderExtension -> data.composite_glyphs_compat.op; - - PutULONG(renderExtension -> data.composite_glyphs_compat.src_id, buffer + 8, bigEndian); - PutULONG(renderExtension -> data.composite_glyphs_compat.dst_id, buffer + 12, bigEndian); - - PutULONG(renderExtension -> data.composite_glyphs_compat.format, buffer + 16, bigEndian); - PutULONG(renderExtension -> data.composite_glyphs_compat.set_id, buffer + 20, bigEndian); - - PutUINT(renderExtension -> data.composite_glyphs_compat.src_x, buffer + 24, bigEndian); - PutUINT(renderExtension -> data.composite_glyphs_compat.src_y, buffer + 26, bigEndian); - - if (size >= MESSAGE_OFFSET) - { - *(buffer + 28) = renderExtension -> data.composite_glyphs_compat.num_elm; - - PutUINT(renderExtension -> data.composite_glyphs_compat.delta_x, buffer + 32, bigEndian); - PutUINT(renderExtension -> data.composite_glyphs_compat.delta_y, buffer + 34, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Len is " << (unsigned int) *(buffer + 28) - << " delta X is " << GetUINT(buffer + 32, bigEndian) - << " delta Y is " << GetUINT(buffer + 34, bigEndian) - << ".\n" << logofs_flush; - - *logofs << name() << ": Pad 1 is " << (unsigned int) *(buffer + 29) - << " pad 2 and 3 are " << GetUINT(buffer + 30, bigEndian) - << ".\n" << logofs_flush; - #endif - } - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.composite_glyphs_compat.type - << " size is " << renderExtension -> size_ << " identity size " - << renderExtension -> i_size_ << ".\n" << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - // - // Include minor opcode, size and - // the composite operator in the - // identity. - // - - md5_append(md5_state, buffer + 1, 4); - - // - // Include the format and the source - // x and y fields. - // - - md5_append(md5_state, buffer + 16, 4); - md5_append(md5_state, buffer + 24, 4); - - // - // Include the number of glyphs. - // - - if (size >= MESSAGE_OFFSET) - { - md5_append(md5_state, buffer + 28, 1); - } -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeXidValue(renderExtension -> data.composite_glyphs_compat.src_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.composite_glyphs_compat.src_id = - renderExtension -> data.composite_glyphs_compat.src_id; - - encodeBuffer.encodeXidValue(renderExtension -> data.composite_glyphs_compat.dst_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.composite_glyphs_compat.dst_id = - renderExtension -> data.composite_glyphs_compat.dst_id; - - encodeBuffer.encodeCachedValue(renderExtension -> data.composite_glyphs_compat.set_id, 29, - clientCache -> renderGlyphSetCache); - - cachedRenderExtension -> data.composite_glyphs_compat.set_id = - renderExtension -> data.composite_glyphs_compat.set_id; - - if (renderExtension -> size_ >= MESSAGE_OFFSET) - { - encodeBuffer.encodeCachedValue(renderExtension -> data.composite_glyphs_compat.delta_x, 16, - clientCache -> renderWidthCache, 11); - - cachedRenderExtension -> data.composite_glyphs_compat.delta_x = - renderExtension -> data.composite_glyphs_compat.delta_x; - - encodeBuffer.encodeCachedValue(renderExtension -> data.composite_glyphs_compat.delta_y, 16, - clientCache -> renderHeightCache, 11); - - cachedRenderExtension -> data.composite_glyphs_compat.delta_y = - renderExtension -> data.composite_glyphs_compat.delta_y; - } - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.composite_glyphs_compat.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeXidValue(renderExtension -> data.composite_glyphs_compat.src_id, - clientCache -> renderSrcPictureCache); - - decodeBuffer.decodeXidValue(renderExtension -> data.composite_glyphs_compat.dst_id, - clientCache -> renderSrcPictureCache); - - decodeBuffer.decodeCachedValue(renderExtension -> data.composite_glyphs_compat.set_id, 29, - clientCache -> renderGlyphSetCache); - - if (renderExtension -> size_ >= MESSAGE_OFFSET) - { - unsigned int value; - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> renderWidthCache, 11); - - renderExtension -> data.composite_glyphs_compat.delta_x = value; - - decodeBuffer.decodeCachedValue(value, 16, - clientCache -> renderHeightCache, 11); - - renderExtension -> data.composite_glyphs_compat.delta_y = value; - } - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.composite_glyphs_compat.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderCompositeGlyphsCompat.h b/nxcomp/RenderCompositeGlyphsCompat.h deleted file mode 100644 index 7a00608c2..000000000 --- a/nxcomp/RenderCompositeGlyphsCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderCompositeGlyphsCompat_H -#define RenderCompositeGlyphsCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderCompositeGlyphsCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderCompositeGlyphsCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 36 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 1 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 1 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return (size >= MESSAGE_OFFSET ? MESSAGE_OFFSET : size); - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderCompositeGlyphsCompat_H */ diff --git a/nxcomp/RenderCreateGlyphSetCompat.cpp b/nxcomp/RenderCreateGlyphSetCompat.cpp deleted file mode 100644 index 49e9f741d..000000000 --- a/nxcomp/RenderCreateGlyphSetCompat.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderCreateGlyphSetCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_SIZE -{ - // - // Strictly speaking this request doesn't have - // a data part. We encode the fields past the - // offset as they were data. An improvement - // would be to encode the format field using - // the cache. - // - - #ifdef TEST - *logofs << name() << ": Encoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_SIZE - -MESSAGE_BEGIN_DECODE_SIZE -{ - size = MESSAGE_OFFSET + 4; - - buffer = writeBuffer -> addMessage(size); - - #ifdef TEST - *logofs << name() << ": Decoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_SIZE - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(GetULONG(buffer + 4, bigEndian), - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - *(buffer + 1) = type; - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - PutULONG(value, buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_ENCODE_DATA -{ - #ifdef DEBUG - - *logofs << name() << ": Glyphset is " << GetULONG(buffer + 4, bigEndian) - << ".\n" << logofs_flush; - - if (size > MESSAGE_OFFSET) - { - *logofs << name() << ": Format is " << GetULONG(buffer + 8, bigEndian) - << ".\n" << logofs_flush; - } - - if (size > MESSAGE_OFFSET + 4) - { - *logofs << name() << ": WARNING! Unexpected size " << size - << ".\n" << logofs_flush; - } - - #endif - - encodeLongData(encodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Encoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_DATA - -MESSAGE_BEGIN_DECODE_DATA -{ - decodeLongData(decodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Decoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_DATA - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.create_set.type = *(buffer + 1); - - renderExtension -> data.create_set.set_id = GetULONG(buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.create_set.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.create_set.type; - - PutULONG(renderExtension -> data.create_set.set_id, buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.create_set.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - md5_append(md5_state, buffer + 1, 3); -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(renderExtension -> data.create_set.set_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - cachedRenderExtension -> data.create_set.set_id = - renderExtension -> data.create_set.set_id; - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.create_set.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeDiffCachedValue(renderExtension -> data.create_set.set_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.create_set.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderCreateGlyphSetCompat.h b/nxcomp/RenderCreateGlyphSetCompat.h deleted file mode 100644 index 174313e10..000000000 --- a/nxcomp/RenderCreateGlyphSetCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderCreateGlyphSetCompat_H -#define RenderCreateGlyphSetCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderCreateGlyphSetCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderCreateGlyphSetCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 8 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 1 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 1 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return MESSAGE_OFFSET; - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderCreateGlyphSetCompat_H */ diff --git a/nxcomp/RenderCreatePictureCompat.cpp b/nxcomp/RenderCreatePictureCompat.cpp deleted file mode 100644 index fa4dcb400..000000000 --- a/nxcomp/RenderCreatePictureCompat.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderCreatePictureCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue((size - MESSAGE_OFFSET) >> 2, 16, - clientCache -> renderLengthCache, 5); - - #ifdef TEST - *logofs << name() << ": Encoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_SIZE - -MESSAGE_BEGIN_DECODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeCachedValue(size, 16, - clientCache -> renderLengthCache, 5); - - size = MESSAGE_OFFSET + (size << 2); - - buffer = writeBuffer -> addMessage(size); - - #ifdef TEST - *logofs << name() << ": Decoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_SIZE - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(GetULONG(buffer + 4, bigEndian), - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - encodeBuffer.encodeXidValue(GetULONG(buffer + 8, bigEndian), - clientCache -> drawableCache); - - encodeBuffer.encodeCachedValue(GetULONG(buffer + 12, bigEndian), 32, - clientCache -> renderFormatCache); - - encodeBuffer.encodeCachedValue(GetULONG(buffer + 16, bigEndian), 32, - clientCache -> renderValueMaskCache); - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - *(buffer + 1) = type; - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - PutULONG(value, buffer + 4, bigEndian); - - decodeBuffer.decodeXidValue(value, - clientCache -> drawableCache); - - PutULONG(value, buffer + 8, bigEndian); - - decodeBuffer.decodeCachedValue(value, 32, - clientCache -> renderFormatCache); - - PutULONG(value, buffer + 12, bigEndian); - - decodeBuffer.decodeCachedValue(value, 32, - clientCache -> renderValueMaskCache); - - PutULONG(value, buffer + 16, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_ENCODE_DATA -{ - encodeLongData(encodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Encoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_DATA - -MESSAGE_BEGIN_DECODE_DATA -{ - decodeLongData(decodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Decoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_DATA - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.create_picture.type = *(buffer + 1); - - renderExtension -> data.create_picture.src_id = GetULONG(buffer + 4, bigEndian); - renderExtension -> data.create_picture.dst_id = GetULONG(buffer + 8, bigEndian); - - renderExtension -> data.create_picture.format = GetULONG(buffer + 12, bigEndian); - renderExtension -> data.create_picture.mask = GetULONG(buffer + 16, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.create_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.create_picture.type; - - PutULONG(renderExtension -> data.create_picture.src_id, buffer + 4, bigEndian); - PutULONG(renderExtension -> data.create_picture.dst_id, buffer + 8, bigEndian); - - PutULONG(renderExtension -> data.create_picture.format, buffer + 12, bigEndian); - PutULONG(renderExtension -> data.create_picture.mask, buffer + 16, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.create_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - md5_append(md5_state, buffer + 1, 3); - md5_append(md5_state, buffer + 12, 8); -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Encoding new id value " - << renderExtension -> data.create_picture.src_id - - clientCache -> renderLastId << ".\n"; - #endif - - encodeBuffer.encodeDiffCachedValue(renderExtension -> data.create_picture.src_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - cachedRenderExtension -> data.create_picture.src_id = - renderExtension -> data.create_picture.src_id; - - encodeBuffer.encodeXidValue(renderExtension -> data.create_picture.dst_id, - clientCache -> drawableCache); - - cachedRenderExtension -> data.create_picture.dst_id = - renderExtension -> data.create_picture.dst_id; - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.create_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeDiffCachedValue(renderExtension -> data.create_picture.src_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - decodeBuffer.decodeXidValue(renderExtension -> data.create_picture.dst_id, - clientCache -> drawableCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.create_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderCreatePictureCompat.h b/nxcomp/RenderCreatePictureCompat.h deleted file mode 100644 index 15c8c85b3..000000000 --- a/nxcomp/RenderCreatePictureCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderCreatePictureCompat_H -#define RenderCreatePictureCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderCreatePictureCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderCreatePictureCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 20 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 1 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 1 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return MESSAGE_OFFSET; - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderCreatePictureCompat_H */ diff --git a/nxcomp/RenderExtension.h b/nxcomp/RenderExtension.h index 2b616e1e5..7ccf54068 100644 --- a/nxcomp/RenderExtension.h +++ b/nxcomp/RenderExtension.h @@ -82,13 +82,6 @@ class RenderExtensionMessage : public Message friend class RenderTrapezoidsStore; friend class RenderTrianglesStore; - friend class RenderCreatePictureCompatStore; - friend class RenderFreePictureCompatStore; - friend class RenderPictureClipCompatStore; - friend class RenderCreateGlyphSetCompatStore; - friend class RenderCompositeCompatStore; - friend class RenderCompositeGlyphsCompatStore; - public: RenderExtensionMessage() diff --git a/nxcomp/RenderFreePictureCompat.cpp b/nxcomp/RenderFreePictureCompat.cpp deleted file mode 100644 index fb4c7ac54..000000000 --- a/nxcomp/RenderFreePictureCompat.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderFreePictureCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(GetULONG(buffer + 4, bigEndian), - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - unsigned int value; - - ClientCache *clientCache = (ClientCache *) channelCache; - - *(buffer + 1) = type; - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - PutULONG(value, buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.free_picture.type = *(buffer + 1); - - renderExtension -> data.free_picture.src_id = GetULONG(buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.free_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.free_picture.type; - - PutULONG(renderExtension -> data.free_picture.src_id, buffer + 4, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.free_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - md5_append(md5_state, buffer + 1, 3); -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeDiffCachedValue(renderExtension -> data.free_picture.src_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - cachedRenderExtension -> data.free_picture.src_id = - renderExtension -> data.free_picture.src_id; - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.free_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeDiffCachedValue(renderExtension -> data.free_picture.src_id, - clientCache -> renderLastId, 29, - clientCache -> renderIdCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.free_picture.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderFreePictureCompat.h b/nxcomp/RenderFreePictureCompat.h deleted file mode 100644 index 32d613ae0..000000000 --- a/nxcomp/RenderFreePictureCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderFreePictureCompat_H -#define RenderFreePictureCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderFreePictureCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderFreePictureCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 8 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 0 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 0 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return MESSAGE_OFFSET; - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderFreePictureCompat_H */ diff --git a/nxcomp/RenderPictureClipCompat.cpp b/nxcomp/RenderPictureClipCompat.cpp deleted file mode 100644 index 67d873008..000000000 --- a/nxcomp/RenderPictureClipCompat.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -// -// Include the template for -// this message class. -// - -#include "RenderPictureClipCompat.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include MESSAGE_TAGS - -// -// Message handling methods. -// - -MESSAGE_BEGIN_ENCODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue((size - MESSAGE_OFFSET) >> 2, 16, - clientCache -> renderLengthCache, 5); - - #ifdef TEST - *logofs << name() << ": Encoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_SIZE - -MESSAGE_BEGIN_DECODE_SIZE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeCachedValue(size, 16, - clientCache -> renderLengthCache, 5); - - size = MESSAGE_OFFSET + (size << 2); - - buffer = writeBuffer -> addMessage(size); - - #ifdef TEST - *logofs << name() << ": Decoded size with value " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_SIZE - -MESSAGE_BEGIN_ENCODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeXidValue(GetULONG(buffer + 4, bigEndian), - clientCache -> renderSrcPictureCache); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 8, bigEndian), - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - encodeBuffer.encodeDiffCachedValue(GetUINT(buffer + 10, bigEndian), - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - #ifdef TEST - *logofs << name() << ": Encoded message. Type is " - << (unsigned int) *(buffer + 1) << " size is " - << size << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_MESSAGE - -MESSAGE_BEGIN_DECODE_MESSAGE -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - *(buffer + 1) = type; - - decodeBuffer.decodeXidValue(value, - clientCache -> renderSrcPictureCache); - - PutULONG(value, buffer + 4, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastX, 16, - clientCache -> renderXCache, 11); - - PutUINT(clientCache -> renderLastX, buffer + 8, bigEndian); - - decodeBuffer.decodeDiffCachedValue(value, - clientCache -> renderLastY, 16, - clientCache -> renderYCache, 11); - - PutUINT(clientCache -> renderLastY, buffer + 10, bigEndian); - - #ifdef TEST - *logofs << name() << ": Decoded message. Type is " - << (unsigned int) type << " size is " << size - << ".\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_MESSAGE - -MESSAGE_BEGIN_ENCODE_DATA -{ - encodeIntData(encodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Encoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_DATA - -MESSAGE_BEGIN_DECODE_DATA -{ - decodeIntData(decodeBuffer, buffer, MESSAGE_OFFSET, - size, bigEndian, channelCache); - - #ifdef TEST - *logofs << name() << ": Decoded " << size - MESSAGE_OFFSET - << " bytes of data.\n" << logofs_flush; - #endif -} -MESSAGE_END_DECODE_DATA - -MESSAGE_BEGIN_PARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - renderExtension -> data.picture_clip.type = *(buffer + 1); - - renderExtension -> data.picture_clip.src_id = GetULONG(buffer + 4, bigEndian); - - renderExtension -> data.picture_clip.src_x = GetUINT(buffer + 8, bigEndian); - renderExtension -> data.picture_clip.src_y = GetUINT(buffer + 10, bigEndian); - - #ifdef TEST - *logofs << name() << ": Parsed identity. Type is " - << (unsigned int) renderExtension -> data.picture_clip.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_PARSE_IDENTITY - -MESSAGE_BEGIN_UNPARSE_IDENTITY -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - *(buffer + 1) = renderExtension -> data.picture_clip.type; - - PutULONG(renderExtension -> data.picture_clip.src_id, buffer + 4, bigEndian); - - PutUINT(renderExtension -> data.picture_clip.src_x, buffer + 8, bigEndian); - PutUINT(renderExtension -> data.picture_clip.src_y, buffer + 10, bigEndian); - - #ifdef TEST - *logofs << name() << ": Unparsed identity. Type is " - << (unsigned int) renderExtension -> data.picture_clip.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_UNPARSE_IDENTITY - -MESSAGE_BEGIN_IDENTITY_CHECKSUM -{ - md5_append(md5_state, buffer + 1, 3); - md5_append(md5_state, buffer + 8, 4); -} -MESSAGE_END_IDENTITY_CHECKSUM - -MESSAGE_BEGIN_ENCODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - RenderExtensionMessage *cachedRenderExtension = (RenderExtensionMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeXidValue(renderExtension -> data.picture_clip.src_id, - clientCache -> renderSrcPictureCache); - - cachedRenderExtension -> data.picture_clip.src_id = - renderExtension -> data.picture_clip.src_id; - - #ifdef TEST - *logofs << name() << ": Encoded update. Type is " - << (unsigned int) renderExtension -> data.picture_clip.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_ENCODE_UPDATE - -MESSAGE_BEGIN_DECODE_UPDATE -{ - RenderExtensionMessage *renderExtension = (RenderExtensionMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - decodeBuffer.decodeXidValue(renderExtension -> data.picture_clip.src_id, - clientCache -> renderSrcPictureCache); - - #ifdef TEST - *logofs << name() << ": Decoded update. Type is " - << (unsigned int) renderExtension -> data.picture_clip.type - << " size is " << renderExtension -> size_ << ".\n" - << logofs_flush; - #endif -} -MESSAGE_END_DECODE_UPDATE diff --git a/nxcomp/RenderPictureClipCompat.h b/nxcomp/RenderPictureClipCompat.h deleted file mode 100644 index 05fc5cda8..000000000 --- a/nxcomp/RenderPictureClipCompat.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef RenderPictureClipCompat_H -#define RenderPictureClipCompat_H - -// -// Define the characteristics -// of this message class here. -// - -#undef MESSAGE_NAME -#define MESSAGE_NAME "RenderPictureClipCompat" - -#undef MESSAGE_STORE -#define MESSAGE_STORE RenderPictureClipCompatStore - -#undef MESSAGE_CLASS -#define MESSAGE_CLASS RenderMinorExtensionStore - -#undef MESSAGE_METHODS -#define MESSAGE_METHODS "RenderMinorExtensionMethods.h" - -#undef MESSAGE_HEADERS -#define MESSAGE_HEADERS "RenderMinorExtensionHeaders.h" - -#undef MESSAGE_TAGS -#define MESSAGE_TAGS "RenderMinorExtensionTags.h" - -#undef MESSAGE_OFFSET -#define MESSAGE_OFFSET 12 - -#undef MESSAGE_HAS_SIZE -#define MESSAGE_HAS_SIZE 1 - -#undef MESSAGE_HAS_DATA -#define MESSAGE_HAS_DATA 1 - -#undef MESSAGE_HAS_FILTER -#define MESSAGE_HAS_FILTER 0 - -// -// Declare the message class. -// - -#include MESSAGE_HEADERS - -class MESSAGE_STORE : public MESSAGE_CLASS -{ - public: - - virtual const char *name() const - { - return MESSAGE_NAME; - } - - virtual int identitySize(const unsigned char *buffer, - unsigned int size) - { - return MESSAGE_OFFSET; - } - - #include MESSAGE_METHODS -}; - -#endif /* RenderPictureClipCompat_H */ diff --git a/nxcomp/SetUnpackAlphaCompat.cpp b/nxcomp/SetUnpackAlphaCompat.cpp deleted file mode 100644 index a8fcabdeb..000000000 --- a/nxcomp/SetUnpackAlphaCompat.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "SetUnpackAlphaCompat.h" - -#include "ClientCache.h" - -#include "EncodeBuffer.h" -#include "DecodeBuffer.h" - -#include "WriteBuffer.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Constructors and destructors. -// - -SetUnpackAlphaCompatStore::SetUnpackAlphaCompatStore(StaticCompressor *compressor) - - : MessageStore(compressor) -{ - enableCache = SETUNPACKALPHA_ENABLE_CACHE; - enableData = SETUNPACKALPHA_ENABLE_DATA; - enableSplit = SETUNPACKALPHA_ENABLE_SPLIT; - enableCompress = SETUNPACKALPHA_ENABLE_COMPRESS; - - dataLimit = SETUNPACKALPHA_DATA_LIMIT; - dataOffset = SETUNPACKALPHA_DATA_OFFSET; - - cacheSlots = SETUNPACKALPHA_CACHE_SLOTS; - cacheThreshold = SETUNPACKALPHA_CACHE_THRESHOLD; - cacheLowerThreshold = SETUNPACKALPHA_CACHE_LOWER_THRESHOLD; - - messages_ -> resize(cacheSlots); - - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - *i = NULL; - } - - temporary_ = NULL; -} - -SetUnpackAlphaCompatStore::~SetUnpackAlphaCompatStore() -{ - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - destroy(*i); - } - - destroy(temporary_); -} - -// -// Here are the methods to handle messages' content. -// - -int SetUnpackAlphaCompatStore::encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Encoding full message identity.\n" << logofs_flush; - #endif - - // Client. - encodeBuffer.encodeCachedValue(*(buffer + 1), 8, - clientCache -> resourceCache); - // Entries. - encodeBuffer.encodeValue(GetULONG(buffer + 4, bigEndian), 32, 9); - - #ifdef DEBUG - *logofs << name() << ": Encoded full message identity.\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackAlphaCompatStore::decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Decoding full message identity.\n" << logofs_flush; - #endif - - unsigned int value; - unsigned char cValue; - - // Client. - decodeBuffer.decodeCachedValue(cValue, 8, - clientCache -> resourceCache); - // Entries. - decodeBuffer.decodeValue(value, 32, 9); - - size = RoundUp4(value) + 8; - - buffer = writeBuffer -> addMessage(size); - - *(buffer + 1) = cValue; - - PutULONG(value, buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Decoded full message identity.\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackAlphaCompatStore::parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - SetUnpackAlphaCompatMessage *setUnpackAlpha = (SetUnpackAlphaCompatMessage *) message; - - setUnpackAlpha -> client = *(buffer + 1); - - setUnpackAlpha -> entries = GetULONG(buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Parsed identity for message at " << message << ".\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackAlphaCompatStore::unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - SetUnpackAlphaCompatMessage *setUnpackAlpha = (SetUnpackAlphaCompatMessage *) message; - - *(buffer + 1) = setUnpackAlpha -> client; - - PutULONG(setUnpackAlpha -> entries, buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Unparsed identity for message at " << message << ".\n" << logofs_flush; - #endif - - return 1; -} - -void SetUnpackAlphaCompatStore::dumpIdentity(const Message *message) const -{ - #ifdef DUMP - - SetUnpackAlphaCompatMessage *setUnpackAlpha = (SetUnpackAlphaCompatMessage *) message; - - *logofs << name() << ": Identity client " - << (unsigned int) setUnpackAlpha -> client << " entries " - << setUnpackAlpha -> entries << " size " - << setUnpackAlpha -> size_ << ".\n"; - - #endif -} - -void SetUnpackAlphaCompatStore::identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - md5_append(md5_state_, buffer + 4, 4); -} - -void SetUnpackAlphaCompatStore::updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const -{ - SetUnpackAlphaCompatMessage *setUnpackAlpha = (SetUnpackAlphaCompatMessage *) message; - SetUnpackAlphaCompatMessage *cachedSetUnpackAlpha = (SetUnpackAlphaCompatMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - encodeBuffer.encodeCachedValue(setUnpackAlpha -> client, 8, - clientCache -> resourceCache); - - cachedSetUnpackAlpha -> client = setUnpackAlpha -> client; - - if (cachedSetUnpackAlpha -> entries != setUnpackAlpha -> entries) - { - #ifdef TEST - *logofs << name() << ": Encoding value " << setUnpackAlpha -> entries - << " as entries field.\n" << logofs_flush; - #endif - - encodeBuffer.encodeBoolValue(1); - - encodeBuffer.encodeValue(setUnpackAlpha -> entries, 32, 9); - - cachedSetUnpackAlpha -> entries = setUnpackAlpha -> entries; - } - else - { - encodeBuffer.encodeBoolValue(0); - } -} - -void SetUnpackAlphaCompatStore::updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const -{ - SetUnpackAlphaCompatMessage *setUnpackAlpha = (SetUnpackAlphaCompatMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - decodeBuffer.decodeCachedValue(setUnpackAlpha -> client, 8, - clientCache -> resourceCache); - - decodeBuffer.decodeBoolValue(value); - - if (value) - { - decodeBuffer.decodeValue(value, 32, 9); - - setUnpackAlpha -> entries = value; - - #ifdef DEBUG - *logofs << name() << ": Decoded value " << setUnpackAlpha -> entries - << " as entries field.\n" << logofs_flush; - #endif - } -} diff --git a/nxcomp/SetUnpackAlphaCompat.h b/nxcomp/SetUnpackAlphaCompat.h deleted file mode 100644 index 80d1522c0..000000000 --- a/nxcomp/SetUnpackAlphaCompat.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef SetUnpackAlphaCompat_H -#define SetUnpackAlphaCompat_H - -#include "Message.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Set default values. -// - -#define SETUNPACKALPHA_ENABLE_CACHE 1 -#define SETUNPACKALPHA_ENABLE_DATA 1 -#define SETUNPACKALPHA_ENABLE_SPLIT 0 -#define SETUNPACKALPHA_ENABLE_COMPRESS 1 - -#define SETUNPACKALPHA_DATA_LIMIT 16384 -#define SETUNPACKALPHA_DATA_OFFSET 8 - -#define SETUNPACKALPHA_CACHE_SLOTS 2000 -#define SETUNPACKALPHA_CACHE_THRESHOLD 10 -#define SETUNPACKALPHA_CACHE_LOWER_THRESHOLD 5 - -// -// The message class. -// - -class SetUnpackAlphaCompatMessage : public Message -{ - friend class SetUnpackAlphaCompatStore; - - public: - - SetUnpackAlphaCompatMessage() - { - } - - ~SetUnpackAlphaCompatMessage() - { - } - - // - // Put here the fields which constitute - // the 'identity' part of the message. - // - - private: - - unsigned char client; - unsigned int entries; -}; - -class SetUnpackAlphaCompatStore : public MessageStore -{ - public: - - SetUnpackAlphaCompatStore(StaticCompressor *compressor); - - virtual ~SetUnpackAlphaCompatStore(); - - virtual const char *name() const - { - return "SetUnpackAlphaCompat"; - } - - virtual unsigned char opcode() const - { - return X_NXSetUnpackAlpha; - } - - virtual unsigned int storage() const - { - return sizeof(SetUnpackAlphaCompatMessage); - } - - // - // Message handling methods. - // - - protected: - - virtual Message *create() const - { - return new SetUnpackAlphaCompatMessage(); - } - - virtual Message *create(const Message &message) const - { - return new SetUnpackAlphaCompatMessage((const SetUnpackAlphaCompatMessage &) message); - } - - virtual void destroy(Message *message) const - { - delete (SetUnpackAlphaCompatMessage *) message; - } - - virtual int encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const; - - virtual int decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const; - - virtual int parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual int unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const; - - virtual void updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const; - - virtual void identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void dumpIdentity(const Message *message) const; -}; - -#endif /* SetUnpackAlphaCompat_H */ diff --git a/nxcomp/SetUnpackColormapCompat.cpp b/nxcomp/SetUnpackColormapCompat.cpp deleted file mode 100644 index 65b108a82..000000000 --- a/nxcomp/SetUnpackColormapCompat.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "SetUnpackColormapCompat.h" - -#include "ClientCache.h" - -#include "EncodeBuffer.h" -#include "DecodeBuffer.h" - -#include "WriteBuffer.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Constructors and destructors. -// - -SetUnpackColormapCompatStore::SetUnpackColormapCompatStore(StaticCompressor *compressor) - - : MessageStore(compressor) -{ - enableCache = SETUNPACKCOLORMAP_ENABLE_CACHE; - enableData = SETUNPACKCOLORMAP_ENABLE_DATA; - enableSplit = SETUNPACKCOLORMAP_ENABLE_SPLIT; - enableCompress = SETUNPACKCOLORMAP_ENABLE_COMPRESS; - - dataLimit = SETUNPACKCOLORMAP_DATA_LIMIT; - dataOffset = SETUNPACKCOLORMAP_DATA_OFFSET; - - cacheSlots = SETUNPACKCOLORMAP_CACHE_SLOTS; - cacheThreshold = SETUNPACKCOLORMAP_CACHE_THRESHOLD; - cacheLowerThreshold = SETUNPACKCOLORMAP_CACHE_LOWER_THRESHOLD; - - messages_ -> resize(cacheSlots); - - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - *i = NULL; - } - - temporary_ = NULL; -} - -SetUnpackColormapCompatStore::~SetUnpackColormapCompatStore() -{ - for (T_messages::iterator i = messages_ -> begin(); - i < messages_ -> end(); i++) - { - destroy(*i); - } - - destroy(temporary_); -} - -// -// Here are the methods to handle messages' content. -// - -int SetUnpackColormapCompatStore::encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Encoding full message identity.\n" << logofs_flush; - #endif - - // Client. - encodeBuffer.encodeCachedValue(*(buffer + 1), 8, - clientCache -> resourceCache); - // Entries. - encodeBuffer.encodeValue(GetULONG(buffer + 4, bigEndian), 32, 9); - - #ifdef DEBUG - *logofs << name() << ": Encoded full message identity.\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackColormapCompatStore::decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const -{ - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef DEBUG - *logofs << name() << ": Decoding full message identity.\n" << logofs_flush; - #endif - - unsigned int value; - unsigned char cValue; - - // Client. - decodeBuffer.decodeCachedValue(cValue, 8, - clientCache -> resourceCache); - // Entries. - decodeBuffer.decodeValue(value, 32, 9); - - size = (value << 2) + 8; - - buffer = writeBuffer -> addMessage(size); - - *(buffer + 1) = cValue; - - PutULONG(value, buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Decoded full message identity.\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackColormapCompatStore::parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - SetUnpackColormapCompatMessage *setUnpackColormap = (SetUnpackColormapCompatMessage *) message; - - setUnpackColormap -> client = *(buffer + 1); - - setUnpackColormap -> entries = GetULONG(buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Parsed identity for message at " << message << ".\n" << logofs_flush; - #endif - - return 1; -} - -int SetUnpackColormapCompatStore::unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - SetUnpackColormapCompatMessage *setUnpackColormap = (SetUnpackColormapCompatMessage *) message; - - *(buffer + 1) = setUnpackColormap -> client; - - PutULONG(setUnpackColormap -> entries, buffer + 4, bigEndian); - - #ifdef DEBUG - *logofs << name() << ": Unparsed identity for message at " << message << ".\n" << logofs_flush; - #endif - - return 1; -} - -void SetUnpackColormapCompatStore::dumpIdentity(const Message *message) const -{ - #ifdef DUMP - - SetUnpackColormapCompatMessage *setUnpackColormap = (SetUnpackColormapCompatMessage *) message; - - *logofs << name() << ": Identity client " - << (unsigned int) setUnpackColormap -> client << " entries " - << setUnpackColormap -> entries << " size " - << setUnpackColormap -> size_ << ".\n"; - - #endif -} - -void SetUnpackColormapCompatStore::identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const -{ - md5_append(md5_state_, buffer + 4, 4); -} - -void SetUnpackColormapCompatStore::updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const -{ - SetUnpackColormapCompatMessage *setUnpackColormap = (SetUnpackColormapCompatMessage *) message; - SetUnpackColormapCompatMessage *cachedSetUnpackColormap = (SetUnpackColormapCompatMessage *) cachedMessage; - - ClientCache *clientCache = (ClientCache *) channelCache; - - #ifdef TEST - *logofs << name() << ": Encoding value " - << (unsigned int) setUnpackColormap -> client - << " as client field.\n" << logofs_flush; - #endif - - encodeBuffer.encodeCachedValue(setUnpackColormap -> client, 8, - clientCache -> resourceCache); - - cachedSetUnpackColormap -> client = setUnpackColormap -> client; - - if (cachedSetUnpackColormap -> entries != setUnpackColormap -> entries) - { - #ifdef TEST - *logofs << name() << ": Encoding value " << setUnpackColormap -> entries - << " as entries field.\n" << logofs_flush; - #endif - - encodeBuffer.encodeBoolValue(1); - - encodeBuffer.encodeValue(setUnpackColormap -> entries, 32, 9); - - cachedSetUnpackColormap -> entries = setUnpackColormap -> entries; - } - else - { - encodeBuffer.encodeBoolValue(0); - } -} - -void SetUnpackColormapCompatStore::updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const -{ - SetUnpackColormapCompatMessage *setUnpackColormap = (SetUnpackColormapCompatMessage *) message; - - ClientCache *clientCache = (ClientCache *) channelCache; - - unsigned int value; - - decodeBuffer.decodeCachedValue(setUnpackColormap -> client, 8, - clientCache -> resourceCache); - - #ifdef DEBUG - *logofs << name() << ": Decoded value " - << (unsigned int) setUnpackColormap -> client - << " as client field.\n" << logofs_flush; - #endif - - decodeBuffer.decodeBoolValue(value); - - if (value) - { - decodeBuffer.decodeValue(value, 32, 9); - - setUnpackColormap -> entries = value; - - #ifdef DEBUG - *logofs << name() << ": Decoded value " << setUnpackColormap -> entries - << " as entries field.\n" << logofs_flush; - #endif - } -} diff --git a/nxcomp/SetUnpackColormapCompat.h b/nxcomp/SetUnpackColormapCompat.h deleted file mode 100644 index d1ffad876..000000000 --- a/nxcomp/SetUnpackColormapCompat.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef SetUnpackColormapCompat_H -#define SetUnpackColormapCompat_H - -#include "Message.h" - -// -// Set the verbosity level. -// - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -// -// Set default values. -// - -#define SETUNPACKCOLORMAP_ENABLE_CACHE 1 -#define SETUNPACKCOLORMAP_ENABLE_DATA 1 -#define SETUNPACKCOLORMAP_ENABLE_SPLIT 1 -#define SETUNPACKCOLORMAP_ENABLE_COMPRESS 1 - -#define SETUNPACKCOLORMAP_DATA_LIMIT 4096 -#define SETUNPACKCOLORMAP_DATA_OFFSET 8 - -#define SETUNPACKCOLORMAP_CACHE_SLOTS 2000 -#define SETUNPACKCOLORMAP_CACHE_THRESHOLD 5 -#define SETUNPACKCOLORMAP_CACHE_LOWER_THRESHOLD 0 - -// -// The message class. -// - -class SetUnpackColormapCompatMessage : public Message -{ - friend class SetUnpackColormapCompatStore; - - public: - - SetUnpackColormapCompatMessage() - { - } - - ~SetUnpackColormapCompatMessage() - { - } - - // - // Put here the fields which constitute - // the 'identity' part of the message. - // - - private: - - unsigned char client; - unsigned int entries; -}; - -class SetUnpackColormapCompatStore : public MessageStore -{ - public: - - SetUnpackColormapCompatStore(StaticCompressor *compressor); - - virtual ~SetUnpackColormapCompatStore(); - - virtual const char *name() const - { - return "SetUnpackColormapCompat"; - } - - virtual unsigned char opcode() const - { - return X_NXSetUnpackColormap; - } - - virtual unsigned int storage() const - { - return sizeof(SetUnpackColormapCompatMessage); - } - - // - // Message handling methods. - // - - protected: - - virtual Message *create() const - { - return new SetUnpackColormapCompatMessage(); - } - - virtual Message *create(const Message &message) const - { - return new SetUnpackColormapCompatMessage((const SetUnpackColormapCompatMessage &) message); - } - - virtual void destroy(Message *message) const - { - delete (SetUnpackColormapCompatMessage *) message; - } - - virtual int encodeIdentity(EncodeBuffer &encodeBuffer, const unsigned char *buffer, - const unsigned int size, int bigEndian, - ChannelCache *channelCache) const; - - virtual int decodeIdentity(DecodeBuffer &decodeBuffer, unsigned char *&buffer, - unsigned int &size, int bigEndian, WriteBuffer *writeBuffer, - ChannelCache *channelCache) const; - - virtual int parseIdentity(Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual int unparseIdentity(const Message *message, unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void updateIdentity(EncodeBuffer &encodeBuffer, const Message *message, - const Message *cachedMessage, - ChannelCache *channelCache) const; - - virtual void updateIdentity(DecodeBuffer &decodeBuffer, const Message *message, - ChannelCache *channelCache) const; - - virtual void identityChecksum(const Message *message, const unsigned char *buffer, - unsigned int size, int bigEndian) const; - - virtual void dumpIdentity(const Message *message) const; -}; - -#endif /* SetUnpackColormapCompat_H */ -- cgit v1.2.3 From 5c495241069708e9b1bbf6e57fd49599be540b63 Mon Sep 17 00:00:00 2001 From: Fernando Carvajal Date: Fri, 15 Apr 2016 09:49:09 +0200 Subject: Remove TextCompressor class and files from nxcomp This commit removes TextCompressor class references from ClientCache and ServerCache as it's no longer used after removing old protocol's compatibility code from nxcomp. It also removes the attribute textCache from both classes as it's no longer used either. Finally the header and source files associated with the TextCompressor class are also deleted and removed from the compilation process. Refs: ArcticaProject/nx-libs#108 --- debian/copyright.in | 2 -- nxcomp/ChannelCache.h | 7 ----- nxcomp/ClientCache.cpp | 2 -- nxcomp/ClientCache.h | 5 --- nxcomp/Makefile.in | 1 - nxcomp/ServerCache.h | 2 -- nxcomp/TextCompressor.cpp | 77 ----------------------------------------------- nxcomp/TextCompressor.h | 49 ------------------------------ 8 files changed, 145 deletions(-) delete mode 100644 nxcomp/TextCompressor.cpp delete mode 100644 nxcomp/TextCompressor.h (limited to 'debian') diff --git a/debian/copyright.in b/debian/copyright.in index 8f85b292f..4ffde0ba0 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -1131,8 +1131,6 @@ Files: nx-X11/extras/Mesa/src/mesa/main/WSDrawBuffer.h nxcomp/StaticCompressor.h nxcomp/Statistics.cpp nxcomp/Statistics.h - nxcomp/TextCompressor.cpp - nxcomp/TextCompressor.h nxcomp/Timestamp.cpp nxcomp/Timestamp.h nxcomp/TranslateCoords.cpp diff --git a/nxcomp/ChannelCache.h b/nxcomp/ChannelCache.h index 7b94893b6..c810a0b96 100644 --- a/nxcomp/ChannelCache.h +++ b/nxcomp/ChannelCache.h @@ -18,13 +18,6 @@ #ifndef ChannelCache_H #define ChannelCache_H -// -// Elements in array of caches used in TextCompressor. -// - -const unsigned int CLIENT_TEXT_CACHE_SIZE = 9999; -const unsigned int SERVER_TEXT_CACHE_SIZE = 9999; - // // Sizes of optional fields for ConfigureWindow // request. diff --git a/nxcomp/ClientCache.cpp b/nxcomp/ClientCache.cpp index ec37c69f6..49dc4ece5 100644 --- a/nxcomp/ClientCache.cpp +++ b/nxcomp/ClientCache.cpp @@ -100,8 +100,6 @@ ClientCache::ClientCache() : renderLastId(0), - renderTextCompressor(textCache, CLIENT_TEXT_CACHE_SIZE), - renderGlyphXCache(16), renderGlyphYCache(16), renderGlyphX(0), renderGlyphY(0), diff --git a/nxcomp/ClientCache.h b/nxcomp/ClientCache.h index 3fa59f642..9ac263c71 100644 --- a/nxcomp/ClientCache.h +++ b/nxcomp/ClientCache.h @@ -26,8 +26,6 @@ #include "XidCache.h" #include "FreeCache.h" -#include "TextCompressor.h" - #include "ChannelCache.h" class ClientCache : public ChannelCache @@ -61,7 +59,6 @@ class ClientCache : public ChannelCache // General-purpose caches. // - CharCache textCache[CLIENT_TEXT_CACHE_SIZE]; IntCache cursorCache; IntCache colormapCache; IntCache visualCache; @@ -383,8 +380,6 @@ class ClientCache : public ChannelCache IntCache *renderDataCache[16]; - TextCompressor renderTextCompressor; - IntCache renderGlyphXCache; IntCache renderGlyphYCache; diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index 93b644079..c2cdceead 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -165,7 +165,6 @@ CXXSRC = Loop.cpp \ BlockCache.cpp \ BlockCacheSet.cpp \ StaticCompressor.cpp \ - TextCompressor.cpp \ Unpack.cpp \ Alpha.cpp \ Colormap.cpp \ diff --git a/nxcomp/ServerCache.h b/nxcomp/ServerCache.h index 0968e235c..2287501bf 100644 --- a/nxcomp/ServerCache.h +++ b/nxcomp/ServerCache.h @@ -23,7 +23,6 @@ #include "IntCache.h" #include "CharCache.h" #include "OpcodeCache.h" -#include "TextCompressor.h" #include "BlockCache.h" #include "BlockCacheSet.h" @@ -47,7 +46,6 @@ class ServerCache : public ChannelCache // General-purpose caches. // - CharCache textCache[SERVER_TEXT_CACHE_SIZE]; IntCache replySequenceCache; IntCache eventSequenceCache; unsigned int lastTimestamp; diff --git a/nxcomp/TextCompressor.cpp b/nxcomp/TextCompressor.cpp deleted file mode 100644 index 16131222c..000000000 --- a/nxcomp/TextCompressor.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include "TextCompressor.h" - -#include "EncodeBuffer.h" -#include "DecodeBuffer.h" - -// -// The compression obtained by this class is -// very poor. In newer versions the text is -// simply appended to the encode buffer and -// compressed by leveraging the final stream -// compression. -// - -void -TextCompressor::encodeChar(unsigned char ch, EncodeBuffer& encodeBuffer) -{ - // encode each successive character of text using - // a predictive model where most of the last 3 characters - // (low order 7 bits of the previous character, plus the - // low order 5 bits of the character before that, plus - // the low order 3 bits of the character before that) - // are used to find the right cache... - - CharCache& cache = cache_[key_ % cacheSize_]; - if ((key_ >= 128) && (cache.getSize() == 0)) - { - // 3rd-order model doesn't have any statistics yet, - // so use the 1st-order one instead - CharCache& cache2 = cache_[(key_ & 0x7f) % cacheSize_]; - encodeBuffer.encodeCachedValue((unsigned int) ch, 8, cache2); - cache.insert(ch); - } - else - { - encodeBuffer.encodeCachedValue((unsigned int) ch, 8, cache); - } - - key_ = (((key_ & 0x1f) << 7) | ((key_ & 0x380) << 5) | (ch & 0x7f)); -} - - -unsigned char -TextCompressor::decodeChar(DecodeBuffer& decodeBuffer) -{ - unsigned char nextChar; - CharCache& cache = cache_[key_ % cacheSize_]; - if ((key_ >= 128) && (cache.getSize() == 0)) - { - CharCache& cache2 = cache_[(key_ & 0x7f) % cacheSize_]; - decodeBuffer.decodeCachedValue(nextChar, 8, cache2); - cache.insert(nextChar); - } - else - { - decodeBuffer.decodeCachedValue(nextChar, 8, cache); - } - - key_ = (((key_ & 0x1f) << 7) | ((key_ & 0x380) << 5) | (nextChar & 0x7f)); - return nextChar; -} diff --git a/nxcomp/TextCompressor.h b/nxcomp/TextCompressor.h deleted file mode 100644 index b373b98b8..000000000 --- a/nxcomp/TextCompressor.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ -/* */ -/* NXCOMP, NX protocol compression and NX extensions to this software */ -/* are copyright of NoMachine. Redistribution and use of the present */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#ifndef TextCompressor_H -#define TextCompressor_H - -#include "CharCache.h" - -class EncodeBuffer; -class DecodeBuffer; - -class TextCompressor -{ - public: - TextCompressor(CharCache* cache, unsigned int cacheSize): - cache_(cache), - cacheSize_(cacheSize), - key_(0) - { - } - - void encodeChar(unsigned char ch, EncodeBuffer &); - unsigned char decodeChar(DecodeBuffer &); - void reset(unsigned int newKey = 0) - { - key_ = newKey; - } - - private: - CharCache* cache_; - unsigned int cacheSize_; - unsigned int key_; -}; - -#endif /* TextCompressor_H */ -- cgit v1.2.3 From ebcb6a6e172bded13a13963ea03d279541978e8e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 25 Jun 2015 05:37:03 +0200 Subject: library-cleanup: Don't build libNX_Xrender anymore. Use system's libXrender shared library. --- debian/control | 60 +- debian/libnx-xrender-dev.install.in | 2 - debian/libnx-xrender1.install.in | 1 - debian/libnx-xrender1.symbols | 49 - debian/rules | 1 - nx-X11/config/cf/X11.tmpl | 39 - nx-X11/lib/Imakefile | 5 - nx-X11/lib/Xrender/AddTrap.c | 70 -- nx-X11/lib/Xrender/Color.c | 92 -- nx-X11/lib/Xrender/Composite.c | 67 -- nx-X11/lib/Xrender/Cursor.c | 79 -- nx-X11/lib/Xrender/FillRect.c | 91 -- nx-X11/lib/Xrender/FillRects.c | 79 -- nx-X11/lib/Xrender/Filter.c | 152 --- nx-X11/lib/Xrender/Glyph.c | 1169 -------------------- nx-X11/lib/Xrender/Imakefile | 149 --- nx-X11/lib/Xrender/Picture.c | 366 ------ nx-X11/lib/Xrender/Poly.c | 302 ----- nx-X11/lib/Xrender/Trap.c | 74 -- nx-X11/lib/Xrender/Tri.c | 169 --- nx-X11/lib/Xrender/Xrender-def.cpp | 44 - nx-X11/lib/Xrender/Xrender.c | 889 --------------- nx-X11/lib/Xrender/Xrender.h | 544 --------- nx-X11/lib/Xrender/Xrenderint.h | 109 -- nx-X11/lib/Xrender/config.h | 0 nx-X11/programs/Xserver/Imakefile | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXrenderint.h | 111 ++ nx-X11/programs/Xserver/hw/nxagent/Render.c | 4 +- .../hw/nxagent/X11/include/Xrender_nxagent.h | 528 +++++++++ nx-libs.spec | 42 - 30 files changed, 665 insertions(+), 4628 deletions(-) delete mode 100644 debian/libnx-xrender-dev.install.in delete mode 100644 debian/libnx-xrender1.install.in delete mode 100644 debian/libnx-xrender1.symbols delete mode 100644 nx-X11/lib/Xrender/AddTrap.c delete mode 100644 nx-X11/lib/Xrender/Color.c delete mode 100644 nx-X11/lib/Xrender/Composite.c delete mode 100644 nx-X11/lib/Xrender/Cursor.c delete mode 100644 nx-X11/lib/Xrender/FillRect.c delete mode 100644 nx-X11/lib/Xrender/FillRects.c delete mode 100644 nx-X11/lib/Xrender/Filter.c delete mode 100644 nx-X11/lib/Xrender/Glyph.c delete mode 100644 nx-X11/lib/Xrender/Imakefile delete mode 100644 nx-X11/lib/Xrender/Picture.c delete mode 100644 nx-X11/lib/Xrender/Poly.c delete mode 100644 nx-X11/lib/Xrender/Trap.c delete mode 100644 nx-X11/lib/Xrender/Tri.c delete mode 100644 nx-X11/lib/Xrender/Xrender-def.cpp delete mode 100644 nx-X11/lib/Xrender/Xrender.c delete mode 100644 nx-X11/lib/Xrender/Xrender.h delete mode 100644 nx-X11/lib/Xrender/Xrenderint.h delete mode 100644 nx-X11/lib/Xrender/config.h create mode 100644 nx-X11/programs/Xserver/hw/nxagent/NXrenderint.h create mode 100644 nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrender_nxagent.h (limited to 'debian') diff --git a/debian/control b/debian/control index 94aa64014..83aee8e58 100644 --- a/debian/control +++ b/debian/control @@ -23,6 +23,7 @@ Build-Depends: libxfixes-dev, libxtst-dev, libxinerama-dev, + libxrender-dev, autoconf, pkg-config, x11proto-core-dev, @@ -747,21 +748,16 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - ${shlibs:Depends}, ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Rendering Extension client library +Description: nx-X11 Rendering Extension client library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - The X Rendering Extension (Render) introduces digital image composition - as the foundation of a new rendering model within the X Window System. - Rendering geometric figures is accomplished by client-side tessellation - into either triangles or trapezoids. Text is drawn by loading glyphs - into the server and rendering sets of them. The Xrender library exposes - this extension to X clients. + This package removes the obsoleted libNX_Xrender.so.1 library. With + recent versions of NX, the system-wide installed libXrender gets used. + . + This package can be safely removed. Package: libnx-xrender-dev Provides: libnx-xrender1-dev @@ -769,24 +765,17 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xrender1 (= ${binary:Version}), - nx-x11proto-render-dev (= ${binary:Version}), ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Rendering Extension client library (development headers) +Description: nx-X11 Rendering Extension client library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - The X Rendering Extension (Render) introduces digital image composition - as the foundation of a new rendering model within the X Window System. - Rendering geometric figures is accomplished by client-side tessellation - into either triangles or trapezoids. Text is drawn by loading glyphs - into the server and rendering sets of them. The Xrender library exposes - this extension to X clients. + This package removes the obsoleted headers for the libNX_Xrender.so.1 + library. With recent versions of NX, the system-wide installed libXrender + gets used. . - This package contains the development headers for this library. + This package can be safely removed. Package: nx-x11proto-render-dev Section: libdevel @@ -794,16 +783,16 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Render extension wire protocol +Description: nx-X11 Render extension wire protocol (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - This package provides development headers describing the wire protocol - for the Render extension, used to implement Porter-Duff operations - within X. + This package removes the obsoleted headers for the libNX_Xrender.so.1 + library. With recent versions of NX, the system-wide installed libXrender + gets used. + . + This package can be safely removed. Package: libnx-xrender1-dbg Architecture: any @@ -811,23 +800,18 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends}, Depends: - libnx-xrender1 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), -Description: nx-X11 Rendering Extension client library (debug package) +Description: nx-X11 Rendering Extension client library (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - The X Rendering Extension (Render) introduces digital image composition - as the foundation of a new rendering model within the X Window System. - Rendering geometric figures is accomplished by client-side tessellation - into either triangles or trapezoids. Text is drawn by loading glyphs - into the server and rendering sets of them. The Xrender library exposes - this extension to X clients. + This package removes the obsoleted debug symbols for the libNX_Xrender.so.1 + library. With recent versions of NX, the system-wide installed libXrender + gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: libnx-xtst6 Architecture: any diff --git a/debian/libnx-xrender-dev.install.in b/debian/libnx-xrender-dev.install.in deleted file mode 100644 index 2aede35da..000000000 --- a/debian/libnx-xrender-dev.install.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libNX_Xrender.so -usr/include/*/nx-X11/extensions/Xrender.h diff --git a/debian/libnx-xrender1.install.in b/debian/libnx-xrender1.install.in deleted file mode 100644 index 371550abb..000000000 --- a/debian/libnx-xrender1.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xrender.so.* diff --git a/debian/libnx-xrender1.symbols b/debian/libnx-xrender1.symbols deleted file mode 100644 index bb51b1a1f..000000000 --- a/debian/libnx-xrender1.symbols +++ /dev/null @@ -1,49 +0,0 @@ -libNX_Xrender.so.1 libnx-xrender1 #MINVER# - XRenderAddGlyphs@Base 3.5.0.29 - XRenderAddTraps@Base 3.5.0.29 - XRenderChangePicture@Base 3.5.0.29 - XRenderCleanGlyphs@Base 3.5.0.29 - XRenderComposite@Base 3.5.0.29 - XRenderCompositeDoublePoly@Base 3.5.0.29 - XRenderCompositeString16@Base 3.5.0.29 - XRenderCompositeString32@Base 3.5.0.29 - XRenderCompositeString8@Base 3.5.0.29 - XRenderCompositeText16@Base 3.5.0.29 - XRenderCompositeText32@Base 3.5.0.29 - XRenderCompositeText8@Base 3.5.0.29 - XRenderCompositeTrapezoids@Base 3.5.0.29 - XRenderCompositeTriFan@Base 3.5.0.29 - XRenderCompositeTriStrip@Base 3.5.0.29 - XRenderCompositeTriangles@Base 3.5.0.29 - XRenderCreateAnimCursor@Base 3.5.0.29 - XRenderCreateConicalGradient@Base 3.5.0.29 - XRenderCreateCursor@Base 3.5.0.29 - XRenderCreateGlyphSet@Base 3.5.0.29 - XRenderCreateLinearGradient@Base 3.5.0.29 - XRenderCreatePicture@Base 3.5.0.29 - XRenderCreateRadialGradient@Base 3.5.0.29 - XRenderCreateSolidFill@Base 3.5.0.29 - XRenderExtensionInfo@Base 3.5.0.29 - XRenderExtensionName@Base 3.5.0.29 - XRenderFillRectangle@Base 3.5.0.29 - XRenderFillRectangles@Base 3.5.0.29 - XRenderFindDisplay@Base 3.5.0.29 - XRenderFindFormat@Base 3.5.0.29 - XRenderFindStandardFormat@Base 3.5.0.29 - XRenderFindVisualFormat@Base 3.5.0.29 - XRenderFreeGlyphSet@Base 3.5.0.29 - XRenderFreeGlyphs@Base 3.5.0.29 - XRenderFreePicture@Base 3.5.0.29 - XRenderParseColor@Base 3.5.0.29 - XRenderQueryExtension@Base 3.5.0.29 - XRenderQueryFilters@Base 3.5.0.29 - XRenderQueryFormats@Base 3.5.0.29 - XRenderQueryPictIndexValues@Base 3.5.0.29 - XRenderQuerySubpixelOrder@Base 3.5.0.29 - XRenderQueryVersion@Base 3.5.0.29 - XRenderReferenceGlyphSet@Base 3.5.0.29 - XRenderSetPictureClipRectangles@Base 3.5.0.29 - XRenderSetPictureClipRegion@Base 3.5.0.29 - XRenderSetPictureFilter@Base 3.5.0.29 - XRenderSetPictureTransform@Base 3.5.0.29 - XRenderSetSubpixelOrder@Base 3.5.0.29 diff --git a/debian/rules b/debian/rules index c90bb6451..578fc84f8 100755 --- a/debian/rules +++ b/debian/rules @@ -77,7 +77,6 @@ override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg - dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 3e7423040..f02f80786 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -281,9 +281,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildRender #define BuildRender YES #endif -#ifndef BuildRenderLibrary -#define BuildRenderLibrary !BuildServersOnly -#endif #ifndef BuildRandR #define BuildRandR YES @@ -1317,31 +1314,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) DEPXLIBONLY = $(DEPXONLYLIB) XLIBONLY = $(XONLYLIB) LINTXONLYLIB = $(LINTXONLY) - -#if BuildRenderLibrary -#ifndef SharedLibXrender -#define SharedLibXrender HasSharedLibraries -#endif -#ifndef NormalLibXrender -#define NormalLibXrender (!SharedLibXrender || ForceNormalLib) -#endif -#ifndef DebugLibXrender -#define DebugLibXrender NO -#endif -#ifndef ProfileLibXrender -#define ProfileLibXrender NO -#endif -#else -#undef SharedLibXrender -#define SharedLibXrender NO -#undef NormalLibXrender -#define NormalLibXrender NO -#undef DebugLibXrender -#define DebugLibXrender NO -#undef ProfileLibXrender -#define ProfileLibXrender NO -#endif - #ifndef SharedLibXext #define SharedLibXext HasSharedLibraries #endif @@ -1367,17 +1339,6 @@ LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) - - XRENDERLIBSRC = $(LIBSRC)/Xrender -#if SharedLibXrender -#ifndef SharedXrenderRev -#define SharedXrenderRev 1.2.2 -#endif -SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev) -#else -ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir) -#endif - #ifndef SharedLibXau #define SharedLibXau YES #endif diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index dbe4e4280..77f8882c0 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -15,10 +15,6 @@ NULL = XKBLIBDIR = xkbfile #endif -#if BuildRenderLibrary -RENDERLIBDIR = Xrender -#endif - #if BuildXauLib XAULIBDIR = Xau #endif @@ -43,7 +39,6 @@ LINTSUBDIRS = \ $(XEXTLIBDIR) \ $(XKBLIBDIR) \ $(XINERAMADIR) \ - $(RENDERLIBDIR) \ $(NULL) SUBDIRS = xtrans $(LINTSUBDIRS) diff --git a/nx-X11/lib/Xrender/AddTrap.c b/nx-X11/lib/Xrender/AddTrap.c deleted file mode 100644 index 3422a63c7..000000000 --- a/nx-X11/lib/Xrender/AddTrap.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id: AddTrap.c,v 1.4 2005/07/03 07:00:57 daniels Exp $ - * - * Copyright © 2004 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -#define NLOCAL 256 - -void -XRenderAddTraps (Display *dpy, - Picture picture, - int xOff, - int yOff, - _Xconst XTrap *traps, - int ntrap) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderAddTrapsReq *req; - int n; - long len; - unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - while (ntrap) - { - GetReq(RenderAddTraps, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderAddTraps; - req->picture = picture; - req->xOff = xOff; - req->yOff = yOff; - n = ntrap; - len = ((long) n) * (SIZEOF (xTrap) >> 2); - if (len > (max_req - req->length)) { - n = (max_req - req->length) / (SIZEOF (xTrap) >> 2); - len = ((long)n) * (SIZEOF (xTrap) >> 2); - } - SetReqLen (req, len, len); - len <<= 2; - DataInt32 (dpy, (int *) traps, len); - ntrap -= n; - traps += n; - } - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xrender/Color.c b/nx-X11/lib/Xrender/Color.c deleted file mode 100644 index 6875204e6..000000000 --- a/nx-X11/lib/Xrender/Color.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -Status -XRenderParseColor(Display *dpy, char *spec, XRenderColor *def) -{ - - if (!strncmp (spec, "rgba:", 5)) - { - unsigned short elements[4]; - unsigned short *pShort; - int i, n; - char c; - - spec += 5; - /* - * Attempt to parse the value portion. - */ - pShort = elements; - for (i = 0; i < 4; i++, pShort++, spec++) { - n = 0; - *pShort = 0; - while (*spec != '/' && *spec != '\0') { - if (++n > 4) { - return 0; - } - c = *spec++; - *pShort <<= 4; - if (c >= '0' && c <= '9') - *pShort |= c - '0'; - /* assume string in lowercase - else if (c >= 'A' && c <= 'F') - *pShort |= c - ('A' - 10); - */ - else if (c >= 'a' && c <= 'f') - *pShort |= c - ('a' - 10); - else return 0; - } - if (n == 0) - return 0; - if (n < 4) { - *pShort = ((unsigned long)*pShort * 0xFFFF) / ((1 << n*4) - 1); - } - } - def->red = elements[0]; - def->green = elements[1]; - def->blue = elements[2]; - def->alpha = elements[3]; - } - else - { - XColor coreColor; - Colormap colormap; - - colormap = DefaultColormap (dpy, DefaultScreen (dpy)); - if (!XParseColor (dpy, colormap, spec, &coreColor)) - return 0; - def->red = coreColor.red; - def->green = coreColor.green; - def->blue = coreColor.blue; - def->alpha = 0xffff; - } - def->red = (def->red * def->alpha) / 0xffffU; - def->green = (def->green * def->alpha) / 0xffffU; - def->blue = (def->blue * def->alpha) / 0xffffU; - return 1; -} diff --git a/nx-X11/lib/Xrender/Composite.c b/nx-X11/lib/Xrender/Composite.c deleted file mode 100644 index 07151ded9..000000000 --- a/nx-X11/lib/Xrender/Composite.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -void -XRenderComposite (Display *dpy, - int op, - Picture src, - Picture mask, - Picture dst, - int src_x, - int src_y, - int mask_x, - int mask_y, - int dst_x, - int dst_y, - unsigned int width, - unsigned int height) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderComposite, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderComposite; - req->op = (CARD8) op; - req->src = src; - req->mask = mask; - req->dst = dst; - req->xSrc = src_x; - req->ySrc = src_y; - req->xMask = mask_x; - req->yMask = mask_y; - req->xDst = dst_x; - req->yDst = dst_y; - req->width = width; - req->height = height; - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xrender/Cursor.c b/nx-X11/lib/Xrender/Cursor.c deleted file mode 100644 index 2679a9eaa..000000000 --- a/nx-X11/lib/Xrender/Cursor.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -Cursor -XRenderCreateCursor (Display *dpy, - Picture source, - unsigned int x, - unsigned int y) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Cursor cid; - xRenderCreateCursorReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateCursor, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateCursor; - req->cid = cid = XAllocID (dpy); - req->src = source; - req->x = x; - req->y = y; - - UnlockDisplay(dpy); - SyncHandle(); - return cid; -} - -Cursor -XRenderCreateAnimCursor (Display *dpy, - int ncursor, - XAnimCursor *cursors) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Cursor cid; - xRenderCreateAnimCursorReq *req; - long len; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateAnimCursor, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateAnimCursor; - req->cid = cid = XAllocID (dpy); - - len = (long) ncursor * SIZEOF (xAnimCursorElt) >> 2; - SetReqLen (req, len, len); - len <<= 2; - Data32 (dpy, (long *) cursors, len); - - UnlockDisplay(dpy); - SyncHandle(); - return cid; -} diff --git a/nx-X11/lib/Xrender/FillRect.c b/nx-X11/lib/Xrender/FillRect.c deleted file mode 100644 index 75915379e..000000000 --- a/nx-X11/lib/Xrender/FillRect.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -/* precompute the maximum size of batching request allowed */ - -#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle)) - -void -XRenderFillRectangle (Display *dpy, - int op, - Picture dst, - _Xconst XRenderColor *color, - int x, - int y, - unsigned int width, - unsigned int height) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRectangle *rect; - xRenderFillRectanglesReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - req = (xRenderFillRectanglesReq *) dpy->last_req; - /* if same as previous request, with same drawable, batch requests */ - if (req->reqType == info->codes->major_opcode && - req->renderReqType == X_RenderFillRectangles && - req->op == op && - req->dst == dst && - req->color.red == color->red && - req->color.green == color->green && - req->color.blue == color->blue && - req->color.alpha == color->alpha && - dpy->bufptr + SIZEOF(xRectangle) <= dpy->bufmax && - (char *)dpy->bufptr - (char *)req < size) - { - req->length += SIZEOF(xRectangle) >> 2; - rect = (xRectangle *) dpy->bufptr; - dpy->bufptr += SIZEOF(xRectangle); - } - else - { - GetReqExtra(RenderFillRectangles, SIZEOF(xRectangle), req); - - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderFillRectangles; - req->op = op; - req->dst = dst; - req->color.red = color->red; - req->color.green = color->green; - req->color.blue = color->blue; - req->color.alpha = color->alpha; - - rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq); - } - rect->x = x; - rect->y = y; - rect->width = width; - rect->height = height; - - UnlockDisplay(dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xrender/FillRects.c b/nx-X11/lib/Xrender/FillRects.c deleted file mode 100644 index 517eeb0dc..000000000 --- a/nx-X11/lib/Xrender/FillRects.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -/* precompute the maximum size of batching request allowed */ - -#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle)) - -void -XRenderFillRectangles (Display *dpy, - int op, - Picture dst, - _Xconst XRenderColor *color, - _Xconst XRectangle *rectangles, - int n_rects) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderFillRectanglesReq *req; - long len; - int n; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - while (n_rects) - { - GetReq(RenderFillRectangles, req); - - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderFillRectangles; - req->op = op; - req->dst = dst; - req->color.red = color->red; - req->color.green = color->green; - req->color.blue = color->blue; - req->color.alpha = color->alpha; - - n = n_rects; - len = ((long)n) << 1; - if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) - { - n = (dpy->max_request_size - req->length) >> 1; - len = ((long)n) << 1; - } - SetReqLen(req, len, len); - len <<= 2; /* watch out for macros... */ - Data16 (dpy, (short *) rectangles, len); - n_rects -= n; - rectangles += n; - } - UnlockDisplay(dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xrender/Filter.c b/nx-X11/lib/Xrender/Filter.c deleted file mode 100644 index 335f6b2e6..000000000 --- a/nx-X11/lib/Xrender/Filter.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -XFilters * -XRenderQueryFilters (Display *dpy, Drawable drawable) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - XRenderInfo *xri; - xRenderQueryFiltersReq *req; - xRenderQueryFiltersReply rep; - XFilters *filters; - char *name; - char len; - int i; - long nbytes, nbytesAlias, nbytesName; - - if (!RenderHasExtension (info)) - return 0; - - if (!XRenderQueryFormats (dpy)) - return 0; - - xri = info->info; - if (xri->minor_version < 6) - return 0; - - LockDisplay (dpy); - GetReq (RenderQueryFilters, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderQueryFilters; - req->drawable = drawable; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - /* - * Compute total number of bytes for filter names - */ - nbytes = (long)rep.length << 2; - nbytesAlias = rep.numAliases * 2; - if (rep.numAliases & 1) - nbytesAlias += 2; - nbytesName = nbytes - nbytesAlias; - - /* - * Allocate one giant block for the whole data structure - */ - filters = Xmalloc (sizeof (XFilters) + - rep.numFilters * sizeof (char *) + - rep.numAliases * sizeof (short) + - nbytesName); - - if (!filters) - { - _XEatData (dpy, (unsigned long) rep.length << 2); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - - /* - * Layout: - * XFilters - * numFilters char * pointers to filter names - * numAliases short alias values - * nbytesName char strings - */ - - filters->nfilter = rep.numFilters; - filters->nalias = rep.numAliases; - filters->filter = (char **) (filters + 1); - filters->alias = (short *) (filters->filter + rep.numFilters); - name = (char *) (filters->alias + rep.numAliases); - - /* - * Read the filter aliases - */ - _XRead16Pad (dpy, filters->alias, 2 * rep.numAliases); - - /* - * Read the filter names - */ - for (i = 0; i < rep.numFilters; i++) - { - int l; - _XRead (dpy, &len, 1); - l = len & 0xff; - filters->filter[i] = name; - _XRead (dpy, name, l); - name[l] = '\0'; - name += l + 1; - } - i = name - (char *) (filters->alias + rep.numAliases); - - if (i & 3) - _XEatData (dpy, 4 - (i & 3)); - - UnlockDisplay (dpy); - return filters; -} - -void -XRenderSetPictureFilter (Display *dpy, - Picture picture, - char *filter, - XFixed *params, - int nparams) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderSetPictureFilterReq *req; - int nbytes = strlen (filter); - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderSetPictureFilter, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderSetPictureFilter; - req->picture = picture; - req->nbytes = nbytes; - req->length += ((nbytes + 3) >> 2) + nparams; - Data (dpy, filter, nbytes); - Data32 (dpy, params, nparams << 2); - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xrender/Glyph.c b/nx-X11/lib/Xrender/Glyph.c deleted file mode 100644 index e25805f5c..000000000 --- a/nx-X11/lib/Xrender/Glyph.c +++ /dev/null @@ -1,1169 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -/* - * NX_RENDER_CLEANUP enables cleaning of padding bytes - */ - -#define NX_RENDER_CLEANUP - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG -#undef DUMP - -#ifdef NX_RENDER_CLEANUP - -#include - -#define ROUNDUP(nbits, pad) ((((nbits) + ((pad)-1)) / (pad)) * ((pad)>>3)) - -#endif /* NX_RENDER_CLEANUP */ - -GlyphSet -XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - GlyphSet gsid; - xRenderCreateGlyphSetReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateGlyphSet, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateGlyphSet; - req->gsid = gsid = XAllocID(dpy); - req->format = format->id; - UnlockDisplay(dpy); - SyncHandle(); - return gsid; -} - -GlyphSet -XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - GlyphSet gsid; - xRenderReferenceGlyphSetReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderReferenceGlyphSet, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderReferenceGlyphSet; - req->gsid = gsid = XAllocID(dpy); - req->existing = existing; - UnlockDisplay(dpy); - SyncHandle(); - return gsid; -} - -void -XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderFreeGlyphSetReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderFreeGlyphSet, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderFreeGlyphSet; - req->glyphset = glyphset; - UnlockDisplay(dpy); - SyncHandle(); -} - -#ifdef NX_RENDER_CLEANUP - -void -XRenderCleanGlyphs(xGlyphInfo *gi, - int nglyphs, - CARD8 *images, - int depth, - Display *dpy) -{ - - int widthInBits; - int bytesPerLine; - int bytesToClean; - int bitsToClean; - int widthInBytes; - int height = gi -> height; - register int i; - int j; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: Found a Glyph with Depth %d, width %d, pad %d.\n", - depth, gi -> width, dpy -> bitmap_pad); - #endif - - while (nglyphs > 0) - { - if (depth == 24) - { - widthInBits = gi -> width * 32; - - bytesPerLine = ROUNDUP(widthInBits, dpy -> bitmap_pad); - - bytesToClean = bytesPerLine * height; - - #ifdef DUBUG - fprintf(stderr, "nxagentCleanGlyphs: Found glyph with depth 24, bytes to clean is %d" - "width in bits is %d bytes per line [%d] height [%d].\n", bytesToClean, - widthInBits, bytesPerLine, height); - #endif - - if (dpy -> byte_order == LSBFirst) - { - for (i = 3; i < bytesToClean; i += 4) - { - images[i] = 0x00; - } - } - else - { - for (i = 0; i < bytesToClean; i += 4) - { - images[i] = 0x00; - } - } - - #ifdef DUMP - fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); - for (i = 0; i < bytesPerLine; i++) - { - fprintf(stderr, "[%d]", images[i]); - } - fprintf(stderr,"\n"); - #endif - - images += bytesToClean; - - gi++; - - nglyphs--; - } - else if (depth == 1) - { - widthInBits = gi -> width; - - bytesPerLine = ROUNDUP(widthInBits, dpy -> bitmap_pad); - - bitsToClean = (bytesPerLine << 3) - (gi -> width); - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: Found glyph with depth 1, width [%d], height [%d], bitsToClean [%d]," - " bytesPerLine [%d].\n", gi -> width, height, bitsToClean, bytesPerLine); - #endif - - bytesToClean = bitsToClean >> 3; - - bitsToClean &= 7; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: bitsToClean &=7 is %d, bytesToCLean is %d." - " byte_order is %d, bitmap_bit_order is %d.\n", bitsToClean, bytesToClean, - dpy -> byte_order, dpy -> bitmap_bit_order); - #endif - - for (i = 1; i <= height; i++) - { - if (dpy -> byte_order == dpy -> bitmap_bit_order) - { - for (j = 1; j <= bytesToClean; j++) - { - images[i * bytesPerLine - j] = 0x00; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: byte_order = bitmap_bit_orde, cleaning %d, i=%d, j=%d.\n" - , (i * bytesPerLine - j), i, j); - #endif - - } - } - else - { - for (j = bytesToClean; j >= 1; j--) - { - images[i * bytesPerLine - j] = 0x00; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: byte_order %d, bitmap_bit_order %d, cleaning %d, i=%d, j=%d.\n" - , dpy -> byte_order, dpy -> bitmap_bit_order, (i * bytesPerLine - j), i, j); - #endif - - } - } - - if (dpy -> bitmap_bit_order == MSBFirst) - { - images[i * bytesPerLine - j] &= 0xff << bitsToClean; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: byte_order MSBFirst, cleaning %d, i=%d, j=%d.\n" - , (i * bytesPerLine - j), i, j); - #endif - } - else - { - images[i * bytesPerLine - j] &= 0xff >> bitsToClean; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: byte_order LSBFirst, cleaning %d, i=%d, j=%d.\n" - , (i * bytesPerLine - j), i, j); - #endif - } - } - - #ifdef DUMP - fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); - for (i = 0; i < bytesPerLine; i++) - { - fprintf(stderr, "[%d]", images[i]); - } - fprintf(stderr,"\n"); - #endif - - images += bytesPerLine * height; - - gi++; - - nglyphs--; - } - else if ((depth == 8) || (depth == 16) ) - { - widthInBits = gi -> width * depth; - - bytesPerLine = ROUNDUP(widthInBits, dpy -> bitmap_pad); - - widthInBytes = (widthInBits >> 3); - - bytesToClean = bytesPerLine - widthInBytes; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: nglyphs is %d, width of glyph in bits is %d, in bytes is %d.\n", - nglyphs, widthInBits, widthInBytes); - - fprintf(stderr, "nxagentCleanGlyphs: bytesPerLine is %d bytes, there are %d scanlines.\n", bytesPerLine, height); - - fprintf(stderr, "nxagentCleanGlyphs: Bytes to clean for each scanline are %d.\n", bytesToClean); - #endif - - if (bytesToClean > 0) - { - while (height > 0) - { - i = bytesToClean; - - while (i > 0) - { - *(images + (bytesPerLine - i)) = 0; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n"); - #endif - - i--; - } - - #ifdef DUMP - fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); - for (i = 0; i < bytesPerLine; i++) - { - fprintf(stderr, "[%d]", images[i]); - } - fprintf(stderr,"\n"); - #endif - - images += bytesPerLine; - - height--; - } - } - - gi++; - - nglyphs--; - - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: Breaking Out.\n"); - #endif - } - else if (depth == 32) - { - #ifdef DEBUG - fprintf(stderr, "nxagentCleanGlyphs: Found glyph with depth 32.\n"); - #endif - - gi++; - - nglyphs--; - } - else - { - #ifdef WARNING - fprintf(stderr, "nxagentCleanGlyphs: Unrecognized glyph, depth is not 8/16/24/32, it appears to be %d.\n", - depth); - #endif - - gi++; - - nglyphs--; - } - } -} - -#endif /* #ifdef NX_RENDER_CLEANUP */ - -void -XRenderAddGlyphs (Display *dpy, - GlyphSet glyphset, - _Xconst Glyph *gids, - _Xconst XGlyphInfo *glyphs, - int nglyphs, - _Xconst char *images, - int nbyte_images) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderAddGlyphsReq *req; - long len; - - if (nbyte_images & 3) - nbyte_images += 4 - (nbyte_images & 3); - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderAddGlyphs, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderAddGlyphs; - req->glyphset = glyphset; - req->nglyphs = nglyphs; - len = (nglyphs * (SIZEOF (xGlyphInfo) + 4) + nbyte_images) >> 2; - SetReqLen(req, len, len); - Data32 (dpy, (long *) gids, nglyphs * 4); - Data16 (dpy, (short *) glyphs, nglyphs * SIZEOF (xGlyphInfo)); - Data (dpy, images, nbyte_images); - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderFreeGlyphs (Display *dpy, - GlyphSet glyphset, - _Xconst Glyph *gids, - int nglyphs) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderFreeGlyphsReq *req; - long len; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderFreeGlyphs, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderFreeGlyphs; - req->glyphset = glyphset; - len = nglyphs; - SetReqLen(req, len, len); - len <<= 2; - Data32 (dpy, (long *) gids, len); - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeString8 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst char *string, - int nchar) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs8Req *req; - long len; - xGlyphElt *elt; - int nbytes; - - if (!nchar) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - GetReq(RenderCompositeGlyphs8, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs8; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - - /* - * xGlyphElt must be aligned on a 32-bit boundary; this is - * easily done by filling no more than 252 glyphs in each - * bucket - */ - -#define MAX_8 252 - - len = SIZEOF(xGlyphElt) * ((nchar + MAX_8-1) / MAX_8) + nchar; - - req->length += (len + 3)>>2; /* convert to number of 32-bit words */ - - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - - if (dpy->bufptr + len > dpy->bufmax) - _XFlush (dpy); - - while(nchar > MAX_8) - { - nbytes = MAX_8 + SIZEOF(xGlyphElt); - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = MAX_8; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - memcpy ((char *) (elt + 1), string, MAX_8); - nchar = nchar - MAX_8; - string += MAX_8; - } - - if (nchar) - { - nbytes = (nchar + SIZEOF(xGlyphElt) + 3) & ~3; - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = nchar; - elt->deltax = xDst; - elt->deltay = yDst; - memcpy ((char *) (elt + 1), string, nchar); - } -#undef MAX_8 - - UnlockDisplay(dpy); - SyncHandle(); -} -void -XRenderCompositeString16 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst unsigned short *string, - int nchar) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs8Req *req; - long len; - xGlyphElt *elt; - int nbytes; - - if (!nchar) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - GetReq(RenderCompositeGlyphs16, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs16; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - -#define MAX_16 254 - - len = SIZEOF(xGlyphElt) * ((nchar + MAX_16-1) / MAX_16) + nchar * 2; - - req->length += (len + 3)>>2; /* convert to number of 32-bit words */ - - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - - if (dpy->bufptr + len > dpy->bufmax) - _XFlush (dpy); - - while(nchar > MAX_16) - { - nbytes = MAX_16 * 2 + SIZEOF(xGlyphElt); - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = MAX_16; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - memcpy ((char *) (elt + 1), (char *) string, MAX_16 * 2); - nchar = nchar - MAX_16; - string += MAX_16; - } - - if (nchar) - { - nbytes = (nchar * 2 + SIZEOF(xGlyphElt) + 3) & ~3; - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = nchar; - elt->deltax = xDst; - elt->deltay = yDst; - memcpy ((char *) (elt + 1), (char *) string, nchar * 2); - } -#undef MAX_16 - - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeString32 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst unsigned int *string, - int nchar) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs8Req *req; - long len; - xGlyphElt *elt; - int nbytes; - - if (!nchar) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - GetReq(RenderCompositeGlyphs32, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs32; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - -#define MAX_32 254 - - len = SIZEOF(xGlyphElt) * ((nchar + MAX_32-1) / MAX_32) + nchar * 4; - - req->length += (len + 3)>>2; /* convert to number of 32-bit words */ - - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - - if (dpy->bufptr + len > dpy->bufmax) - _XFlush (dpy); - - while(nchar > MAX_32) - { - nbytes = MAX_32 * 4 + SIZEOF(xGlyphElt); - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = MAX_32; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - memcpy ((char *) (elt + 1), (char *) string, MAX_32 * 4); - nchar = nchar - MAX_32; - string += MAX_32; - } - - if (nchar) - { - nbytes = nchar * 4 + SIZEOF(xGlyphElt); - BufAlloc (xGlyphElt *, elt, nbytes); - elt->len = nchar; - elt->deltax = xDst; - elt->deltay = yDst; - memcpy ((char *) (elt + 1), (char *) string, nchar * 4); - } -#undef MAX_32 - - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeText8 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt8 *elts, - int nelt) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs8Req *req; - GlyphSet glyphset; - long len; - long elen; - xGlyphElt *elt; - int i; - _Xconst char *chars; - int nchars; - - #ifdef NX_RENDER_CLEANUP - - char tmpChar[4]; - int bytes_to_clean; - int bytes_to_write; - - #endif /* NX_RENDER_CLEANUP */ - - if (!nelt) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - GetReq(RenderCompositeGlyphs8, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs8; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = elts[0].glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - - /* - * Compute the space necessary - */ - len = 0; - -#define MAX_8 252 - - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Check for glyphset change - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - len += (SIZEOF (xGlyphElt) + 4) >> 2; - } - nchars = elts[i].nchars; - /* - * xGlyphElt must be aligned on a 32-bit boundary; this is - * easily done by filling no more than 252 glyphs in each - * bucket - */ - elen = SIZEOF(xGlyphElt) * ((nchars + MAX_8-1) / MAX_8) + nchars; - len += (elen + 3) >> 2; - } - - req->length += len; - - /* - * Send the glyphs - */ - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Switch glyphsets - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = 0xff; - elt->deltax = 0; - elt->deltay = 0; - Data32(dpy, &glyphset, 4); - } - nchars = elts[i].nchars; - xDst = elts[i].xOff; - yDst = elts[i].yOff; - chars = elts[i].chars; - while (nchars) - { - int this_chars = nchars > MAX_8 ? MAX_8 : nchars; - - BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = this_chars; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - - #ifdef NX_RENDER_CLEANUP - - bytes_to_write = this_chars & ~3; - - bytes_to_clean = ((this_chars + 3) & ~3) - this_chars; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText8: bytes_to_write %d, bytes_to_clean are %d," - " this_chars %d.\n", bytes_to_write, bytes_to_clean, this_chars); - #endif - - if (bytes_to_clean > 0) - { - if (bytes_to_write > 0) - { - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText8: found %d clean bytes, bytes_to_clean are %d," - " this_chars %d.\n", bytes_to_write, bytes_to_clean, this_chars); - #endif - - Data (dpy, chars, bytes_to_write); - chars += bytes_to_write; - } - - bytes_to_write = this_chars % 4; - memcpy (tmpChar, chars, bytes_to_write); - chars += bytes_to_write; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText8: last 32 bit, bytes_to_write are %d," - " bytes_to_clean are %d, this_chars are %d.\n", bytes_to_write, bytes_to_clean, this_chars); - #endif - - #ifdef DUMP - fprintf(stderr, "XRenderCompositeText8: bytes_to_clean %d, ", bytes_to_clean); - #endif - - while (bytes_to_clean > 0) - { - tmpChar[4 - bytes_to_clean] = 0; - bytes_to_clean--; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText8: Cleaned %d byte.\n", 4 - bytes_to_clean); - #endif - } - - Data (dpy, tmpChar, 4); - nchars -= this_chars; - - #ifdef DUMP - fprintf(stderr, "Data: "); - for (i = 0; i < 4; i++) - { - fprintf(stderr, "[%d]", tmpChar[i]); - } - fprintf(stderr,"\n"); - #endif - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText8: nchars now is %d.\n", nchars); - #endif - - continue; - } - - #endif /* NX_RENDER_CLEANUP */ - - Data (dpy, chars, this_chars); - nchars -= this_chars; - chars += this_chars; - } - } -#undef MAX_8 - - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeText16 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt16 *elts, - int nelt) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs16Req *req; - GlyphSet glyphset; - long len; - long elen; - xGlyphElt *elt; - int i; - _Xconst unsigned short *chars; - int nchars; - - #ifdef NX_RENDER_CLEANUP - - int bytes_to_write; - int bytes_to_clean; - char tmpChar[4]; - - #endif /* NX_RENDER_CLEANUP */ - - if (!nelt) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - GetReq(RenderCompositeGlyphs16, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs16; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = elts[0].glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - - /* - * Compute the space necessary - */ - len = 0; - -#define MAX_16 254 - - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Check for glyphset change - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - len += (SIZEOF (xGlyphElt) + 4) >> 2; - } - nchars = elts[i].nchars; - /* - * xGlyphElt must be aligned on a 32-bit boundary; this is - * easily done by filling no more than 254 glyphs in each - * bucket - */ - elen = SIZEOF(xGlyphElt) * ((nchars + MAX_16-1) / MAX_16) + nchars * 2; - len += (elen + 3) >> 2; - } - - req->length += len; - - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Switch glyphsets - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = 0xff; - elt->deltax = 0; - elt->deltay = 0; - Data32(dpy, &glyphset, 4); - } - nchars = elts[i].nchars; - xDst = elts[i].xOff; - yDst = elts[i].yOff; - chars = elts[i].chars; - while (nchars) - { - int this_chars = nchars > MAX_16 ? MAX_16 : nchars; - int this_bytes = this_chars * 2; - - BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = this_chars; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - - #ifdef NX_RENDER_CLEANUP - - bytes_to_write = this_bytes & ~3; - bytes_to_clean = ((this_bytes + 3) & ~3) - this_bytes; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText16: this_chars %d, this_bytes %d.\n" - "bytes_to_write %d, bytes_to_clean are %d.\n", this_chars, this_bytes, - bytes_to_write, bytes_to_clean); - #endif - - if (bytes_to_clean > 0) - { - if (bytes_to_write > 0) - { - Data16 (dpy, chars, bytes_to_write); - - /* - * Cast chars to avoid errors with pointer arithmetic. - */ - - chars = (unsigned short *) ((char *) chars + bytes_to_write); - } - - bytes_to_write = this_bytes % 4; - memcpy (tmpChar, (char *) chars, bytes_to_write); - chars = (unsigned short *) ((char *) chars + bytes_to_write); - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText16: last 32 bit, bytes_to_write are %d," - " bytes_to_clean are %d.\n", bytes_to_write, bytes_to_clean); - #endif - - while (bytes_to_clean > 0) - { - tmpChar[4 - bytes_to_clean] = 0; - bytes_to_clean--; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText16: Cleaned %d byte.\n", 4 - bytes_to_clean); - #endif - } - - Data16 (dpy, tmpChar, 4); - nchars -= this_chars; - - #ifdef DEBUG - fprintf(stderr, "XRenderCompositeText16: nchars now is %d.\n", nchars); - #endif - - continue; - } - - #endif /* NX_RENDER_CLEANUP */ - - Data16 (dpy, chars, this_bytes); - nchars -= this_chars; - chars += this_chars; - } - } -#undef MAX_16 - - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeText32 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt32 *elts, - int nelt) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderCompositeGlyphs32Req *req; - GlyphSet glyphset; - long len; - long elen; - xGlyphElt *elt; - int i; - _Xconst unsigned int *chars; - int nchars; - - if (!nelt) - return; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - - - GetReq(RenderCompositeGlyphs32, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCompositeGlyphs32; - req->op = op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : None; - req->glyphset = elts[0].glyphset; - req->xSrc = xSrc; - req->ySrc = ySrc; - - /* - * Compute the space necessary - */ - len = 0; - -#define MAX_32 254 - - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Check for glyphset change - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - len += (SIZEOF (xGlyphElt) + 4) >> 2; - } - nchars = elts[i].nchars; - elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32) / MAX_32) + nchars *4; - len += (elen + 3) >> 2; - } - - req->length += len; - - glyphset = elts[0].glyphset; - for (i = 0; i < nelt; i++) - { - /* - * Switch glyphsets - */ - if (elts[i].glyphset != glyphset) - { - glyphset = elts[i].glyphset; - BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = 0xff; - elt->deltax = 0; - elt->deltay = 0; - Data32(dpy, &glyphset, 4); - } - nchars = elts[i].nchars; - xDst = elts[i].xOff; - yDst = elts[i].yOff; - chars = elts[i].chars; - while (nchars) - { - int this_chars = nchars > MAX_32 ? MAX_32 : nchars; - int this_bytes = this_chars * 4; - BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - - #ifdef NX_RENDER_CLEANUP - - elt->pad1 = 0; - elt->pad2 = 0; - - #endif /* NX_RENDER_CLEANUP */ - - elt->len = this_chars; - elt->deltax = xDst; - elt->deltay = yDst; - xDst = 0; - yDst = 0; - - #ifdef TEST - fprintf(stderr, "XRenderCompositeText32: this_chars %d, this_bytes %d.\n", - this_chars, this_bytes); - #endif - - DataInt32 (dpy, chars, this_bytes); - nchars -= this_chars; - chars += this_chars; - } - } -#undef MAX_32 - - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xrender/Imakefile b/nx-X11/lib/Xrender/Imakefile deleted file mode 100644 index c5a0f89fc..000000000 --- a/nx-X11/lib/Xrender/Imakefile +++ /dev/null @@ -1,149 +0,0 @@ -XCOMM $XFree86: xc/lib/Xrender/Imakefile,v 1.10tsi Exp $ - -#ifdef UseInstalled - -XCOMM Allow for builds against old installed bits. Note that this requires -XCOMM that additional files be copied (or linked) into this directory. See -XCOMM NONSTANDARD_HEADERS below. - -#ifndef SharedLibXrender -#define SharedLibXrender YES -#endif - -#ifndef NormalLibXrender -#define NormalLibXrender (!SharedLibXrender | ForceNormalLib) -#endif - -#ifndef DebugLibXrender -#define DebugLibXrender NO -#endif - -#ifndef ProfileLibXrender -#define ProfileLibXrender NO -#endif - -#undef SharedXrenderRev -#define SharedXrenderRev 1.1 -SOXRENDERREV = SharedXrenderRev - -#undef LinkBuildLibrary -#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ - RemoveFile($(BUILDLIBDIR)/lib) @@\ - cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . -#undef _LinkBuildLibrary -#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) - -#undef LinkBuildLibraryMaybe -#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ - @if doit; then (set -x; \ @@\ - RemoveFile($(BUILDLIBDIR)/lib); \ @@\ - cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi - -#undef LdPreLibs -#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs - -LDPRELIBS = LdPreLibs - -NONSTANDARD_HEADERS = extutil.h region.h render.h renderproto.h - -all:: $(NONSTANDARD_HEADERS) -includes depend:: $(NONSTANDARD_HEADERS) - -$(NONSTANDARD_HEADERS): - @echo Header file $@ is missing. - -#ifdef XBuildIncDir -RENDERCLEANDIR = $(BUILDINCROOT) -#else -RENDERCLEANDIR = $(BUILDINCDIR) -#endif - -clean:: - $(RM) -r $(RENDERCLEANDIR) - -#endif - -#define DoNormalLib NormalLibXrender -#define DoSharedLib SharedLibXrender -#define DoDebugLib DebugLibXrender -#define DoProfileLib ProfileLibXrender -#define LibName NX_Xrender -#define SoRev SOXRENDERREV - -#ifdef XBuildIncDir -#define IncSubdir nx-X11 -#define IncSubSubdir extensions -RENDERINCDIR = $(BUILDINCDIR) -#else -#define IncSubdir extensions -RENDERINCDIR = $(BUILDINCROOT) -#endif - -#include - -#ifdef SharedXrenderReqs -REQUIREDLIBS = SharedXrenderReqs -#endif - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - - DEFINES = $(ALLOC_DEFINES) -#ifdef UseInstalled - INCLUDES = -I$(RENDERINCDIR) -I$(INCROOT)/X11 -I$(INCROOT)/X11/extensions -#else - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -#endif - - SRCS = Xrender.c \ - AddTrap.c \ - Color.c \ - Composite.c \ - Cursor.c \ - Glyph.c \ - Picture.c \ - FillRect.c \ - FillRects.c \ - Filter.c \ - Poly.c \ - Trap.c \ - Tri.c - - OBJS = Xrender.o \ - AddTrap.o \ - Color.o \ - Composite.o \ - Cursor.o \ - Glyph.o \ - Picture.o \ - FillRect.o \ - FillRects.o \ - Filter.o \ - Poly.o \ - Trap.o \ - Tri.o - - LINTLIBS = $(LINTXLIB) - -HEADERS = Xrender.h $(NONSTANDARD_HEADERS) - -SUBSTVARS=prefix="$(PROJECTROOT)" \ - exec_prefix="$(BINDIR)" \ - libdir="$(USRLIBDIR)" \ - includedir="$(INCROOT)" \ - VERSION="0.8.4" \ - X_REQUIRES="" \ - RENDER_CFLAGS="" \ - X_NON_PKG_CFLAGS="" \ - X_NON_PKG_LIBS="-lX11 -lXext" - -#include - -DependTarget() - -#ifndef clean -/* Generate a distclean target */ -distclean:: clean - RemoveFile(Makefile) -#endif diff --git a/nx-X11/lib/Xrender/Picture.c b/nx-X11/lib/Xrender/Picture.c deleted file mode 100644 index 260eda05e..000000000 --- a/nx-X11/lib/Xrender/Picture.c +++ /dev/null @@ -1,366 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" -#include - -static void -_XRenderProcessPictureAttributes (Display *dpy, - xRenderChangePictureReq *req, - unsigned long valuemask, - _Xconst XRenderPictureAttributes *attributes) -{ - unsigned long values[32]; - register unsigned long *value = values; - unsigned int nvalues; - - if (valuemask & CPRepeat) - *value++ = attributes->repeat; - if (valuemask & CPAlphaMap) - *value++ = attributes->alpha_map; - if (valuemask & CPAlphaXOrigin) - *value++ = attributes->alpha_x_origin; - if (valuemask & CPAlphaYOrigin) - *value++ = attributes->alpha_y_origin; - if (valuemask & CPClipXOrigin) - *value++ = attributes->clip_x_origin; - if (valuemask & CPClipYOrigin) - *value++ = attributes->clip_y_origin; - if (valuemask & CPClipMask) - *value++ = attributes->clip_mask; - if (valuemask & CPGraphicsExposure) - *value++ = attributes->graphics_exposures; - if (valuemask & CPSubwindowMode) - *value++ = attributes->subwindow_mode; - if (valuemask & CPPolyEdge) - *value++ = attributes->poly_edge; - if (valuemask & CPPolyMode) - *value++ = attributes->poly_mode; - if (valuemask & CPDither) - *value++ = attributes->dither; - if (valuemask & CPComponentAlpha) - *value++ = attributes->component_alpha; - - req->length += (nvalues = value - values); - - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); -} - -Picture -XRenderCreatePicture (Display *dpy, - Drawable drawable, - _Xconst XRenderPictFormat *format, - unsigned long valuemask, - _Xconst XRenderPictureAttributes *attributes) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Picture pid; - xRenderCreatePictureReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreatePicture, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreatePicture; - req->pid = pid = XAllocID(dpy); - req->drawable = drawable; - req->format = format->id; - if ((req->mask = valuemask)) - _XRenderProcessPictureAttributes (dpy, - (xRenderChangePictureReq *) req, - valuemask, - attributes); - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} - -void -XRenderChangePicture (Display *dpy, - Picture picture, - unsigned long valuemask, - _Xconst XRenderPictureAttributes *attributes) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderChangePictureReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderChangePicture, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderChangePicture; - req->picture = picture; - req->mask = valuemask; - _XRenderProcessPictureAttributes (dpy, - req, - valuemask, - attributes); - UnlockDisplay(dpy); - SyncHandle(); -} - -static void -_XRenderSetPictureClipRectangles (Display *dpy, - XRenderExtDisplayInfo *info, - Picture picture, - int xOrigin, - int yOrigin, - _Xconst XRectangle *rects, - int n) -{ - xRenderSetPictureClipRectanglesReq *req; - long len; - - GetReq (RenderSetPictureClipRectangles, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderSetPictureClipRectangles; - req->picture = picture; - req->xOrigin = xOrigin; - req->yOrigin = yOrigin; - len = ((long) n) << 1; - SetReqLen (req, len, 1); - len <<= 2; - Data16 (dpy, (short *) rects, len); -} - -void -XRenderSetPictureClipRectangles (Display *dpy, - Picture picture, - int xOrigin, - int yOrigin, - _Xconst XRectangle *rects, - int n) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - _XRenderSetPictureClipRectangles (dpy, info, picture, - xOrigin, yOrigin, rects, n); - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XRenderSetPictureClipRegion (Display *dpy, - Picture picture, - Region r) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - int i; - XRectangle *xr, *pr; - BOX *pb; - unsigned long total; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - total = r->numRects * sizeof (XRectangle); - if ((xr = (XRectangle *) _XAllocTemp(dpy, total))) { - for (pr = xr, pb = r->rects, i = r->numRects; --i >= 0; pr++, pb++) { - pr->x = pb->x1; - pr->y = pb->y1; - pr->width = pb->x2 - pb->x1; - pr->height = pb->y2 - pb->y1; - } - } - if (xr || !r->numRects) - _XRenderSetPictureClipRectangles (dpy, info, picture, 0, 0, - xr, r->numRects); - if (xr) - _XFreeTemp(dpy, (char *)xr, total); - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderSetPictureTransform (Display *dpy, - Picture picture, - XTransform *transform) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderSetPictureTransformReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq(RenderSetPictureTransform, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderSetPictureTransform; - req->picture = picture; - req->transform.matrix11 = transform->matrix[0][0]; - req->transform.matrix12 = transform->matrix[0][1]; - req->transform.matrix13 = transform->matrix[0][2]; - req->transform.matrix21 = transform->matrix[1][0]; - req->transform.matrix22 = transform->matrix[1][1]; - req->transform.matrix23 = transform->matrix[1][2]; - req->transform.matrix31 = transform->matrix[2][0]; - req->transform.matrix32 = transform->matrix[2][1]; - req->transform.matrix33 = transform->matrix[2][2]; - UnlockDisplay(dpy); - SyncHandle(); - -} - -void -XRenderFreePicture (Display *dpy, - Picture picture) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderFreePictureReq *req; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - GetReq(RenderFreePicture, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderFreePicture; - req->picture = picture; - UnlockDisplay(dpy); - SyncHandle(); -} - - -Picture XRenderCreateSolidFill(Display *dpy, - const XRenderColor *color) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Picture pid; - xRenderCreateSolidFillReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateSolidFill, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateSolidFill; - - req->pid = pid = XAllocID(dpy); - req->color.red = color->red; - req->color.green = color->green; - req->color.blue = color->blue; - req->color.alpha = color->alpha; - - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} - - -Picture XRenderCreateLinearGradient(Display *dpy, - const XLinearGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nStops) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Picture pid; - xRenderCreateLinearGradientReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateLinearGradient, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateLinearGradient; - - req->pid = pid = XAllocID(dpy); - req->p1.x = gradient->p1.x; - req->p1.y = gradient->p1.y; - req->p2.x = gradient->p2.x; - req->p2.y = gradient->p2.y; - - req->nStops = nStops; - DataInt32(dpy, stops, nStops * 4); - Data16(dpy, colors, nStops * 8); - req->length += nStops*3; - - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} - -Picture XRenderCreateRadialGradient(Display *dpy, - const XRadialGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nStops) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Picture pid; - xRenderCreateRadialGradientReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateRadialGradient, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateRadialGradient; - - req->pid = pid = XAllocID(dpy); - req->inner.x = gradient->inner.x; - req->inner.y = gradient->inner.y; - req->outer.x = gradient->outer.x; - req->outer.y = gradient->outer.y; - req->inner_radius = gradient->inner.radius; - req->outer_radius = gradient->outer.radius; - - req->nStops = nStops; - DataInt32(dpy, stops, nStops * 4); - Data16(dpy, colors, nStops * 8); - req->length += nStops*3; - - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} - -Picture XRenderCreateConicalGradient(Display *dpy, - const XConicalGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nStops) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - Picture pid; - xRenderCreateConicalGradientReq *req; - - RenderCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(RenderCreateConicalGradient, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderCreateConicalGradient; - - req->pid = pid = XAllocID(dpy); - req->center.x = gradient->center.x; - req->center.y = gradient->center.y; - req->angle = gradient->angle; - - req->nStops = nStops; - DataInt32(dpy, stops, nStops * 4); - Data16(dpy, colors, nStops * 8); - req->length += nStops*3; - - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} diff --git a/nx-X11/lib/Xrender/Poly.c b/nx-X11/lib/Xrender/Poly.c deleted file mode 100644 index ee461d7c5..000000000 --- a/nx-X11/lib/Xrender/Poly.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -typedef struct _Edge Edge; - -struct _Edge { - XLineFixed edge; - XFixed current_x; - Bool clockWise; - Edge *next, *prev; -}; - -static int -CompareEdge (const void *o1, const void *o2) -{ - const Edge *e1 = o1, *e2 = o2; - - return e1->edge.p1.y - e2->edge.p1.y; -} - -static XFixed -XRenderComputeX (XLineFixed *line, XFixed y) -{ - XFixed dx = line->p2.x - line->p1.x; - double ex = (double) (y - line->p1.y) * (double) dx; - XFixed dy = line->p2.y - line->p1.y; - - return (XFixed) line->p1.x + (XFixed) (ex / dy); -} - -static double -XRenderComputeInverseSlope (XLineFixed *l) -{ - return (XFixedToDouble (l->p2.x - l->p1.x) / - XFixedToDouble (l->p2.y - l->p1.y)); -} - -static double -XRenderComputeXIntercept (XLineFixed *l, double inverse_slope) -{ - return XFixedToDouble (l->p1.x) - inverse_slope * XFixedToDouble (l->p1.y); -} - -static XFixed -XRenderComputeIntersect (XLineFixed *l1, XLineFixed *l2) -{ - /* - * x = m1y + b1 - * x = m2y + b2 - * m1y + b1 = m2y + b2 - * y * (m1 - m2) = b2 - b1 - * y = (b2 - b1) / (m1 - m2) - */ - double m1 = XRenderComputeInverseSlope (l1); - double b1 = XRenderComputeXIntercept (l1, m1); - double m2 = XRenderComputeInverseSlope (l2); - double b2 = XRenderComputeXIntercept (l2, m2); - - return XDoubleToFixed ((b2 - b1) / (m1 - m2)); -} - -static int -XRenderComputeTrapezoids (Edge *edges, - int nedges, - int winding, - XTrapezoid *traps) -{ - int ntraps = 0; - int inactive; - Edge *active; - Edge *e, *en, *next; - XFixed y, next_y, intersect; - - qsort (edges, nedges, sizeof (Edge), CompareEdge); - - y = edges[0].edge.p1.y; - active = 0; - inactive = 0; - while (active || inactive < nedges) - { - /* insert new active edges into list */ - while (inactive < nedges) - { - e = &edges[inactive]; - if (e->edge.p1.y > y) - break; - /* move this edge into the active list */ - inactive++; - e->next = active; - e->prev = 0; - if (active) - active->prev = e; - active = e; - } - /* compute x coordinates along this group */ - for (e = active; e; e = e->next) - e->current_x = XRenderComputeX (&e->edge, y); - - /* sort active list */ - for (e = active; e; e = next) - { - next = e->next; - /* - * Find one later in the list that belongs before the - * current one - */ - for (en = next; en; en = en->next) - { - if (en->current_x < e->current_x || - (en->current_x == e->current_x && - en->edge.p2.x < e->edge.p2.x)) - { - /* - * insert en before e - * - * extract en - */ - en->prev->next = en->next; - if (en->next) - en->next->prev = en->prev; - /* - * insert en - */ - if (e->prev) - e->prev->next = en; - else - active = en; - en->prev = e->prev; - e->prev = en; - en->next = e; - /* - * start over at en - */ - next = en; - break; - } - } - } -#if 0 - printf ("y: %6.3g:", y / 65536.0); - for (e = active; e; e = e->next) - { - printf (" %6.3g", e->current_x / 65536.0); - } - printf ("\n"); -#endif - /* find next inflection point */ - next_y = active->edge.p2.y; - for (e = active; e; e = en) - { - if (e->edge.p2.y < next_y) - next_y = e->edge.p2.y; - en = e->next; - /* check intersect */ - if (en && e->edge.p2.x > en->edge.p2.x) - { - intersect = XRenderComputeIntersect (&e->edge, &e->next->edge); - /* make sure this point is below the actual intersection */ - intersect = intersect + 1; - if (intersect < next_y) - next_y = intersect; - } - } - /* check next inactive point */ - if (inactive < nedges && edges[inactive].edge.p1.y < next_y) - next_y = edges[inactive].edge.p1.y; - - /* walk the list generating trapezoids */ - for (e = active; e && (en = e->next); e = en->next) - { - traps->top = y; - traps->bottom = next_y; - traps->left = e->edge; - traps->right = en->edge; - traps++; - ntraps++; - } - - y = next_y; - - /* delete inactive edges from list */ - for (e = active; e; e = next) - { - next = e->next; - if (e->edge.p2.y <= y) - { - if (e->prev) - e->prev->next = e->next; - else - active = e->next; - if (e->next) - e->next->prev = e->prev; - } - } - } - return ntraps; -} - -void -XRenderCompositeDoublePoly (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XPointDouble *fpoints, - int npoints, - int winding) -{ - Edge *edges; - XTrapezoid *traps; - int i, nedges, ntraps; - XFixed x, y, prevx = 0, prevy = 0, firstx = 0, firsty = 0; - XFixed top = 0, bottom = 0; /* GCCism */ - - edges = (Edge *) Xmalloc (npoints * sizeof (Edge) + - (npoints * npoints * sizeof (XTrapezoid))); - if (!edges) - return; - traps = (XTrapezoid *) (edges + npoints); - nedges = 0; - for (i = 0; i <= npoints; i++) - { - if (i == npoints) - { - x = firstx; - y = firsty; - } - else - { - x = XDoubleToFixed (fpoints[i].x); - y = XDoubleToFixed (fpoints[i].y); - } - if (i) - { - if (y < top) - top = y; - else if (y > bottom) - bottom = y; - if (prevy < y) - { - edges[nedges].edge.p1.x = prevx; - edges[nedges].edge.p1.y = prevy; - edges[nedges].edge.p2.x = x; - edges[nedges].edge.p2.y = y; - edges[nedges].clockWise = True; - nedges++; - } - else if (prevy > y) - { - edges[nedges].edge.p1.x = x; - edges[nedges].edge.p1.y = y; - edges[nedges].edge.p2.x = prevx; - edges[nedges].edge.p2.y = prevy; - edges[nedges].clockWise = False; - nedges++; - } - /* drop horizontal edges */ - } - else - { - top = y; - bottom = y; - firstx = x; - firsty = y; - } - prevx = x; - prevy = y; - } - ntraps = XRenderComputeTrapezoids (edges, nedges, winding, traps); - /* XXX adjust xSrc/xDst */ - XRenderCompositeTrapezoids (dpy, op, src, dst, maskFormat, xSrc, ySrc, traps, ntraps); - Xfree (edges); -} diff --git a/nx-X11/lib/Xrender/Trap.c b/nx-X11/lib/Xrender/Trap.c deleted file mode 100644 index 919aaef53..000000000 --- a/nx-X11/lib/Xrender/Trap.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -void -XRenderCompositeTrapezoids (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XTrapezoid *traps, - int ntrap) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderTrapezoidsReq *req; - int n; - long len; - unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - while (ntrap) - { - GetReq(RenderTrapezoids, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderTrapezoids; - req->op = (CARD8) op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : 0; - req->xSrc = xSrc; - req->ySrc = ySrc; - n = ntrap; - len = ((long) n) * (SIZEOF (xTrapezoid) >> 2); - if (len > (max_req - req->length)) { - n = (max_req - req->length) / (SIZEOF (xTrapezoid) >> 2); - len = ((long)n) * (SIZEOF (xTrapezoid) >> 2); - } - SetReqLen (req, len, len); - len <<= 2; - DataInt32 (dpy, (int *) traps, len); - ntrap -= n; - traps += n; - } - UnlockDisplay(dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xrender/Tri.c b/nx-X11/lib/Xrender/Tri.c deleted file mode 100644 index 155f2ce14..000000000 --- a/nx-X11/lib/Xrender/Tri.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * - * Copyright © 2002 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -void -XRenderCompositeTriangles (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XTriangle *triangles, - int ntriangle) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderTrianglesReq *req; - int n; - long len; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - while (ntriangle) - { - GetReq(RenderTriangles, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderTriangles; - req->op = (CARD8) op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : 0; - req->xSrc = xSrc; - req->ySrc = ySrc; - n = ntriangle; - len = ((long) n) * (SIZEOF (xTriangle) >> 2); - if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { - n = (dpy->max_request_size - req->length) / (SIZEOF (xTriangle) >> 2); - len = ((long)n) * (SIZEOF (xTriangle) >> 2); - } - SetReqLen (req, len, len); - len <<= 2; - DataInt32 (dpy, (int *) triangles, len); - ntriangle -= n; - triangles += n; - } - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeTriStrip (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XPointFixed *points, - int npoint) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderTriStripReq *req; - int n; - long len; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - while (npoint > 2) - { - GetReq(RenderTriStrip, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderTriStrip; - req->op = (CARD8) op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : 0; - req->xSrc = xSrc; - req->ySrc = ySrc; - n = npoint; - len = ((long) n) * (SIZEOF (xPointFixed) >> 2); - if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { - n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2); - len = ((long)n) * (SIZEOF (xPointFixed) >> 2); - } - SetReqLen (req, len, len); - len <<= 2; - DataInt32 (dpy, (int *) points, len); - npoint -= (n - 2); - points += (n - 2); - } - UnlockDisplay(dpy); - SyncHandle(); -} - -void -XRenderCompositeTriFan (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XPointFixed *points, - int npoint) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - _Xconst XPointFixed *first = points; - xPointFixed *p; - xRenderTriFanReq *req; - int n; - long len; - - RenderSimpleCheckExtension (dpy, info); - LockDisplay(dpy); - points++; - npoint--; - while (npoint > 1) - { - GetReqExtra(RenderTriFan, SIZEOF (xPointFixed), req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderTriFan; - req->op = (CARD8) op; - req->src = src; - req->dst = dst; - req->maskFormat = maskFormat ? maskFormat->id : 0; - req->xSrc = xSrc; - req->ySrc = ySrc; - p = (xPointFixed *) (req + 1); - p->x = first->x; - p->y = first->y; - n = npoint; - len = ((long) n) * (SIZEOF (xPointFixed) >> 2); - if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { - n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2); - len = ((long)n) * (SIZEOF (xPointFixed) >> 2); - } - SetReqLen (req, len, len); - len <<= 2; - DataInt32 (dpy, (int *) points, len); - npoint -= (n - 1); - points += (n - 1); - } - UnlockDisplay(dpy); - SyncHandle(); -} diff --git a/nx-X11/lib/Xrender/Xrender-def.cpp b/nx-X11/lib/Xrender/Xrender-def.cpp deleted file mode 100644 index c197df1ad..000000000 --- a/nx-X11/lib/Xrender/Xrender-def.cpp +++ /dev/null @@ -1,44 +0,0 @@ -LIBRARY Xrender -VERSION LIBRARY_VERSION -EXPORTS -XRenderParseColor -XRenderComposite -XRenderCreateCursor -XRenderFillRectangle -XRenderFillRectangles -XRenderQueryFilters -XRenderSetPictureFilter -XRenderAddGlyphs -XRenderCompositeString16 -XRenderCompositeString32 -XRenderCompositeString8 -XRenderCompositeText16 -XRenderCompositeText32 -XRenderCompositeText8 -XRenderCreateGlyphSet -XRenderFreeGlyphSet -XRenderFreeGlyphs -XRenderReferenceGlyphSet -XRenderChangePicture -XRenderCreatePicture -XRenderFreePicture -XRenderSetPictureClipRectangles -XRenderSetPictureClipRegion -XRenderSetPictureTransform -XRenderCompositeDoublePoly -XRenderCompositeTrapezoids -XRenderCompositeTriFan -XRenderCompositeTriStrip -XRenderCompositeTriangles -XRenderFindDisplay -XRenderFindFormat -XRenderFindStandardFormat -XRenderFindVisualFormat -XRenderQueryExtension -XRenderQueryFormats -XRenderQuerySubpixelOrder -XRenderQueryVersion -XRenderSetSubpixelOrder -#ifdef __UNIXOS2__ -XRenderCreateAnimCursor -#endif diff --git a/nx-X11/lib/Xrender/Xrender.c b/nx-X11/lib/Xrender/Xrender.c deleted file mode 100644 index 8d8aeb979..000000000 --- a/nx-X11/lib/Xrender/Xrender.c +++ /dev/null @@ -1,889 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "Xrenderint.h" - -XRenderExtInfo XRenderExtensionInfo; -char XRenderExtensionName[] = RENDER_NAME; - -static int XRenderCloseDisplay (Display *dpy, XExtCodes *codes); - -/* - * XRenderExtFindDisplay - look for a display in this extension; keeps a - * cache of the most-recently used for efficiency. (Replaces - * XextFindDisplay.) - */ -static XRenderExtDisplayInfo * -XRenderExtFindDisplay (XRenderExtInfo *extinfo, - Display *dpy) -{ - XRenderExtDisplayInfo *dpyinfo; - - /* - * see if this was the most recently accessed display - */ - if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy) - return dpyinfo; - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) { - if (dpyinfo->display == dpy) { - extinfo->cur = dpyinfo; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return dpyinfo; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - -/* - * If the server is missing support for any of the required depths on - * any screen, tell the application that Render is not present. - */ - -#define DEPTH_MASK(d) (1 << ((d) - 1)) - -/* - * Render requires support for depth 1, 4, 8, 24 and 32 pixmaps - */ - -#define REQUIRED_DEPTHS (DEPTH_MASK(1) | \ - DEPTH_MASK(4) | \ - DEPTH_MASK(8) | \ - DEPTH_MASK(24) | \ - DEPTH_MASK(32)) - -typedef struct _DepthCheckRec { - struct _DepthCheckRec *next; - Display *dpy; - CARD32 missing; - unsigned long serial; -} DepthCheckRec, *DepthCheckPtr; - -static DepthCheckPtr depthChecks; - -static int -XRenderDepthCheckErrorHandler (Display *dpy, XErrorEvent *evt) -{ - if (evt->request_code == X_CreatePixmap && evt->error_code == BadValue) - { - DepthCheckPtr d; - _XLockMutex(_Xglobal_lock); - for (d = depthChecks; d; d = d->next) - if (d->dpy == dpy) - { - if ((long) (evt->serial - d->serial) >= 0) - d->missing |= DEPTH_MASK(evt->resourceid); - break; - } - _XUnlockMutex (_Xglobal_lock); - } - return 0; -} - -static Bool -XRenderHasDepths (Display *dpy) -{ - int s; - - for (s = 0; s < ScreenCount (dpy); s++) - { - CARD32 depths = 0; - CARD32 missing; - Screen *scr = ScreenOfDisplay (dpy, s); - int d; - - for (d = 0; d < scr->ndepths; d++) - depths |= DEPTH_MASK(scr->depths[d].depth); - missing = ~depths & REQUIRED_DEPTHS; - if (missing) - { - DepthCheckRec dc, **dp; - XErrorHandler previousHandler; - - /* - * Ok, this is ugly. It should be sufficient at this - * point to just return False, but Xinerama is broken at - * this point and only advertises depths which have an - * associated visual. Of course, the other depths still - * work, but the only way to find out is to try them. - */ - dc.dpy = dpy; - dc.missing = 0; - dc.serial = XNextRequest (dpy); - _XLockMutex(_Xglobal_lock); - dc.next = depthChecks; - depthChecks = &dc; - _XUnlockMutex (_Xglobal_lock); - /* - * I suspect this is not really thread safe, but Xlib doesn't - * provide a lot of options here - */ - previousHandler = XSetErrorHandler (XRenderDepthCheckErrorHandler); - /* - * Try each missing depth and see if pixmap creation succeeds - */ - for (d = 1; d <= 32; d++) - /* don't check depth 1 == Xcursor recurses... */ - if ((missing & DEPTH_MASK(d)) && d != 1) - { - Pixmap p; - p = XCreatePixmap (dpy, RootWindow (dpy, s), 1, 1, d); - XFreePixmap (dpy, p); - } - XSync (dpy, False); - XSetErrorHandler (previousHandler); - /* - * Unhook from the list of depth check records - */ - _XLockMutex(_Xglobal_lock); - for (dp = &depthChecks; *dp; dp = &(*dp)->next) - { - if (*dp == &dc) - { - *dp = dc.next; - break; - } - } - _XUnlockMutex (_Xglobal_lock); - if (dc.missing) - return False; - } - } - return True; -} - -/* - * XRenderExtAddDisplay - add a display to this extension. (Replaces - * XextAddDisplay) - */ -static XRenderExtDisplayInfo * -XRenderExtAddDisplay (XRenderExtInfo *extinfo, - Display *dpy, - char *ext_name) -{ - XRenderExtDisplayInfo *dpyinfo; - - dpyinfo = (XRenderExtDisplayInfo *) Xmalloc (sizeof (XRenderExtDisplayInfo)); - if (!dpyinfo) return NULL; - dpyinfo->display = dpy; - dpyinfo->info = NULL; - - if (XRenderHasDepths (dpy)) - dpyinfo->codes = XInitExtension (dpy, ext_name); - else - dpyinfo->codes = NULL; - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (dpyinfo->codes) { - XESetCloseDisplay (dpy, dpyinfo->codes->extension, - XRenderCloseDisplay); - } else { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(dpyinfo); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, XRenderCloseDisplay); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - dpyinfo->next = extinfo->head; - extinfo->head = dpyinfo; - extinfo->cur = dpyinfo; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return dpyinfo; -} - - -/* - * XRenderExtRemoveDisplay - remove the indicated display from the - * extension object. (Replaces XextRemoveDisplay.) - */ -static int -XRenderExtRemoveDisplay (XRenderExtInfo *extinfo, Display *dpy) -{ - XRenderExtDisplayInfo *dpyinfo, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) { - if (dpyinfo->display == dpy) break; - prev = dpyinfo; - } - if (!dpyinfo) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = dpyinfo->next; - else - extinfo->head = dpyinfo->next; - - extinfo->ndisplays--; - if (dpyinfo == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) dpyinfo); - return 1; -} - - - -XRenderExtDisplayInfo * -XRenderFindDisplay (Display *dpy) -{ - XRenderExtDisplayInfo *dpyinfo; - - dpyinfo = XRenderExtFindDisplay (&XRenderExtensionInfo, dpy); - if (!dpyinfo) - dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy, - XRenderExtensionName); - return dpyinfo; -} - -static int -XRenderCloseDisplay (Display *dpy, XExtCodes *codes) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - if (info->info) XFree (info->info); - - return XRenderExtRemoveDisplay (&XRenderExtensionInfo, dpy); -} - -/**************************************************************************** - * * - * Render public interfaces * - * * - ****************************************************************************/ - -Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - - if (RenderHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status XRenderQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - XRenderInfo *xri; - - if (!RenderHasExtension (info)) - return 0; - - if (!XRenderQueryFormats (dpy)) - return 0; - - xri = info->info; - *major_versionp = xri->major_version; - *minor_versionp = xri->minor_version; - return 1; -} - -static XRenderPictFormat * -_XRenderFindFormat (XRenderInfo *xri, PictFormat format) -{ - int nf; - - for (nf = 0; nf < xri->nformat; nf++) - if (xri->format[nf].id == format) - return &xri->format[nf]; - return 0; -} - -static Visual * -_XRenderFindVisual (Display *dpy, VisualID vid) -{ - return _XVIDtoVisual (dpy, vid); -} - -typedef struct _renderVersionState { - unsigned long version_seq; - Bool error; - int major_version; - int minor_version; - -} _XrenderVersionState; - -static Bool -_XRenderVersionHandler (Display *dpy, - xReply *rep, - char *buf, - int len, - XPointer data) -{ - xRenderQueryVersionReply replbuf; - xRenderQueryVersionReply *repl; - _XrenderVersionState *state = (_XrenderVersionState *) data; - - if (dpy->last_request_read != state->version_seq) - return False; - if (rep->generic.type == X_Error) - { - state->error = True; - return False; - } - repl = (xRenderQueryVersionReply *) - _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len, - (SIZEOF(xRenderQueryVersionReply) - SIZEOF(xReply)) >> 2, - True); - state->major_version = repl->majorVersion; - state->minor_version = repl->minorVersion; - return True; -} - -Status -XRenderQueryFormats (Display *dpy) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - _XAsyncHandler async; - _XrenderVersionState async_state; - xRenderQueryVersionReq *vreq; - xRenderQueryPictFormatsReply rep; - xRenderQueryPictFormatsReq *req; - XRenderInfo *xri; - XRenderPictFormat *format; - XRenderScreen *screen; - XRenderDepth *depth; - XRenderVisual *visual; - xPictFormInfo *xFormat; - xPictScreen *xScreen; - xPictDepth *xDepth; - xPictVisual *xVisual; - CARD32 *xSubpixel; - void *xData; - int nf, ns, nd, nv; - int rlength; - int nbytes; - - RenderCheckExtension (dpy, info, 0); - LockDisplay (dpy); - if (info->info) - { - UnlockDisplay (dpy); - return 1; - } - GetReq (RenderQueryVersion, vreq); - vreq->reqType = info->codes->major_opcode; - vreq->renderReqType = X_RenderQueryVersion; - vreq->majorVersion = RENDER_MAJOR; - vreq->minorVersion = RENDER_MINOR; - - async_state.version_seq = dpy->request; - async_state.error = False; - async.next = dpy->async_handlers; - async.handler = _XRenderVersionHandler; - async.data = (XPointer) &async_state; - dpy->async_handlers = &async; - - GetReq (RenderQueryPictFormats, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderQueryPictFormats; - - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - DeqAsyncHandler (dpy, &async); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - DeqAsyncHandler (dpy, &async); - if (async_state.error) - { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - /* - * Check for the lack of sub-pixel data - */ - if (async_state.major_version == 0 && async_state.minor_version < 6) - rep.numSubpixel = 0; - - xri = (XRenderInfo *) Xmalloc (sizeof (XRenderInfo) + - rep.numFormats * sizeof (XRenderPictFormat) + - rep.numScreens * sizeof (XRenderScreen) + - rep.numDepths * sizeof (XRenderDepth) + - rep.numVisuals * sizeof (XRenderVisual)); - xri->major_version = async_state.major_version; - xri->minor_version = async_state.minor_version; - xri->format = (XRenderPictFormat *) (xri + 1); - xri->nformat = rep.numFormats; - xri->screen = (XRenderScreen *) (xri->format + rep.numFormats); - xri->nscreen = rep.numScreens; - xri->depth = (XRenderDepth *) (xri->screen + rep.numScreens); - xri->ndepth = rep.numDepths; - xri->visual = (XRenderVisual *) (xri->depth + rep.numDepths); - xri->nvisual = rep.numVisuals; - rlength = (rep.numFormats * sizeof (xPictFormInfo) + - rep.numScreens * sizeof (xPictScreen) + - rep.numDepths * sizeof (xPictDepth) + - rep.numVisuals * sizeof (xPictVisual) + - rep.numSubpixel * 4); - xData = (void *) Xmalloc (rlength); - nbytes = (int) rep.length << 2; - - if (!xri || !xData || nbytes < rlength) - { - if (xri) Xfree (xri); - if (xData) Xfree (xData); - _XEatData (dpy, nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - _XRead (dpy, (char *) xData, rlength); - format = xri->format; - xFormat = (xPictFormInfo *) xData; - for (nf = 0; nf < rep.numFormats; nf++) - { - format->id = xFormat->id; - format->type = xFormat->type; - format->depth = xFormat->depth; - format->direct.red = xFormat->direct.red; - format->direct.redMask = xFormat->direct.redMask; - format->direct.green = xFormat->direct.green; - format->direct.greenMask = xFormat->direct.greenMask; - format->direct.blue = xFormat->direct.blue; - format->direct.blueMask = xFormat->direct.blueMask; - format->direct.alpha = xFormat->direct.alpha; - format->direct.alphaMask = xFormat->direct.alphaMask; - format->colormap = xFormat->colormap; - format++; - xFormat++; - } - xScreen = (xPictScreen *) xFormat; - screen = xri->screen; - depth = xri->depth; - visual = xri->visual; - for (ns = 0; ns < xri->nscreen; ns++) - { - screen->depths = depth; - screen->ndepths = xScreen->nDepth; - screen->fallback = _XRenderFindFormat (xri, xScreen->fallback); - screen->subpixel = SubPixelUnknown; - xDepth = (xPictDepth *) (xScreen + 1); - for (nd = 0; nd < screen->ndepths; nd++) - { - depth->depth = xDepth->depth; - depth->nvisuals = xDepth->nPictVisuals; - depth->visuals = visual; - xVisual = (xPictVisual *) (xDepth + 1); - for (nv = 0; nv < depth->nvisuals; nv++) - { - visual->visual = _XRenderFindVisual (dpy, xVisual->visual); - visual->format = _XRenderFindFormat (xri, xVisual->format); - visual++; - xVisual++; - } - depth++; - xDepth = (xPictDepth *) xVisual; - } - screen++; - xScreen = (xPictScreen *) xDepth; - } - xSubpixel = (CARD32 *) xScreen; - screen = xri->screen; - for (ns = 0; ns < rep.numSubpixel; ns++) - { - screen->subpixel = *xSubpixel; - xSubpixel++; - screen++; - } - info->info = xri; - /* - * Skip any extra data - */ - if (nbytes > rlength) - _XEatData (dpy, (unsigned long) (nbytes - rlength)); - - UnlockDisplay (dpy); - SyncHandle (); - Xfree (xData); - return 1; -} - -int -XRenderQuerySubpixelOrder (Display *dpy, int screen) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - XRenderInfo *xri; - - if (!RenderHasExtension (info)) - return SubPixelUnknown; - - if (!XRenderQueryFormats (dpy)) - return SubPixelUnknown; - - xri = info->info; - return xri->screen[screen].subpixel; -} - -Bool -XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - XRenderInfo *xri; - - if (!RenderHasExtension (info)) - return False; - - if (!XRenderQueryFormats (dpy)) - return False; - - xri = info->info; - xri->screen[screen].subpixel = subpixel; - return True; -} - -XRenderPictFormat * -XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - int nv; - XRenderInfo *xri; - XRenderVisual *xrv; - - RenderCheckExtension (dpy, info, 0); - if (!XRenderQueryFormats (dpy)) - return 0; - xri = info->info; - for (nv = 0, xrv = xri->visual; nv < xri->nvisual; nv++, xrv++) - if (xrv->visual == visual) - return xrv->format; - return 0; -} - -XRenderPictFormat * -XRenderFindFormat (Display *dpy, - unsigned long mask, - _Xconst XRenderPictFormat *template, - int count) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - int nf; - XRenderInfo *xri; - - RenderCheckExtension (dpy, info, 0); - if (!XRenderQueryFormats (dpy)) - return 0; - xri = info->info; - for (nf = 0; nf < xri->nformat; nf++) - { - if (mask & PictFormatID) - if (template->id != xri->format[nf].id) - continue; - if (mask & PictFormatType) - if (template->type != xri->format[nf].type) - continue; - if (mask & PictFormatDepth) - if (template->depth != xri->format[nf].depth) - continue; - if (mask & PictFormatRed) - if (template->direct.red != xri->format[nf].direct.red) - continue; - if (mask & PictFormatRedMask) - if (template->direct.redMask != xri->format[nf].direct.redMask) - continue; - if (mask & PictFormatGreen) - if (template->direct.green != xri->format[nf].direct.green) - continue; - if (mask & PictFormatGreenMask) - if (template->direct.greenMask != xri->format[nf].direct.greenMask) - continue; - if (mask & PictFormatBlue) - if (template->direct.blue != xri->format[nf].direct.blue) - continue; - if (mask & PictFormatBlueMask) - if (template->direct.blueMask != xri->format[nf].direct.blueMask) - continue; - if (mask & PictFormatAlpha) - if (template->direct.alpha != xri->format[nf].direct.alpha) - continue; - if (mask & PictFormatAlphaMask) - if (template->direct.alphaMask != xri->format[nf].direct.alphaMask) - continue; - if (mask & PictFormatColormap) - if (template->colormap != xri->format[nf].colormap) - continue; - if (count-- == 0) - return &xri->format[nf]; - } - return 0; -} - -XRenderPictFormat * -XRenderFindStandardFormat (Display *dpy, - int format) -{ - static struct { - XRenderPictFormat templ; - unsigned long mask; - } standardFormats[PictStandardNUM] = { - /* PictStandardARGB32 */ - { - { - 0, /* id */ - PictTypeDirect, /* type */ - 32, /* depth */ - { /* direct */ - 16, /* direct.red */ - 0xff, /* direct.redMask */ - 8, /* direct.green */ - 0xff, /* direct.greenMask */ - 0, /* direct.blue */ - 0xff, /* direct.blueMask */ - 24, /* direct.alpha */ - 0xff, /* direct.alphaMask */ - }, - 0, /* colormap */ - }, - PictFormatType | - PictFormatDepth | - PictFormatRed | - PictFormatRedMask | - PictFormatGreen | - PictFormatGreenMask | - PictFormatBlue | - PictFormatBlueMask | - PictFormatAlpha | - PictFormatAlphaMask, - }, - /* PictStandardRGB24 */ - { - { - 0, /* id */ - PictTypeDirect, /* type */ - 24, /* depth */ - { /* direct */ - 16, /* direct.red */ - 0xff, /* direct.redMask */ - 8, /* direct.green */ - 0xff, /* direct.greenMask */ - 0, /* direct.blue */ - 0xff, /* direct.blueMask */ - 0, /* direct.alpha */ - 0x00, /* direct.alphaMask */ - }, - 0, /* colormap */ - }, - PictFormatType | - PictFormatDepth | - PictFormatRed | - PictFormatRedMask | - PictFormatGreen | - PictFormatGreenMask | - PictFormatBlue | - PictFormatBlueMask | - PictFormatAlphaMask, - }, - /* PictStandardA8 */ - { - { - 0, /* id */ - PictTypeDirect, /* type */ - 8, /* depth */ - { /* direct */ - 0, /* direct.red */ - 0x00, /* direct.redMask */ - 0, /* direct.green */ - 0x00, /* direct.greenMask */ - 0, /* direct.blue */ - 0x00, /* direct.blueMask */ - 0, /* direct.alpha */ - 0xff, /* direct.alphaMask */ - }, - 0, /* colormap */ - }, - PictFormatType | - PictFormatDepth | - PictFormatRedMask | - PictFormatGreenMask | - PictFormatBlueMask | - PictFormatAlpha | - PictFormatAlphaMask, - }, - /* PictStandardA4 */ - { - { - 0, /* id */ - PictTypeDirect, /* type */ - 4, /* depth */ - { /* direct */ - 0, /* direct.red */ - 0x00, /* direct.redMask */ - 0, /* direct.green */ - 0x00, /* direct.greenMask */ - 0, /* direct.blue */ - 0x00, /* direct.blueMask */ - 0, /* direct.alpha */ - 0x0f, /* direct.alphaMask */ - }, - 0, /* colormap */ - }, - PictFormatType | - PictFormatDepth | - PictFormatRedMask | - PictFormatGreenMask | - PictFormatBlueMask | - PictFormatAlpha | - PictFormatAlphaMask, - }, - /* PictStandardA1 */ - { - { - 0, /* id */ - PictTypeDirect, /* type */ - 1, /* depth */ - { /* direct */ - 0, /* direct.red */ - 0x00, /* direct.redMask */ - 0, /* direct.green */ - 0x00, /* direct.greenMask */ - 0, /* direct.blue */ - 0x00, /* direct.blueMask */ - 0, /* direct.alpha */ - 0x01, /* direct.alphaMask */ - }, - 0, /* colormap */ - }, - PictFormatType | - PictFormatDepth | - PictFormatRedMask | - PictFormatGreenMask | - PictFormatBlueMask | - PictFormatAlpha | - PictFormatAlphaMask, - }, - }; - - if (0 <= format && format < PictStandardNUM) - return XRenderFindFormat (dpy, - standardFormats[format].mask, - &standardFormats[format].templ, - 0); - return 0; -} - -XIndexValue * -XRenderQueryPictIndexValues(Display *dpy, - _Xconst XRenderPictFormat *format, - int *num) -{ - XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderQueryPictIndexValuesReq *req; - xRenderQueryPictIndexValuesReply rep; - XIndexValue *values; - int nbytes, nread, rlength, i; - - RenderCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (RenderQueryPictIndexValues, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderQueryPictIndexValues; - req->format = format->id; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - - /* request data length */ - nbytes = (long)rep.length << 2; - /* bytes of actual data in the request */ - nread = rep.numIndexValues * SIZEOF (xIndexValue); - /* size of array returned to application */ - rlength = rep.numIndexValues * sizeof (XIndexValue); - - /* allocate returned data */ - values = (XIndexValue *)Xmalloc (rlength); - if (!values) - { - _XEatData (dpy, nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - - /* read the values one at a time and convert */ - *num = rep.numIndexValues; - for(i = 0; i < rep.numIndexValues; i++) - { - xIndexValue value; - - _XRead (dpy, (char *) &value, SIZEOF (xIndexValue)); - values[i].pixel = value.pixel; - values[i].red = value.red; - values[i].green = value.green; - values[i].blue = value.blue; - values[i].alpha = value.alpha; - } - /* skip any padding */ - if(nbytes > nread) - { - _XEatData (dpy, (unsigned long) (nbytes - nread)); - } - UnlockDisplay (dpy); - SyncHandle (); - return values; -} diff --git a/nx-X11/lib/Xrender/Xrender.h b/nx-X11/lib/Xrender/Xrender.h deleted file mode 100644 index a38f4cc3d..000000000 --- a/nx-X11/lib/Xrender/Xrender.h +++ /dev/null @@ -1,544 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _XRENDER_H_ -#define _XRENDER_H_ - -#define NX_CLEANUP - -#include - -#include -#include -#include -#include - -#ifdef NX_CLEANUP -#include "renderproto.h" -#endif - -typedef struct { - short red; - short redMask; - short green; - short greenMask; - short blue; - short blueMask; - short alpha; - short alphaMask; -} XRenderDirectFormat; - -typedef struct { - PictFormat id; - int type; - int depth; - XRenderDirectFormat direct; - Colormap colormap; -} XRenderPictFormat; - -#define PictFormatID (1 << 0) -#define PictFormatType (1 << 1) -#define PictFormatDepth (1 << 2) -#define PictFormatRed (1 << 3) -#define PictFormatRedMask (1 << 4) -#define PictFormatGreen (1 << 5) -#define PictFormatGreenMask (1 << 6) -#define PictFormatBlue (1 << 7) -#define PictFormatBlueMask (1 << 8) -#define PictFormatAlpha (1 << 9) -#define PictFormatAlphaMask (1 << 10) -#define PictFormatColormap (1 << 11) - -typedef struct _XRenderPictureAttributes { - int repeat; - Picture alpha_map; - int alpha_x_origin; - int alpha_y_origin; - int clip_x_origin; - int clip_y_origin; - Pixmap clip_mask; - Bool graphics_exposures; - int subwindow_mode; - int poly_edge; - int poly_mode; - Atom dither; - Bool component_alpha; -} XRenderPictureAttributes; - -typedef struct { - unsigned short red; - unsigned short green; - unsigned short blue; - unsigned short alpha; -} XRenderColor; - -typedef struct _XGlyphInfo { - unsigned short width; - unsigned short height; - short x; - short y; - short xOff; - short yOff; -} XGlyphInfo; - -typedef struct _XGlyphElt8 { - GlyphSet glyphset; - _Xconst char *chars; - int nchars; - int xOff; - int yOff; -} XGlyphElt8; - -typedef struct _XGlyphElt16 { - GlyphSet glyphset; - _Xconst unsigned short *chars; - int nchars; - int xOff; - int yOff; -} XGlyphElt16; - -typedef struct _XGlyphElt32 { - GlyphSet glyphset; - _Xconst unsigned int *chars; - int nchars; - int xOff; - int yOff; -} XGlyphElt32; - -typedef double XDouble; - -typedef struct _XPointDouble { - XDouble x, y; -} XPointDouble; - -#define XDoubleToFixed(f) ((XFixed) ((f) * 65536)) -#define XFixedToDouble(f) (((XDouble) (f)) / 65536) - -typedef int XFixed; - -typedef struct _XPointFixed { - XFixed x, y; -} XPointFixed; - -typedef struct _XLineFixed { - XPointFixed p1, p2; -} XLineFixed; - -typedef struct _XTriangle { - XPointFixed p1, p2, p3; -} XTriangle; - -typedef struct _XCircle { - XFixed x; - XFixed y; - XFixed radius; -} XCircle; - -typedef struct _XTrapezoid { - XFixed top, bottom; - XLineFixed left, right; -} XTrapezoid; - -typedef struct _XTransform { - XFixed matrix[3][3]; -} XTransform; - -typedef struct _XFilters { - int nfilter; - char **filter; - int nalias; - short *alias; -} XFilters; - -typedef struct _XIndexValue { - unsigned long pixel; - unsigned short red, green, blue, alpha; -} XIndexValue; - -typedef struct _XAnimCursor { - Cursor cursor; - unsigned long delay; -} XAnimCursor; - -typedef struct _XSpanFix { - XFixed left, right, y; -} XSpanFix; - -typedef struct _XTrap { - XSpanFix top, bottom; -} XTrap; - -typedef struct _XLinearGradient { - XPointFixed p1; - XPointFixed p2; -} XLinearGradient; - -typedef struct _XRadialGradient { - XCircle inner; - XCircle outer; -} XRadialGradient; - -typedef struct _XConicalGradient { - XPointFixed center; - XFixed angle; /* in degrees */ -} XConicalGradient; - -_XFUNCPROTOBEGIN - -Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); - -Status XRenderQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -Status XRenderQueryFormats (Display *dpy); - -int XRenderQuerySubpixelOrder (Display *dpy, int screen); - -Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel); - -XRenderPictFormat * -XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual); - -XRenderPictFormat * -XRenderFindFormat (Display *dpy, - unsigned long mask, - _Xconst XRenderPictFormat *templ, - int count); - -#define PictStandardARGB32 0 -#define PictStandardRGB24 1 -#define PictStandardA8 2 -#define PictStandardA4 3 -#define PictStandardA1 4 -#define PictStandardNUM 5 - -XRenderPictFormat * -XRenderFindStandardFormat (Display *dpy, - int format); - -XIndexValue * -XRenderQueryPictIndexValues(Display *dpy, - _Xconst XRenderPictFormat *format, - int *num); - -Picture -XRenderCreatePicture (Display *dpy, - Drawable drawable, - _Xconst XRenderPictFormat *format, - unsigned long valuemask, - _Xconst XRenderPictureAttributes *attributes); - -void -XRenderChangePicture (Display *dpy, - Picture picture, - unsigned long valuemask, - _Xconst XRenderPictureAttributes *attributes); - -void -XRenderSetPictureClipRectangles (Display *dpy, - Picture picture, - int xOrigin, - int yOrigin, - _Xconst XRectangle *rects, - int n); - -void -XRenderSetPictureClipRegion (Display *dpy, - Picture picture, - Region r); - -void -XRenderSetPictureTransform (Display *dpy, - Picture picture, - XTransform *transform); - -void -XRenderFreePicture (Display *dpy, - Picture picture); - -void -XRenderComposite (Display *dpy, - int op, - Picture src, - Picture mask, - Picture dst, - int src_x, - int src_y, - int mask_x, - int mask_y, - int dst_x, - int dst_y, - unsigned int width, - unsigned int height); - -GlyphSet -XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format); - -GlyphSet -XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing); - -void -XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset); - -#ifdef NX_CLEANUP - -void XRenderCleanGlyphs (xGlyphInfo *gi, - int nglyphs, - CARD8 *images, - int depth, - Display *dpy); - -#endif /* #ifdef NX_CLEANUP */ - -void -XRenderAddGlyphs (Display *dpy, - GlyphSet glyphset, - _Xconst Glyph *gids, - _Xconst XGlyphInfo *glyphs, - int nglyphs, - _Xconst char *images, - int nbyte_images); - -void -XRenderFreeGlyphs (Display *dpy, - GlyphSet glyphset, - _Xconst Glyph *gids, - int nglyphs); - -void -XRenderCompositeString8 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst char *string, - int nchar); - -void -XRenderCompositeString16 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst unsigned short *string, - int nchar); - -void -XRenderCompositeString32 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst unsigned int *string, - int nchar); - -void -XRenderCompositeText8 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt8 *elts, - int nelt); - -void -XRenderCompositeText16 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt16 *elts, - int nelt); - -void -XRenderCompositeText32 (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XGlyphElt32 *elts, - int nelt); - -void -XRenderFillRectangle (Display *dpy, - int op, - Picture dst, - _Xconst XRenderColor *color, - int x, - int y, - unsigned int width, - unsigned int height); - -void -XRenderFillRectangles (Display *dpy, - int op, - Picture dst, - _Xconst XRenderColor *color, - _Xconst XRectangle *rectangles, - int n_rects); - -void -XRenderCompositeTrapezoids (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XTrapezoid *traps, - int ntrap); - -void -XRenderCompositeTriangles (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XTriangle *triangles, - int ntriangle); - -void -XRenderCompositeTriStrip (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XPointFixed *points, - int npoint); - -void -XRenderCompositeTriFan (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - _Xconst XPointFixed *points, - int npoint); - -void -XRenderCompositeDoublePoly (Display *dpy, - int op, - Picture src, - Picture dst, - _Xconst XRenderPictFormat *maskFormat, - int xSrc, - int ySrc, - int xDst, - int yDst, - _Xconst XPointDouble *fpoints, - int npoints, - int winding); -Status -XRenderParseColor(Display *dpy, - char *spec, - XRenderColor *def); - -Cursor -XRenderCreateCursor (Display *dpy, - Picture source, - unsigned int x, - unsigned int y); - -XFilters * -XRenderQueryFilters (Display *dpy, Drawable drawable); - -void -XRenderSetPictureFilter (Display *dpy, - Picture picture, - char *filter, - XFixed *params, - int nparams); - -Cursor -XRenderCreateAnimCursor (Display *dpy, - int ncursor, - XAnimCursor *cursors); - - -void -XRenderAddTraps (Display *dpy, - Picture picture, - int xOff, - int yOff, - _Xconst XTrap *traps, - int ntrap); - -Picture XRenderCreateSolidFill (Display *dpy, - const XRenderColor *color); - -Picture XRenderCreateLinearGradient (Display *dpy, - const XLinearGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nstops); - -Picture XRenderCreateRadialGradient (Display *dpy, - const XRadialGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nstops); - -Picture XRenderCreateConicalGradient (Display *dpy, - const XConicalGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nstops); - -_XFUNCPROTOEND - -#endif /* _XRENDER_H_ */ diff --git a/nx-X11/lib/Xrender/Xrenderint.h b/nx-X11/lib/Xrender/Xrenderint.h deleted file mode 100644 index 9744b0da4..000000000 --- a/nx-X11/lib/Xrender/Xrenderint.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright © 2000 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * 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. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _XRENDERINT_H_ -#define _XRENDERINT_H_ - -#include "config.h" -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include "Xrender.h" - -typedef struct { - Visual *visual; - XRenderPictFormat *format; -} XRenderVisual; - -typedef struct { - int depth; - int nvisuals; - XRenderVisual *visuals; -} XRenderDepth; - -typedef struct { - XRenderDepth *depths; - int ndepths; - XRenderPictFormat *fallback; - int subpixel; -} XRenderScreen; - -typedef struct _XRenderInfo { - int major_version; - int minor_version; - XRenderPictFormat *format; - int nformat; - XRenderScreen *screen; - int nscreen; - XRenderDepth *depth; - int ndepth; - XRenderVisual *visual; - int nvisual; - int *subpixel; - int nsubpixel; - char **filter; - int nfilter; - short *filter_alias; - int nfilter_alias; -} XRenderInfo; - -/* replaces XRenderExtDisplayInfo */ -typedef struct _XRenderExtDisplayInfo { - struct _XRenderExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - XRenderInfo *info; /* extra data for the extension to use */ -} XRenderExtDisplayInfo; - -/* replaces XExtensionInfo */ -typedef struct _XRenderExtInfo { - XRenderExtDisplayInfo *head; /* start of the list */ - XRenderExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XRenderExtInfo; - -extern XRenderExtInfo XRenderExtensionInfo; -extern char XRenderExtensionName[]; - -XRenderExtDisplayInfo * -XRenderFindDisplay (Display *dpy); - -#define RenderHasExtension(i) ((i) && ((i)->codes)) - -#define RenderCheckExtension(dpy,i,val) \ - if (!RenderHasExtension(i)) { return val; } - -#define RenderSimpleCheckExtension(dpy,i) \ - if (!RenderHasExtension(i)) { return; } - -/* - * Xlib uses long for 32-bit values. Xrender uses int. This - * matters on alpha. Note that this macro assumes that int is 32 bits. - */ - -#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len) - -#endif /* _XRENDERINT_H_ */ diff --git a/nx-X11/lib/Xrender/config.h b/nx-X11/lib/Xrender/config.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index d034c2672..c7e1af550 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -402,17 +402,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lXfixes -lXfont \ + -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes -lXfont \ -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ - -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \ + -lXcomp -lXcompext -lXrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ `pkg-config --libs libxml-2.0` #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ - -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ + -lXcomp -lXcompext -lXcompshad -lXrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrenderint.h b/nx-X11/programs/Xserver/hw/nxagent/NXrenderint.h new file mode 100644 index 000000000..f67922c6b --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrenderint.h @@ -0,0 +1,111 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _XRENDERINT_H_ +#define _XRENDERINT_H_ + +#include +#include +#include +#include "X11/include/Xrender_nxagent.h" + +typedef struct { + Visual *visual; + XRenderPictFormat *format; +} XRenderVisual; + +typedef struct { + int depth; + int nvisuals; + XRenderVisual *visuals; +} XRenderDepth; + +typedef struct { + XRenderDepth *depths; + int ndepths; + XRenderPictFormat *fallback; + int subpixel; +} XRenderScreen; + +typedef struct _XRenderInfo { + int major_version; + int minor_version; + XRenderPictFormat *format; + int nformat; + XRenderScreen *screen; + int nscreen; + XRenderDepth *depth; + int ndepth; + XRenderVisual *visual; + int nvisual; + int *subpixel; + int nsubpixel; + char **filter; + int nfilter; + short *filter_alias; + int nfilter_alias; +} XRenderInfo; + +/* replaces XRenderExtDisplayInfo */ +typedef struct _XRenderExtDisplayInfo { + struct _XRenderExtDisplayInfo *next; /* keep a linked list */ + Display *display; /* which display this is */ + XExtCodes *codes; /* the extension protocol codes */ + XRenderInfo *info; /* extra data for the extension to use */ +} XRenderExtDisplayInfo; + +/* replaces XExtensionInfo */ +typedef struct _XRenderExtInfo { + XRenderExtDisplayInfo *head; /* start of the list */ + XRenderExtDisplayInfo *cur; /* most recently used */ + int ndisplays; /* number of displays */ +} XRenderExtInfo; + +extern XRenderExtInfo XRenderExtensionInfo; +extern char XRenderExtensionName[]; + +XRenderExtDisplayInfo * +XRenderFindDisplay (Display *dpy); + +#define RenderHasExtension(i) ((i) && ((i)->codes)) + +#define RenderCheckExtension(dpy,i,val) \ + if (!RenderHasExtension(i)) { return val; } + +#define RenderSimpleCheckExtension(dpy,i) \ + if (!RenderHasExtension(i)) { return; } + +/* + * Xlib uses long for 32-bit values. Xrender uses int. This + * matters on alpha. Note that this macro assumes that int is 32 bits + * except on WORD64 machines where it is 64 bits. + */ + +#ifdef WORD64 +#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len) +#else +#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len) +#endif + +#endif /* _XRENDERINT_H_ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index c9f589c3b..8bf1ac0bf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -39,7 +39,7 @@ #define Atom XlibAtom #define Pixmap XlibPixmap -#include "../../../../lib/Xrender/Xrenderint.h" +#include "NXrenderint.h" #undef Atom #undef Pixmap @@ -2273,8 +2273,6 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, normalizedImages = images; } - XRenderCleanGlyphs(gi, nglyphs, normalizedImages, glyphDepths[glyphSet -> fdepth], nxagentDisplay); - XRenderAddGlyphs(nxagentDisplay, glyphSet -> remoteID, gids, diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrender_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrender_nxagent.h new file mode 100644 index 000000000..488132172 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrender_nxagent.h @@ -0,0 +1,528 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _XRENDER_H_ +#define _XRENDER_H_ + +#include +#include +#include +#include + +#include + +typedef struct { + short red; + short redMask; + short green; + short greenMask; + short blue; + short blueMask; + short alpha; + short alphaMask; +} XRenderDirectFormat; + +typedef struct { + PictFormat id; + int type; + int depth; + XRenderDirectFormat direct; + Colormap colormap; +} XRenderPictFormat; + +#define PictFormatID (1 << 0) +#define PictFormatType (1 << 1) +#define PictFormatDepth (1 << 2) +#define PictFormatRed (1 << 3) +#define PictFormatRedMask (1 << 4) +#define PictFormatGreen (1 << 5) +#define PictFormatGreenMask (1 << 6) +#define PictFormatBlue (1 << 7) +#define PictFormatBlueMask (1 << 8) +#define PictFormatAlpha (1 << 9) +#define PictFormatAlphaMask (1 << 10) +#define PictFormatColormap (1 << 11) + +typedef struct _XRenderPictureAttributes { + int repeat; + Picture alpha_map; + int alpha_x_origin; + int alpha_y_origin; + int clip_x_origin; + int clip_y_origin; + Pixmap clip_mask; + Bool graphics_exposures; + int subwindow_mode; + int poly_edge; + int poly_mode; + Atom dither; + Bool component_alpha; +} XRenderPictureAttributes; + +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short alpha; +} XRenderColor; + +typedef struct _XGlyphInfo { + unsigned short width; + unsigned short height; + short x; + short y; + short xOff; + short yOff; +} XGlyphInfo; + +typedef struct _XGlyphElt8 { + GlyphSet glyphset; + _Xconst char *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt8; + +typedef struct _XGlyphElt16 { + GlyphSet glyphset; + _Xconst unsigned short *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt16; + +typedef struct _XGlyphElt32 { + GlyphSet glyphset; + _Xconst unsigned int *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt32; + +typedef double XDouble; + +typedef struct _XPointDouble { + XDouble x, y; +} XPointDouble; + +#define XDoubleToFixed(f) ((XFixed) ((f) * 65536)) +#define XFixedToDouble(f) (((XDouble) (f)) / 65536) + +typedef int XFixed; + +typedef struct _XPointFixed { + XFixed x, y; +} XPointFixed; + +typedef struct _XLineFixed { + XPointFixed p1, p2; +} XLineFixed; + +typedef struct _XTriangle { + XPointFixed p1, p2, p3; +} XTriangle; + +typedef struct _XCircle { + XFixed x; + XFixed y; + XFixed radius; +} XCircle; + +typedef struct _XTrapezoid { + XFixed top, bottom; + XLineFixed left, right; +} XTrapezoid; + +typedef struct _XTransform { + XFixed matrix[3][3]; +} XTransform; + +typedef struct _XFilters { + int nfilter; + char **filter; + int nalias; + short *alias; +} XFilters; + +typedef struct _XIndexValue { + unsigned long pixel; + unsigned short red, green, blue, alpha; +} XIndexValue; + +typedef struct _XAnimCursor { + Cursor cursor; + unsigned long delay; +} XAnimCursor; + +typedef struct _XSpanFix { + XFixed left, right, y; +} XSpanFix; + +typedef struct _XTrap { + XSpanFix top, bottom; +} XTrap; + +typedef struct _XLinearGradient { + XPointFixed p1; + XPointFixed p2; +} XLinearGradient; + +typedef struct _XRadialGradient { + XCircle inner; + XCircle outer; +} XRadialGradient; + +typedef struct _XConicalGradient { + XPointFixed center; + XFixed angle; /* in degrees */ +} XConicalGradient; + +_XFUNCPROTOBEGIN + +Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); + +Status XRenderQueryVersion (Display *dpy, + int *major_versionp, + int *minor_versionp); + +Status XRenderQueryFormats (Display *dpy); + +int XRenderQuerySubpixelOrder (Display *dpy, int screen); + +Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel); + +XRenderPictFormat * +XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual); + +XRenderPictFormat * +XRenderFindFormat (Display *dpy, + unsigned long mask, + _Xconst XRenderPictFormat *templ, + int count); + +#define PictStandardARGB32 0 +#define PictStandardRGB24 1 +#define PictStandardA8 2 +#define PictStandardA4 3 +#define PictStandardA1 4 +#define PictStandardNUM 5 + +XRenderPictFormat * +XRenderFindStandardFormat (Display *dpy, + int format); + +XIndexValue * +XRenderQueryPictIndexValues(Display *dpy, + _Xconst XRenderPictFormat *format, + int *num); + +Picture +XRenderCreatePicture (Display *dpy, + Drawable drawable, + _Xconst XRenderPictFormat *format, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderChangePicture (Display *dpy, + Picture picture, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderSetPictureClipRectangles (Display *dpy, + Picture picture, + int xOrigin, + int yOrigin, + _Xconst XRectangle *rects, + int n); + +void +XRenderSetPictureClipRegion (Display *dpy, + Picture picture, + Region r); + +void +XRenderSetPictureTransform (Display *dpy, + Picture picture, + XTransform *transform); + +void +XRenderFreePicture (Display *dpy, + Picture picture); + +void +XRenderComposite (Display *dpy, + int op, + Picture src, + Picture mask, + Picture dst, + int src_x, + int src_y, + int mask_x, + int mask_y, + int dst_x, + int dst_y, + unsigned int width, + unsigned int height); + +GlyphSet +XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format); + +GlyphSet +XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing); + +void +XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset); + +void +XRenderAddGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + _Xconst XGlyphInfo *glyphs, + int nglyphs, + _Xconst char *images, + int nbyte_images); + +void +XRenderFreeGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + int nglyphs); + +void +XRenderCompositeString8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst char *string, + int nchar); + +void +XRenderCompositeString16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned short *string, + int nchar); + +void +XRenderCompositeString32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned int *string, + int nchar); + +void +XRenderCompositeText8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt8 *elts, + int nelt); + +void +XRenderCompositeText16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt16 *elts, + int nelt); + +void +XRenderCompositeText32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt32 *elts, + int nelt); + +void +XRenderFillRectangle (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + int x, + int y, + unsigned int width, + unsigned int height); + +void +XRenderFillRectangles (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + _Xconst XRectangle *rectangles, + int n_rects); + +void +XRenderCompositeTrapezoids (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTrapezoid *traps, + int ntrap); + +void +XRenderCompositeTriangles (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTriangle *triangles, + int ntriangle); + +void +XRenderCompositeTriStrip (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeTriFan (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeDoublePoly (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XPointDouble *fpoints, + int npoints, + int winding); +Status +XRenderParseColor(Display *dpy, + char *spec, + XRenderColor *def); + +Cursor +XRenderCreateCursor (Display *dpy, + Picture source, + unsigned int x, + unsigned int y); + +XFilters * +XRenderQueryFilters (Display *dpy, Drawable drawable); + +void +XRenderSetPictureFilter (Display *dpy, + Picture picture, + const char *filter, + XFixed *params, + int nparams); + +Cursor +XRenderCreateAnimCursor (Display *dpy, + int ncursor, + XAnimCursor *cursors); + + +void +XRenderAddTraps (Display *dpy, + Picture picture, + int xOff, + int yOff, + _Xconst XTrap *traps, + int ntrap); + +Picture XRenderCreateSolidFill (Display *dpy, + const XRenderColor *color); + +Picture XRenderCreateLinearGradient (Display *dpy, + const XLinearGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateRadialGradient (Display *dpy, + const XRadialGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateConicalGradient (Display *dpy, + const XConicalGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +_XFUNCPROTOEND + +#endif /* _XRENDER_H_ */ diff --git a/nx-libs.spec b/nx-libs.spec index 139a98cc8..24287f178 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -236,40 +236,10 @@ The NX_Xext library contains a handful of X11 extensions: - X Extended Visual Information extension (XEvi) - X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) - -%package -n libNX_Xrender-devel -Group: Development/Libraries -Summary: Development files for the NX Render Extension library -Requires: libNX_Xrender1%{?_isa} = %{version}-%{release} -Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} -Requires: nx-proto-devel%{?_isa} = %{version}-%{release} - -%description -n libNX_Xrender-devel -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The Xrender library is designed as a lightweight library interface to -the Render extension. - -This package contains all necessary include files and libraries -needed to develop applications that require these. - - -%package -n libNX_Xrender1 -Group: System Environment/Libraries -Summary: NX Rendering Extension library -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xrender - -%description -n libNX_Xrender1 NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -The Xrender library is designed as a lightweight library interface to -the Render extension. - %package -n libXcomp-devel Group: Development/Libraries @@ -366,7 +336,6 @@ Summary: Include files and libraries for NX development Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xau-devel%{?_isa} = %{version}-%{release} Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xrender-devel%{?_isa} = %{version}-%{release} Requires: nx-proto-devel%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -538,7 +507,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %post -n libNX_X11-6 -p /sbin/ldconfig %post -n libNX_Xau6 -p /sbin/ldconfig %post -n libNX_Xext6 -p /sbin/ldconfig -%post -n libNX_Xrender1 -p /sbin/ldconfig %post -n libXcomp3 -p /sbin/ldconfig %post -n libXcompext3 -p /sbin/ldconfig %post -n libXcompshad3 -p /sbin/ldconfig @@ -546,7 +514,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %postun -n libNX_X11-6 -p /sbin/ldconfig %postun -n libNX_Xau6 -p /sbin/ldconfig %postun -n libNX_Xext6 -p /sbin/ldconfig -%postun -n libNX_Xrender1 -p /sbin/ldconfig %postun -n libXcomp3 -p /sbin/ldconfig %postun -n libXcompext3 -p /sbin/ldconfig %postun -n libXcompshad3 -p /sbin/ldconfig @@ -623,15 +590,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %defattr(-,root,root) %{_libdir}/libNX_Xext.so.6* -%files -n libNX_Xrender-devel -%defattr(-,root,root) -%{_libdir}/libNX_Xrender.so -%{_includedir}/nx-X11/extensions/Xrender.h - -%files -n libNX_Xrender1 -%defattr(-,root,root) -%{_libdir}/libNX_Xrender.so.1* - %files -n libXcomp-devel %defattr(-,root,root) %_libdir/libXcomp.so -- cgit v1.2.3 From d9e7f6ae42b30e32619e1d0979598c2ba2288a3e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 18 Mar 2016 05:13:43 +0100 Subject: pixman-devel: Build against shared library pkg-config(pixman-1). --- debian/control | 1 + nx-X11/programs/Xserver/GL/glx/Imakefile | 3 ++- nx-X11/programs/Xserver/GL/mesa/X/Imakefile | 3 ++- nx-X11/programs/Xserver/Imakefile | 15 +++++++-------- nx-X11/programs/Xserver/XTrap/Imakefile | 2 +- nx-X11/programs/Xserver/Xext/Imakefile | 3 ++- nx-X11/programs/Xserver/Xi/Imakefile | 2 +- nx-X11/programs/Xserver/composite/Imakefile | 3 ++- nx-X11/programs/Xserver/damageext/Imakefile | 3 ++- nx-X11/programs/Xserver/dbe/Imakefile | 2 +- nx-X11/programs/Xserver/dix/Imakefile | 3 ++- nx-X11/programs/Xserver/fb/Imakefile | 3 ++- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 5 ++++- nx-X11/programs/Xserver/include/scrnintstr.h | 4 ++++ nx-X11/programs/Xserver/mi/Imakefile | 3 ++- nx-X11/programs/Xserver/miext/cw/Imakefile | 3 ++- nx-X11/programs/Xserver/miext/damage/Imakefile | 3 ++- nx-X11/programs/Xserver/os/Imakefile | 3 ++- nx-X11/programs/Xserver/randr/Imakefile | 4 +++- nx-X11/programs/Xserver/record/Imakefile | 2 +- nx-X11/programs/Xserver/render/Imakefile | 3 ++- nx-X11/programs/Xserver/xfixes/Imakefile | 3 ++- nx-X11/programs/Xserver/xkb/Imakefile | 3 ++- nx-libs.spec | 3 +++ nxcompext/configure.in | 2 ++ 25 files changed, 56 insertions(+), 28 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 83aee8e58..3e1f45e5d 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Build-Depends: pkg-config, x11proto-core-dev, expat, + libpixman-1-dev, Standards-Version: 3.9.6 Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary Vcs-Git: git://code.x2go.org/nx-libs.git diff --git a/nx-X11/programs/Xserver/GL/glx/Imakefile b/nx-X11/programs/Xserver/GL/glx/Imakefile index 506ef5539..bf2d760a0 100644 --- a/nx-X11/programs/Xserver/GL/glx/Imakefile +++ b/nx-X11/programs/Xserver/GL/glx/Imakefile @@ -43,7 +43,8 @@ LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \ -I$(XINCLUDESRC) -I$(SERVERSRC)/mi \ -I$(EXTINCSRC) -I$(LIBSRC)/GL/include \ - -I$(XF86SRC) + -I$(XF86SRC) \ + `pkg-config --cflags-only-I pixman-1` #if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) NO_EXT_DEFS = -DMISSING_GL_EXTS diff --git a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile index ee728b556..9fb00ef73 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile @@ -39,7 +39,8 @@ LinkSourceFile(compsize.c,$(MESASRCDIR)/src/glx/x11) -I$(SERVERSRC)/include -I$(SERVERSRC)/GL/include \ -I$(SERVERSRC)/GL/glx \ -I$(XF86OSSRC) \ - -I$(DRMSRCDIR)/shared-core + -I$(DRMSRCDIR)/shared-core \ + `pkg-config --cflags-only-I pixman-1` DEFINES = $(GLX_DEFINES) $(GLXSRV_DEFINES) -DNXAGENT_SERVER /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index c7e1af550..a2a3f7ced 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -384,10 +384,12 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ dix/main.o #endif -XPMLIB = -lXpm +XPMLIB = -lXpm +XMLLIB = `pkg-config --libs libxml-2.0` +PIXMANLIB = `pkg-config --libs pixman-1` NXAGENT = hw/nxagent/LibraryTargetName(nxagent) NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI) -NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) +NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB) $(PIXMANLIB) #if HasParallelMake MakeMutex($(NXAGENTDIRS) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS)) #endif @@ -403,18 +405,15 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes -lXfont \ - -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp \ -`pkg-config --libs libxml-2.0` + -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ -lXcomp -lXcompext -lXrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \ - -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \ -`pkg-config --libs libxml-2.0` + -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lXrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \ - -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \ -`pkg-config --libs libxml-2.0` + -L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp #endif #endif diff --git a/nx-X11/programs/Xserver/XTrap/Imakefile b/nx-X11/programs/Xserver/XTrap/Imakefile index 2362634c7..c61712f1d 100644 --- a/nx-X11/programs/Xserver/XTrap/Imakefile +++ b/nx-X11/programs/Xserver/XTrap/Imakefile @@ -11,7 +11,7 @@ XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 da #endif SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext + INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext `pkg-config --cflags-only-I pixman-1` NormalLibraryTarget(xtrap,$(OBJS)) LintLibraryTarget(xtrap,$(SRCS)) diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index eb4588e37..199e59f1d 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -161,7 +161,8 @@ XF86INCLUDES = -I$(XF86COMSRC) #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ $(PNRXINCLUDES) $(XF86INCLUDES) \ - $(FONTCACHEINCLUDES) $(DMXINCLUDES) + $(FONTCACHEINCLUDES) $(DMXINCLUDES) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln #if defined(NXAgentServer) && NXAgentServer diff --git a/nx-X11/programs/Xserver/Xi/Imakefile b/nx-X11/programs/Xserver/Xi/Imakefile index 27e1f5df0..29190b711 100644 --- a/nx-X11/programs/Xserver/Xi/Imakefile +++ b/nx-X11/programs/Xserver/Xi/Imakefile @@ -83,7 +83,7 @@ XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.2 1999/04/17 09:08:22 dawes ungrdev.o \ ungrdevb.o \ ungrdevk.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln NormalLibraryTarget(xinput,$(OBJS)) diff --git a/nx-X11/programs/Xserver/composite/Imakefile b/nx-X11/programs/Xserver/composite/Imakefile index c45aa7f6a..f121e0bbe 100644 --- a/nx-X11/programs/Xserver/composite/Imakefile +++ b/nx-X11/programs/Xserver/composite/Imakefile @@ -6,7 +6,8 @@ INCLUDES = -I../include -I../mi -I../Xext -I../render -I../xfixes \ -I../damageext -I../miext/damage -I$(EXTINCSRC) \ - -I$(XINCLUDESRC) + -I$(XINCLUDESRC) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/damageext/Imakefile b/nx-X11/programs/Xserver/damageext/Imakefile index f7ce4573b..24dcee85c 100644 --- a/nx-X11/programs/Xserver/damageext/Imakefile +++ b/nx-X11/programs/Xserver/damageext/Imakefile @@ -5,7 +5,8 @@ OBJS = damageext.o INCLUDES = -I../include -I../Xext -I../render -I../xfixes -I../miext/damage \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) + -I$(EXTINCSRC) -I$(XINCLUDESRC) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/dbe/Imakefile b/nx-X11/programs/Xserver/dbe/Imakefile index 9d9c3fd67..5e5eac4a1 100644 --- a/nx-X11/programs/Xserver/dbe/Imakefile +++ b/nx-X11/programs/Xserver/dbe/Imakefile @@ -17,7 +17,7 @@ XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.10 2001/01/17 22:36:41 daw SRCS = dbe.c midbe.c OBJS = dbe.o midbe.o - INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) + INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln NormalLibraryObjectRule() diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile index 47e617718..22b21eb95 100644 --- a/nx-X11/programs/Xserver/dix/Imakefile +++ b/nx-X11/programs/Xserver/dix/Imakefile @@ -25,7 +25,8 @@ OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx + -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../os/llib-los.ln /* diff --git a/nx-X11/programs/Xserver/fb/Imakefile b/nx-X11/programs/Xserver/fb/Imakefile index 489d6a201..662a70717 100644 --- a/nx-X11/programs/Xserver/fb/Imakefile +++ b/nx-X11/programs/Xserver/fb/Imakefile @@ -123,7 +123,8 @@ OBJS = $(XFMODOBJ) \ INCLUDES = -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ -I$(XINCLUDESRC) \ -I$(XF86SRC)/common $(EXTRAINCLUDES) \ - -I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + -I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln $(SERVERSRC)/os/llib-los.ln \ $(SERVERSRC)/mi/llib-lmi.ln diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 160d01e60..b0aff4b07 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -141,7 +141,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../ -I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ $(VFBINCLUDES) \ - `pkg-config --cflags-only-I libxml-2.0` + `pkg-config --cflags-only-I libxml-2.0` \ + `pkg-config --cflags-only-I pixman-1` #ifdef SunArchitecture INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \ -I../../../../extras/Mesa/include \ @@ -153,6 +154,7 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ $(VFBINCLUDES) \ `pkg-config --cflags-only-I libxml-2.0` + `pkg-config --cflags-only-I pixman-1` #else #ifdef cygwinArchitecture INCLUDES = -I. -I$(XBUILDINCDIR) \ @@ -164,6 +166,7 @@ INCLUDES = -I. -I$(XBUILDINCDIR) \ -I$(EXTINCSRC) -I$(XINCLUDESRC) \ $(VFBINCLUDES) \ `pkg-config --cflags-only-I libxml-2.0` + `pkg-config --cflags-only-I pixman-1` #endif #endif diff --git a/nx-X11/programs/Xserver/include/scrnintstr.h b/nx-X11/programs/Xserver/include/scrnintstr.h index 0539ca516..2597d6b67 100644 --- a/nx-X11/programs/Xserver/include/scrnintstr.h +++ b/nx-X11/programs/Xserver/include/scrnintstr.h @@ -709,6 +709,10 @@ typedef struct _Screen { } ScreenRec; +static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) { + return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */ +} + typedef struct _ScreenInfo { int imageByteOrder; int bitmapScanlineUnit; diff --git a/nx-X11/programs/Xserver/mi/Imakefile b/nx-X11/programs/Xserver/mi/Imakefile index e62fb0005..290f85790 100644 --- a/nx-X11/programs/Xserver/mi/Imakefile +++ b/nx-X11/programs/Xserver/mi/Imakefile @@ -90,7 +90,8 @@ EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC \ INCLUDES = -I. -I../include -I../render \ -I../xfixes -I../damageext -I../miext/damage \ - -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(FFS_DEFINES) diff --git a/nx-X11/programs/Xserver/miext/cw/Imakefile b/nx-X11/programs/Xserver/miext/cw/Imakefile index 39106ac13..795ed1987 100755 --- a/nx-X11/programs/Xserver/miext/cw/Imakefile +++ b/nx-X11/programs/Xserver/miext/cw/Imakefile @@ -7,7 +7,8 @@ OBJS = cw.o cw_ops.o cw_render.o INCLUDES = -I../../mi -I../../fb -I../../render -I../../composite \ -I../../include -I$(XINCLUDESRC) $(EXTRAINCLUDES) \ - -I$(EXTINCSRC) + -I$(EXTINCSRC) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \ ../../mi/llib-lmi.ln diff --git a/nx-X11/programs/Xserver/miext/damage/Imakefile b/nx-X11/programs/Xserver/miext/damage/Imakefile index 7fa745b65..a28786203 100755 --- a/nx-X11/programs/Xserver/miext/damage/Imakefile +++ b/nx-X11/programs/Xserver/miext/damage/Imakefile @@ -11,7 +11,8 @@ OBJS = damage.o INCLUDES = -I. -I../shadow -I../../mi -I../../fb -I../../include -I$(XINCLUDESRC) \ -I$(XF86SRC)/common $(EXTRAINCLUDES) \ - -I../../render -I../cw -I$(EXTINCSRC) + -I../../render -I../cw -I$(EXTINCSRC) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \ ../../mi/llib-lmi.ln diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile index 18bb9804d..5245b7841 100644 --- a/nx-X11/programs/Xserver/os/Imakefile +++ b/nx-X11/programs/Xserver/os/Imakefile @@ -158,7 +158,8 @@ BOOTSTRAPCFLAGS = $(RANDOM_DEFINES) $(BUGMSG) $(XTRANS_FAILDEFINES) $(NX_DEFINES) INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/render \ - -I$(TOP)/lib/Xau Krb5Includes $(NX_INCLUDES) + -I$(TOP)/lib/Xau Krb5Includes $(NX_INCLUDES) \ + `pkg-config --cflags-only-I pixman-1` DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \ $(TRANS_INCLUDES) $(CONNECTION_FLAGS) $(GETPEER_DEFINES) \ DependDefines diff --git a/nx-X11/programs/Xserver/randr/Imakefile b/nx-X11/programs/Xserver/randr/Imakefile index 19f8143e4..7f920aece 100644 --- a/nx-X11/programs/Xserver/randr/Imakefile +++ b/nx-X11/programs/Xserver/randr/Imakefile @@ -23,7 +23,9 @@ XCOMM $XFree86: xc/programs/Xserver/randr/Imakefile,v 1.1 2001/05/23 03:29:44 ke INCLUDES = -I../include -I../mi \ -I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I../render + -I../render \ + `pkg-config --cflags-only-I pixman-1` + LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = -DNXAGENT_SERVER diff --git a/nx-X11/programs/Xserver/record/Imakefile b/nx-X11/programs/Xserver/record/Imakefile index 4d4bf6a73..c24cbb0d9 100644 --- a/nx-X11/programs/Xserver/record/Imakefile +++ b/nx-X11/programs/Xserver/record/Imakefile @@ -16,7 +16,7 @@ XCOMM $XFree86: xc/programs/Xserver/record/Imakefile,v 1.12 2001/11/02 23:29:34 #endif SRCS = record.c set.c OBJS = record.o set.o - INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln DEFINES = -DNDEBUG diff --git a/nx-X11/programs/Xserver/render/Imakefile b/nx-X11/programs/Xserver/render/Imakefile index 1331b1fb4..23f9476ea 100644 --- a/nx-X11/programs/Xserver/render/Imakefile +++ b/nx-X11/programs/Xserver/render/Imakefile @@ -29,7 +29,8 @@ XCOMM $XFree86: xc/programs/Xserver/render/Imakefile,v 1.10 2002/11/23 02:38:15 INCLUDES = -I. -I../include -I../mi \ -I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I../Xext + -I../Xext \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln NormalLibraryTarget(render,$(OBJS)) diff --git a/nx-X11/programs/Xserver/xfixes/Imakefile b/nx-X11/programs/Xserver/xfixes/Imakefile index e467ed149..84f7c6f16 100755 --- a/nx-X11/programs/Xserver/xfixes/Imakefile +++ b/nx-X11/programs/Xserver/xfixes/Imakefile @@ -5,7 +5,8 @@ OBJS = cursor.o region.o saveset.o select.o xfixes.o INCLUDES = -I. -I../include -I../Xext -I../fixes -I../render \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) + -I$(EXTINCSRC) -I$(XINCLUDESRC) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile index 2ac6fe32d..e63ca4462 100644 --- a/nx-X11/programs/Xserver/xkb/Imakefile +++ b/nx-X11/programs/Xserver/xkb/Imakefile @@ -51,7 +51,8 @@ XF86INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o \ $(XKBXI_OBJS) $(DDX_OBJS) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \ - -I$(SERVERSRC)/mi $(XF86INCLUDES) + -I$(SERVERSRC)/mi $(XF86INCLUDES) \ + `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = -DXKB_IN_SERVER $(EXTRA_ALLOC_DEFINES) $(XKB_DDXDEFS) $(NX_DEFINES) diff --git a/nx-libs.spec b/nx-libs.spec index 24287f178..98cee6926 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -29,6 +29,7 @@ BuildRequires: fdupes BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) @@ -44,6 +45,7 @@ BuildRequires: pkgconfig(xinerama) BuildRequires: libexpat-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel +BuildRequires: pixman-devel BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libXpm-devel @@ -63,6 +65,7 @@ BuildRequires: xorg-x11-util-devel BuildRequires: expat-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel +BuildRequires: pixman-devel BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel diff --git a/nxcompext/configure.in b/nxcompext/configure.in index eb6604dba..5b9ccc4da 100644 --- a/nxcompext/configure.in +++ b/nxcompext/configure.in @@ -28,6 +28,8 @@ if test -d "../nx-X11/include" ; then LDFLAGS="$LDFLAGS -L../nx-X11/exports/lib" fi +X_CFLAGS=`pkg-config --cflags-only-I pixman-1` + dnl Check for programs. AC_PROG_CXX -- cgit v1.2.3 From 9bc6ff269aa8bf4c41696ebf4a686c93729ba151 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 1 Mar 2016 20:55:27 +0000 Subject: Drop X11 extensions not shipped with recent X.Org server versions anymore: include/extensions: Xag.h, Xagsrv.h, Xagstr.h Xserver/Xext: appgroup.c, appgroup.h lib/Xext: XAppgroup.c include/extensions: Xcup.h, Xcupstr.h, Xserver/Xext: cup.c lib/Xext: cup.c include/extensions: Xdbe.h Xserver/Xext: Xdbe.c Xserver/Xext: dgaproc.h, xf86dga.c, xf86dga2.c, xf86dgaext.h include/extensions: Xevie.h, Xeviestr.h include/extensions: XEVI.h, XEVIstr.h Xserver/Xext: EVI.c, EVIstruct.h, sampleEVI.c lib/Xext: XEVI.c include/extensions: fontcache.h, fontcacheP.h, fontcachstr.h Xserver/Xext: fontcache.c include/extensions: lbxbuf.h, lbxbufstr.h, lbxdeltastr.h, lbximage.h, lbxopts.h, lbxstr.h, lbxzlib.h lib/Xext: XLbx.c include/extensions: multibuf.h, multibufst.h lib/Xext: XMultibuf.c Xserver/Xext: mbuf.c, mbufbf.c, mbufpx.c include/extensions: xf86vmode.h, xf86vmstr.h Xserver/Xext: vidmodeproc.h, xf86vmode.c lib/Xext: MITMisc.c Xserver/Xext: mitmisc.c Xserver/Xext: xf86misc.c, xf86miscproc.h Xserver/XTrap: xf86XTrapModule.c, xtrapddmi.c, xtrapdi.c, xtrapdiswp.c, xtrapditbl.c include/extensions: xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h xtraplibp.h xtrapproto.h Fixes: ArcticaProject/nx-libs#116 X.org: https://cgit.freedesktop.org/xorg/xserver/commit/?id=cbc20d92de92aad5ca240310a9156ccf97c24a01 Plus: Drop various Imake'ish defines where not needed anymore. --- debian/libnx-xext-dev.install.in | 23 - debian/libnx-xext6.symbols | 82 +- debian/nx-x11proto-xext-dev.install.in | 1 + .../016_nx-X11_install-location.debian.patch | 2 +- debian/rules | 9 - nx-X11/config/cf/README | 5 - nx-X11/config/cf/X11.tmpl | 152 +- nx-X11/config/cf/linux.cf | 4 - nx-X11/config/cf/xorg.cf | 31 +- nx-X11/include/extensions/Imakefile | 42 +- nx-X11/include/extensions/MITMisc.h | 66 - nx-X11/include/extensions/XEVI.h | 64 - nx-X11/include/extensions/XEVIstr.h | 98 - nx-X11/include/extensions/XLbx.h | 155 -- nx-X11/include/extensions/Xag.h | 114 - nx-X11/include/extensions/Xagsrv.h | 76 - nx-X11/include/extensions/Xagstr.h | 182 -- nx-X11/include/extensions/Xcup.h | 69 - nx-X11/include/extensions/Xcupstr.h | 109 - nx-X11/include/extensions/Xdbe.h | 136 -- nx-X11/include/extensions/Xevie.h | 78 - nx-X11/include/extensions/Xeviestr.h | 165 -- nx-X11/include/extensions/Xinerama.h | 76 - nx-X11/include/extensions/fontcache.h | 106 - nx-X11/include/extensions/fontcacheP.h | 40 - nx-X11/include/extensions/fontcachstr.h | 130 -- nx-X11/include/extensions/lbxbuf.h | 51 - nx-X11/include/extensions/lbxbufstr.h | 45 - nx-X11/include/extensions/lbxdeltastr.h | 105 - nx-X11/include/extensions/lbximage.h | 151 -- nx-X11/include/extensions/lbxopts.h | 133 -- nx-X11/include/extensions/lbxstr.h | 931 --------- nx-X11/include/extensions/lbxzlib.h | 64 - nx-X11/include/extensions/mitmiscstr.h | 70 - nx-X11/include/extensions/multibuf.h | 317 --- nx-X11/include/extensions/multibufst.h | 609 ------ nx-X11/include/extensions/xf86dga.h | 264 --- nx-X11/include/extensions/xf86dga1.h | 140 -- nx-X11/include/extensions/xf86dga1str.h | 194 -- nx-X11/include/extensions/xf86dgastr.h | 344 --- nx-X11/include/extensions/xf86misc.h | 172 -- nx-X11/include/extensions/xf86mscstr.h | 238 --- nx-X11/include/extensions/xf86vmode.h | 322 --- nx-X11/include/extensions/xf86vmstr.h | 562 ----- nx-X11/include/extensions/xtrapbits.h | 83 - nx-X11/include/extensions/xtrapddmi.h | 115 - nx-X11/include/extensions/xtrapdi.h | 507 ----- nx-X11/include/extensions/xtrapemacros.h | 387 ---- nx-X11/include/extensions/xtraplib.h | 128 -- nx-X11/include/extensions/xtraplibp.h | 142 -- nx-X11/include/extensions/xtrapproto.h | 168 -- nx-X11/lib/Xext/Imakefile | 12 +- nx-X11/lib/Xext/MITMisc.c | 133 -- nx-X11/lib/Xext/XAppgroup.c | 391 ---- nx-X11/lib/Xext/XEVI.c | 213 -- nx-X11/lib/Xext/XLbx.c | 129 -- nx-X11/lib/Xext/XMultibuf.c | 714 ------- nx-X11/lib/Xext/Xcup.c | 265 --- nx-X11/lib/Xext/Xdbe.c | 474 ----- nx-X11/lib/Xext/Xext-def.cpp | 41 - nx-X11/programs/Xserver/Imakefile | 10 +- nx-X11/programs/Xserver/XTrap/Imakefile | 27 - nx-X11/programs/Xserver/XTrap/module/Imakefile | 26 - nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c | 51 - nx-X11/programs/Xserver/XTrap/xtrapddmi.c | 188 -- nx-X11/programs/Xserver/XTrap/xtrapdi.c | 2157 ------------------- nx-X11/programs/Xserver/XTrap/xtrapdiswp.c | 1010 --------- nx-X11/programs/Xserver/XTrap/xtrapditbl.c | 242 --- nx-X11/programs/Xserver/Xext/EVI.c | 215 -- nx-X11/programs/Xserver/Xext/EVIstruct.h | 60 - nx-X11/programs/Xserver/Xext/Imakefile | 97 +- nx-X11/programs/Xserver/Xext/appgroup.c | 829 -------- nx-X11/programs/Xserver/Xext/appgroup.h | 10 - nx-X11/programs/Xserver/Xext/cup.c | 367 ---- nx-X11/programs/Xserver/Xext/dgaproc.h | 144 -- nx-X11/programs/Xserver/Xext/extmod/Imakefile | 74 +- nx-X11/programs/Xserver/Xext/extmod/modinit.c | 81 - nx-X11/programs/Xserver/Xext/extmod/modinit.h | 12 - nx-X11/programs/Xserver/Xext/fontcache.c | 333 --- nx-X11/programs/Xserver/Xext/mbuf.c | 1787 ---------------- nx-X11/programs/Xserver/Xext/mbufbf.c | 1030 --------- nx-X11/programs/Xserver/Xext/mbufpx.c | 651 ------ nx-X11/programs/Xserver/Xext/mitmisc.c | 176 -- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 4 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 6 +- nx-X11/programs/Xserver/Xext/sampleEVI.c | 121 -- nx-X11/programs/Xserver/Xext/vidmodeproc.h | 78 - nx-X11/programs/Xserver/Xext/xcmisc.c | 8 +- nx-X11/programs/Xserver/Xext/xevie.c | 719 ------- nx-X11/programs/Xserver/Xext/xf86dga.c | 307 --- nx-X11/programs/Xserver/Xext/xf86dga2.c | 775 ------- nx-X11/programs/Xserver/Xext/xf86dgaext.h | 12 - nx-X11/programs/Xserver/Xext/xf86misc.c | 854 -------- nx-X11/programs/Xserver/Xext/xf86miscproc.h | 70 - nx-X11/programs/Xserver/Xext/xf86vmode.c | 2206 -------------------- nx-X11/programs/Xserver/dix/dispatch.c | 10 +- nx-libs.spec | 43 +- 97 files changed, 118 insertions(+), 25301 deletions(-) delete mode 100644 nx-X11/include/extensions/MITMisc.h delete mode 100644 nx-X11/include/extensions/XEVI.h delete mode 100644 nx-X11/include/extensions/XEVIstr.h delete mode 100644 nx-X11/include/extensions/XLbx.h delete mode 100644 nx-X11/include/extensions/Xag.h delete mode 100644 nx-X11/include/extensions/Xagsrv.h delete mode 100644 nx-X11/include/extensions/Xagstr.h delete mode 100644 nx-X11/include/extensions/Xcup.h delete mode 100644 nx-X11/include/extensions/Xcupstr.h delete mode 100644 nx-X11/include/extensions/Xdbe.h delete mode 100644 nx-X11/include/extensions/Xevie.h delete mode 100644 nx-X11/include/extensions/Xeviestr.h delete mode 100644 nx-X11/include/extensions/Xinerama.h delete mode 100644 nx-X11/include/extensions/fontcache.h delete mode 100644 nx-X11/include/extensions/fontcacheP.h delete mode 100644 nx-X11/include/extensions/fontcachstr.h delete mode 100644 nx-X11/include/extensions/lbxbuf.h delete mode 100644 nx-X11/include/extensions/lbxbufstr.h delete mode 100644 nx-X11/include/extensions/lbxdeltastr.h delete mode 100644 nx-X11/include/extensions/lbximage.h delete mode 100644 nx-X11/include/extensions/lbxopts.h delete mode 100644 nx-X11/include/extensions/lbxstr.h delete mode 100644 nx-X11/include/extensions/lbxzlib.h delete mode 100644 nx-X11/include/extensions/mitmiscstr.h delete mode 100644 nx-X11/include/extensions/multibuf.h delete mode 100644 nx-X11/include/extensions/multibufst.h delete mode 100644 nx-X11/include/extensions/xf86dga.h delete mode 100644 nx-X11/include/extensions/xf86dga1.h delete mode 100644 nx-X11/include/extensions/xf86dga1str.h delete mode 100644 nx-X11/include/extensions/xf86dgastr.h delete mode 100644 nx-X11/include/extensions/xf86misc.h delete mode 100644 nx-X11/include/extensions/xf86mscstr.h delete mode 100644 nx-X11/include/extensions/xf86vmode.h delete mode 100644 nx-X11/include/extensions/xf86vmstr.h delete mode 100644 nx-X11/include/extensions/xtrapbits.h delete mode 100644 nx-X11/include/extensions/xtrapddmi.h delete mode 100644 nx-X11/include/extensions/xtrapdi.h delete mode 100644 nx-X11/include/extensions/xtrapemacros.h delete mode 100644 nx-X11/include/extensions/xtraplib.h delete mode 100644 nx-X11/include/extensions/xtraplibp.h delete mode 100644 nx-X11/include/extensions/xtrapproto.h delete mode 100644 nx-X11/lib/Xext/MITMisc.c delete mode 100644 nx-X11/lib/Xext/XAppgroup.c delete mode 100644 nx-X11/lib/Xext/XEVI.c delete mode 100644 nx-X11/lib/Xext/XLbx.c delete mode 100644 nx-X11/lib/Xext/XMultibuf.c delete mode 100644 nx-X11/lib/Xext/Xcup.c delete mode 100644 nx-X11/lib/Xext/Xdbe.c delete mode 100644 nx-X11/programs/Xserver/XTrap/Imakefile delete mode 100644 nx-X11/programs/Xserver/XTrap/module/Imakefile delete mode 100644 nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapddmi.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapdi.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapdiswp.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapditbl.c delete mode 100644 nx-X11/programs/Xserver/Xext/EVI.c delete mode 100644 nx-X11/programs/Xserver/Xext/EVIstruct.h delete mode 100644 nx-X11/programs/Xserver/Xext/appgroup.c delete mode 100644 nx-X11/programs/Xserver/Xext/appgroup.h delete mode 100644 nx-X11/programs/Xserver/Xext/cup.c delete mode 100644 nx-X11/programs/Xserver/Xext/dgaproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/fontcache.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbuf.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbufbf.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbufpx.c delete mode 100644 nx-X11/programs/Xserver/Xext/mitmisc.c delete mode 100644 nx-X11/programs/Xserver/Xext/sampleEVI.c delete mode 100644 nx-X11/programs/Xserver/Xext/vidmodeproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/xevie.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dga.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dga2.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dgaext.h delete mode 100644 nx-X11/programs/Xserver/Xext/xf86misc.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86miscproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/xf86vmode.c (limited to 'debian') diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index 0d1df8c08..4a571b9fd 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -1,32 +1,9 @@ usr/lib/*/libNX_Xext.so -usr/include/*/nx-X11/extensions/MITMisc.h -usr/include/*/nx-X11/extensions/XEVI.h -usr/include/*/nx-X11/extensions/XEVIstr.h -usr/include/*/nx-X11/extensions/Xevie.h -usr/include/*/nx-X11/extensions/Xeviestr.h -usr/include/*/nx-X11/extensions/XLbx.h usr/include/*/nx-X11/extensions/XShm.h -usr/include/*/nx-X11/extensions/Xag.h -usr/include/*/nx-X11/extensions/Xagsrv.h -usr/include/*/nx-X11/extensions/Xagstr.h -usr/include/*/nx-X11/extensions/Xcup.h -usr/include/*/nx-X11/extensions/Xcupstr.h -usr/include/*/nx-X11/extensions/Xdbe.h -usr/include/*/nx-X11/extensions/Xdbeproto.h usr/include/*/nx-X11/extensions/Xext.h usr/include/*/nx-X11/extensions/dpms.h usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/extutil.h -usr/include/*/nx-X11/extensions/lbxstr.h -usr/include/*/nx-X11/extensions/lbxbuf.h -usr/include/*/nx-X11/extensions/lbxdeltastr.h -usr/include/*/nx-X11/extensions/lbximage.h -usr/include/*/nx-X11/extensions/lbxbufstr.h -usr/include/*/nx-X11/extensions/lbxopts.h -usr/include/*/nx-X11/extensions/lbxzlib.h -usr/include/*/nx-X11/extensions/mitmiscstr.h -usr/include/*/nx-X11/extensions/multibuf.h -usr/include/*/nx-X11/extensions/multibufst.h usr/include/*/nx-X11/extensions/security.h usr/include/*/nx-X11/extensions/securstr.h usr/include/*/nx-X11/extensions/shape.h diff --git a/debian/libnx-xext6.symbols b/debian/libnx-xext6.symbols index 28f4c4fed..e48ae4968 100644 --- a/debian/libnx-xext6.symbols +++ b/debian/libnx-xext6.symbols @@ -8,12 +8,12 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# DPMSInfo@Base 3.5.0.29 DPMSQueryExtension@Base 3.5.0.29 DPMSSetTimeouts@Base 3.5.0.29 - XLbxGetEventBase@Base 3.5.0.29 - XLbxQueryExtension@Base 3.5.0.29 - XLbxQueryVersion@Base 3.5.0.29 - XMITMiscGetBugMode@Base 3.5.0.29 - XMITMiscQueryExtension@Base 3.5.0.29 - XMITMiscSetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxGetEventBase@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscGetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscSetBugMode@Base 3.5.0.29 XMissingExtension@Base 3.5.0.29 XSecurityAllocXauth@Base 3.5.0.29 XSecurityFreeXauth@Base 3.5.0.29 @@ -85,44 +85,44 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# XTestQueryInputSize@Base 3.5.0.29 XTestReset@Base 3.5.0.29 XTestStopInput@Base 3.5.0.29 - XagCreateAssociation@Base 3.5.0.29 - XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 - XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 - XagDestroyApplicationGroup@Base 3.5.0.29 - XagDestroyAssociation@Base 3.5.0.29 - XagGetApplicationGroupAttributes@Base 3.5.0.29 - XagQueryApplicationGroup@Base 3.5.0.29 - XagQueryVersion@Base 3.5.0.29 - XcupGetReservedColormapEntries@Base 3.5.0.29 - XcupQueryVersion@Base 3.5.0.29 - XcupStoreColors@Base 3.5.0.29 - XdbeAllocateBackBufferName@Base 3.5.0.29 - XdbeBeginIdiom@Base 3.5.0.29 - XdbeDeallocateBackBufferName@Base 3.5.0.29 - XdbeEndIdiom@Base 3.5.0.29 - XdbeFreeVisualInfo@Base 3.5.0.29 - XdbeGetBackBufferAttributes@Base 3.5.0.29 - XdbeGetVisualInfo@Base 3.5.0.29 - XdbeQueryExtension@Base 3.5.0.29 - XdbeSwapBuffers@Base 3.5.0.29 - XeviGetVisualInfo@Base 3.5.0.29 - XeviQueryExtension@Base 3.5.0.29 - XeviQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagGetApplicationGroupAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupGetReservedColormapEntries@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupStoreColors@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeAllocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeBeginIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeDeallocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeEndIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeFreeVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetBackBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeSwapBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviGetVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviQueryVersion@Base 3.5.0.29 XextAddDisplay@Base 3.5.0.29 XextCreateExtension@Base 3.5.0.29 XextDestroyExtension@Base 3.5.0.29 XextFindDisplay@Base 3.5.0.29 XextRemoveDisplay@Base 3.5.0.29 - XmbufChangeBufferAttributes@Base 3.5.0.29 - XmbufChangeWindowAttributes@Base 3.5.0.29 - XmbufClearBufferArea@Base 3.5.0.29 - XmbufCreateBuffers@Base 3.5.0.29 - XmbufCreateStereoWindow@Base 3.5.0.29 - XmbufDestroyBuffers@Base 3.5.0.29 - XmbufDisplayBuffers@Base 3.5.0.29 - XmbufGetBufferAttributes@Base 3.5.0.29 - XmbufGetScreenInfo@Base 3.5.0.29 - XmbufGetVersion@Base 3.5.0.29 - XmbufGetWindowAttributes@Base 3.5.0.29 - XmbufQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufClearBufferArea@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateStereoWindow@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDestroyBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDisplayBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetScreenInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufQueryExtension@Base 3.5.0.29 _XExtensionErrorFunction@Base 3.5.0.29 diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index 61829cf29..f0dfd211e 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -3,3 +3,4 @@ usr/include/*/nx-X11/extensions/xtestconst.h usr/include/*/nx-X11/extensions/shapestr.h usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h +usr/include/*/nx-X11/extensions/Xdbeproto.h diff --git a/debian/patches/016_nx-X11_install-location.debian.patch b/debian/patches/016_nx-X11_install-location.debian.patch index 94e2cb075..89c78f985 100644 --- a/debian/patches/016_nx-X11_install-location.debian.patch +++ b/debian/patches/016_nx-X11_install-location.debian.patch @@ -6,7 +6,7 @@ Author: Mike Gabriel Last-Update: 2012-12-31 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl -@@ -829,7 +829,7 @@ +@@ -776,7 +776,7 @@ #define AlternateUsrLibDir YES #endif #else diff --git a/debian/rules b/debian/rules index 578fc84f8..9fc39464c 100755 --- a/debian/rules +++ b/debian/rules @@ -45,17 +45,8 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XInput.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XK*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/*Xv*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtrap*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XRes*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/record*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmode.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86misc.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dgastr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1str.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86mscstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/bigreqstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xcmiscstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XIproto.h diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 3e1fe95a3..0faa34ae7 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -172,15 +172,10 @@ X11.tmpl provides defaults for the following variables: BDFTOSNFFILT command to run bdftosnf BaseExtensionDefines universal extensions to use BinDir directory in which to install programs - BuildAppgroup build AppGroup extension in server - BuildCup build Colormap Utilization extension in server BuildDBE build DOUBLE-BUFFER extension - BuildDmx build Distributed Multihead X server and extension BuildDPMS build Display Power Management Signaling extension BuildIncRoot relative path to location of headers in build BuildIncTop path from build includes directory to top - BuildEVI build EVI server extension - BuildMultibuffer build Multibuffer extension (obsolete) BuildPlugin build xrx plug-in for web browsers BuildRECORD Build RECORD extension BuildServer build X server diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index f02f80786..89b069772 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -157,9 +157,6 @@ XORGRELSTRING = XorgManVersionString #define BuildXauLib (BuildLibraries || BuildLibrariesForXServers) #endif #define UseInstalledXauLib (defined(UseInstalled) || !BuildXauLib) -#ifndef BuildMITMiscExt -#define BuildMITMiscExt YES -#endif #ifndef BuildTestExt #define BuildTestExt YES #endif @@ -178,21 +175,12 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXInputExt #define BuildXInputExt NO #endif -#ifndef BuildEVI -#define BuildEVI YES -#endif #ifndef BuildDBE #define BuildDBE YES #endif -#ifndef BuildDIS -#define BuildDIS NO -#endif #ifndef BuildDPMS #define BuildDPMS YES #endif -#ifndef BuildFontCache -#define BuildFontCache NO -#endif #ifndef BuildXKB #define BuildXKB YES #endif @@ -201,9 +189,6 @@ XORGRELSTRING = XorgManVersionString #endif #ifndef BuildXKBfilelib #define BuildXKBfilelib (BuildXKB && !BuildServersOnly) -#endif -#ifndef BuildXTrap -#define BuildXTrap YES #endif /* @@ -214,9 +199,6 @@ XORGRELSTRING = XorgManVersionString #ifndef UseXKBInClients #define UseXKBInClients NO /* use XKB in "normal" clients? */ #endif -#ifndef BuildMultibuffer -#define BuildMultibuffer NO -#endif #ifndef BuildRECORD #define BuildRECORD YES #endif @@ -229,15 +211,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXCSecurity #define BuildXCSecurity YES #endif -#ifndef BuildAppgroup -#define BuildAppgroup YES -#endif -#if BuildAppgroup && !BuildXCSecurity -#define BuildXCSecurity YES -#endif -#ifndef BuildCup -#define BuildCup YES -#endif #ifndef HasPlugin /* Browser plugins are shared libraries - only build them if the OS * supports shared libs. @@ -251,18 +224,9 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildScreenSaverExt #define BuildScreenSaverExt NO #endif -#ifndef BuildXF86VidModeExt -#define BuildXF86VidModeExt NO -#endif -#ifndef BuildXF86MiscExt -#define BuildXF86MiscExt NO -#endif #ifndef BuildXF86BigfontExt #define BuildXF86BigfontExt NO #endif -#ifndef BuildXF86DGA -#define BuildXF86DGA NO -#endif #ifndef BuildXResExt #define BuildXResExt NO #endif @@ -301,10 +265,6 @@ XORGRELSTRING = XorgManVersionString #define BuildCompositeLibrary !BuildServersOnly && BuildXfixesLibrary #endif -#ifndef BuildXevie -#define BuildXevie YES -#endif - #ifndef BuildRootless #define BuildRootless NO #endif @@ -459,13 +419,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef ExtensionDefines -#ifndef MITMiscDefines -#if BuildMITMiscExt -#define MITMiscDefines -DMITMISC -#else -#define MITMiscDefines /**/ -#endif -#endif #ifndef XTestDefines #if BuildTestExt #define XTestDefines -DXTEST @@ -473,13 +426,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define XTestDefines /**/ #endif #endif -#ifndef XTrapDefines -#if BuildXTrap -#define XTrapDefines -DXTRAP -#else -#define XTrapDefines /**/ -#endif -#endif #ifndef XSyncDefines #if BuildSyncExt #define XSyncDefines -DXSYNC @@ -573,14 +519,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef EVIDefines -#if BuildEVI -#define EVIDefines -DEVI -#else -#define EVIDefines /**/ -#endif -#endif - #ifndef DBEDefines #if BuildDBE #define DBEDefines -DDBE @@ -593,14 +531,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */ #endif -#ifndef MultibufferDefines -#if BuildMultibuffer -#define MultibufferDefines -DMULTIBUFFER -#else -#define MultibufferDefines /**/ -#endif -#endif - #ifndef ScreenSaverExtensionDefines #if BuildScreenSaverExt #define ScreenSaverExtensionDefines -DSCREENSAVER @@ -608,20 +538,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define ScreenSaverExtensionDefines /**/ #endif #endif -#ifndef VidModeExtensionDefines -#if BuildXF86VidModeExt -#define VidModeExtensionDefines -DXF86VIDMODE -#else -#define VidModeExtensionDefines /**/ -#endif -#endif -#ifndef XF86MiscExtensionDefines -#if BuildXF86MiscExt -#define XF86MiscExtensionDefines -DXF86MISC -#else -#define XF86MiscExtensionDefines /**/ -#endif -#endif #ifndef XF86BigfontExtensionDefines #if BuildXF86BigfontExt @@ -663,14 +579,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef AppgroupDefines -#if BuildAppgroup -#define AppgroupDefines -DXAPPGROUP -#else -#define AppgroupDefines /**/ -#endif -#endif - #ifndef XCSecurityDefines #if BuildXCSecurity #define XCSecurityDefines -DXCSECURITY @@ -679,14 +587,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef CupDefines -#if BuildCup -#define CupDefines -DTOGCUP -#else -#define CupDefines /**/ -#endif -#endif - #ifndef DPMSDefines #if BuildDPMS #define DPMSDefines -DDPMSExtension @@ -711,14 +611,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef FontCacheExtentionDefines -#if BuildFontCache -#define FontCacheExtensionDefines -DFONTCACHE -#else -#define FontCacheExtensionDefines /**/ -#endif -#endif - #ifndef XfixesDefines #if BuildXfixes #define XfixesDefines -DXFIXES @@ -743,14 +635,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef XevieDefines -#if BuildXevie -#define XevieDefines -DXEVIE -#else -#define XevieDefines /**/ -#endif -#endif - #ifndef RootlessDefines #if BuildRootless #define RootlessDefines -DROOTLESS @@ -764,12 +648,20 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef PervasiveExtensionDefines #define PervasiveExtensionDefines \ - ShapeDefines XInputDefines XkbDefines AppgroupDefines \ - XCSecurityDefines CupDefines PervasiveDBEDefines \ - XF86BigfontExtensionDefines DPMSDefines \ + PervasiveDBEDefines \ + ShapeDefines \ + XInputDefines \ + XkbDefines \ + XCSecurityDefines \ + XF86BigfontExtensionDefines \ + DPMSDefines \ + SitePervasiveExtensionDefines \ + RenderDefines \ + RandRDefines \ XineramaDefines \ - SitePervasiveExtensionDefines RenderDefines RandRDefines \ - XfixesDefines XDamageDefines CompositeDefines XevieDefines \ + XfixesDefines \ + XDamageDefines \ + CompositeDefines \ RootlessDefines #endif #ifndef SiteExtensionDefines @@ -777,12 +669,18 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef BaseExtensionDefines #define BaseExtensionDefines \ - MultibufferDefines MITMiscDefines XTestDefines XTrapDefines \ - XSyncDefines XCMiscDefines RECORDDefines \ - ShmDefines BigReqDefines VidModeExtensionDefines \ - XF86MiscExtensionDefines DBEDefines DPMSDefines EVIDefines \ - ScreenSaverExtensionDefines XvExtensionDefines XvMCExtensionDefines \ - GlxDefines FontCacheExtensionDefines SiteExtensionDefines \ + DBEDefines \ + XTestDefines \ + XSyncDefines \ + RECORDDefines \ + ShmDefines \ + BigReqDefines \ + DPMSDefines \ + ScreenSaverExtensionDefines \ + XvExtensionDefines \ + XvMCExtensionDefines \ + GlxDefines \ + SiteExtensionDefines \ XResExtensionDefines #endif #define ExtensionDefines BaseExtensionDefines ExtensionOSDefines diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index d1f930123..3ff1f5b7d 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -944,10 +944,6 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # endif #endif -#ifndef BuildDmx -#define BuildDmx YES -#endif - #include # include diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf index a6eaddc72..54ca00bc5 100644 --- a/nx-X11/config/cf/xorg.cf +++ b/nx-X11/config/cf/xorg.cf @@ -471,21 +471,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #endif #endif -/* - * Build the XFree86-VidMode extension - */ -#ifndef BuildXF86VidModeExt -# define BuildXF86VidModeExt YES -#endif - -/* Don't build this now because the interface hasn't been done yet */ -/* - * Build the XFree86-Misc extension - */ -#ifndef BuildXF86MiscExt -# define BuildXF86MiscExt YES -#endif - /* * Build the XFree86-Bigfont extension */ @@ -493,13 +478,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # define BuildXF86BigfontExt YES #endif -/* - * Build the XFree86 DGA support - */ -#ifndef BuildXF86DGA -# define BuildXF86DGA YES -#endif - /* * Build the DPMS extension support */ @@ -576,12 +554,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #define InstallJapaneseDocs NO #endif -#if BuildXF86DGA -# define XFree86DGADefines -DXFreeXDGA -#else -# define XFree86DGADefines /**/ -#endif - #if BuildXvExt # define XFree86XvDefines -DXvExtension #else @@ -643,9 +615,8 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 /* Server defines required for all OSs */ #ifndef XFree86ServerDefines # define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \ - XFree86DGADefines XFree86XvDefines \ + XFree86XvDefines \ XFree86LoaderDefines -DXFree86Server \ - VidModeExtensionDefines \ XFree86XvMCDefines \ SmartScheduleDefines \ DebugDefines XFree86XResDefines \ diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index eb7763535..9f03df68c 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -12,29 +12,13 @@ NULL = SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h #endif -#if BuildXF86MiscExt -XF86MISCHEADERS = xf86misc.h xf86mscstr.h -#endif #if BuildXF86BigfontExt XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfstr.h #endif -#if BuildXF86VidModeExt -XF86VIDMODEHEADERS = xf86vmode.h xf86vmstr.h -#endif -#if BuildXF86DGA -XF86DGAHEADERS = xf86dga.h xf86dgastr.h xf86dga1.h xf86dga1str.h -#endif -#if BuildXextLib -LBXHEADERS = XLbx.h lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h \ - lbxstr.h lbxzlib.h -#endif #if BuildXvExt XVHEADERS = Xv.h Xvlib.h Xvproto.h XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h vldXvMC.h #endif -#if BuildFontCache -FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h -#endif #if BuildXinerama XINERAMAHEADERS = panoramiXext.h panoramiXproto.h #endif @@ -53,58 +37,39 @@ COMPOSITEHEADERS = composite.h compositeproto.h #if BuildDamage DAMAGEHEADERS = damagewire.h damageproto.h #endif -#if BuildXTrap -XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ - xtraplibp.h xtrapproto.h -#endif #if BuildXResExt XRESHEADERS = XResproto.h #endif -#if BuildXevie -XEVIEHEADERS = Xevie.h Xeviestr.h -#endif EXTRAHEADERS = \ $(SCREENSAVERHEADERS) \ - $(XF86MISCHEADERS) \ - $(XF86BIGFONTHEADERS) \ - $(XF86VIDMODEHEADERS) \ - $(XF86DGAHEADERS) \ $(XINERAMAHEADERS) \ - $(LBXHEADERS) \ + $(XF86BIGFONTHEADERS) \ $(XVHEADERS) \ $(XVMCHEADERS) \ - $(FONTCACHEHEADERS) \ $(RANDRHEADERS) \ $(RENDERHEADERS) \ $(XFIXESHEADERS) \ $(COMPOSITEHEADERS) \ $(DAMAGEHEADERS) \ - $(XEVIEHEADERS) \ - $(XTRAPHEADERS) \ $(XRESHEADERS) \ $(NULL) HEADERS = Xext.h \ xcmiscstr.h \ - MITMisc.h mitmiscstr.h \ bigreqstr.h \ extutil.h \ XI.h XInput.h XIproto.h \ xtestconst.h xtestext1.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ - Xdbe.h Xdbeproto.h \ - Xag.h Xagstr.h Xagsrv.h \ + Xdbeproto.h \ XShm.h shmstr.h \ $(EXTRAHEADERS) \ - multibuf.h multibufst.h \ record.h recordstr.h \ security.h securstr.h \ shape.h shapestr.h \ sync.h syncstr.h \ - Xcup.h Xcupstr.h \ dpms.h dpmsstr.h \ - XEVI.h XEVIstr.h \ $(NULL) all:: @@ -120,9 +85,6 @@ InstallDriverSDKNonExecFile(XIproto.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(Xv.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(Xvproto.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(dpms.h,$(DRIVERSDKINCLUDEDIR)/extensions) -InstallDriverSDKNonExecFile(xf86dga1str.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(xf86dgastr.h,$(DRIVERSDKINCLUDEDIR)/extensions) -InstallDriverSDKNonExecFile(xf86misc.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(renderproto.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(Xv.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(XvMC.h,$(DRIVERSDKINCLUDEDIR)) diff --git a/nx-X11/include/extensions/MITMisc.h b/nx-X11/include/extensions/MITMisc.h deleted file mode 100644 index d66b8242d..000000000 --- a/nx-X11/include/extensions/MITMisc.h +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ - -#ifndef _XMITMISC_H_ -#define _XMITMISC_H_ - -#include - -#define X_MITSetBugMode 0 -#define X_MITGetBugMode 1 - -#define MITMiscNumberEvents 0 - -#define MITMiscNumberErrors 0 - -#ifndef _MITMISC_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XMITMiscQueryExtension( - Display* /* dpy */, - int* /* event_basep */, - int* /* error_basep */ -); - -Status XMITMiscSetBugMode( - Display* /* dpy */, - Bool /* onOff */ -); - -Bool XMITMiscGetBugMode( - Display* /* dpy */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/XEVI.h b/nx-X11/include/extensions/XEVI.h deleted file mode 100644 index 30b2412d9..000000000 --- a/nx-X11/include/extensions/XEVI.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifndef _XEVI_H_ -#define _XEVI_H_ -#include -#define X_EVIQueryVersion 0 -#define X_EVIGetVisualInfo 1 -#define XEVI_TRANSPARENCY_NONE 0 -#define XEVI_TRANSPARENCY_PIXEL 1 -#define XEVI_TRANSPARENCY_MASK 2 -#ifndef _XEVI_SERVER_ -typedef struct { - VisualID core_visual_id; - int screen; - int level; - unsigned int transparency_type; - unsigned int transparency_value; - unsigned int min_hw_colormaps; - unsigned int max_hw_colormaps; - unsigned int num_colormap_conflicts; - VisualID* colormap_conflicts; -} ExtendedVisualInfo; -_XFUNCPROTOBEGIN -Bool XeviQueryExtension( - Display* /* dpy */ -); -Status XeviQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); -Status XeviGetVisualInfo( - Display* /* dpy */, - VisualID* /* visual_query */, - int /* nVisual_query */, - ExtendedVisualInfo** /* extendedVisualInfo_return */, - int* /* nInfo_return */ -); -_XFUNCPROTOEND -#endif -#endif diff --git a/nx-X11/include/extensions/XEVIstr.h b/nx-X11/include/extensions/XEVIstr.h deleted file mode 100644 index 4deb6c113..000000000 --- a/nx-X11/include/extensions/XEVIstr.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifndef _EVISTR_H_ -#define _EVISTR_H_ - -#include - -#define VisualID CARD32 -#define EVINAME "Extended-Visual-Information" -#define XEVI_MAJOR_VERSION 1 /* current version numbers */ -#define XEVI_MINOR_VERSION 0 - -typedef CARD32 VisualID32; -#define sz_VisualID32 4 - -typedef struct _xExtendedVisualInfo { - VisualID core_visual_id B32; - INT8 screen; - INT8 level; - CARD8 transparency_type; - CARD8 pad0; - CARD32 transparency_value B32; - CARD8 min_hw_colormaps; - CARD8 max_hw_colormaps; - CARD16 num_colormap_conflicts B16; -} xExtendedVisualInfo; -#define sz_xExtendedVisualInfo 16 - -typedef struct _XEVIQueryVersion { - CARD8 reqType; /* always XEVIReqCode */ - CARD8 xeviReqType; /* always X_EVIQueryVersion */ - CARD16 length B16; -} xEVIQueryVersionReq; -#define sz_xEVIQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of EVI protocol */ - CARD16 minorVersion B16; /* minor version of EVI protocol */ - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xEVIQueryVersionReply; -#define sz_xEVIQueryVersionReply 32 - -typedef struct _XEVIGetVisualInfoReq { - CARD8 reqType; /* always XEVIReqCode */ - CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ - CARD16 length B16; - CARD32 n_visual B32; -} xEVIGetVisualInfoReq; -#define sz_xEVIGetVisualInfoReq 8 - -typedef struct _XEVIGetVisualInfoReply { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 n_info B32; - CARD32 n_conflicts B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xEVIGetVisualInfoReply; -#define sz_xEVIGetVisualInfoReply 32 - -#undef VisualID - -#endif /* _EVISTR_H_ */ diff --git a/nx-X11/include/extensions/XLbx.h b/nx-X11/include/extensions/XLbx.h deleted file mode 100644 index 6cd867944..000000000 --- a/nx-X11/include/extensions/XLbx.h +++ /dev/null @@ -1,155 +0,0 @@ -/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1992 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - */ -/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */ - -#ifndef _XLBX_H_ -#define _XLBX_H_ - -#include - -/* - * NOTE: any changes or additions to the opcodes needs to be reflected - * in the lbxCacheable array in Xserver/lbx/lbxmain.c - */ - -#define X_LbxQueryVersion 0 -#define X_LbxStartProxy 1 -#define X_LbxStopProxy 2 -#define X_LbxSwitch 3 -#define X_LbxNewClient 4 -#define X_LbxCloseClient 5 -#define X_LbxModifySequence 6 -#define X_LbxAllowMotion 7 -#define X_LbxIncrementPixel 8 -#define X_LbxDelta 9 -#define X_LbxGetModifierMapping 10 -#define X_LbxInvalidateTag 12 -#define X_LbxPolyPoint 13 -#define X_LbxPolyLine 14 -#define X_LbxPolySegment 15 -#define X_LbxPolyRectangle 16 -#define X_LbxPolyArc 17 -#define X_LbxFillPoly 18 -#define X_LbxPolyFillRectangle 19 -#define X_LbxPolyFillArc 20 -#define X_LbxGetKeyboardMapping 21 -#define X_LbxQueryFont 22 -#define X_LbxChangeProperty 23 -#define X_LbxGetProperty 24 -#define X_LbxTagData 25 - -#define X_LbxCopyArea 26 -#define X_LbxCopyPlane 27 -#define X_LbxPolyText8 28 -#define X_LbxPolyText16 29 -#define X_LbxImageText8 30 -#define X_LbxImageText16 31 - -#define X_LbxQueryExtension 32 -#define X_LbxPutImage 33 -#define X_LbxGetImage 34 - -#define X_LbxBeginLargeRequest 35 -#define X_LbxLargeRequestData 36 -#define X_LbxEndLargeRequest 37 - -#define X_LbxInternAtoms 38 -#define X_LbxGetWinAttrAndGeom 39 - -#define X_LbxGrabCmap 40 -#define X_LbxReleaseCmap 41 -#define X_LbxAllocColor 42 - -#define X_LbxSync 43 - -#define LbxNumberReqs 44 - - -#define LbxEvent 0 -#define LbxQuickMotionDeltaEvent 1 -#define LbxNumberEvents 2 - -/* This is always the master client */ -#define LbxMasterClientIndex 0 - -/* LbxEvent lbxType sub-fields */ -#define LbxSwitchEvent 0 -#define LbxCloseEvent 1 -#define LbxDeltaEvent 2 -#define LbxInvalidateTagEvent 3 -#define LbxSendTagDataEvent 4 -#define LbxListenToOne 5 -#define LbxListenToAll 6 -#define LbxMotionDeltaEvent 7 -#define LbxReleaseCmapEvent 8 -#define LbxFreeCellsEvent 9 - -/* - * Lbx image compression methods - * - * No compression is always assigned the value of 0. - * - * The rest of the compression method opcodes are assigned dynamically - * at option negotiation time. - */ - -#define LbxImageCompressNone 0 - - -#define BadLbxClient 0 -#define LbxNumberErrors (BadLbxClient + 1) - -/* tagged data types */ -#define LbxTagTypeModmap 1 -#define LbxTagTypeKeymap 2 -#define LbxTagTypeProperty 3 -#define LbxTagTypeFont 4 -#define LbxTagTypeConnInfo 5 - -#ifndef _XLBX_SERVER_ - -#include -#include - -_XFUNCPROTOBEGIN - -Bool XLbxQueryExtension( - Display* /* dpy */, - int* /* requestp */, - int* /* event_basep */, - int* /* error_basep */ -); - -Bool XLbxQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -int XLbxGetEventBase(Display *dpy); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/Xag.h b/nx-X11/include/extensions/Xag.h deleted file mode 100644 index 4c1193e3d..000000000 --- a/nx-X11/include/extensions/Xag.h +++ /dev/null @@ -1,114 +0,0 @@ -/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ -/* -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. -*/ -/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAG_H_ -#define _XAG_H_ - -#include - -#define X_XagQueryVersion 0 -#define X_XagCreate 1 -#define X_XagDestroy 2 -#define X_XagGetAttr 3 -#define X_XagQuery 4 -#define X_XagCreateAssoc 5 -#define X_XagDestroyAssoc 6 - -#define XagBadAppGroup 0 -#define XagNumberErrors (XagBadAppGroup + 1) - -#define XagNsingleScreen 7 -#define XagNdefaultRoot 1 -#define XagNrootVisual 2 -#define XagNdefaultColormap 3 -#define XagNblackPixel 4 -#define XagNwhitePixel 5 -#define XagNappGroupLeader 6 - -#ifndef _XAG_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -typedef XID XAppGroup; - -Bool XagQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -Status XagCreateEmbeddedApplicationGroup( - Display* /* dpy */, - VisualID /* root_visual */, - Colormap /* default_colormap */, - unsigned long /* black_pixel */, - unsigned long /* white_pixel */, - XAppGroup* /* app_group_return */ -); - -Status XagCreateNonembeddedApplicationGroup( - Display* /* dpy */, - XAppGroup* /* app_group_return */ -); - -Status XagDestroyApplicationGroup( - Display* /* dpy */, - XAppGroup /* app_group */ -); - -Status XagGetApplicationGroupAttributes( - Display* /* dpy */, - XAppGroup /* app_group */, - ... -); - -Status XagQueryApplicationGroup( - Display* /* dpy */, - XID /* resource_base */, - XAppGroup* /* app_group_ret */ -); - -Status XagCreateAssociation( - Display* /* dpy */, - Window* /* window_ret */, - void* /* system_window */ -); - -Status XagDestroyAssociation( - Display* /* dpy */, - Window /* window */ -); - -_XFUNCPROTOEND - -#endif /* _XAG_SERVER_ */ - -#endif /* _XAG_H_ */ - diff --git a/nx-X11/include/extensions/Xagsrv.h b/nx-X11/include/extensions/Xagsrv.h deleted file mode 100644 index daf1af04d..000000000 --- a/nx-X11/include/extensions/Xagsrv.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $XFree86: xc/include/extensions/Xagsrv.h,v 1.5 2003/07/16 01:38:24 dawes Exp $ */ -/* -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. -*/ -/* $Xorg: Xagsrv.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAGSRV_H_ -#define _XAGSRV_H_ - -#include - -_XFUNCPROTOBEGIN - -extern void XagConnectionInfo( - ClientPtr /* client */, - xConnSetupPrefix** /* conn_prefix */, - char** /* conn_info */, - int* /* num_screens */ -); - -extern VisualID XagRootVisual( - ClientPtr /* client */ -); - -extern Colormap XagDefaultColormap( - ClientPtr /* client */ -); - -extern ClientPtr XagLeader( - ClientPtr /* client */ -); - -extern void XagCallClientStateChange( - ClientPtr /* client */ -); - -extern Bool XagIsControlledRoot ( - ClientPtr /* client */, - WindowPtr /* pParent */ -); - -extern XID XagId ( - ClientPtr /* client */ -); - -extern void XagGetDeltaInfo ( - ClientPtr /* client */, - CARD32* /* buf */ -); - -_XFUNCPROTOEND - -#endif /* _XAGSRV_H_ */ - diff --git a/nx-X11/include/extensions/Xagstr.h b/nx-X11/include/extensions/Xagstr.h deleted file mode 100644 index 4f12027e0..000000000 --- a/nx-X11/include/extensions/Xagstr.h +++ /dev/null @@ -1,182 +0,0 @@ -/* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ -/* -Copyright 1996, 1998, 2001 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. -*/ -/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAGSTR_H_ /* { */ -#define _XAGSTR_H_ - -#include - -#define XAppGroup CARD32 - -#define XAGNAME "XC-APPGROUP" - -#define XAG_MAJOR_VERSION 1 /* current version numbers */ -#define XAG_MINOR_VERSION 0 - -#define XagWindowTypeX11 0 -#define XagWindowTypeMacintosh 1 -#define XagWindowTypeWin32 2 -#define XagWindowTypeWin16 3 - -/* -* Redefine some basic types used by structures defined herein. This allows -* both the library and server to view communicated data as 32-bit entities, -* thus preventing problems on 64-bit architectures where libXext sees this -* data as 64 bits and the server sees it as 32 bits. -*/ - -#define Colormap CARD32 -#define VisualID CARD32 -#define Window CARD32 - -typedef struct _XagQueryVersion { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagQueryVersion */ - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXagQueryVersionReq; -#define sz_xXagQueryVersionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXagQueryVersionReply; -#define sz_xXagQueryVersionReply 32 - -/* Set AppGroup Attributes masks */ -#define XagSingleScreenMask 1 << 0 -#define XagDefaultRootMask 1 << XagNdefaultRoot -#define XagRootVisualMask 1 << XagNrootVisual -#define XagDefaultColormapMask 1 << XagNdefaultColormap -#define XagBlackPixelMask 1 << XagNblackPixel -#define XagWhitePixelMask 1 << XagNwhitePixel -#define XagAppGroupLeaderMask 1 << XagNappGroupLeader - -typedef struct _XagCreate { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagCreate */ - CARD16 length B16; - XAppGroup app_group B32; - CARD32 attrib_mask B32; /* LISTofVALUE follows */ -} xXagCreateReq; -#define sz_xXagCreateReq 12 - -typedef struct _XagDestroy { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagDestroy */ - CARD16 length B16; - XAppGroup app_group B32; -} xXagDestroyReq; -#define sz_xXagDestroyReq 8 - -typedef struct _XagGetAttr { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagGetAttr */ - CARD16 length B16; - XAppGroup app_group B32; -} xXagGetAttrReq; -#define sz_xXagGetAttrReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - Window default_root B32; - VisualID root_visual B32; - Colormap default_colormap B32; - CARD32 black_pixel B32; - CARD32 white_pixel B32; - BOOL single_screen; - BOOL app_group_leader; - CARD16 pad2 B16; -} xXagGetAttrReply; -#define sz_xXagGetAttrReply 32 - -typedef struct _XagQuery { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagQuery */ - CARD16 length B16; - CARD32 resource B32; -} xXagQueryReq; -#define sz_xXagQueryReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - XAppGroup app_group B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXagQueryReply; -#define sz_xXagQueryReply 32 - -typedef struct _XagCreateAssoc { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagCreateAssoc */ - CARD16 length B16; - Window window B32; - CARD16 window_type B16; - CARD16 system_window_len B16; /* LISTofCARD8 follows */ -} xXagCreateAssocReq; -#define sz_xXagCreateAssocReq 12 - -typedef struct _XagDestroyAssoc { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagDestroyAssoc */ - CARD16 length B16; - Window window B32; -} xXagDestroyAssocReq; -#define sz_xXagDestroyAssocReq 8 - -#undef XAppGroup -/* - * Cancel the previous redefinition of the basic types, thus restoring their - * X.h definitions. - */ - -#undef Window -#undef Colormap -#undef VisualID - -#endif /* } _XAGSTR_H_ */ - diff --git a/nx-X11/include/extensions/Xcup.h b/nx-X11/include/extensions/Xcup.h deleted file mode 100644 index fb5fd0887..000000000 --- a/nx-X11/include/extensions/Xcup.h +++ /dev/null @@ -1,69 +0,0 @@ -/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ -/* - -Copyright 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86$ */ - -#ifndef _XCUP_H_ -#define _XCUP_H_ - -#include - -#define X_XcupQueryVersion 0 -#define X_XcupGetReservedColormapEntries 1 -#define X_XcupStoreColors 2 - -#define XcupNumberErrors 0 - -#ifndef _XCUP_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XcupQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -Status XcupGetReservedColormapEntries( - Display* /* dpy */, - int /* screen */, - XColor** /* colors_out */, - int* /* ncolors */ -); - -Status XcupStoreColors( - Display* /* dpy */, - Colormap /* colormap */, - XColor* /* colors */, - int /* ncolors */ -); - -_XFUNCPROTOEND - -#endif /* _XCUP_SERVER_ */ - -#endif /* _XCUP_H_ */ - diff --git a/nx-X11/include/extensions/Xcupstr.h b/nx-X11/include/extensions/Xcupstr.h deleted file mode 100644 index fa77b5aea..000000000 --- a/nx-X11/include/extensions/Xcupstr.h +++ /dev/null @@ -1,109 +0,0 @@ -/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -/* - -Copyright 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef _XCUPSTR_H_ /* { */ -#define _XCUPSTR_H_ - -#include - -#define XCUPNAME "TOG-CUP" - -#define XCUP_MAJOR_VERSION 1 /* current version numbers */ -#define XCUP_MINOR_VERSION 0 - -typedef struct _XcupQueryVersion { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupQueryVersion */ - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXcupQueryVersionReq; -#define sz_xXcupQueryVersionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXcupQueryVersionReply; -#define sz_xXcupQueryVersionReply 32 - -typedef struct _XcupGetReservedColormapEntries { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */ - CARD16 length B16; - CARD32 screen B32; -} xXcupGetReservedColormapEntriesReq; -#define sz_xXcupGetReservedColormapEntriesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXcupGetReservedColormapEntriesReply; -#define sz_xXcupGetReservedColormapEntriesReply 32 - -typedef struct _XcupStoreColors { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupStoreColors */ - CARD16 length B16; - CARD32 cmap B32; -} xXcupStoreColorsReq; -#define sz_xXcupStoreColorsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXcupStoreColorsReply; -#define sz_xXcupStoreColorsReply 32 - -#endif /* } _XCUPSTR_H_ */ - diff --git a/nx-X11/include/extensions/Xdbe.h b/nx-X11/include/extensions/Xdbe.h deleted file mode 100644 index bc43007c6..000000000 --- a/nx-X11/include/extensions/Xdbe.h +++ /dev/null @@ -1,136 +0,0 @@ -/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/****************************************************************************** - * - * Copyright (c) 1994, 1995 Hewlett-Packard Company - * - * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard - * Company 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 Hewlett-Packard Company. - * - * Header file for Xlib-related DBE - * - *****************************************************************************/ -/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef XDBE_H -#define XDBE_H - - -/* INCLUDES */ - -#include -#include - - -/* DEFINES */ - -/* Errors */ -#define XdbeBadBuffer 0 - - -/* TYPEDEFS */ - -typedef Drawable XdbeBackBuffer; - -typedef unsigned char XdbeSwapAction; - -typedef struct -{ - Window swap_window; /* window for which to swap buffers */ - XdbeSwapAction swap_action; /* swap action to use for swap_window */ -} -XdbeSwapInfo; - -typedef struct -{ - Window window; /* window that buffer belongs to */ -} -XdbeBackBufferAttributes; - -typedef struct -{ - int type; - Display *display; /* display the event was read from */ - XdbeBackBuffer buffer; /* resource id */ - unsigned long serial; /* serial number of failed request */ - unsigned char error_code; /* error base + XdbeBadBuffer */ - unsigned char request_code; /* major opcode of failed request */ - unsigned char minor_code; /* minor opcode of failed request */ -} -XdbeBufferError; - -/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops - * (for non-C++ builds) in X11/Xfuncproto.h. - */ -_XFUNCPROTOBEGIN - -extern Status XdbeQueryExtension( - Display* /* dpy */, - int* /* major_version_return */, - int* /* minor_version_return */ -); - -extern XdbeBackBuffer XdbeAllocateBackBufferName( - Display* /* dpy */, - Window /* window */, - XdbeSwapAction /* swap_action */ -); - -extern Status XdbeDeallocateBackBufferName( - Display* /* dpy */, - XdbeBackBuffer /* buffer */ -); - -extern Status XdbeSwapBuffers( - Display* /* dpy */, - XdbeSwapInfo* /* swap_info */, - int /* num_windows */ -); - -extern Status XdbeBeginIdiom( - Display* /* dpy */ -); - -extern Status XdbeEndIdiom( - Display* /* dpy */ -); - -extern XdbeScreenVisualInfo *XdbeGetVisualInfo( - Display* /* dpy */, - Drawable* /* screen_specifiers */, - int* /* num_screens */ -); - -extern void XdbeFreeVisualInfo( - XdbeScreenVisualInfo* /* visual_info */ -); - -extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( - Display* /* dpy */, - XdbeBackBuffer /* buffer */ -); - -_XFUNCPROTOEND - -#endif /* XDBE_H */ - diff --git a/nx-X11/include/extensions/Xevie.h b/nx-X11/include/extensions/Xevie.h deleted file mode 100644 index 5dc48bbfd..000000000 --- a/nx-X11/include/extensions/Xevie.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xevie.h,v 1.3 2005/05/22 01:20:14 alanc Exp $ */ -/************************************************************ - -Copyright 2003 Sun Microsystems, Inc. - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ - -#ifndef _XEVIE_H_ -#define _XEVIE_H_ - -#include - -#define XEVIE_UNMODIFIED 0 -#define XEVIE_MODIFIED 1 - -#ifndef _XEVIE_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XevieQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -extern Status XevieStart( - Display* /* dpy */ -); - -Status XevieEnd( - Display* /* dpy */ -); - -Status XevieSendEvent( - Display* /* dpy */, - XEvent* /* event */, - int /* data type */ -); - -Status XevieSelectInput( - Display* /* dpy */, - long -); - - -_XFUNCPROTOEND - -#endif /* _XEVIE_SERVER_ */ - -#endif /* _XEVIE_H_ */ - diff --git a/nx-X11/include/extensions/Xeviestr.h b/nx-X11/include/extensions/Xeviestr.h deleted file mode 100644 index 5f2c9b49f..000000000 --- a/nx-X11/include/extensions/Xeviestr.h +++ /dev/null @@ -1,165 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xeviestr.h,v 1.3 2005/05/22 01:20:14 alanc Exp $ */ -/************************************************************ - -Copyright 2003 Sun Microsystems, Inc. - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ - -#ifndef _XEVIESTR_H_ -#define _XEVIESTR_H_ - -#define XEVIENAME "XEVIE" - -#define XEVIE_MAJOR_VERSION 1 -#define XEVIE_MINOR_VERSION 0 - -#define X_XevieQueryVersion 0 -#define X_XevieStart 1 -#define X_XevieEnd 2 -#define X_XevieSend 3 -#define X_XevieSelectInput 4 - -#define XevieNumberErrors 0 - -typedef struct _XevieQueryVersion { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXevieQueryVersionReq; -#define sz_xXevieQueryVersionReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXevieQueryVersionReply; -#define sz_xXevieQueryVersionReply 32 - -typedef struct _XevieStart { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 screen B32; -} xXevieStartReq; -#define sz_xXevieStartReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieStartReply; -#define sz_xXevieStartReply 32 - -typedef struct _XevieEnd { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 cmap B32; -} xXevieEndReq; -#define sz_xXevieEndReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieEndReply; -#define sz_xXevieEndReply 32 - -typedef struct _XevieSend { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - xEvent event; - CARD32 dataType B32; -} xXevieSendReq; -#define sz_xXevieSendReq 104 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieSendReply; -#define sz_xXevieSendReply 32 - -typedef struct _XevieSelectInput { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 event_mask B32; -} xXevieSelectInputReq; -#define sz_xXevieSelectInputReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieSelectInputReply; -#define sz_xXevieSelectInputReply 32 - -#endif /* } _XEVIESTR_H_ */ - diff --git a/nx-X11/include/extensions/Xinerama.h b/nx-X11/include/extensions/Xinerama.h deleted file mode 100644 index 77e7e7444..000000000 --- a/nx-X11/include/extensions/Xinerama.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xinerama.h,v 1.3 2004/12/01 19:03:46 daniels Exp $ */ -/* - -Copyright 2003 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/include/extensions/Xinerama.h,v 3.3 2002/09/16 18:05:19 eich Exp $ */ - -#ifndef _Xinerama_h -#define _Xinerama_h - -#include - -typedef struct { - int screen_number; - short x_org; - short y_org; - short width; - short height; -} XineramaScreenInfo; - -_XFUNCPROTOBEGIN - -Bool XineramaQueryExtension ( - Display *dpy, - int *event_base, - int *error_base -); - -Status XineramaQueryVersion( - Display *dpy, - int *major_versionp, - int *minor_versionp -); - -Bool XineramaIsActive(Display *dpy); - - -/* - Returns the number of heads and a pointer to an array of - structures describing the position and size of the individual - heads. Returns NULL and number = 0 if Xinerama is not active. - - Returned array should be freed with XFree(). -*/ - -XineramaScreenInfo * -XineramaQueryScreens( - Display *dpy, - int *number -); - -_XFUNCPROTOEND - -#endif /* _Xinerama_h */ - diff --git a/nx-X11/include/extensions/fontcache.h b/nx-X11/include/extensions/fontcache.h deleted file mode 100644 index 2a3cf619b..000000000 --- a/nx-X11/include/extensions/fontcache.h +++ /dev/null @@ -1,106 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $ - */ -/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _EXT_FONTCACHE_H_ -#define _EXT_FONTCACHE_H_ - -#define X_FontCacheQueryVersion 0 -#define X_FontCacheGetCacheSettings 1 -#define X_FontCacheChangeCacheSettings 2 -#define X_FontCacheGetCacheStatistics 3 - -#define FontCacheNumberEvents 0 - -#define FontCacheBadProtocol 0 -#define FontCacheCannotAllocMemory 1 -#define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1) - -typedef struct { - long himark; - long lowmark; - long balance; -} FontCacheSettings, *FontCacheSettingsPtr; - -struct cacheinfo { - long hits; - long misshits; - long purged; - long usage; -}; - -typedef struct { - long purge_runs; - long purge_stat; - long balance; - struct cacheinfo f; - struct cacheinfo v; -} FontCacheStatistics, *FontCacheStatisticsPtr; - -#ifndef _FONTCACHE_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -Bool FontCacheQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool FontCacheQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Status FontCacheGetCacheSettings( - Display* /* dpy */, - FontCacheSettings* /* cache info */ -); - -Status FontCacheChangeCacheSettings( - Display* /* dpy */, - FontCacheSettings* /* cache info */ -); - -Status FontCacheGetCacheStatistics( - Display* /* dpy */, - FontCacheStatistics* /* cache statistics info */ -); - -_XFUNCPROTOEND - -#endif /* !_FONTCACHE_SERVER_ */ - -#endif /* _EXT_FONTCACHE_H_ */ diff --git a/nx-X11/include/extensions/fontcacheP.h b/nx-X11/include/extensions/fontcacheP.h deleted file mode 100644 index 5363ef149..000000000 --- a/nx-X11/include/extensions/fontcacheP.h +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $ - */ -/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */ - -#ifndef _FONTCACHEP_H_ -#define _FONTCACHEP_H_ - -#include - -int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */); - -#endif /* _FONTCACHEP_H_ */ diff --git a/nx-X11/include/extensions/fontcachstr.h b/nx-X11/include/extensions/fontcachstr.h deleted file mode 100644 index abead0f2b..000000000 --- a/nx-X11/include/extensions/fontcachstr.h +++ /dev/null @@ -1,130 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $ - */ -/* $XFree86$ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _FONTCACHESTR_H_ -#define _FONTCACHESTR_H_ - -#include - -#define FONTCACHENAME "FontCache" - -#define FONTCACHE_MAJOR_VERSION 0 /* current version numbers */ -#define FONTCACHE_MINOR_VERSION 1 - -typedef struct _FontCacheQueryVersion { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheQueryVersion */ - CARD16 length B16; -} xFontCacheQueryVersionReq; -#define sz_xFontCacheQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of Font-Cache */ - CARD16 minorVersion B16; /* minor version of Font-Cache */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xFontCacheQueryVersionReply; -#define sz_xFontCacheQueryVersionReply 32 - -typedef struct _FontCacheGetCacheSettings { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheGetCacheSettings */ - CARD16 length B16; -} xFontCacheGetCacheSettingsReq; -#define sz_xFontCacheGetCacheSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 himark B32; - CARD32 lowmark B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 reserve1 B32; - CARD32 reserve2 B32; -} xFontCacheGetCacheSettingsReply; -#define sz_xFontCacheGetCacheSettingsReply 32 - -typedef struct _FontCacheChangeCacheSettings { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheChangeCacheSettings */ - CARD16 length B16; - CARD32 himark B32; - CARD32 lowmark B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 reserve1 B32; - CARD32 reserve2 B32; - CARD32 reserve3 B32; -} xFontCacheChangeCacheSettingsReq; -#define sz_xFontCacheChangeCacheSettingsReq 32 - -typedef struct _FontCacheGetCacheStatistics { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheGetCacheStatistics */ - CARD16 length B16; -} xFontCacheGetCacheStatisticsReq; -#define sz_xFontCacheGetCacheStatisticsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 purge_runs B32; - CARD32 purge_stat B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 f_hits B32; - CARD32 f_misshits B32; - CARD32 f_purged B32; - CARD32 f_usage B32; - CARD32 f_reserve0 B32; - CARD32 v_hits B32; - CARD32 v_misshits B32; - CARD32 v_purged B32; - CARD32 v_usage B32; - CARD32 v_reserve0 B32; -} xFontCacheGetCacheStatisticsReply; -#define sz_xFontCacheGetCacheStatisticsReply 64 - -#endif /* _FONTCACHESTR_H_ */ diff --git a/nx-X11/include/extensions/lbxbuf.h b/nx-X11/include/extensions/lbxbuf.h deleted file mode 100644 index 1a5a7475a..000000000 --- a/nx-X11/include/extensions/lbxbuf.h +++ /dev/null @@ -1,51 +0,0 @@ -/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, - * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND - * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - */ - -#ifndef _BUFFER_H_ -#define _BUFFER_H_ - -#define INBUFFER_SIZE (1 << 13) /* 8K */ -#define OUTBUFFER_SIZE (1 << 12) /* 4K */ - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -typedef struct _zlibbuffer *ZlibBufferPtr; - -#include - -_XFUNCPROTOBEGIN - -extern int InitZlibBuffer(ZlibBufferPtr b, int size); -extern void FreeZlibBuffer(ZlibBufferPtr b); -extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen); - -_XFUNCPROTOEND - -#endif /* _BUFFER_H_ */ diff --git a/nx-X11/include/extensions/lbxbufstr.h b/nx-X11/include/extensions/lbxbufstr.h deleted file mode 100644 index d99730e7e..000000000 --- a/nx-X11/include/extensions/lbxbufstr.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, - * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND - * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - */ -/* $XFree86$ */ - -#ifndef _BUFFERSTR_H_ -#define _BUFFERSTR_H_ - -#include - -/* - * ZLIB Input/Output buffer - */ -typedef struct _zlibbuffer { - char *bufbase; - char *bufend; - char *bufptr; - int bufcnt; -} ZlibBuffer; - -#define BYTES_AVAIL(inbuf, len) \ - (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL) - -#endif /* _BUFFERSTR_H_ */ diff --git a/nx-X11/include/extensions/lbxdeltastr.h b/nx-X11/include/extensions/lbxdeltastr.h deleted file mode 100644 index a8e4cb3b0..000000000 --- a/nx-X11/include/extensions/lbxdeltastr.h +++ /dev/null @@ -1,105 +0,0 @@ -/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1993 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - */ - -#ifndef LBX_DELTA_STRUCT_H -#define LBX_DELTA_STRUCT_H - -#define MIN_CACHEABLE_LEN 8 - -#define DELTA_CACHEABLE(pcache, len) \ - ((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize) - -/* - * An entry in the delta compactor cache - */ -typedef struct _LBXDeltaElem { - int length; - unsigned char *buf; -} LBXDeltaElemRec, *LBXDeltaElemPtr; - - -/* - * Delta compactor cache - */ -typedef struct _LBXDeltas { - unsigned short nDeltas; - unsigned short maxDeltasize; - LBXDeltaElemPtr deltas; - unsigned short nextDelta; - unsigned short activeDeltas; /* only needed for outgoing */ -} LBXDeltasRec, *LBXDeltasPtr; - - -/* - * Motion delta cache - */ - -typedef struct { - BYTE swapped; - BYTE detail; - CARD16 sequenceNumber B16; - Time time B32; - Window root B32, event B32, child B32; - INT16 rootX B16, rootY B16, eventX B16, eventY B16; - KeyButMask state B16; - BOOL sameScreen; -} lbxMotionCache; - - -/* - * Motion delta events - */ - -typedef struct { - BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */ - CARD8 deltaTime; - INT8 deltaX; - INT8 deltaY; -} lbxQuickMotionDeltaEvent; -#define sz_lbxQuickMotionDeltaEvent 4 - -typedef struct { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxMotionDeltaEvent */ - INT8 deltaX; - INT8 deltaY; - CARD16 deltaTime B16; - CARD16 deltaSequence B16; -} lbxMotionDeltaEvent; -#define sz_lbxMotionDeltaEvent 8 - -extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas, - int maxDeltasize ); -extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache ); -extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen, int maxdiff, int *pindex ); -extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg, - int ndiff, int index, unsigned char *buf ); -extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas, - int ndiff, int index, unsigned char **buf ); -extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen ); -extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen ); - -#endif /* LBX_DELTA_STRUCT_H */ diff --git a/nx-X11/include/extensions/lbximage.h b/nx-X11/include/extensions/lbximage.h deleted file mode 100644 index fff181a69..000000000 --- a/nx-X11/include/extensions/lbximage.h +++ /dev/null @@ -1,151 +0,0 @@ -/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -/****************************************************************************** - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -******************************************************************************/ -/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */ - -#ifndef _LBX_IMAGE_H_ -#define _LBX_IMAGE_H_ - -#include - -_XFUNCPROTOBEGIN - -typedef struct _LbxBitmapCompMethod { - - char *methodName; - int inited; - int methodOpCode; /* to be filled on reply from server */ - - int (*compInit)( - void - ); - - int (*compFunc)( - unsigned char * /* inbuf */, - unsigned char * /* outbuf */, - int /* outbufSize */, - int /* image_bytes */, - int /* pixels_per_line */, - int /* padded_bytes_per_scanline */, - int /* reverse_bits */, - int * /* bytesCompressed */ - ); - - int (*decompFunc)( - unsigned char * /* inbuf */, - unsigned char * /* outbuf */, - int /* image_bytes */, - int /* pixels_per_line */, - int /* padded_bytes_per_scanline */, - int /* reverse_bits */ - ); - -} LbxBitmapCompMethod; - - -#define LBX_MAX_DEPTHS 5 - -typedef struct _LbxPixmapCompMethod { - - char *methodName; - unsigned formatMask; - int depthCount; - int depths[LBX_MAX_DEPTHS]; - int inited; - int methodOpCode; /* to be filled on reply from server */ - - int (*compInit)( - void - ); - - int (*compFunc)( - char * /* inbuf */, - char * /* outbuf */, - int /* outbufSize */, - int /* format */, - int /* depth */, - int /* num_scan_lines */, - int /* scan_line_size */, - int * /* bytesCompressed */ - ); - - int (*decompFunc)( - char * /* inbuf */, - char * /* outbuf */, - int /* num_scan_lines */, - int /* scan_line_size */ - ); - -} LbxPixmapCompMethod; - - -extern int LbxImageEncodePackBits ( -char * /* inbuf */, -char * /* outbuf */, -int /* outbufSize */, -int /* format */, -int /* depth */, -int /* num_scan_lines */, -int /* scan_line_size */, -int * /* bytesCompressed */ -); - -extern int LbxImageEncodeFaxG42D ( -unsigned char * /* inbuf */, -unsigned char * /* outbuf */, -int /* outbufSize */, -int /* image_bytes */, -int /* pixels_per_line */, -int /* padded_bytes_per_scanline */, -int /* reverse_bits */, -int * /* bytesCompressed */ -); - -extern int LbxImageDecodePackBits ( -char * /* inbuf */, -char * /* outbuf */, -int /* num_scan_lines */, -int /* scan_line_size */ -); - -extern int LbxImageDecodeFaxG42D ( -unsigned char * /* inbuf */, -unsigned char * /* outbuf */, -int /* image_bytes */, -int /* pixels_per_line */, -int /* padded_bytes_per_scanline */, -int /* reverse_bits */ -); - -_XFUNCPROTOEND - -#define LBX_IMAGE_COMPRESS_SUCCESS 0 -#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1 -#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2 -#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3 - -#endif /* _LBX_IMAGE_H_ */ diff --git a/nx-X11/include/extensions/lbxopts.h b/nx-X11/include/extensions/lbxopts.h deleted file mode 100644 index 3ec81fcb2..000000000 --- a/nx-X11/include/extensions/lbxopts.h +++ /dev/null @@ -1,133 +0,0 @@ -/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1994 Network Computing Devices, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, - * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF - * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ -/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ - -#ifndef _LBX_OPTS_H_ -#define _LBX_OPTS_H_ - -/* - * Negotiable configuration options - */ -#define LBX_OPT_DELTA_PROXY 0 -#define LBX_OPT_DELTA_SERVER 1 -#define LBX_OPT_STREAM_COMP 2 -#define LBX_OPT_BITMAP_COMP 3 -#define LBX_OPT_PIXMAP_COMP 4 -#define LBX_OPT_MSG_COMP 5 /* aka "squishing" */ -#define LBX_OPT_USE_TAGS 6 -#define LBX_OPT_CMAP_ALL 7 -#define LBX_OPT_EXTENSION 255 - -/* - * Length fields are encoded in 1 or 3 bytes - */ -#define LBX_OPT_SMALLLEN_SIZE 1 -#define LBX_OPT_BIGLEN_SIZE 3 -#define LBX_OPT_BIGLEN_MIN 256 - -#define LBX_OPT_DECODE_LEN(p, len, size) \ - if ((p)[0]) { \ - (len) = (p)[0]; \ - (size) = LBX_OPT_SMALLLEN_SIZE; \ - } \ - else { \ - (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \ - (size) = LBX_OPT_BIGLEN_SIZE; \ - } - -/* - * Option header lengths - */ -#define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE) -#define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE) - -/* - * Delta compression parameters - */ -#define LBX_OPT_DELTA_REQLEN 6 -#define LBX_OPT_DELTA_REPLYLEN 2 -#define LBX_OPT_DELTA_NCACHE_DFLT 16 -#define LBX_OPT_DELTA_MSGLEN_MIN 32 -#define LBX_OPT_DELTA_MSGLEN_DFLT 64 - - -/* - * Stream compression opts - */ - -#include - -#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) - -struct iovec { - caddr_t iov_base; - int iov_len; -}; - -#else -#ifndef Lynx -#include -#else -#include -#endif -#endif - -typedef void *LbxStreamCompHandle; - -typedef struct _LbxStreamOpts { - LbxStreamCompHandle (*streamCompInit)(int fd, void * arg); - void * streamCompArg; - int (*streamCompStuffInput)( - int fd, - unsigned char *buf, - int buflen - ); - int (*streamCompInputAvail)( - int fd - ); - int (*streamCompFlush)( - int fd - ); - int (*streamCompRead)( - int fd, - unsigned char *buf, - int buflen - ); - int (*streamCompWriteV)( - int fd, - struct iovec *iov, - int iovcnt - ); - void (*streamCompOn)( - int fd - ); - void (*streamCompOff)( - int fd - ); - void (*streamCompFreeHandle)( - LbxStreamCompHandle handle - ); -} LbxStreamOpts; - -#endif /* _LBX_OPTS_H_ */ diff --git a/nx-X11/include/extensions/lbxstr.h b/nx-X11/include/extensions/lbxstr.h deleted file mode 100644 index 7bde5a766..000000000 --- a/nx-X11/include/extensions/lbxstr.h +++ /dev/null @@ -1,931 +0,0 @@ -/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */ -/* - * Copyright 1992 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - */ -/* $XFree86: xc/include/extensions/lbxstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef _LBXSTR_H_ -#define _LBXSTR_H_ - -#include - -#define LBXNAME "LBX" - -#define LBX_MAJOR_VERSION 1 -#define LBX_MINOR_VERSION 0 - -/* - * Redefine some basic types used by structures defined herein. This removes - * any possibility on 64-bit architectures of one entity viewing communicated - * data as 32-bit quantities and another entity viewing the same data as 64-bit - * quantities. - */ -#define XID CARD32 -#define Atom CARD32 -#define Colormap CARD32 -#define Drawable CARD32 -#define VisualID CARD32 -#define Window CARD32 - -typedef struct { - BOOL success; /* TRUE */ - BOOL changeType; - CARD16 majorVersion B16, - minorVersion B16; - CARD16 length B16; /* 1/4 additional bytes in setup info */ - CARD32 tag B32; -} xLbxConnSetupPrefix; - -typedef struct _LbxQueryVersion { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryVersion */ - CARD16 length B16; -} xLbxQueryVersionReq; -#define sz_xLbxQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of LBX protocol */ - CARD16 minorVersion B16; /* minor version of LBX protocol */ - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxQueryVersionReply; -#define sz_xLbxQueryVersionReply 32 - -typedef struct _LbxStartProxy { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxStartProxy */ - CARD16 length B16; -} xLbxStartProxyReq; -#define sz_xLbxStartProxyReq 4 - -typedef struct _LbxStopProxy { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxStopProxy */ - CARD16 length B16; -} xLbxStopProxyReq; -#define sz_xLbxStopProxyReq 4 - -typedef struct _LbxSwitch { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxSwitch */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxSwitchReq; -#define sz_xLbxSwitchReq 8 - -typedef struct _LbxNewClient { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxNewClient */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxNewClientReq; -#define sz_xLbxNewClientReq 8 - -typedef struct _LbxCloseClient { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxCloseClient */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxCloseClientReq; -#define sz_xLbxCloseClientReq 8 - -typedef struct _LbxModifySequence { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxModifySequence */ - CARD16 length B16; - CARD32 adjust B32; -} xLbxModifySequenceReq; -#define sz_xLbxModifySequenceReq 8 - -typedef struct _LbxAllowMotion { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxAllowMotion */ - CARD16 length B16; - CARD32 num B32; -} xLbxAllowMotionReq; -#define sz_xLbxAllowMotionReq 8 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGrabCmap */ - CARD16 length B16; - Colormap cmap B32; -} xLbxGrabCmapReq; -#define sz_xLbxGrabCmapReq 8 - -#define LBX_SMART_GRAB 0x80 -#define LBX_AUTO_RELEASE 0x40 -#define LBX_3CHANNELS 0x20 -#define LBX_2BYTE_PIXELS 0x10 -#define LBX_RGB_BITS_MASK 0x0f - -#define LBX_LIST_END 0 -#define LBX_PIXEL_PRIVATE 1 -#define LBX_PIXEL_SHARED 2 -#define LBX_PIXEL_RANGE_PRIVATE 3 -#define LBX_PIXEL_RANGE_SHARED 4 -#define LBX_NEXT_CHANNEL 5 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 flags; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B16; -} xLbxGrabCmapReply; -#define sz_xLbxGrabCmapReply 32 -#define sz_xLbxGrabCmapReplyHdr 8 - - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxReleaseCmap */ - CARD16 length B16; - Colormap cmap B32; -} xLbxReleaseCmapReq; -#define sz_xLbxReleaseCmapReq 8 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxAllocColor */ - CARD16 length B16; - Colormap cmap B32; - CARD32 pixel B32; - CARD16 red B16, green B16, blue B16; - CARD16 pad B16; -} xLbxAllocColorReq; -#define sz_xLbxAllocColorReq 20 - -typedef struct _LbxIncrementPixel { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxIncrementPixel */ - CARD16 length B16; - CARD32 cmap B32; - CARD32 pixel B32; -} xLbxIncrementPixelReq; -#define sz_xLbxIncrementPixelReq 12 - -typedef struct _LbxDelta { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxDelta */ - CARD16 length B16; - CARD8 diffs; /* number of diffs */ - CARD8 cindex; /* cache index */ - /* list of diffs follows */ -} xLbxDeltaReq; -#define sz_xLbxDeltaReq 6 - -typedef struct _LbxGetModifierMapping { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetModifierMapping */ - CARD16 length B16; -} xLbxGetModifierMappingReq; -#define sz_xLbxGetModifierMappingReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 keyspermod; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxGetModifierMappingReply; -#define sz_xLbxGetModifierMappingReply 32 - -typedef struct _LbxGetKeyboardMapping { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */ - CARD16 length B16; - KeyCode firstKeyCode; - CARD8 count; - CARD16 pad1 B16; -} xLbxGetKeyboardMappingReq; -#define sz_xLbxGetKeyboardMappingReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 keysperkeycode; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxGetKeyboardMappingReply; -#define sz_xLbxGetKeyboardMappingReply 32 - -typedef struct _LbxQueryFont { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryFont */ - CARD16 length B16; - CARD32 fid B32; -} xLbxQueryFontReq; -#define sz_xLbxQueryFontReq 8 - -typedef struct _LbxInternAtoms { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxInternAtoms */ - CARD16 length B16; - CARD16 num B16; -} xLbxInternAtomsReq; -#define sz_xLbxInternAtomsReq 6 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 atomsStart B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxInternAtomsReply; -#define sz_xLbxInternAtomsReply 32 -#define sz_xLbxInternAtomsReplyHdr 8 - - -typedef struct _LbxGetWinAttrAndGeom { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */ - CARD16 length B16; - CARD32 id B32; /* window id */ -} xLbxGetWinAttrAndGeomReq; -#define sz_xLbxGetWinAttrAndGeomReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 backingStore; - CARD16 sequenceNumber B16; - CARD32 length B32; /* NOT 0; this is an extra-large reply */ - VisualID visualID B32; -#if defined(__cplusplus) || defined(c_plusplus) - CARD16 c_class B16; -#else - CARD16 class B16; -#endif - CARD8 bitGravity; - CARD8 winGravity; - CARD32 backingBitPlanes B32; - CARD32 backingPixel B32; - BOOL saveUnder; - BOOL mapInstalled; - CARD8 mapState; - BOOL override; - Colormap colormap B32; - CARD32 allEventMasks B32; - CARD32 yourEventMask B32; - CARD16 doNotPropagateMask B16; - CARD16 pad1 B16; - Window root B32; - INT16 x B16, y B16; - CARD16 width B16, height B16; - CARD16 borderWidth B16; - CARD8 depth; - CARD8 pad2; -} xLbxGetWinAttrAndGeomReply; -#define sz_xLbxGetWinAttrAndGeomReply 60 - - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxSync */ - CARD16 length B16; -} xLbxSyncReq; -#define sz_xLbxSyncReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxSyncReply; -#define sz_xLbxSyncReply 32 - - -/* an LBX squished charinfo packs the data in a CARD32 as follows */ -#define LBX_WIDTH_SHIFT 26 -#define LBX_LEFT_SHIFT 20 -#define LBX_RIGHT_SHIFT 13 -#define LBX_ASCENT_SHIFT 7 -#define LBX_DESCENT_SHIFT 0 - -#define LBX_WIDTH_BITS 6 -#define LBX_LEFT_BITS 6 -#define LBX_RIGHT_BITS 7 -#define LBX_ASCENT_BITS 6 -#define LBX_DESCENT_BITS 7 - -#define LBX_WIDTH_MASK 0xfc000000 -#define LBX_LEFT_MASK 0x03f00000 -#define LBX_RIGHT_MASK 0x000fe000 -#define LBX_ASCENT_MASK 0x00001f80 -#define LBX_DESCENT_MASK 0x0000007f - -#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1))) - -typedef struct { - CARD32 metrics B32; -} xLbxCharInfo; - -/* note that this is identical to xQueryFontReply except for missing - * first 2 words - */ -typedef struct { - xCharInfo minBounds; -/* XXX do we need to leave this gunk? */ - CARD32 walign1 B32; - xCharInfo maxBounds; - CARD32 walign2 B32; - CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; - CARD16 defaultChar B16; - CARD16 nFontProps B16; /* followed by this many xFontProp structures */ - CARD8 drawDirection; - CARD8 minByte1, maxByte1; - BOOL allCharsExist; - INT16 fontAscent B16, fontDescent B16; - CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */ -} xLbxFontInfo; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 compression; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - /* X_QueryFont sticks much of the data in the base reply packet, - * but we hope that it won't be needed, (and it won't fit in 32 bytes - * with the tag anyways) - * - * if any additional data is needed, its sent in a xLbxFontInfo - */ -} xLbxQueryFontReply; -#define sz_xLbxQueryFontReply 32 - -typedef struct _LbxChangeProperty { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxChangeProperty */ - CARD16 length B16; - Window window B32; - Atom property B32; - Atom type B32; - CARD8 format; - CARD8 mode; - BYTE pad[2]; - CARD32 nUnits B32; -} xLbxChangePropertyReq; -#define sz_xLbxChangePropertyReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxChangePropertyReply; -#define sz_xLbxChangePropertyReply 32 - -typedef struct _LbxGetProperty { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetProperty */ - CARD16 length B16; - Window window B32; - Atom property B32; - Atom type B32; - CARD8 delete; - BYTE pad[3]; - CARD32 longOffset B32; - CARD32 longLength B32; -} xLbxGetPropertyReq; -#define sz_xLbxGetPropertyReq 28 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 format; - CARD16 sequenceNumber B16; - CARD32 length B32; - Atom propertyType B32; - CARD32 bytesAfter B32; - CARD32 nItems B32; - CARD32 tag B32; - CARD32 pad1 B32; - CARD32 pad2 B32; -} xLbxGetPropertyReply; -#define sz_xLbxGetPropertyReply 32 - -typedef struct _LbxTagData { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxTagData */ - CARD16 length B16; - XID tag B32; - CARD32 real_length B32; - /* data */ -} xLbxTagDataReq; -#define sz_xLbxTagDataReq 12 - -typedef struct _LbxInvalidateTag { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxInvalidateTag */ - CARD16 length B16; - CARD32 tag B32; -} xLbxInvalidateTagReq; -#define sz_xLbxInvalidateTagReq 8 - -typedef struct _LbxPutImage { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxPutImage */ - CARD16 length B16; - CARD8 compressionMethod; - CARD8 cacheEnts; - CARD8 bitPacked; - /* rest is variable */ -} xLbxPutImageReq; -#define sz_xLbxPutImageReq 7 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetImage */ - CARD16 length B16; - Drawable drawable B32; - INT16 x B16, y B16; - CARD16 width B16, height B16; - CARD32 planeMask B32; - CARD8 format; - CARD8 pad1; - CARD16 pad2 B16; -} xLbxGetImageReq; - -#define sz_xLbxGetImageReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 depth; - CARD16 sequenceNumber B16; - CARD32 lbxLength B32; - CARD32 xLength B32; - VisualID visual B32; - CARD8 compressionMethod; - CARD8 pad1; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxGetImageReply; - -#define sz_xLbxGetImageReply 32 - -/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment, - LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */ - -#define GFX_CACHE_SIZE 15 - -#define GFXdCacheEnt(e) ((e) & 0xf) -#define GFXgCacheEnt(e) (((e) >> 4) & 0xf) -#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4)) - -#define GFXCacheNone 0xf - -typedef struct _LbxPolyPoint { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - CARD8 padBytes; -} xLbxPolyPointReq; - -#define sz_xLbxPolyPointReq 6 - -typedef xLbxPolyPointReq xLbxPolyLineReq; -typedef xLbxPolyPointReq xLbxPolySegmentReq; -typedef xLbxPolyPointReq xLbxPolyRectangleReq; -typedef xLbxPolyPointReq xLbxPolyArcReq; -typedef xLbxPolyPointReq xLbxPolyFillRectangleReq; -typedef xLbxPolyPointReq xLbxPolyFillArcReq; - -#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq -#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq -#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq -#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq -#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq -#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq - -typedef struct _LbxFillPoly { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - BYTE shape; - CARD8 padBytes; -} xLbxFillPolyReq; -#define sz_xLbxFillPolyReq 7 - -typedef struct _LbxCopyArea { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 srcCache; /* source drawable */ - CARD8 cacheEnts; /* dest drawable and gc */ - /* followed by encoded src x, src y, dst x, dst y, width, height */ -} xLbxCopyAreaReq; - -#define sz_xLbxCopyAreaReq 6 - -typedef struct _LbxCopyPlane { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD32 bitPlane B32; - CARD8 srcCache; /* source drawable */ - CARD8 cacheEnts; /* dest drawable and gc */ - /* followed by encoded src x, src y, dst x, dst y, width, height */ -} xLbxCopyPlaneReq; - -#define sz_xLbxCopyPlaneReq 10 - -typedef struct _LbxPolyText { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - /* followed by encoded src x, src y coordinates and text elts */ -} xLbxPolyTextReq; - -#define sz_xLbxPolyTextReq 5 - -typedef xLbxPolyTextReq xLbxPolyText8Req; -typedef xLbxPolyTextReq xLbxPolyText16Req; - -#define sz_xLbxPolyTextReq 5 -#define sz_xLbxPolyText8Req 5 -#define sz_xLbxPolyText16Req 5 - -typedef struct _LbxImageText { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - CARD8 nChars; - /* followed by encoded src x, src y coordinates and string */ -} xLbxImageTextReq; - -typedef xLbxImageTextReq xLbxImageText8Req; -typedef xLbxImageTextReq xLbxImageText16Req; - -#define sz_xLbxImageTextReq 6 -#define sz_xLbxImageText8Req 6 -#define sz_xLbxImageText16Req 6 - -typedef struct { - CARD8 offset; - CARD8 diff; -} xLbxDiffItem; -#define sz_xLbxDiffItem 2 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 nOpts; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 optDataStart B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxStartReply; -#define sz_xLbxStartReply 32 -#define sz_xLbxStartReplyHdr 8 - -typedef struct _LbxQueryExtension { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryExtension */ - CARD16 length B16; - CARD32 nbytes B32; -} xLbxQueryExtensionReq; -#define sz_xLbxQueryExtensionReq 8 - -typedef struct _LbxQueryExtensionReply { - BYTE type; /* X_Reply */ - CARD8 numReqs; - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL present; - CARD8 major_opcode; - CARD8 first_event; - CARD8 first_error; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - - /* reply & event generating requests */ -} xLbxQueryExtensionReply; -#define sz_xLbxQueryExtensionReply 32 - - -typedef struct _LbxBeginLargeRequest { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */ - CARD16 length B16; - CARD32 largeReqLength B32; -} xLbxBeginLargeRequestReq; -#define sz_BeginLargeRequestReq 8 - -typedef struct _LbxLargeRequestData { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxLargeRequestData */ - CARD16 length B16; - /* followed by LISTofCARD8 data */ -} xLbxLargeRequestDataReq; -#define sz_LargeRequestDataReq 4 - -typedef struct _LbxEndLargeRequest { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxEndLargeRequest */ - CARD16 length B16; -} xLbxEndLargeRequestReq; -#define sz_EndLargeRequestReq 4 - - - -typedef struct _LbxSwitchEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxSwitchEvent */ - CARD16 pad B16; - CARD32 client B32; -} xLbxSwitchEvent; -#define sz_xLbxSwitchEvent 8 - -typedef struct _LbxCloseEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxCloseEvent */ - CARD16 sequenceNumber B16; - CARD32 client B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxCloseEvent; -#define sz_xLbxCloseEvent 32 - -typedef struct _LbxInvalidateTagEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxInvalidateTagEvent */ - CARD16 sequenceNumber B16; - CARD32 tag B32; - CARD32 tagType B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxInvalidateTagEvent; -#define sz_xLbxInvalidateTagEvent 32 - -typedef struct _LbxSendTagDataEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxSendTagDataEvent */ - CARD16 sequenceNumber B16; - CARD32 tag B32; - CARD32 tagType B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxSendTagDataEvent; -#define sz_xLbxSendTagDataEvent 32 - -typedef struct _LbxListenToOneEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxListenToOneEvent */ - CARD16 sequenceNumber B16; - CARD32 client B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxListenToOneEvent; -#define sz_xLbxListenToOneEvent 32 - -typedef struct _LbxListenToAllEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxListenToAllEvent */ - CARD16 sequenceNumber B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xLbxListenToAllEvent; -#define sz_xLbxListenToOneEvent 32 - -typedef struct _LbxReleaseCmapEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxReleaseCmapEvent */ - CARD16 sequenceNumber B16; - Colormap colormap B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxReleaseCmapEvent; -#define sz_xLbxReleaseCmapEvent 32 - - -typedef struct _LbxFreeCellsEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxFreeCellsEvent */ - CARD16 sequenceNumber B16; - Colormap colormap B32; - CARD32 pixelStart B32; - CARD32 pixelEnd B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxFreeCellsEvent; -#define sz_xLbxFreeCellsEvent 32 - - -/* - * squished X event sizes. If these change, be sure to update lbxquish.c - * and unsquish.c appropriately - * - * lbxsz_* is the padded squished length - * lbxupsz_* is the unpadded squished length - */ - -#define lbxsz_KeyButtonEvent 32 -#define lbxupsz_KeyButtonEvent 31 - -#define lbxsz_EnterLeaveEvent 32 -#define lbxupsz_EnterLeaveEvent 32 - -#define lbxsz_FocusEvent 12 -#define lbxupsz_FocusEvent 9 - -#define lbxsz_KeymapEvent 32 -#define lbxupsz_KeymapEvent 32 - -#define lbxsz_ExposeEvent 20 -#define lbxupsz_ExposeEvent 18 - -#define lbxsz_GfxExposeEvent 24 -#define lbxupsz_GfxExposeEvent 21 - -#define lbxsz_NoExposeEvent 12 -#define lbxupsz_NoExposeEvent 11 - -#define lbxsz_VisibilityEvent 12 -#define lbxupsz_VisibilityEvent 9 - -#define lbxsz_CreateNotifyEvent 24 -#define lbxupsz_CreateNotifyEvent 23 - -#define lbxsz_DestroyNotifyEvent 12 -#define lbxupsz_DestroyNotifyEvent 12 - -#define lbxsz_UnmapNotifyEvent 16 -#define lbxupsz_UnmapNotifyEvent 13 - -#define lbxsz_MapNotifyEvent 16 -#define lbxupsz_MapNotifyEvent 13 - -#define lbxsz_MapRequestEvent 12 -#define lbxupsz_MapRequestEvent 12 - -#define lbxsz_ReparentEvent 24 -#define lbxupsz_ReparentEvent 21 - -#define lbxsz_ConfigureNotifyEvent 28 -#define lbxupsz_ConfigureNotifyEvent 27 - -#define lbxsz_ConfigureRequestEvent 28 -#define lbxupsz_ConfigureRequestEvent 28 - -#define lbxsz_GravityEvent 16 -#define lbxupsz_GravityEvent 16 - -#define lbxsz_ResizeRequestEvent 12 -#define lbxupsz_ResizeRequestEvent 12 - -#define lbxsz_CirculateEvent 20 -#define lbxupsz_CirculateEvent 17 - -#define lbxsz_PropertyEvent 20 -#define lbxupsz_PropertyEvent 17 - -#define lbxsz_SelectionClearEvent 16 -#define lbxupsz_SelectionClearEvent 16 - -#define lbxsz_SelectionRequestEvent 28 -#define lbxupsz_SelectionRequestEvent 28 - -#define lbxsz_SelectionNotifyEvent 24 -#define lbxupsz_SelectionNotifyEvent 24 - -#define lbxsz_ColormapEvent 16 -#define lbxupsz_ColormapEvent 14 - -#define lbxsz_MappingNotifyEvent 8 -#define lbxupsz_MappingNotifyEvent 7 - -#define lbxsz_ClientMessageEvent 32 -#define lbxupsz_ClientMessageEvent 32 - -#define lbxsz_UnknownEvent 32 - -#ifdef DEBUG - -#define DBG_SWITCH 0x00000001 -#define DBG_CLOSE 0x00000002 -#define DBG_IO 0x00000004 -#define DBG_READ_REQ 0x00000008 -#define DBG_LEN 0x00000010 -#define DBG_BLOCK 0x00000020 -#define DBG_CLIENT 0x00000040 -#define DBG_DELTA 0x00000080 - -extern int lbxDebug; - -#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else -#else -#define DBG(n,m) -#endif - -/* - * Cancel the previous redefinition of the basic types, thus restoring their - * X.h definitions. - */ - -#undef XID -#undef Atom -#undef Colormap -#undef Drawable -#undef VisualID -#undef Window - -#endif /* _LBXSTR_H_ */ diff --git a/nx-X11/include/extensions/lbxzlib.h b/nx-X11/include/extensions/lbxzlib.h deleted file mode 100644 index dc21837a1..000000000 --- a/nx-X11/include/extensions/lbxzlib.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1993 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - * Author: Dale Tonogai, Network Computing Devices - */ - -#ifndef _ZLIB_H_ -#define _ZLIB_H_ - -#define ZLIB_STRCOMP_OPT "XC-ZLIB" -#define ZLIB_STRCOMP_OPT_LEN 7 - -#define ZLIB_PACKET_HDRLEN 2 -#define ZLIB_MAX_DATALEN 0xfff -#define ZLIB_MAX_PLAIN 270 -#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1) - -#define ZLIB_COMPRESS_FLAG 0x80 -#define ZLIB_DATALEN_MASK 0x0f - -#define ZLIB_PUT_PKTHDR(p, len, compflag) \ - { \ - (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\ - (p)[1] = (len) & 0xff; \ - } - -#define ZLIB_GET_DATALEN(p) \ - ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1]) - -#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG) - -struct ZlibInfo; - -extern void * ZlibInit ( int fd, int level ); -extern void ZlibFree ( struct ZlibInfo *comp ); -extern int ZlibFlush ( int fd ); -extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen ); -extern void ZlibCompressOn ( int fd ); -extern void ZlibCompressOff ( int fd ); -extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen ); -extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt ); -extern int ZlibRead ( int fd, unsigned char *buffer, int buflen ); -extern int ZlibInputAvail ( int fd ); - - -#endif /* _ZLIB_H_ */ diff --git a/nx-X11/include/extensions/mitmiscstr.h b/nx-X11/include/extensions/mitmiscstr.h deleted file mode 100644 index 32cae2635..000000000 --- a/nx-X11/include/extensions/mitmiscstr.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $XFree86$ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _MITMISCSTR_H_ -#define _MITMISCSTR_H_ - -#include "MITMisc.h" - -#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD" - -typedef struct _SetBugMode { - CARD8 reqType; /* always MITReqCode */ - CARD8 mitReqType; /* always X_MITSetBugMode */ - CARD16 length B16; - BOOL onOff; - BYTE pad0; - CARD16 pad1; -} xMITSetBugModeReq; -#define sz_xMITSetBugModeReq 8 - -typedef struct _GetBugMode { - CARD8 reqType; /* always MITReqCode */ - CARD8 mitReqType; /* always X_MITGetBugMode */ - CARD16 length B16; -} xMITGetBugModeReq; -#define sz_xMITGetBugModeReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL onOff; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xMITGetBugModeReply; -#define sz_xMITGetBugModeReply 32 - -#endif /* _MITMISCSTR_H_ */ diff --git a/nx-X11/include/extensions/multibuf.h b/nx-X11/include/extensions/multibuf.h deleted file mode 100644 index c35399b01..000000000 --- a/nx-X11/include/extensions/multibuf.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - */ - -/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _MULTIBUF_H_ -#define _MULTIBUF_H_ - -#include - -#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" - -#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */ -#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */ - -#define X_MbufGetBufferVersion 0 -#define X_MbufCreateImageBuffers 1 -#define X_MbufDestroyImageBuffers 2 -#define X_MbufDisplayImageBuffers 3 -#define X_MbufSetMBufferAttributes 4 -#define X_MbufGetMBufferAttributes 5 -#define X_MbufSetBufferAttributes 6 -#define X_MbufGetBufferAttributes 7 -#define X_MbufGetBufferInfo 8 -#define X_MbufCreateStereoWindow 9 -#define X_MbufClearImageBufferArea 10 - -/* - * update_action field - */ -#define MultibufferUpdateActionUndefined 0 -#define MultibufferUpdateActionBackground 1 -#define MultibufferUpdateActionUntouched 2 -#define MultibufferUpdateActionCopied 3 - -/* - * update_hint field - */ -#define MultibufferUpdateHintFrequent 0 -#define MultibufferUpdateHintIntermittent 1 -#define MultibufferUpdateHintStatic 2 - -/* - * valuemask fields - */ -#define MultibufferWindowUpdateHint (1L << 0) -#define MultibufferBufferEventMask (1L << 0) - -/* - * mono vs. stereo and left vs. right - */ -#define MultibufferModeMono 0 -#define MultibufferModeStereo 1 -#define MultibufferSideMono 0 -#define MultibufferSideLeft 1 -#define MultibufferSideRight 2 - -/* - * clobber state - */ -#define MultibufferUnclobbered 0 -#define MultibufferPartiallyClobbered 1 -#define MultibufferFullyClobbered 2 - -/* - * event stuff - */ -#define MultibufferClobberNotifyMask 0x02000000 -#define MultibufferUpdateNotifyMask 0x04000000 - -#define MultibufferClobberNotify 0 -#define MultibufferUpdateNotify 1 -#define MultibufferNumberEvents (MultibufferUpdateNotify + 1) - -#define MultibufferBadBuffer 0 -#define MultibufferNumberErrors (MultibufferBadBuffer + 1) - - -#ifndef _MULTIBUF_SERVER_ -/* - * Extra definitions that will only be needed in the client - */ -typedef XID Multibuffer; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - int send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Multibuffer buffer; /* buffer of event */ - int state; /* see Clobbered constants above */ -} XmbufClobberNotifyEvent; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - int send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Multibuffer buffer; /* buffer of event */ -} XmbufUpdateNotifyEvent; - - -/* - * per-window attributes that can be got - */ -typedef struct { - int displayed_index; /* which buffer is being displayed */ - int update_action; /* Undefined, Background, Untouched, Copied */ - int update_hint; /* Frequent, Intermittent, Static */ - int window_mode; /* Mono, Stereo */ - int nbuffers; /* Number of buffers */ - Multibuffer *buffers; /* Buffers */ -} XmbufWindowAttributes; - -/* - * per-window attributes that can be set - */ -typedef struct { - int update_hint; /* Frequent, Intermittent, Static */ -} XmbufSetWindowAttributes; - - -/* - * per-buffer attributes that can be got - */ -typedef struct { - Window window; /* which window this belongs to */ - unsigned long event_mask; /* events that have been selected */ - int buffer_index; /* which buffer is this */ - int side; /* Mono, Left, Right */ -} XmbufBufferAttributes; - -/* - * per-buffer attributes that can be set - */ -typedef struct { - unsigned long event_mask; /* events that have been selected */ -} XmbufSetBufferAttributes; - - -/* - * per-screen buffer info (there will be lists of them) - */ -typedef struct { - VisualID visualid; /* visual usuable at this depth */ - int max_buffers; /* most buffers for this visual */ - int depth; /* depth of buffers to be created */ -} XmbufBufferInfo; - -_XFUNCPROTOBEGIN - -extern Bool XmbufQueryExtension( - Display* /* dpy */, - int* /* event_base_return */, - int* /* error_base_return */ -); - -extern Status XmbufGetVersion( - Display* /* dpy */, - int* /* major_version_return */, - int* /* minor_version_return */ -); - -extern int XmbufCreateBuffers( - Display* /* dpy */, - Window /* w */, - int /* count */, - int /* update_action */, - int /* update_hint */, - Multibuffer* /* buffers */ -); - -extern void XmbufDestroyBuffers( - Display* /* dpy */, - Window /* window */ -); - -extern void XmbufDisplayBuffers( - Display* /* dpy */, - int /* count */, - Multibuffer* /* buffers */, - int /* min_delay */, - int /* max_delay */ -); - -extern Status XmbufGetWindowAttributes( - Display* /* dpy */, - Window /* w */, - XmbufWindowAttributes* /* attr */ -); - -extern void XmbufChangeWindowAttributes( - Display* /* dpy */, - Window /* w */, - unsigned long /* valuemask */, - XmbufSetWindowAttributes* /* attr */ -); - -extern Status XmbufGetBufferAttributes( - Display* /* dpy */, - Multibuffer /* b */, - XmbufBufferAttributes* /* attr */ -); - -extern void XmbufChangeBufferAttributes( - Display* /* dpy */, - Multibuffer /* b */, - unsigned long /* valuemask */, - XmbufSetBufferAttributes* /* attr */ -); - -extern Status XmbufGetScreenInfo( - Display* /* dpy */, - Drawable /* d */, - int* /* nmono_return */, - XmbufBufferInfo** /* mono_info_return */, - int* /* nstereo_return */, - XmbufBufferInfo** /* stereo_info_return */ -); - -extern Window XmbufCreateStereoWindow( - Display* /* dpy */, - Window /* parent */, - int /* x */, - int /* y */, - unsigned int /* width */, - unsigned int /* height */, - unsigned int /* border_width */, - int /* depth */, - unsigned int /* class */, - Visual* /* visual */, - unsigned long /* valuemask */, - XSetWindowAttributes* /* attr */, - Multibuffer* /* leftp */, - Multibuffer* /* rightp */ -); - -extern void XmbufClearBufferArea( - Display* /* dpy */, - Multibuffer /* buffer */, - int /* x */, - int /* y */, - unsigned int /* width */, - unsigned int /* height */, - Bool /* exposures */ -); - -_XFUNCPROTOEND - -#else - -#include "scrnintstr.h" - -typedef Bool (* mbInitFunc)(); - -struct _mbufScreen; /* declared in multibufst.h */ - -extern void RegisterMultibufferInit( - ScreenPtr /* pScreen */, - Bool (* /* bufMultibufferInit */)( - ScreenPtr /* pScreen */, - struct _mbufScreen * /* pMBScreen */ - ) -); - -struct xMbufBufferInfo; /* declared in multibufst.h */ - -extern void RegisterDoubleBufferHardware( - ScreenPtr /* pScreen */, - int /* nInfo */, - struct xMbufBufferInfo * /* pInfo */, - DevUnion * /* frameBuffer */, - DevUnion /* selectPlane */, - void (* /* CopyBufferBitsFunc */ )(), - void (* /* DrawSelectPlaneFunc */ )() -); - -extern int CreateImageBuffers ( - WindowPtr /* pWin */, - int /* nbuf */, - XID * /* ids */, - int /* action */, - int /* hint */ -); -extern void DestroyImageBuffers ( - WindowPtr /* pWin */ -); -extern int DisplayImageBuffers ( - XID * /* ids */, - int /* nbuf */ -); - -#endif /* _MULTIBUF_SERVER_ */ -#endif /* _MULTIBUF_H_ */ diff --git a/nx-X11/include/extensions/multibufst.h b/nx-X11/include/extensions/multibufst.h deleted file mode 100644 index 8469a16db..000000000 --- a/nx-X11/include/extensions/multibufst.h +++ /dev/null @@ -1,609 +0,0 @@ -/* - * $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - */ - -/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */ - -#ifndef _MULTIBUFST_H_ -#define _MULTIBUFST_H_ - -/* - * Protocol requests constants and alignment values - */ - -#include "multibuf.h" -#ifdef _MULTIBUF_SERVER_ -#include "inputstr.h" -#endif - -#if !defined(UNIXCPP) || defined(ANSICPP) -#define MbufGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->mbufReqType = X_##name; -#else -#define MbufGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->mbufReqType = X_/**/name; -#endif - -#define Window CARD32 -#define Drawable CARD32 -#define VisualID CARD32 -#define Multibuffer CARD32 - -typedef struct xMbufBufferInfo { - CARD32 visualID B32; /* associated visual */ - CARD16 maxBuffers B16; /* maximum supported buffers */ - CARD8 depth; /* depth of visual (redundant) */ - CARD8 unused; -} xMbufBufferInfo; -#define sz_xMbufBufferInfo 8 - -typedef struct { - BYTE type; - BYTE unused; - CARD16 sequenceNumber B16; - CARD32 buffer B32; /* affected buffer */ - BYTE state; /* current status */ - CARD8 unused1; - CARD16 unused2 B16; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; - CARD32 unused7 B32; -} xMbufClobberNotifyEvent; - -typedef struct { - BYTE type; - BYTE unused; - CARD16 sequenceNumber B16; - CARD32 buffer B32; /* affected buffer */ - CARD32 timeStamp B32; /* update time */ - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; -} xMbufUpdateNotifyEvent; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ - CARD16 length B16; -} xMbufGetBufferVersionReq; -#define sz_xMbufGetBufferVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 majorVersion; /* major version of Multi-Buffering protocol */ - CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xMbufGetBufferVersionReply; -#define sz_xMbufGetBufferVersionReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */ - CARD16 length B16; - CARD32 window B32; /* associated window */ - CARD8 updateAction; /* action at update */ - CARD8 updateHint; /* hint as to frequency of updates */ - CARD16 unused; -} xMbufCreateImageBuffersReq; /* followed by buffer ids */ -#define sz_xMbufCreateImageBuffersReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 numberBuffer B16; /* number successfully allocated */ - CARD16 unused1 B16; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; -} xMbufCreateImageBuffersReply; -#define sz_xMbufCreateImageBuffersReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */ - CARD16 length B16; - CARD32 window B32; /* associated window */ -} xMbufDestroyImageBuffersReq; -#define sz_xMbufDestroyImageBuffersReq 8 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */ - CARD16 length B16; - CARD16 minDelay B16; /* minimum time between last update and now */ - CARD16 maxDelay B16; /* maximum time between last update and now */ -} xMbufDisplayImageBuffersReq; /* followed by list of buffers */ -#define sz_xMbufDisplayImageBuffersReq 8 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */ - CARD16 length B16; - CARD32 window B32; /* associated window */ - CARD32 valueMask B32; /* modified entries */ -} xMbufSetMBufferAttributesReq; /* followed by values */ -#define sz_xMbufSetMBufferAttributesReq 12 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */ - CARD16 length B16; - CARD32 window B32; /* associated window */ -} xMbufGetMBufferAttributesReq; -#define sz_xMbufGetMBufferAttributesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 displayedBuffer B16; /* currently visible buffer */ - CARD8 updateAction; - CARD8 updateHint; - CARD8 windowMode; - CARD8 unused0; - CARD16 unused1 B16; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; -} xMbufGetMBufferAttributesReply; -#define sz_xMbufGetMBufferAttributesReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */ - CARD16 length B16; - CARD32 buffer B32; - CARD32 valueMask B32; -} xMbufSetBufferAttributesReq; /* followed by values */ -#define sz_xMbufSetBufferAttributesReq 12 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */ - CARD16 length B16; - CARD32 buffer B32; -} xMbufGetBufferAttributesReq; -#define sz_xMbufGetBufferAttributesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 window B32; - CARD32 eventMask B32; - CARD16 bufferIndex B16; - CARD8 side; - CARD8 unused0; - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; -} xMbufGetBufferAttributesReply; -#define sz_xMbufGetBufferAttributesReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferInfo */ - CARD16 length B16; - Drawable drawable B32; -} xMbufGetBufferInfoReq; -#define sz_xMbufGetBufferInfoReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 normalInfo B16; - CARD16 stereoInfo B16; - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; -} xMbufGetBufferInfoReply; /* followed by buffer infos */ -#define sz_xMbufGetBufferInfoReply 32 - - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */ - CARD16 length B16; - CARD8 unused0; - CARD8 unused1; - CARD8 unused2; - CARD8 depth; - Window wid B32; - Window parent B32; - Multibuffer left B32; /* associated buffers */ - Multibuffer right B32; - INT16 x B16; - INT16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD16 borderWidth B16; -#if defined(__cplusplus) || defined(c_plusplus) - CARD16 c_class B16; -#else - CARD16 class B16; -#endif - VisualID visual B32; - CARD32 mask B32; -} xMbufCreateStereoWindowReq; /* followed by value list */ -#define sz_xMbufCreateStereoWindowReq 44 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */ - CARD16 length B16; - Multibuffer buffer B32; - INT16 x B16; - INT16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD8 unused0; - CARD8 unused1; - CARD8 unused2; - BOOL exposures; -} xMbufClearImageBufferAreaReq; -#define sz_xMbufClearImageBufferAreaReq 20 - -#undef Window -#undef Drawable -#undef VisualID -#undef Multibuffer - - -#ifdef _MULTIBUF_SERVER_ -/* Macros for wrapping and unwrapping functions */ - -#define SWAP_FUNC_VECTOR(pSTRUCT1,pSTRUCT2,DATA_TYPE,FUNC_NAME) \ -{ \ - DATA_TYPE (* tmpFn)(); \ - \ - tmpFn = pSTRUCT1->FUNC_NAME; \ - pSTRUCT1->FUNC_NAME = pSTRUCT2->FUNC_NAME; \ - pSTRUCT2->FUNC_NAME = tmpFn; \ -} - -#if !defined(UNIXCPP) || defined(ANSICPP) -#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ -{ \ - if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \ - { \ - pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ - pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ - pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ - } \ -} - -#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped &= ~(FUNC_NAME##Mask); \ -} - -#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ - { \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ - } \ -} -#else -#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ -{ \ - if ((pPRIV->funcsWrapped & FUNC_NAME/**/Mask) == 0) \ - { \ - pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ - pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ - pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ - } \ -} - -#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped &= ~(FUNC_NAME/**/Mask); \ -} - -#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ - { \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ - } \ -} -#endif - -/* The _Multibuffer and _Multibuffers structures below refer to each other, - * so we need this forward declaration - */ -typedef struct _Multibuffers *MultibuffersPtr; - -/* - * per-Multibuffer data - */ - -typedef struct _Multibuffer { - MultibuffersPtr pMultibuffers; /* associated window data */ - Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */ - Mask otherEventMask; /* mask of all other clients event masks */ - OtherClients *otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* always Mono */ - int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */ - PixmapPtr pPixmap; /* associated pixmap */ -} MultibufferRec, *MultibufferPtr; - -/* - * per-window data - */ - -typedef struct _Multibuffers { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - int refcnt; /* ref count for delete */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - - TimeStamp lastUpdate; /* time of last update */ - - unsigned short width, height; /* last known window size */ - short x, y; /* for static gravity */ - - MultibufferPtr buffers; /* array of numMultibuffer buffers */ -} MultibuffersRec; - -/* - * per-screen data - */ -typedef struct _MultibufferScreen { - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ -} MultibufferScreenRec, *MultibufferScreenPtr; - -/* - * per display-image-buffers request data. - */ - -typedef struct _DisplayRequest { - struct _DisplayRequest *next; - TimeStamp activateTime; - ClientPtr pClient; - XID id; -} DisplayRequestRec, *DisplayRequestPtr; - -#define DestroyWindowMask (1L<<0) -#define PositionWindowMask (1L<<1) -#define PostValidateTreeMask (1L<<2) -#define ClipNotifyMask (1L<<3) -#define WindowExposuresMask (1L<<4) -#define CopyWindowMask (1L<<5) -#define ClearToBackgroundMask (1L<<6) -#define ChangeWindowAttributesMask (1L<<7) - -extern int MultibufferScreenIndex; -extern int MultibufferWindowIndex; - -extern RESTYPE MultibufferDrawableResType; - -extern void MultibufferUpdate( /* pMbuffer, time */ - MultibufferPtr /* pMultibuffer */, - CARD32 /* time */ - ); -extern void MultibufferExpose( /* pMbuffer, pRegion */ - MultibufferPtr /* pMultibuffer */, - RegionPtr /* pRegion */ - ); -extern void MultibufferClobber( /* pMbuffer */ - MultibufferPtr /* pMultibuffer */ - ); - -typedef struct _mbufWindow *mbufWindowPtr; - -/* - * per-buffer data - */ - -#define MB_DISPLAYED_BUFFER(pMBWindow) \ - ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer) - -typedef struct _mbufBuffer { - mbufWindowPtr pMBWindow; /* associated window data */ - Mask eventMask; /* client event mask */ - Mask otherEventMask; /* union of other clients' event masks */ - OtherClientsPtr otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* stero side: always Mono */ - int clobber; /* clober state */ - DrawablePtr pDrawable; /* associated drawable */ -} mbufBufferRec, *mbufBufferPtr; - - -/* - * per-window data - */ - -#define MB_WINDOW_PRIV(pWin) \ - ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr)) - -typedef struct _mbufWindow { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, - Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - TimeStamp lastUpdate; /* time of last update */ - short x, y; /* for static gravity */ - unsigned short width, height; /* last known window size */ - DevUnion devPrivate; -} mbufWindowRec; - - -/* - * per-screen data - */ - -#define MB_SCREEN_PRIV(pScreen) \ - ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr)) - -typedef struct _mbufScreen { - long mbufWindowCount; /* count of multibuffered windows */ - - /* Wrap pScreen->DestroyWindow */ - DestroyWindowProcPtr DestroyWindow; - long funcsWrapped; /* flags which functions are wrapped */ - - /* Initialized by device-dependent section */ - int nInfo; /* number of buffer info rec's */ - xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */ - - int (* CreateImageBuffers)( - WindowPtr /* pWin */, - int /* nbuf */, - XID * /* ids */, - int /* action */, - int /* hint */ - ); - void (* DestroyImageBuffers)( - WindowPtr /* pWin */ - ); - void (* DisplayImageBuffers)( - ScreenPtr /* pScreen */, - mbufBufferPtr * /* ppMBBuffer */, - mbufWindowPtr * /* ppMBWindow */, - int /* nbuf */ - ); - void (* ClearImageBufferArea)( - mbufBufferPtr /* pMBBuffer */, - short /* x */, - short /* y */, - unsigned short /* width */, - unsigned short /* height */, - Bool /* exposures */ - ); - Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */ - /* FIXME */ - ); - Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */ - /* FIXME */ - ); - void (* DeleteBufferDrawable)( - DrawablePtr /* pDrawable */ - ); - void (* WrapScreenFuncs)( - ScreenPtr /* pScreen */ - ); - void (* ResetProc)( - ScreenPtr /* pScreen */ - ); - DevUnion devPrivate; -} mbufScreenRec, *mbufScreenPtr; - - -/* Privates to mbufScreenRec */ - -#ifdef _MULTIBUF_PIXMAP_ -#define MB_SCREEN_PRIV_PIXMAP(pScreen) \ - ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufPixmapPriv -{ - /* Pointers to wrapped functions */ - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ - long funcsWrapped; /* flags which functions are wrapped */ -} mbufPixmapPrivRec, *mbufPixmapPrivPtr; -#endif /* _MULTIBUF_PIXMAP_ */ - - -#ifdef _MULTIBUF_BUFFER_ - -extern int frameWindowPrivateIndex; - -#define MB_SCREEN_PRIV_BUFFER(pScreen) \ - ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufBufferPriv -{ - DevUnion *frameBuffer; /* Array of screen framebuffers */ - DevUnion selectPlane; /* Plane(s) that select displayed buffer */ - - /* - * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union - * of all the old clipLists of the windows that are displaying - * the backbuffer. unionRgn is the union of all the new clipLists - * of the same windows. - */ - - RegionRec backBuffer; /* Area of screen displaying back buffer */ - RegionRec subtractRgn; /* Regions lost to backBuffer */ - RegionRec unionRgn; /* Regions gained by backBuffer */ - Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */ - - void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */ - void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */ - - /* Pointers to wrapped functions */ - PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */ - ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */ - WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */ - CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */ - ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */ - ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */ - long funcsWrapped; /* flags which functions are wrapped */ - unsigned inClearToBackground:1; /* used by WindowExposure */ -} mbufBufferPrivRec, *mbufBufferPrivPtr; -#endif /* _MULTIBUF_BUFFER_ */ - -#endif /* _MULTIBUF_SERVER_ */ -#endif /* _MULTIBUFST_H_ */ diff --git a/nx-X11/include/extensions/xf86dga.h b/nx-X11/include/extensions/xf86dga.h deleted file mode 100644 index d6e494158..000000000 --- a/nx-X11/include/extensions/xf86dga.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - Copyright (c) 1999 XFree86 Inc -*/ -/* $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ */ - -#ifndef _XF86DGA_H_ -#define _XF86DGA_H_ - -#include -#include - -#define X_XDGAQueryVersion 0 - -/* 1 through 9 are in xf86dga1.h */ - -/* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */ - -#define X_XDGAQueryModes 12 -#define X_XDGASetMode 13 -#define X_XDGASetViewport 14 -#define X_XDGAInstallColormap 15 -#define X_XDGASelectInput 16 -#define X_XDGAFillRectangle 17 -#define X_XDGACopyArea 18 -#define X_XDGACopyTransparentArea 19 -#define X_XDGAGetViewportStatus 20 -#define X_XDGASync 21 -#define X_XDGAOpenFramebuffer 22 -#define X_XDGACloseFramebuffer 23 -#define X_XDGASetClientVersion 24 -#define X_XDGAChangePixmapMode 25 -#define X_XDGACreateColormap 26 - - -#define XDGAConcurrentAccess 0x00000001 -#define XDGASolidFillRect 0x00000002 -#define XDGABlitRect 0x00000004 -#define XDGABlitTransRect 0x00000008 -#define XDGAPixmap 0x00000010 - -#define XDGAInterlaced 0x00010000 -#define XDGADoublescan 0x00020000 - -#define XDGAFlipImmediate 0x00000001 -#define XDGAFlipRetrace 0x00000002 - -#define XDGANeedRoot 0x00000001 - -#define XF86DGANumberEvents 7 - -#define XDGAPixmapModeLarge 0 -#define XDGAPixmapModeSmall 1 - -#define XF86DGAClientNotLocal 0 -#define XF86DGANoDirectVideoMode 1 -#define XF86DGAScreenNotActive 2 -#define XF86DGADirectNotActivated 3 -#define XF86DGAOperationNotSupported 4 -#define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1) - - -typedef struct { - int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ - float verticalRefresh; - int flags; /* DGA_CONCURRENT_ACCESS, etc... */ - int imageWidth; /* linear accessible portion (pixels) */ - int imageHeight; - int pixmapWidth; /* Xlib accessible portion (pixels) */ - int pixmapHeight; /* both fields ignored if no concurrent access */ - int bytesPerScanline; - int byteOrder; /* MSBFirst, LSBFirst */ - int depth; - int bitsPerPixel; - unsigned long redMask; - unsigned long greenMask; - unsigned long blueMask; - short visualClass; - int viewportWidth; - int viewportHeight; - int xViewportStep; /* viewport position granularity */ - int yViewportStep; - int maxViewportX; /* max viewport origin */ - int maxViewportY; - int viewportFlags; /* types of page flipping possible */ - int reserved1; - int reserved2; -} XDGAMode; - - -typedef struct { - XDGAMode mode; - unsigned char *data; - Pixmap pixmap; -} XDGADevice; - - -#ifndef _XF86DGA_SERVER_ -_XFUNCPROTOBEGIN - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int button; -} XDGAButtonEvent; - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int keycode; -} XDGAKeyEvent; - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - int dx; - int dy; -} XDGAMotionEvent; - -typedef union { - int type; - XDGAButtonEvent xbutton; - XDGAKeyEvent xkey; - XDGAMotionEvent xmotion; - long pad[24]; -} XDGAEvent; - -Bool XDGAQueryExtension( - Display *dpy, - int *eventBase, - int *erroBase -); - -Bool XDGAQueryVersion( - Display *dpy, - int *majorVersion, - int *minorVersion -); - -XDGAMode* XDGAQueryModes( - Display *dpy, - int screen, - int *num -); - -XDGADevice* XDGASetMode( - Display *dpy, - int screen, - int mode -); - -Bool XDGAOpenFramebuffer( - Display *dpy, - int screen -); - -void XDGACloseFramebuffer( - Display *dpy, - int screen -); - -void XDGASetViewport( - Display *dpy, - int screen, - int x, - int y, - int flags -); - -void XDGAInstallColormap( - Display *dpy, - int screen, - Colormap cmap -); - -Colormap XDGACreateColormap( - Display *dpy, - int screen, - XDGADevice *device, - int alloc -); - -void XDGASelectInput( - Display *dpy, - int screen, - long event_mask -); - -void XDGAFillRectangle( - Display *dpy, - int screen, - int x, - int y, - unsigned int width, - unsigned int height, - unsigned long color -); - - -void XDGACopyArea( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty -); - - -void XDGACopyTransparentArea( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty, - unsigned long key -); - -int XDGAGetViewportStatus( - Display *dpy, - int screen -); - -void XDGASync( - Display *dpy, - int screen -); - -Bool XDGASetClientVersion( - Display *dpy -); - -void XDGAChangePixmapMode( - Display *dpy, - int screen, - int *x, - int *y, - int mode -); - - -void XDGAKeyEventToXKeyEvent(XDGAKeyEvent* dk, XKeyEvent* xk); - - -_XFUNCPROTOEND -#endif /* _XF86DGA_SERVER_ */ -#endif /* _XF86DGA_H_ */ diff --git a/nx-X11/include/extensions/xf86dga1.h b/nx-X11/include/extensions/xf86dga1.h deleted file mode 100644 index 972b18e9e..000000000 --- a/nx-X11/include/extensions/xf86dga1.h +++ /dev/null @@ -1,140 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc - -*/ - -/************************************************************************ - - THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE - -************************************************************************/ - -#ifndef _XF86DGA1_H_ -#define _XF86DGA1_H_ - -#include - -#define X_XF86DGAQueryVersion 0 -#define X_XF86DGAGetVideoLL 1 -#define X_XF86DGADirectVideo 2 -#define X_XF86DGAGetViewPortSize 3 -#define X_XF86DGASetViewPort 4 -#define X_XF86DGAGetVidPage 5 -#define X_XF86DGASetVidPage 6 -#define X_XF86DGAInstallColormap 7 -#define X_XF86DGAQueryDirectVideo 8 -#define X_XF86DGAViewPortChanged 9 - -#define XF86DGADirectPresent 0x0001 -#define XF86DGADirectGraphics 0x0002 -#define XF86DGADirectMouse 0x0004 -#define XF86DGADirectKeyb 0x0008 -#define XF86DGAHasColormap 0x0100 -#define XF86DGADirectColormap 0x0200 - - - - -#ifndef _XF86DGA_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XF86DGAQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86DGAQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Status XF86DGAGetVideoLL( - Display* /* dpy */, - int /* screen */, - int * /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -); - -Status XF86DGAGetVideo( - Display* /* dpy */, - int /* screen */, - char ** /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -); - -Status XF86DGADirectVideo( - Display* /* dpy */, - int /* screen */, - int /* enable */ -); - -Status XF86DGADirectVideoLL( - Display* /* dpy */, - int /* screen */, - int /* enable */ -); - -Status XF86DGAGetViewPortSize( - Display* /* dpy */, - int /* screen */, - int * /* width */, - int * /* height */ -); - -Status XF86DGASetViewPort( - Display* /* dpy */, - int /* screen */, - int x /* X */, - int y /* Y */ -); - -Status XF86DGAGetVidPage( - Display* /* dpy */, - int /* screen */, - int * /* vid page */ -); - -Status XF86DGASetVidPage( - Display* /* dpy */, - int /* screen */, - int /* vid page */ -); - -Status XF86DGAInstallColormap( - Display* /* dpy */, - int /* screen */, - Colormap /*Colormap */ -); - -int XF86DGAForkApp( - int screen -); - -Status XF86DGAQueryDirectVideo( - Display * /* dpy */, - int /* screen */, - int * /* flags */ -); - -Bool XF86DGAViewPortChanged( - Display * /* dpy */, - int /* screen */, - int /* n */ -); - - -_XFUNCPROTOEND - -#endif /* _XF86DGA_SERVER_ */ - -#endif /* _XF86DGA1_H_ */ diff --git a/nx-X11/include/extensions/xf86dga1str.h b/nx-X11/include/extensions/xf86dga1str.h deleted file mode 100644 index 0dfde9bc2..000000000 --- a/nx-X11/include/extensions/xf86dga1str.h +++ /dev/null @@ -1,194 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1str.h,v 1.1 1999/03/28 15:31:33 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR1_H_ -#define _XF86DGASTR1_H_ - -typedef struct _XF86DGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXF86DGAQueryVersionReq; -#define sz_xXF86DGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DGAQueryVersionReply; -#define sz_xXF86DGAQueryVersionReply 32 - -typedef struct _XF86DGAGetVideoLL { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVideoLL */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVideoLLReq; -#define sz_xXF86DGAGetVideoLLReq 8 - -typedef struct _XF86DGAInstallColormap{ - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad2; - CARD32 id B32; /* colormap. */ -} xXF86DGAInstallColormapReq; -#define sz_xXF86DGAInstallColormapReq 12 - - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; - CARD32 width B32; - CARD32 bank_size B32; - CARD32 ram_size B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVideoLLReply; -#define sz_xXF86DGAGetVideoLLReply 32 - -typedef struct _XF86DGADirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGADirectVideo */ - CARD16 length B16; - CARD16 screen B16; - CARD16 enable B16; -} xXF86DGADirectVideoReq; -#define sz_xXF86DGADirectVideoReq 8 - - -typedef struct _XF86DGAGetViewPortSize { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetViewPortSizeReq; -#define sz_xXF86DGAGetViewPortSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 width B32; - CARD32 height B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetViewPortSizeReply; -#define sz_xXF86DGAGetViewPortSizeReply 32 - -typedef struct _XF86DGASetViewPort { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86DGASetViewPortReq; -#define sz_xXF86DGASetViewPortReq 16 - -typedef struct _XF86DGAGetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVidPageReq; -#define sz_xXF86DGAGetVidPageReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 vpage B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVidPageReply; -#define sz_xXF86DGAGetVidPageReply 32 - - -typedef struct _XF86DGASetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 vpage B16; -} xXF86DGASetVidPageReq; -#define sz_xXF86DGASetVidPageReq 8 - - -typedef struct _XF86DGAQueryDirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAQueryDirectVideoReq; -#define sz_xXF86DGAQueryDirectVideoReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAQueryDirectVideoReply; -#define sz_xXF86DGAQueryDirectVideoReply 32 - - -typedef struct _XF86DGAViewPortChanged { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 n B16; -} xXF86DGAViewPortChangedReq; -#define sz_xXF86DGAViewPortChangedReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 result B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAViewPortChangedReply; -#define sz_xXF86DGAViewPortChangedReply 32 - -#endif /* _XF86DGASTR1_H_ */ - diff --git a/nx-X11/include/extensions/xf86dgastr.h b/nx-X11/include/extensions/xf86dgastr.h deleted file mode 100644 index 30e4ff722..000000000 --- a/nx-X11/include/extensions/xf86dgastr.h +++ /dev/null @@ -1,344 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.13 2000/12/20 00:19:41 mvojkovi Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR_H_ -#define _XF86DGASTR_H_ - -#include - -#define XF86DGANAME "XFree86-DGA" - -#define XDGA_MAJOR_VERSION 2 /* current version numbers */ -#define XDGA_MINOR_VERSION 0 - - -typedef struct _XDGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXDGAQueryVersionReq; -#define sz_xXDGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryVersionReply; -#define sz_xXDGAQueryVersionReply 32 - -typedef struct _XDGAQueryModes { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAQueryModesReq; -#define sz_xXDGAQueryModesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 number B32; /* number of modes available */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryModesReply; -#define sz_xXDGAQueryModesReply 32 - - -typedef struct _XDGASetMode { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mode B32; /* mode number to init */ - CARD32 pid B32; /* Pixmap descriptor */ -} xXDGASetModeReq; -#define sz_xXDGASetModeReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; /* offset into framebuffer map */ - CARD32 flags B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXDGASetModeReply; -#define sz_xXDGASetModeReply 32 - -typedef struct { - CARD8 byte_order; - CARD8 depth; - CARD16 num B16; - CARD16 bpp B16; - CARD16 name_size B16; - CARD32 vsync_num B32; - CARD32 vsync_den B32; - CARD32 flags B32; - CARD16 image_width B16; - CARD16 image_height B16; - CARD16 pixmap_width B16; - CARD16 pixmap_height B16; - CARD32 bytes_per_scanline B32; - CARD32 red_mask B32; - CARD32 green_mask B32; - CARD32 blue_mask B32; - CARD16 visual_class B16; - CARD16 pad1 B16; - CARD16 viewport_width B16; - CARD16 viewport_height B16; - CARD16 viewport_xstep B16; - CARD16 viewport_ystep B16; - CARD16 viewport_xmax B16; - CARD16 viewport_ymax B16; - CARD32 viewport_flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; -} xXDGAModeInfo; -#define sz_xXDGAModeInfo 72 - -typedef struct _XDGAOpenFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAOpenFramebufferReq; -#define sz_xXDGAOpenFramebufferReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* device name size if there is one */ - CARD32 mem1 B32; /* physical memory */ - CARD32 mem2 B32; /* spillover for _alpha_ */ - CARD32 size B32; /* size of map in bytes */ - CARD32 offset B32; /* optional offset into device */ - CARD32 extra B32; /* extra info associated with the map */ - CARD32 pad2 B32; -} xXDGAOpenFramebufferReply; -#define sz_xXDGAOpenFramebufferReply 32 - - -typedef struct _XDGACloseFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGACloseFramebufferReq; -#define sz_xXDGACloseFramebufferReq 8 - - -typedef struct _XDGASetViewport { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGASetViewportReq; -#define sz_xXDGASetViewportReq 16 - - -typedef struct _XDGAInstallColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 cmap B32; -} xXDGAInstallColormapReq; -#define sz_xXDGAInstallColormapReq 12 - -typedef struct _XDGASelectInput { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mask B32; -} xXDGASelectInputReq; -#define sz_xXDGASelectInputReq 12 - -typedef struct _XDGAFillRectangle { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD32 color B32; -} xXDGAFillRectangleReq; -#define sz_xXDGAFillRectangleReq 20 - - -typedef struct _XDGACopyArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; -} xXDGACopyAreaReq; -#define sz_xXDGACopyAreaReq 20 - -typedef struct _XDGACopyTransparentArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; - CARD32 key B32; -} xXDGACopyTransparentAreaReq; -#define sz_xXDGACopyTransparentAreaReq 24 - - -typedef struct _XDGAGetViewportStatus { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAGetViewportStatusReq; -#define sz_xXDGAGetViewportStatusReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAGetViewportStatusReply; -#define sz_xXDGAGetViewportStatusReply 32 - -typedef struct _XDGASync { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGASyncReq; -#define sz_xXDGASyncReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGASyncReply; -#define sz_xXDGASyncReply 32 - -typedef struct _XDGASetClientVersion { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXDGASetClientVersionReq; -#define sz_xXDGASetClientVersionReq 8 - - -typedef struct { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGAChangePixmapModeReq; -#define sz_xXDGAChangePixmapModeReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 x B16; - CARD16 y B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGAChangePixmapModeReply; -#define sz_xXDGAChangePixmapModeReply 32 - -typedef struct _XDGACreateColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 id B32; - CARD32 mode B32; - CARD8 alloc; - CARD8 pad1; - CARD16 pad2; -} xXDGACreateColormapReq; -#define sz_xXDGACreateColormapReq 20 - - -typedef struct { - union { - struct { - BYTE type; - BYTE detail; - CARD16 sequenceNumber B16; - } u; - struct { - CARD32 pad0 B32; - CARD32 time B32; - INT16 dx B16; - INT16 dy B16; - INT16 screen B16; - CARD16 state B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - } event; - } u; -} dgaEvent; - - -#endif /* _XF86DGASTR_H_ */ - diff --git a/nx-X11/include/extensions/xf86misc.h b/nx-X11/include/extensions/xf86misc.h deleted file mode 100644 index fb01a6357..000000000 --- a/nx-X11/include/extensions/xf86misc.h +++ /dev/null @@ -1,172 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _XF86MISC_H_ -#define _XF86MISC_H_ - -#include - -#define X_XF86MiscQueryVersion 0 -#ifdef _XF86MISC_SAVER_COMPAT_ -#define X_XF86MiscGetSaver 1 -#define X_XF86MiscSetSaver 2 -#endif -#define X_XF86MiscGetMouseSettings 3 -#define X_XF86MiscGetKbdSettings 4 -#define X_XF86MiscSetMouseSettings 5 -#define X_XF86MiscSetKbdSettings 6 -#define X_XF86MiscSetGrabKeysState 7 -#define X_XF86MiscSetClientVersion 8 -#define X_XF86MiscGetFilePaths 9 -#define X_XF86MiscPassMessage 10 - -#define XF86MiscNumberEvents 0 - -#define XF86MiscBadMouseProtocol 0 -#define XF86MiscBadMouseBaudRate 1 -#define XF86MiscBadMouseFlags 2 -#define XF86MiscBadMouseCombo 3 -#define XF86MiscBadKbdType 4 -#define XF86MiscModInDevDisabled 5 -#define XF86MiscModInDevClientNotLocal 6 -#define XF86MiscNoModule 7 -#define XF86MiscNumberErrors (XF86MiscNoModule + 1) - -/* Never renumber these */ -#define MTYPE_MICROSOFT 0 -#define MTYPE_MOUSESYS 1 -#define MTYPE_MMSERIES 2 -#define MTYPE_LOGITECH 3 -#define MTYPE_BUSMOUSE 4 -#define MTYPE_LOGIMAN 5 -#define MTYPE_PS_2 6 -#define MTYPE_MMHIT 7 -#define MTYPE_GLIDEPOINT 8 -#define MTYPE_IMSERIAL 9 -#define MTYPE_THINKING 10 -#define MTYPE_IMPS2 11 -#define MTYPE_THINKINGPS2 12 -#define MTYPE_MMANPLUSPS2 13 -#define MTYPE_GLIDEPOINTPS2 14 -#define MTYPE_NETPS2 15 -#define MTYPE_NETSCROLLPS2 16 -#define MTYPE_SYSMOUSE 17 -#define MTYPE_AUTOMOUSE 18 -#define MTYPE_ACECAD 19 -#define MTYPE_EXPPS2 20 - -#define MTYPE_XQUEUE 127 -#define MTYPE_OSMOUSE 126 -#define MTYPE_UNKNOWN 125 - -#define KTYPE_UNKNOWN 0 -#define KTYPE_84KEY 1 -#define KTYPE_101KEY 2 -#define KTYPE_OTHER 3 -#define KTYPE_XQUEUE 4 - -#define MF_CLEAR_DTR 1 -#define MF_CLEAR_RTS 2 -#define MF_REOPEN 128 - -#ifndef _XF86MISC_SERVER_ - -/* return values for XF86MiscSetGrabKeysState */ -#define MiscExtGrabStateSuccess 0 /* No errors */ -#define MiscExtGrabStateLocked 1 /* A client already requested that - * grabs cannot be removed/killed */ -#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling - * grab removeal/kill already done */ - -_XFUNCPROTOBEGIN - -typedef struct { - char* device; - int type; - int baudrate; - int samplerate; - int resolution; - int buttons; - Bool emulate3buttons; - int emulate3timeout; - Bool chordmiddle; - int flags; -} XF86MiscMouseSettings; - -typedef struct { - int type; - int rate; - int delay; - Bool servnumlock; -} XF86MiscKbdSettings; - -typedef struct { - char* configfile; - char* modulepath; - char* logfile; -} XF86MiscFilePaths; - -Bool XF86MiscQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86MiscQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Bool XF86MiscSetClientVersion( - Display *dpy /* dpy */ -); - -Status XF86MiscGetMouseSettings( - Display* /* dpy */, - XF86MiscMouseSettings* /* mouse info */ -); - -Status XF86MiscGetKbdSettings( - Display* /* dpy */, - XF86MiscKbdSettings* /* keyboard info */ -); - -Status XF86MiscSetMouseSettings( - Display* /* dpy */, - XF86MiscMouseSettings* /* mouse info */ -); - -Status XF86MiscSetKbdSettings( - Display* /* dpy */, - XF86MiscKbdSettings* /* keyboard info */ -); - -int XF86MiscSetGrabKeysState( - Display* /* dpy */, - Bool /* enabled */ -); - -Status XF86MiscGetFilePaths( - Display* /* dpy */, - XF86MiscFilePaths* /* file paths/locations */ -); - -Status XF86MiscPassMessage( - Display* /* dpy */, - int /* screen */, - const char* /* message name/type */, - const char* /* message contents/value */, - char ** /* returned message */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/xf86mscstr.h b/nx-X11/include/extensions/xf86mscstr.h deleted file mode 100644 index 2b8c0d07e..000000000 --- a/nx-X11/include/extensions/xf86mscstr.h +++ /dev/null @@ -1,238 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.12 2002/11/20 04:04:56 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _XF86MISCSTR_H_ -#define _XF86MISCSTR_H_ - -#include - -#define XF86MISCNAME "XFree86-Misc" - -#define XF86MISC_MAJOR_VERSION 0 /* current version numbers */ -#define XF86MISC_MINOR_VERSION 9 - -typedef struct _XF86MiscQueryVersion { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscQueryVersion */ - CARD16 length B16; -} xXF86MiscQueryVersionReq; -#define sz_xXF86MiscQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XFree86-Misc */ - CARD16 minorVersion B16; /* minor version of XFree86-Misc */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscQueryVersionReply; -#define sz_xXF86MiscQueryVersionReply 32 - -#ifdef _XF86MISC_SAVER_COMPAT_ -typedef struct _XF86MiscGetSaver { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetSaver */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86MiscGetSaverReq; -#define sz_xXF86MiscGetSaverReq 8 - -typedef struct _XF86MiscSetSaver { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetSaver */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 suspendTime B32; - CARD32 offTime B32; -} xXF86MiscSetSaverReq; -#define sz_xXF86MiscSetSaverReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 suspendTime B32; - CARD32 offTime B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86MiscGetSaverReply; -#define sz_xXF86MiscGetSaverReply 32 -#endif - -typedef struct _XF86MiscGetMouseSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetMouseSettings */ - CARD16 length B16; -} xXF86MiscGetMouseSettingsReq; -#define sz_xXF86MiscGetMouseSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 mousetype B32; - CARD32 baudrate B32; - CARD32 samplerate B32; - CARD32 resolution B32; - CARD32 buttons B32; - BOOL emulate3buttons; - BOOL chordmiddle; - CARD16 pad2 B16; - CARD32 emulate3timeout B32; - CARD32 flags B32; - CARD32 devnamelen B32; /* strlen(device)+1 */ -} xXF86MiscGetMouseSettingsReply; -#define sz_xXF86MiscGetMouseSettingsReply 44 - -typedef struct _XF86MiscGetKbdSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetKbdSettings */ - CARD16 length B16; -} xXF86MiscGetKbdSettingsReq; -#define sz_xXF86MiscGetKbdSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 kbdtype B32; - CARD32 rate B32; - CARD32 delay B32; - BOOL servnumlock; - BOOL pad2; - CARD16 pad3 B16; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86MiscGetKbdSettingsReply; -#define sz_xXF86MiscGetKbdSettingsReply 32 - -typedef struct _XF86MiscSetMouseSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetMouseSettings */ - CARD16 length B16; - CARD32 mousetype B32; - CARD32 baudrate B32; - CARD32 samplerate B32; - CARD32 resolution B32; - CARD32 buttons B32; - BOOL emulate3buttons; - BOOL chordmiddle; - CARD16 devnamelen B16; - CARD32 emulate3timeout B32; - CARD32 flags B32; -} xXF86MiscSetMouseSettingsReq; -#define sz_xXF86MiscSetMouseSettingsReq 36 - -typedef struct _XF86MiscSetKbdSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ - CARD16 length B16; - CARD32 kbdtype B32; - CARD32 rate B32; - CARD32 delay B32; - BOOL servnumlock; - BOOL pad1; - CARD16 pad2 B16; -} xXF86MiscSetKbdSettingsReq; -#define sz_xXF86MiscSetKbdSettingsReq 20 - -typedef struct _XF86MiscSetGrabKeysState { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ - CARD16 length B16; - BOOL enable; - BOOL pad1; - CARD16 pad2 B16; -} xXF86MiscSetGrabKeysStateReq; -#define sz_xXF86MiscSetGrabKeysStateReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscSetGrabKeysStateReply; -#define sz_xXF86MiscSetGrabKeysStateReply 32 - -typedef struct _XF86MiscSetClientVersion { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXF86MiscSetClientVersionReq; -#define sz_xXF86MiscSetClientVersionReq 8 - -typedef struct _XF86MiscGetFilePaths { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetFilePaths */ - CARD16 length B16; -} xXF86MiscGetFilePathsReq; -#define sz_xXF86MiscGetFilePathsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 configlen B16; - CARD16 modulelen B16; - CARD16 loglen B16; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscGetFilePathsReply; -#define sz_xXF86MiscGetFilePathsReply 32 - -typedef struct _XF86MiscPassMessage { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscPassMessage */ - CARD16 length B16; - CARD16 typelen B16; - CARD16 vallen B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86MiscPassMessageReq; -#define sz_xXF86MiscPassMessageReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 mesglen B16; - CARD16 pad2 B16; - CARD32 status B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscPassMessageReply; -#define sz_xXF86MiscPassMessageReply 32 - -#endif /* _XF86MISCSTR_H_ */ diff --git a/nx-X11/include/extensions/xf86vmode.h b/nx-X11/include/extensions/xf86vmode.h deleted file mode 100644 index 624820dea..000000000 --- a/nx-X11/include/extensions/xf86vmode.h +++ /dev/null @@ -1,322 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODE_H_ -#define _XF86VIDMODE_H_ - -#include -#include - -#define X_XF86VidModeQueryVersion 0 -#define X_XF86VidModeGetModeLine 1 -#define X_XF86VidModeModModeLine 2 -#define X_XF86VidModeSwitchMode 3 -#define X_XF86VidModeGetMonitor 4 -#define X_XF86VidModeLockModeSwitch 5 -#define X_XF86VidModeGetAllModeLines 6 -#define X_XF86VidModeAddModeLine 7 -#define X_XF86VidModeDeleteModeLine 8 -#define X_XF86VidModeValidateModeLine 9 -#define X_XF86VidModeSwitchToMode 10 -#define X_XF86VidModeGetViewPort 11 -#define X_XF86VidModeSetViewPort 12 -/* new for version 2.x of this extension */ -#define X_XF86VidModeGetDotClocks 13 -#define X_XF86VidModeSetClientVersion 14 -#define X_XF86VidModeSetGamma 15 -#define X_XF86VidModeGetGamma 16 -#define X_XF86VidModeGetGammaRamp 17 -#define X_XF86VidModeSetGammaRamp 18 -#define X_XF86VidModeGetGammaRampSize 19 -#define X_XF86VidModeGetPermissions 20 - -#define CLKFLAG_PROGRAMABLE 1 - -#ifdef XF86VIDMODE_EVENTS -#define XF86VidModeNotify 0 -#define XF86VidModeNumberEvents (XF86VidModeNotify + 1) - -#define XF86VidModeNotifyMask 0x00000001 - -#define XF86VidModeNonEvent 0 -#define XF86VidModeModeChange 1 -#else -#define XF86VidModeNumberEvents 0 -#endif - -#define XF86VidModeBadClock 0 -#define XF86VidModeBadHTimings 1 -#define XF86VidModeBadVTimings 2 -#define XF86VidModeModeUnsuitable 3 -#define XF86VidModeExtensionDisabled 4 -#define XF86VidModeClientNotLocal 5 -#define XF86VidModeZoomLocked 6 -#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) - -#define XF86VM_READ_PERMISSION 1 -#define XF86VM_WRITE_PERMISSION 2 - -#ifndef _XF86VIDMODE_SERVER_ - -typedef struct { - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} XF86VidModeModeLine; - -typedef struct { - unsigned int dotclock; - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} XF86VidModeModeInfo; - -typedef struct { - float hi; - float lo; -} XF86VidModeSyncRange; - -typedef struct { - char* vendor; - char* model; - float EMPTY; - unsigned char nhsync; - XF86VidModeSyncRange* hsync; - unsigned char nvsync; - XF86VidModeSyncRange* vsync; -} XF86VidModeMonitor; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent req */ - Display *display; /* Display the event was read from */ - Window root; /* root window of event screen */ - int state; /* What happened */ - int kind; /* What happened */ - Bool forced; /* extents of new region */ - Time time; /* event timestamp */ -} XF86VidModeNotifyEvent; - -typedef struct { - float red; /* Red Gamma value */ - float green; /* Green Gamma value */ - float blue; /* Blue Gamma value */ -} XF86VidModeGamma; - - -#define XF86VidModeSelectNextMode(disp, scr) \ - XF86VidModeSwitchMode(disp, scr, 1) -#define XF86VidModeSelectPrevMode(disp, scr) \ - XF86VidModeSwitchMode(disp, scr, -1) - -_XFUNCPROTOBEGIN - -Bool XF86VidModeQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86VidModeQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Bool XF86VidModeSetClientVersion( - Display* /* dpy */ -); - -Bool XF86VidModeGetModeLine( - Display* /* dpy */, - int /* screen */, - int* /* dotclock */, - XF86VidModeModeLine* /* modeline */ -); - -Bool XF86VidModeGetAllModeLines( - Display* /* dpy */, - int /* screen */, - int* /* modecount */, - XF86VidModeModeInfo*** /* modelinesPtr */ -); - -Bool XF86VidModeAddModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* new modeline */, - XF86VidModeModeInfo* /* after modeline */ -); - -Bool XF86VidModeDeleteModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeModModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeLine* /* modeline */ -); - -Status XF86VidModeValidateModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeSwitchMode( - Display* /* dpy */, - int /* screen */, - int /* zoom */ -); - -Bool XF86VidModeSwitchToMode( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeLockModeSwitch( - Display* /* dpy */, - int /* screen */, - int /* lock */ -); - -Bool XF86VidModeGetMonitor( - Display* /* dpy */, - int /* screen */, - XF86VidModeMonitor* /* monitor */ -); - -Bool XF86VidModeGetViewPort( - Display* /* dpy */, - int /* screen */, - int* /* x return */, - int* /* y return */ -); - -Bool XF86VidModeSetViewPort( - Display* /* dpy */, - int /* screen */, - int /* x */, - int /* y */ -); - -Bool XF86VidModeGetDotClocks( - Display* /* dpy */, - int /* screen */, - int* /* flags return */, - int* /* number of clocks return */, - int* /* max dot clock return */, - int** /* clocks return */ -); - -Bool XF86VidModeGetGamma( - Display* /* dpy */, - int /* screen */, - XF86VidModeGamma* /* Gamma */ -); - -Bool XF86VidModeSetGamma( - Display* /* dpy */, - int /* screen */, - XF86VidModeGamma* /* Gamma */ -); - -Bool XF86VidModeSetGammaRamp( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool XF86VidModeGetGammaRamp( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool XF86VidModeGetGammaRampSize( - Display* /* dpy */, - int /* screen */, - int* /* size */ -); - -Bool XF86VidModeGetPermissions( - Display* /* dpy */, - int /* screen */, - int* /* permissions */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/xf86vmstr.h b/nx-X11/include/extensions/xf86vmstr.h deleted file mode 100644 index 43c67980f..000000000 --- a/nx-X11/include/extensions/xf86vmstr.h +++ /dev/null @@ -1,562 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODESTR_H_ -#define _XF86VIDMODESTR_H_ - -#include - -#define XF86VIDMODENAME "XFree86-VidModeExtension" - -#define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ -#define XF86VIDMODE_MINOR_VERSION 2 -/* - * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. - * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune - * client. - * major version 2 == uses new protocol version in XFree86 4.0. - */ - -typedef struct _XF86VidModeQueryVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */ - CARD16 length B16; -} xXF86VidModeQueryVersionReq; -#define sz_xXF86VidModeQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XF86VidMode */ - CARD16 minorVersion B16; /* minor version of XF86VidMode */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeQueryVersionReply; -#define sz_xXF86VidModeQueryVersionReply 32 - -typedef struct _XF86VidModeGetModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetModeLineReq, - xXF86VidModeGetAllModeLinesReq, - xXF86VidModeGetMonitorReq, - xXF86VidModeGetViewPortReq, - xXF86VidModeGetDotClocksReq, - xXF86VidModeGetPermissionsReq; -#define sz_xXF86VidModeGetModeLineReq 8 -#define sz_xXF86VidModeGetAllModeLinesReq 8 -#define sz_xXF86VidModeGetMonitorReq 8 -#define sz_xXF86VidModeGetViewPortReq 8 -#define sz_xXF86VidModeGetDotClocksReq 8 -#define sz_xXF86VidModeGetPermissionsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad2 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeGetModeLineReply; -#define sz_xXF86VidModeGetModeLineReply 52 - -/* 0.x version */ -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeGetModeLineReply; -#define sz_xXF86OldVidModeGetModeLineReply 36 - -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD32 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModeInfo; - -/* 0.x version */ -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModeInfo; - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 modecount B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetAllModeLinesReply; -#define sz_xXF86VidModeGetAllModeLinesReply 32 - -typedef struct _XF86VidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_hskew B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD16 pad2 B16; - CARD32 after_flags B32; - CARD32 reserved4 B32; - CARD32 reserved5 B32; - CARD32 reserved6 B32; -} xXF86VidModeAddModeLineReq; -#define sz_xXF86VidModeAddModeLineReq 92 - -/* 0.x version */ -typedef struct _XF86OldVidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD32 after_flags B32; -} xXF86OldVidModeAddModeLineReq; -#define sz_xXF86OldVidModeAddModeLineReq 60 - -typedef struct _XF86VidModeModModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModModeLineReq; -#define sz_xXF86VidModeModModeLineReq 48 - -/* 0.x version */ -typedef struct _XF86OldVidModeModModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModModeLineReq; -#define sz_xXF86OldVidModeModModeLineReq 32 - -typedef struct _XF86VidModeValidateModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeDeleteModeLineReq, - xXF86VidModeValidateModeLineReq, - xXF86VidModeSwitchToModeReq; -#define sz_xXF86VidModeDeleteModeLineReq 52 -#define sz_xXF86VidModeValidateModeLineReq 52 -#define sz_xXF86VidModeSwitchToModeReq 52 - -/* 0.x version */ -typedef struct _XF86OldVidModeValidateModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeDeleteModeLineReq, - xXF86OldVidModeValidateModeLineReq, - xXF86OldVidModeSwitchToModeReq; -#define sz_xXF86OldVidModeDeleteModeLineReq 36 -#define sz_xXF86OldVidModeValidateModeLineReq 36 -#define sz_xXF86OldVidModeSwitchToModeReq 36 - -typedef struct _XF86VidModeSwitchMode { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */ - CARD16 length B16; - CARD16 screen B16; - CARD16 zoom B16; -} xXF86VidModeSwitchModeReq; -#define sz_xXF86VidModeSwitchModeReq 8 - -typedef struct _XF86VidModeLockModeSwitch { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */ - CARD16 length B16; - CARD16 screen B16; - CARD16 lock B16; -} xXF86VidModeLockModeSwitchReq; -#define sz_xXF86VidModeLockModeSwitchReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeValidateModeLineReply; -#define sz_xXF86VidModeValidateModeLineReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 vendorLength; - CARD8 modelLength; - CARD8 nhsync; - CARD8 nvsync; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetMonitorReply; -#define sz_xXF86VidModeGetMonitorReply 32 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 x B32; - CARD32 y B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetViewPortReply; -#define sz_xXF86VidModeGetViewPortReply 32 - -typedef struct _XF86VidModeSetViewPort { - CARD8 reqType; /* always VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86VidModeSetViewPortReq; -#define sz_xXF86VidModeSetViewPortReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 clocks B32; - CARD32 maxclocks B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xXF86VidModeGetDotClocksReply; -#define sz_xXF86VidModeGetDotClocksReply 32 - -typedef struct _XF86VidModeSetClientVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXF86VidModeSetClientVersionReq; -#define sz_xXF86VidModeSetClientVersionReq 8 - -typedef struct _XF86VidModeGetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetGammaReq; -#define sz_xXF86VidModeGetGammaReq 32 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeGetGammaReply; -#define sz_xXF86VidModeGetGammaReply 32 - -typedef struct _XF86VidModeSetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeSetGammaReq; -#define sz_xXF86VidModeSetGammaReq 32 - - -typedef struct _XF86VidModeSetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeSetGammaRampReq; -#define sz_xXF86VidModeSetGammaRampReq 8 - -typedef struct _XF86VidModeGetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeGetGammaRampReq; -#define sz_xXF86VidModeGetGammaRampReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampReply; -#define sz_xXF86VidModeGetGammaRampReply 32 - -typedef struct _XF86VidModeGetGammaRampSize { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetGammaRampSizeReq; -#define sz_xXF86VidModeGetGammaRampSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampSizeReply; -#define sz_xXF86VidModeGetGammaRampSizeReply 32 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 permissions B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetPermissionsReply; -#define sz_xXF86VidModeGetPermissionsReply 32 - - -#endif /* _XF86VIDMODESTR_H_ */ - diff --git a/nx-X11/include/extensions/xtrapbits.h b/nx-X11/include/extensions/xtrapbits.h deleted file mode 100644 index 1189dc7d3..000000000 --- a/nx-X11/include/extensions/xtrapbits.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $XFree86$ */ -/* - * This include file is designed to be a portable way for systems to define - * bit field manipulation of arrays of bits. - */ -#ifndef __XTRAPBITS__ -#define __XTRAPBITS__ "@(#)xtrapbits.h 1.6 - 90/09/18 " - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1994 by Digital Equipment Corporation, -Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - */ -typedef unsigned char *UByteP; /* Pointer to an unsigned byte array */ -#define BitsInByte 8L /* The number of bits in a byte */ - -#define BitInByte(bit) /* Returns the bit mask of a byte */ \ - (1L << (((bit) % BitsInByte))) - -#define BitInWord(bit) /* Returns the bit mask of a word */ \ - (1L << (((bit) % (BitsInByte * 2L)))) - -#define BitInLong(bit) /* Returns the bit mask of a long */ \ - (1L << (((bit) % (BitsInByte * 4L)))) - -#define ByteInArray(array,bit) /* Returns the byte offset to get to a bit */ \ - (((UByteP)(array))[(bit) / BitsInByte]) - -#define BitIsTrue(array,bit) /* Test to see if a specific bit is True */ \ - (ByteInArray(array,bit) & BitInByte(bit)) - -#define BitIsFalse(array,bit) /* Test to see if a specific bit is False */ \ - (!(BitIsTrue(array,bit))) - -#define BitTrue(array,bit) /* Set a specific bit to be True */ \ - (ByteInArray(array,bit) |= BitInByte(bit)) - -#define BitFalse(array,bit) /* Set a specific bit to be False */ \ - (ByteInArray(array,bit) &= ~BitInByte(bit)) - -#define BitToggle(array,bit) /* Toggle a specific bit */ \ - (ByteInArray(array,bit) ^= BitInByte(bit)) - -#define BitCopy(dest,src,bit) /* Copy a specific bit */ \ - BitIsTrue((src),(bit)) ? BitTrue((dest),(bit)) : BitFalse((dest),(bit)) - -#define BitValue(array,bit) /* Return True or False depending on bit */ \ - (BitIsTrue((array),(bit)) ? True : False) - -#define BitSet(array,bit,value) /* Set bit to given value in array */ \ - (value) ? BitTrue((array),(bit)) : BitFalse((array),(bit)) - -#endif /* __XTRAPBITS__ */ diff --git a/nx-X11/include/extensions/xtrapddmi.h b/nx-X11/include/extensions/xtrapddmi.h deleted file mode 100644 index 71df0712d..000000000 --- a/nx-X11/include/extensions/xtrapddmi.h +++ /dev/null @@ -1,115 +0,0 @@ -/* $XFree86$ */ - -#ifndef __XTRAPDDMI__ -#define __XTRAPDDMI__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file is used by the XTrap server extension only - * (not used by clients or the XTrap Toolkit). Information - * contained herein should *not* be visible to clients (xtrapdi.h - * is used for this). The name is historical. - */ -#include -#include -#include "dix.h" - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#define XETrapNumEvents 1L /* constants used for AddExtension */ - -/* Other constants used within the extension code */ -#define XETrapMinRepSize 32L /* Minimum number of longs */ - -/* This structure will be globally declared to provide storage to hold - * the various extension wide configuration information. Allocated on - * a per-client basis. - */ -typedef struct -{ - ClientPtr client; /* Multi-client support and error handling */ - xXTrapGetCurReply cur; /* Struct of Miscellaneous state info */ - xXTrapGetStatsReply *stats; /* Pointer to stat's, malloc'd if requested */ - CARD32 last_input_time B32; /* last timestamp from input event */ - CARD16 protocol B16; /* current communication protocol */ -} XETrapEnv; - -#define XETrapSetHeaderEvent(phdr) ((phdr)->type = 0x1L) -#define XETrapSetHeaderRequest(phdr) ((phdr)->type = 0x2L) -#define XETrapSetHeaderSpecial(phdr) ((phdr)->type = 0x3L) -#define XETrapSetHeaderCursor(phdr) ((phdr)->type = 0x4L) -#define XETrapSetHeaderReply(phdr) ((phdr)->type = 0x5L) - -#ifndef vaxc -#define globaldef -#define globalref extern -#endif - -/* Extension platform identifier (conditionally defined) */ -#if ( defined (__osf__) && defined(__alpha) ) -# define XETrapPlatform PF_DECOSF1 -#endif -#ifdef ultrix -# define XETrapPlatform PF_DECUltrix -#endif -#ifdef vms -#ifdef VAXELN -# define XETrapPlatform PF_DECELN -#else -# define XETrapPlatform PF_DECVMS -#endif -#endif -#ifdef VT1000 -# define XETrapPlatform PF_DECVT1000 -#endif -#ifdef VXT -# define XETrapPlatform PF_DECXTerm -#endif -#ifdef PC -# define XETrapPlatform PF_IBMAT -#endif -#ifdef sun -# define XETrapPlatform PF_SunSparc -#endif -#ifndef XETrapPlatform -# define XETrapPlatform PF_Other -#endif /* XETrapPlatform */ - -#endif /* __XTRAPDDMI__ */ diff --git a/nx-X11/include/extensions/xtrapdi.h b/nx-X11/include/extensions/xtrapdi.h deleted file mode 100644 index 34696113d..000000000 --- a/nx-X11/include/extensions/xtrapdi.h +++ /dev/null @@ -1,507 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPDI__ -#define __XTRAPDI__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994 by Digital Equipment Corp., -Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file defines the common structures/constants - * between the XTrap extension and clients. All protocol - * definitions between XTrap extension/clients can be found - * here. - */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifndef IN_MODULE -#include -#endif -#include -#include -#ifdef SMT -#define NEED_EVENTS -#define NEED_REPLIES -#endif -#include -#include -#define XTrapExtName "DEC-XTRAP" -/* Current Release, Version, and Revision of the XTrap Extension */ -#define XETrapRelease 3L -#define XETrapVersion 4L -#ifndef XETrapRevision /* Changed from the Makefile by users */ -# define XETrapRevision 0L -#endif /* XETrapRevision */ -#define XETrapProtocol 32L - -#ifndef SIZEOF -# ifdef __STDC__ -# define SIZEOF(x) sz_##x -# else -# define SIZEOF(x) sz_/**/x -# endif /* if ANSI C compiler else not */ -#endif -#ifndef sz_CARD32 -#define sz_CARD32 4L -#endif -#ifndef sz_CARD8 -#define sz_CARD8 1L -#endif -#ifndef True -# define True 1L -# define False 0L -#endif - -typedef int (*int_function)(); -typedef void (*void_function)(); - -/* This is used as flags to indicate desired request traps - * Note: This has been padded to a CARD32 to keep structure aligned - */ -#define XETrapMaxRequest (((SIZEOF(CARD32)+((256L-1L) / \ - (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) -typedef CARD8 ReqFlags[XETrapMaxRequest]; - -/* This is used as flags to indicate desired event traps - * Until events become *fully vectored*, we'll have to fake it - * by defining an array of 5 events (KeyPress, KeyRelease, - * ButtonPress, ButtonRelease, and MotionNotify. The extra 2 - * are required as the event types start with "2" (errors and - * replies are 0 & 1). The event type is the index into the - * bits. - * Note: This has been padded to a longword to keep structure aligned - */ -#ifndef VECTORED_EVENTS -#define XETrapCoreEvents (2L+5L) -#else -#define XETrapCoreEvents 128L -#endif -#define XETrapMaxEvent (((SIZEOF(CARD32)+((XETrapCoreEvents-1L) / \ - (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) -typedef CARD8 EventFlags[XETrapMaxEvent]; - -/* This structure is used in a request to specify the types of - * configuration information that should be changed or updated. - */ -typedef struct -{ - CARD8 valid[4L]; /* Bits TRUE indicates data field is used */ - CARD8 data[4L]; /* Bits looked at if corresponding valid bit set */ - ReqFlags req; /* Bits coorespond to core requests */ - EventFlags event; /* Bits correspond to core events */ -} XETrapFlags; - -/* Bit definitions for the above XETrapFlags structure. */ -#define XETrapTimestamp 0L /* hdr timestamps desired */ -#define XETrapCmd 1L /* command key specified */ -#define XETrapCmdKeyMod 2L /* cmd key is a modifier */ -#define XETrapRequest 3L /* output requests array */ -#define XETrapEvent 4L /* future output events array */ -#define XETrapMaxPacket 5L /* Maximum packet length set */ -#define XETrapTransOut 6L /* obsolete */ -#define XETrapStatistics 7L /* collect counts on requests */ -#define XETrapWinXY 8L /* Fill in Window (X,Y) in hdr */ -#define XETrapTransIn 9L /* obsolete */ -#define XETrapCursor 10L /* Trap cursor state changes */ -#define XETrapXInput 11L /* Use XInput extension */ -#define XETrapVectorEvents 12L /* Use Vectored Events (128) */ -#define XETrapColorReplies 13L /* Return replies with Color Req's */ -#define XETrapGrabServer 14L /* Disables client GrabServers */ - -typedef struct /* used by XEConfigRequest */ -{ - XETrapFlags flags; /* Flags to specify what should be chg'd */ - CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ - CARD8 cmd_key; /* Keyboard command_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 pad[1L]; /* pad out to a quadword */ -} XETrapCfg; - -/* These structures are used within the Xtrap request structure for - * the various types of xtrap request - */ -#ifndef _XINPUT -/* (see the definition of XEvent as a reference) */ -typedef struct /* used by XESimulateXEventRequest for synthesizing core evts */ -{ - CARD8 type; /* (must be first) as in XEvent */ - CARD8 detail; /* Detail keycode/button as in XEvent */ - CARD8 screen; /* screen number (0 to n) */ - CARD8 pad; /* pad to longword */ - INT16 x B16; /* X & Y coord as in XEvent */ - INT16 y B16; -} XETrapInputReq; -#endif - -/* These are constants that refer to the extension request vector table. - * A request will use these values as minor opcodes. - */ -#define XETrap_Reset 0L /* set to steady state */ -#define XETrap_GetAvailable 1L /* get available funct from ext */ -#define XETrap_Config 2L /* configure extension */ -#define XETrap_StartTrap 3L /* use Trapping */ -#define XETrap_StopTrap 4L /* stop using Trapping */ -#define XETrap_GetCurrent 5L /* get current info from ext */ -#define XETrap_GetStatistics 6L /* get count statistics from ext */ -#ifndef _XINPUT -#define XETrap_SimulateXEvent 7L /* async input simulation */ -#endif -#define XETrap_GetVersion 8L /* Get (Just) Version */ -#define XETrap_GetLastInpTime 9L /* Get Timestamp of last client input */ - -/* The following are formats of a request to the XTRAP - * extension. The data-less XTrap requests all use xXTrapReq - */ -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD32 pad B32; /* Maintain quadword alignment */ -} xXTrapReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapReq (sizeof(xXTrapReq)) -/* For retrieving version/available info (passes lib-side protocol number) */ -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD16 protocol B16; /* The xtrap extension protocol number */ - CARD16 pad B16; /* Maintain quadword alignment */ -} xXTrapGetReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetReq (sizeof(xXTrapGetReq)) - -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - /* - * The follwing is done so that structure padding wont be - * a problem. The request structure contains a shadow for - * the XETrapCfg structure. Since the XETrapCfg also has a - * substructure (XETrapFlags) this structure is also shadowed. - * - * The following are a shadow of the XETrapFlags - * structure. - */ - CARD8 config_flags_valid[4L]; - CARD8 config_flags_data[4L]; - ReqFlags config_flags_req; - EventFlags config_flags_event; - /* End Shadow (XETrapFlags)*/ - CARD16 config_max_pkt_size B16; /* Max number of bytes in a packet */ - CARD8 config_cmd_key; /* Keyboard command_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 config_pad[1L]; /* pad out to a quadword */ - /* End Shadow (XETrapCfg) */ - CARD32 pad B32; /* Maintain quadword alignment */ -} xXTrapConfigReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapConfigReq (sizeof(xXTrapConfigReq)) - -#ifndef _XINPUT -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD32 pad B32; /* Maintain quadword alignment */ - XETrapInputReq input; -} xXTrapInputReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapInputReq (sizeof(xXTrapInputReq)) -#endif - - -/* The following structures are used by the server extension to send - * information and replies to the client. - */ - -/* header for all X replies */ -typedef struct -{ - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 length B32; -} XETrapRepHdr; - -/* Structure of Get Available Functionality reply */ -typedef struct -{ - CARD32 pf_ident B32; /* Contains constant identifying the platform */ - CARD16 xtrap_release B16; /* The xtrap extension release number */ - CARD16 xtrap_version B16; /* The xtrap extension version number */ - CARD16 xtrap_revision B16; /* The xtrap extension revision number */ - CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ - CARD8 valid[4]; /* What specific configuration flags are valid */ - CARD32 major_opcode B32; /* The major opcode identifying xtrap */ - CARD32 event_base B32; /* The event value we start at */ - CARD32 pad0 B32; /* obsolete field */ - CARD16 pad1 B16, pad2 B16, pad3 B16; /* obsolete field */ - CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ - INT16 cur_x B16; /* Current X & Y coord for relative motion */ - INT16 cur_y B16; -} XETrapGetAvailRep; - -typedef struct -{ - CARD16 xtrap_release B16; /* The xtrap extension release number */ - CARD16 xtrap_version B16; /* The xtrap extension version number */ - CARD16 xtrap_revision B16; /* The xtrap extension revision number */ - CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ -} XETrapGetVersRep; - -typedef struct -{ - CARD32 last_time B32; /* Timestamp of last input time */ -} XETrapGetLastInpTimeRep; - -/* Structure of Get Current Configuration Information reply */ -typedef struct -{ - CARD8 state_flags[2]; /* Miscelaneous flags, see below #define's */ - CARD16 pad0 B16; /* Assure quadword alignment */ - XETrapCfg config; /* Current Config information */ - CARD32 pad1 B32; -} XETrapGetCurRep; - -/* Mask definitions for the above flags. */ -#define XETrapTrapActive 0L /* If sending/receiving between client/ext */ - -/* Structure of Get Statistics Information reply */ -typedef struct -{ - CARD32 requests[256L]; /* Array containing request counts if trapped */ - CARD32 events[XETrapCoreEvents]; /* Array containing event stats */ -#ifndef VECTORED_EVENTS - CARD32 pad B32; /* Pad out to a quadword */ -#endif -} XETrapGetStatsRep; - -#define PF_Other 0L /* server not one of the below */ -#define PF_Apollo 10L /* server on Apollo system */ -#define PF_ATT 20L /* server on AT&T system */ -#define PF_Cray1 30L /* server on Cray 1 system */ -#define PF_Cray2 31L /* server on Cray 2 system */ -#define PF_DECUltrix 40L /* server on DEC ULTRIX system */ -#define PF_DECVMS 41L /* server on DEC VMS system */ -#define PF_DECVT1000 42L /* server on DEC-VT1000-terminal */ -#define PF_DECXTerm 43L /* server on DEC-X-terminal */ -#define PF_DECELN 44L /* server on DEC VAXELN X terminal */ -#define PF_DECOSF1 45L /* server on DEC's OSF/1 system */ -#define PF_HP9000s800 50L /* server on HP 9000/800 system */ -#define PF_HP9000s300 51L /* server on HP 9000/300 system */ -#define PF_IBMAT 60L /* server on IBM/AT system */ -#define PF_IBMRT 61L /* server on IBM/RT system */ -#define PF_IBMPS2 62L /* server on IBM/PS2 system */ -#define PF_IBMRS 63L /* server on IBM/RS system */ -#define PF_MacII 70L /* server on Mac II system */ -#define PF_Pegasus 80L /* server on Tektronix Pegasus system */ -#define PF_SGI 90L /* server on Silicon Graphcis system */ -#define PF_Sony 100L /* server on Sony system */ -#define PF_Sun3 110L /* server on Sun 3 system */ -#define PF_Sun386i 111L /* server on Sun 386i system */ -#define PF_SunSparc 112L /* server on Sun Sparc system */ - -/* reply sent back by XETrapGetAvailable request */ -typedef struct -{ - XETrapRepHdr hdr; - XETrapGetAvailRep data; -} xXTrapGetAvailReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetAvailReply sizeof(xXTrapGetAvailReply) - -/* reply sent back by XETrapGetVersion request */ -typedef struct -{ - XETrapRepHdr hdr; - XETrapGetVersRep data; - CARD32 pad0 B32; /* pad out to 32 bytes */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXTrapGetVersReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetVersReply sizeof(xXTrapGetVersReply) - -/* reply sent back by XETrapGetLastInpTime request */ -typedef struct -{ - XETrapRepHdr hdr; - /* - * The following is a shadow of the XETrapGetLastInpTimeRep - * structure. This is done to avoid structure padding. - */ - CARD32 data_last_time B32; /* Timestamp of last input time */ - CARD32 pad0 B32; /* pad out to 32 bytes */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xXTrapGetLITimReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetLITimReply sizeof(xXTrapGetLITimReply) - -/* reply sent back by XETrapGetCurrent request */ -typedef struct -{ - XETrapRepHdr hdr; - /* - * The following is a shadow of the XETrapGetCurRep - * structure. This is done to avoid structure padding. - * Since the XETrapGetCurRep structure contains a sub-structure - * (XETrapCfg) there is a shadow for that as well.*/ - CARD8 data_state_flags[2]; /* Misc flags, see below #define's */ - CARD16 data_pad0 B16; /* Assure quadword alignment */ - /* XETrapCfg Shadow Starts */ - CARD8 data_config_flags_valid[4L]; - CARD8 data_config_flags_data[4L]; - ReqFlags data_config_flags_req; - EventFlags data_config_flags_event; - CARD16 data_config_max_pkt_size B16; /* Max num of bytes in a pkt */ - CARD8 data_config_cmd_key; /* Keyboard cmd_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 data_config_pad[1L]; /* pad out to a quadword */ - /* End Shadow (XETrapCfg) */ - CARD32 pad1 B32; -} xXTrapGetCurReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetCurReply sizeof(xXTrapGetCurReply) - -/* reply sent back by XETrapGetStatistics request */ -/* Note: - * The following does *not* use the standard XETrapRepHdr, but instead - * one which is padded out to 32-bytes. This is because Cray's have a problem - * reading arrays of CARD32s without using the _Read32 macro (see XERqsts.c). - * This requires that none of the data be in the _Reply area. - */ -typedef struct -{ - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - XETrapGetStatsRep data; -} xXTrapGetStatsReply; -#define sz_xXTrapGetStatsReply 1088 - -typedef struct /* the XTrap Output header (for output from ext to client) */ -{ /* this must be quadword aligned for portability */ - CARD32 count B32; /* Length including this header */ - CARD32 timestamp B32; /* timestamp if desired */ - CARD8 type; /* event id, request id, special id */ - CARD8 screen; /* screen number (0 to n) */ - INT16 win_x B16; /* X coord of drawable, if any */ - INT16 win_y B16; /* X coord of drawable, if any */ - CARD16 client B16; /* to distinguish requests */ -} XETrapHeader; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_XETrapHeader sizeof(XETrapHeader) - -#define XETrapHeaderIsEvent(phdr) (XETrapGetHeaderType(phdr) == 0x1L) -#define XETrapHeaderIsRequest(phdr) (XETrapGetHeaderType(phdr) == 0x2L) -#define XETrapHeaderIsSpecial(phdr) (XETrapGetHeaderType(phdr) == 0x3L) -#define XETrapHeaderIsCursor(phdr) (XETrapGetHeaderType(phdr) == 0x4L) -#define XETrapHeaderIsReply(phdr) (XETrapGetHeaderType(phdr) == 0x5L) - -/* Define a structure used for reading/writing datum of type XTrap */ -typedef struct -{ - XETrapHeader hdr; - union - { - xEvent event; - xResourceReq req; - xGenericReply reply; - /* special? */ - } u; -} XETrapDatum; - -/* this doesn't get picked up for VMS server builds (different Xproto.h) */ -#ifndef sz_xEvent -#define sz_xEvent 32 -#endif -/* Minimum size of a packet from the server extension */ -#define XETrapMinPktSize (SIZEOF(XETrapHeader) + SIZEOF(xEvent)) - -/* Constants used with the XLIB transport */ -#define XETrapDataStart 0L /* Used in the detail field */ -#define XETrapDataContinued 1L /* Used in the detail field */ -#define XETrapDataLast 2L /* Used in the detail field */ -#define XETrapData 0L /* Used in the type field */ -#define XETrapNumberEvents 1L -/* This is the representation on the wire(see also XLib.h) */ -#define sz_EventData 24L /* 32 bytes - type, detail, seq, index */ -typedef struct { - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 idx B32; - CARD8 data[sz_EventData]; -} xETrapDataEvent; - -/* Error message indexes added to X for extension */ -#define BadIO 2L /* Can't read/write */ -#define BadStatistics 4L /* Stat's not avail. */ -#define BadDevices 5L /* Devices not vectored */ -#define BadScreen 7L /* Can't send event to given screen */ -#define BadSwapReq 8L /* Can't send swapped extension requests */ -#define XETrapNumErrors (BadSwapReq + 1) - - -#define XEKeyIsClear 0 -#define XEKeyIsEcho 1 -#define XEKeyIsOther 2 - -#endif /* __XTRAPDI__ */ diff --git a/nx-X11/include/extensions/xtrapemacros.h b/nx-X11/include/extensions/xtrapemacros.h deleted file mode 100644 index f5dc2be31..000000000 --- a/nx-X11/include/extensions/xtrapemacros.h +++ /dev/null @@ -1,387 +0,0 @@ -/* $XFree86: xc/include/extensions/xtrapemacros.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ -#ifndef __XTRAPEMACROS__ -#define __XTRAPEMACROS__ "@(#)xtrapemacros.h 1.9 - 90/09/18 " - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This include file is designed to provide the *visible* - * interface to XTrap data structures. Fields can be set - * using these macros by client programs unless otherwise - * specified; however, use of Trap Context convenience - * routines is strongly encouraged (XETrapContext.c) - */ -#include -#include - -/* msleep macro to replace msleep() for portability reasons */ -#define msleep(m) usleep((m)*1000) - -/* Copying TC's assumes that the new TC must be created */ -#define XECopyTC(src,mask,dest) \ - (dest = XECreateTC(((src)->dpy), (mask), (&((src)->values)))) - -/* Expands to SET each element of the TCValues structure - * Returns the TCValues Mask so that the Set can be entered - * as an argument to the XEChangeTC() routine call - */ -/* Note: req_cb & evt_cb would only be used if you wanted to - * *share* callbacks between Trap Contexts. Normally, - * XEAddRequestCB() and XEAddEventCB() would be used. - */ -#define XETrapSetCfgReqCB(tcv,x) ((tcv)->req_cb = (x)) -#define XETrapSetCfgEvtCB(tcv,x) ((tcv)->evt_cb = (x)) -#define XETrapSetCfgMaxPktSize(tcv,x) ((tcv)->v.max_pkt_size = (x)) -#define XETrapSetCfgCmdKey(tcv,x) ((tcv)->v.cmd_key = (x)) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapSetCfgFlags(tcv,e,a) \ - memcpy((tcv)->v.flags.e, (a), sizeof((tcv)->v.flags.e)) -#define XETrapSetCfgFlagTimestamp(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapTimestamp, (x)) -#define XETrapSetCfgFlagCmd(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCmd, (x)) -#define XETrapSetCfgFlagCmdKeyMod(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCmdKeyMod, (x)) -#define XETrapSetCfgFlagRequest(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapRequest, (x)) -#define XETrapSetCfgFlagEvent(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapEvent, (x)) -#define XETrapSetCfgFlagMaxPacket(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapMaxPacket, (x)) -#define XETrapSetCfgFlagStatistics(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapStatistics, (x)) -#define XETrapSetCfgFlagWinXY(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapWinXY, (x)) -#define XETrapSetCfgFlagCursor(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCursor, (x)) -#define XETrapSetCfgFlagReq(tcv,request,x) \ - BitSet((tcv)->v.flags.req, (request), (x)) -#define XETrapSetCfgFlagXInput(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapXInput, (x)) -#define XETrapSetCfgFlagColorReplies(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapColorReplies, (x)) -#define XETrapSetCfgFlagGrabServer(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapGrabServer, (x)) -#define XETrapSetCfgFlagEvt(tcv,evt,x) \ - BitSet((tcv)->v.flags.event, (evt), (x)) - -#define XETrapSetValFlagDeltaTimes(tcv,x) \ - BitSet((tcv)->tc_flags, XETCDeltaTimes, (x)) - -/* Fields returned in the "GetAvailable" request */ -#define XETrapGetAvailPFIdent(avail) ((avail)->pf_ident) -#define XETrapGetAvailRelease(avail) ((avail)->xtrap_release) -#define XETrapGetAvailVersion(avail) ((avail)->xtrap_version) -#define XETrapGetAvailRevision(avail) ((avail)->xtrap_revision) -#define XETrapGetAvailMaxPktSize(avail) ((avail)->max_pkt_size) -#define XETrapGetAvailFlags(avail,a) \ - memcpy((a), (avail)->valid, sizeof((avail)->valid)) -#define XETrapGetAvailFlagTimestamp(avail) \ - (BitValue((avail)->valid, XETrapTimestamp)) -#define XETrapGetAvailFlagCmd(avail) \ - (BitValue((avail)->valid, XETrapCmd)) -#define XETrapGetAvailFlagCmdKeyMod(avail) \ - (BitValue((avail)->valid, XETrapCmdKeyMod)) -#define XETrapGetAvailFlagRequest(avail) \ - (BitValue((avail)->valid, XETrapRequest)) -#define XETrapGetAvailFlagEvent(avail) \ - (BitValue((avail)->valid, XETrapEvent)) -#define XETrapGetAvailFlagMaxPacket(avail) \ - (BitValue((avail)->valid, XETrapMaxPacket)) -#define XETrapGetAvailFlagStatistics(avail) \ - (BitValue((avail)->valid, XETrapStatistics)) -#define XETrapGetAvailFlagWinXY(avail) \ - (BitValue((avail)->valid, XETrapWinXY)) -#define XETrapGetAvailFlagCursor(avail) \ - (BitValue((avail)->valid, XETrapCursor)) -#define XETrapGetAvailFlagXInput(avail) \ - (BitValue((avail)->valid, XETrapXInput)) -#define XETrapGetAvailFlagVecEvt(avail) \ - (BitValue((avail)->valid, XETrapVectorEvents)) -#define XETrapGetAvailFlagColorReplies(avail) \ - (BitValue((avail)->valid, XETrapColorReplies)) -#define XETrapGetAvailFlagGrabServer(avail) \ - (BitValue((avail)->valid, XETrapGrabServer)) -#define XETrapGetAvailOpCode(avail) ((avail)->major_opcode) -/* Macro's for creating current request and trap context macros */ -#define XETrapGetCfgMaxPktSize(cfg) ((cfg)->max_pkt_size) -#define XETrapGetCfgCmdKey(cfg) ((cfg)->cmd_key) -#define XETrapGetCfgFlags(cfg,e,a) \ - memcpy((a), (cfg)->flags.e, sizeof((cfg)->flags.e)) -#define XETrapGetCfgFlagTimestamp(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapTimestamp)) -#define XETrapGetCfgFlagCmd(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCmd)) -#define XETrapGetCfgFlagCmdKeyMod(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCmdKeyMod)) -#define XETrapGetCfgFlagRequest(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapRequest)) -#define XETrapGetCfgFlagEvent(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapEvent)) -#define XETrapGetCfgFlagMaxPacket(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapMaxPacket)) -#define XETrapGetCfgFlagStatistics(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapStatistics)) -#define XETrapGetCfgFlagWinXY(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapWinXY)) -#define XETrapGetCfgFlagCursor(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCursor)) -#define XETrapGetCfgFlagXInput(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapXInput)) -#define XETrapGetCfgFlagColorReplies(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapColorReplies)) -#define XETrapGetCfgFlagGrabServer(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapGrabServer)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetCfgFlagReq(cfg,request) \ - (BitValue((cfg)->flags.req, (request))) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetCfgFlagEvt(cfg,evt) \ - (BitValue((cfg)->flags.event, (evt))) - -/* Fields returned int the "GetCurrent" Request */ -#define XETrapGetCurX(avail) ((avail)->cur_x) -#define XETrapGetCurY(avail) ((avail)->cur_y) -#define XETrapGetCurSFlags(cur,a) \ - memcpy((a), (cur)->state_flags, sizeof((cur)->state_flags)) -#define XETrapGetCurMaxPktSize(cur) (XETrapGetCfgMaxPktSize(&((cur)->config))) -#define XETrapGetCurCmdKey(cur) (XETrapGetCfgCmdKey(&((cur)->config))) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapGetCurCFlags(cur,e,a) (XETrapGetCfgFlags(&((cur)->config),e,a)) -#define XETrapGetCurFlagTimestamp(cur,e) \ - (XETrapGetCfgFlagTimestamp(&((cur)->config),e)) -#define XETrapGetCurFlagCmd(cur,e) (XETrapGetCfgFlagCmd(&((cur)->config),e)) -#define XETrapGetCurFlagCmdKeyMod(cur,e) \ - (XETrapGetCfgFlagCmdKeyMod(&((cur)->config),e)) -#define XETrapGetCurFlagRequest(cur,r) \ - (XETrapGetCfgFlagRequest(&((cur)->config),r)) -#define XETrapGetCurFlagEvent(cur,e) \ - (XETrapGetCfgFlagEvent(&((cur)->config),e)) -#define XETrapGetCurFlagMaxPacket(cur,e) \ - (XETrapGetCfgFlagMaxPacket(&((cur)->config),e)) -#define XETrapGetCurFlagStatistics(cur,e) \ - (XETrapGetCfgFlagStatistics(&((cur)->config),e)) -#define XETrapGetCurFlagWinXY(cur,e) \ - (XETrapGetCfgFlagWinXY(&((cur)->config),e)) -#define XETrapGetCurFlagCursor(cur,e) \ - (XETrapGetCfgFlagCursor(&((cur)->config),e)) -#define XETrapGetCurFlagXInput(cur,e) \ - (XETrapGetCfgFlagXInput(&((cur)->config),e)) -#define XETrapGetCurFlagColorReplies(cur,e) \ - (XETrapGetCfgFlagColorReplies(&((cur)->config),e)) -#define XETrapGetCurFlagGrabServer(cur,e) \ - (XETrapGetCfgFlagGrabServer(&((cur)->config),e)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetCurFlagReq(cur,r) (XETrapGetCfgFlagReq(&((cur)->config),r)) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetCurFlagEvt(cur,e) (XETrapGetCfgFlagEvt(&((cur)->config),e)) - -/* Fields returned int the "GetStatistics" Request */ -#define XETrapGetStatsReq(stat,e) ((stat)->requests[(e)]) -#define XETrapGetStatsEvt(stat,e) ((stat)->events[(e)]) - -/* Fields returned in the "GetVersion" request */ -#define XETrapGetVersRelease(vers) ((vers)->xtrap_release) -#define XETrapGetVersVersion(vers) ((vers)->xtrap_version) -#define XETrapGetVersRevision(vers) ((vers)->xtrap_revision) - -/* Fields returned in the "GetLastInpTime" request */ -#define XETrapGetLastInpTime(time_rep) ((time_rep)->last_time) - -/* Expands to GET each element of the TCValues structure */ -#define XETrapGetTCReqCB(tc) ((tc)->values.req_cb) -#define XETrapGetTCEvtCB(tc) ((tc)->values.evt_cb) -#define XETrapGetTCTime(tc) ((tc)->values.last_time) -/* TC specific flags */ -#define XETrapGetTCLFlags(tc,a) \ - memcpy((a), (tc)->values.tc_flags, sizeof((tc)->values.tc_flags)) -#define XETrapGetTCFlagDeltaTimes(tc) \ - (BitValue((tc)->values.tc_flags, XETCDeltaTimes)) -#define XETrapGetTCFlagTrapActive(tc) \ - (BitValue((tc)->values.tc_flags, XETCTrapActive)) -#define XETrapGetTCMaxPktSize(tc) (XETrapGetCfgMaxPktSize(&((tc)->values.v))) -#define XETrapGetTCCmdKey(tc) (XETrapGetCfgCmdKey(&((tc)->values.v))) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapGetTCFlags(tc,e,a) (XETrapGetCfgFlags(&((tc)->values.v),e,a)) -#define XETrapGetTCFlagTimestamp(tc,e) \ - (XETrapGetCfgFlagTimestamp(&((tc)->values.v),e)) -#define XETrapGetTCFlagCmd(tc,e) \ - (XETrapGetCfgFlagCmd(&((tc)->values.v),e)) -#define XETrapGetTCFlagCmdKeyMod(tc,e) \ - (XETrapGetCfgFlagCmdKeyMod(&((tc)->values.v),e)) -#define XETrapGetTCFlagRequest(tc,r) \ - (XETrapGetCfgFlagRequest(&((tc)->values.v),r)) -#define XETrapGetTCFlagEvent(tc,e) \ - (XETrapGetCfgFlagEvent(&((tc)->values.v),e)) -#define XETrapGetTCFlagMaxPacket(tc,e) \ - (XETrapGetCfgFlagMaxPacket(&((tc)->values.v),e)) -#define XETrapGetTCFlagStatistics(tc,e) \ - (XETrapGetCfgFlagStatistics(&((tc)->values.v),e)) -#define XETrapGetTCFlagWinXY(tc,e) \ - (XETrapGetCfgFlagWinXY(&((tc)->values.v),e)) -#define XETrapGetTCFlagCursor(tc,e) \ - (XETrapGetCfgFlagCursor(&((tc)->values.v),e)) -#define XETrapGetTCFlagXInput(tc,e) \ - (XETrapGetCfgFlagXInput(&((tc)->values.v),e)) -#define XETrapGetTCFlagColorReplies(tc,e) \ - (XETrapGetCfgFlagColorReplies(&((tc)->values.v),e)) -#define XETrapGetTCFlagGrabServer(tc,e) \ - (XETrapGetCfgFlagGrabServer(&((tc)->values.v),e)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetTCFlagReq(tc,r) \ - (XETrapGetCfgFlagReq(&((tc)->values.v),r)) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetTCFlagEvt(tc,e) \ - (XETrapGetCfgFlagEvt(&((tc)->values.v),e)) -/* The following can/should *not* be set directly! */ -#define XETrapGetNext(tc) ((tc)->next) -#define XETrapGetDpy(tc) ((tc)->dpy) -#define XETrapGetEventBase(tc) ((tc)->eventBase) -#define XETrapGetErrorBase(tc) ((tc)->errorBase) -#define XETrapGetExtOpcode(tc) ((tc)->extOpcode) -#define XETrapGetXBuff(tc) ((tc)->xbuff) -#define XETrapGetXMaxSize(tc) ((tc)->xmax_size) -#define XETrapGetExt(tc) ((tc)->ext_data) -#define XETrapGetDirty(tc) ((tc)->dirty) -#define XETrapGetValues(tc) memcpy((x),(tc)->values,sizeof((tc)->values)) -#define XETrapGetEventFunc(tc) ((tc)->eventFunc) - -#define XETrapGetHeaderCount(phdr) ((phdr)->count) -#define XETrapGetHeaderTimestamp(phdr) ((phdr)->timestamp) -#define XETrapGetHeaderType(phdr) ((phdr)->type) -#define XETrapGetHeaderScreen(phdr) ((phdr)->screen) -#define XETrapGetHeaderWindowX(phdr) ((phdr)->win_x) -#define XETrapGetHeaderWindowY(phdr) ((phdr)->win_y) -#define XETrapGetHeaderClient(phdr) ((phdr)->client) - -#define XEGetRelease(tc) ((tc)->release) -#define XEGetVersion(tc) ((tc)->version) -#define XEGetRevision(tc) ((tc)->revision) - -/* Condition handling macros */ -#if !defined(vms) && \ - (!defined(_InitExceptionHandling) || !defined(_ClearExceptionHandling)) -# ifndef _SetSIGBUSHandling -# ifdef SIGBUS -# define _SetSIGBUSHandling(rtn) (void)signal(SIGBUS, rtn) -# else -# define _SetSIGBUSHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGSEGVHandling -# ifdef SIGSEGV -# define _SetSIGSEGVHandling(rtn) (void)signal(SIGSEGV, rtn) -# else -# define _SetSIGSEGVHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGFPEHandling -# ifdef SIGFPE -# define _SetSIGFPEHandling(rtn) (void)signal(SIGFPE, rtn) -# else -# define _SetSIGFPEHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGILLHandling -# ifdef SIGILL -# define _SetSIGILLHandling(rtn) (void)signal(SIGILL, rtn) -# else -# define _SetSIGILLHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGSYSHandling -# ifdef SIGSYS -# define _SetSIGSYSHandling(rtn) (void)signal(SIGSYS, rtn) -# else -# define _SetSIGSYSHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGHUPHandling -# ifdef SIGHUP -# define _SetSIGHUPHandling(rtn) (void)signal(SIGHUP, rtn) -# else -# define _SetSIGHUPHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGPIPEHandling -# ifdef SIGPIPE -# define _SetSIGPIPEHandling(rtn) (void)signal(SIGPIPE, rtn) -# else -# define _SetSIGPIPEHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGTERMHandling -# ifdef SIGTERM -# define _SetSIGTERMHandling(rtn) (void)signal(SIGTERM, rtn) -# else -# define _SetSIGTERMHandling(rtn) /* */ -# endif -# endif -#endif -#ifndef _InitExceptionHandling -#ifdef vms -#define _InitExceptionHandling(rtn) \ - VAXC$ESTABLISH(rtn) /* VMS exception handler */ -#else /* vms */ -#define _InitExceptionHandling(rtn) \ - _SetSIGBUSHandling(rtn); /* Bus error */ \ - _SetSIGSEGVHandling(rtn); /* Accvio/Segment error */ \ - _SetSIGFPEHandling(rtn); /* Floating point exception */ \ - _SetSIGILLHandling(rtn); /* Illegal instruction */ \ - _SetSIGSYSHandling(rtn); /* Param error in sys call */ \ - _SetSIGHUPHandling(rtn); \ - _SetSIGPIPEHandling(rtn); \ - _SetSIGTERMHandling(rtn) -#endif /* vms */ -#endif /* _InitExceptionHandling */ - -#ifndef _ClearExceptionHandling -#ifdef vms -#define _ClearExceptionHandling() \ - LIB$REVERT() -#else -#define _ClearExceptionHandling() \ - _SetSIGBUSHandling(SIG_DFL); /* Bus error */ \ - _SetSIGSEGVHandling(SIG_DFL); /* Accvio/Segment error */ \ - _SetSIGFPEHandling(SIG_DFL); /* Floating point exception */ \ - _SetSIGILLHandling(SIG_DFL); /* Illegal instruction */ \ - _SetSIGSYSHandling(SIG_DFL); /* Param error in sys call */ \ - _SetSIGHUPHandling(SIG_DFL); \ - _SetSIGPIPEHandling(SIG_DFL); \ - _SetSIGTERMHandling(SIG_DFL) -#endif /* vms */ -#endif /* _ClearExceptionHandling */ - -#endif /* __XTRAPEMACROS__ */ diff --git a/nx-X11/include/extensions/xtraplib.h b/nx-X11/include/extensions/xtraplib.h deleted file mode 100644 index b733dac7f..000000000 --- a/nx-X11/include/extensions/xtraplib.h +++ /dev/null @@ -1,128 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPLIB__ -#define __XTRAPLIB__ - - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file describes all the structures/constants required - * for interfacing with the client toolkit *except* the common - * client/extension definitions in xtrapdi.h. Namely, *no* extension- - * only information or client/extension information can be found here. - */ -#ifdef SMT -#define NEED_EVENTS -#define NEED_REPLIES -#endif -#include -#include -#include -#include - -typedef struct /* Callback structure */ -{ - void_function func; - BYTE *data; -} XETrapCB; - -/* Data structure for setting trap context */ -typedef struct -{ - CARD8 tc_flags[2L]; /* Toolkit-side specific flags */ - XETrapCfg v; /* XTrap configuration values */ - XETrapCB *req_cb; /* Pointer to Request Callbacks */ - XETrapCB *evt_cb; /* Pointer to Event Callbacks (starting at 2) */ - CARD32 last_time B32; /* Last (delta) timestamp */ -} XETCValues; - - /* bits 0 thru 6 are formerly "families" (now obsolete) */ -#define XETCDeltaTimes 7 -#define XETCTrapActive 8 - /* bits 9 thru 15 are reserved for future expansion */ - -/* Values bit masks (used when determining what's dirty */ -#define TCStatistics (1L<<0L) -#define TCRequests (1L<<1L) -#define TCEvents (1L<<2L) -#define TCMaxPacket (1L<<3L) -#define TCCmdKey (1L<<4L) -#define TCTimeStamps (1L<<5L) -#define TCWinXY (1L<<6L) -#define TCXInput (1L<<7L) -#define TCReqCBs (1L<<8L) -#define TCEvtCBs (1L<<9L) -#define TCCursor (1L<<10L) -#define TCColorReplies (1L<<11L) -#define TCGrabServer (1L<<12L) - -/* This is the representation we use in the library code for XLib transport */ -typedef struct { - int type; - unsigned long serial; - Bool synthetic; - Display *display; - int detail; - unsigned long idx; - unsigned char data[sz_EventData]; -} XETrapDataEvent; - -/* Trap Context structure for maintaining XTrap State for client */ -typedef struct _XETC -{ - struct _XETC *next; /* Ptr to next linked-listed TC */ - Display *dpy; /* Display ptr of current TC */ - INT32 eventBase /*B32*/; /* First event value */ - INT32 errorBase /*B32*/; /* First error value */ - INT32 extOpcode /*B32*/; /* Major opcode of the extension */ - BYTE *xbuff; /* Pointer to buffer for XLib Communications */ - CARD16 xmax_size /*B16*/; /* Max Size of a request */ - XExtData *ext_data; /* hook for extension to hang data */ - /* - * The following are initialized with the client-side version number - * However, when either a GetAvailable or GetVersion reply is received, - * these values are updated with the *oldest* version numbers. - */ - CARD16 release /*B16*/; /* The extension release number */ - CARD16 version /*B16*/; /* The xtrap extension version number */ - CARD16 revision /*B16*/; /* The xtrap extension revision number */ - CARD16 protocol /*B16*/; /* The xtrap extension protocol number */ - unsigned dirty /*B32*/; /* cache dirty bits */ - XETCValues values; /* shadow structure of values */ - Boolean (*eventFunc[XETrapNumberEvents])(XETrapDataEvent *event, struct _XETC *tc); -} XETC; - - -#endif /* __XTRAPLIB__ */ diff --git a/nx-X11/include/extensions/xtraplibp.h b/nx-X11/include/extensions/xtraplibp.h deleted file mode 100644 index 087ba6e64..000000000 --- a/nx-X11/include/extensions/xtraplibp.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPLIBP__ -#define __XTRAPLIBP__ - - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file contains the function prototypes for client/toolkit - * routines sorted by module (globally defined routines *only*). - */ - -/* XEConTxt.c */ -XETC *XECreateTC (Display *dpy , CARD32 valuemask , XETCValues *value ); -int XEChangeTC (XETC *tc , CARD32 mask , XETCValues *values ); -void XEFreeTC (XETC *tc ); -int XETrapSetMaxPacket (XETC *tc , Bool set_flag , CARD16 size ); -int XETrapSetCommandKey (XETC *tc , Bool set_flag , KeySym cmd_key , - Bool mod_flag ); -int XETrapSetTimestamps (XETC *tc , Bool set_flag , Bool delta_flag ); -int XETrapSetWinXY (XETC *tc , Bool set_flag ); -int XETrapSetCursor (XETC *tc , Bool set_flag ); -int XETrapSetXInput (XETC *tc , Bool set_flag ); -int XETrapSetColorReplies (XETC *tc , Bool set_flag ); -int XETrapSetGrabServer (XETC *tc , Bool set_flag ); -int XETrapSetStatistics (XETC *tc , Bool set_flag ); -int XETrapSetRequests (XETC *tc , Bool set_flag , ReqFlags requests ); -int XETrapSetEvents (XETC *tc , Bool set_flag , EventFlags events ); -Bool XESetCmdGateState (XETC *tc , CARD8 type, Bool *gate_closed , - CARD8 *next_key , Bool *key_ignore ); - -/* XERqsts.c */ -int XEFlushConfig (XETC *tc ); -int XEResetRequest (XETC *tc ); -int XEGetVersionRequest (XETC *tc , XETrapGetVersRep *ret ); -int XEGetLastInpTimeRequest (XETC *tc , XETrapGetLastInpTimeRep *ret ); -int XEGetAvailableRequest (XETC *tc , XETrapGetAvailRep *ret ); -int XEStartTrapRequest (XETC *tc ); -int XEStopTrapRequest (XETC *tc ); -int XESimulateXEventRequest (XETC *tc , CARD8 type , CARD8 detail , - CARD16 x , CARD16 y , CARD8 screen ); -int XEGetCurrentRequest (XETC *tc , XETrapGetCurRep *ret ); -int XEGetStatisticsRequest (XETC *tc , XETrapGetStatsRep *ret ); - -/* XECallBcks.c */ -int XEAddRequestCB (XETC *tc , CARD8 req , void_function func , BYTE *data ); -int XEAddRequestCBs (XETC *tc , ReqFlags req_flags , void_function func , - BYTE *data ); -int XEAddEventCB (XETC *tc , CARD8 evt , void_function func , BYTE *data ); -int XEAddEventCBs (XETC *tc , EventFlags evt_flags , void_function func , - BYTE *data ); - -/* The following seem to never be used. Perhaps they should be removed */ -void XERemoveRequestCB (XETC *tc, CARD8 req); -void XERemoveRequestCBs (XETC *tc, ReqFlags req_flags); -void XERemoveAllRequestCBs (XETC *tc); -void XERemoveEventCB (XETC *tc, CARD8 evt); -void XERemoveEventCBs (XETC *tc, EventFlags evt_flags); -void XERemoveAllEventCBs (XETC *tc); - - -/* XEDsptch.c */ -Boolean XETrapDispatchXLib (XETrapDataEvent *event , XETC *tc); - -/* XEWrappers.c */ -Boolean XETrapDispatchEvent (XEvent *pevent , XETC *tc ); -XtInputMask XETrapAppPending (XtAppContext app); -void XETrapAppMainLoop (XtAppContext app , XETC *tc ); -int XETrapAppWhileLoop (XtAppContext app , XETC *tc , Bool *done ); -int XETrapWaitForSomething (XtAppContext app ); -Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc))) (XETrapDataEvent *event, XETC *tc); - -/* XEPrInfo.c */ -void XEPrintRelease (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkRelease ( FILE *ofp, XETC *tc); -void XEPrintPlatform (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintAvailFlags (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintAvailPktSz (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintStateFlags (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintMajOpcode (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintCurXY (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkFlags (FILE *ofp , XETC *tc ); -void XEPrintLastTime (FILE *ofp , XETC *tc ); -void XEPrintCfgFlags (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintRequests (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintEvents (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintCurPktSz (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintCmdKey (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintEvtStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); -void XEPrintReqStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); -void XEPrintAvail (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkState (FILE *ofp , XETC *tc ); -void XEPrintCurrent (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintStatistics (FILE *ofp , XETrapGetStatsRep *pstats, XETC *tc ); - -/* XEStrMap.c */ -INT16 XEEventStringToID (char *string ); -INT16 XERequestStringToID (char *string ); -CARD32 XEPlatformStringToID (char *string ); -char *XEEventIDToString (CARD8 id , XETC *tc); -char *XERequestIDToExtString (register CARD8 id , XETC *tc); -char *XERequestIDToString (CARD8 id , XETC *tc); -char *XEPlatformIDToString (CARD32 id ); - -/* XETrapInit.c */ -Bool XETrapQueryExtension (Display *dpy,INT32 *event_base_return, - INT32 *error_base_return, INT32 *opcode_return); - - -#endif /* __XTRAPLIBP__ */ diff --git a/nx-X11/include/extensions/xtrapproto.h b/nx-X11/include/extensions/xtrapproto.h deleted file mode 100644 index 7eb8f9d47..000000000 --- a/nx-X11/include/extensions/xtrapproto.h +++ /dev/null @@ -1,168 +0,0 @@ -/* $XFree86: xc/include/extensions/xtrapproto.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ - -#ifndef __XTRAPPROTO__ -#define __XTRAPPROTO__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file contains the function prototypes for extension - * routines sorted by module (globally defined routines *only*). - */ -#ifndef Bool -# define Bool int -#endif -/* xtrapdi.c */ -int XETrapDestroyEnv (void * value , XID id ); -void XETrapCloseDown ( ExtensionEntry *extEntry ); -Bool XETrapRedirectDevices (void ); -void DEC_XTRAPInit (void ); -int XETrapCreateEnv (ClientPtr client ); -int XETrapDispatch (ClientPtr client ); -int sXETrapDispatch (ClientPtr client ); -int XETrapReset (xXTrapReq *request , ClientPtr client ); -int XETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); -int XETrapGetCurrent (xXTrapReq *request , ClientPtr client ); -int XETrapGetStatistics (xXTrapReq *request , ClientPtr client ); -int XETrapConfig (xXTrapConfigReq *request , ClientPtr client ); -int XETrapStartTrap (xXTrapReq *request , ClientPtr client ); -int XETrapStopTrap (xXTrapReq *request , ClientPtr client ); -int XETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); -int XETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); -int XETrapRequestVector (ClientPtr client ); -int XETrapKeyboard (xEvent *x_event , DevicePtr keybd , int count ); -#ifndef VECTORED_EVENTS -int XETrapPointer (xEvent *x_event , DevicePtr ptrdev , int count ); -#else -int XETrapEventVector (ClientPtr client , xEvent *x_event ); -#endif -void XETrapStampAndMail (xEvent *x_event ); -void sReplyXTrapDispatch (ClientPtr client , int size , char *reply ); -int XETrapWriteXLib (XETrapEnv *penv , BYTE *data , CARD32 nbytes ); - -/* xtrapddmi.c */ -void XETrapPlatformSetup (void ); -int XETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); - -/* xtrapdiswap.c */ -int sXETrapReset (xXTrapReq *request , ClientPtr client ); -int sXETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); -int sXETrapConfig (xXTrapConfigReq *request , ClientPtr client ); -int sXETrapStartTrap (xXTrapReq *request , ClientPtr client ); -int sXETrapStopTrap (xXTrapReq *request , ClientPtr client ); -int sXETrapGetCurrent (xXTrapReq *request , ClientPtr client ); -int sXETrapGetStatistics (xXTrapReq *request , ClientPtr client ); -int sXETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); -int sXETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); -int sXETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); -void sReplyXETrapGetAvail (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetVers (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetLITim (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetCur (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetStats (ClientPtr client , int size , char *reply ); -void sXETrapHeader (XETrapHeader *hdr ); -void XETSwSimpleReq (xReq *data ); -void XETSwResourceReq (xResourceReq *data ); -void XETSwCreateWindow (xCreateWindowReq *data , ClientPtr client ); -void XETSwChangeWindowAttributes (xChangeWindowAttributesReq *data , ClientPtr client ); -void XETSwReparentWindow (xReparentWindowReq *data ); -void XETSwConfigureWindow (xConfigureWindowReq *data , ClientPtr client ); -void XETSwInternAtom (xInternAtomReq *data ); -void XETSwChangeProperty (xChangePropertyReq *data ); -void XETSwDeleteProperty (xDeletePropertyReq *data ); -void XETSwGetProperty (xGetPropertyReq *data ); -void XETSwSetSelectionOwner (xSetSelectionOwnerReq *data ); -void XETSwConvertSelection (xConvertSelectionReq *data ); -void XETSwSendEvent (xSendEventReq *data ); -void XETSwGrabPointer (xGrabPointerReq *data ); -void XETSwGrabButton (xGrabButtonReq *data ); -void XETSwUngrabButton (xUngrabButtonReq *data ); -void XETSwChangeActivePointerGrab (xChangeActivePointerGrabReq *data ); -void XETSwGrabKeyboard (xGrabKeyboardReq *data ); -void XETSwGrabKey (xGrabKeyReq *data ); -void XETSwUngrabKey (xUngrabKeyReq *data ); -void XETSwGetMotionEvents (xGetMotionEventsReq *data ); -void XETSwTranslateCoords (xTranslateCoordsReq *data ); -void XETSwWarpPointer (xWarpPointerReq *data ); -void XETSwSetInputFocus (xSetInputFocusReq *data ); -void XETSwOpenFont (xOpenFontReq *data ); -void XETSwListFonts (xListFontsReq *data ); -void XETSwListFontsWithInfo (xListFontsWithInfoReq *data ); -void XETSwSetFontPath (xSetFontPathReq *data ); -void XETSwCreatePixmap (xCreatePixmapReq *data ); -void XETSwCreateGC (xCreateGCReq *data , ClientPtr client ); -void XETSwChangeGC (xChangeGCReq *data , ClientPtr client ); -void XETSwCopyGC (xCopyGCReq *data ); -void XETSwSetDashes (xSetDashesReq *data ); -void XETSwSetClipRectangles (xSetClipRectanglesReq *data , ClientPtr client ); -void XETSwClearToBackground (xClearAreaReq *data ); -void XETSwCopyArea (xCopyAreaReq *data ); -void XETSwCopyPlane (xCopyPlaneReq *data ); -void XETSwPoly (xPolyPointReq *data , ClientPtr client ); -void XETSwFillPoly (xFillPolyReq *data , ClientPtr client ); -void XETSwPutImage (xPutImageReq *data ); -void XETSwGetImage (xGetImageReq *data ); -void XETSwPolyText (xPolyTextReq *data ); -void XETSwImageText (xImageTextReq *data ); -void XETSwCreateColormap (xCreateColormapReq *data ); -void XETSwCopyColormapAndFree (xCopyColormapAndFreeReq *data ); -void XETSwAllocColor (xAllocColorReq *data ); -void XETSwAllocNamedColor (xAllocNamedColorReq *data ); -void XETSwAllocColorCells (xAllocColorCellsReq *data ); -void XETSwAllocColorPlanes (xAllocColorPlanesReq *data ); -void XETSwFreeColors (xFreeColorsReq *data , ClientPtr client ); -void XETSwStoreColors (xStoreColorsReq *data , ClientPtr client ); -void XETSwStoreNamedColor (xStoreNamedColorReq *data ); -void XETSwQueryColors (xQueryColorsReq *data , ClientPtr client ); -void XETSwLookupColor (xLookupColorReq *data ); -void XETSwCreateCursor (xCreateCursorReq *data ); -void XETSwCreateGlyphCursor (xCreateGlyphCursorReq *data ); -void XETSwRecolorCursor (xRecolorCursorReq *data ); -void XETSwQueryBestSize (xQueryBestSizeReq *data ); -void XETSwQueryExtension (xQueryExtensionReq *data ); -void XETSwChangeKeyboardMapping (xChangeKeyboardMappingReq *data ); -void XETSwChangeKeyboardControl (xChangeKeyboardControlReq *data , ClientPtr client ); -void XETSwChangePointerControl (xChangePointerControlReq *data ); -void XETSwSetScreenSaver (xSetScreenSaverReq *data ); -void XETSwChangeHosts (xChangeHostsReq *data ); -void XETSwRotateProperties (xRotatePropertiesReq *data , ClientPtr client ); -void XETSwNoOperation (xReq *data ); -#ifdef vms -void SwapLongs (long *list , unsigned long count ); -void SwapShorts (short *list , unsigned long count ); -int SwapColorItem (xColorItem *pItem ); -#endif /* vms */ - - -#endif /* __XTRAPPROTO__ */ diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index c43361f12..065667123 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -31,12 +31,12 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines DEFINES = $(ALLOC_DEFINES) INCLUDES = -I$(XLIBSRC) - SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ - MITMisc.c XTestExt1.c XSync.c Xdbe.c XLbx.c \ - XSecurity.c XAppgroup.c Xcup.c DPMS.c XEVI.c - OBJS = globals.o extutil.o XMultibuf.o XShape.o $(SHMOBJS) \ - MITMisc.o XTestExt1.o XSync.o Xdbe.o XLbx.o \ - XSecurity.o XAppgroup.o Xcup.o DPMS.o XEVI.o + SRCS = globals.c extutil.c XShape.c $(SHMSRCS) \ + XTestExt1.c XSync.c \ + XSecurity.c DPMS.c + OBJS = globals.o extutil.o XShape.o $(SHMOBJS) \ + XTestExt1.o XSync.o \ + XSecurity.o DPMS.o LINTLIBS = $(LINTXLIB) #include diff --git a/nx-X11/lib/Xext/MITMisc.c b/nx-X11/lib/Xext/MITMisc.c deleted file mode 100644 index 8ba35dce1..000000000 --- a/nx-X11/lib/Xext/MITMisc.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * $Xorg: MITMisc.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - */ -/* $XFree86: xc/lib/Xext/MITMisc.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM BLESSING */ - -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -static XExtensionInfo _mit_info_data; -static XExtensionInfo *mit_info = &_mit_info_data; -static /* const */ char *mit_extension_name = MITMISCNAME; - -#define MITCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, mit_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks mit_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, mit_info, mit_extension_name, - &mit_extension_hooks, MITMiscNumberEvents, - NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, mit_info) - - -/***************************************************************************** - * * - * public routines * - * * - *****************************************************************************/ - -Bool XMITMiscQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status XMITMiscSetBugMode(Display *dpy, Bool onOff) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMITSetBugModeReq *req; - - MITCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(MITSetBugMode, req); - req->reqType = info->codes->major_opcode; - req->mitReqType = X_MITSetBugMode; - req->onOff = onOff; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Bool XMITMiscGetBugMode(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMITGetBugModeReq *req; - xMITGetBugModeReply rep; - - MITCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(MITGetBugMode, req); - req->reqType = info->codes->major_opcode; - req->mitReqType = X_MITGetBugMode; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.onOff; -} diff --git a/nx-X11/lib/Xext/XAppgroup.c b/nx-X11/lib/Xext/XAppgroup.c deleted file mode 100644 index abbf1c1b9..000000000 --- a/nx-X11/lib/Xext/XAppgroup.c +++ /dev/null @@ -1,391 +0,0 @@ -/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.11 2002/10/16 02:19:22 dawes Exp $ */ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $Xorg: XAppgroup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ - -#ifdef WIN32 -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#endif - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -#include - -struct xagstuff { - int attrib_mask; - Bool app_group_leader; - Bool single_screen; - Window default_root; - VisualID root_visual; - Colormap default_colormap; - unsigned long black_pixel; - unsigned long white_pixel; -}; - -static XExtensionInfo _xag_info_data; -static XExtensionInfo *xag_info = &_xag_info_data; -static char *xag_extension_name = XAGNAME; - -#define XagCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xag_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks xag_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xag_info, - xag_extension_name, - &xag_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xag_info) - - -/***************************************************************************** - * * - * public Xag Extension routines * - * * - *****************************************************************************/ - -Bool -XagQueryVersion( - Display *dpy, - int *major_version_return, - int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagQueryVersionReply rep; - xXagQueryVersionReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagQueryVersion; - req->client_major_version = XAG_MAJOR_VERSION; - req->client_minor_version = XAG_MINOR_VERSION; - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major_version_return = rep.server_major_version; - *minor_version_return = rep.server_minor_version; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -static void -StuffToWire (Display *dpy, struct xagstuff *stuff, xXagCreateReq *req) -{ - unsigned long values[8]; - unsigned long* value = values; - unsigned int nvalues; - - /* the order these are in is important */ - if (stuff->attrib_mask & XagSingleScreenMask) - *value++ = stuff->single_screen; - - if (stuff->attrib_mask & XagDefaultRootMask) - *value++ = stuff->default_root; - - if (stuff->attrib_mask & XagRootVisualMask) - *value++ = stuff->root_visual; - - if (stuff->attrib_mask & XagDefaultColormapMask) - *value++ = stuff->default_colormap; - - if (stuff->attrib_mask & XagBlackPixelMask) - *value++ = stuff->black_pixel; - - if (stuff->attrib_mask & XagWhitePixelMask) - *value++ = stuff->white_pixel; - - if (stuff->attrib_mask & XagAppGroupLeaderMask) - *value++ = stuff->app_group_leader; - - req->length += (nvalues = value - values); - - nvalues <<= 2; - Data32 (dpy, (long*) values, (long) nvalues); -} - -Bool -XagCreateEmbeddedApplicationGroup( - Display* dpy, - VisualID root_visual, - Colormap default_colormap, - unsigned long black_pixel, - unsigned long white_pixel, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagCreateReq *req; - struct xagstuff stuff; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - stuff.app_group_leader = True; - stuff.single_screen = True; - stuff.default_root = RootWindow (dpy, DefaultScreen(dpy)); - stuff.root_visual = root_visual; - stuff.default_colormap = default_colormap; - stuff.attrib_mask = - XagAppGroupLeaderMask | XagSingleScreenMask | XagDefaultRootMask | - XagRootVisualMask | XagDefaultColormapMask; - if (default_colormap != None) { - stuff.black_pixel = black_pixel; - stuff.white_pixel = white_pixel; - stuff.attrib_mask |= XagBlackPixelMask | XagWhitePixelMask; - } - /* might do some validation here */ - GetReq(XagCreate, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreate; - *app_group_return = req->app_group = XAllocID(dpy); - req->attrib_mask = stuff.attrib_mask; - StuffToWire (dpy, &stuff, req); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagCreateNonembeddedApplicationGroup( - Display* dpy, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagCreateReq *req; - struct xagstuff stuff; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - stuff.app_group_leader = False; - stuff.single_screen = False; - stuff.attrib_mask = XagAppGroupLeaderMask | XagSingleScreenMask; - /* might do some validation here */ - GetReq(XagCreate, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreate; - *app_group_return = req->app_group = XAllocID(dpy); - req->attrib_mask = stuff.attrib_mask; - StuffToWire (dpy, &stuff, req); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool XagDestroyApplicationGroup(Display* dpy, XAppGroup app_group) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagDestroyReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagDestroy, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagDestroy; - req->app_group = app_group; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagGetApplicationGroupAttributes(Display* dpy, XAppGroup app_group, ...) -{ - va_list var; - XExtDisplayInfo *info = find_display (dpy); - xXagGetAttrReq *req; - xXagGetAttrReply rep; - int attr; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagGetAttr, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagGetAttr; - req->app_group = app_group; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - va_start (var, app_group); - for (attr = va_arg(var, int); attr != 0; attr = va_arg(var, int)) { - void* ptr; - - switch (attr) { - case XagNappGroupLeader: - ptr = va_arg(var, void*); - *(Bool*)ptr = rep.app_group_leader; - break; - case XagNsingleScreen: - ptr = va_arg(var, void*); - *(Bool*)ptr = rep.single_screen; - break; - case XagNdefaultRoot: - ptr = va_arg(var, void*); - *(Window*)ptr = rep.default_root; - break; - case XagNrootVisual: - ptr = va_arg(var, void*); - *(VisualID*)ptr = rep.root_visual; - break; - case XagNdefaultColormap: - ptr = va_arg(var, void*); - *(Colormap*)ptr = rep.default_colormap; - break; - case XagNblackPixel: - ptr = va_arg(var, void*); - *(unsigned long*)ptr = rep.black_pixel; - break; - case XagNwhitePixel: - ptr = va_arg(var, void*); - *(unsigned long*)ptr = rep.white_pixel; - break; - } - } - va_end (var); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagQueryApplicationGroup( - Display* dpy, - XID resource, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagQueryReq *req; - xXagQueryReply rep; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagQuery, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagQuery; - req->resource = resource; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *app_group_return = rep.app_group; - UnlockDisplay(dpy); - SyncHandle(); - return True; - -} - -Bool -XagCreateAssociation(Display* dpy, Window* window_return, void* system_window) -{ -#ifdef WIN32 - long tmp = *(HWND*) system_window; - XExtDisplayInfo *info = find_display (dpy); - xXagCreateAssocReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagCreateAssoc, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreateAssoc; - *window_return = req->window = XAllocID(dpy); - req->window_type = XagWindowTypeWin32; - req->system_window_len = sizeof(HWND); - Data32 (dpy, (long*) tmp, 1L); - req->length++; - UnlockDisplay(dpy); - SyncHandle(); -#else - /* other platforms go here */ - - /* this whole thing could be arranged better, but since X need - * only short-circuit the protocol and WIN32 is the only other - * platform the XC supports, it will suffice for now. - */ - *window_return = *(Window*)system_window; -#endif - return True; -} - -Bool -XagDestroyAssociation(Display* dpy, Window window) -{ -#ifdef WIN32 - XExtDisplayInfo *info = find_display (dpy); - xXagDestroyAssocReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagDestroyAssoc, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagDestroyAssoc; - req->window = window; - UnlockDisplay(dpy); - SyncHandle(); -#endif - return True; -} - diff --git a/nx-X11/lib/Xext/XEVI.c b/nx-X11/lib/Xext/XEVI.c deleted file mode 100644 index e5a811bdf..000000000 --- a/nx-X11/lib/Xext/XEVI.c +++ /dev/null @@ -1,213 +0,0 @@ -/* $Xorg: XEVI.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -static XExtensionInfo *xevi_info;/* needs to move to globals.c */ -static /* const */ char *xevi_extension_name = EVINAME; -#define XeviCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xevi_extension_name, val) -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ -static /* const */ XExtensionHooks xevi_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - NULL, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; -static XEXT_GENERATE_FIND_DISPLAY (find_display, xevi_info, - xevi_extension_name, - &xevi_extension_hooks, 0, NULL) -Bool XeviQueryExtension (Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - if (XextHasExtension(info)) { - return True; - } else { - return False; - } -} -Bool XeviQueryVersion(Display *dpy, int *majorVersion, int *minorVersion) -{ - XExtDisplayInfo *info = find_display (dpy); - xEVIQueryVersionReply rep; - register xEVIQueryVersionReq *req; - XeviCheckExtension (dpy, info, False); - LockDisplay(dpy); - GetReq(EVIQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xeviReqType = X_EVIQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} -static Bool notInList(VisualID32 *visual, int sz_visual, VisualID newVisualid) -{ - while (sz_visual-- > 0) { - if (*visual == newVisualid) - return False; - visual++; - } - return True; -} -Status XeviGetVisualInfo( - register Display *dpy, - VisualID *visual, - int n_visual, - ExtendedVisualInfo **evi_return, - int *n_info_return) -{ - XExtDisplayInfo *info = find_display (dpy); - register xEVIGetVisualInfoReq *req; - xEVIGetVisualInfoReply rep; - int sz_info, sz_xInfo, sz_conflict, sz_xConflict; - VisualID32 *temp_conflict, *temp_visual, *xConflictPtr; - VisualID *conflict; - xExtendedVisualInfo *temp_xInfo; - XVisualInfo *vinfo; - register ExtendedVisualInfo *infoPtr; - register xExtendedVisualInfo *xInfoPtr; - register int n_data, visualIndex, vinfoIndex; - Bool isValid; - XeviCheckExtension (dpy, info, 0); - *n_info_return = 0; - *evi_return = NULL; - vinfo = XGetVisualInfo(dpy, 0, NULL, &sz_info); - if (!vinfo) { - return BadValue; - } - if (!n_visual || !visual) { /* copy the all visual */ - temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * sz_info); - n_visual = 0; - for (vinfoIndex = 0; vinfoIndex < sz_info; vinfoIndex++) - if (notInList(temp_visual, n_visual, vinfo[vinfoIndex].visualid)) - temp_visual[n_visual++] = vinfo[vinfoIndex].visualid; - } - else { /* check if the visual is valid */ - for (visualIndex = 0; visualIndex < n_visual; visualIndex++) { - isValid = False; - for (vinfoIndex = 0; vinfoIndex < sz_info; vinfoIndex++) { - if (visual[visualIndex] == vinfo[vinfoIndex].visualid) { - isValid = True; - break; - } - } - if (!isValid) { - XFree(vinfo); - return BadValue; - } - } - temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * n_visual); - for (visualIndex = 0; visualIndex < n_visual; visualIndex++) - temp_visual[visualIndex] = visual[visualIndex]; - } - XFree(vinfo); - LockDisplay(dpy); - GetReq(EVIGetVisualInfo, req); - req->reqType = info->codes->major_opcode; - req->xeviReqType = X_EVIGetVisualInfo; - req->n_visual = n_visual; - SetReqLen(req, n_visual, 1); - Data(dpy, (char *)temp_visual, n_visual * sz_VisualID32); - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - Xfree(temp_visual); - return BadAccess; - } - Xfree(temp_visual); - sz_info = rep.n_info * sizeof(ExtendedVisualInfo); - sz_xInfo = rep.n_info * sz_xExtendedVisualInfo; - sz_conflict = rep.n_conflicts * sizeof(VisualID); - sz_xConflict = rep.n_conflicts * sz_VisualID32; - infoPtr = *evi_return = (ExtendedVisualInfo *)Xmalloc(sz_info + sz_conflict); - xInfoPtr = temp_xInfo = (xExtendedVisualInfo *)Xmalloc(sz_xInfo); - xConflictPtr = temp_conflict = (VisualID32 *)Xmalloc(sz_xConflict); - if (!*evi_return || !temp_xInfo || !temp_conflict) { - _XEatData(dpy, (sz_xInfo + sz_xConflict + 3) & ~3); - UnlockDisplay(dpy); - SyncHandle(); - if (evi_return) - Xfree(evi_return); - if (temp_xInfo) - Xfree(temp_xInfo); - if (temp_conflict) - Xfree(temp_conflict); - return BadAlloc; - } - _XRead(dpy, (char *)temp_xInfo, sz_xInfo); - _XRead(dpy, (char *)temp_conflict, sz_xConflict); - UnlockDisplay(dpy); - SyncHandle(); - n_data = rep.n_info; - conflict = (VisualID *)(infoPtr + n_data); - while (n_data-- > 0) { - infoPtr->core_visual_id = xInfoPtr->core_visual_id; - infoPtr->screen = xInfoPtr->screen; - infoPtr->level = xInfoPtr->level; - infoPtr->transparency_type = xInfoPtr->transparency_type; - infoPtr->transparency_value = xInfoPtr->transparency_value; - infoPtr->min_hw_colormaps = xInfoPtr->min_hw_colormaps; - infoPtr->max_hw_colormaps = xInfoPtr->max_hw_colormaps; - infoPtr->num_colormap_conflicts = xInfoPtr->num_colormap_conflicts; - infoPtr->colormap_conflicts = conflict; - conflict += infoPtr->num_colormap_conflicts; - infoPtr++; - xInfoPtr++; - } - n_data = rep.n_conflicts; - conflict = (VisualID *)(infoPtr); - while (n_data-- > 0) - *conflict++ = *xConflictPtr++; - Xfree(temp_xInfo); - Xfree(temp_conflict); - *n_info_return = rep.n_info; - return Success; -} diff --git a/nx-X11/lib/Xext/XLbx.c b/nx-X11/lib/Xext/XLbx.c deleted file mode 100644 index 450bd5bc5..000000000 --- a/nx-X11/lib/Xext/XLbx.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * $Xorg: XLbx.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ - * - * Copyright 1992 Network Computing Devices - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - * Author: Keith Packard, Network Computing Devices - */ -/* $XFree86: xc/lib/Xext/XLbx.c,v 1.4 2002/10/16 00:37:27 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _lbx_info_data; -static XExtensionInfo *lbx_info = &_lbx_info_data; -static /* const */ char *lbx_extension_name = LBXNAME; - -#define LbxCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, lbx_extension_name, val) - -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); -static /* const */ XExtensionHooks lbx_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static /* const */ char *lbx_error_list[] = { - "BadLbxClient", /* BadLbxClient */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, lbx_info, lbx_extension_name, - &lbx_extension_hooks, LbxNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, lbx_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, lbx_extension_name, - LbxNumberErrors, lbx_error_list) - - -Bool XLbxQueryExtension ( - Display *dpy, - int *requestp, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *requestp = info->codes->major_opcode; - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -int XLbxGetEventBase(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - return info->codes->first_event; - } else { - return -1; - } -} - - -Bool XLbxQueryVersion(Display *dpy, int *majorVersion, int *minorVersion) -{ - XExtDisplayInfo *info = find_display (dpy); - xLbxQueryVersionReply rep; - register xLbxQueryVersionReq *req; - - LbxCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(LbxQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->lbxReqType = X_LbxQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* all other requests will run after Xlib has lost the wire ... */ diff --git a/nx-X11/lib/Xext/XMultibuf.c b/nx-X11/lib/Xext/XMultibuf.c deleted file mode 100644 index 570676def..000000000 --- a/nx-X11/lib/Xext/XMultibuf.c +++ /dev/null @@ -1,714 +0,0 @@ -/* - * $Xorg: XMultibuf.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Authors: Jim Fulton, MIT X Consortium - */ -/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.5 2001/12/14 19:55:00 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -static XExtensionInfo _multibuf_info_data; -static XExtensionInfo *multibuf_info = &_multibuf_info_data; -static /* const */ char *multibuf_extension_name = MULTIBUFFER_PROTOCOL_NAME; - -#define MbufCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, multibuf_extension_name, val) -#define MbufSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, multibuf_extension_name) - - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -/* - * find_display - locate the display info block - */ -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, char *buf, int n); -static Bool wire_to_event(Display *dpy, XEvent *libevent, xEvent *netevent); -static Status event_to_wire(Display *dpy, XEvent *libevent, xEvent *netevent); -static /* const */ XExtensionHooks multibuf_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static /* const */ char *multibuf_error_list[] = { - "BadBuffer", /* MultibufferBadBuffer */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, multibuf_info, - multibuf_extension_name, - &multibuf_extension_hooks, - MultibufferNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, multibuf_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, multibuf_extension_name, - MultibufferNumberErrors, - multibuf_error_list) - -/* - * wire_to_event - convert a wire event in network format to a C - * event structure - */ -static Bool wire_to_event (Display *dpy, XEvent *libevent, xEvent *netevent) -{ - XExtDisplayInfo *info = find_display (dpy); - - MbufCheckExtension (dpy, info, False); - - switch ((netevent->u.u.type & 0x7f) - info->codes->first_event) { - case MultibufferClobberNotify: - { - XmbufClobberNotifyEvent *ev; - xMbufClobberNotifyEvent *event; - - ev = (XmbufClobberNotifyEvent *) libevent; - event = (xMbufClobberNotifyEvent *) netevent; - ev->type = event->type & 0x7f; - ev->serial = _XSetLastRequestRead(dpy,(xGenericReply *) netevent); - ev->send_event = ((event->type & 0x80) != 0); - ev->display = dpy; - ev->buffer = event->buffer; - ev->state = event->state; - return True; - } - case MultibufferUpdateNotify: - { - XmbufUpdateNotifyEvent *ev; - xMbufUpdateNotifyEvent *event; - - ev = (XmbufUpdateNotifyEvent *) libevent; - event = (xMbufUpdateNotifyEvent *) netevent; - ev->type = event->type & 0x7f; - ev->serial = _XSetLastRequestRead(dpy,(xGenericReply *) netevent); - ev->send_event = ((event->type & 0x80) != 0); - ev->display = dpy; - ev->buffer = event->buffer; - return True; - } - } - return False; -} - - -/* - * event_to_wire - convert a C event structure to a wire event in - * network format - */ -static Status event_to_wire (Display *dpy, XEvent *libevent, xEvent *netevent) -{ - XExtDisplayInfo *info = find_display (dpy); - - MbufCheckExtension (dpy, info, 0); - - switch ((libevent->type & 0x7f) - info->codes->first_event) { - case MultibufferClobberNotify: - { - XmbufClobberNotifyEvent *ev; - xMbufClobberNotifyEvent *event; - - ev = (XmbufClobberNotifyEvent *) libevent; - event = (xMbufClobberNotifyEvent *) netevent; - event->type = ev->type; - event->sequenceNumber = (ev->serial & 0xffff); - event->buffer = ev->buffer; - event->state = ev->state; - return 1; - } - case MultibufferUpdateNotify: - { - XmbufUpdateNotifyEvent *ev; - xMbufUpdateNotifyEvent *event; - - ev = (XmbufUpdateNotifyEvent *) libevent; - event = (xMbufUpdateNotifyEvent *) netevent; - event->type = ev->type; - event->sequenceNumber = (ev->serial & 0xffff); - event->buffer = ev->buffer; - return 1; - } - } - return 0; -} - - -/* - * read_buffer_info - read Buffer Info descriptors from the net; if unable - * to allocate memory, read junk to make sure that stream is clear. - */ -#define TALLOC(type,count) ((type *) Xmalloc ((unsigned) count * sizeof(type))) - -static XmbufBufferInfo *read_buffer_info (Display *dpy, int nbufs) -{ - xMbufBufferInfo *netbuf = TALLOC (xMbufBufferInfo, nbufs); - XmbufBufferInfo *bufinfo = NULL; - long netbytes = nbufs * SIZEOF(xMbufBufferInfo); - - if (netbuf) { - _XRead (dpy, (char *) netbuf, netbytes); - - bufinfo = TALLOC (XmbufBufferInfo, nbufs); - if (bufinfo) { - register XmbufBufferInfo *c; - register xMbufBufferInfo *net; - register int i; - - for (i = 0, c = bufinfo, net = netbuf; i < nbufs; - i++, c++, net++) { - c->visualid = net->visualID; - c->max_buffers = net->maxBuffers; - c->depth = net->depth; - } - } - Xfree ((char *) netbuf); - } else { /* eat the data */ - while (netbytes > 0) { - char dummy[256]; /* stack size vs loops tradeoff */ - long nbytes = sizeof dummy; - - if (nbytes > netbytes) nbytes = netbytes; - _XRead (dpy, dummy, nbytes); - netbytes -= nbytes; - } - } - - return bufinfo; -} - -#undef TALLOC - - -/***************************************************************************** - * * - * Multibuffering/stereo public interfaces * - * * - *****************************************************************************/ - - -/* - * XmbufQueryExtension - - * Returns True if the multibuffering/stereo extension is available - * on the given display. If the extension exists, the value of the - * first event code (which should be added to the event type constants - * MultibufferClobberNotify and MultibufferUpdateNotify to get the - * actual values) is stored into event_base and the value of the first - * error code (which should be added to the error type constant - * MultibufferBadBuffer to get the actual value) is stored into - * error_base. - */ -Bool XmbufQueryExtension ( - Display *dpy, - int *event_base_return, int *error_base_return) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension (info)) { - *event_base_return = info->codes->first_event; - *error_base_return = info->codes->first_error; - return True; - } else { - return False; - } -} - - -/* - * XmbufGetVersion - - * Gets the major and minor version numbers of the extension. The return - * value is zero if an error occurs or non-zero if no error happens. - */ -Status XmbufGetVersion ( - Display *dpy, - int *major_version_return, int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xMbufGetBufferVersionReply rep; - register xMbufGetBufferVersionReq *req; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferVersion, req, info); - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - UnlockDisplay (dpy); - - SyncHandle (); - return 1; -} - - -/* - * XmbufCreateBuffers - - * Requests that "count" buffers be created with the given update_action - * and update_hint and be associated with the indicated window. The - * number of buffers created is returned (zero if an error occurred) - * and buffers_return is filled in with that many Multibuffer identifiers. - */ -int XmbufCreateBuffers ( - Display *dpy, - Window w, - int count, - int update_action, int update_hint, - Multibuffer *buffers) -{ - XExtDisplayInfo *info = find_display (dpy); - xMbufCreateImageBuffersReply rep; - register xMbufCreateImageBuffersReq *req; - int result; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - - XAllocIDs(dpy, buffers, count); - MbufGetReq (MbufCreateImageBuffers, req, info); - req->window = w; - req->updateAction = update_action; - req->updateHint = update_hint; - req->length += count; - count <<= 2; - PackData32 (dpy, buffers, count); - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - result = rep.numberBuffer; - UnlockDisplay (dpy); - - SyncHandle (); - return result; -} - - -/* - * XmbufDestroyBuffers - - * Destroys the buffers associated with the given window. - */ -void XmbufDestroyBuffers (Display *dpy, Window window) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufDestroyImageBuffersReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufDestroyImageBuffers, req, info); - req->window = window; - UnlockDisplay (dpy); - SyncHandle (); -} - - -/* - * XmbufDisplayBuffers - - * Displays the indicated buffers their appropriate windows within - * max_delay milliseconds after min_delay milliseconds have passed. - * No two buffers may be associated with the same window or else a Matc - * error is generated. - */ -void XmbufDisplayBuffers ( - Display *dpy, - int count, - Multibuffer *buffers, - int min_delay, int max_delay) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufDisplayImageBuffersReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufDisplayImageBuffers, req, info); - req->minDelay = min_delay; - req->maxDelay = max_delay; - req->length += count; - count <<= 2; - PackData32 (dpy, buffers, count); - UnlockDisplay (dpy); - SyncHandle(); -} - - -/* - * XmbufGetWindowAttributes - - * Gets the multibuffering attributes that apply to all buffers associated - * with the given window. Returns non-zero on success and zero if an - * error occurs. - */ -Status XmbufGetWindowAttributes ( - Display *dpy, - Window w, - XmbufWindowAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetMBufferAttributesReq *req; - xMbufGetMBufferAttributesReply rep; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetMBufferAttributes, req, info); - req->window = w; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - attr->buffers = (Multibuffer *) NULL; - if ((attr->nbuffers = rep.length)) { - int nbytes = rep.length * sizeof(Multibuffer); - attr->buffers = (Multibuffer *) Xmalloc((unsigned) nbytes); - nbytes = rep.length << 2; - if (! attr->buffers) { - _XEatData(dpy, (unsigned long) nbytes); - UnlockDisplay(dpy); - SyncHandle(); - return (0); - } - _XRead32 (dpy, (long *) attr->buffers, nbytes); - } - attr->displayed_index = rep.displayedBuffer; - attr->update_action = rep.updateAction; - attr->update_hint = rep.updateHint; - attr->window_mode = rep.windowMode; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufChangeWindowAttributes - - * Sets the multibuffering attributes that apply to all buffers associated - * with the given window. This is currently limited to the update_hint. - */ -void XmbufChangeWindowAttributes ( - Display *dpy, - Window w, - unsigned long valuemask, - XmbufSetWindowAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufSetMBufferAttributesReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufSetMBufferAttributes, req, info); - req->window = w; - if ((req->valueMask = valuemask)) { /* stolen from lib/X/XWindow.c */ - unsigned long values[1]; /* one per element in if stmts below */ - unsigned long *v = values; - unsigned int nvalues; - - if (valuemask & MultibufferWindowUpdateHint) - *v++ = attr->update_hint; - req->length += (nvalues = v - values); - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay (dpy); - SyncHandle(); -} - - -/* - * XmbufGetBufferAttributes - - * Gets the attributes for the indicated buffer. Returns non-zero on - * success and zero if an error occurs. - */ -Status XmbufGetBufferAttributes ( - Display *dpy, - Multibuffer b, - XmbufBufferAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetBufferAttributesReq *req; - xMbufGetBufferAttributesReply rep; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferAttributes, req, info); - req->buffer = b; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - attr->window = rep.window; - attr->event_mask = rep.eventMask; - attr->buffer_index = rep.bufferIndex; - attr->side = rep.side; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufChangeBufferAttributes - - * Sets the attributes for the indicated buffer. This is currently - * limited to the event_mask. - */ -void XmbufChangeBufferAttributes ( - Display *dpy, - Multibuffer b, - unsigned long valuemask, - XmbufSetBufferAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufSetBufferAttributesReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufSetBufferAttributes, req, info); - req->buffer = b; - if ((req->valueMask = valuemask)) { /* stolen from lib/X/XWindow.c */ - unsigned long values[1]; /* one per element in if stmts below */ - unsigned long *v = values; - unsigned int nvalues; - - if (valuemask & MultibufferBufferEventMask) - *v++ = attr->event_mask; - req->length += (nvalues = v - values); - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay (dpy); - SyncHandle(); -} - - - -/* - * XmbufGetScreenInfo - - * Gets the parameters controlling how mono and stereo windows may be - * created on the indicated screen. The numbers of sets of visual and - * depths are returned in nmono_return and nstereo_return. If - * nmono_return is greater than zero, then mono_info_return is set to - * the address of an array of XmbufBufferInfo structures describing the - * various visuals and depths that may be used. Otherwise, - * mono_info_return is set to NULL. Similarly, stereo_info_return is - * set according to nstereo_return. The storage returned in - * mono_info_return and stereo_info_return may be released by XFree. - * If no errors are encounted, non-zero will be returned. - */ -Status XmbufGetScreenInfo ( - Display *dpy, - Drawable d, - int *nmono_return, - XmbufBufferInfo **mono_info_return, - int *nstereo_return, - XmbufBufferInfo **stereo_info_return) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetBufferInfoReq *req; - xMbufGetBufferInfoReply rep; - int nmono, nstereo; - XmbufBufferInfo *minfo, *sinfo; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferInfo, req, info); - req->drawable = d; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - nmono = rep.normalInfo; - nstereo = rep.stereoInfo; - minfo = ((nmono > 0) ? read_buffer_info (dpy, nmono) : NULL); - sinfo = ((nstereo > 0) ? read_buffer_info (dpy, nstereo) : NULL); - - /* check for bad reads indicating we need to return an error */ - if ((nmono > 0 && !minfo) || (nstereo > 0 && !sinfo)) { - if (minfo) Xfree ((char *) minfo); - if (sinfo) Xfree ((char *) sinfo); - UnlockDisplay (dpy); - SyncHandle(); - return 0; - } - - *nmono_return = nmono; - *mono_info_return = minfo; - *nstereo_return = nstereo; - *stereo_info_return = sinfo; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufCreateStereoWindow - - * Creates a stereo window in the same way that XCreateWindow creates - * a mono window (in fact, use the same code, except for the request) - * and returns the left and right buffers that may be - */ -Window XmbufCreateStereoWindow ( - Display *dpy, - Window parent, - int x, int y, - unsigned int width, unsigned int height, unsigned int border_width, - int depth, - unsigned int class, - Visual *visual, - unsigned long valuemask, - XSetWindowAttributes *attr, - Multibuffer *leftp, Multibuffer *rightp) -{ - XExtDisplayInfo *info = find_display (dpy); - Window wid; - register xMbufCreateStereoWindowReq *req; - - MbufCheckExtension (dpy, info, None); - - LockDisplay(dpy); - MbufGetReq(MbufCreateStereoWindow, req, info); - wid = req->wid = XAllocID(dpy); - req->parent = parent; - req->left = *leftp = XAllocID (dpy); - req->right = *rightp = XAllocID (dpy); - req->x = x; - req->y = y; - req->width = width; - req->height = height; - req->borderWidth = border_width; - req->depth = depth; - req->class = class; - if (visual == CopyFromParent) - req->visual = CopyFromParent; - else - req->visual = visual->visualid; - valuemask &= (CWBackPixmap|CWBackPixel|CWBorderPixmap| - CWBorderPixel|CWBitGravity|CWWinGravity| - CWBackingStore|CWBackingPlanes|CWBackingPixel| - CWOverrideRedirect|CWSaveUnder|CWEventMask| - CWDontPropagate|CWColormap|CWCursor); - if ((req->mask = valuemask)) { - unsigned long values[32]; - register unsigned long *value = values; - unsigned int nvalues; - - if (valuemask & CWBackPixmap) - *value++ = attr->background_pixmap; - if (valuemask & CWBackPixel) - *value++ = attr->background_pixel; - if (valuemask & CWBorderPixmap) - *value++ = attr->border_pixmap; - if (valuemask & CWBorderPixel) - *value++ = attr->border_pixel; - if (valuemask & CWBitGravity) - *value++ = attr->bit_gravity; - if (valuemask & CWWinGravity) - *value++ = attr->win_gravity; - if (valuemask & CWBackingStore) - *value++ = attr->backing_store; - if (valuemask & CWBackingPlanes) - *value++ = attr->backing_planes; - if (valuemask & CWBackingPixel) - *value++ = attr->backing_pixel; - if (valuemask & CWOverrideRedirect) - *value++ = attr->override_redirect; - if (valuemask & CWSaveUnder) - *value++ = attr->save_under; - if (valuemask & CWEventMask) - *value++ = attr->event_mask; - if (valuemask & CWDontPropagate) - *value++ = attr->do_not_propagate_mask; - if (valuemask & CWColormap) - *value++ = attr->colormap; - if (valuemask & CWCursor) - *value++ = attr->cursor; - req->length += (nvalues = value - values); - - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay(dpy); - SyncHandle(); - return wid; -} - -void XmbufClearBufferArea ( - Display *dpy, - Multibuffer buffer, - int x, int y, - unsigned int width, unsigned int height, - Bool exposures) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufClearImageBufferAreaReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufClearImageBufferArea, req, info); - req->buffer = buffer; - req->x = x; - req->y = y; - req->width = width; - req->height = height; - req->exposures = exposures; - UnlockDisplay (dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xext/Xcup.c b/nx-X11/lib/Xext/Xcup.c deleted file mode 100644 index 8bf2bb29e..000000000 --- a/nx-X11/lib/Xext/Xcup.c +++ /dev/null @@ -1,265 +0,0 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */ -/* - -Copyright 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ - -#ifdef WIN32 -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#endif - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -static XExtensionInfo _xcup_info_data; -static XExtensionInfo *xcup_info = &_xcup_info_data; -static char *xcup_extension_name = XCUPNAME; - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks xcup_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xcup_info, - xcup_extension_name, - &xcup_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xcup_info) - - -/***************************************************************************** - * * - * public Xcup Extension routines * - * * - *****************************************************************************/ - -Status -XcupQueryVersion( - Display* dpy, - int* major_version_return, - int* minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupQueryVersionReply rep; - xXcupQueryVersionReq *req; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupQueryVersion; - req->client_major_version = XCUP_MAJOR_VERSION; - req->client_minor_version = XCUP_MINOR_VERSION; - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major_version_return = rep.server_major_version; - *minor_version_return = rep.server_minor_version; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* Win32 reserves 20 colormap entries for its desktop */ -#ifndef TYP_RESERVED_ENTRIES -#define TYP_RESERVED_ENTRIES 20 -#endif - -Status -XcupGetReservedColormapEntries( - Display* dpy, - int screen, - XColor** colors_out, - int* ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupGetReservedColormapEntriesReply rep; - xXcupGetReservedColormapEntriesReq *req; - xColorItem rbuf[TYP_RESERVED_ENTRIES]; - - *ncolors = 0; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupGetReservedColormapEntries, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupGetReservedColormapEntries; - req->screen = screen; - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - if (nentries > TYP_RESERVED_ENTRIES) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - _XRead (dpy, (char*) rbufp, nbytes); - - *colors_out = (XColor*) Xmalloc (nentries * sizeof (XColor)); - if (*colors_out) { - xColorItem* cs = (xColorItem *) rbufp; - XColor* cd = *colors_out; - int i; - - *ncolors = nentries; - for (i = 0; i < *ncolors; i++, cd++) { - cd->pixel = cs->pixel; - cd->red = cs->red; - cd->green = cs->green; - cd->blue = cs->blue; - cs = (xColorItem*) (((char*) cs) + SIZEOF(xColorItem)); - } - if (rbufp != rbuf) XFree ((char*) rbufp); - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - if (rbufp != rbuf) XFree ((char*) rbufp); - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - -Status -XcupStoreColors( - Display* dpy, - Colormap colormap, - XColor* colors_in_out, - int ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupStoreColorsReply rep; - xXcupStoreColorsReq *req; - xColorItem rbuf[256]; - xColorItem citem; - int i; - XColor* xcp; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupStoreColors, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupStoreColors; - req->cmap = colormap; - req->length += (ncolors * SIZEOF(xColorItem)) >> 2; - - for (i = 0, xcp = colors_in_out; i < ncolors; i++, xcp++) { - citem.pixel = xcp->pixel; - citem.red = xcp->red; - citem.green = xcp->green; - citem.blue = xcp->blue; - - /* note that xColorItem doesn't contain all 16-bit quantities, so - we can't use Data16 */ - Data(dpy, (char *)&citem, (long) SIZEOF(xColorItem)); - } - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - xColorItem* cs; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - - if (nentries != ncolors) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - - if (ncolors > 256) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - - } - - _XRead (dpy, (char*) rbufp, nbytes); - - for (i = 0, xcp = colors_in_out, cs = rbufp; i < ncolors; i++, xcp++, cs++) { - xcp->pixel = cs->pixel; - xcp->red = cs->red; - xcp->green = cs->green; - xcp->blue = cs->blue; - xcp->flags = cs->flags; - } - if (rbufp != rbuf) XFree ((char*)rbufp); - - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - diff --git a/nx-X11/lib/Xext/Xdbe.c b/nx-X11/lib/Xext/Xdbe.c deleted file mode 100644 index 05df171f6..000000000 --- a/nx-X11/lib/Xext/Xdbe.c +++ /dev/null @@ -1,474 +0,0 @@ -/* $Xorg: Xdbe.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */ -/****************************************************************************** - * - * Copyright (c) 1994, 1995 Hewlett-Packard Company - * - * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard - * Company 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 Hewlett-Packard Company. - * - * Xlib DBE code - * - *****************************************************************************/ -/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.7 2002/10/16 02:19:22 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#define NEED_DBE_PROTOCOL -#include - -static XExtensionInfo _dbe_info_data; -static XExtensionInfo *dbe_info = &_dbe_info_data; -static char *dbe_extension_name = DBE_PROTOCOL_NAME; - -#define DbeCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, dbe_extension_name, val) -#define DbeSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, dbe_extension_name) - -#if !defined(UNIXCPP) -#define DbeGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->dbeReqType = X_##name; -#else -#define DbeGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->dbeReqType = X_/**/name; -#endif - - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -/* - * find_display - locate the display info block - */ -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); -static XExtensionHooks dbe_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static char *dbe_error_list[] = { - "BadBuffer", /* DbeBadBuffer */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, dbe_info, - dbe_extension_name, - &dbe_extension_hooks, - DbeNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, dbe_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, dbe_extension_name, - DbeNumberErrors, - dbe_error_list) - - -/***************************************************************************** - * * - * Double-Buffering public interfaces * - * * - *****************************************************************************/ - -/* - * XdbeQueryExtension - - * Sets major_version_return and minor_verion_return to the major and - * minor DBE protocol version supported by the server. If the DBE - * library is compatible with the version returned by the server, this - * function returns non-zero. If dpy does not support the DBE - * extension, or if there was an error during communication with the - * server, or if the server and library protocol versions are - * incompatible, this functions returns zero. No other Xdbe functions - * may be called before this function. If a client violates this rule, - * the effects of all subsequent Xdbe calls are undefined. - */ -Status XdbeQueryExtension ( - Display *dpy, - int *major_version_return, - int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xDbeGetVersionReply rep; - register xDbeGetVersionReq *req; - - if (!XextHasExtension (info)) - return (Status)0; /* failure */ - - LockDisplay (dpy); - DbeGetReq (DbeGetVersion, req, info); - req->majorVersion = DBE_MAJOR_VERSION; - req->minorVersion = DBE_MINOR_VERSION; - - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return (Status)0; /* failure */ - } - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - UnlockDisplay (dpy); - - SyncHandle (); - - if (*major_version_return != DBE_MAJOR_VERSION) - return (Status)0; /* failure */ - else - return (Status)1; /* success */ -} - - -/* - * XdbeAllocateBackBuffer - - * This function returns a drawable ID used to refer to the back buffer - * of the specified window. The swap_action is a hint to indicate the - * swap action that will likely be used in subsequent calls to - * XdbeSwapBuffers. The actual swap action used in calls to - * XdbeSwapBuffers does not have to be the same as the swap_action - * passed to this function, though clients are encouraged to provide - * accurate information whenever possible. - */ - -XdbeBackBuffer XdbeAllocateBackBufferName( - Display *dpy, - Window window, - XdbeSwapAction swap_action) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeAllocateBackBufferNameReq *req; - XdbeBackBuffer buffer; - - /* make sure extension is available; if not, return the - * third parameter (0). - */ - DbeCheckExtension (dpy, info, (XdbeBackBuffer)0); - - /* allocate the id */ - buffer = XAllocID (dpy); - - LockDisplay(dpy); - DbeGetReq(DbeAllocateBackBufferName, req, info); - req->window = window; - req->swapAction = (unsigned char)swap_action; - req->buffer = buffer; - - UnlockDisplay (dpy); - SyncHandle (); - return buffer; - -} /* XdbeAllocateBackBufferName() */ - -/* - * XdbeDeallocateBackBufferName - - * This function frees a drawable ID, buffer, that was obtained via - * XdbeAllocateBackBufferName. The buffer must refer to the back buffer - * of the specified window, or a protocol error results. - */ -Status XdbeDeallocateBackBufferName ( - Display *dpy, - XdbeBackBuffer buffer) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeDeallocateBackBufferNameReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeDeallocateBackBufferName, req, info); - req->buffer = buffer; - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeSwapBuffers - - * This function swaps the front and back buffers for a list of windows. - * The argument num_windows specifies how many windows are to have their - * buffers swapped; it is the number of elements in the swap_info array. - * The argument swap_info specifies the information needed per window - * to do the swap. - */ -Status XdbeSwapBuffers ( - Display *dpy, - XdbeSwapInfo *swap_info, - int num_windows) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeSwapBuffersReq *req; - int i; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeSwapBuffers, req, info); - req->length += 2*num_windows; - req->n = num_windows; - - /* We need to handle 64-bit machines, where we can not use PackData32 - * directly because info would be lost in translating from 32- to 64-bit. - * Instead we send data via a loop that accounts for the translation. - */ - for (i = 0; i < num_windows; i++) - { - char tmp[4]; - Data32 (dpy, (long *)&swap_info[i].swap_window, 4); - tmp[0] = swap_info[i].swap_action; - Data (dpy, (char *)tmp, 4); - } - - UnlockDisplay (dpy); - SyncHandle (); - - - return (Status)1; /* success */ - -} /* XdbeSwapBuffers() */ - - -/* - * XdbeBeginIdiom - - * This function marks the beginning of an idiom sequence. - */ -Status XdbeBeginIdiom (Display *dpy) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeBeginIdiomReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeBeginIdiom, req, info); - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeEndIdiom - - * This function marks the end of an idiom sequence. - */ -Status XdbeEndIdiom (Display *dpy) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeEndIdiomReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeEndIdiom, req, info); - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeGetVisualInfo - - * This function returns information about which visuals support - * double buffering. The argument num_screens specifies how many - * elements there are in the screen_specifiers list. Each drawable - * in screen_specifiers designates a screen for which the supported - * visuals are being requested. If num_screens is zero, information - * for all screens is requested. In this case, upon return from this - * function, num_screens will be set to the number of screens that were - * found. If an error occurs, this function returns NULL, else it returns - * a pointer to a list of XdbeScreenVisualInfo structures of length - * num_screens. The nth element in the returned list corresponds to the - * nth drawable in the screen_specifiers list, unless num_screens was - * passed in with the value zero, in which case the nth element in the - * returned list corresponds to the nth screen of the server, starting - * with screen zero. - */ -XdbeScreenVisualInfo *XdbeGetVisualInfo ( - Display *dpy, - Drawable *screen_specifiers, - int *num_screens) /* SEND and RETURN */ -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeGetVisualInfoReq *req; - xDbeGetVisualInfoReply rep; - XdbeScreenVisualInfo *scrVisInfo; - int i; - - DbeCheckExtension (dpy, info, (XdbeScreenVisualInfo *)NULL); - - LockDisplay (dpy); - - DbeGetReq(DbeGetVisualInfo, req, info); - req->length = 2 + *num_screens; - req->n = *num_screens; - Data32 (dpy, screen_specifiers, (*num_screens * sizeof (CARD32))); - - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - /* return the number of screens actually found if we - * requested information about all screens (*num_screens == 0) - */ - if (*num_screens == 0) - *num_screens = rep.m; - - /* allocate list of visual information to be returned */ - if (!(scrVisInfo = - (XdbeScreenVisualInfo *)Xmalloc( - (unsigned)(*num_screens * sizeof(XdbeScreenVisualInfo))))) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - for (i = 0; i < *num_screens; i++) - { - int nbytes; - int j; - long c; - - _XRead32 (dpy, &c, sizeof(CARD32)); - scrVisInfo[i].count = c; - - nbytes = scrVisInfo[i].count * sizeof(XdbeVisualInfo); - - /* if we can not allocate the list of visual/depth info - * then free the lists that we already allocate as well - * as the visual info list itself - */ - if (!(scrVisInfo[i].visinfo = (XdbeVisualInfo *)Xmalloc( - (unsigned)nbytes))) { - for (j = 0; j < i; j++) { - Xfree ((char *)scrVisInfo[j].visinfo); - } - Xfree ((char *)scrVisInfo); - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - /* Read the visual info item into the wire structure. Then copy each - * element into the library structure. The element sizes and/or - * padding may be different in the two structures. - */ - for (j = 0; j < scrVisInfo[i].count; j++) { - xDbeVisInfo xvi; - - _XRead (dpy, (char *)&xvi, sizeof(xDbeVisInfo)); - scrVisInfo[i].visinfo[j].visual = xvi.visualID; - scrVisInfo[i].visinfo[j].depth = xvi.depth; - scrVisInfo[i].visinfo[j].perflevel = xvi.perfLevel; - } - - } - - UnlockDisplay (dpy); - SyncHandle (); - return scrVisInfo; - -} /* XdbeGetVisualInfo() */ - - -/* - * XdbeFreeVisualInfo - - * This function frees the list of XdbeScreenVisualInfo returned by the - * function XdbeGetVisualInfo. - */ -void XdbeFreeVisualInfo(XdbeScreenVisualInfo *visual_info) -{ - if (visual_info == NULL) { - return; - } - - if (visual_info->visinfo) { - XFree(visual_info->visinfo); - } - - XFree(visual_info); -} - - -/* - * XdbeGetBackBufferAttributes - - * This function returns the attributes associated with the specified - * buffer. - */ -XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( - Display *dpy, - XdbeBackBuffer buffer) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeGetBackBufferAttributesReq *req; - xDbeGetBackBufferAttributesReply rep; - XdbeBackBufferAttributes *attr; - - DbeCheckExtension(dpy, info, (XdbeBackBufferAttributes *)NULL); - - if (!(attr = - (XdbeBackBufferAttributes *)Xmalloc(sizeof(XdbeBackBufferAttributes)))) { - return NULL; - } - - LockDisplay(dpy); - DbeGetReq(DbeGetBackBufferAttributes, req, info); - req->buffer = buffer; - - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - attr->window = rep.attributes; - - UnlockDisplay (dpy); - SyncHandle (); - - return attr; -} - diff --git a/nx-X11/lib/Xext/Xext-def.cpp b/nx-X11/lib/Xext/Xext-def.cpp index fcd9f49a2..6ee37c70f 100644 --- a/nx-X11/lib/Xext/Xext-def.cpp +++ b/nx-X11/lib/Xext/Xext-def.cpp @@ -1,9 +1,6 @@ LIBRARY XEXT VERSION LIBRARY_VERSION EXPORTS - XMITMiscGetBugMode - XMITMiscQueryExtension - XMITMiscSetBugMode XMissingExtension XSetExtensionErrorHandler XShapeCombineMask @@ -76,46 +73,11 @@ EXPORTS XextDestroyExtension XextFindDisplay XextRemoveDisplay - XmbufChangeBufferAttributes - XmbufChangeWindowAttributes - XmbufClearBufferArea - XmbufCreateBuffers - XmbufCreateStereoWindow - XmbufDestroyBuffers - XmbufDisplayBuffers - XmbufGetBufferAttributes - XmbufGetScreenInfo - XmbufGetVersion - XmbufGetWindowAttributes - XmbufQueryExtension - XdbeQueryExtension - XdbeAllocateBackBufferName - XdbeDeallocateBackBufferName - XdbeSwapBuffers - XdbeBeginIdiom - XdbeEndIdiom - XdbeGetVisualInfo - XdbeFreeVisualInfo - XdbeGetBackBufferAttributes XSecurityQueryExtension XSecurityAllocXauth XSecurityFreeXauth XSecurityGenerateAuthorization XSecurityRevokeAuthorization - XagQueryVersion - XagCreateAssociation - XagCreateEmbeddedApplicationGroup - XagCreateNonembeddedApplicationGroup - XagDestroyApplicationGroup - XagDestroyAssociation - XagGetApplicationGroupAttributes - XagQueryApplicationGroup - XLbxQueryExtension - XLbxGetEventBase - XLbxQueryVersion - XcupGetReservedColormapEntries - XcupQueryVersion - XcupStoreColors #if !defined(__CYGWIN__) && !defined(__UNIXOS2__) XPanoramiXQueryVersion XPanoramiXAllocInfo @@ -133,8 +95,5 @@ EXPORTS DPMSDisable DPMSForceLevel DPMSInfo - XeviQueryExtension - XeviQueryVersion - XeviGetVisualInfo /* $Xorg: Xext-def.cpp,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ /* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.8 2001/05/06 10:35:51 alanh Exp $ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index a2a3f7ced..ca9a6b88d 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -105,10 +105,6 @@ INSTPGMFLAGS = #if BuildRECORD || BuildRECORDlib RECORDDIR = record #endif -#if BuildXTrap - XTRAPEXT = XTrap/LibraryTargetName(xtrap) - XTRAPDIR = XTrap -#endif #ifdef SiteExtensionLibs SITEEXTS = SiteExtensionLibs #endif @@ -153,7 +149,7 @@ INSTPGMFLAGS = #if DoLoadableServer EXTENSIONS = $(COMPOSITELIB) $(DAMAGELIB) $(DAMAGE) $(FIXESLIB) $(CW) \ $(OTHEREXTS) $(RANDRLIB) $(RENDERLIB) - LOADABLEEXTS = $(MISCEXT) $(DBEEXT) $(RECORDEXT) $(GLXEXT) $(XTRAPEXT) + LOADABLEEXTS = $(MISCEXT) $(DBEEXT) $(RECORDEXT) $(GLXEXT) MISCEXT = Xext/LibraryTargetName(ext) OTHEREXTS = Xext/LibraryTargetName(exts) $(XKBEXT) $(XINPUTEXT) \ $(SITEEXTS) @@ -161,11 +157,11 @@ INSTPGMFLAGS = EXTENSIONS = $(COMPOSITELIB) $(DAMAGELIB) $(DAMAGE) $(FIXESLIB) $(CW) \ $(OTHEREXTS) $(GLXEXT) $(RANDRLIB) $(RENDERLIB) OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \ - $(DBEEXT) $(RECORDEXT) $(SITEEXTS) $(XTRAPEXT) + $(DBEEXT) $(RECORDEXT) $(SITEEXTS) #endif EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(GLXDIR) \ $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \ - $(RANDRDIR) $(RENDERDIR) $(XTRAPDIR) $(XPCONFIGDIR) \ + $(RANDRDIR) $(RENDERDIR) $(XPCONFIGDIR) \ $(FIXESDIR) $(DAMAGEDIR) $(CWDIR) $(COMPOSITEDIR) OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) BSDEMUL = $(DEPXBSDLIB) diff --git a/nx-X11/programs/Xserver/XTrap/Imakefile b/nx-X11/programs/Xserver/XTrap/Imakefile deleted file mode 100644 index c61712f1d..000000000 --- a/nx-X11/programs/Xserver/XTrap/Imakefile +++ /dev/null @@ -1,27 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ - -#if DoLoadableServer -#define IHaveSubdirs -#endif - -#include - -#if DoLoadableServer - SUBDIRS = module -#endif - SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c - OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext `pkg-config --cflags-only-I pixman-1` - -NormalLibraryTarget(xtrap,$(OBJS)) -LintLibraryTarget(xtrap,$(SRCS)) -NormalLintTarget($(SRCS)) - -NormalLibraryObjectRule() - -#if DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() diff --git a/nx-X11/programs/Xserver/XTrap/module/Imakefile b/nx-X11/programs/Xserver/XTrap/module/Imakefile deleted file mode 100644 index 8f8a77ba2..000000000 --- a/nx-X11/programs/Xserver/XTrap/module/Imakefile +++ /dev/null @@ -1,26 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/module/Imakefile,v 1.2 2002/01/23 03:31:40 dawes Exp $ - -#define IHaveModules -#include - - SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c xf86XTrapModule.c - OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o xf86XTrapModule.o - INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/Xext - DEFINES = -DEXTMODULE - -LinkSourceFile(xf86XTrapModule.c,..) -LinkSourceFile(xtrapddmi.c,..) -LinkSourceFile(xtrapdi.c,..) -LinkSourceFile(xtrapdiswp.c,..) -LinkSourceFile(xtrapditbl.c,..) - -ModuleObjectRule() -LibraryModuleTarget(xtrap,$(OBJS)) - -InstallLibraryModule(xtrap,$(MODULEDIR),extensions) - -DependTarget() - -InstallDriverSDKLibraryModule(xtrap,$(DRIVERSDKMODULEDIR),extensions) - diff --git a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c deleted file mode 100644 index a3e1d08c6..000000000 --- a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $XFree86$ */ -/* This is the xf86 module code for the DEC_XTRAP extension. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -#include - -extern void DEC_XTRAPInit(INITARGS); - -#ifdef XFree86LOADER - -static MODULESETUPPROTO(xtrapSetup); - -ExtensionModule xtrapExt = -{ - DEC_XTRAPInit, - XTrapExtName, - NULL, - NULL, - NULL -}; - -static XF86ModuleVersionInfo xtrapVersRec = -{ - "xtrap", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_EXTENSION, /* needs the server extension ABI */ - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} -}; - -XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL }; - -static void * -xtrapSetup(void * module, void * opts, int *errmaj, int *errmin) { - LoadExtension(&xtrapExt, FALSE); - /* Need a non-NULL return value to indicate success */ - return (void *)1; -} - -#endif /* XFree86LOADER */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c deleted file mode 100644 index 1b4be39cd..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the platform-specific but conditionally independent - * code for the XTrap extension (usually I/O or platform setup). - * This is shared code and is subject to change only by team approval. - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EXTMODULE -#include -#include -#ifdef PC -# include "fcntl.h" -# include "io.h" -# define O_NDELAY 0L -#endif -#else -#include "xf86_ansic.h" -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include /* From library include environment */ -#include "input.h" /* From server include env. (must be before Xlib.h!) */ -#ifdef PC -# include "scrintst.h" /* Screen struct */ -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -# include "scrnintstr.h" /* Screen struct */ -#endif - -#include -#include -#include - -extern int XETrapErrorBase; -extern xXTrapGetAvailReply XETrap_avail; -extern DevicePtr XETrapKbdDev; -extern DevicePtr XETrapPtrDev; - -/* - * DESCRIPTION: - * - * This function performs the platform specific setup for server - * extension implementations. - */ -void XETrapPlatformSetup() -{ -} - - -#if !defined _XINPUT -/* - * DESCRIPTION: - * - * This routine processes the simulation of some input event. - * - */ -int XETrapSimulateXEvent(register xXTrapInputReq *request, - register ClientPtr client) -{ - ScreenPtr pScr = NULL; - int status = Success; - xEvent xev; - register int x = request->input.x; - register int y = request->input.y; - DevicePtr keydev = LookupKeyboardDevice(); - DevicePtr ptrdev = LookupPointerDevice(); - - if (request->input.screen < screenInfo.numScreens) - { - pScr = screenInfo.screens[request->input.screen]; - } - else - { /* Trying to play bogus events to this WS! */ -#ifdef VERBOSE - ErrorF("%s: Trying to send events to screen %d!\n", XTrapExtName, - request->input.screen); -#endif - status = XETrapErrorBase + BadScreen; - } - /* Fill in the event structure with the information - * Note: root, event, child, eventX, eventY, state, and sameScreen - * are all updated by FixUpEventFromWindow() when the events - * are delivered via DeliverDeviceEvents() or whatever. XTrap - * needs to only concern itself with type, detail, time, rootX, - * and rootY. - */ - if (status == Success) - { - xev.u.u.type = request->input.type; - xev.u.u.detail = request->input.detail; - xev.u.keyButtonPointer.time = GetTimeInMillis(); - xev.u.keyButtonPointer.rootX = x; - xev.u.keyButtonPointer.rootY = y; - - if (request->input.type == MotionNotify) - { /* Set new cursor position on screen */ - XETrap_avail.data.cur_x = x; - XETrap_avail.data.cur_y = y; - NewCurrentScreen (pScr, x, y); /* fix from amnonc@mercury.co.il */ - if (!(*pScr->SetCursorPosition)(pScr, x, y, xFalse)) - { - status = BadImplementation; - } - } - } - if (status == Success) - { - switch(request->input.type) - { /* Now process the event appropriately */ - case KeyPress: - case KeyRelease: - (*XETrapKbdDev->realInputProc)(&xev,(DeviceIntPtr)keydev, 1L); - break; - case MotionNotify: - case ButtonPress: - case ButtonRelease: - (*XETrapPtrDev->realInputProc)(&xev,(DeviceIntPtr)ptrdev, 1L); - break; - default: - status = BadValue; - break; - } - } - return(status); -} -#endif /* _XINPUT */ - -#if defined vms && !defined LINKED_IN -/* Used by swapping code not visible from VMS (from main.c) */ -#ifndef BLADE -void -NotImplemented() -{ - FatalError("Not implemented"); -} -#endif - -int -#ifdef __STDC__ -ProcBadRequest( ClientPtr client) -#else -ProcBadRequest(client) - ClientPtr client; -#endif -{ - return (BadRequest); -} - -#endif /* vms && ! LINKED_IN */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdi.c b/nx-X11/programs/Xserver/XTrap/xtrapdi.c deleted file mode 100644 index 987d54e4f..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapdi.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* $XdotOrg: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.5 2005/07/03 08:53:36 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.6tsi Exp $ */ -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA -X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. - -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 AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the main module for extension initialization and setup. - * It is called by the server and by clients using the extension. - * This is shared code and is subject to change only by team approval. - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * CHANGES: - * - * Robert Chesler - grab-impreviousness patch to improve grab behavior - * Robert Chesler - add client arg to swapping routines for X11R6 port - * - */ - -/*-----------------* - * Include Files * - *-----------------*/ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EXTMODULE -#include -#include -#include -#else -#include "xf86_ansic.h" -#endif -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" /* Server swapping macros */ -#include "dixstruct.h" /* Server ClientRec definitions */ -#include "resource.h" /* Used with the MakeAtom call */ -#ifdef PC -# include "scrintst.h" /* Screen struct */ -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -# include "scrnintstr.h" /* Screen struct */ -#endif -#include "pixmapstr.h" /* DrawableRec */ -#include "windowstr.h" /* Drawable Lookup structures */ -#include -#include -#include -#include "colormapst.h" -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#include "cursor.h" -#endif - - -/*----------------------------* - * Global Data Declarations * - *----------------------------*/ - -DevicePtr XETrapKbdDev = NULL; -DevicePtr XETrapPtrDev = NULL; -int XETrapErrorBase = 0L; -xXTrapGetAvailReply XETrap_avail; /* What's available to clients */ - -globalref int_function XETrapDispatchVector[10L]; /* Vector of XTrap Rtns */ -globalref int_function XETSwDispatchVector[10L]; /* Swapped XTrap Rtns */ - -globalref int_function XETrapProcVector[256L]; /* The "shadowed" ProcVector */ - /* The "real" EventVector (XTrap creates it till events - * truly become vectored - */ -#ifndef VECTORED_EVENTS -globalref int_function EventProcVector[XETrapCoreEvents]; -#else -extern WindowPtr GetCurrentRootWindow(); -globalref int_function EventProcVector[128L]; -#endif -static int_function keybd_process_inp = NULL; /* Used for VECTORED_EVENTS */ - /* The "shadowed" Event Vector */ -globalref int_function XETrapEventProcVector[XETrapCoreEvents]; - -globalref void_function XETSwProcVector[256L];/* Vector of Req swapping rtns */ - -/* This macro returns a true/false indicator based on whether it changes the - * environment state bits local to the server extension. This is based on the - * idea that if a valid flag is set and the corresponding data bit is not in - * the same state as desired, then true is returned, otherwise false is - * returned. - */ -#define _CheckChangeBit(valid,data,local,bit) \ - (BitIsFalse(valid,bit) ? 0L : \ - (((BitIsTrue(data,bit) && BitIsTrue(local,bit)) || \ - (BitIsFalse(data,bit) && BitIsFalse(local,bit))) ? 0L : \ - (BitToggle(local,bit), 1L))) - -/* This macro is designed to return the number of elements in an - * automatically allocated array. - */ -#ifndef ASIZE -#define ASIZE(array) (sizeof(array)/sizeof(array[0L])) -#endif - -/* This macro is designed to return the number of long words beyond - * XETrapMinRepSize contained in a data structure. - */ -#ifndef XEXTRA -#define XEXTRA(s) \ - ((sizeof(s)+(sizeof(CARD32)-1L)-XETrapMinRepSize)/sizeof(CARD32)) -#endif - -/* Static Declarations known to XTrap Only - * All XTrap clients refer to these single copies! - */ -/* This carries all of the information XTrap uses for internal information */ -static XETrapEnv *XETenv[MAXCLIENTS] = {NULL}; -#ifndef RESTYPE -#define RESTYPE unsigned long -#endif -static RESTYPE XETrapClass = 0L; /* Resource class for this extension */ -static RESTYPE XETrapType = 0L; /* Resource type for this extension */ -static Bool gate_closed = False; /* The global "gatekeeper" */ -static Bool key_ignore = False; /* The global "keymaster" */ -static Bool ignore_grabs = False; -static CARD8 next_key = XEKeyIsClear; /* Echo, Clear, or Other */ -#ifdef VECTORED_EVENTS -static INT16 current_screen = -1L; /* Current screen for events */ -#endif -static INT16 vectored_requests[256L] = {0L}; /* cnt of vectoring clients */ -static INT16 vectored_events[KeyPress+MotionNotify] = {0L}; -typedef struct _client_list -{ - struct _client_list *next; - ClientPtr client; -} ClientList; -static ClientList io_clients; /* Linked-list of clients currently doing I/O */ -static ClientList stats_clients; /* Linked-list of clients collecting stats */ -static ClientList cmd_clients; /* Linked-list of clients using command key */ - -/*----------------------------* - * Forward Declarations - *----------------------------*/ -static void _SwapProc (int (**f1 )(), int (**f2 )()); -static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to ); -static int add_accelerator_node (ClientPtr client , ClientList *accel ); -static void remove_accelerator_node (ClientPtr client , ClientList *accel ); -static void update_protocol (xXTrapGetReq *reqptr , ClientPtr client ); -#ifdef COLOR_REPLIES -static void GetSendColorRep (ClientPtr client , xResourceReq *req ); -static void GetSendNamedColorRep (ClientPtr client , xResourceReq *req ); -static void GetSendColorCellsRep (ClientPtr client , xResourceReq *req ); -static void GetSendColorPlanesRep (ClientPtr client , xResourceReq *req ); -#endif - -/* - * DESCRIPTION: - * - * This routine is called by the server when a given client - * goes away (as identified by the first argument). All - * memory allocations, misc. values specific to a given - * client would be reset here. - * - */ -int XETrapDestroyEnv(void * value, XID id) -{ - xXTrapReq request; - XETrapEnv *penv = XETenv[(long)value]; - - XETrapReset(&request,penv->client); - /* Free any memory malloc'd for a particular client here */ - /* In case stop I/O wasn't received for this client */ - if (penv->stats) - { /* Remove from client accelerator list */ - remove_accelerator_node(penv->client, &stats_clients); - Xfree(penv->stats); /* Free the stats buckets */ - } - if (cmd_clients.next == NULL) - { /* No more command key clients! Let's reset the gate */ - gate_closed = False; - key_ignore = False; - next_key = XEKeyIsClear; - } - -#ifdef VECTORED_EVENTS - current_screen = -1L; /* Invalidate current screen */ -#endif - -#ifdef VERBOSE - ErrorF("%s: Client '%d' Disconnected\n", XTrapExtName, - penv->client->index); -#endif - - Xfree(penv); - XETenv[(long)value] = NULL; - - return 0; -} - -/* - * DESCRIPTION: - * - * This routine is called by the server when the last client - * (the session manager in most cases) goes away. This is server - * reset. When the server comes back up, this extension will not - * be loaded unless this routine makes the proper arrangements. - * - * The real concern here is to unload the extension - * and possibly make arragements to be called upon - * server restart. - * - */ -void XETrapCloseDown(ExtensionEntry *extEntry) -{ - long i; - - for (i=0L; irealInputProc; - EventProcVector[KeyRelease] = - (int_function)XETrapKbdDev->realInputProc; - } -#ifdef VECTORED_EVENTS - keybd_process_inp = EventProcVector[KeyPress]; - EventProcVector[KeyPress] = EventProcVector[KeyRelease] = NULL; - XETrapEventProcVector[KeyPress] = XETrapEventVector; - XETrapEventProcVector[KeyRelease] = XETrapEventVector; -#else /* !VECTORED_EVENTS */ - XETrapEventProcVector[KeyPress] = XETrapKeyboard; - XETrapEventProcVector[KeyRelease] = XETrapKeyboard; -#endif /* !VECTORED_EVENTS */ - } - /* Do we need to redirect the pointer device? */ -#ifndef VECTORED_EVENTS - if (XETrapPtrDev == NULL) - { - if ((XETrapPtrDev = LookupPointerDevice()) == 0L) - { - retval = False; - } - else - { - EventProcVector[ButtonPress] = - (int_function)XETrapPtrDev->realInputProc; - EventProcVector[ButtonRelease] = - (int_function)XETrapPtrDev->realInputProc; - EventProcVector[MotionNotify] = - (int_function)XETrapPtrDev->realInputProc; - } - XETrapEventProcVector[ButtonPress] = XETrapPointer; - XETrapEventProcVector[ButtonRelease] = XETrapPointer; - XETrapEventProcVector[MotionNotify] = XETrapPointer; - } -#endif /* !VECTORED_EVENTS */ - return(retval); -} - -/* - * - * DESCRIPTION: - * - * This routine is the main entry point for the Xtrap extension. It is - * called by the server to inititalize the Xtrap extension. Once the - * extension is initialized, life is controlled by the XtrapDispatch - * routine by the requests it will handle. - * - * Initializes all the XTrap data structures with the proper - * addresses of defined routines that will help control the extension. - * It is vital that the extension state be kept accurate so that only - * one call to this routine be made. - * - */ - -void DEC_XTRAPInit() -{ - register ExtensionEntry *extEntry; - unsigned int i; - Atom a; - - /* Make the extension known to the server. Must be done every time - * DEC_XTRAPInit is called, else server will think it failed. - */ - if ((extEntry = AddExtension(XTrapExtName,XETrapNumEvents, - XETrapNumErrors,XETrapDispatch,sXETrapDispatch,XETrapCloseDown - ,StandardMinorOpcode)) == NULL) - { - ErrorF("%s: AddExtension Failed!\n", XTrapExtName); - return; - } -#ifdef VERBOSE - ErrorF("%s: AddExtension assigned Major Opcode '%d'\n", - XTrapExtName, extEntry->base); -#endif - XETrap_avail.data.major_opcode = extEntry->base; - XETrapErrorBase = extEntry->errorBase; - XETrap_avail.data.event_base = extEntry->eventBase; - - /* Set up our swapped reply vector */ - ReplySwapVector[XETrap_avail.data.major_opcode] = - (void_function) sReplyXTrapDispatch; - - /* Set up our swapped event vector */ - EventSwapVector[extEntry->eventBase + XETrapData] = - (EventSwapPtr) sXETrapEvent; - - /* make an atom saying that the extension is present. The - * adding of the resource occurs during XETrapCreateEnv(). - */ - if ((a = MakeAtom(XTrapExtName,strlen(XTrapExtName),1L)) == None || - (XETrapType = CreateNewResourceType(XETrapDestroyEnv)) == 0L) - { - ErrorF("%s: Setup can't create new resource type (%d,%d,%d)\n", - XTrapExtName, (int)a,(int)XETrapClass,(int)XETrapType); - return; - } - /* initialize the GetAvailable info reply here */ - XETrap_avail.hdr.type = X_Reply; - XETrap_avail.hdr.length = XEXTRA(xXTrapGetAvailReply); - XETrap_avail.data.xtrap_release = XETrapRelease; - XETrap_avail.data.xtrap_version = XETrapVersion; - XETrap_avail.data.xtrap_revision = XETrapRevision; - XETrap_avail.data.pf_ident = XETrapPlatform; - XETrap_avail.data.max_pkt_size = 0xFFFF; /* very large number */ - for (i=0L; iindex > MAXCLIENTS) - { - status = BadImplementation; - } - else if ((XETenv[client->index] = (XETrapEnv *)Xcalloc(sizeof(XETrapEnv))) - == NULL) - { - status = BadAlloc; - } - if (status == Success) - { - penv = XETenv[client->index]; - penv->client = client; - penv->protocol = 31; /* default to backwards compatibility */ - /* prep for client's departure (for memory dealloc, cleanup) */ - AddResource(FakeClientID(client->index),XETrapType, - (void *)(long)(client->index)); - if (XETrapRedirectDevices() == False) - { - status = XETrapErrorBase + BadDevices; - } - /* Initialize the current state */ - if (status == Success) - { - status = XETrapReset(NULL, penv->client); - } - } - -#ifdef VECTORED_EVENTS - current_screen = -1L; /* Invalidate current screen */ -#endif - -#ifdef VERBOSE - if (status == Success) - { - ErrorF("%s: Client '%d' Connection Accepted\n", XTrapExtName, - penv->client->index); - } -#endif - - return(status); -} - -/* - * DESCRIPTION: - * - * This procedure is defined for the call to AddExtension() - * in which it is expected to be a parameter of the call. - * - * This routine will be called by the server dispatcher - * when a client makes a request that is handled - * by the extension and the byte ordering of the client is the - * SAME as that of the extension. - * - * Note: the status of the requests is returned to the caller of - * the Dispatch routine which will in turn SendErrorToClient if - * necessary. - */ - -int XETrapDispatch(ClientPtr client) -{ - - REQUEST(xXTrapReq); - register int status = Success; - - REQUEST_AT_LEAST_SIZE(xXTrapReq); - - /* Have we seen this client before? */ - if (XETenv[client->index] == NULL) - { - status = XETrapCreateEnv(client); - } - /* Do we have a valid request? */ - if (status == Success) - { - if (stuff->minor_opcode < ASIZE(XETrapDispatchVector)) - { - /* Then vector to the pointed to function */ - status = - (*(XETrapDispatchVector[stuff->minor_opcode]))(stuff,client); - } - else - { - status = BadRequest; - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This procedure is defined for the call to AddExtension() - * in which it is expected to be a parameter of the call. - * - * This routine would ordinarily be called by the server - * dispatcher when a client makes a request that is handled - * by the extension and the byte ordering of the client is - * DIFFERENT than that of the extension. - */ - -int sXETrapDispatch(ClientPtr client) -{ - - REQUEST(xXTrapReq); - register int status = Success; - - REQUEST_AT_LEAST_SIZE(xXTrapReq); - - /* Have we seen this client before? */ - if (XETenv[client->index] == NULL) - { - status = XETrapCreateEnv(client); - } - /* Do we have a valid request? */ - if (status == Success) - { - if (stuff->minor_opcode < ASIZE(XETSwDispatchVector)) - { - /* Then vector to the pointed to function */ - status = - (*(XETSwDispatchVector[stuff->minor_opcode]))(stuff,client); - } - else - { - status = BadRequest; - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This routine will place the extension in a steady and known - * state. Any current state will be reset. This is called either - * by a client request (dispatched) or when a new client environment - * is created. - * - */ -int XETrapReset(xXTrapReq *request, ClientPtr client) -{ - static xXTrapConfigReq DummyReq; - register int i; - register int status = Success; - XETrapEnv *penv = XETenv[client->index]; - - /* in case any i/o's pending */ - (void)XETrapStopTrap((xXTrapReq *)NULL, client); - penv->cur.hdr.type = X_Reply; - penv->cur.hdr.length = XEXTRA(xXTrapGetCurReply); - /* Fill in a dummy config request to clear all elements */ - for (i=0L; icur.data_state_flags); i++) - { - penv->cur.data_state_flags[i] = 0L; /* Clear all env flags */ - } - penv->cur.data_config_max_pkt_size = XETrap_avail.data.max_pkt_size; - - return(status); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the available states of the extension can be configured for. - */ -int XETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - update_protocol(request, client); - /* Initialize the reply as needed */ - XETrap_avail.data.xtrap_protocol = penv->protocol; - XETrap_avail.hdr.detail = XETrap_GetAvailable; - XETrap_avail.hdr.sequenceNumber = client->sequence; - WriteReplyToClient(client, sizeof(xXTrapGetAvailReply), &XETrap_avail); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the current state of the extension. - */ -int XETrapGetCurrent(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - int rep_size = (penv->protocol == 31 ? 284 : sz_xXTrapGetCurReply); - penv->cur.hdr.length = (rep_size - 32L) / SIZEOF(CARD32); - - /* Initialize the reply as needed */ - penv->cur.hdr.detail = XETrap_GetCurrent; - penv->cur.hdr.sequenceNumber = client->sequence; - WriteReplyToClient(client, rep_size, &(penv->cur)); - - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client dumping - * statistics (counts) of requests and events. If stat's isn't - * configured, return failure. - */ -int XETrapGetStatistics(xXTrapReq *request, ClientPtr client) -{ - int status = Success; - XETrapEnv *penv = XETenv[client->index]; - - if ((BitIsTrue(penv->cur.data_config_flags_data, XETrapStatistics)) && - (penv->stats)) - { - /* Initialize the reply as needed */ - int rep_size = sizeof(xXTrapGetStatsReply); - penv->stats->detail = XETrap_GetStatistics; - penv->stats->sequenceNumber = client->sequence; - if (penv->protocol == 31) - { - xXTrapGetStatsReply rep_stats; - rep_stats = *penv->stats; -#ifndef VECTORED_EVENTS - rep_size = 1060; -#else - rep_size = 1544; -#endif - rep_stats.length = (rep_size - 32L) / SIZEOF(CARD32); - /* - * Now we need to shift the data *into* the header area - * for bug compatibility. - */ - memcpy(&(rep_stats.pad0),&(penv->stats->data), - sizeof(XETrapGetStatsRep)); - WriteReplyToClient(client, rep_size, &rep_stats); - } - else - { - WriteReplyToClient(client, rep_size, penv->stats); - } - } - else - { - status = XETrapErrorBase + BadStatistics; - } - return(status); -} - -/* - * DESCRIPTION: - * - * This function is dispatched when a client requests the extension to - * be configured in some manner. - */ -int XETrapConfig(xXTrapConfigReq *request, ClientPtr client) -{ - UByteP vflags = request->config_flags_valid; - UByteP dflags = request->config_flags_data; - UByteP req_flags = request->config_flags_req; - UByteP event_flags = request->config_flags_event; - XETrapEnv *penv = XETenv[client->index]; - UByteP bit_flags = penv->cur.data_config_flags_data; - int status = Success; - CARD32 i = 0L; - - /* Check events and swap if desired */ - if (BitIsTrue(vflags,XETrapEvent)) - { /* Loop through all of the events */ - for (i=0L; icur.data_config_flags_event,i)))) - { /* At this point we *know* there's a change. The - * only question remaining is are there any more - * clients interested in this specific event. If - * so, *don't* swap this process! - */ - if (BitIsTrue(dflags,XETrapEvent)) - { /* Client wants the XTrap rtn */ - if (++(vectored_events[i]) <= 1L) - { /* first client, so do it */ - _SwapProc(&(XETrapEventProcVector[i]), - &(EventProcVector[i])); - } - } - else - { /* Client wants the *real* rtn */ - if (--(vectored_events[i]) <= 0L) - { /* No more clients using, so do it */ - _SwapProc(&(XETrapEventProcVector[i]), - &(EventProcVector[i])); - } - } - switch(i) - { - case KeyPress: /* needed for command key processing */ - case KeyRelease: - XETrapKbdDev->processInputProc = - (void_function)(EventProcVector[i] ? - (void_function)EventProcVector[i] : - (void_function)keybd_process_inp); - XETrapKbdDev->realInputProc = - (void_function)(EventProcVector[i] ? - (void_function)EventProcVector[i] : - (void_function)keybd_process_inp); - break; -#ifndef VECTORED_EVENTS - case ButtonPress: /* hack until events become vectored */ - case ButtonRelease: - case MotionNotify: - XETrapPtrDev->processInputProc = - (void_function)EventProcVector[i]; - XETrapPtrDev->realInputProc = - (void_function)EventProcVector[i]; - break; - default: - status = BadImplementation; - break; -#endif /* !VECTORED_EVENTS */ - } - BitToggle(penv->cur.data_config_flags_event,i); - } - } - } - if ((status == Success) && - (_CheckChangeBit(vflags,dflags,bit_flags,XETrapCmd))) - { - if (BitIsTrue(dflags, XETrapCmd)) - { /* Add accelerator entry to cmd_clients list iff necessary */ - penv->cur.data_config_cmd_key = request->config_cmd_key; - status = add_accelerator_node(penv->client, &cmd_clients); - } - else - { - penv->cur.data_config_cmd_key = 0L; /* default no KeyCode */ - remove_accelerator_node(penv->client, &cmd_clients); - } - } - if ((status == Success) && - (_CheckChangeBit(vflags,dflags,bit_flags,XETrapMaxPacket))) - { - if (BitIsTrue(dflags,XETrapMaxPacket)) - { /* Set size to what's passed in */ - if (request->config_max_pkt_size < XETrapMinPktSize) - { /* Tell them the value is too small */ - status = BadValue; - } - else - { - penv->cur.data_config_max_pkt_size = - request->config_max_pkt_size; - } - } - else - { /* Set it to the default (a *very* big number) */ - penv->cur.data_config_max_pkt_size = 0xFFFF; - } - } - /* If the valid flag is set for requests, then each of the - * requests is swapped if it's different from current state. - */ - if (BitIsTrue(vflags,XETrapRequest) && status == Success) - { /* Loop through all of the core requests */ - for (i=0L; icur.data_config_flags_req,i)))) - { /* At this point we *know* there's a change. The - * only question remaining is are there any more - * clients interested in this specific request. If - * so, *don't* swap this process! - */ - if (BitIsTrue(dflags,XETrapRequest)) - { /* Client wants the XTrap rtn */ - if (++(vectored_requests[i]) <= 1L) - { /* first client, so do it */ - _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); - } - } - else - { /* Client wants the *real* rtn */ - if (--(vectored_requests[i]) <= 0L) - { /* No more clients using, so do it */ - _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); - } - } - if (status == Success) - { - BitToggle(penv->cur.data_config_flags_req,i); - } - } - } - } - /* Check & Set the boolean flags */ - if (status == Success) - { - _CheckChangeBit(vflags,dflags,bit_flags,XETrapCmdKeyMod); - _CheckChangeBit(vflags,dflags,bit_flags,XETrapTimestamp); - _CheckChangeBit(vflags,dflags,bit_flags,XETrapWinXY); -/* _CheckChangeBit(vflags,dflags,bit_flags,XETrapCursor); */ -#ifdef COLOR_REPLIES - _CheckChangeBit(vflags,dflags,bit_flags,XETrapColorReplies); -#endif /* COLOR_REPLIES */ - if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapGrabServer)) - { /* Let any client uncoditionally set/clear Grabs */ - ignore_grabs = BitValue(dflags, XETrapGrabServer); - } - } - /* The statistics vflag/dflag mechanism is a little different - * from most. The dflag is initially set to 0 to indicate no - * statistics. When a config request comes in to request - * statistics, memory's allocated and the dflag is set. - * Thereafter, whenever a client wants to clear the counters, he - * simply sets the vflag and clears the dflag. Multiple requests - * for statistics configuration are ignored, and the stats memory is - * free'd only when the client disconnects. - */ - if (status == Success) - { - if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapStatistics)) - { - if (BitIsTrue(dflags,XETrapStatistics)) - { /* Do we need to allocate memory? */ - if (penv->stats == NULL && (penv->stats = - (xXTrapGetStatsReply *)Xcalloc(sizeof(xXTrapGetStatsReply))) - != NULL) - { /* Set up the reply header */ - penv->stats->type = X_Reply; - penv->stats->length = XEXTRA(xXTrapGetStatsReply); - /* add accelerator node for stats clients list */ - status = add_accelerator_node(penv->client, &stats_clients); - } - else if (penv->stats == NULL) - { /* No Memory! */ - status = BadAlloc; - } - } - else - { /* Zero out counters */ - (void)memset(penv->stats->data.requests, 0L, - sizeof(penv->stats->data.requests)); - (void)memset(penv->stats->data.events, 0L, - sizeof(penv->stats->data.events)); - /* Re-cock the Stat's flag so that it'll - * sense a change for next zero'ing out - * of the counters. - */ - BitTrue(penv->cur.data_config_flags_data, XETrapStatistics); - } - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This function sets the XETrapTrapActive bit to indicate that Trapping - * of requests and/or core events to the client may take place. - * - */ -int XETrapStartTrap(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - int status = add_accelerator_node(penv->client, &io_clients); - if (status == Success) - { - BitTrue(penv->cur.data_state_flags, XETrapTrapActive); - } - return(status); -} -/* - * DESCRIPTION: - * - * This function clears the XETrapTrapActive bit to indicate that Trapping - * of requests and/or core events to the client may *not* take place. - * - */ -int XETrapStopTrap(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - - remove_accelerator_node(penv->client, &io_clients); - BitFalse(penv->cur.data_state_flags, XETrapTrapActive); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the specific XTrap version of this extension. - */ -int XETrapGetVersion(xXTrapGetReq *request, ClientPtr client) -{ - xXTrapGetVersReply ver_rep; - XETrapEnv *penv = XETenv[client->index]; - - update_protocol(request,client); /* to agree on protocol version */ - /* Initialize the reply as needed */ - ver_rep.hdr.type = X_Reply; - ver_rep.hdr.detail = XETrap_GetVersion; - ver_rep.hdr.sequenceNumber = client->sequence; - ver_rep.hdr.length = XEXTRA(xXTrapGetVersReply); - ver_rep.data.xtrap_release = XETrap_avail.data.xtrap_release; - ver_rep.data.xtrap_version = XETrap_avail.data.xtrap_version; - ver_rep.data.xtrap_revision = XETrap_avail.data.xtrap_revision; - ver_rep.data.xtrap_protocol = penv->protocol; /* return agreed protocol */ - WriteReplyToClient(client, sizeof(xXTrapGetVersReply), &ver_rep); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the specific XTrap version of this extension. - */ -int XETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) -{ - xXTrapGetLITimReply tim_rep; - XETrapEnv *penv = XETenv[client->index]; - - /* Initialize the reply as needed */ - tim_rep.hdr.type = X_Reply; - tim_rep.hdr.detail = XETrap_GetLastInpTime; - tim_rep.hdr.sequenceNumber = client->sequence; - tim_rep.hdr.length = XEXTRA(xXTrapGetLITimReply); - tim_rep.data_last_time = penv->last_input_time; - WriteReplyToClient(client, sizeof(xXTrapGetLITimReply), &tim_rep); - return(Success); -} - -/* - * DESCRIPTION: - * - * This routine is swapped in for the server's output request vectors. - * After writing the request to one (or more) XTrap client(s), this - * routine ALWAYS returns by calling the REAL output request vector rtn. - * - * Note: Swapped Requests are handled automatically since the unswapped - * vectored routine is called after the request has been swapped. - * IOW, all requests are directed through ProcVector eventually and are - * "unswapped" at that point. It is necessary to swap the data - * back if writing to a swapped client, however, and this is done - * by calling the appropriate XETSwProcVector[] routine. - */ -int XETrapRequestVector(ClientPtr client) -{ - int status = True; - XETrapDatum *pdata, *spdata = NULL; - REQUEST(xResourceReq); - WindowPtr window_ptr; - XETrapEnv *penv; - BYTE *tptr; - ClientList *ioc = &io_clients; - ClientList *stc = &stats_clients; - INT32 asize = sizeof(pdata->hdr) + stuff->length * sizeof(CARD32); - INT32 size = MAX(asize,XETrapMinPktSize); /* Must be at least */ - INT32 csize; /* size of request to send to the XTrap client */ - - /* Get memory for the data to be sent */ - if ((pdata = (XETrapDatum *)Xcalloc(size)) == NULL) - { /* Can't do anything accept set a flag since we don't - * know who to send the error to yet. - */ - status = False; - } - - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - if (status == False) - { /* We didn't get the memory! Complain */ - SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, - stuff->reqType, 0L, BadAlloc); - break; - } - if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) - { /* This particular client is interested in *this* request */ - pdata->hdr.client = client->index; /* stuff client index in hdr */ - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapWinXY)) - { - window_ptr = (WindowPtr) LookupDrawable(stuff->id, client); - if (window_ptr == 0L) - { /* Failed...invalidate the X and Y coordinate data. */ - pdata->hdr.win_x = -1L; - pdata->hdr.win_y = -1L; - } - else - { - pdata->hdr.screen = window_ptr->drawable.pScreen->myNum; - pdata->hdr.win_x = window_ptr->drawable.x; - pdata->hdr.win_y = window_ptr->drawable.y; - } - } - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapTimestamp)) - { - pdata->hdr.timestamp = GetTimeInMillis(); - } - /* Copy the information to a location we can write it from */ - (void) memcpy(&(pdata->u.req),stuff,stuff->length*sizeof(CARD32)); - pdata->hdr.count = MIN(penv->cur.data_config_max_pkt_size,asize); - XETrapSetHeaderRequest(&(pdata->hdr)); - - /* Perform any needed byte/word swapping. NOTE: This is not - * the "normal" technique that should be used to perform the - * swapping. The reason that we do it here is to be sure to - * do it only once in a controlled manner, which we can not - * guarentee in the case of the Xlib transport. Notice that - * we don't swap the XTRAP EVENT information. This is done - * in the XETrapWriteXLib() routine. - */ - - if (penv->client->swapped) - { /* need to deal with swapped clients */ - if (spdata == NULL) - { /* Get memory for the swapped data to be sent */ - if ((spdata = (XETrapDatum *)Xcalloc(size)) == NULL) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - stuff->reqType, 0L, BadAlloc); - break; - } - - memcpy(spdata,pdata,size); /* fill in the info */ - /* Now call the request-specific rtn to swap the request */ - if (stuff->reqType < 128) - { /* a core request, good */ - (*XETSwProcVector[stuff->reqType])(&(spdata->u.req), - penv->client); /* RTC X11R6 */ - } - else if (penv->cur.data_config_max_pkt_size == - XETrapMinPktSize) - { /* Minimum size, so swap it as an ResourceReq */ - XETSwResourceReq(&(spdata->u.req)); - } - else - { /* trying to swap an extension request! */ - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - stuff->reqType, 0L, XETrapErrorBase + BadSwapReq); - } - } - /* need to stow in the latest header (count) */ - memcpy(spdata,pdata,SIZEOF(XETrapHeader)); - sXETrapHeader(&(spdata->hdr)); /* swap the XTrap Header */ - } - /* Write as many bytes of information as the client wants */ - tptr = (BYTE *)(penv->client->swapped ? spdata : pdata); - csize = MAX(pdata->hdr.count, XETrapMinPktSize); - if (XETrapWriteXLib(penv, tptr, csize) != csize) - { - SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, - stuff->reqType, 0L, XETrapErrorBase + BadIO); - } -#ifdef COLOR_REPLIES - /* Process Color Replies, if desired, and applicable */ - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapColorReplies)) - { /* wants color replies */ - switch(stuff->reqType) - { - case X_AllocColor: - GetSendColorRep(client, stuff); - break; - case X_AllocNamedColor: - GetSendNamedColorRep(client, stuff); - break; - case X_AllocColorCells: - GetSendColorCellsRep(client, stuff); - break; - case X_AllocColorPlanes: - GetSendColorPlanesRep(client, stuff); - break; - default: - break; - } - } -#endif /* COLOR_REPLIES */ - } - } - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) - { /* This particular client would like this particular stat */ - penv->stats->data.requests[stuff->reqType]++; - } - } - - if (pdata) - { - Xfree(pdata); - } - if (spdata) - { - Xfree(spdata); - } - if (ignore_grabs == True && - (stuff->reqType == X_GrabServer || stuff->reqType == X_UngrabServer)) - { /* doesn't want Grab's! Note: this is a "last configured" setting */ -#ifndef NO_NEW_XTRAP - int status; - - if (stuff->reqType == X_GrabServer) - { - ClientList *pclient; - - /* first call grab server procedure */ - status = (*XETrapProcVector[stuff->reqType])(client); - - /* then add XTrap controlling clients */ - for (pclient = &io_clients; pclient; pclient = pclient->next) - if (pclient->client) - MakeClientGrabImpervious(pclient->client); - } - else - { - ClientList *pclient; - - /* first drop XTrap controlling clients */ - for (pclient = &io_clients; pclient; pclient = pclient->next) - if (pclient->client) - MakeClientGrabPervious(pclient->client); - - /* then call ungrab server procedure */ - status = (*XETrapProcVector[stuff->reqType])(client); - } - return status; -#else /* NO_NEW_XTRAP */ - return(Success); -#endif /* NO_NEW_XTRAP */ - } - else - { - return((*XETrapProcVector[stuff->reqType])(client)); - } -} -/* - * - * DESCRIPTION: - * - * This routine intercepts input xEvents from the keyboard. - * if XETrapTrapActive, will write record to client(s) - * and then pass the event to the server iff not command - * key and gate is open. If it's a command key, then twiddle - * the gate state as required (optional, see below). - * - * This routine implements an optional user specified command key - * that can be used to close the input pipe into the server - * while a client command is generated. The keypress of the - * command key places this routine in command mode, the keyrelease - * exits command mode. - * - * A keypress of the command key followed by the - * optionally specified lock key will place this routine in continuous - * command mode until the command key and lock key are pressed again - * to exit command mode. In the locked state, the client interprets - * keystrokes as it wishes, as commands or as input to a prior command. - * - * Both mechanisms can be used alternately. - * - * IMPLICIT INPUTS : - * - * penv->cur.data_config_cmd_key : - * This is the keycode of the key that is used to stop - * and restart the transmission of intercepted input - * events to the server. If specified, the gate_state - * flag will be set or cleared depending on the state of - * the command_key. - * - * penv->cur.data_config_flags_data.XETrapCmdKeyMod: - * This is the value of the mode in which the command_key - * will operate. It currently has two values: MODIFIER and - * COMMAND_LOCK. MODIFIER mode clears gate_state on - * keypress, and sets gate_state on keyrelease. - * COMMAND_LOCK mode toggles gate_state on - * or off. - * - * gate_closed: - * A flag that is set/cleared in the xtrap_keyboard - * routine that indicates whether intercepted input - * should be passed to the server at any particular - * instance. - * - * - * next_key: - * This variable tracks the state of the next key to be - * pressed or released. It allows the checking of double - * presses of the command key to be sent to the server and - * keeps good state order when the command key is used. - * - * key_ignore: - * This variable indicates whether or not the specific - * key should be ignored for subsequent server processing. - * - */ -int XETrapKeyboard(xEvent *x_event, DevicePtr keybd, int count) -{ - register BYTE type = x_event->u.u.type; - register BYTE detail = x_event->u.u.detail; - XETrapEnv *penv; - ClientList *stc = &stats_clients; - ClientList *cmc = &cmd_clients; - int_function cur_func = XETrapKeyboard; - -#ifdef VERBOSE - if (count != 1L) - { /* We haven't coded for this situation yet! */ - ErrorF("Warning! Event count != 1 (%d)\n", count); - } -#endif - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_event,type)) - { /* This particular client would like this particular stat */ - penv->stats->data.events[type]++; - } - } -#ifndef VECTORED_EVENTS - /* We *only* StampAndMail command keys with vectored events since - * we get much more data by waiting till we get called in XETrapEventVector - */ - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ -#endif - while (cmc->next != NULL) - { - cmc = cmc->next; - penv = XETenv[cmc->client->index]; - key_ignore = False; - if (detail == penv->cur.data_config_cmd_key) - { - if (BitIsTrue(penv->cur.data_config_flags_data, XETrapCmdKeyMod)) - { - switch (type) - { - case KeyPress: - if (next_key == XEKeyIsEcho) - { - break; - } - gate_closed = True; - next_key = XEKeyIsClear; - break; - - case KeyRelease: - if (next_key == XEKeyIsEcho) - { - next_key = XEKeyIsClear; - break; - } - if (next_key == XEKeyIsClear) - { - next_key = XEKeyIsEcho; - } - else - { /* it's Other, so Clear it */ - next_key = XEKeyIsClear; - } - gate_closed = False; - key_ignore = True; - break; - - default: break; - } - } - else - { - switch (type) - { - case KeyPress: - if (next_key == XEKeyIsEcho) - { - gate_closed = False; - break; - } - /* Open gate on cmd key release */ - if ((next_key == XEKeyIsOther) && - gate_closed == True) - { - break; - } - gate_closed = True; - next_key = XEKeyIsClear; - break; - - case KeyRelease: - if (next_key == XEKeyIsClear) - { - next_key = XEKeyIsEcho; - break; - } - - if (next_key == XEKeyIsEcho) - { - next_key = XEKeyIsClear; - break; - } - - gate_closed = False; - key_ignore = True; - next_key = XEKeyIsClear; - break; - - default: - break; - } - } - } - else - { - next_key = XEKeyIsOther; - } - } - - /* - * If the gate to the server is open, - * and we are not ignoring a keyrelease, - * pass the event to the server for normal processing. - */ -#ifndef VECTORED_EVENTS - if ((gate_closed == False) && (key_ignore == False)) - { - if (XETrapEventProcVector[type] != cur_func) - { /* to protect us from infinite loops */ - (void)(*XETrapEventProcVector[type])(x_event,keybd,count); - } - else - { - (void)(*EventProcVector[type])(x_event,keybd,count); - } - } -#else /* VECTORED_EVENTS */ - if ((gate_closed == False) && (key_ignore == False)) - { /* send event on to server to be trapped again in XETrapEventVector */ - (void)(*keybd_process_inp)(x_event,keybd,count); - } - else - { - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ - } -#endif - key_ignore = False; /* reset for next time around */ - return 0; -} - -/* - * DESCRIPTION: - * - * This routine intercepts input xEvents from the pointer device - * and passes the input event back to the server for normal processing. - * - * This routine is sensitive to whether input is being passed - * up to the server or not. This state is set by the keyboard - * input routine. - * - * - */ -#ifndef VECTORED_EVENTS -int XETrapPointer(xEvent *x_event, DevicePtr ptrdev, int count) -{ - XETrapEnv *penv; - ClientList *stc = &stats_clients; - int_function cur_func = XETrapPointer; - -#ifdef VERBOSE - if (count != 1L) - { /* We haven't coded for this situation yet! */ - ErrorF("Warning! Event count != 1 (%d)\n", count); - } -#endif - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_event,x_event->u.u.type)) - { /* This particular client would like this particular stat */ - penv->stats->data.events[x_event->u.u.type]++; - } - } - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ - /* - * If the gate to the server is open, - * pass the event up like nothing has happened. - */ - if (gate_closed == False) - { - if (XETrapEventProcVector[x_event->u.u.type] != cur_func) - { /* to protect us from infinite loops */ - (void)(*XETrapEventProcVector[x_event->u.u.type])(x_event,ptrdev, - count); - } - else - { - (void)(*EventProcVector[x_event->u.u.type])(x_event,ptrdev,count); - } - } - return 0; -} -#endif /* !VECTORED_EVENTS */ - - -/* - * DESCRIPTION: - * - * This routine determines whether it needs to send event data - * to the XTrap Client(s). If so, it timestamps it appropriately - * and writes out both the header and detail information. - * - */ -void XETrapStampAndMail(xEvent *x_event) -{ - XETrapDatum data; - register CARD32 size; - XETrapEnv *penv; - ClientList *ioc = &io_clients; - - /* Currently, we're intercepting core events *before* most - * of the event information's filled in. Specifically, the - * only fields that are valid at this level are: type, detail, - * time, rootX, rootY, and state. - */ - /* Loop through all clients wishing I/O */ - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - /* Do we have a valid fd? Do we care about this event? */ - if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) - { - XETrapSetHeaderEvent(&(data.hdr)); - data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ - data.hdr.screen = 0L; /* not till Events are vectored! */ - data.hdr.client = 0L; /* not till Events are vectored! */ - if (BitIsTrue(penv->cur.data_config_flags_data, - XETrapTimestamp)) - { - data.hdr.timestamp = GetTimeInMillis(); - } - size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ - penv->last_input_time = x_event->u.keyButtonPointer.time; - /* Copy the event information into our local memory */ - (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); - -#ifdef PANORAMIX - if (!noPanoramiXExtension && - (data.u.event.u.u.type == MotionNotify || - data.u.event.u.u.type == ButtonPress || - data.u.event.u.u.type == ButtonRelease || - data.u.event.u.u.type == KeyPress || - data.u.event.u.u.type == KeyRelease)) { - int scr = XineramaGetCursorScreen(); - data.u.event.u.keyButtonPointer.rootX += - panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; - data.u.event.u.keyButtonPointer.rootY += - panoramiXdataPtr[scr].y - panoramiXdataPtr[0].y; - } -#endif - - if (penv->client->swapped) - { /* - * Notice that we don't swap the XTRAP EVENT information. - * This is done in the XETrapWriteXLib() routine. - */ - xEvent ToEvent; - (*EventSwapVector[data.u.event.u.u.type & 0177]) - (&data.u.event,&ToEvent); - (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); - sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ - } - /* From this point on, the contents of data is swapped and - * therefore we should not refer to it for information. - */ - if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - x_event->u.u.type, 0L, XETrapErrorBase + BadIO); - } - } - } - return; -} -#ifdef VECTORED_EVENTS -int XETrapEventVector(ClientPtr client, xEvent *x_event) -{ - XETrapDatum data; - register CARD32 size; - XETrapEnv *penv; - ClientList *ioc = &io_clients; - - /* Loop through all clients wishing I/O */ - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - /* Do we care about this event? */ - if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) - { - XETrapSetHeaderEvent(&(data.hdr)); - data.hdr.client = client->index; - data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ - if ((current_screen < 0L) || ((x_event->u.u.type >= KeyPress) && - (x_event->u.u.type <= MotionNotify) && - (!x_event->u.keyButtonPointer.sameScreen))) - { /* we've moved/warped to another screen */ - WindowPtr root_win = GetCurrentRootWindow(); - current_screen = root_win->drawable.pScreen->myNum; - } - data.hdr.screen = current_screen; - if (BitIsTrue(penv->cur.data_config_flags_data, - XETrapTimestamp)) - { - data.hdr.timestamp = GetTimeInMillis(); - } - size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ - penv->last_input_time = x_event->u.keyButtonPointer.time; - /* Copy the event information into our local memory */ - (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); - - if (penv->client->swapped) - { - xEvent ToEvent; - (*EventSwapVector[data.u.event.u.u.type & 0177]) - (&data.u.event,&ToEvent); - (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); - sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ - } - /* From this point on, the contents of pdata is swapped and - * therefore we should not refer to it for information. - */ - if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - x_event->u.u.type, 0L, XETrapErrorBase + BadIO); - } - } - } - return; -} -#endif /* VECTORED_EVENTS */ -void sReplyXTrapDispatch(ClientPtr client, int size, char *reply) -{ - register XETrapRepHdr *rep = (XETrapRepHdr *)reply; - - switch(rep->detail) - { - case XETrap_GetAvailable: - { - xXTrapGetAvailReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetAvail(client,size,(char *)&lrep); - } - break; - case XETrap_GetCurrent: - { - xXTrapGetCurReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetCur(client,size,(char *)&lrep); - } - break; - case XETrap_GetStatistics: - { - xXTrapGetStatsReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetStats(client,size,(char *)&lrep); - } - break; - case XETrap_GetVersion: - { - xXTrapGetVersReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetVers(client,size,(char *)&lrep); - } - break; - case XETrap_GetLastInpTime: - { - xXTrapGetLITimReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetLITim(client,size,(char *)&lrep); - } - break; - default: - SendErrorToClient(client,XETrap_avail.data.major_opcode, - rep->detail, 0L, BadImplementation); - break; - } - return; -} - -/* - * XLib communications routines - */ - -/* - * DESCRIPTION: - * - * This function performs the transport specific functions required - * for writing data back to an XTrap client over XLib. The trick is - * packaging the data into <=32 byte packets to conform to the sizeof - * an X Event. nbytes must be at least equal to XETrapMinPktSize - * - */ -int XETrapWriteXLib(XETrapEnv *penv, BYTE *data, CARD32 nbytes) -{ - CARD32 size, total = 0L; - xETrapDataEvent event; - - /* Initialize the detail field to show the beginning of a datum */ - event.detail = XETrapDataStart; - event.idx = 0L; - - /* This loop could be optimized by not calling Write until after all - * of the events are packaged. However, this would require memory - * games, and may not therefore be a win. - */ - while (nbytes > 0L) - { /* How many bytes can we send in this packet */ - size = (nbytes > sz_EventData) ? sz_EventData : nbytes; - - /* Initialize the event */ - event.type = XETrapData + XETrap_avail.data.event_base; - event.sequenceNumber = penv->client->sequence; - - /* Copy the data we are sending */ - (void)memcpy(event.data,data,size); - if (size < sz_EventData) - (void)memset(event.data+size,0L,sz_EventData-size); - data += size; - nbytes -= size; - total += size; - - /* Set the detail field to show the continuation of datum */ - if (total != size) - { /* this is not the first one */ - event.detail = (nbytes > 0) ? XETrapDataContinued : XETrapDataLast; - } - - /* Send this part to the client */ - WriteEventsToClient(penv->client, 1L, (xEvent *) &event); - event.idx++; /* Bump the index for the next event */ - } - return(total); -} - -/*----------------------------* - * Static Functions - *----------------------------*/ - -static void update_protocol(xXTrapGetReq *reqptr, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - /* update protocol number */ - switch (reqptr->protocol) - { - /* known acceptable protocols */ - case 31: - case XETrapProtocol: - penv->protocol = reqptr->protocol; - break; - /* all else */ - default: /* stay backwards compatible */ - penv->protocol = 31; - break; - } -} - -/* Swap 2 functions. This is a function instead of a macro to help to keep - * lint from complaining about mixed types. It seems to work, but I would - * probably classify this as a hack. - */ -static void _SwapProc( register int (**f1)(), register int (**f2)()) -{ - register int (*t1)() = *f1; - *f1 = *f2; - *f2 = t1; - - return; -} - -/* - * DESCRIPTION: - * - * This function swaps the byte order of fields within - * the XTrap Event Header. It assumes the data will be - * swapped by code in XETrapRequestVector(). - * - */ -static void sXETrapEvent(xETrapDataEvent *from, xETrapDataEvent *to) -{ - to->type = from->type; - to->detail = from->detail; - cpswaps(from->sequenceNumber,to->sequenceNumber); - cpswapl(from->idx,to->idx); - /* Assumes that the data's already been swapped by XETrapRequestVector */ - memcpy(to->data, from->data, SIZEOF(EventData)); -} - -/* - * DESCRIPTION: - * - * This function adds a node from an accelerator linked-list - * (either io_clients, stats_clients, or cmd_clients). - * - */ -static int add_accelerator_node(ClientPtr client, ClientList *accel) -{ - Bool found = False; - int status = Success; - - while (accel->next != NULL) - { - if (accel->client == client) - { - found = True; /* Client's already known */ - break; - } - else - { - accel = accel->next; - } - } - if (found == False) - { - if ((accel->next = (ClientList *)Xcalloc(sizeof(ClientList))) == NULL) - { - status = BadAlloc; - } - else - { /* fill in the node */ - accel = accel->next; - accel->next = NULL; - accel->client = client; - } - } - return(status); -} -/* - * DESCRIPTION: - * - * This function removes a node from an accelerator linked-list - * (either io_clients, stats_clients, or cmd_clients). - * - */ -static void remove_accelerator_node(ClientPtr client, ClientList *accel) -{ - while (accel->next != NULL) - { - if (accel->next->client == client) - { - ClientList *tmp = accel->next->next; - Xfree(accel->next); - accel->next = tmp; - break; - } - else - { - accel = accel->next; - } - } - - return; -} - -#ifdef COLOR_REPLIES -static void GetSendColorRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColor() in dispatch.c */ - XETrapDatum data; - int retval; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorReply *crep = (xAllocColorReply *)&(data.u.reply); - xAllocColorReq *creq = (xAllocColorReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - /* Fill in the header fields */ - data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ - XETrapSetHeaderReply(&(data.hdr)); - /* Hack alert: - * We need to pass the "reply" type in the header since replies don't - * contain the id's themselves. However, we're not changing the - * protocol to support this until we decide exactly how we want to - * do *all* replies (e.g. not just ColorReplies). So until then, stow - * the reply id in the screen field which wouldn't normally be used in - * this context. - */ - data.hdr.screen = req->reqType; - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - crep->red = creq->red; - crep->green = creq->green; - crep->blue = creq->blue; - crep->pixel = 0; - if ((retval = AllocColor(pmap, &(crep->red), &(crep->green), - &(crep->blue), &(crep->pixel), client->index)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - return; - } - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n; - swaps(&(crep->red), n); - swaps(&(crep->green), n); - swaps(&(crep->blue), n); - swapl(&(crep->pixel), n); - } - /* Send data to client */ - if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) - != XETrapMinPktSize) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } -} - -static void GetSendNamedColorRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocNamedColor() in dispatch.c */ - XETrapDatum data; - XETrapEnv *penv = XETenv[client->index]; - int retval; - xAllocNamedColorReply *nrep = (xAllocNamedColorReply *)&(data.u.reply); - xAllocNamedColorReq *nreq = (xAllocNamedColorReq *)req; - ColormapPtr pcmp = (ColormapPtr )LookupIDByType(nreq->cmap, RT_COLORMAP); - - data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ - XETrapSetHeaderReply(&(data.hdr)); - /* Hack alert: - * We need to pass the "reply" type in the header since replies don't - * contain the id's themselves. However, we're not changing the - * protocol to support this until we decide exactly how we want to - * do *all* replies (e.g. not just ColorReplies). So until then, stow - * the reply id in the screen field which wouldn't normally be used in - * this context. - */ - data.hdr.screen = req->reqType; - if (!pcmp) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - if (!OsLookupColor(pcmp->pScreen->myNum, (char *)&nreq[1], - nreq->nbytes, &(nrep->exactRed), &(nrep->exactGreen), - &(nrep->exactBlue))) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadName); - return; - } - nrep->screenRed = nrep->exactRed; - nrep->screenGreen = nrep->exactGreen; - nrep->screenBlue = nrep->exactBlue; - nrep->pixel = 0; - if ((retval = AllocColor(pcmp, &(nrep->screenRed), - &(nrep->screenGreen), &(nrep->screenBlue), &(nrep->pixel), - client->index)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - return; - } - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n; - swapl(&(nrep->pixel), n); - swaps(&(nrep->exactRed), n); - swaps(&(nrep->exactGreen), n); - swaps(&(nrep->exactBlue), n); - swaps(&(nrep->screenRed), n); - swaps(&(nrep->screenGreen), n); - swaps(&(nrep->screenBlue), n); - } - - /* Send data to client */ - if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) - != XETrapMinPktSize) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } -} - -static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColorCells() in dispatch.c */ - int retval; - int npixels, nmasks; - unsigned long *ppixels, *pmasks; - long length; - XETrapDatum *data; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorCellsReply *crep; - xAllocColorCellsReq *creq = (xAllocColorCellsReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - npixels = creq->colors; - if (!npixels) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadValue); - return; - } - nmasks = creq->planes; - length = ((long)npixels + (long)nmasks) * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); - if (!data) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadAlloc); - return; - } - data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, - sizeof(XETrapDatum)+length); - XETrapSetHeaderReply(&(data->hdr)); - data->hdr.screen = req->reqType; /* hack! but necessary */ - ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); - pmasks = ppixels + npixels; - if ((retval = AllocColorCells(client->index, pmap, npixels, - nmasks, (Bool)creq->contiguous, ppixels, pmasks)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); - return; - } - crep = (xAllocColorCellsReply *)&(data->u.reply); - crep->nPixels = npixels; - crep->nMasks = nmasks; - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n, i, *ptr; - ptr=(INT32 *)ppixels; - swaps(&(crep->nPixels), n); - swaps(&(crep->nMasks), n); - for (i=0; ihdr.count) - != data->hdr.count) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } - DEALLOCATE_LOCAL(data); -} -static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColorPlanes() in dispatch.c */ - int retval; - int npixels, nmasks; - unsigned long *ppixels, *pmasks; - long length; - XETrapDatum *data; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorPlanesReply *crep; - xAllocColorPlanesReq *creq = (xAllocColorPlanesReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - npixels = creq->colors; - if (!npixels) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadValue); - return; - } - length = (long)npixels * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); - if (!data) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadAlloc); - return; - } - data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, - sizeof(XETrapDatum)+length); - XETrapSetHeaderReply(&(data->hdr)); - data->hdr.screen = req->reqType; /* hack! but necessary */ - ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); - crep = (xAllocColorPlanesReply *)&(data->u.reply); - if ((retval = AllocColorPlanes(client->index, pmap, npixels, - (int)creq->red, (int)creq->green, (int)creq->blue, - (int)creq->contiguous, ppixels, &(crep->redMask), &(crep->greenMask), - &(crep->blueMask))) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); - return; - } - crep->nPixels = npixels; - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n, i, *ptr; - ptr=(INT32 *)ppixels; - swaps(&(crep->nPixels), n); - swapl(&(crep->redMask), n); - swapl(&(crep->greenMask), n); - swapl(&(crep->blueMask), n); - for (i=0; ihdr.count) - != data->hdr.count) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } - DEALLOCATE_LOCAL(data); -} -#endif /* COLOR_REPLIES */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c deleted file mode 100644 index ba8249c35..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c +++ /dev/null @@ -1,1010 +0,0 @@ -/* $XFree86$ */ -/**************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1992 by - - Digital Equipment Corp., Maynard, MA - -X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. - -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 AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the device independent module responsible for all - * routines required for proper communication in a heterogeneous - * networking environment (i.e. client & server on different endian - * machines). The bulk of this module is patterned after X11/R4's - * server/dix/swapreq.c ; however, they infact swap fields - * in the exact opposite order since XTrap requires "unswapped" data - * to become "swapped" before sending it to a "swapped" client. - * - * CONTRIBUTORS: - * - * Ken Miller - * Marc Evans - * - * CHANGES: - * - * Robert Chesler - added client arg for X11R6 port in many spots - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" -#include "dixstruct.h" -#ifdef PC -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -#endif -# include "swapreq.h" /* Server SwapColorItem definition */ -#include -#include - -/* In-coming XTrap requests needing to be swapped to native format */ - -int sXETrapReset(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapReset(request,client)); -} - -int sXETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->protocol),n); - return(XETrapGetAvailable(request,client)); -} - -int sXETrapConfig(xXTrapConfigReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->config_max_pkt_size),n); - return(XETrapConfig(request,client)); -} - -int sXETrapStartTrap(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapStartTrap(request,client)); -} - -int sXETrapStopTrap(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapStopTrap(request,client)); -} - -int sXETrapGetCurrent(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetCurrent(request,client)); -} - -int sXETrapGetStatistics(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetStatistics(request,client)); -} - -#ifndef _XINPUT -int sXETrapSimulateXEvent(xXTrapInputReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->input.x),n); - swaps(&(request->input.y),n); - return(XETrapSimulateXEvent(request,client)); -} -#endif - -int sXETrapGetVersion(xXTrapGetReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->protocol),n); - return(XETrapGetVersion(request,client)); -} - -int sXETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetLastInpTime(request,client)); -} - - -/* Out-going XTrap replies needing to be swapped *from* native format */ - -void sReplyXETrapGetAvail(ClientPtr client, int size, char *reply) -{ - xXTrapGetAvailReply *rep = (xXTrapGetAvailReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swapl(&(rep->data.pf_ident),n); - swaps(&(rep->data.xtrap_release),n); - swaps(&(rep->data.xtrap_version),n); - swaps(&(rep->data.xtrap_revision),n); - swaps(&(rep->data.max_pkt_size),n); - swapl(&(rep->data.major_opcode),n); - swapl(&(rep->data.event_base),n); - swaps(&(rep->data.cur_x),n); - swaps(&(rep->data.cur_y),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetVers(ClientPtr client, int size, char *reply) -{ - xXTrapGetVersReply *rep = (xXTrapGetVersReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swaps(&(rep->data.xtrap_release),n); - swaps(&(rep->data.xtrap_version),n); - swaps(&(rep->data.xtrap_revision),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetLITim(ClientPtr client, int size, char *reply) -{ - xXTrapGetLITimReply *rep = (xXTrapGetLITimReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swapl(&(rep->data_last_time),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetCur(ClientPtr client, int size, char *reply) -{ - xXTrapGetCurReply *rep = (xXTrapGetCurReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swaps(&(rep->data_config_max_pkt_size),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetStats(ClientPtr client, int size, char *reply) -{ - xXTrapGetStatsReply *rep = (xXTrapGetStatsReply *)reply; - register char n; - register int i; - long *p; - - swaps(&(rep->sequenceNumber),n); - swapl(&(rep->length),n); - for (i=0L, p = (long *)rep->data.requests; i<256L; i++, p++) - { - swapl(p,n); - } - for (i=0L, p = (long *)rep->data.events; icount), n); - swapl(&(hdr->timestamp), n); - swaps(&(hdr->win_x), n); - swaps(&(hdr->win_y), n); - swaps(&(hdr->client), n); -} - - /* Out-going requests needing to be swapped *from* native format - * aka swapreq.c "equivalents" - */ - -/* The following is used for all requests that have - no fields to be swapped (except "length") */ -void XETSwSimpleReq(register xReq *data) -{ - register char n; - swaps(&(data->length), n); -} - -/* The following is used for all requests that have - only a single 32-bit field to be swapped, coming - right after the "length" field */ - -void XETSwResourceReq(register xResourceReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->id), n); -} - -void XETSwCreateWindow(register xCreateWindowReq *data,ClientPtr client) -{ - register char n; - - swapl(&(data->wid), n); - swapl(&(data->parent), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swaps(&(data->borderWidth), n); - swaps(&(data->class), n); - swapl(&(data->visual), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangeWindowAttributes(register xChangeWindowAttributesReq *data, -ClientPtr client) -{ - register char n; - - swapl(&(data->window), n); - swapl(&(data->valueMask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwReparentWindow(register xReparentWindowReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->parent), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwConfigureWindow(xConfigureWindowReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->window), n); - swaps(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - - -void XETSwInternAtom(register xInternAtomReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nbytes), n); -} - -void XETSwChangeProperty(register xChangePropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - swapl(&(data->type), n); - switch ( data->format ) { - case 8L : break; - case 16L: - SwapShorts((short *)(data + 1), data->nUnits); - break; - case 32L: - SwapLongs((CARD32 *)(data + 1), data->nUnits); - break; - } - swapl(&(data->nUnits), n); -} - -void XETSwDeleteProperty(register xDeletePropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - -} -void XETSwGetProperty(register xGetPropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - swapl(&(data->type), n); - swapl(&(data->longOffset), n); - swapl(&(data->longLength), n); -} - -void XETSwSetSelectionOwner(register xSetSelectionOwnerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->selection), n); - swapl(&(data->time), n); -} - -void XETSwConvertSelection(register xConvertSelectionReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->requestor), n); - swapl(&(data->selection), n); - swapl(&(data->target), n); - swapl(&(data->property), n); - swapl(&(data->time), n); -} - -void XETSwSendEvent(register xSendEventReq *data) -{ - register char n; - xEvent eventT; - void (*proc)(); - swapl(&(data->destination), n); - swapl(&(data->eventMask), n); - - /* Swap event */ - proc = EventSwapVector[data->event.u.u.type & 0177]; - if (!proc || (int (*)()) proc == (int (*)()) NotImplemented) - (*proc)(&(data->event), &eventT); - data->event = eventT; - swaps(&(data->length), n); -} - -void XETSwGrabPointer(register xGrabPointerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->eventMask), n); - swapl(&(data->confineTo), n); - swapl(&(data->cursor), n); - swapl(&(data->time), n); -} - -void XETSwGrabButton(register xGrabButtonReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->eventMask), n); - swapl(&(data->confineTo), n); - swapl(&(data->cursor), n); - swaps(&(data->modifiers), n); -} - -void XETSwUngrabButton(register xUngrabButtonReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwChangeActivePointerGrab(register xChangeActivePointerGrabReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cursor), n); - swapl(&(data->time), n); - swaps(&(data->eventMask), n); -} - -void XETSwGrabKeyboard(register xGrabKeyboardReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swapl(&(data->time), n); -} - -void XETSwGrabKey(register xGrabKeyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwUngrabKey(register xUngrabKeyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwGetMotionEvents(register xGetMotionEventsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->start), n); - swapl(&(data->stop), n); -} - -void XETSwTranslateCoords(register xTranslateCoordsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcWid), n); - swapl(&(data->dstWid), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); -} - -void XETSwWarpPointer(register xWarpPointerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcWid), n); - swapl(&(data->dstWid), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->srcWidth), n); - swaps(&(data->srcHeight), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); -} - -void XETSwSetInputFocus(register xSetInputFocusReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->focus), n); - swapl(&(data->time), n); -} - -void XETSwOpenFont(register xOpenFontReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->fid), n); - swaps(&(data->nbytes), n); -} - -void XETSwListFonts(register xListFontsReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->maxNames), n); - swaps(&(data->nbytes), n); -} - -void XETSwListFontsWithInfo(register xListFontsWithInfoReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->maxNames), n); - swaps(&(data->nbytes), n); -} - -void XETSwSetFontPath(register xSetFontPathReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nFonts), n); -} - -void XETSwCreatePixmap(register xCreatePixmapReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->pid), n); - swapl(&(data->drawable), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCreateGC(register xCreateGCReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->gc), n); - swapl(&(data->drawable), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangeGC(register xChangeGCReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->gc), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwCopyGC(register xCopyGCReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcGC), n); - swapl(&(data->dstGC), n); - swapl(&(data->mask), n); -} - -void XETSwSetDashes(register xSetDashesReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->gc), n); - swaps(&(data->dashOffset), n); - swaps(&(data->nDashes), n); -} - -void XETSwSetClipRectangles(register xSetClipRectanglesReq *data, ClientPtr -client) -{ - register char n; - swapl(&(data->gc), n); - swaps(&(data->xOrigin), n); - swaps(&(data->yOrigin), n); - SwapRestS(data); - swaps(&(data->length), n); -} - -void XETSwClearToBackground(register xClearAreaReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCopyArea(register xCopyAreaReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcDrawable), n); - swapl(&(data->dstDrawable), n); - swapl(&(data->gc), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCopyPlane(register xCopyPlaneReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcDrawable), n); - swapl(&(data->dstDrawable), n); - swapl(&(data->gc), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swapl(&(data->bitPlane), n); -} - -/* The following routine is used for all Poly drawing requests - (except FillPoly, which uses a different request format) */ -void XETSwPoly(register xPolyPointReq *data, ClientPtr client) -{ - register char n; - - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - SwapRestS(data); - swaps(&(data->length), n); -} - /* cannot use XETSwPoly for this one, because xFillPolyReq - * is longer than xPolyPointReq, and we don't want to swap - * the difference as shorts! - */ -void XETSwFillPoly(register xFillPolyReq *data, ClientPtr client) -{ - register char n; - - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - SwapRestS(data); - swaps(&(data->length), n); -} - -void XETSwPutImage(register xPutImageReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - /* Image should already be swapped */ -} - -void XETSwGetImage(register xGetImageReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swapl(&(data->planeMask), n); -} - -/* ProcPolyText used for both PolyText8 and PolyText16 */ - -void XETSwPolyText(register xPolyTextReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -/* ProcImageText used for both ImageText8 and ImageText16 */ - -void XETSwImageText(register xImageTextReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwCreateColormap(register xCreateColormapReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->mid), n); - swapl(&(data->window), n); - swapl(&(data->visual), n); -} - - -void XETSwCopyColormapAndFree(register xCopyColormapAndFreeReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->mid), n); - swapl(&(data->srcCmap), n); - -} - -void XETSwAllocColor (register xAllocColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->red), n); - swaps(&(data->green), n); - swaps(&(data->blue), n); -} - -void XETSwAllocNamedColor (register xAllocNamedColorReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->nbytes), n); -} - -void XETSwAllocColorCells (register xAllocColorCellsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->colors), n); - swaps(&(data->planes), n); -} - -void XETSwAllocColorPlanes(register xAllocColorPlanesReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->colors), n); - swaps(&(data->red), n); - swaps(&(data->green), n); - swaps(&(data->blue), n); -} - -void XETSwFreeColors (register xFreeColorsReq *data, ClientPtr -client) -{ - register char n; - swapl(&(data->cmap), n); - swapl(&(data->planeMask), n); - SwapRestL(data); - swaps(&(data->length), n); - -} - -void XETSwStoreColors (register xStoreColorsReq *data,ClientPtr -client) -{ - register char n; - unsigned long count; - xColorItem *pItem; - - swapl(&(data->cmap), n); - pItem = (xColorItem *) &(data[1]); - for(count = LengthRestB(data)/sizeof(xColorItem); count != 0; count--) - SwapColorItem(pItem++); - swaps(&(data->length), n); -} - -void XETSwStoreNamedColor (register xStoreNamedColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swapl(&(data->pixel), n); - swaps(&(data->nbytes), n); -} - -void XETSwQueryColors(register xQueryColorsReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->cmap), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwLookupColor(register xLookupColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->nbytes), n); -} - -void XETSwCreateCursor(register xCreateCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cid), n); - swapl(&(data->source), n); - swapl(&(data->mask), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwCreateGlyphCursor(register xCreateGlyphCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cid), n); - swapl(&(data->source), n); - swapl(&(data->mask), n); - swaps(&(data->sourceChar), n); - swaps(&(data->maskChar), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); -} - - -void XETSwRecolorCursor(register xRecolorCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cursor), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); -} - -void XETSwQueryBestSize (register xQueryBestSizeReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - -} - -void XETSwQueryExtension (register xQueryExtensionReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nbytes), n); -} - -void XETSwChangeKeyboardMapping (register xChangeKeyboardMappingReq *data) -{ - register char n; - register long *p; - register int i, count; - - swaps(&(data->length), n); - p = (long *)&(data[1]); - count = data->keyCodes * data->keySymsPerKeyCode; - for(i = 0; i < count; i++) - { - swapl(p, n); - p++; - } -} - - -void XETSwChangeKeyboardControl (register xChangeKeyboardControlReq *data, - ClientPtr client) -{ - register char n; - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangePointerControl (register xChangePointerControlReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->accelNum), n); - swaps(&(data->accelDenum), n); - swaps(&(data->threshold), n); -} - - -void XETSwSetScreenSaver (register xSetScreenSaverReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->timeout), n); - swaps(&(data->interval), n); -} - -void XETSwChangeHosts(register xChangeHostsReq *data) -{ - register char n; - - swaps(&(data->length), n); - swaps(&(data->hostLength), n); - -} -void XETSwRotateProperties(register xRotatePropertiesReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->window), n); - swaps(&(data->nAtoms), n); - swaps(&(data->nPositions), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -/*ARGSUSED*/ -void XETSwNoOperation(xReq *data) -{ - /* noop -- don't do anything */ -} - -/* Byte swap a list of longs */ -#if defined vms && !defined MITR5 -#ifndef LINKED_IN -void SwapLongs ( register long *list, register unsigned long count) -{ - register char n; - - while (count >= 8) { - swapl(list+0, n); - swapl(list+1, n); - swapl(list+2, n); - swapl(list+3, n); - swapl(list+4, n); - swapl(list+5, n); - swapl(list+6, n); - swapl(list+7, n); - list += 8; - count -= 8; - } - if (count != 0) { - do { - swapl(list, n); - list++; - } while (--count != 0); - } -} - -/* Byte swap a list of shorts */ - -void SwapShorts (register short *list, register unsigned long count) -{ - register char n; - - while (count >= 16) { - swaps(list+0, n); - swaps(list+1, n); - swaps(list+2, n); - swaps(list+3, n); - swaps(list+4, n); - swaps(list+5, n); - swaps(list+6, n); - swaps(list+7, n); - swaps(list+8, n); - swaps(list+9, n); - swaps(list+10, n); - swaps(list+11, n); - swaps(list+12, n); - swaps(list+13, n); - swaps(list+14, n); - swaps(list+15, n); - list += 16; - count -= 16; - } - if (count != 0) { - do { - swaps(list, n); - list++; - } while (--count != 0); - } -} - -SwapColorItem(xColorItem *pItem) -{ - register char n; - swapl(&pItem->pixel, n); - swaps(&pItem->red, n); - swaps(&pItem->green, n); - swaps(&pItem->blue, n); -} -#endif /* LINKED_IN */ -#endif /* vms */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c deleted file mode 100644 index 10a070e9e..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c +++ /dev/null @@ -1,242 +0,0 @@ -/* $XFree86$ */ -/**************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is contains Vector tables used for swapping and general - * dispatch by the XTrap server extension. - * - * CONTRIBUTORS: - * - * Ken Miller - * Marc Evans - * - */ - -/*-----------------* - * Include Files * - *-----------------*/ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" -#include "dixstruct.h" -#ifdef PC -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -#endif -#include -#include - -globaldef void_function XETSwProcVector[256L] = -{ - (void_function)ProcBadRequest, - XETSwCreateWindow, - XETSwChangeWindowAttributes, - XETSwResourceReq, /* GetWindowAttributes */ - XETSwResourceReq, /* DestroyWindow */ - XETSwResourceReq, /* 5 DestroySubwindows */ - XETSwResourceReq, /* XETSwChangeSaveSet, */ - XETSwReparentWindow, - XETSwResourceReq, /* MapWindow */ - XETSwResourceReq, /* MapSubwindows */ - XETSwResourceReq, /* 10 UnmapWindow */ - XETSwResourceReq, /* UnmapSubwindows */ - XETSwConfigureWindow, - XETSwResourceReq, /* XETSwCirculateWindow, */ - XETSwResourceReq, /* GetGeometry */ - XETSwResourceReq, /* 15 QueryTree */ - XETSwInternAtom, - XETSwResourceReq, /* XETSwGetAtomName, */ - XETSwChangeProperty, - XETSwDeleteProperty, - XETSwGetProperty, /* 20 */ - XETSwResourceReq, /* XETSwListProperties, */ - XETSwSetSelectionOwner, - XETSwResourceReq, /* XETSwGetSelectionOwner, */ - XETSwConvertSelection, - XETSwSendEvent, /* 25 */ - XETSwGrabPointer, - XETSwResourceReq, /* XETSwUngrabPointer, */ - XETSwGrabButton, - XETSwUngrabButton, - XETSwChangeActivePointerGrab, /* 30 */ - XETSwGrabKeyboard, - XETSwResourceReq, /* XETSwUngrabKeyboard, */ - XETSwGrabKey, - XETSwUngrabKey, - XETSwResourceReq, /* 35 XETSwAllowEvents, */ - XETSwSimpleReq, /* XETSwGrabServer, */ - XETSwSimpleReq, /* XETSwUngrabServer, */ - XETSwResourceReq, /* XETSwQueryPointer, */ - XETSwGetMotionEvents, - XETSwTranslateCoords, /*40 */ - XETSwWarpPointer, - XETSwSetInputFocus, - XETSwSimpleReq, /* XETSwGetInputFocus, */ - XETSwSimpleReq, /* QueryKeymap, */ - XETSwOpenFont, /* 45 */ - XETSwResourceReq, /* XETSwCloseFont, */ - XETSwResourceReq, /* XETSwQueryFont, */ - XETSwResourceReq, /* XETSwQueryTextExtents, */ - XETSwListFonts, - XETSwListFontsWithInfo, /* 50 */ - XETSwSetFontPath, - XETSwSimpleReq, /* GetFontPath, */ - XETSwCreatePixmap, - XETSwResourceReq, /* XETSwFreePixmap, */ - XETSwCreateGC, /* 55 */ - XETSwChangeGC, - XETSwCopyGC, - XETSwSetDashes, - XETSwSetClipRectangles, - XETSwResourceReq, /* 60 XETSwFreeGC, */ - XETSwClearToBackground, - XETSwCopyArea, - XETSwCopyPlane, - XETSwPoly, /* PolyPoint, */ - XETSwPoly, /* 65 PolyLine */ - XETSwPoly, /* PolySegment, */ - XETSwPoly, /* PolyRectangle, */ - XETSwPoly, /* PolyArc, */ - XETSwFillPoly, - XETSwPoly, /* 70 PolyFillRectangle */ - XETSwPoly, /* PolyFillArc, */ - XETSwPutImage, - XETSwGetImage, - XETSwPolyText, - XETSwPolyText, /* 75 */ - XETSwImageText, - XETSwImageText, - XETSwCreateColormap, - XETSwResourceReq, /* XETSwFreeColormap, */ - XETSwCopyColormapAndFree, /* 80 */ - XETSwResourceReq, /* XETSwInstallColormap, */ - XETSwResourceReq, /* XETSwUninstallColormap, */ - XETSwResourceReq, /* XETSwListInstalledColormaps, */ - XETSwAllocColor, - XETSwAllocNamedColor, /* 85 */ - XETSwAllocColorCells, - XETSwAllocColorPlanes, - XETSwFreeColors, - XETSwStoreColors, - XETSwStoreNamedColor, /* 90 */ - XETSwQueryColors, - XETSwLookupColor, - XETSwCreateCursor, - XETSwCreateGlyphCursor, - XETSwResourceReq, /* 95 XETSwFreeCursor, */ - XETSwRecolorCursor, - XETSwQueryBestSize, - XETSwQueryExtension, - XETSwSimpleReq, /* ListExtensions, */ - XETSwChangeKeyboardMapping, /* 100 */ - XETSwSimpleReq, /* GetKeyboardMapping, */ - XETSwChangeKeyboardControl, - XETSwSimpleReq, /* GetKeyboardControl, */ - XETSwSimpleReq, /* Bell, */ - XETSwChangePointerControl, /* 105 */ - XETSwSimpleReq, /* GetPointerControl, */ - XETSwSetScreenSaver, - XETSwSimpleReq, /* GetScreenSaver, */ - XETSwChangeHosts, - XETSwSimpleReq, /* 110 ListHosts, */ - XETSwSimpleReq, /* XETSwChangeAccessControl, */ - XETSwSimpleReq, /* XETSwChangeCloseDownMode, */ - XETSwResourceReq, /* XETSwKillClient, */ - XETSwRotateProperties, - XETSwSimpleReq, /* 115 ForceScreenSaver */ - XETSwSimpleReq, /* SetPointerMapping, */ - XETSwSimpleReq, /* GetPointerMapping, */ - XETSwSimpleReq, /* SetModifierMapping, */ - XETSwSimpleReq, /* GetModifierMapping, */ - NotImplemented, /* 120 */ - NotImplemented, - NotImplemented, - NotImplemented, - NotImplemented, - NotImplemented, /* 125 */ - NotImplemented, - XETSwNoOperation -}; - -/* NOTE: This array must align with the values of the constants used - * as minor_opcode values in the request structure. Failure to do this - * could result in random code paths. - */ -globaldef int_function XETrapDispatchVector[10L] = -{ - XETrapReset, /* 0 XETrap_Reset */ - XETrapGetAvailable, /* 1 XETrap_GetAvailable */ - XETrapConfig, /* 2 XETrap_Config */ - XETrapStartTrap, /* 3 XETrap_StartTrap */ - XETrapStopTrap, /* 4 XETrap_StopTrap */ - XETrapGetCurrent, /* 5 XETrap_GetCurrent */ - XETrapGetStatistics, /* 6 XETrap_GetStatistics */ -#ifndef _XINPUT - XETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ -#endif - XETrapGetVersion, /* 8 XETrap_GetVersion */ - XETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ -}; - -/* NOTE: This array must align with the values of the constants used - * as minor_opcode values in the request structure. Failure to do this - * could result in random code paths. - */ -globaldef int_function XETSwDispatchVector[10L] = -{ - sXETrapReset, /* 0 XETrap_Reset */ - sXETrapGetAvailable, /* 1 XETrap_GetAvailable */ - sXETrapConfig, /* 2 XETrap_Config */ - sXETrapStartTrap, /* 3 XETrap_StartTrap */ - sXETrapStopTrap, /* 4 XETrap_StopTrap */ - sXETrapGetCurrent, /* 5 XETrap_GetCurrent */ - sXETrapGetStatistics, /* 6 XETrap_GetStatistics */ -#ifndef _XINPUT - sXETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ -#endif - sXETrapGetVersion, /* 8 XETrap_GetVersion */ - sXETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ -}; - -/* ProcVector shadow vector */ -globaldef int_function XETrapProcVector[256L] = {XETrapRequestVector}; -/* - * Events are faked as if they're vectored since that's - * the way it'll eventually be (X11 R5?). - */ -#ifndef VECTORED_EVENTS -globaldef int_function EventProcVector[XETrapCoreEvents] = {NULL}; -#endif -globaldef int_function XETrapEventProcVector[XETrapCoreEvents] = {NULL}; - - diff --git a/nx-X11/programs/Xserver/Xext/EVI.c b/nx-X11/programs/Xserver/Xext/EVI.c deleted file mode 100644 index 1eca62693..000000000 --- a/nx-X11/programs/Xserver/Xext/EVI.c +++ /dev/null @@ -1,215 +0,0 @@ -/* $Xorg: EVI.c,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.10tsi Exp $ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "dixstruct.h" -#include "extnsionst.h" -#include "dix.h" -#define _XEVI_SERVER_ -#include -#include "EVIstruct.h" -#include "modinit.h" -#include "scrnintstr.h" - -#if 0 -static unsigned char XEVIReqCode = 0; -#endif -static EviPrivPtr eviPriv; - -static int -ProcEVIQueryVersion(ClientPtr client) -{ - /* REQUEST(xEVIQueryVersionReq); */ - xEVIQueryVersionReply rep; - register int n; - REQUEST_SIZE_MATCH (xEVIQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XEVI_MAJOR_VERSION; - rep.minorVersion = XEVI_MAJOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof (xEVIQueryVersionReply), (char *)&rep); - return (client->noClientException); -} -#define swapEviInfo(eviInfo, l) \ -{ \ - int l1 = l; \ - xExtendedVisualInfo *eviInfo1 = eviInfo; \ - while (l1-- > 0) { \ - swapl(&eviInfo1->core_visual_id, n); \ - swapl(&eviInfo1->transparency_value, n); \ - swaps(&eviInfo1->num_colormap_conflicts, n); \ - eviInfo1++; \ - } \ -} -#define swapVisual(visual, l) \ -{ \ - int l1 = l; \ - VisualID32 *visual1 = visual; \ - while (l1-- > 0) { \ - swapl(visual1, n); \ - visual1++; \ - } \ -} - -static int -ProcEVIGetVisualInfo(ClientPtr client) -{ - REQUEST(xEVIGetVisualInfoReq); - xEVIGetVisualInfoReply rep; - int i, n, n_conflict, n_info, sz_info, sz_conflict; - VisualID32 *conflict; - unsigned int total_visuals = 0; - xExtendedVisualInfo *eviInfo; - int status; - - /* - * do this first, otherwise REQUEST_FIXED_SIZE can overflow. we assume - * here that you don't have more than 2^32 visuals over all your screens; - * this seems like a safe assumption. - */ - for (i = 0; i < screenInfo.numScreens; i++) - total_visuals += screenInfo.screens[i]->numVisuals; - if (stuff->n_visual > total_visuals) - return BadValue; - - REQUEST_FIXED_SIZE(xEVIGetVisualInfoReq, stuff->n_visual * sz_VisualID32); - status = eviPriv->getVisualInfo((VisualID32 *)&stuff[1], (int)stuff->n_visual, - &eviInfo, &n_info, &conflict, &n_conflict); - if (status != Success) - return status; - sz_info = n_info * sz_xExtendedVisualInfo; - sz_conflict = n_conflict * sz_VisualID32; - rep.type = X_Reply; - rep.n_info = n_info; - rep.n_conflicts = n_conflict; - rep.sequenceNumber = client->sequence; - rep.length = (sz_info + sz_conflict) >> 2; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.n_info, n); - swapl(&rep.n_conflicts, n); - swapEviInfo(eviInfo, n_info); - swapVisual(conflict, n_conflict); - } - WriteToClient(client, sz_xEVIGetVisualInfoReply, (char *)&rep); - WriteToClient(client, sz_info, (char *)eviInfo); - WriteToClient(client, sz_conflict, (char *)conflict); - eviPriv->freeVisualInfo(eviInfo, conflict); - return (client->noClientException); -} - -static int -ProcEVIDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) { - case X_EVIQueryVersion: - return ProcEVIQueryVersion (client); - case X_EVIGetVisualInfo: - return ProcEVIGetVisualInfo (client); - default: - return BadRequest; - } -} - -static int -SProcEVIQueryVersion(ClientPtr client) -{ - REQUEST(xEVIQueryVersionReq); - int n; - swaps(&stuff->length, n); - return ProcEVIQueryVersion(client); -} - -static int -SProcEVIGetVisualInfo(ClientPtr client) -{ - register int n; - REQUEST(xEVIGetVisualInfoReq); - swaps(&stuff->length, n); - return ProcEVIGetVisualInfo(client); -} - -static int -SProcEVIDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_EVIQueryVersion: - return SProcEVIQueryVersion (client); - case X_EVIGetVisualInfo: - return SProcEVIGetVisualInfo (client); - default: - return BadRequest; - } -} - -/*ARGSUSED*/ -static void -EVIResetProc(ExtensionEntry *extEntry) -{ - eviDDXReset(); -} - -/**************** - * XEVIExtensionInit - * - * Called from InitExtensions in main() or from QueryExtension() if the - * extension is dynamically loaded. - * - ****************/ -void -EVIExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, - SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode))) { - XEVIReqCode = (unsigned char)extEntry->base; -#else - if (AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode)) { -#endif - eviPriv = eviDDXInit(); - } -} diff --git a/nx-X11/programs/Xserver/Xext/EVIstruct.h b/nx-X11/programs/Xserver/Xext/EVIstruct.h deleted file mode 100644 index 857e7565a..000000000 --- a/nx-X11/programs/Xserver/Xext/EVIstruct.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $Xorg: EVIstruct.h,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/EVIstruct.h,v 3.5 2003/07/16 01:38:28 dawes Exp $ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EVI_STRUCT_H -#define EVI_STRUCT_H - -/* - ****************************************************************************** - ** Per-ddx data - ****************************************************************************** - */ - -typedef int (*GetVisualInfoProc)( - VisualID32*, - int, - xExtendedVisualInfo**, - int*, - VisualID32**, - int* -); - -typedef void (*FreeVisualInfoProc)( - xExtendedVisualInfo*, - VisualID32* -); -typedef struct _EviPrivRec { - GetVisualInfoProc getVisualInfo; - FreeVisualInfoProc freeVisualInfo; -} EviPrivRec, *EviPrivPtr; - -extern EviPrivPtr eviDDXInit(void); -extern void eviDDXReset(void); - -#endif /* EVI_STRUCT_H */ diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index 199e59f1d..2c9798639 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -30,42 +30,16 @@ XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.43 2003/04/21 18:56:48 sv SUBDIRS = extmod #endif -#if BuildEVI -#ifdef SGIArchitectureNotTog - EVISRCS = EVI.c sgiEVI.c - EVIOBJS = EVI.o sgiEVI.o -#else - EVISRCS = EVI.c sampleEVI.c - EVIOBJS = EVI.o sampleEVI.o -#endif -#endif #if HasShm SHMSRCS = shm.c SHMOBJS = shm.o #endif -#if BuildMultibuffer - MULTIBUFSRC = mbuf.c - MULTIBUFOBJ = mbuf.o -#endif - #if BuildScreenSaverExt SCRNSAVSRC = saver.c SCRNSAVOBJ = saver.o #endif -#if BuildXF86VidModeExt && \ - (defined(XorgServer) && XorgServer) - VIDMODESRCS = xf86vmode.c - VIDMODEOBJS = xf86vmode.o -#endif - -#if BuildXF86MiscExt && \ - (defined(XorgServer) && XorgServer) -XF86MISCSRCS = xf86misc.c -XF86MISCOBJS = xf86misc.o -#endif - #if BuildXF86BigfontExt XF86BIGFSRCS = xf86bigfont.c XF86BIGFOBJS = xf86bigfont.o @@ -74,14 +48,6 @@ XF86BIGFOBJS = xf86bigfont.o #endif #endif -#if BuildXF86DGA - XF86DGASRCS = xf86dga.c xf86dga2.c - XF86DGAOBJS = xf86dga.o xf86dga2.o -#if HasShm - XVMCSHM_DEFINES = -DHAS_XVMCSHM -#endif -#endif - #if BuildXvExt XVSRCS = xvmain.c xvdisp.c xvmc.c XVOBJS = xvmain.o xvdisp.o xvmc.o @@ -92,20 +58,12 @@ XF86BIGFOBJS = xf86bigfont.o XRESOBJS = xres.o #endif -#if BuildAppgroup - APPGROUPSRCS = appgroup.c - APPGROUPOBJS = appgroup.o -#endif #if BuildXCSecurity SECURITYSRCS = security.c SECURITYOBJS = security.o SERVERCONFIGDIR = ServerConfigDir POLICYFILEDEF = -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGDIR)/SecurityPolicy\" #endif -#if BuildCup - CUPSRCS = cup.c - CUPOBJS = cup.o -#endif #if BuildXinerama PNRXSRCS = panoramiX.c panoramiXSwap.c panoramiXprocs.c PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o @@ -116,38 +74,22 @@ XF86BIGFOBJS = xf86bigfont.o DPMSOBJS = dpms.o #endif -#if BuildFontCache - FONTCACHESRCS = fontcache.c - FONTCACHEOBJS = fontcache.o -#if 0 - FONTCACHEINCLUDES = -I$(XF86SRC)/os-support -#endif -#endif + SRCS = shape.c $(SHMSRCS) xcmisc.c\ + xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ + bigreq.c sync.c $(SCRNSAVSRC) \ + $(XF86BIGFSRCS) $(SECURITYSRCS) \ + $(PNRXSRCS) $(DPMSSRCS) \ + $(XVSRCS) $(XRESSRCS) $(DMXSRCS) -#if BuildXevie - XEVIESRCS = xevie.c - XEVIEOBJS = xevie.o -#endif - - SRCS = shape.c $(SHMSRCS) $(MULTIBUFSRC) \ - mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ - bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ - $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ - $(APPGROUPSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ - $(XEVIESRCS) \ - $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS) - - OBJS = shape.o $(SHMOBJS) $(MULTIBUFOBJ) \ - mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ - bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ - $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ - $(APPGROUPOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ - $(XEVIEOBJS) \ - $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS) + OBJS = shape.o $(SHMOBJS) xcmisc.o \ + xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ + bigreq.o sync.o $(SCRNSAVOBJ) \ + $(XF86BIGFOBJS) $(SECURITYOBJS) \ + $(PNRXOBJS) $(DPMSOBJS) \ + $(XVOBJS) $(XRESOBJS) $(DMXOBJS) - SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) \ + SOBJS = $(SHMOBJS) $(SECURITYOBJS) \ shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ - $(XEVIEOBJS) \ $(XF86BIGFOBJS) #if defined(NXAgentServer) && NXAgentServer @@ -160,8 +102,9 @@ NX_DEFINES = -DNXAGENT_SERVER XF86INCLUDES = -I$(XF86COMSRC) #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(PNRXINCLUDES) $(XF86INCLUDES) \ - $(FONTCACHEINCLUDES) $(DMXINCLUDES) \ + $(PNRXINCLUDES) \ + $(XF86INCLUDES) \ + $(DMXINCLUDES) \ `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln @@ -173,13 +116,6 @@ XF86INCLUDES = -I$(XF86COMSRC) NormalLibraryObjectRule() -/* - * A hack to work around an optimization problem with gcc 2.95.2 - */ -#if BuildXF86VidModeExt && defined(GccOptBug295) -SpecialCObjectRule(xf86vmode,NullParameter,-O0) -#endif - NormalLibraryTarget(ext,$(OBJS)) LintLibraryTarget(ext,$(SRCS)) NormalLintTarget($(SRCS)) @@ -210,6 +146,5 @@ MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) #endif -InstallDriverSDKNonExecFile(dgaproc.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(xvdix.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(xvmcext.h,$(DRIVERSDKINCLUDEDIR)) diff --git a/nx-X11/programs/Xserver/Xext/appgroup.c b/nx-X11/programs/Xserver/Xext/appgroup.c deleted file mode 100644 index 1dd4f1ae5..000000000 --- a/nx-X11/programs/Xserver/Xext/appgroup.c +++ /dev/null @@ -1,829 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.10tsi Exp $ */ -/* -Copyright 1996, 1998, 2001 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. -*/ -/* $Xorg: appgroup.c,v 1.6 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "colormapst.h" -#include "servermd.h" -#define _XAG_SERVER_ -#include -#include -#define _SECURITY_SERVER -#include -#include - -#define XSERV_t -#include -#include "../os/osdep.h" - -#include - -#include "modinit.h" -#include "appgroup.h" - -typedef struct _AppGroupRec { - struct _AppGroupRec* next; - XID appgroupId; - ClientPtr* clients; - int nclients; - ClientPtr leader; - Bool single_screen; - Window default_root; - VisualID root_visual; - Colormap default_colormap; - Pixel black_pixel; - Pixel white_pixel; - xConnSetupPrefix connSetupPrefix; - char* ConnectionInfo; -} AppGroupRec, *AppGroupPtr; - -static int ProcXagDispatch(ClientPtr client); -static int SProcXagDispatch(ClientPtr client); -static void XagResetProc(ExtensionEntry* extEntry); - -#if 0 -static unsigned char XagReqCode = 0; -static int XagErrorBase; -#endif -static int XagCallbackRefCount = 0; - -static RESTYPE RT_APPGROUP; -static AppGroupPtr appGrpList = NULL; - -extern xConnSetupPrefix connSetupPrefix; -extern char* ConnectionInfo; -extern int connBlockScreenStart; - -static -int XagAppGroupFree( - void * what, - XID id) /* unused */ -{ - int i; - AppGroupPtr pAppGrp = (AppGroupPtr) what; - - if (pAppGrp->leader) - for (i = 0; i < pAppGrp->nclients; i++) { - pAppGrp->clients[i]->appgroup = NULL; - CloseDownClient (pAppGrp->clients[i]); - } - - if (pAppGrp == appGrpList) - appGrpList = appGrpList->next; - else { - AppGroupPtr tpAppGrp; - for (tpAppGrp = appGrpList; - tpAppGrp->next != NULL; - tpAppGrp = tpAppGrp->next) { - if (tpAppGrp->next == pAppGrp) { - tpAppGrp->next = tpAppGrp->next->next; - break; - } - } - } - (void) xfree (pAppGrp->clients); - (void) xfree (pAppGrp->ConnectionInfo); - (void) xfree (what); - return Success; -} - -/* static */ -void XagClientStateChange( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata) -{ - SecurityAuthorizationPtr pAuth; - NewClientInfoRec* pci = (NewClientInfoRec*) calldata; - ClientPtr pClient = pci->client; - AppGroupPtr pAppGrp; - XID authId = 0; - - if (!pClient->appgroup) { - switch (pClient->clientState) { - - case ClientStateAuthenticating: - case ClientStateRunning: - case ClientStateCheckingSecurity: - return; - - case ClientStateInitial: - case ClientStateCheckedSecurity: - /* - * If the client is connecting via a firewall proxy (which - * uses XC-QUERY-SECURITY-1, then the authId is available - * during ClientStateCheckedSecurity, otherwise it's - * available during ClientStateInitial. - * - * Don't get it from pClient because can't guarantee the order - * of the callbacks and the security extension might not have - * plugged it in yet. - */ - authId = AuthorizationIDOfClient(pClient); - break; - - case ClientStateGone: - case ClientStateRetained: - /* - * Don't get if from AuthorizationIDOfClient because can't - * guarantee the order of the callbacks and the security - * extension may have torn down the client's private data - */ - authId = pClient->authId; - break; - } - - if (authId == None) - return; - - pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(pClient, - authId, SecurityAuthorizationResType, SecurityReadAccess); - - if (pAuth == NULL) - return; - - for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next) - if (pAppGrp->appgroupId == pAuth->group) break; - } else { - pAppGrp = pClient->appgroup; - } - - if (!pAppGrp) - return; - - switch (pClient->clientState) { - case ClientStateAuthenticating: - case ClientStateRunning: - case ClientStateCheckingSecurity: - break; - - case ClientStateInitial: - case ClientStateCheckedSecurity: - /* see the comment above about Initial vs. CheckedSecurity */ - { - /* if this client already in AppGroup, don't add it again */ - int i; - for (i = 0; i < pAppGrp->nclients; i++) - if (pClient == pAppGrp->clients[i]) return; - } - pAppGrp->clients = (ClientPtr*) xrealloc (pAppGrp->clients, - ++pAppGrp->nclients * sizeof (ClientPtr)); - pAppGrp->clients[pAppGrp->nclients - 1] = pClient; - pClient->appgroup = pAppGrp; - break; - - case ClientStateGone: - case ClientStateRetained: /* client disconnected, dump it */ - { - int i; - for (i = 0; i < pAppGrp->nclients; i++) - if (pAppGrp->clients[i] == pClient) { - pAppGrp->clients[i] = NULL; - break; - } - for (i = 0; i < pAppGrp->nclients; i++) - if (pAppGrp->clients[i] == NULL && i + 1 < pAppGrp->nclients) - pAppGrp->clients[i] = pAppGrp->clients[i + 1]; - pAppGrp->nclients--; - } - pClient->appgroup = NULL; /* redundant, pClient will be freed */ - break; - } -} - -void -XagExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode))) { - XagReqCode = (unsigned char)extEntry->base; - XagErrorBase = extEntry->errorBase; -#else - if (AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode)) { -#endif - RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); - } -} - -/*ARGSUSED*/ -static -void XagResetProc( - ExtensionEntry* extEntry) -{ - DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL); - XagCallbackRefCount = 0; - while (appGrpList) XagAppGroupFree ((void *) appGrpList, 0); -} - -static -int ProcXagQueryVersion( - register ClientPtr client) -{ - /* REQUEST (xXagQueryVersionReq); */ - xXagQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXagQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XAG_MAJOR_VERSION; - rep.server_minor_version = XAG_MINOR_VERSION; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swaps (&rep.server_major_version, n); - swaps (&rep.server_minor_version, n); - } - WriteToClient (client, sizeof (xXagQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -void ProcessAttr( - AppGroupPtr pAppGrp, - ClientPtr client, - unsigned int attrib_mask, - CARD32* attribs) -{ - int i; - - for (i = 0; i <= XagNappGroupLeader; i++) { - switch (attrib_mask & (1 << i)) { - case XagSingleScreenMask: - pAppGrp->single_screen = *attribs; - break; - case XagDefaultRootMask: - pAppGrp->default_root = *attribs; - break; - case XagRootVisualMask: - pAppGrp->root_visual = *attribs; - break; - case XagDefaultColormapMask: - pAppGrp->default_colormap = *attribs; - break; - case XagBlackPixelMask: - pAppGrp->black_pixel = *attribs; - break; - case XagWhitePixelMask: - pAppGrp->white_pixel = *attribs; - break; - case XagAppGroupLeaderMask: - pAppGrp->leader = client; - break; - default: continue; - } - attribs++; - } -} - -static -void CreateConnectionInfo( - AppGroupPtr pAppGrp) -{ - xWindowRoot* rootp; - xWindowRoot* roots[MAXSCREENS]; - unsigned int rootlens[MAXSCREENS]; - xDepth* depth; - int olen; - int snum, i; - - rootp = (xWindowRoot*) (ConnectionInfo + connBlockScreenStart); - for (snum = 0; snum < screenInfo.numScreens; snum++) { - - rootlens[snum] = sizeof (xWindowRoot); - roots[snum] = rootp; - - depth = (xDepth*) (rootp + 1); - for (i = 0; i < rootp->nDepths; i++) { - rootlens[snum] += sizeof (xDepth) + - depth->nVisuals * sizeof (xVisualType); - depth = (xDepth *)(((char*)(depth + 1)) + - depth->nVisuals * sizeof (xVisualType)); - } - rootp = (xWindowRoot*) depth; - } - snum = 0; - if (pAppGrp->default_root) { - for (; snum < screenInfo.numVideoScreens; snum++) { - if (roots[snum]->windowId == pAppGrp->default_root) - break; - } - } - olen = connBlockScreenStart + rootlens[snum]; - for (i = screenInfo.numVideoScreens; i < screenInfo.numScreens; i++) - olen += rootlens[i]; - pAppGrp->ConnectionInfo = (char*) xalloc (olen); - if (!pAppGrp->ConnectionInfo) - return; - memmove (pAppGrp->ConnectionInfo, ConnectionInfo, connBlockScreenStart); - ((xConnSetup*) (pAppGrp->ConnectionInfo))->numRoots = - 1 + screenInfo.numScreens - screenInfo.numVideoScreens; - memmove (pAppGrp->ConnectionInfo + connBlockScreenStart, - (void*) roots[snum], rootlens[snum]); - rootp = (xWindowRoot*) (pAppGrp->ConnectionInfo + connBlockScreenStart); - if (pAppGrp->default_colormap) { - rootp->defaultColormap = pAppGrp->default_colormap; - rootp->whitePixel = pAppGrp->white_pixel; - rootp->blackPixel = pAppGrp->black_pixel; - } - if (pAppGrp->root_visual) - rootp->rootVisualID = pAppGrp->root_visual; - rootp = (xWindowRoot*) (((char*)rootp) + rootlens[snum]); - for (i = screenInfo.numVideoScreens; i < screenInfo.numScreens; i++) { - memmove ((void*) rootp, (void*) roots[i], rootlens[i]); - rootp = (xWindowRoot*) (((char*) rootp) + rootlens[i]); - } - pAppGrp->connSetupPrefix = connSetupPrefix; - pAppGrp->connSetupPrefix.length = olen >> 2; -} - -static -AppGroupPtr CreateAppGroup( - ClientPtr client, - XID appgroupId, - unsigned int attrib_mask, - CARD32* attribs) -{ - AppGroupPtr pAppGrp; - - pAppGrp = (AppGroupPtr) xalloc (sizeof(AppGroupRec)); - if (pAppGrp) { - pAppGrp->next = appGrpList; - appGrpList = pAppGrp; - pAppGrp->appgroupId = appgroupId; - pAppGrp->clients = (ClientPtr*) xalloc (0); - pAppGrp->nclients = 0; - pAppGrp->leader = NULL; - pAppGrp->default_root = 0; - pAppGrp->root_visual = 0; - pAppGrp->default_colormap = 0; - pAppGrp->black_pixel = -1; - pAppGrp->white_pixel = -1; - pAppGrp->ConnectionInfo = NULL; - ProcessAttr (pAppGrp, client, attrib_mask, attribs); - } - return pAppGrp; -} - -static -int AttrValidate( - ClientPtr client, - int attrib_mask, - AppGroupPtr pAppGrp) -{ - WindowPtr pWin; - int idepth, ivids, found; - ScreenPtr pScreen; - DepthPtr pDepth; - ColormapPtr pColormap; - - pWin = LookupWindow (pAppGrp->default_root, client); - /* XXX check that pWin is not NULL */ - pScreen = pWin->drawable.pScreen; - if (WindowTable[pScreen->myNum]->drawable.id != pAppGrp->default_root) - return BadWindow; - pDepth = pScreen->allowedDepths; - if (pAppGrp->root_visual) { - found = FALSE; - for (idepth = 0; idepth < pScreen->numDepths; idepth++, pDepth++) { - for (ivids = 0; ivids < pDepth->numVids; ivids++) { - if (pAppGrp->root_visual == pDepth->vids[ivids]) { - found = TRUE; - break; - } - } - } - if (!found) - return BadMatch; - } - if (pAppGrp->default_colormap) { - - pColormap = (ColormapPtr)LookupIDByType (pAppGrp->default_colormap, RT_COLORMAP); - /* XXX check that pColormap is not NULL */ - if (pColormap->pScreen != pScreen) - return BadColor; - if (pColormap->pVisual->vid != (pAppGrp->root_visual ? pAppGrp->root_visual : pScreen->rootVisual)) - return BadMatch; - } - return client->noClientException; -} - -/* static */ -int ProcXagCreate ( - register ClientPtr client) -{ - REQUEST (xXagCreateReq); - AppGroupPtr pAppGrp; - int ret; - - REQUEST_AT_LEAST_SIZE (xXagCreateReq); - - LEGAL_NEW_RESOURCE (stuff->app_group, client); - pAppGrp = CreateAppGroup (client, stuff->app_group, - stuff->attrib_mask, (CARD32*) &stuff[1]); - if (!pAppGrp) - return BadAlloc; - ret = AttrValidate (client, stuff->attrib_mask, pAppGrp); - if (ret != Success) { - XagAppGroupFree ((void *)pAppGrp, (XID)0); - return ret; - } - if (pAppGrp->single_screen) { - CreateConnectionInfo (pAppGrp); - if (!pAppGrp->ConnectionInfo) - return BadAlloc; - } - if (!AddResource (stuff->app_group, RT_APPGROUP, (void *)pAppGrp)) - return BadAlloc; - if (XagCallbackRefCount++ == 0) - (void) AddCallback (&ClientStateCallback, XagClientStateChange, NULL); - return client->noClientException; -} - -/* static */ -int ProcXagDestroy( - register ClientPtr client) -{ - AppGroupPtr pAppGrp; - REQUEST (xXagDestroyReq); - - REQUEST_SIZE_MATCH (xXagDestroyReq); - pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, - (XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess); - if (!pAppGrp) return XagBadAppGroup; - FreeResource ((XID)stuff->app_group, RT_NONE); - if (--XagCallbackRefCount == 0) - (void) DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL); - return client->noClientException; -} - -static -int ProcXagGetAttr( - register ClientPtr client) -{ - AppGroupPtr pAppGrp; - REQUEST (xXagGetAttrReq); - xXagGetAttrReply rep; - int n; - - REQUEST_SIZE_MATCH (xXagGetAttrReq); - pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, - (XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess); - if (!pAppGrp) return XagBadAppGroup; - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.default_root = pAppGrp->default_root; - rep.root_visual = pAppGrp->root_visual; - rep.default_colormap = pAppGrp->default_colormap; - rep.black_pixel = pAppGrp->black_pixel; - rep.white_pixel = pAppGrp->white_pixel; - rep.single_screen = pAppGrp->single_screen; - rep.app_group_leader = (pAppGrp->leader) ? 1 : 0; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swapl (&rep.default_root, n); - swapl (&rep.root_visual, n); - swapl (&rep.default_colormap, n); - swapl (&rep.black_pixel, n); - swapl (&rep.white_pixel, n); - } - WriteToClient (client, sizeof (xXagGetAttrReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXagQuery( - register ClientPtr client) -{ - ClientPtr pClient; - AppGroupPtr pAppGrp; - REQUEST (xXagQueryReq); - int n; - - REQUEST_SIZE_MATCH (xXagQueryReq); - pClient = LookupClient (stuff->resource, client); - for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next) - for (n = 0; n < pAppGrp->nclients; n++) - if (pAppGrp->clients[n] == pClient) { - xXagQueryReply rep; - - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.app_group = pAppGrp->appgroupId; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swapl (&rep.app_group, n); - } - WriteToClient (client, sizeof (xXagQueryReply), (char *)&rep); - return client->noClientException; - } - - return BadMatch; -} - -static -int ProcXagCreateAssoc( - register ClientPtr client) -{ - REQUEST (xXagCreateAssocReq); - - REQUEST_SIZE_MATCH (xXagCreateAssocReq); -#ifdef WIN32 - if (stuff->window_type != XagWindowTypeWin32) -#else - if (stuff->window_type != XagWindowTypeX11) -#endif - return BadMatch; -#if defined(WIN32) || defined(__CYGWIN__) /* and Mac, etc */ - if (!LocalClient (client)) - return BadAccess; -#endif - -/* Macintosh, OS/2, and MS-Windows servers have some work to do here */ - - return client->noClientException; -} - -static -int ProcXagDestroyAssoc( - register ClientPtr client) -{ - /* REQUEST (xXagDestroyAssocReq); */ - - REQUEST_SIZE_MATCH (xXagDestroyAssocReq); -/* Macintosh, OS/2, and MS-Windows servers have some work to do here */ - return client->noClientException; -} - -static -int ProcXagDispatch ( - register ClientPtr client) -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XagQueryVersion: - return ProcXagQueryVersion (client); - case X_XagCreate: - return ProcXagCreate (client); - case X_XagDestroy: - return ProcXagDestroy (client); - case X_XagGetAttr: - return ProcXagGetAttr (client); - case X_XagQuery: - return ProcXagQuery (client); - case X_XagCreateAssoc: - return ProcXagCreateAssoc (client); - case X_XagDestroyAssoc: - return ProcXagDestroyAssoc (client); - default: - return BadRequest; - } -} - -static -int SProcXagQueryVersion( - register ClientPtr client) -{ - register int n; - REQUEST(xXagQueryVersionReq); - swaps(&stuff->length, n); - return ProcXagQueryVersion(client); -} - -static -int SProcXagCreate( - ClientPtr client) -{ - register int n; - REQUEST (xXagCreateReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXagCreateReq); - swapl (&stuff->app_group, n); - swapl (&stuff->attrib_mask, n); - SwapRestL (stuff); - return ProcXagCreate (client); -} - -static -int SProcXagDestroy( - ClientPtr client) -{ - register int n; - REQUEST (xXagDestroyReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagDestroyReq); - swapl (&stuff->app_group, n); - return ProcXagDestroy (client); -} - -static -int SProcXagGetAttr( - ClientPtr client) -{ - register int n; - REQUEST (xXagGetAttrReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagGetAttrReq); - swapl (&stuff->app_group, n); - return ProcXagGetAttr (client); -} - -static -int SProcXagQuery( - ClientPtr client) -{ - register int n; - REQUEST (xXagQueryReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagQueryReq); - swapl (&stuff->resource, n); - return ProcXagQuery (client); -} - -static -int SProcXagCreateAssoc( - ClientPtr client) -{ - register int n; - REQUEST (xXagCreateAssocReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagCreateAssocReq); - swapl (&stuff->window, n); - swapl (&stuff->window_type, n); - swaps (&stuff->system_window_len, n); - return ProcXagCreateAssoc (client); -} - -static -int SProcXagDestroyAssoc( - ClientPtr client) -{ - register int n; - REQUEST (xXagDestroyAssocReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagDestroyAssocReq); - swapl (&stuff->window, n); - return ProcXagDestroyAssoc (client); -} - -static -int SProcXagDispatch( - register ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XagQueryVersion: - return SProcXagQueryVersion (client); - case X_XagCreate: - return SProcXagCreate (client); - case X_XagDestroy: - return SProcXagDestroy (client); - case X_XagGetAttr: - return SProcXagGetAttr (client); - case X_XagQuery: - return SProcXagQuery (client); - case X_XagCreateAssoc: - return SProcXagCreateAssoc (client); - case X_XagDestroyAssoc: - return SProcXagDestroyAssoc (client); - default: - return BadRequest; - } -} - -Colormap XagDefaultColormap( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->default_colormap : None); -} - -VisualID XagRootVisual( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->root_visual : 0); -} - -ClientPtr XagLeader( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->leader : NULL); -} - -/* - * Return whether the Map request event should be sent to the appgroup leader. - * We don't want to send it to the leader when the window is on a different - * screen, e.g. a print screen. - */ -Bool XagIsControlledRoot( - ClientPtr client, - WindowPtr pParent) -{ - if (client->appgroup) { - if (client->appgroup->single_screen && - pParent->drawable.id == client->appgroup->default_root) - return TRUE; - else if (!pParent->parent) - return TRUE; - else - return FALSE; - } - return FALSE; -} - -void XagConnectionInfo( - ClientPtr client, - xConnSetupPrefix** conn_prefix, - char** conn_info, - int* num_screen) -{ - if (client->appgroup && client->appgroup->ConnectionInfo) { - *conn_prefix = &client->appgroup->connSetupPrefix; - *conn_info = client->appgroup->ConnectionInfo; - *num_screen = ((xConnSetup*)(client->appgroup->ConnectionInfo))->numRoots; - } -} - -XID XagId( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->appgroupId : 0); -} - -void XagGetDeltaInfo( - ClientPtr client, - CARD32* buf) -{ - *buf++ = (CARD32) client->appgroup->default_root; - *buf++ = (CARD32) client->appgroup->root_visual; - *buf++ = (CARD32) client->appgroup->default_colormap; - *buf++ = (CARD32) client->appgroup->black_pixel; - *buf = (CARD32) client->appgroup->white_pixel; -} - -void XagCallClientStateChange( - ClientPtr client) -{ - if (appGrpList) { - NewClientInfoRec clientinfo; - - clientinfo.client = client; - XagClientStateChange (NULL, NULL, (void *)&clientinfo); - } -} diff --git a/nx-X11/programs/Xserver/Xext/appgroup.h b/nx-X11/programs/Xserver/Xext/appgroup.h deleted file mode 100644 index 2a8feb585..000000000 --- a/nx-X11/programs/Xserver/Xext/appgroup.h +++ /dev/null @@ -1,10 +0,0 @@ -/* $XFree86$ */ - -void XagClientStateChange( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata); -int ProcXagCreate ( - register ClientPtr client); -int ProcXagDestroy( - register ClientPtr client); diff --git a/nx-X11/programs/Xserver/Xext/cup.c b/nx-X11/programs/Xserver/Xext/cup.c deleted file mode 100644 index 9b6d25c21..000000000 --- a/nx-X11/programs/Xserver/Xext/cup.c +++ /dev/null @@ -1,367 +0,0 @@ -/* $Xorg: cup.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -/* - -Copyright 1997, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.11tsi Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "servermd.h" -#include "swapreq.h" -#define _XCUP_SERVER_ -#include -#include - -#ifndef EXTMODULE -#include "../os/osdep.h" -#else -#include "xf86_ansic.h" -#endif - -#include "modinit.h" - -static int ProcDispatch(ClientPtr client); -static int SProcDispatch(ClientPtr client); -static void ResetProc(ExtensionEntry* extEntry); - -#if 0 -static unsigned char ReqCode = 0; -static int ErrorBase; -#endif - -#if defined(WIN32) || defined(TESTWIN32) -#define HAVE_SPECIAL_DESKTOP_COLORS -#endif - -static xColorItem citems[] = { -#ifndef HAVE_SPECIAL_DESKTOP_COLORS -#define CUP_BLACK_PIXEL 0 -#define CUP_WHITE_PIXEL 1 - /* pix red green blue */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0xffff, 0xffff, 0xffff, 0, 0 } -#else -#ifndef WIN32 - /* - This approximates the MS-Windows desktop colormap for testing - purposes but has black and white pixels in the typical Unix - locations, which should be switched if necessary if your system - has blackPixel and whitePixel swapped. No entries are provided - for colormap entries 254 and 255 because AllocColor/FindColor - will reuse entries zero and one. - */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0xffff, 0xffff, 0xffff, 0, 0 }, - { 2, 0x8000, 0, 0, 0, 0 }, - { 3, 0, 0x8000, 0, 0, 0 }, - { 4, 0x8000, 0x8000, 0, 0, 0 }, - { 5, 0, 0, 0x8000, 0, 0 }, - { 6, 0x8000, 0, 0x8000, 0, 0 }, - { 7, 0, 0x8000, 0x8000, 0, 0 }, - { 8, 0xc000, 0xc000, 0xc000, 0, 0 }, - { 9, 0xc000, 0xdc00, 0xc000, 0, 0 }, - { 246, 0xa000, 0xa000, 0xa000, 0, 0 }, - { 247, 0x8000, 0x8000, 0x8000, 0, 0 }, - { 248, 0xffff, 0, 0, 0, 0 }, - { 249, 0, 0xffff, 0, 0, 0 }, - { 250, 0xffff, 0xffff, 0, 0, 0 }, - { 251, 0, 0, 0xffff, 0, 0 }, - { 252, 0xffff, 0, 0xffff, 0, 0 }, - { 253, 0, 0xffff, 0xffff, 0, 0 } -#else - /* - this is the MS-Windows desktop, adjusted for X's 16-bit color - specifications. - */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0x8000, 0, 0, 0, 0 }, - { 2, 0, 0x8000, 0, 0, 0 }, - { 3, 0x8000, 0x8000, 0, 0, 0 }, - { 4, 0, 0, 0x8000, 0, 0 }, - { 5, 0x8000, 0, 0x8000, 0, 0 }, - { 6, 0, 0x8000, 0x8000, 0, 0 }, - { 7, 0xc000, 0xc000, 0xc000, 0, 0 }, - { 8, 0xc000, 0xdc00, 0xc000, 0, 0 }, - { 9, 0xa600, 0xca00, 0xf000, 0, 0 }, - { 246, 0xff00, 0xfb00, 0xf000, 0, 0 }, - { 247, 0xa000, 0xa000, 0xa400, 0, 0 }, - { 248, 0x8000, 0x8000, 0x8000, 0, 0 }, - { 249, 0xff00, 0, 0, 0, 0 }, - { 250, 0, 0xff00, 0, 0, 0 }, - { 251, 0xff00, 0xff00, 0, 0, 0 }, - { 252, 0, 0, 0xff00, 0, 0 }, - { 253, 0xff00, 0, 0xff00, 0, 0 }, - { 254, 0, 0xff00, 0xff00, 0, 0 }, - { 255, 0xff00, 0xff00, 0xff00, 0, 0 } -#endif -#endif -}; -#define NUM_DESKTOP_COLORS (sizeof citems / sizeof citems[0]) - -void -XcupExtensionInit (INITARGS) -{ -#if 0 - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode))) { - ReqCode = (unsigned char)extEntry->base; - ErrorBase = extEntry->errorBase; - } -#else - (void) AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode); -#endif - - /* PC servers initialize the desktop colors (citems) here! */ -} - -/*ARGSUSED*/ -static -void ResetProc( - ExtensionEntry* extEntry) -{ -} - -static -int ProcQueryVersion( - register ClientPtr client) -{ - /* REQUEST (xXcupQueryVersionReq); */ - xXcupQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXcupQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XCUP_MAJOR_VERSION; - rep.server_minor_version = XCUP_MINOR_VERSION; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swaps (&rep.server_major_version, n); - swaps (&rep.server_minor_version, n); - } - WriteToClient (client, sizeof (xXcupQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcGetReservedColormapEntries( - register ClientPtr client) -{ - REQUEST (xXcupGetReservedColormapEntriesReq); - xXcupGetReservedColormapEntriesReply rep; - xColorItem* cptr; - register int n; - - REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq); - - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -#ifndef HAVE_SPECIAL_DESKTOP_COLORS - citems[CUP_BLACK_PIXEL].pixel = - screenInfo.screens[stuff->screen]->blackPixel; - citems[CUP_WHITE_PIXEL].pixel = - screenInfo.screens[stuff->screen]->whitePixel; -#endif - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - rep.length = NUM_DESKTOP_COLORS * 3; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - } - WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep); - for (n = 0, cptr = citems; n < NUM_DESKTOP_COLORS; n++, cptr++) { - if (client->swapped) SwapColorItem (cptr); - WriteToClient (client, SIZEOF(xColorItem), (char *)cptr); - } - return client->noClientException; -} - -static -int ProcStoreColors( - register ClientPtr client) -{ - REQUEST (xXcupStoreColorsReq); - ColormapPtr pcmp; - - REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq); - pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); - - if (pcmp) { - int ncolors, n; - xXcupStoreColorsReply rep; - xColorItem* cptr; - - if (!(pcmp->class & DynamicClass)) - return BadMatch; - - ncolors = (client->req_len << 2) - SIZEOF (xXcupStoreColorsReq); - if (ncolors % SIZEOF(xColorItem)) - return BadLength; - - ncolors /= SIZEOF (xColorItem); - - - for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) { - Pixel pixel = cptr->pixel; - - if (AllocColor (pcmp, - &cptr->red, &cptr->green, &cptr->blue, - &pixel, client->index) == Success) { - cptr->pixel = pixel; - cptr->flags = 0x08; - } else - cptr->flags = 0; - cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem)); - } - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - rep.length = ncolors * 3; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - } - WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep); - for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) { - if (client->swapped) SwapColorItem (cptr); - WriteToClient (client, SIZEOF(xColorItem), (char *)cptr); - cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem)); - } - return client->noClientException; - } else { - client->errorValue = stuff->cmap; - return BadColor; - } -} - -static -int ProcDispatch( - register ClientPtr client) -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XcupQueryVersion: - return ProcQueryVersion (client); - case X_XcupGetReservedColormapEntries: - return ProcGetReservedColormapEntries (client); - case X_XcupStoreColors: - return ProcStoreColors (client); - default: - return BadRequest; - } -} - -static -int SProcQueryVersion( - register ClientPtr client) -{ - register int n; - - REQUEST(xXcupQueryVersionReq); - swaps(&stuff->length, n); - return ProcQueryVersion(client); -} - -static -int SProcGetReservedColormapEntries( - ClientPtr client) -{ - register int n; - - REQUEST (xXcupGetReservedColormapEntriesReq); - swaps (&stuff->length, n); - swapl (&stuff->screen, n); - REQUEST_AT_LEAST_SIZE (xXcupGetReservedColormapEntriesReq); - return ProcGetReservedColormapEntries (client); -} - -static -int SProcXcupStoreColors( - ClientPtr client) -{ - register int n; - int count; - xColorItem* pItem; - - REQUEST (xXcupStoreColorsReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq); - swapl(&stuff->cmap, n); - pItem = (xColorItem*) &stuff[1]; - for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; ) - SwapColorItem(pItem++); - return ProcStoreColors (client); -} - -static -int SProcDispatch( - register ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XcupQueryVersion: - return SProcQueryVersion (client); - case X_XcupGetReservedColormapEntries: - return SProcGetReservedColormapEntries (client); - case X_XcupStoreColors: - return SProcXcupStoreColors (client); - default: - return BadRequest; - } -} - - diff --git a/nx-X11/programs/Xserver/Xext/dgaproc.h b/nx-X11/programs/Xserver/Xext/dgaproc.h deleted file mode 100644 index 4d3f224e6..000000000 --- a/nx-X11/programs/Xserver/Xext/dgaproc.h +++ /dev/null @@ -1,144 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/dgaproc.h,v 1.21 2000/06/30 19:06:54 keithp Exp $ */ - -#ifndef __DGAPROC_H -#define __DGAPROC_H - -#include -#include "pixmap.h" - -#define DGA_CONCURRENT_ACCESS 0x00000001 -#define DGA_FILL_RECT 0x00000002 -#define DGA_BLIT_RECT 0x00000004 -#define DGA_BLIT_RECT_TRANS 0x00000008 -#define DGA_PIXMAP_AVAILABLE 0x00000010 - -#define DGA_INTERLACED 0x00010000 -#define DGA_DOUBLESCAN 0x00020000 - -#define DGA_FLIP_IMMEDIATE 0x00000001 -#define DGA_FLIP_RETRACE 0x00000002 - -#define DGA_COMPLETED 0x00000000 -#define DGA_PENDING 0x00000001 - -#define DGA_NEED_ROOT 0x00000001 - -typedef struct { - int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ - int VSync_num; - int VSync_den; - int flags; /* DGA_CONCURRENT_ACCESS, etc... */ - int imageWidth; /* linear accessible portion (pixels) */ - int imageHeight; - int pixmapWidth; /* Xlib accessible portion (pixels) */ - int pixmapHeight; /* both fields ignored if no concurrent access */ - int bytesPerScanline; - int byteOrder; /* MSBFirst, LSBFirst */ - int depth; - int bitsPerPixel; - unsigned long red_mask; - unsigned long green_mask; - unsigned long blue_mask; - short visualClass; - int viewportWidth; - int viewportHeight; - int xViewportStep; /* viewport position granularity */ - int yViewportStep; - int maxViewportX; /* max viewport origin */ - int maxViewportY; - int viewportFlags; /* types of page flipping possible */ - int offset; - int reserved1; - int reserved2; -} XDGAModeRec, *XDGAModePtr; - -/* DDX interface */ - -int -DGASetMode( - int Index, - int num, - XDGAModePtr mode, - PixmapPtr *pPix -); - -void -DGASetInputMode( - int Index, - Bool keyboard, - Bool mouse -); - -void -DGASelectInput( - int Index, - ClientPtr client, - long mask -); - -Bool DGAAvailable(int Index); -Bool DGAActive(int Index); -void DGAShutdown(void); -void DGAInstallCmap(ColormapPtr cmap); -int DGAGetViewportStatus(int Index); -int DGASync(int Index); - -int -DGAFillRect( - int Index, - int x, int y, int w, int h, - unsigned long color -); - -int -DGABlitRect( - int Index, - int srcx, int srcy, - int w, int h, - int dstx, int dsty -); - -int -DGABlitTransRect( - int Index, - int srcx, int srcy, - int w, int h, - int dstx, int dsty, - unsigned long color -); - -int -DGASetViewport( - int Index, - int x, int y, - int mode -); - -int DGAGetModes(int Index); -int DGAGetOldDGAMode(int Index); - -int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); - -Bool DGAVTSwitch(void); -Bool DGAStealMouseEvent(int Index, xEvent *e, int dx, int dy); -Bool DGAStealKeyEvent(int Index, xEvent *e); -Bool DGAIsDgaEvent (xEvent *e); - -Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); - -Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, - int *size, int *offset, int *flags); -void DGACloseFramebuffer(int Index); -Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); -int DGACreateColormap(int Index, ClientPtr client, int id, int mode, - int alloc); - -extern unsigned char DGAReqCode; -extern int DGAErrorBase; -extern int DGAEventBase; -extern int *XDGAEventBase; - - - -#endif /* __DGAPROC_H */ diff --git a/nx-X11/programs/Xserver/Xext/extmod/Imakefile b/nx-X11/programs/Xserver/Xext/extmod/Imakefile index 45f3f39d7..f5aceb507 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/Imakefile +++ b/nx-X11/programs/Xserver/Xext/extmod/Imakefile @@ -4,52 +4,18 @@ XCOMM This directory is only entered if DoLoadableServer is set #define IHaveModules #include -#if BuildMultibuffer - MULTIBUFSRC = mbuf.c - MULTIBUFOBJ = mbuf.o -LinkSourceFile(mbuf.c,..) -#endif - #if BuildScreenSaverExt SCRNSAVSRC = saver.c SCRNSAVOBJ = saver.o LinkSourceFile(saver.c,..) #endif -#if BuildXF86VidModeExt - VIDMODESRCS = xf86vmode.c - VIDMODEOBJS = xf86vmode.o -LinkSourceFile(xf86vmode.c,..) -#endif - -#if BuildXF86MiscExt - XF86MISCSRCS = xf86misc.c - XF86MISCOBJS = xf86misc.o -LinkSourceFile(xf86misc.c,..) -#endif - -#if BuildXF86DGA - XF86DGASRCS = xf86dga.c xf86dga2.c - XF86DGAOBJS = xf86dga.o xf86dga2.o -LinkSourceFile(xf86dga.c,..) -LinkSourceFile(xf86dga2.c,..) -#endif - #if BuildDPMS DPMSSRCS = dpms.c DPMSOBJS = dpms.o LinkSourceFile(dpms.c,..) #endif -#if BuildFontCache - FONTCACHESRCS = fontcache.c - FONTCACHEOBJS = fontcache.o -#if 0 - FONTCACHEINCLUDES = -I$(XF86SRC)/os-support -#endif -LinkSourceFile(fontcache.c,..) -#endif - #if BuildXvExt XVSRCS = xvmain.c xvdisp.c xvmod.c xvmc.c XVOBJS = xvmain.o xvdisp.o xvmod.o xvmc.o @@ -63,59 +29,35 @@ LinkSourceFile(xvmc.c,..) XRESSRCS = xres.c XRESOBJS = xres.o LinkSourceFile(xres.c,..) -#endif - -#if BuildEVI - EVISRCS = EVI.c sampleEVI.c - EVIOBJS = EVI.o sampleEVI.o -LinkSourceFile(EVI.c,..) -LinkSourceFile(sampleEVI.c,..) -#endif - -#if BuildCup - CUPSRCS = cup.c - CUPOBJS = cup.o -LinkSourceFile(cup.c,..) #endif MODINITSRCS = modinit.c MODINITOBJS = modinit.o - SRCS = shape.c $(MULTIBUFSRC) \ - mitmisc.c \ - bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ - $(XF86MISCSRCS) $(XF86DGASRCS) \ - $(CUPSRCS) $(DPMSSRCS) $(FONTCACHESRCS) \ - $(EVISRCS) $(XVSRCS) $(MODINITSRCS) $(XRESSRCS) + SRCS = shape.c \ + bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c \ + $(DPMSSRCS) \ + $(XVSRCS) $(MODINITSRCS) $(XRESSRCS) - MOBJS = $(MODINITOBJS) shape.o $(MULTIBUFOBJ) mitmisc.o \ + MOBJS = $(MODINITOBJS) shape.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o \ - $(VIDMODEOBJS) $(XF86MISCOBJS) $(XF86DGAOBJS) \ - $(CUPOBJS) $(DPMSOBJS) $(FONTCACHEOBJS) \ - $(EVIOBJS) $(XVOBJS) $(XRESOBJS) + $(DPMSOBJS) \ + $(XVOBJS) $(XRESOBJS) DEFINES = -DEXTMODULE $(EXT_DEFINES) XF86INCLUDES = -I$(XF86COMSRC) INCLUDES = -I.. -I../../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(XF86INCLUDES) $(FONTCACHEINCLUDES) + $(XF86INCLUDES) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln LinkSourceFile(shape.c,..) -LinkSourceFile(mitmisc.c,..) LinkSourceFile(bigreq.c,..) LinkSourceFile(sync.c,..) LinkSourceFile(xcmisc.c,..) ModuleObjectRule() -/* - * A hack to work around an optimization problem with gcc 2.95.2 - */ -#if BuildXF86VidModeExt && defined(GccOptBug295) -SpecialCObjectRule(xf86vmode,NullParameter,-O0) -#endif - SpecialCObjectRule(modinit,$(ICONFIGFILES),$(EXT_DEFINES)) LibraryModuleTarget(extmod,$(MOBJS)) NormalLintTarget($(SRCS)) diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.c b/nx-X11/programs/Xserver/Xext/extmod/modinit.c index 162f76ad8..6969148a3 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.c +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.c @@ -53,24 +53,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef MULTIBUFFER - { - MultibufferExtensionInit, - MULTIBUFFER_PROTOCOL_NAME, - &noMultibufferExtension, - NULL, - NULL - }, -#endif -#ifdef MITMISC - { - MITMiscExtensionInit, - MITMISCNAME, - &noMITMiscExtension, - NULL, - NULL - }, -#endif #ifdef notyet { XTestExtensionInit, @@ -107,42 +89,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef XCMISC - { - XCMiscExtensionInit, - XCMiscExtensionName, - &noXCMiscExtension, - NULL, - NULL - }, -#endif -#ifdef XF86VIDMODE - { - XFree86VidModeExtensionInit, - XF86VIDMODENAME, - &noXFree86VidModeExtension, - NULL, - NULL - }, -#endif -#ifdef XF86MISC - { - XFree86MiscExtensionInit, - XF86MISCNAME, - &noXFree86MiscExtension, - NULL, - NULL - }, -#endif -#ifdef XFreeXDGA - { - XFree86DGAExtensionInit, - XF86DGANAME, - &noXFree86DGAExtension, - XFree86DGARegister, - NULL - }, -#endif #ifdef DPMSExtension { DPMSExtensionInit, @@ -152,33 +98,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef FONTCACHE - { - FontCacheExtensionInit, - FONTCACHENAME, - &noFontCacheExtension, - NULL, - NULL - }, -#endif -#ifdef TOGCUP - { - XcupExtensionInit, - XCUPNAME, - &noXcupExtension, - NULL, - NULL - }, -#endif -#ifdef EVI - { - EVIExtensionInit, - EVINAME, - &noEVIExtension, - NULL, - NULL - }, -#endif #ifdef XV { XvExtensionInit, diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 672586fdd..f780c7a49 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -92,18 +92,6 @@ extern void FontCacheExtensionInit(INITARGS); #include "fontcachstr.h" #endif -#ifdef TOGCUP -extern void XcupExtensionInit(INITARGS); -#define _XCUP_SERVER_ -#include -#endif - -#ifdef EVI -extern void EVIExtensionInit(INITARGS); -#define _XEVI_SERVER_ -#include -#endif - #ifdef XV extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); diff --git a/nx-X11/programs/Xserver/Xext/fontcache.c b/nx-X11/programs/Xserver/Xext/fontcache.c deleted file mode 100644 index 0956f9be9..000000000 --- a/nx-X11/programs/Xserver/Xext/fontcache.c +++ /dev/null @@ -1,333 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $ - */ -/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.7 2003/10/28 23:08:43 tsi Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "inputstr.h" -#include "servermd.h" -#define _FONTCACHE_SERVER_ -#include "fontcacheP.h" -#include "fontcachstr.h" -#include - -#include "swaprep.h" -#include "modinit.h" - -static int miscErrorBase; - -static void FontCacheResetProc( - ExtensionEntry* /* extEntry */ -); - -static DISPATCH_PROC(ProcFontCacheDispatch); -static DISPATCH_PROC(ProcFontCacheGetCacheSettings); -static DISPATCH_PROC(ProcFontCacheGetCacheStatistics); -static DISPATCH_PROC(ProcFontCacheQueryVersion); -static DISPATCH_PROC(ProcFontCacheChangeCacheSettings); -static DISPATCH_PROC(SProcFontCacheDispatch); -static DISPATCH_PROC(SProcFontCacheGetCacheSettings); -static DISPATCH_PROC(SProcFontCacheGetCacheStatistics); -static DISPATCH_PROC(SProcFontCacheQueryVersion); -static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); - -#if 0 -static unsigned char FontCacheReqCode = 0; -#endif - -void -FontCacheExtensionInit(INITARGS) -{ - ExtensionEntry* extEntry; - - if ( - (extEntry = AddExtension(FONTCACHENAME, - FontCacheNumberEvents, - FontCacheNumberErrors, - ProcFontCacheDispatch, - SProcFontCacheDispatch, - FontCacheResetProc, - StandardMinorOpcode))) { -#if 0 - FontCacheReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } -} - -/*ARGSUSED*/ -static void -FontCacheResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ProcFontCacheQueryVersion(client) - register ClientPtr client; -{ - xFontCacheQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = FONTCACHE_MAJOR_VERSION; - rep.minorVersion = FONTCACHE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, SIZEOF(xFontCacheQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheGetCacheSettings(client) - register ClientPtr client; -{ - xFontCacheGetCacheSettingsReply rep; - FontCacheSettings cinfo; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - - /* XXX */ - FontCacheGetSettings(&cinfo); - rep.himark = cinfo.himark; - rep.lowmark = cinfo.lowmark; - rep.balance = cinfo.balance; - rep.reserve0 = 0; - rep.reserve1 = 0; - rep.reserve2 = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.himark, n); - swapl(&rep.lowmark, n); - swapl(&rep.balance, n); - swapl(&rep.reserve0, n); - swapl(&rep.reserve1, n); - swapl(&rep.reserve2, n); - } - /* XXX */ - - WriteToClient(client, SIZEOF(xFontCacheGetCacheSettingsReply), - (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheGetCacheStatistics(client) - register ClientPtr client; -{ - xFontCacheGetCacheStatisticsReply rep; - FontCacheStatistics cstats; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = (sz_xFontCacheGetCacheStatisticsReply - 32) >> 2; - - /* XXX */ - FontCacheGetStatistics(&cstats); - rep.purge_runs = cstats.purge_runs; - rep.purge_stat = cstats.purge_stat; - rep.balance = cstats.balance; - rep.reserve0 = 0; - rep.f_hits = cstats.f.hits; - rep.f_misshits = cstats.f.misshits; - rep.f_purged = cstats.f.purged; - rep.f_usage = cstats.f.usage; - rep.f_reserve0 = 0; - rep.v_hits = cstats.v.hits; - rep.v_misshits = cstats.v.misshits; - rep.v_purged = cstats.v.purged; - rep.v_usage = cstats.v.usage; - rep.v_reserve0 = 0; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.purge_runs, n); - swapl(&rep.purge_stat, n); - swapl(&rep.balance, n); - swapl(&rep.reserve0, n); - swapl(&rep.f_hits, n); - swapl(&rep.f_misshits, n); - swapl(&rep.f_purged, n); - swapl(&rep.f_usage, n); - swapl(&rep.f_reserve0, n); - swapl(&rep.v_hits, n); - swapl(&rep.v_misshits, n); - swapl(&rep.v_purged, n); - swapl(&rep.v_usage, n); - swapl(&rep.v_reserve0, n); - } - /* XXX */ - WriteToClient(client, SIZEOF(xFontCacheGetCacheStatisticsReply), - (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheChangeCacheSettings(client) - register ClientPtr client; -{ - FontCacheSettings cs; - - REQUEST(xFontCacheChangeCacheSettingsReq); - - REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq); - - /* XXX */ - cs.himark = stuff->himark; - cs.lowmark = stuff->lowmark; - cs.balance = stuff->balance; - - if (cs.himark < 0 || cs.lowmark < 0) - return BadValue; - if (cs.himark <= cs.lowmark) - return BadValue; - if (!(10 <= cs.balance && cs.balance <= 90)) - return BadValue; - - if (FontCacheChangeSettings(&cs) == 0) - return miscErrorBase + FontCacheCannotAllocMemory; - /* XXX */ - - return (client->noClientException); -} - -static int -ProcFontCacheDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_FontCacheQueryVersion: - return ProcFontCacheQueryVersion(client); - case X_FontCacheGetCacheSettings: - return ProcFontCacheGetCacheSettings(client); - case X_FontCacheGetCacheStatistics: - return ProcFontCacheGetCacheStatistics(client); - case X_FontCacheChangeCacheSettings: - return ProcFontCacheChangeCacheSettings(client); - default: - return miscErrorBase + FontCacheBadProtocol; - } -} - -static int -SProcFontCacheQueryVersion(client) - register ClientPtr client; -{ - register int n; - REQUEST(xFontCacheQueryVersionReq); - swaps(&stuff->length, n); - return ProcFontCacheQueryVersion(client); -} - -static int -SProcFontCacheGetCacheSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheGetCacheSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); - return ProcFontCacheGetCacheSettings(client); -} - -static int -SProcFontCacheGetCacheStatistics(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheGetCacheStatisticsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); - return ProcFontCacheGetCacheStatistics(client); -} - -static int -SProcFontCacheChangeCacheSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheChangeCacheSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq); - /* XXX */ - swapl(&stuff->himark, n); - swapl(&stuff->lowmark, n); - swapl(&stuff->balance, n); - /* XXX */ - return ProcFontCacheChangeCacheSettings(client); -} - -static int -SProcFontCacheDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_FontCacheQueryVersion: - return SProcFontCacheQueryVersion(client); - case X_FontCacheGetCacheSettings: - return SProcFontCacheGetCacheSettings(client); - case X_FontCacheGetCacheStatistics: - return SProcFontCacheGetCacheStatistics(client); - case X_FontCacheChangeCacheSettings: - return SProcFontCacheChangeCacheSettings(client); - default: - return miscErrorBase + FontCacheBadProtocol; - } -} diff --git a/nx-X11/programs/Xserver/Xext/mbuf.c b/nx-X11/programs/Xserver/Xext/mbuf.c deleted file mode 100644 index 5379f2656..000000000 --- a/nx-X11/programs/Xserver/Xext/mbuf.c +++ /dev/null @@ -1,1787 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.15 2003/10/28 23:08:43 tsi Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* $Xorg: mbuf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "window.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "gcstruct.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "sleepuntil.h" -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#else -#include -#if !defined(WIN32) && !defined(Lynx) -#include -#endif -#endif - -/* given an OtherClientPtr obj, get the ClientPtr */ -#define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) - -/* given a MultibufferPtr b, get the ClientPtr */ -#define bClient(b) (clients[CLIENT_ID(b->pPixmap->drawable.id)]) - -#define ValidEventMasks (ExposureMask|MultibufferClobberNotifyMask|MultibufferUpdateNotifyMask) - -#if 0 -static unsigned char MultibufferReqCode; -#endif -static int MultibufferEventBase; -static int MultibufferErrorBase; -int MultibufferScreenIndex = -1; -int MultibufferWindowIndex = -1; - -static void PerformDisplayRequest ( - MultibuffersPtr * /* ppMultibuffers */, - MultibufferPtr * /* pMultibuffer */, - int /* nbuf */ - ); -static Bool QueueDisplayRequest ( - ClientPtr /* client */, - TimeStamp /* activateTime */ - ); - -static void BumpTimeStamp ( - TimeStamp * /* ts */, - CARD32 /* inc */ - ); - -static void AliasMultibuffer ( - MultibuffersPtr /* pMultibuffers */, - int /* i */ - ); -static void RecalculateMultibufferOtherEvents ( - MultibufferPtr /* pMultibuffer */ - ); -static int EventSelectForMultibuffer( - MultibufferPtr /* pMultibuffer */, - ClientPtr /* client */, - Mask /* mask */ - ); - -/* - * The Pixmap associated with a buffer can be found as a resource - * with this type - */ -RESTYPE MultibufferDrawableResType; -static int MultibufferDrawableDelete ( - void * /* value */, - XID /* id */ - ); -/* - * The per-buffer data can be found as a resource with this type. - * the resource id of the per-buffer data is the same as the resource - * id of the pixmap - */ -static RESTYPE MultibufferResType; -static int MultibufferDelete ( - void * /* value */, - XID /* id */ - ); - -/* - * The per-window data can be found as a resource with this type, - * using the window resource id - */ -static RESTYPE MultibuffersResType; -static int MultibuffersDelete ( - void * /* value */, - XID /* id */ - ); - -/* - * Clients other than the buffer creator attach event masks in - * OtherClient structures; each has a resource of this type. - */ -static RESTYPE OtherClientResType; -static int OtherClientDelete ( - void * /* value */, - XID /* id */ - ); - -/**************** - * MultibufferExtensionInit - * - * Called from InitExtensions in main() - * - ****************/ - -extern DISPATCH_PROC(ProcGetBufferAttributes); - -static DISPATCH_PROC(ProcClearImageBufferArea); -static DISPATCH_PROC(ProcCreateImageBuffers); -static DISPATCH_PROC(ProcDestroyImageBuffers); -static DISPATCH_PROC(ProcDisplayImageBuffers); -static DISPATCH_PROC(ProcGetBufferInfo); -static DISPATCH_PROC(ProcGetBufferVersion); -static DISPATCH_PROC(ProcGetMBufferAttributes); -static DISPATCH_PROC(ProcMultibufferDispatch); -static DISPATCH_PROC(ProcSetBufferAttributes); -static DISPATCH_PROC(ProcSetMBufferAttributes); -static DISPATCH_PROC(SProcClearImageBufferArea); -static DISPATCH_PROC(SProcCreateImageBuffers); -static DISPATCH_PROC(SProcDestroyImageBuffers); -static DISPATCH_PROC(SProcDisplayImageBuffers); -static DISPATCH_PROC(SProcGetBufferAttributes); -static DISPATCH_PROC(SProcGetBufferInfo); -static DISPATCH_PROC(SProcGetBufferVersion); -static DISPATCH_PROC(SProcGetMBufferAttributes); -static DISPATCH_PROC(SProcMultibufferDispatch); -static DISPATCH_PROC(SProcSetBufferAttributes); -static DISPATCH_PROC(SProcSetMBufferAttributes); - -static void MultibufferResetProc( - ExtensionEntry * /* extEntry */ - ); -static void SClobberNotifyEvent( - xMbufClobberNotifyEvent * /* from */, - xMbufClobberNotifyEvent * /* to */ - ); -static void SUpdateNotifyEvent( - xMbufUpdateNotifyEvent * /* from */, - xMbufUpdateNotifyEvent * /* to */ - ); -static Bool MultibufferPositionWindow( - WindowPtr /* pWin */, - int /* x */, - int /* y */ - ); - -static void SetupBackgroundPainter ( - WindowPtr /* pWin */, - GCPtr /* pGC */ - ); - -static int DeliverEventsToMultibuffer ( - MultibufferPtr /* pMultibuffer */, - xEvent * /* pEvents */, - int /* count */, - Mask /* filter */ - ); - -void -MultibufferExtensionInit() -{ - ExtensionEntry *extEntry; - int i, j; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - /* - * allocate private pointers in windows and screens. Allocating - * window privates may seem like an unnecessary expense, but every - * PositionWindow call must check to see if the window is - * multi-buffered; a resource lookup is too expensive. - */ - MultibufferScreenIndex = AllocateScreenPrivateIndex (); - if (MultibufferScreenIndex < 0) - return; - MultibufferWindowIndex = AllocateWindowPrivateIndex (); - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate (pScreen, MultibufferWindowIndex, 0) || - !(pMultibufferScreen = (MultibufferScreenPtr) xalloc (sizeof (MultibufferScreenRec)))) - { - for (j = 0; j < i; j++) - xfree (screenInfo.screens[j]->devPrivates[MultibufferScreenIndex].ptr); - return; - } - pScreen->devPrivates[MultibufferScreenIndex].ptr = (void *) pMultibufferScreen; - /* - * wrap PositionWindow to resize the pixmap when the window - * changes size - */ - pMultibufferScreen->PositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = MultibufferPositionWindow; - } - /* - * create the resource types - */ - MultibufferDrawableResType = - CreateNewResourceType(MultibufferDrawableDelete)|RC_CACHED|RC_DRAWABLE; - MultibufferResType = CreateNewResourceType(MultibufferDelete); - MultibuffersResType = CreateNewResourceType(MultibuffersDelete); - OtherClientResType = CreateNewResourceType(OtherClientDelete); - if (MultibufferDrawableResType && MultibufferResType && - MultibuffersResType && OtherClientResType && - (extEntry = AddExtension(MULTIBUFFER_PROTOCOL_NAME, - MultibufferNumberEvents, - MultibufferNumberErrors, - ProcMultibufferDispatch, SProcMultibufferDispatch, - MultibufferResetProc, StandardMinorOpcode))) - { -#if 0 - MultibufferReqCode = (unsigned char)extEntry->base; -#endif - MultibufferEventBase = extEntry->eventBase; - MultibufferErrorBase = extEntry->errorBase; - EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; - EventSwapVector[MultibufferEventBase + MultibufferUpdateNotify] = (EventSwapPtr) SUpdateNotifyEvent; - } -} - -/*ARGSUSED*/ -static void -MultibufferResetProc (extEntry) -ExtensionEntry *extEntry; -{ - int i; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - if (MultibufferScreenIndex < 0) - return; - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (pScreen->devPrivates[MultibufferScreenIndex].ptr) - { - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; - pScreen->PositionWindow = pMultibufferScreen->PositionWindow; - xfree (pMultibufferScreen); - } - } -} - -static int -ProcGetBufferVersion (client) - register ClientPtr client; -{ - xMbufGetBufferVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xMbufGetBufferVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = MULTIBUFFER_MAJOR_VERSION; - rep.minorVersion = MULTIBUFFER_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof (xMbufGetBufferVersionReply), (char *)&rep); - return (client->noClientException); -} - -static void -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - void *gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (void *) background.pixel; - gcvalues[1] = (void *) FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = (void *) FillTiled; - gcvalues[1] = (void *) background.pixmap; - gcvalues[2] = (void *)(long) ts_x_origin; - gcvalues[3] = (void *)(long) ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - gcvalues[0] = (void *) GXnoop; - gcmask = GCFunction; - } - DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE); -} - -int -CreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - GCPtr pClearGC = NULL; - xRectangle clearRect; - - DestroyImageBuffers(pWin); - pMultibuffers = (MultibuffersPtr) xalloc (sizeof (MultibuffersRec) + - nbuf * sizeof (MultibufferRec)); - if (!pMultibuffers) - return BadAlloc; - pMultibuffers->pWindow = pWin; - pMultibuffers->buffers = (MultibufferPtr) (pMultibuffers + 1); - pMultibuffers->refcnt = pMultibuffers->numMultibuffer = 0; - if (!AddResource (pWin->drawable.id, MultibuffersResType, (void *) pMultibuffers)) - return BadAlloc; - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - if (pWin->backgroundState != None) - { - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - clearRect.x = clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - - for (i = 0; i < nbuf; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pMultibuffer->eventMask = 0L; - pMultibuffer->otherEventMask = 0L; - pMultibuffer->otherClients = (OtherClientsPtr) NULL; - pMultibuffer->number = i; - pMultibuffer->side = MultibufferSideMono; - pMultibuffer->clobber = MultibufferUnclobbered; - pMultibuffer->pMultibuffers = pMultibuffers; - if (!AddResource (ids[i], MultibufferResType, (void *) pMultibuffer)) - break; - pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth); - if (!pMultibuffer->pPixmap) - break; - if (!AddResource (ids[i], MultibufferDrawableResType, (void *) pMultibuffer->pPixmap)) - { - FreeResource (ids[i], MultibufferResType); - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - break; - } - pMultibuffer->pPixmap->drawable.id = ids[i]; - - if (i > 0 && pClearGC) - { - ValidateGC((DrawablePtr)pMultibuffer->pPixmap, pClearGC); - (*pClearGC->ops->PolyFillRect)((DrawablePtr)pMultibuffer->pPixmap, - pClearGC, 1, &clearRect); - } - } - pMultibuffers->numMultibuffer = i; - pMultibuffers->refcnt = i; - pMultibuffers->displayedMultibuffer = -1; - if (i > 0) - AliasMultibuffer (pMultibuffers, 0); - pMultibuffers->updateAction = action; - pMultibuffers->updateHint = hint; - pMultibuffers->windowMode = MultibufferModeMono; - pMultibuffers->lastUpdate.months = 0; - pMultibuffers->lastUpdate.milliseconds = 0; - pMultibuffers->width = width; - pMultibuffers->height = height; - pWin->devPrivates[MultibufferWindowIndex].ptr = (void *) pMultibuffers; - if (pClearGC) FreeScratchGC(pClearGC); - return Success; -} - - -static int -ProcCreateImageBuffers (client) - register ClientPtr client; -{ - REQUEST(xMbufCreateImageBuffersReq); - xMbufCreateImageBuffersReply rep; - register int n; - WindowPtr pWin; - XID *ids; - int len, nbuf; - int i; - int err; - - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2); - if (len == 0) - return BadLength; - if (!(pWin = LookupWindow (stuff->window, client))) - return BadWindow; - if (pWin->drawable.class == InputOnly) - return BadMatch; - switch (stuff->updateAction) - { - case MultibufferUpdateActionUndefined: - case MultibufferUpdateActionBackground: - case MultibufferUpdateActionUntouched: - case MultibufferUpdateActionCopied: - break; - default: - client->errorValue = stuff->updateAction; - return BadValue; - } - switch (stuff->updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - break; - default: - client->errorValue = stuff->updateHint; - return BadValue; - } - nbuf = len; - ids = (XID *) &stuff[1]; - for (i = 0; i < nbuf; i++) - { - LEGAL_NEW_RESOURCE(ids[i], client); - } - err = CreateImageBuffers (pWin, nbuf, ids, - stuff->updateAction, stuff->updateHint); - if (err != Success) - return err; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.numberBuffer = ((MultibuffersPtr) (pWin->devPrivates[MultibufferWindowIndex].ptr))->numMultibuffer; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.numberBuffer, n); - } - WriteToClient(client, sizeof (xMbufCreateImageBuffersReply), (char*)&rep); - return (client->noClientException); -} - -static int -ProcDisplayImageBuffers (client) - register ClientPtr client; -{ - REQUEST(xMbufDisplayImageBuffersReq); - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; - XID *ids; - int i, j; - CARD32 minDelay; - TimeStamp activateTime, bufferTime; - - - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - nbuf = stuff->length - (sizeof (xMbufDisplayImageBuffersReq) >> 2); - if (!nbuf) - return Success; - minDelay = stuff->minDelay; - ids = (XID *) &stuff[1]; - ppMultibuffers = (MultibuffersPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibuffersPtr)); - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibufferPtr)); - if (!ppMultibuffers || !pMultibuffer) - { - if (ppMultibuffers) DEALLOCATE_LOCAL(ppMultibuffers); - if (pMultibuffer) DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = 0; - return BadAlloc; - } - activateTime.months = 0; - activateTime.milliseconds = 0; - for (i = 0; i < nbuf; i++) - { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], -MultibufferResType); - if (!pMultibuffer[i]) - { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = ids[i]; - return MultibufferErrorBase + MultibufferBadBuffer; - } - ppMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - { - if (ppMultibuffers[i] == ppMultibuffers[j]) - { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = ids[i]; - return BadMatch; - } - } - bufferTime = ppMultibuffers[i]->lastUpdate; - BumpTimeStamp (&bufferTime, minDelay); - if (CompareTimeStamps (bufferTime, activateTime) == LATER) - activateTime = bufferTime; - } - UpdateCurrentTime (); - if (CompareTimeStamps (activateTime, currentTime) == LATER && - QueueDisplayRequest (client, activateTime)) - { - ; - } - else - PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf); - - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - return Success; -} - - -static int -ProcDestroyImageBuffers (client) - register ClientPtr client; -{ - REQUEST (xMbufDestroyImageBuffersReq); - WindowPtr pWin; - - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - if (!(pWin = LookupWindow (stuff->window, client))) - return BadWindow; - DestroyImageBuffers (pWin); - return Success; -} - -static int -ProcSetMBufferAttributes (client) - register ClientPtr client; -{ - REQUEST (xMbufSetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - int len; - Mask vmask; - Mask index2; - CARD32 updateHint; - XID *vlist; - - REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) - return BadMatch; - len = stuff->length - (sizeof (xMbufSetMBufferAttributesReq) >> 2); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferWindowUpdateHint: - updateHint = (CARD32) *vlist; - switch (updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - pMultibuffers->updateHint = updateHint; - break; - default: - client->errorValue = updateHint; - return BadValue; - } - vlist++; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -static int -ProcGetMBufferAttributes (client) - ClientPtr client; -{ - REQUEST (xMbufGetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - XID *ids; - xMbufGetMBufferAttributesReply rep; - int i, n; - - REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) - return BadAccess; - ids = (XID *) ALLOCATE_LOCAL (pMultibuffers->numMultibuffer * sizeof (XID)); - if (!ids) - return BadAlloc; - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - ids[i] = pMultibuffers->buffers[i].pPixmap->drawable.id; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = pMultibuffers->numMultibuffer; - rep.displayedBuffer = pMultibuffers->displayedMultibuffer; - rep.updateAction = pMultibuffers->updateAction; - rep.updateHint = pMultibuffers->updateHint; - rep.windowMode = pMultibuffers->windowMode; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.displayedBuffer, n); - SwapLongs (ids, pMultibuffers->numMultibuffer); - } - WriteToClient (client, sizeof(xMbufGetMBufferAttributesReply), - (char *)&rep); - WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)), - (char *)ids); - DEALLOCATE_LOCAL((void *) ids); - return client->noClientException; -} - -static int -ProcSetBufferAttributes (client) - register ClientPtr client; -{ - REQUEST(xMbufSetBufferAttributesReq); - MultibufferPtr pMultibuffer; - int len; - Mask vmask, index2; - XID *vlist; - Mask eventMask; - int result; - - REQUEST_AT_LEAST_SIZE (xMbufSetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - len = stuff->length - (sizeof (xMbufSetBufferAttributesReq) >> 2); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferBufferEventMask: - eventMask = (Mask) *vlist; - vlist++; - result = EventSelectForMultibuffer (pMultibuffer, client, eventMask); - if (result != Success) - return result; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -int -ProcGetBufferAttributes (client) - register ClientPtr client; -{ - REQUEST(xMbufGetBufferAttributesReq); - MultibufferPtr pMultibuffer; - xMbufGetBufferAttributesReply rep; - OtherClientsPtr other; - int n; - - REQUEST_SIZE_MATCH (xMbufGetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.window = pMultibuffer->pMultibuffers->pWindow->drawable.id; - if (bClient (pMultibuffer) == client) - rep.eventMask = pMultibuffer->eventMask; - else - { - rep.eventMask = (Mask) 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - if (SameClient (other, client)) - { - rep.eventMask = other->mask; - break; - } - } - rep.bufferIndex = pMultibuffer->number; - rep.side = pMultibuffer->side; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.window, n); - swapl(&rep.eventMask, n); - swaps(&rep.bufferIndex, n); - } - WriteToClient(client, sizeof (xMbufGetBufferAttributesReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcGetBufferInfo (client) - register ClientPtr client; -{ - REQUEST (xMbufGetBufferInfoReq); - DrawablePtr pDrawable; - xMbufGetBufferInfoReply rep; - ScreenPtr pScreen; - int i, j, k; - int n; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - - pDrawable = (DrawablePtr) LookupDrawable (stuff->drawable, client); - if (!pDrawable) - return BadDrawable; - pScreen = pDrawable->pScreen; - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - pInfo = (xMbufBufferInfo *) - ALLOCATE_LOCAL (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return BadAlloc; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = nInfo * (sizeof (xMbufBufferInfo) >> 2); - rep.normalInfo = nInfo; - rep.stereoInfo = 0; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.normalInfo, n); - swaps(&rep.stereoInfo, n); - } - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - if (client->swapped) - { - swapl (&pInfo[k].visualID, n); - swaps (&pInfo[k].maxBuffers, n); - } - k++; - } - } - WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (void *) &rep); - WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (void *) pInfo); - DEALLOCATE_LOCAL ((void *) pInfo); - return client->noClientException; -} - -static int -ProcClearImageBufferArea (client) - register ClientPtr client; -{ - REQUEST (xMbufClearImageBufferAreaReq); - MultibufferPtr pMultibuffer; - WindowPtr pWin; - xRectangle clearRect; - int width, height; - DrawablePtr pDrawable; - ScreenPtr pScreen; - - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) - { - client->errorValue = stuff->exposures; - return(BadValue); - } - pWin = pMultibuffer->pMultibuffers->pWindow; - width = pWin->drawable.width; - height = pWin->drawable.height; - pScreen = pWin->drawable.pScreen; - - clearRect.x = stuff->x; - clearRect.y = stuff->y; - clearRect.width = stuff->width ? stuff->width : width; - clearRect.height = stuff->height ? stuff->height : height; - - if (pWin->backgroundState != None) - { - GCPtr pClearGC; - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - - if (pMultibuffer->number == pMultibuffer->pMultibuffers->displayedMultibuffer) - pDrawable = (DrawablePtr)pWin; - else - pDrawable = (DrawablePtr)pMultibuffer->pPixmap; - - ValidateGC(pDrawable, pClearGC); - (*pClearGC->ops->PolyFillRect) (pDrawable, pClearGC, 1, &clearRect); - FreeScratchGC(pClearGC); - } - - if (stuff->exposures) - { - RegionRec region; - BoxRec box; - box.x1 = clearRect.x; - box.y1 = clearRect.y; - box.x2 = clearRect.x + clearRect.width; - box.y2 = clearRect.y + clearRect.height; - RegionInit(®ion, &box, 1); - MultibufferExpose(pMultibuffer, ®ion); - RegionUninit(®ion); - } - return Success; -} - -static int -ProcMultibufferDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return ProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return ProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return ProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return ProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return ProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return ProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return ProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return ProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return ProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return ProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static int -SProcGetBufferVersion (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferVersionReq); - - swaps (&stuff->length, n); - return ProcGetBufferVersion (client); -} - -static int -SProcCreateImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufCreateImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - swapl (&stuff->window, n); - SwapRestL(stuff); - return ProcCreateImageBuffers (client); -} - -static int -SProcDisplayImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufDisplayImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - SwapRestL(stuff); - return ProcDisplayImageBuffers (client); -} - -static int -SProcDestroyImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufDestroyImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - swapl (&stuff->window, n); - return ProcDestroyImageBuffers (client); -} - -static int -SProcSetMBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufSetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetMBufferAttributesReq); - swapl (&stuff->window, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetMBufferAttributes (client); -} - -static int -SProcGetMBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetMBufferAttributesReq); - swapl (&stuff->window, n); - return ProcGetMBufferAttributes (client); -} - -static int -SProcSetBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufSetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetBufferAttributesReq); - swapl (&stuff->buffer, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetBufferAttributes (client); -} - -static int -SProcGetBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetBufferAttributesReq); - swapl (&stuff->buffer, n); - return ProcGetBufferAttributes (client); -} - -static int -SProcGetBufferInfo (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferInfoReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufGetBufferInfoReq); - swapl (&stuff->drawable, n); - return ProcGetBufferInfo (client); -} - -static int -SProcClearImageBufferArea(client) - register ClientPtr client; -{ - register char n; - REQUEST(xMbufClearImageBufferAreaReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - swapl(&stuff->buffer, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - return ProcClearImageBufferArea(client); -} - -static int -SProcMultibufferDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return SProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return SProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return SProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return SProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return SProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return SProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return SProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return SProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return SProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return SProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static void -SUpdateNotifyEvent (from, to) - xMbufUpdateNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - cpswapl (from->timeStamp, to->timeStamp); -} - -static void -SClobberNotifyEvent (from, to) - xMbufClobberNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - to->state = from->state; -} - -static void -PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf) - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; -{ - GCPtr pGC; - PixmapPtr pPrevPixmap, pNewPixmap; - xRectangle clearRect; - WindowPtr pWin; - RegionPtr pExposed; - int i; - MultibufferPtr pPrevMultibuffer; - XID graphicsExpose; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMultibuffers[i]->pWindow; - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - pPrevMultibuffer = - &ppMultibuffers[i]->buffers[ppMultibuffers[i]->displayedMultibuffer]; - pPrevPixmap = pPrevMultibuffer->pPixmap; - pNewPixmap = pMultibuffer[i]->pPixmap; - switch (ppMultibuffers[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - SetupBackgroundPainter (pWin, pGC); - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = pPrevPixmap->drawable.width; - clearRect.height = pPrevPixmap->drawable.height; - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPrevPixmap, pGC, - 1, &clearRect); - break; - case MultibufferUpdateActionUntouched: - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { - graphicsExpose = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea) - ((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - - pWinSize = CreateUnclippedWinSize (pWin); - /* pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - RegionTranslate(pWinSize, - -pWin->drawable.x, -pWin->drawable.y); - RegionIntersect(pExposed, - pExposed, pWinSize); - RegionDestroy(pWinSize); - MultibufferExpose (pPrevMultibuffer, pExposed); - RegionDestroy(pExposed); - } - graphicsExpose = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - break; - } /* end switch on update action */ - - /* display the new buffer */ - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - ppMultibuffers[i]->lastUpdate = currentTime; - MultibufferUpdate (pMultibuffer[i], - ppMultibuffers[i]->lastUpdate.milliseconds); - AliasMultibuffer (ppMultibuffers[i], - pMultibuffer[i] - ppMultibuffers[i]->buffers); - FreeScratchGC (pGC); - } -} - -DrawablePtr -GetBufferPointer (pWin, i) - WindowPtr pWin; - int i; -{ - MultibuffersPtr pMultibuffers; - - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) - return NULL; - return (DrawablePtr) pMultibuffers->buffers[i].pPixmap; -} - -int -DisplayImageBuffers (ids, nbuf) - XID *ids; - int nbuf; -{ - MultibufferPtr *pMultibuffer; - MultibuffersPtr *pMultibuffers; - int i, j; - - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL (nbuf * sizeof *pMultibuffer + - nbuf * sizeof *pMultibuffers); - if (!pMultibuffer) - return BadAlloc; - pMultibuffers = (MultibuffersPtr *) (pMultibuffer + nbuf); - for (i = 0; i < nbuf; i++) - { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType); - if (!pMultibuffer[i]) - { - DEALLOCATE_LOCAL (pMultibuffer); - return MultibufferErrorBase + MultibufferBadBuffer; - } - pMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - if (pMultibuffers[i] == pMultibuffers[j]) - { - DEALLOCATE_LOCAL (pMultibuffer); - return BadMatch; - } - } - PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf); - DEALLOCATE_LOCAL (pMultibuffer); - return Success; -} - - -static Bool -QueueDisplayRequest (client, activateTime) - ClientPtr client; - TimeStamp activateTime; -{ - /* see xtest.c:ProcXTestFakeInput for code similar to this */ - - if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) - { - return FALSE; - } - /* swap the request back so we can simply re-execute it */ - if (client->swapped) - { - register int n; - REQUEST (xMbufDisplayImageBuffersReq); - - SwapRestL(stuff); - swaps (&stuff->length, n); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - } - ResetCurrentRequest (client); - client->sequence--; - return TRUE; -} - - -/* - * Deliver events to a buffer - */ - -static int -DeliverEventsToMultibuffer (pMultibuffer, pEvents, count, filter) - MultibufferPtr pMultibuffer; - xEvent *pEvents; - int count; - Mask filter; -{ - int deliveries = 0, nondeliveries = 0; - int attempt; - OtherClients *other; - - /* if nobody wants the event, we're done */ - if (!((pMultibuffer->otherEventMask|pMultibuffer->eventMask) & filter)) - return 0; - - /* maybe send event to owner */ - if ((attempt = TryClientEvents( - bClient(pMultibuffer), pEvents, count, pMultibuffer->eventMask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - - /* maybe send event to other clients */ - for (other = pMultibuffer->otherClients; other; other=other->next) - { - if ((attempt = TryClientEvents( - rClient(other), pEvents, count, other->mask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - } - if (deliveries) - return deliveries; - return nondeliveries; -} - -/* - * Send Expose events to interested clients - */ - -void -MultibufferExpose (pMultibuffer, pRegion) - MultibufferPtr pMultibuffer; - RegionPtr pRegion; -{ - if (pRegion && !RegionNil(pRegion)) - { - xEvent *pEvent; - PixmapPtr pPixmap; - register xEvent *pe; - register BoxPtr pBox; - register int i; - int numRects; - - pPixmap = pMultibuffer->pPixmap; - RegionTranslate(pRegion, - -pPixmap->drawable.x, -pPixmap->drawable.y); - /* XXX MultibufferExpose "knows" the region representation */ - numRects = RegionNumRects(pRegion); - pBox = RegionRects(pRegion); - - pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent)); - if (pEvent) { - pe = pEvent; - - for (i=1; i<=numRects; i++, pe++, pBox++) - { - pe->u.u.type = Expose; - pe->u.expose.window = pPixmap->drawable.id; - pe->u.expose.x = pBox->x1; - pe->u.expose.y = pBox->y1; - pe->u.expose.width = pBox->x2 - pBox->x1; - pe->u.expose.height = pBox->y2 - pBox->y1; - pe->u.expose.count = (numRects - i); - } - (void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects, - ExposureMask); - DEALLOCATE_LOCAL(pEvent); - } - } -} - -/* send UpdateNotify event */ -void -MultibufferUpdate (pMultibuffer, time2) - MultibufferPtr pMultibuffer; - CARD32 time2; -{ - xMbufUpdateNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferUpdateNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.timeStamp = time2; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferUpdateNotifyMask); -} - -/* - * The sample implementation will never generate MultibufferClobberNotify - * events - */ - -void -MultibufferClobber (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - xMbufClobberNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferClobberNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.state = pMultibuffer->clobber; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferClobberNotifyMask); -} - -/* - * make the resource id for buffer i refer to the window - * drawable instead of the pixmap; - */ - -static void -AliasMultibuffer (pMultibuffers, i) - MultibuffersPtr pMultibuffers; - int i; -{ - MultibufferPtr pMultibuffer; - - if (i == pMultibuffers->displayedMultibuffer) - return; - /* - * remove the old association - */ - if (pMultibuffers->displayedMultibuffer >= 0) - { - pMultibuffer = &pMultibuffers->buffers[pMultibuffers->displayedMultibuffer]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pMultibuffer->pPixmap); - } - /* - * make the new association - */ - pMultibuffer = &pMultibuffers->buffers[i]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pMultibuffers->pWindow); - pMultibuffers->displayedMultibuffer = i; -} - -/* - * free everything associated with multibuffering for this - * window - */ - -void -DestroyImageBuffers (pWin) - WindowPtr pWin; -{ - FreeResourceByType (pWin->drawable.id, MultibuffersResType, FALSE); - /* Zero out the window's pointer to the buffers so they won't be reused */ - pWin->devPrivates[MultibufferWindowIndex].ptr = NULL; -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -MultibufferPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - xRectangle clearRect; - Bool clear; - - pScreen = pWin->drawable.pScreen; - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; - (*pMultibufferScreen->PositionWindow) (pWin, x, y); - - /* if this window is not multibuffered, we're done */ - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) - return TRUE; - - /* if new size is same as old, we're done */ - if (pMultibuffers->width == pWin->drawable.width && - pMultibuffers->height == pWin->drawable.height) - return TRUE; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMultibuffers->x; - dy = pWin->drawable.x - pMultibuffers->y; - dw = width - pMultibuffers->width; - dh = height - pMultibuffers->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - clear = pMultibuffers->width < width || pMultibuffers->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMultibuffers->width; - saveheight = pMultibuffers->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMultibuffers->width = width; - pMultibuffers->height = height; - pMultibuffers->x = pWin->drawable.x; - pMultibuffers->y = pWin->drawable.y; - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - if (clear) - { - SetupBackgroundPainter (pWin, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pWin->drawable.depth); - if (!pPixmap) - { - DestroyImageBuffers (pWin); - break; - } - ValidateGC ((DrawablePtr)pPixmap, pGC); - /* - * I suppose this could avoid quite a bit of work if - * it computed the minimal area required. - */ - if (clear) - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPixmap, pGC, 1, &clearRect); - if (pWin->bitGravity != ForgetGravity) - { - (*pGC->ops->CopyArea) ((DrawablePtr)pMultibuffer->pPixmap, - (DrawablePtr)pPixmap, pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMultibuffer->pPixmap->drawable.id; - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - pMultibuffer->pPixmap = pPixmap; - if (i != pMultibuffers->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pPixmap); - } - } - FreeScratchGC (pGC); - return TRUE; -} - -/* Resource delete func for MultibufferDrawableResType */ -/*ARGSUSED*/ -static int -MultibufferDrawableDelete (value, id) - void *value; - XID id; -{ - DrawablePtr pDrawable = (DrawablePtr)value; - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - PixmapPtr pPixmap; - - if (pDrawable->type == DRAWABLE_WINDOW) - { - pWin = (WindowPtr) pDrawable; - pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr; - pPixmap = pMultibuffers->buffers[pMultibuffers->displayedMultibuffer].pPixmap; - } - else - { - pPixmap = (PixmapPtr) pDrawable; - } - (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); - return Success; -} - -/* Resource delete func for MultibufferResType */ -/*ARGSUSED*/ -static int -MultibufferDelete (value, id) - void *value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - MultibuffersPtr pMultibuffers; - - pMultibuffers = pMultibuffer->pMultibuffers; - if (--pMultibuffers->refcnt == 0) - { - FreeResourceByType (pMultibuffers->pWindow->drawable.id, - MultibuffersResType, TRUE); - xfree (pMultibuffers); - } - return Success; -} - -/* Resource delete func for MultibuffersResType */ -/*ARGSUSED*/ -static int -MultibuffersDelete (value, id) - void *value; - XID id; -{ - MultibuffersPtr pMultibuffers = (MultibuffersPtr)value; - int i; - - if (pMultibuffers->refcnt == pMultibuffers->numMultibuffer) - { - for (i = pMultibuffers->numMultibuffer; --i >= 0; ) - FreeResource (pMultibuffers->buffers[i].pPixmap->drawable.id, 0); - } - return Success; -} - -/* Resource delete func for OtherClientResType */ -static int -OtherClientDelete (value, id) - void *value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - register OtherClientsPtr other, prev; - - prev = 0; - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (other->resource == id) - { - if (prev) - prev->next = other->next; - else - pMultibuffer->otherClients = other->next; - xfree (other); - RecalculateMultibufferOtherEvents (pMultibuffer); - break; - } - prev = other; - } - return Success; -} - -static int -EventSelectForMultibuffer (pMultibuffer, client, mask) - MultibufferPtr pMultibuffer; - ClientPtr client; - Mask mask; -{ - OtherClientsPtr other; - - if (mask & ~ValidEventMasks) - { - client->errorValue = mask; - return BadValue; - } - if (bClient (pMultibuffer) == client) - { - pMultibuffer->eventMask = mask; - } - else /* some other client besides the creator wants events */ - { - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (SameClient (other, client)) - { - if (mask == 0) - { - FreeResource (other->resource, RT_NONE); - break; - } - other->mask = mask; - break; - } - } - if (!other) - { /* new client that never selected events on this buffer before */ - other = (OtherClients *) xalloc (sizeof (OtherClients)); - if (!other) - return BadAlloc; - other->mask = mask; - other->resource = FakeClientID (client->index); - if (!AddResource (other->resource, OtherClientResType, (void *) pMultibuffer)) - { - xfree (other); - return BadAlloc; - } - other->next = pMultibuffer->otherClients; - pMultibuffer->otherClients = other; - } - RecalculateMultibufferOtherEvents (pMultibuffer); - } - return (client->noClientException); -} - -/* or together all the otherClients event masks */ -static void -RecalculateMultibufferOtherEvents (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - Mask otherEventMask; - OtherClients *other; - - otherEventMask = 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - otherEventMask |= other->mask; - pMultibuffer->otherEventMask = otherEventMask; -} - -/* add milliseconds to a timestamp, handling overflow */ -static void -BumpTimeStamp (ts, inc) -TimeStamp *ts; -CARD32 inc; -{ - CARD32 newms; - - newms = ts->milliseconds + inc; - if (newms < ts->milliseconds) - ts->months++; - ts->milliseconds = newms; -} diff --git a/nx-X11/programs/Xserver/Xext/mbufbf.c b/nx-X11/programs/Xserver/Xext/mbufbf.c deleted file mode 100644 index 359fb63aa..000000000 --- a/nx-X11/programs/Xserver/Xext/mbufbf.c +++ /dev/null @@ -1,1030 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.5tsi Exp $ */ -/* - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/* $Xorg: mbufbf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include "validate.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_BUFFER_ -#include - -/* -Support for doublebuffer hardare - -This code is designed to support doublebuffer hardware where the -displayed buffer is selected on a per-pixel basis by an additional bit -plane, called the select plane. It could probably be easily modified -to work with systems that use window-id planes. - -This is done by creating a new drawable type, DRAWABLE_BUFFER. The -type has the same exact layout as a window drawable. Your code should -treat a DRAWABLE_BUFFER the same as it would tread a DRAWABLE_WINDOW -when handling the gc drawing functions. In addition, PaintWindowBackground, -CopyWindow, and all of the gc drawing functions to be able to draw into both -framebuffers. Which framebuffer to draw into is selected by the contents of - pWin->devPrivates[frameWindowPrivateIndex]. -The content of the devPrivate is either from frameBuffer[0] or -frameBuffer[1], depending on which buffer is being drawn into. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[0], -the functions should draw into the front framebuffer. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[1], -the functions should draw into the back framebuffer. - -In addition, you need to provide a function that allows you to copy -bits between the buffers (optional since CopyArea can be used) and a -function that draws into the select plane. Then, you need to register -your functions and other information, by calling: - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - -"pInfo" is an array indicating which visuals and depths that double -buffering is supported on. "nInfo" is the length of the array. - -"frameBuffer" is array of length 2. The contents of the array element -is ddx-specific. The content of frameBuffer[0] should, when placed in -the window private, indicate that framebuffer 0 should be drawn into. -The contents of frameBuffer[1], when placed into the window private, -should indicate that framebuffer 1 should be drawn into. - -"selectPlane" is ddx-specific. It should contain information -neccessary for your displayProc to access the select plane. -It is passed to DrawSelectPlaneFunc. - -"CopyBufferBitsFunc" is a ddx-specific function that copies from one -buffer of a multibuffered window to another buffer. If the CopyBufferBitsFunc -is NULL, a default function will be used that calls pScreen->CopyArea. - - void CopyBufferBitsFunc(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; - -"DrawSelectPlaneFunc" is a ddx-specific function that fills the -regions "prgn" of select plane with the value "bufferNum". If -selectPlane is a DrawablePtr (such as a PixmapPtr), you can pass -NULL for DrawSelectPlaneFunc, a default function will be used that -calls FillRectangle on the selectPlane. - - void DrawSelectPlaneFunc(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; - -... -... -... - -*/ - -#define MAX_BUFFERS 2 /* Only supports 2 buffers */ -#define FRONT_BUFFER 0 -#define BACK_BUFFER 1 - - -/* Buffer drawables have the same structure as window drawables */ -typedef WindowRec BufferRec; -typedef WindowPtr BufferPtr; - - -/* - * Call RegisterHdwrBuffer for every screen that has doublebuffer hardware. - */ - -static int bufNumInfo[MAXSCREENS]; -static xMbufBufferInfo *bufInfo[MAXSCREENS]; -static DevUnion *bufFrameBuffer[MAXSCREENS]; -static DevUnion bufselectPlane[MAXSCREENS]; -static void (* bufCopyBufferBitsFunc[MAXSCREENS])(); -static void (* bufDrawSelectPlaneFunc[MAXSCREENS])(); - -static Bool bufMultibufferInit(); - - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - ScreenPtr pScreen; - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - void (* CopyBufferBitsFunc)(); - void (* DrawSelectPlaneFunc)(); -{ - bufNumInfo[pScreen->myNum] = nInfo; - bufInfo[pScreen->myNum] = pInfo; - bufFrameBuffer[pScreen->myNum] = frameBuffer; - bufselectPlane[pScreen->myNum] = selectPlane; - - bufCopyBufferBitsFunc[pScreen->myNum] = CopyBufferBitsFunc; - bufDrawSelectPlaneFunc[pScreen->myNum] = DrawSelectPlaneFunc; - - /* Register ourselves with device-independent multibuffers code */ - RegisterMultibufferInit(pScreen, bufMultibufferInit); -} - - -/* - * Called by Multibuffer extension initialization. - * Initializes mbufScreenRec and its devPrivate. - */ - -static Bool NoopDDA_True() { return TRUE; } -static Bool bufPositionWindow(); -static int bufCreateImageBuffers(); -static void bufDestroyImageBuffers(); -static void bufDisplayImageBuffers(); -static void bufClearImageBufferArea(); -static void bufDestroyBuffer(); -static void bufCopyBufferBits(); -static void bufDrawSelectPlane(); -static void bufWrapScreenFuncs(); -static void bufResetProc(); - -static void bufPostValidateTree(); -static void bufClipNotify(); -static void bufWindowExposures(); -static Bool bufChangeWindowAttributes(); -static void bufClearToBackground(); -static void bufCopyWindow(); - -extern WindowPtr *WindowTable; - -static Bool -bufMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - mbufBufferPrivPtr pMBPriv; - BoxRec box; - - /* Multibuffer info */ - pMBScreen->nInfo = bufNumInfo[pScreen->myNum]; - pMBScreen->pInfo = bufInfo[pScreen->myNum]; - - /* Hooks */ - pMBScreen->CreateImageBuffers = bufCreateImageBuffers; - pMBScreen->DestroyImageBuffers = bufDestroyImageBuffers; - pMBScreen->DisplayImageBuffers = bufDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = bufClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = bufDestroyBuffer; - pMBScreen->WrapScreenFuncs = bufWrapScreenFuncs; - pMBScreen->ResetProc = bufResetProc; - /* Create devPrivate part */ - pMBPriv = (mbufBufferPrivPtr) xalloc(sizeof *pMBPriv); - if (!pMBPriv) - return (FALSE); - - pMBScreen->devPrivate.ptr = (void *) pMBPriv; - pMBPriv->frameBuffer = bufFrameBuffer[pScreen->myNum]; - pMBPriv->selectPlane = bufselectPlane[pScreen->myNum]; - - /* - * Initializing the subtractRgn to the screen area will ensure that - * the selectPlane will get cleared on the first PostValidateTree. - */ - - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - - pMBPriv->rgnChanged = TRUE; - RegionInit(&pMBPriv->backBuffer, &box, 1); - RegionInit(&pMBPriv->subtractRgn, &box, 1); - RegionNull(&pMBPriv->unionRgn); - - /* Misc functions */ - pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum]; - pMBPriv->DrawSelectPlane = bufDrawSelectPlaneFunc[pScreen->myNum]; - - if (!pMBPriv->CopyBufferBits) - pMBPriv->CopyBufferBits = bufCopyBufferBits; - - if (!pMBPriv->DrawSelectPlane) - pMBPriv->DrawSelectPlane = bufDrawSelectPlane; - - /* screen functions */ - pMBPriv->funcsWrapped = 0; - pMBPriv->inClearToBackground = FALSE; - pMBPriv->WindowExposures = NULL; - pMBPriv->CopyWindow = NULL; - pMBPriv->ClearToBackground = NULL; - pMBPriv->ClipNotify = NULL; - pMBPriv->ChangeWindowAttributes = NULL; - - /* Start out wrapped to clear select plane */ - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - return TRUE; -} - -static void -UpdateBufferFromWindow(pBuffer, pWin) - BufferPtr pBuffer; - WindowPtr pWin; -{ - pBuffer->drawable.x = pWin->drawable.x; - pBuffer->drawable.y = pWin->drawable.y; - pBuffer->drawable.width = pWin->drawable.width; - pBuffer->drawable.height = pWin->drawable.height; - - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - /* Update for PaintWindowBackground */ - pBuffer->parent = pWin->parent; - - /* - * Make the borderClip the same as the clipList so - * NotClippedByChildren comes out with just clipList. - */ - - pBuffer->clipList = pWin->clipList; - pBuffer->borderClip = pWin->clipList; - pBuffer->winSize = pWin->winSize; - pBuffer->borderSize = pWin->borderSize; - - pBuffer->origin = pWin->origin; -} - -static BufferPtr -bufCreateBuffer(pScreen, pWin, bufferNum) - ScreenPtr pScreen; - WindowPtr pWin; - int bufferNum; -{ - mbufBufferPrivPtr pMBPriv; - DevUnion *devPrivates; - BufferPtr pBuffer; - int i; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pBuffer = AllocateWindow(pWin->drawable.pScreen); - if (!pBuffer) - return (NULL); - - /* XXX- Until we know what is needed, copy everything. */ - devPrivates = pBuffer->devPrivates; - *pBuffer = *pWin; - pBuffer->devPrivates = devPrivates; - - pBuffer->drawable.type = DRAWABLE_BUFFER; - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - pBuffer->nextSib = NULL; - pBuffer->prevSib = NULL; - pBuffer->firstChild = NULL; - pBuffer->lastChild = NULL; - - /* XXX - Worry about backingstore later */ - pBuffer->backStorage = NULL; - pBuffer->backingStore = NotUseful; - - /* XXX - Need to call pScreen->CreateWindow for tile/stipples - * or should I just copy the devPrivates? - */ - - for (i=0; i < pScreen->WindowPrivateLen; i++) - pBuffer->devPrivates[i] = pWin->devPrivates[i]; - - pBuffer->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[bufferNum]; - - return pBuffer; -} - -static void -bufDestroyBuffer(pDrawable) - DrawablePtr pDrawable; -{ - xfree(pDrawable); -} - -/*ARGSUSED*/ -static int -bufCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int i; - - pScreen = pWin->drawable.pScreen; - pMBScreen = MB_SCREEN_PRIV(pScreen); - pMBWindow = MB_WINDOW_PRIV(pWin); - - pMBWindow->devPrivate.ptr = (void *) RegionCreate(0,0); - if (!pMBWindow->devPrivate.ptr) - return(0); - RegionCopy((RegionPtr) pMBWindow->devPrivate.ptr, - &pWin->clipList); - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = pMBWindow->buffers + i; - pMBBuffer->pDrawable = (DrawablePtr) bufCreateBuffer(pScreen,pWin,i); - - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (void *) pMBBuffer->pDrawable)) - { - bufDestroyBuffer((BufferPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * If window is already mapped, generate exposures and - * clear the area of the newly buffers. - */ - - if ((pWin->realized) && (i != pMBWindow->displayedMultibuffer)) - (* pMBScreen->ClearImageBufferArea)(pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -static void -bufDestroyImageBuffers(pWin) - WindowPtr pWin; -{ - ScreenPtr pScreen; - mbufWindowPtr pMBWindow; - - pScreen = pWin->drawable.pScreen; - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * if the backbuffer is currently being displayed, move the bits - * to the frontbuffer and display it instead. - */ - - if (pWin->realized && (pMBWindow->displayedMultibuffer == BACK_BUFFER)) - { - (* pMBPriv->CopyBufferBits)(pMBWindow, BACK_BUFFER, FRONT_BUFFER); - RegionSubtract(&pMBPriv->backBuffer, - &pMBPriv->backBuffer, &pWin->clipList); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, FRONT_BUFFER); - } - - /* Switch window rendering to front buffer */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - - RegionDestroy((RegionPtr) pMBWindow->devPrivate.ptr); - pMBWindow->devPrivate.ptr = NULL; - } -} - -/* - * Can be replaced by pScreen->ClearToBackground if pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) were setup. - */ - -static void -bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures) - mbufBufferPtr pMBBuffer; - short x,y; - unsigned short w,h; - Bool generateExposures; -{ - BoxRec box; - RegionRec reg; - RegionPtr pBSReg = NullRegion; - ScreenPtr pScreen; - BoxPtr extents; - int x1, y1, x2, y2; - BufferPtr pBuffer; - - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - /* compute everything using ints to avoid overflow */ - - x1 = pBuffer->drawable.x + x; - y1 = pBuffer->drawable.y + y; - if (w) - x2 = x1 + (int) w; - else - x2 = x1 + (int) pBuffer->drawable.width - (int) x; - if (h) - y2 = y1 + h; - else - y2 = y1 + (int) pBuffer->drawable.height - (int) y; - - extents = &pBuffer->clipList.extents; - - /* clip the resulting rectangle to the window clipList extents. This - * makes sure that the result will fit in a box, given that the - * screen is < 32768 on a side. - */ - - if (x1 < extents->x1) - x1 = extents->x1; - if (x2 > extents->x2) - x2 = extents->x2; - if (y1 < extents->y1) - y1 = extents->y1; - if (y2 > extents->y2) - y2 = extents->y2; - - if (x2 <= x1 || y2 <= y1) - { - x2 = x1 = 0; - y2 = y1 = 0; - } - - box.x1 = x1; - box.x2 = x2; - box.y1 = y1; - box.y2 = y2; - - pScreen = pBuffer->drawable.pScreen; - RegionInit(®, &box, 1); - if (pBuffer->backStorage) - { - /* - * If the window has backing-store on, call through the - * ClearToBackground vector to handle the special semantics - * (i.e. things backing store is to be cleared out and - * an Expose event is to be generated for those areas in backing - * store if generateExposures is TRUE). - */ - pBSReg = (* pScreen->ClearBackingStore)(pBuffer, x, y, w, h, - generateExposures); - } - - RegionIntersect(®, ®, &pBuffer->clipList); - if (pBuffer->backgroundState != None) - (*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND); - if (generateExposures) - MultibufferExpose(pMBBuffer, ®); -#ifdef _notdef - /* XXBS - This is the original miClearToBackground code. - * WindowExposures needs to be called (or the functionality emulated) - * in order for backingStore to work, but first, pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) need to be setup correctly. - */ - - if (generateExposures) - (*pScreen->WindowExposures)(pBuffer, ®, pBSReg); - else if (pBuffer->backgroundState != None) - (*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND); -#endif - RegionUninit(®); - if (pBSReg) - RegionDestroy(pBSReg); -} - -static void -bufWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClipNotify, bufClipNotify); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,WindowExposures,bufWindowExposures); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ChangeWindowAttributes, bufChangeWindowAttributes); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClearToBackground,bufClearToBackground); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,CopyWindow,bufCopyWindow); -} - -static void -bufResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * frameBuffer, selectPlane, and pInfo should be freed by - * whoever called RegisterDoubleBufferHardware - */ - - RegionUninit(&pMBPriv->backBuffer); - RegionUninit(&pMBPriv->subtractRgn); - RegionUninit(&pMBPriv->unionRgn); - xfree(pMBPriv); -} - -/*---------------------------------------------------------------------------*/ - -/* - * Used if CopyBufferBitsFunc is not provided when registering. - * This should work for everybody since CopyArea needs to support - * copying between buffers anyway. - */ - -static void -bufCopyBufferBits(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; -{ - DrawablePtr pSrcBuffer, pDstBuffer; - GCPtr pGC; - - pSrcBuffer = pMBWindow->buffers[srcBufferNum].pDrawable; - pDstBuffer = pMBWindow->buffers[dstBufferNum].pDrawable; - - pGC = GetScratchGC (pDstBuffer->depth, pDstBuffer->pScreen); - if (!pGC) - return; - - ValidateGC (pDstBuffer, pGC); - (* pGC->ops->CopyArea) (pSrcBuffer, pDstBuffer, pGC, - 0,0, pDstBuffer->width, pDstBuffer->height, 0,0); - FreeScratchGC (pGC); -} - -/* - * Used if DrawSelectPlanFunc is not provided for when registering. - * However, it only works if selectPlane.ptr is a drawable. Also - * assumes that painting with color 0 selects the front buffer, - * while color 1 selects the back buffer. - */ - -static void -bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; -{ - DrawablePtr pDrawable; - GCPtr pGC; - register int i; - register BoxPtr pbox; - register xRectangle *prect; - int numRects; - XID value; - - if (RegionNumRects(prgn) == 0) - return; - - pDrawable = (DrawablePtr) selectPlane.ptr; - pGC = GetScratchGC (pDrawable->depth, pScreen); - if (!pGC) - return; - - prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) * - sizeof(xRectangle)); - if (!prect) - { - FreeScratchGC(pGC); - return; - } - - value = (XID) bufferNum; - DoChangeGC(pGC, GCForeground, &value, 0); - ValidateGC(pDrawable, pGC); - - numRects = RegionNumRects(prgn); - pbox = RegionRects(prgn); - for (i= numRects; --i >= 0; pbox++, prect++) - { - prect->x = pbox->x1; - prect->y = pbox->y1; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect); - - DEALLOCATE_LOCAL(prect); - FreeScratchGC (pGC); -} - - -static void -bufDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - ScreenPtr pScreen; - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - WindowPtr pWin; - BufferPtr pPrevBuffer, pNewBuffer; - int i, number; - mbufBufferPrivPtr pMBPriv; - mbufBufferPtr pPrevMBBuffer; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - for (i = 0; i < nbuf; i++) - { - number = ppMBBuffer[i]->number; /* 0=frontbuffer, 1=backbuffer */ - pWin = ppMBWindow[i]->pWindow; - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - - pPrevBuffer = (BufferPtr) pPrevMBBuffer->pDrawable; - pNewBuffer = (BufferPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevBuffer != pNewBuffer) - { - RegionPtr backBuffer = &pMBPriv->backBuffer; - - /* - * Update the select plane and the backBuffer region. - */ - - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, number); - - if (number == BACK_BUFFER) - RegionUnion(backBuffer, backBuffer, - &pWin->clipList); - else - RegionSubtract(backBuffer, backBuffer, - &pWin->clipList); - - /* Switch which framebuffer the window draws into */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[number]; - } - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pPrevMBBuffer, 0,0, 0,0, FALSE); - break; - case MultibufferUpdateActionUntouched: - break; - case MultibufferUpdateActionCopied: - if (pPrevBuffer != pNewBuffer) - { - (* pMBPriv->CopyBufferBits) (ppMBWindow[i], - ppMBBuffer[i]->number, pPrevMBBuffer->number); - } - break; - } - } -} - -/* Updates the backBuffer region and paints the selectPlane. */ - -static void -bufPostValidateTree(pParent, pChild, kind) - WindowPtr pParent, pChild; - VTKind kind; -{ - ScreenPtr pScreen; - mbufBufferPrivPtr pMBPriv; - - if (pParent) - pScreen = pParent->drawable.pScreen; - else if (pChild) - pScreen = pChild->drawable.pScreen; - else - return; /* Hopeless */ - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - if (pScreen->PostValidateTree) - (* pScreen->PostValidateTree)(pParent, pChild, kind); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - - /* Does backBuffer need to change? */ - if (pMBPriv->rgnChanged) - { - RegionRec exposed; - RegionPtr pSubtractRgn, pUnionRgn; - Bool overlap; - - pMBPriv->rgnChanged = FALSE; - - pSubtractRgn = &pMBPriv->subtractRgn; - pUnionRgn = &pMBPriv->unionRgn; - RegionValidate(pSubtractRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: subtractRgn overlaps"); -#endif - RegionValidate(pUnionRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: unionRgn overlaps"); -#endif - - /* Update backBuffer: subtract must come before union */ - RegionSubtract(&pMBPriv->backBuffer, &pMBPriv->backBuffer, - pSubtractRgn); - RegionUnion(&pMBPriv->backBuffer, &pMBPriv->backBuffer, - pUnionRgn); - - /* Paint gained and lost backbuffer areas in select plane */ - RegionNull(&exposed); - RegionSubtract(&exposed, pSubtractRgn, pUnionRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, FRONT_BUFFER); - - RegionSubtract(&exposed, pUnionRgn, pSubtractRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, BACK_BUFFER); - - RegionUninit(&exposed); - RegionEmpty(pSubtractRgn); - RegionEmpty(pUnionRgn); - } -} - -/* - * If the window is multibuffered and displaying the backbuffer, - * add the old clipList to the subtractRgn and add the new clipList - * to the unionRgn. PostValidateTree will use subtractRgn and unionRgn - * to update the backBuffer region and the selectPlane. - * - * Copy changes to the window structure into the buffers. - * Send ClobberNotify events. - */ - -static void -bufClipNotify(pWin, dx,dy) - WindowPtr pWin; - int dx,dy; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - int i; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - if (pScreen->ClipNotify) - (* pScreen->ClipNotify)(pWin, dx,dy); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr; - - if (! RegionEqual(pOldClipList, &pWin->clipList)) - { - if (pMBWindow->displayedMultibuffer == BACK_BUFFER) - { - pMBPriv->rgnChanged = TRUE; - RegionAppend(&pMBPriv->subtractRgn, pOldClipList); - RegionAppend(&pMBPriv->unionRgn, &pWin->clipList); - } - - RegionCopy(pOldClipList,&pWin->clipList); - } - - /* Update buffer x,y,w,h, and clipList */ - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer = pMBWindow->buffers + i; - if (pMBBuffer->clobber != pWin->visibility) - { - pMBBuffer->clobber = pWin->visibility; - MultibufferClobber(pMBBuffer); - } - UpdateBufferFromWindow(pMBBuffer->pDrawable, pWin); - } - } -} - -/* - * Updates buffer's background fields when the window's changes. - * This is necessary because pScreen->PaintWindowBackground - * is used to paint the buffer. - * - * XXBS - Backingstore state will have be tracked too if it is supported. - */ - -static Bool -bufChangeWindowAttributes(pWin, mask) - WindowPtr pWin; - unsigned long mask; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - Bool ret; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - ret = (* pScreen->ChangeWindowAttributes)(pWin, mask); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - if (mask & (CWBackPixmap | CWBackPixel)) - { - BufferPtr pBuffer; - int i; - - for (i=0; idisplayedMultibuffer; i++) - { - pBuffer = (BufferPtr) pMBWindow->buffers[i].pDrawable; - pBuffer->backgroundState = pWin->backgroundState; - pBuffer->background = pWin->background; - } - } - } - return ret; -} - -/* - * Send exposures and clear the background for a buffer whenever - * its corresponding window is exposed, except when called by - * ClearToBackground. - */ - -static void -bufWindowExposures(pWin, prgn, other_exposed) - WindowPtr pWin; - register RegionPtr prgn, other_exposed; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufWindowPtr pMBWindow = MB_WINDOW_PRIV(pWin); - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - RegionRec tmp_rgn; - int i; - Bool handleBuffers; - - handleBuffers = (!pMBPriv->inClearToBackground) && - (pWin->drawable.type == DRAWABLE_WINDOW) && - pMBWindow && (prgn && !RegionNil(prgn)); - - /* miWindowExposures munges prgn and other_exposed. */ - if (handleBuffers) - { - RegionNull(&tmp_rgn); - RegionCopy(&tmp_rgn, prgn); - } - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - (* pScreen->WindowExposures) (pWin, prgn, other_exposed); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - - if (!handleBuffers) - return; - - /* - * Send expose events to all clients. Paint the exposed region for all - * buffers except the displayed buffer since it is handled when the - * window is painted. - * - * XXBS - Will have to be re-written to handle BackingStore on buffers. - */ - - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer; - BufferPtr pBuffer; - - pMBBuffer = pMBWindow->buffers + i; - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - - if (i != pMBWindow->displayedMultibuffer) - (* pScreen->PaintWindowBackground)(pBuffer,&tmp_rgn,PW_BACKGROUND); - if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask) - MultibufferExpose(pMBBuffer, &tmp_rgn); - } - - RegionUninit(&tmp_rgn); -} - -/* - * Set ``inClearToBackground'' so that WindowExposures does not attempt - * to send expose events or clear the background on the buffers. - */ - -static void -bufClearToBackground(pWin, x,y,w,h, sendExpose) - WindowPtr pWin; - int x,y, w,h; - Bool sendExpose; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pMBPriv->inClearToBackground = TRUE; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - (* pScreen->ClearToBackground)(pWin, x,y,w,h, sendExpose); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - - pMBPriv->inClearToBackground = FALSE; -} - -/* - * Move bits in both buffers. It does this by calling pScreen->CopyWindow - * twice, once with the root window's devPrivate[frameWindowPrivateIndex] - * pointing to the frontbuffer pixmap and once with it pointed to the - * backbuffer pixmap. It does this if there are *any* existing multibuffered - * window... a possible optimization is to copy the backbuffer only if this - * window or its inferiors are multibuffered. May be faster, maybe not. - * - * XXX - Only works if your CopyWindow checks the root window's devPrivate - * to see which buffer to draw into. Works for cfbPaintWindow. - */ - -/*ARGSUSED*/ -static void -bufCopyWindow(pWin, ptOldOrg, prgnSrc) - WindowPtr pWin; - DDXPointRec ptOldOrg; - RegionPtr prgnSrc; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - WindowPtr pwinroot; - DevUnion save; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); - - pwinroot = WindowTable[pScreen->myNum]; - save = pwinroot->devPrivates[frameWindowPrivateIndex]; - - /* - * Copy front buffer - */ - - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - /* - * Copy back buffer - */ - - /* CopyWindow translates prgnSrc... translate it back for 2nd call. */ - RegionTranslate(prgnSrc, - ptOldOrg.x - pWin->drawable.x, - ptOldOrg.y - pWin->drawable.y); - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[BACK_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - pwinroot->devPrivates[frameWindowPrivateIndex] = save; - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); -} diff --git a/nx-X11/programs/Xserver/Xext/mbufpx.c b/nx-X11/programs/Xserver/Xext/mbufpx.c deleted file mode 100644 index 3d28d3ff3..000000000 --- a/nx-X11/programs/Xserver/Xext/mbufpx.c +++ /dev/null @@ -1,651 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.3 2001/07/23 13:15:44 dawes Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* $Xorg: mbufpx.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_PIXMAP_ -#include - - -static Bool NoopDDA_True() { return TRUE; } - -static Bool pixPositionWindow(); -static int pixCreateImageBuffers(); -static void pixDisplayImageBuffers(); -static void pixClearImageBufferArea(); -static void pixDeleteBufferDrawable(); -static void pixWrapScreenFuncs(); -static void pixResetProc(); - -Bool -pixMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - int i, j, k; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - mbufPixmapPrivPtr pMBPriv; - - pMBScreen->CreateImageBuffers = pixCreateImageBuffers; - pMBScreen->DestroyImageBuffers = (void (*)())NoopDDA; - pMBScreen->DisplayImageBuffers = pixDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = pixClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = pixDeleteBufferDrawable; - pMBScreen->WrapScreenFuncs = pixWrapScreenFuncs; - pMBScreen->ResetProc = pixResetProc; - - /* Support every depth and visual combination that the screen does */ - - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - - pInfo = (xMbufBufferInfo *) xalloc (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return FALSE; - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - k++; - } - } - - pMBScreen->nInfo = nInfo; - pMBScreen->pInfo = pInfo; - - /* - * Setup the devPrivate to mbufScreenRec - */ - - pMBPriv = (mbufPixmapPrivPtr) xalloc(sizeof(* pMBPriv)); - if (!pMBPriv) - { - xfree(pInfo); - return (FALSE); - } - pMBScreen->devPrivate.ptr = (void *) pMBPriv; - pMBPriv->PositionWindow = NULL; - pMBPriv->funcsWrapped = 0; - - return TRUE; -} - -/*ARGSUSED*/ -static int -pixCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - - pMBWindow = MB_WINDOW_PRIV(pWin); - - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pMBBuffer->pDrawable = (DrawablePtr) - (*pScreen->CreatePixmap) (pScreen, width, height, depth); - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (void *) pMBBuffer->pDrawable)) - { - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * In the description of the CreateImageBuffers request: - * "If the window is mapped, or if these image buffers have - * backing store, their contents will be tiled with the window - * background, and zero or more expose events will be generated - * for each of these buffers." - */ - - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -/* - * set up the gc to clear the pixmaps; - */ -static Bool -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - XID gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (XID) background.pixel; - gcvalues[1] = FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = FillTiled; - gcvalues[1] = (XID) background.pixmap; - gcvalues[2] = ts_x_origin; - gcvalues[3] = ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - return FALSE; - } - DoChangeGC(pGC, gcmask, gcvalues, TRUE); - return TRUE; -} - -static void -MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects) - WindowPtr pWin; - DrawablePtr pDrawable; - int nrects; - xRectangle *pRects; -{ - GCPtr pGC; - - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - if (SetupBackgroundPainter(pWin, pGC)) - { - ValidateGC(pDrawable, pGC); - (*pGC->ops->PolyFillRect) (pDrawable, pGC, nrects, pRects); - } - FreeScratchGC(pGC); -} - -static void -MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) - WindowPtr pWin; - DrawablePtr pDrawable; - RegionPtr pRegion; -{ - xRectangle *pRects; - int nrects = RegionNumRects(pRegion); - BoxPtr pbox = RegionRects(pRegion); - - pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); - if (pRects) - { - int i; - for (i = 0; i < nrects; i++) - { - pRects[i].x = pbox->x1; - pRects[i].y = pbox->y1; - pRects[i].width = pbox->x2 - pbox->x1; - pRects[i].height = pbox->y2 - pbox->y1; - } - MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects); - DEALLOCATE_LOCAL(pRects); - } -} - -static void -pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - GCPtr pGC = NULL; - PixmapPtr pPrevPixmap, pNewPixmap; - WindowPtr pWin; - RegionPtr pExposed; - int i; - mbufBufferPtr pPrevMBBuffer; - XID bool; - xRectangle r; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMBWindow[i]->pWindow; - - /* Time to get a different scratch GC? */ - - if (!pGC - || pGC->depth != pWin->drawable.depth - || pGC->pScreen != pWin->drawable.pScreen) - { - if (pGC) FreeScratchGC(pGC); - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - } - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - pPrevPixmap = (PixmapPtr) pPrevMBBuffer->pDrawable; - pNewPixmap = (PixmapPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevPixmap == pNewPixmap) - { - /* "If a specified buffer is already displayed, any delays and - * update action will still be performed for that buffer." - * - * We special-case this because applications do occasionally - * request a redundant DisplayImageBuffers, and we can save - * strokes by recognizing that the only update action that will - * change the buffer contents in this case is Background. - */ - if (ppMBWindow[i]->updateAction == MultibufferUpdateActionBackground) - { - r.x = r.y = 0; - r.width = pWin->drawable.width; - r.height = pWin->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, (DrawablePtr)pWin, - 1, &r); - } - } - else /* different buffer is being displayed */ - { - /* perform update action */ - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - - case MultibufferUpdateActionBackground: - - r.x = r.y = 0; - r.width = pPrevPixmap->drawable.width; - r.height = pPrevPixmap->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, - (DrawablePtr)pPrevPixmap, - 1, &r); - break; - - case MultibufferUpdateActionUntouched: - - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { - bool = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea)((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, - pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - extern RegionPtr CreateUnclippedWinSize(); - ScreenPtr pScreen = pWin->drawable.pScreen; - pWinSize = CreateUnclippedWinSize (pWin); - /* - * pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - RegionTranslate(pWinSize, - -pWin->drawable.x, - -pWin->drawable.y); - RegionIntersect(pExposed, pExposed, pWinSize); - RegionDestroy(pWinSize); - MultibufferExpose (pPrevMBBuffer, pExposed); - RegionDestroy(pExposed); - } - bool = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } /* end some client wants expose events */ - - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, pWin->drawable.width, - pWin->drawable.height, 0, 0); - break; - - } /* end switch on update action */ - - /* display the new buffer */ - - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, - pGC, 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - } - - ppMBWindow[i]->lastUpdate = currentTime; - } - - if (pGC) FreeScratchGC (pGC); - return; -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -pixPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - mbufPixmapPrivPtr pMBPriv; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - Bool clear; - RegionRec exposedRegion; - Bool ret; - - pScreen = pWin->drawable.pScreen; - pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - ret = (* pScreen->PositionWindow) (pWin, x, y); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - - if (!(pMBWindow = MB_WINDOW_PRIV(pWin))) - return ret; - - /* if new size is same as old, we're done */ - - if (pMBWindow->width == pWin->drawable.width && - pMBWindow->height == pWin->drawable.height) - return ret; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMBWindow->x; - dy = pWin->drawable.x - pMBWindow->y; - dw = width - pMBWindow->width; - dh = height - pMBWindow->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - - clear = pMBWindow->width < width || pMBWindow->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMBWindow->width; - saveheight = pMBWindow->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMBWindow->width = width; - pMBWindow->height = height; - pMBWindow->x = pWin->drawable.x; - pMBWindow->y = pWin->drawable.y; - - if (clear) - { - BoxRec box; - - box.x1 = box.y1 = 0; - box.x2 = width; - box.y2 = height; - RegionInit(&exposedRegion, &box, 1); - if (pWin->bitGravity != ForgetGravity) - { - RegionRec preservedRegion; - box.x1 = destx; - box.y1 = desty; - box.x2 = destx + savewidth; - box.y2 = desty + saveheight; - RegionInit(&preservedRegion, &box, 1); - RegionSubtract(&exposedRegion, &exposedRegion, &preservedRegion); - RegionUninit(&preservedRegion); - } - - } /* end if (clear) */ - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - - /* create buffers with new window size */ - - for (i = 0; i < pMBWindow->numMultibuffer; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth); - if (!pPixmap) - { - (* MB_SCREEN_PRIV(pScreen)->DestroyImageBuffers)(pWin); - break; - } - if (clear) - { - MultibufferPaintBackgroundRegion(pWin, (DrawablePtr)pPixmap, &exposedRegion); - MultibufferExpose(pMBBuffer, &exposedRegion); - } - if (pWin->bitGravity != ForgetGravity) - { - ValidateGC ((DrawablePtr)pPixmap, pGC); - (*pGC->ops->CopyArea) (pMBBuffer->pDrawable, (DrawablePtr)pPixmap, - pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMBBuffer->pDrawable->id; - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - pMBBuffer->pDrawable = (DrawablePtr) pPixmap; - if (i != pMBWindow->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pPixmap); - } - } - FreeScratchGC (pGC); - if (clear) - RegionUninit(&exposedRegion); - return TRUE; -} - -static void -pixWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - WRAP_SCREEN_FUNC(pScreen, pMBPriv, PositionWindow, pixPositionWindow); -} - -static void -pixResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufScreenPtr pMBScreen = MB_SCREEN_PRIV(pScreen); - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - xfree(pMBScreen->pInfo); - xfree(pMBPriv); -} - -static void -pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures) - mbufBufferPtr pMBBuffer; - short x, y; - unsigned short width, height; - Bool exposures; -{ - WindowPtr pWin; - ScreenPtr pScreen; - BoxRec box; - RegionRec region; - int w_width, w_height; - DrawablePtr pDrawable; - - pWin = pMBBuffer->pMBWindow->pWindow; - pScreen = pWin->drawable.pScreen; - - w_width = pWin->drawable.width; - w_height = pWin->drawable.height; - - box.x1 = x; - box.y1 = y; - box.x2 = width ? (box.x1 + width) : w_width; - box.y2 = height ? (box.y1 + height) : w_height; - - if (box.x1 < 0) box.x1 = 0; - if (box.y1 < 0) box.y1 = 0; - if (box.x2 > w_width) box.x2 = w_width; - if (box.y2 > w_height) box.y2 = w_height; - - RegionInit(®ion, &box, 1); - - if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer) - pDrawable = (DrawablePtr) pWin; - else - pDrawable = pMBBuffer->pDrawable; - - MultibufferPaintBackgroundRegion(pWin, pDrawable, ®ion); - - if (exposures) - MultibufferExpose(pMBBuffer, ®ion); - - RegionUninit(®ion); -} - -static void -pixDeleteBufferDrawable(pDrawable) - DrawablePtr pDrawable; -{ - (* pDrawable->pScreen->DestroyPixmap)((PixmapPtr) pDrawable); -} diff --git a/nx-X11/programs/Xserver/Xext/mitmisc.c b/nx-X11/programs/Xserver/Xext/mitmisc.c deleted file mode 100644 index 5c5183e69..000000000 --- a/nx-X11/programs/Xserver/Xext/mitmisc.c +++ /dev/null @@ -1,176 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.6 2003/10/28 23:08:43 tsi Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "os.h" -#include "dixstruct.h" -#include "extnsionst.h" -#define _MITMISC_SERVER_ -#include -#include "modinit.h" - -extern Bool permitOldBugs; - -#if 0 -static unsigned char MITReqCode; -#endif - -static void MITResetProc( - ExtensionEntry * /* extEntry */ -); - -static DISPATCH_PROC(ProcMITDispatch); -static DISPATCH_PROC(ProcMITGetBugMode); -static DISPATCH_PROC(ProcMITSetBugMode); -static DISPATCH_PROC(SProcMITDispatch); -static DISPATCH_PROC(SProcMITGetBugMode); -static DISPATCH_PROC(SProcMITSetBugMode); - -void -MITMiscExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode)) != 0) - MITReqCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode); -#endif -} - -/*ARGSUSED*/ -static void -MITResetProc (extEntry) -ExtensionEntry *extEntry; -{ -} - -static int -ProcMITSetBugMode(client) - register ClientPtr client; -{ - REQUEST(xMITSetBugModeReq); - - REQUEST_SIZE_MATCH(xMITSetBugModeReq); - if ((stuff->onOff != xTrue) && (stuff->onOff != xFalse)) - { - client->errorValue = stuff->onOff; - return BadValue; - } - permitOldBugs = stuff->onOff; - return(client->noClientException); -} - -static int -ProcMITGetBugMode(client) - register ClientPtr client; -{ - xMITGetBugModeReply rep; - register int n; - - REQUEST_SIZE_MATCH(xMITGetBugModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.onOff = permitOldBugs; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof(xMITGetBugModeReply), (char *)&rep); - return(client->noClientException); -} - -static int -ProcMITDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_MITSetBugMode: - return ProcMITSetBugMode(client); - case X_MITGetBugMode: - return ProcMITGetBugMode(client); - default: - return BadRequest; - } -} - -static int -SProcMITSetBugMode(client) - register ClientPtr client; -{ - register int n; - REQUEST(xMITSetBugModeReq); - - swaps(&stuff->length, n); - return ProcMITSetBugMode(client); -} - -static int -SProcMITGetBugMode(client) - register ClientPtr client; -{ - register int n; - REQUEST(xMITGetBugModeReq); - - swaps(&stuff->length, n); - return ProcMITGetBugMode(client); -} - -static int -SProcMITDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_MITSetBugMode: - return SProcMITSetBugMode(client); - case X_MITGetBugMode: - return SProcMITGetBugMode(client); - default: - return BadRequest; - } -} diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index 955b81ed1..76346fa34 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -30,8 +30,8 @@ Equipment Corporation. #endif #include -#include -#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 8078e2bd0..17fe6d6c6 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -33,10 +33,10 @@ Equipment Corporation. #endif #include -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "dixfontstr.h" #include "gcstruct.h" @@ -1113,7 +1113,7 @@ int PanoramiXCopyArea(ClientPtr client) FOR_NSCREENS_BACKWARD(j) { if(pRgn[j]) { if(srcIsRoot) { - RegionTranslate(pRgn[j], + RegionTranslate(pRgn[j], panoramiXdataPtr[j].x, panoramiXdataPtr[j].y); } RegionAppend(&totalReg, pRgn[j]); diff --git a/nx-X11/programs/Xserver/Xext/sampleEVI.c b/nx-X11/programs/Xserver/Xext/sampleEVI.c deleted file mode 100644 index 961c108f9..000000000 --- a/nx-X11/programs/Xserver/Xext/sampleEVI.c +++ /dev/null @@ -1,121 +0,0 @@ -/* $Xorg: sampleEVI.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "dixstruct.h" -#include "extnsionst.h" -#include "dix.h" -#define _XEVI_SERVER_ -#include -#include "EVIstruct.h" -#include "scrnintstr.h" - -#include - -static int sampleGetVisualInfo( - VisualID32 *visual, - int n_visual, - xExtendedVisualInfo **evi_rn, - int *n_info_rn, - VisualID32 **conflict_rn, - int *n_conflict_rn) -{ - unsigned int max_sz_evi; - VisualID32 *temp_conflict; - xExtendedVisualInfo *evi; - unsigned int max_visuals = 0, max_sz_conflict, sz_conflict = 0; - register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; - - if (n_visual > UINT32_MAX/(sz_xExtendedVisualInfo * screenInfo.numScreens)) - return BadAlloc; - max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; - - for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { - if (screenInfo.screens[scrI]->numVisuals > max_visuals) - max_visuals = screenInfo.screens[scrI]->numVisuals; - } - - if (n_visual > UINT32_MAX/(sz_VisualID32 * screenInfo.numScreens - * max_visuals)) - return BadAlloc; - max_sz_conflict = n_visual * sz_VisualID32 * screenInfo.numScreens * max_visuals; - - *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); - if (!*evi_rn) - return BadAlloc; - - temp_conflict = (VisualID32 *)xalloc(max_sz_conflict); - if (!temp_conflict) { - xfree(*evi_rn); - return BadAlloc; - } - - for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { - for (visualI = 0; visualI < n_visual; visualI++) { - evi[sz_evi].core_visual_id = visual[visualI]; - evi[sz_evi].screen = scrI; - evi[sz_evi].level = 0; - evi[sz_evi].transparency_type = XEVI_TRANSPARENCY_NONE; - evi[sz_evi].transparency_value = 0; - evi[sz_evi].min_hw_colormaps = 1; - evi[sz_evi].max_hw_colormaps = 1; - evi[sz_evi].num_colormap_conflicts = n_conflict = 0; - for (conflictI = 0; conflictI < n_conflict; conflictI++) - temp_conflict[sz_conflict++] = visual[visualI]; - sz_evi++; - } - } - *conflict_rn = temp_conflict; - *n_conflict_rn = sz_conflict; - *n_info_rn = sz_evi; - return Success; -} - -static void sampleFreeVisualInfo( - xExtendedVisualInfo *evi, - VisualID32 *conflict) -{ - if (evi) - xfree(evi); - if (conflict) - xfree(conflict); -} - -EviPrivPtr eviDDXInit(void) -{ - static EviPrivRec eviPriv; - eviPriv.getVisualInfo = sampleGetVisualInfo; - eviPriv.freeVisualInfo = sampleFreeVisualInfo; - return &eviPriv; -} - -void eviDDXReset(void) -{ -} diff --git a/nx-X11/programs/Xserver/Xext/vidmodeproc.h b/nx-X11/programs/Xserver/Xext/vidmodeproc.h deleted file mode 100644 index 1f7c6cd04..000000000 --- a/nx-X11/programs/Xserver/Xext/vidmodeproc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/vidmodeproc.h,v 1.4 1999/12/13 01:39:40 robin Exp $ */ - -/* Prototypes for DGA functions that the DDX must provide */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _VIDMODEPROC_H_ -#define _VIDMODEPROC_H_ - - -typedef enum { - VIDMODE_H_DISPLAY, - VIDMODE_H_SYNCSTART, - VIDMODE_H_SYNCEND, - VIDMODE_H_TOTAL, - VIDMODE_H_SKEW, - VIDMODE_V_DISPLAY, - VIDMODE_V_SYNCSTART, - VIDMODE_V_SYNCEND, - VIDMODE_V_TOTAL, - VIDMODE_FLAGS, - VIDMODE_CLOCK -} VidModeSelectMode; - -typedef enum { - VIDMODE_MON_VENDOR, - VIDMODE_MON_MODEL, - VIDMODE_MON_NHSYNC, - VIDMODE_MON_NVREFRESH, - VIDMODE_MON_HSYNC_LO, - VIDMODE_MON_HSYNC_HI, - VIDMODE_MON_VREFRESH_LO, - VIDMODE_MON_VREFRESH_HI -} VidModeSelectMonitor; - -typedef union { - void * ptr; - int i; - float f; -} vidMonitorValue; - -void XFree86VidModeExtensionInit(void); - -Bool VidModeAvailable(int scrnIndex); -Bool VidModeGetCurrentModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeGetNextModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeDeleteModeline(int scrnIndex, void * mode); -Bool VidModeZoomViewport(int scrnIndex, int zoom); -Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); -Bool VidModeSetViewPort(int scrnIndex, int x, int y); -Bool VidModeSwitchMode(int scrnIndex, void * mode); -Bool VidModeLockZoom(int scrnIndex, Bool lock); -Bool VidModeGetMonitor(int scrnIndex, void **monitor); -int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); -Bool VidModeGetClocks(int scrnIndex, int *Clocks); -ModeStatus VidModeCheckModeForMonitor(int scrnIndex, void * mode); -ModeStatus VidModeCheckModeForDriver(int scrnIndex, void * mode); -void VidModeSetCrtcForMode(int scrnIndex, void * mode); -Bool VidModeAddModeline(int scrnIndex, void * mode); -int VidModeGetDotClock(int scrnIndex, int Clock); -int VidModeGetNumOfModes(int scrnIndex); -Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); -Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); -void * VidModeCreateMode(void); -void VidModeCopyMode(void * modefrom, void * modeto); -int VidModeGetModeValue(void * mode, int valtyp); -void VidModeSetModeValue(void * mode, int valtyp, int val); -vidMonitorValue VidModeGetMonitorValue(void * monitor, int valtyp, int indx); -Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); -Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); -int VidModeGetGammaRampSize(int scrnIndex); - -#endif - - diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index e353d65ac..ee7d69fc3 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -34,8 +34,8 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -44,7 +44,11 @@ from The Open Group. #include #include "modinit.h" +#if HAVE_STDINT_H #include +#elif !defined(UINT32_MAX) +#define UINT32_MAX 0xffffffffU +#endif #if 0 static unsigned char XCMiscCode; diff --git a/nx-X11/programs/Xserver/Xext/xevie.c b/nx-X11/programs/Xserver/Xext/xevie.c deleted file mode 100644 index eb38d9223..000000000 --- a/nx-X11/programs/Xserver/Xext/xevie.c +++ /dev/null @@ -1,719 +0,0 @@ -/************************************************************ - -Copyright 2003-2005 Sun Microsystems, Inc. - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ -/* $XdotOrg: xc/programs/Xserver/Xext/xevie.c,v 1.11 2005/10/06 17:55:54 alanc Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XEVIE_SERVER_ -#include -#include -#include "input.h" -#include "inputstr.h" -#include "windowstr.h" -#include "cursorstr.h" -#include - -#include "../os/osdep.h" - -#define NoSuchEvent 0x80000000 - -extern Bool noXkbExtension; -extern int xeviegrabState; - -static int ProcDispatch (), SProcDispatch (); -static void ResetProc (); - -static unsigned char ReqCode = 0; -static int ErrorBase; - -int xevieFlag = 0; -int xevieClientIndex = 0; -DeviceIntPtr xeviekb = NULL; -DeviceIntPtr xeviemouse = NULL; -Mask xevieMask = 0; -int xevieEventSent = 0; -int xevieKBEventSent = 0; -static unsigned int xevieServerGeneration; -static int xevieDevicePrivateIndex; -static Bool xevieModifiersOn = FALSE; - -#define XEVIEINFO(dev) ((xevieDeviceInfoPtr)dev->devPrivates[xevieDevicePrivateIndex].ptr) - -Mask xevieFilters[128] = -{ - NoSuchEvent, /* 0 */ - NoSuchEvent, /* 1 */ - KeyPressMask, /* KeyPress */ - KeyReleaseMask, /* KeyRelease */ - ButtonPressMask, /* ButtonPress */ - ButtonReleaseMask, /* ButtonRelease */ - PointerMotionMask /* MotionNotify (initial state) */ -}; - -typedef struct { - ProcessInputProc processInputProc; - ProcessInputProc realInputProc; - DeviceUnwrapProc unwrapProc; -} xevieDeviceInfoRec, *xevieDeviceInfoPtr; - -typedef struct { - CARD32 time; - KeyClassPtr keyc; -} xevieKeycQueueRec, *xevieKeycQueuePtr; - -#define KEYC_QUEUE_SIZE 100 -xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {0, NULL}; -static int keycqHead = 0, keycqTail = 0; - -static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr); -static void ResetProc (ExtensionEntry*); - -static int ErrorBase; - -static Bool XevieStart(void); -static void XevieEnd(int clientIndex); -static void XevieClientStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata); -static void XevieServerGrabStateCallback(CallbackListPtr *pcbl, - void * nulldata, - void * calldata); - -static Bool XevieAdd(DeviceIntPtr device, void * data); -static void XevieWrap(DeviceIntPtr device, ProcessInputProc proc); -static Bool XevieRemove(DeviceIntPtr device, void * data); -static void doSendEvent(xEvent *xE, DeviceIntPtr device); -static void XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, - int count); -static void XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count); - -void -XevieExtensionInit () -{ - ExtensionEntry* extEntry; - - if (serverGeneration != xevieServerGeneration) { - if ((xevieDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1) - return; - xevieServerGeneration = serverGeneration; - } - - if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL)) - return; - - if ((extEntry = AddExtension (XEVIENAME, - 0, - XevieNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode))) { - ReqCode = (unsigned char)extEntry->base; - ErrorBase = extEntry->errorBase; - } - - /* PC servers initialize the desktop colors (citems) here! */ -} - -/*ARGSUSED*/ -static -void ResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static -int ProcQueryVersion (client) - register ClientPtr client; -{ - REQUEST (xXevieQueryVersionReq); - xXevieQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXevieQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XEVIE_MAJOR_VERSION; - rep.server_minor_version = XEVIE_MINOR_VERSION; - WriteToClient (client, sizeof (xXevieQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcStart (client) - register ClientPtr client; -{ - REQUEST (xXevieStartReq); - xXevieStartReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXevieStartReq); - rep.pad1 = 0; - - if(!xevieFlag){ - if (AddCallback(&ClientStateCallback,XevieClientStateCallback,NULL)) { - xevieFlag = 1; - rep.pad1 = 1; - xevieClientIndex = client->index; - if(!keycq[0].time ) { - int i; - for(i=0; ixkbInfo = xalloc(sizeof(XkbSrvInfoRec)); - } - } - } else - return BadAlloc; - } else - return BadAccess; - if (!noXkbExtension) { - if (!XevieStart()) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - return BadAlloc; - } - } - - xevieModifiersOn = FALSE; - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcEnd (client) - register ClientPtr client; -{ - xXevieEndReply rep; - - if (xevieFlag) { - if (client->index != xevieClientIndex) - return BadAccess; - - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - } - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieEndReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcSend (client) - register ClientPtr client; -{ - REQUEST (xXevieSendReq); - xXevieSendReply rep; - xEvent *xE; - OsCommPtr oc; - static unsigned char lastDetail = 0, lastType = 0; - - if (client->index != xevieClientIndex) - return BadAccess; - - xE = (xEvent *)&stuff->event; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieSendReply), (char *)&rep); - - switch(xE->u.u.type) { - case KeyPress: - case KeyRelease: - xevieKBEventSent = 1; - if(noXkbExtension) - CoreProcessKeyboardEvent (xE, xeviekb, 1); - else - doSendEvent(xE, inputInfo.keyboard); - break; - case ButtonPress: - case ButtonRelease: - case MotionNotify: - xevieEventSent = 1; - if(noXkbExtension) - CoreProcessPointerEvent(xE, xeviemouse, 1); - else - doSendEvent(xE, inputInfo.pointer); - break; - default: - break; - } - lastType = xE->u.u.type; - lastDetail = xE->u.u.detail; - return client->noClientException; -} - -static -int ProcSelectInput (client) - register ClientPtr client; -{ - REQUEST (xXevieSelectInputReq); - xXevieSelectInputReply rep; - - if (client->index != xevieClientIndex) - return BadAccess; - - xevieMask = (long)stuff->event_mask; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcDispatch (client) - register ClientPtr client; -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return ProcQueryVersion (client); - case X_XevieStart: - return ProcStart (client); - case X_XevieEnd: - return ProcEnd (client); - case X_XevieSend: - return ProcSend (client); - case X_XevieSelectInput: - return ProcSelectInput(client); - default: - return BadRequest; - } -} - -static -int SProcQueryVersion (client) - register ClientPtr client; -{ - register int n; - - REQUEST(xXevieQueryVersionReq); - swaps(&stuff->length, n); - return ProcQueryVersion(client); -} - -static -int SProcStart (client) - ClientPtr client; -{ - register int n; - - REQUEST (xXevieStartReq); - swaps (&stuff->length, n); - swapl (&stuff->screen, n); - REQUEST_AT_LEAST_SIZE (xXevieStartReq); - return ProcStart (client); -} - -static -int SProcEnd (client) - ClientPtr client; -{ - register int n; - int count; - xColorItem* pItem; - - REQUEST (xXevieEndReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieEndReq); - swapl(&stuff->cmap, n); - return ProcEnd (client); -} - -static -int SProcSend (client) - ClientPtr client; -{ - register int n; - int count; - - REQUEST (xXevieSendReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); - swapl(&stuff->event, n); - return ProcSend (client); -} - -static -int SProcSelectInput (client) - ClientPtr client; -{ - register int n; - int count; - - REQUEST (xXevieSelectInputReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); - swapl(&stuff->event_mask, n); - return ProcSelectInput (client); -} - - -static -int SProcDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return SProcQueryVersion (client); - case X_XevieStart: - return SProcStart (client); - case X_XevieEnd: - return SProcEnd (client); - case X_XevieSend: - return SProcSend (client); - case X_XevieSelectInput: - return SProcSelectInput(client); - default: - return BadRequest; - } -} -/*======================================================*/ - -#define WRAP_INPUTPROC(dev,store,inputProc) \ - store->processInputProc = dev->public.processInputProc; \ - dev->public.processInputProc = inputProc; \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define COND_WRAP_INPUTPROC(dev,store,inputProc) \ - if (dev->public.processInputProc == dev->public.realInputProc) \ - dev->public.processInputProc = inputProc; \ - store->processInputProc = \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define XEVIE_EVENT(xE) \ - (xevieFlag \ - && !xeviegrabState \ - && clients[xevieClientIndex] \ - && (xevieMask & xevieFilters[xE->u.u.type])) - - -static void -sendEvent(ClientPtr pClient, xEvent *xE) -{ - if(pClient->swapped) { - xEvent eventTo; - - /* Remember to strip off the leading bit of type in case - this event was sent with "SendEvent." */ - (*EventSwapVector[xE->u.u.type & 0177]) (xE, &eventTo); - (void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); - } else { - (void)WriteToClient(pClient, sizeof(xEvent), (char *) xE); - } -} - -static void -XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - int key, bit; - BYTE *kptr; - ProcessInputProc tmp; - KeyClassPtr keyc = dev->key; - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - - if(XEVIE_EVENT(xE)) { - key = xE->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - - if (dev->key->modifierMap[xE->u.u.detail]) - xevieModifiersOn = TRUE; - - xE->u.keyButtonPointer.event = xeviewin->drawable.id; - xE->u.keyButtonPointer.root = GetCurrentRootWindow()->drawable.id; - xE->u.keyButtonPointer.child = (xeviewin->firstChild) - ? xeviewin->firstChild->drawable.id:0; - xE->u.keyButtonPointer.rootX = xeviehot.x; - xE->u.keyButtonPointer.rootY = xeviehot.y; - xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state; - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; - /* fix for bug5092586 */ - if(!noXkbExtension) { - switch(xE->u.u.type) { - case KeyPress: *kptr |= bit; break; - case KeyRelease: *kptr &= ~bit; break; - } - } - keycq[keycqHead].time = xE->u.keyButtonPointer.time; - memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr)); - memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec)); - if(++keycqHead >=KEYC_QUEUE_SIZE) - keycqHead = 0; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static void -XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp; - - if (XEVIE_EVENT(xE)) { - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static Bool -XevieStart(void) -{ - ProcessInputProc prp; - prp = XevieKbdProcessInputProc; - if (!XevieAdd(inputInfo.keyboard,&prp)) - return FALSE; - prp = XeviePointerProcessInputProc; - if (!XevieAdd(inputInfo.pointer,&prp)) - return FALSE; - - return TRUE; -} - - -static void -XevieEnd(int clientIndex) -{ - if (!clientIndex || clientIndex == xevieClientIndex) { - - if(!noXkbExtension) { - - XevieRemove(inputInfo.keyboard,NULL); - - inputInfo.keyboard->public.processInputProc = CoreProcessKeyboardEvent; - inputInfo.keyboard->public.realInputProc = CoreProcessKeyboardEvent; - XkbSetExtension(inputInfo.keyboard,ProcessKeyboardEvent); - - - XevieRemove(inputInfo.pointer,NULL); - - inputInfo.pointer->public.processInputProc = CoreProcessPointerEvent; - inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent; - XkbSetExtension(inputInfo.pointer,ProcessPointerEvent); - } - - xevieFlag = 0; - xevieClientIndex = 0; - DeleteCallback (&ClientStateCallback, XevieClientStateCallback, NULL); - } -} - -static void -XevieClientStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata) -{ - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; - ClientPtr client = pci->client; - if (client->clientState == ClientStateGone - || client->clientState == ClientStateRetained) - XevieEnd(client->index); -} - -static void -XevieServerGrabStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata) -{ - ServerGrabInfoRec *grbinfo = (ServerGrabInfoRec *)calldata; - if (grbinfo->grabstate == SERVER_GRABBED) - xeviegrabState = TRUE; - else - xeviegrabState = FALSE; -} - -#define UNWRAP_UNWRAPPROC(device,proc_store) \ - device->unwrapProc = proc_store; - -#define WRAP_UNWRAPPROC(device,proc_store,proc) \ - proc_store = device->unwrapProc; \ - device->unwrapProc = proc; - -static void -xevieUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, void * data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - ProcessInputProc tmp = device->public.processInputProc; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - proc(device,data); - WRAP_INPUTPROC(device,xeviep,tmp); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static Bool -XevieUnwrapAdd(DeviceIntPtr device, void* data) -{ - if (device->unwrapProc) - device->unwrapProc(device,XevieUnwrapAdd,data); - else { - ProcessInputProc *ptr = data; - XevieWrap(device,*ptr); - } - - return TRUE; -} - -static Bool -XevieAdd(DeviceIntPtr device, void* data) -{ - xevieDeviceInfoPtr xeviep; - - if (!AllocateDevicePrivate(device, xevieDevicePrivateIndex)) - return FALSE; - - xeviep = xalloc (sizeof (xevieDeviceInfoRec)); - if (!xeviep) - return FALSE; - - device->devPrivates[xevieDevicePrivateIndex].ptr = xeviep; - XevieUnwrapAdd(device, data); - - return TRUE; -} - -static Bool -XevieRemove(DeviceIntPtr device,void * data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - if (!xeviep) return TRUE; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - - xfree(xeviep); - device->devPrivates[xevieDevicePrivateIndex].ptr = NULL; - return TRUE; -} - -static void -XevieWrap(DeviceIntPtr device, ProcessInputProc proc) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - WRAP_INPUTPROC(device,xeviep,proc); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static void -doSendEvent(xEvent *xE, DeviceIntPtr dev) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp = dev->public.realInputProc; - if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease)) - && !xevieModifiersOn) { - KeyClassPtr keyc = dev->key; - CARD8 realModes = dev->key->modifierMap[xE->u.u.detail]; - int notFound = 0; - /* if some events are consumed by client, move the queue tail pointer to the current - event which just comes back from Xevie client . - */ - if(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - while(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - if(keycqTail == keycqHead) { - notFound = 1; - break; - } - } - } - if(!notFound) { - dev->key = keycq[keycqTail].keyc; - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - } - dev->key->modifierMap[xE->u.u.detail] = 0; - - if(dev->key->xkbInfo->repeatKey != 0 && xE->u.u.type != KeyPress) - XkbLastRepeatEvent= (void *)xE; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - XkbLastRepeatEvent= NULL; - - dev->key->modifierMap[xE->u.u.detail] = realModes; - dev->key = keyc; - if(notFound) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - ErrorF("Error: Xevie keyc queue size is not enough, disable Xevie\n"); - } - } else { - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86dga.c b/nx-X11/programs/Xserver/Xext/xf86dga.c deleted file mode 100644 index 074118c18..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dga.c +++ /dev/null @@ -1,307 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86dga.c,v 3.21 2000/06/30 19:06:54 keithp Exp $ */ - -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995, 1996, 1999 XFree86 Inc - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include -#include "swaprep.h" -#include "dgaproc.h" - -#include "xf86dgaext.h" - - -static DISPATCH_PROC(ProcXF86DGADirectVideo); -static DISPATCH_PROC(ProcXF86DGAGetVidPage); -static DISPATCH_PROC(ProcXF86DGAGetVideoLL); -static DISPATCH_PROC(ProcXF86DGAGetViewPortSize); -static DISPATCH_PROC(ProcXF86DGASetVidPage); -static DISPATCH_PROC(ProcXF86DGASetViewPort); -static DISPATCH_PROC(ProcXF86DGAInstallColormap); -static DISPATCH_PROC(ProcXF86DGAQueryDirectVideo); -static DISPATCH_PROC(ProcXF86DGAViewPortChanged); - - -static int -ProcXF86DGAGetVideoLL(ClientPtr client) -{ - REQUEST(xXF86DGAGetVideoLLReq); - xXF86DGAGetVideoLLReply rep; - XDGAModeRec mode; - int num, offset, flags; - char *name; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if(!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - /* get the parameters for the mode that best matches */ - DGAGetModeInfo(stuff->screen, &mode, num); - - if(!DGAOpenFramebuffer(stuff->screen, &name, - (unsigned char**)(&rep.offset), - (int*)(&rep.bank_size), &offset, &flags)) - return BadAlloc; - - rep.offset += mode.offset; - rep.width = mode.bytesPerScanline / (mode.bitsPerPixel >> 3); - rep.ram_size = rep.bank_size >> 10; - - WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGADirectVideo(ClientPtr client) -{ - int num; - PixmapPtr pix; - XDGAModeRec mode; - REQUEST(xXF86DGADirectVideoReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if (stuff->enable & XF86DGADirectGraphics) { - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - } else - num = 0; - - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - - DGASetInputMode (stuff->screen, - (stuff->enable & XF86DGADirectKeyb) != 0, - (stuff->enable & XF86DGADirectMouse) != 0); - - return (client->noClientException); -} - -static int -ProcXF86DGAGetViewPortSize(ClientPtr client) -{ - int num; - XDGAModeRec mode; - REQUEST(xXF86DGAGetViewPortSizeReq); - xXF86DGAGetViewPortSizeReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - DGAGetModeInfo(stuff->screen, &mode, num); - - rep.width = mode.viewportWidth; - rep.height = mode.viewportHeight; - - WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGASetViewPort(ClientPtr client) -{ - REQUEST(xXF86DGASetViewPortReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); - - if (!DGAActive(stuff->screen)) - { - int num; - PixmapPtr pix; - XDGAModeRec mode; - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - } - - if (DGASetViewport(stuff->screen, stuff->x, stuff->y, DGA_FLIP_RETRACE) - != Success) - return DGAErrorBase + XF86DGADirectNotActivated; - - return (client->noClientException); -} - -static int -ProcXF86DGAGetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGAGetVidPageReq); - xXF86DGAGetVidPageReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.vpage = 0; /* silently fail */ - - WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep); - return (client->noClientException); -} - - -static int -ProcXF86DGASetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGASetVidPageReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); - - /* silently fail */ - - return (client->noClientException); -} - - -static int -ProcXF86DGAInstallColormap(ClientPtr client) -{ - ColormapPtr pcmp; - REQUEST(xXF86DGAInstallColormapReq); - - REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); - if (pcmp) { - DGAInstallCmap(pcmp); - return (client->noClientException); - } else { - client->errorValue = stuff->id; - return (BadColor); - } -} - -static int -ProcXF86DGAQueryDirectVideo(ClientPtr client) -{ - REQUEST(xXF86DGAQueryDirectVideoReq); - xXF86DGAQueryDirectVideoReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.flags = 0; - - if (DGAAvailable(stuff->screen)) - rep.flags = XF86DGADirectPresent; - - WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGAViewPortChanged(ClientPtr client) -{ - REQUEST(xXF86DGAViewPortChangedReq); - xXF86DGAViewPortChangedReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.result = 1; - - WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep); - return (client->noClientException); -} - -int -ProcXF86DGADispatch(register ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) - { - case X_XF86DGAGetVideoLL: - return ProcXF86DGAGetVideoLL(client); - case X_XF86DGADirectVideo: - return ProcXF86DGADirectVideo(client); - case X_XF86DGAGetViewPortSize: - return ProcXF86DGAGetViewPortSize(client); - case X_XF86DGASetViewPort: - return ProcXF86DGASetViewPort(client); - case X_XF86DGAGetVidPage: - return ProcXF86DGAGetVidPage(client); - case X_XF86DGASetVidPage: - return ProcXF86DGASetVidPage(client); - case X_XF86DGAInstallColormap: - return ProcXF86DGAInstallColormap(client); - case X_XF86DGAQueryDirectVideo: - return ProcXF86DGAQueryDirectVideo(client); - case X_XF86DGAViewPortChanged: - return ProcXF86DGAViewPortChanged(client); - default: - return BadRequest; - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86dga2.c b/nx-X11/programs/Xserver/Xext/xf86dga2.c deleted file mode 100644 index c2b64b048..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dga2.c +++ /dev/null @@ -1,775 +0,0 @@ -/* - Copyright (c) 1999 - The XFree86 Project Inc. - - Written by Mark Vojkovich -*/ -/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.17 2001/10/28 03:32:51 tsi Exp $ */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "dixevents.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include -#include "swaprep.h" -#include "dgaproc.h" -#include "xf86dgaext.h" - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#else -#include -#endif - -#include "modinit.h" - -static DISPATCH_PROC(ProcXDGADispatch); -static DISPATCH_PROC(SProcXDGADispatch); -static DISPATCH_PROC(ProcXDGAQueryVersion); -static DISPATCH_PROC(ProcXDGAQueryModes); -static DISPATCH_PROC(ProcXDGASetMode); -static DISPATCH_PROC(ProcXDGAOpenFramebuffer); -static DISPATCH_PROC(ProcXDGACloseFramebuffer); -static DISPATCH_PROC(ProcXDGASetViewport); -static DISPATCH_PROC(ProcXDGAInstallColormap); -static DISPATCH_PROC(ProcXDGASelectInput); -static DISPATCH_PROC(ProcXDGAFillRectangle); -static DISPATCH_PROC(ProcXDGACopyArea); -static DISPATCH_PROC(ProcXDGACopyTransparentArea); -static DISPATCH_PROC(ProcXDGAGetViewportStatus); -static DISPATCH_PROC(ProcXDGASync); -static DISPATCH_PROC(ProcXDGASetClientVersion); -static DISPATCH_PROC(ProcXDGAChangePixmapMode); -static DISPATCH_PROC(ProcXDGACreateColormap); - -static void XDGAResetProc(ExtensionEntry *extEntry); - -static void DGAClientStateChange (CallbackListPtr*, void *, void *); - -static ClientPtr DGAClients[MAXSCREENS]; - -unsigned char DGAReqCode = 0; -int DGAErrorBase; -int DGAEventBase; - -static int DGAGeneration = 0; -static int DGAClientPrivateIndex; -static int DGACallbackRefCount = 0; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} DGAPrivRec, *DGAPrivPtr; - -#define DGAPRIV(c) ((c)->devPrivates[DGAClientPrivateIndex].ptr) - -void -XFree86DGAExtensionInit(INITARGS) -{ - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension(XF86DGANAME, - XF86DGANumberEvents, - XF86DGANumberErrors, - ProcXDGADispatch, - SProcXDGADispatch, - XDGAResetProc, - StandardMinorOpcode))) { - int i; - - for(i = 0; i < MAXSCREENS; i++) - DGAClients[i] = NULL; - - DGAReqCode = (unsigned char)extEntry->base; - DGAErrorBase = extEntry->errorBase; - DGAEventBase = extEntry->eventBase; - for (i = KeyPress; i <= MotionNotify; i++) - SetCriticalEvent (DGAEventBase + i); - } - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (DGAGeneration != serverGeneration) { - DGAClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to - * our DGAPrivRec. - */ - if (!AllocateClientPrivate(DGAClientPrivateIndex, 0)) { - ErrorF("XFree86DGAExtensionInit: AllocateClientPrivate failed\n"); - return; - } - DGAGeneration = serverGeneration; - } -} - - - -static void -XDGAResetProc (ExtensionEntry *extEntry) -{ - DeleteCallback (&ClientStateCallback, DGAClientStateChange, NULL); - DGACallbackRefCount = 0; -} - - -static int -ProcXDGAQueryVersion(ClientPtr client) -{ - xXDGAQueryVersionReply rep; - - REQUEST_SIZE_MATCH(xXDGAQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XDGA_MAJOR_VERSION; - rep.minorVersion = XDGA_MINOR_VERSION; - - WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - - -static int -ProcXDGAOpenFramebuffer(ClientPtr client) -{ - REQUEST(xXDGAOpenFramebufferReq); - xXDGAOpenFramebufferReply rep; - char *deviceName; - int nameSize; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if(!DGAOpenFramebuffer(stuff->screen, &deviceName, - (unsigned char**)(&rep.mem1), - (int*)&rep.size, (int*)&rep.offset, (int*)&rep.extra)) - { - return BadAlloc; - } - - nameSize = deviceName ? (strlen(deviceName) + 1) : 0; - rep.length = (nameSize + 3) >> 2; - - WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *)&rep); - if(rep.length) - WriteToClient(client, nameSize, deviceName); - - return (client->noClientException); -} - - -static int -ProcXDGACloseFramebuffer(ClientPtr client) -{ - REQUEST(xXDGACloseFramebufferReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); - - DGACloseFramebuffer(stuff->screen); - - return (client->noClientException); -} - -static int -ProcXDGAQueryModes(ClientPtr client) -{ - int i, num, size; - REQUEST(xXDGAQueryModesReq); - xXDGAQueryModesReply rep; - xXDGAModeInfo info; - XDGAModePtr mode; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXDGAQueryModesReq); - rep.type = X_Reply; - rep.length = 0; - rep.number = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) { - rep.number = 0; - rep.length = 0; - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); - } - - if(!(num = DGAGetModes(stuff->screen))) { - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); - } - - if(!(mode = (XDGAModePtr)xalloc(num * sizeof(XDGAModeRec)))) - return BadAlloc; - - for(i = 0; i < num; i++) - DGAGetModeInfo(stuff->screen, mode + i, i + 1); - - size = num * sz_xXDGAModeInfo; - for(i = 0; i < num; i++) - size += (strlen(mode[i].name) + 4) & ~3L; /* plus NULL */ - - rep.number = num; - rep.length = size >> 2; - - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - - for(i = 0; i < num; i++) { - size = strlen(mode[i].name) + 1; - - info.byte_order = mode[i].byteOrder; - info.depth = mode[i].depth; - info.num = mode[i].num; - info.bpp = mode[i].bitsPerPixel; - info.name_size = (size + 3) & ~3L; - info.vsync_num = mode[i].VSync_num; - info.vsync_den = mode[i].VSync_den; - info.flags = mode[i].flags; - info.image_width = mode[i].imageWidth; - info.image_height = mode[i].imageHeight; - info.pixmap_width = mode[i].pixmapWidth; - info.pixmap_height = mode[i].pixmapHeight; - info.bytes_per_scanline = mode[i].bytesPerScanline; - info.red_mask = mode[i].red_mask; - info.green_mask = mode[i].green_mask; - info.blue_mask = mode[i].blue_mask; - info.visual_class = mode[i].visualClass; - info.viewport_width = mode[i].viewportWidth; - info.viewport_height = mode[i].viewportHeight; - info.viewport_xstep = mode[i].xViewportStep; - info.viewport_ystep = mode[i].yViewportStep; - info.viewport_xmax = mode[i].maxViewportX; - info.viewport_ymax = mode[i].maxViewportY; - info.viewport_flags = mode[i].viewportFlags; - info.reserved1 = mode[i].reserved1; - info.reserved2 = mode[i].reserved2; - - WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); - WriteToClient(client, size, mode[i].name); - } - - xfree(mode); - - return (client->noClientException); -} - - -static void -DGAClientStateChange ( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata -){ - NewClientInfoRec* pci = (NewClientInfoRec*) calldata; - ClientPtr client = NULL; - int i; - - for(i = 0; i < screenInfo.numScreens; i++) { - if(DGAClients[i] == pci->client) { - client = pci->client; - break; - } - } - - if(client && - ((client->clientState == ClientStateGone) || - (client->clientState == ClientStateRetained))) { - XDGAModeRec mode; - PixmapPtr pPix; - - DGAClients[i] = NULL; - DGASelectInput(i, NULL, 0); - DGASetMode(i, 0, &mode, &pPix); - - if(--DGACallbackRefCount == 0) - DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); - } -} - -static int -ProcXDGASetMode(ClientPtr client) -{ - REQUEST(xXDGASetModeReq); - xXDGASetModeReply rep; - XDGAModeRec mode; - xXDGAModeInfo info; - PixmapPtr pPix; - int size; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXDGASetModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.offset = 0; - rep.flags = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if(DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if(!stuff->mode) { - if(DGAClients[stuff->screen]) { - if(--DGACallbackRefCount == 0) - DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); - } - DGAClients[stuff->screen] = NULL; - DGASelectInput(stuff->screen, NULL, 0); - DGASetMode(stuff->screen, 0, &mode, &pPix); - WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); - return (client->noClientException); - } - - if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) - return BadValue; - - if(!DGAClients[stuff->screen]) { - if(DGACallbackRefCount++ == 0) - AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); - } - - DGAClients[stuff->screen] = client; - - if(pPix) { - if(AddResource(stuff->pid, RT_PIXMAP, (void *)(pPix))) { - pPix->drawable.id = (int)stuff->pid; - rep.flags = DGA_PIXMAP_AVAILABLE; - } - } - - size = strlen(mode.name) + 1; - - info.byte_order = mode.byteOrder; - info.depth = mode.depth; - info.num = mode.num; - info.bpp = mode.bitsPerPixel; - info.name_size = (size + 3) & ~3L; - info.vsync_num = mode.VSync_num; - info.vsync_den = mode.VSync_den; - info.flags = mode.flags; - info.image_width = mode.imageWidth; - info.image_height = mode.imageHeight; - info.pixmap_width = mode.pixmapWidth; - info.pixmap_height = mode.pixmapHeight; - info.bytes_per_scanline = mode.bytesPerScanline; - info.red_mask = mode.red_mask; - info.green_mask = mode.green_mask; - info.blue_mask = mode.blue_mask; - info.visual_class = mode.visualClass; - info.viewport_width = mode.viewportWidth; - info.viewport_height = mode.viewportHeight; - info.viewport_xstep = mode.xViewportStep; - info.viewport_ystep = mode.yViewportStep; - info.viewport_xmax = mode.maxViewportX; - info.viewport_ymax = mode.maxViewportY; - info.viewport_flags = mode.viewportFlags; - info.reserved1 = mode.reserved1; - info.reserved2 = mode.reserved2; - - rep.length = (sz_xXDGAModeInfo + info.name_size) >> 2; - - WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); - WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); - WriteToClient(client, size, mode.name); - - return (client->noClientException); -} - -static int -ProcXDGASetViewport(ClientPtr client) -{ - REQUEST(xXDGASetViewportReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASetViewportReq); - - DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags); - - return (client->noClientException); -} - -static int -ProcXDGAInstallColormap(ClientPtr client) -{ - ColormapPtr cmap; - REQUEST(xXDGAInstallColormapReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - - cmap = (ColormapPtr)LookupIDByType(stuff->cmap, RT_COLORMAP); - if (cmap) { - DGAInstallCmap(cmap); - return (client->noClientException); - } else { - client->errorValue = stuff->cmap; - return (BadColor); - } - - return (client->noClientException); -} - - -static int -ProcXDGASelectInput(ClientPtr client) -{ - REQUEST(xXDGASelectInputReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASelectInputReq); - - if(DGAClients[stuff->screen] == client) - DGASelectInput(stuff->screen, client, stuff->mask); - - return (client->noClientException); -} - - -static int -ProcXDGAFillRectangle(ClientPtr client) -{ - REQUEST(xXDGAFillRectangleReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); - - if(Success != DGAFillRect(stuff->screen, stuff->x, stuff->y, - stuff->width, stuff->height, stuff->color)) - return BadMatch; - - return (client->noClientException); -} - -static int -ProcXDGACopyArea(ClientPtr client) -{ - REQUEST(xXDGACopyAreaReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACopyAreaReq); - - if(Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, stuff->dsty)) - return BadMatch; - - return (client->noClientException); -} - - -static int -ProcXDGACopyTransparentArea(ClientPtr client) -{ - REQUEST(xXDGACopyTransparentAreaReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); - - if(Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key)) - return BadMatch; - - return (client->noClientException); -} - - -static int -ProcXDGAGetViewportStatus(ClientPtr client) -{ - REQUEST(xXDGAGetViewportStatusReq); - xXDGAGetViewportStatusReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - rep.status = DGAGetViewportStatus(stuff->screen); - - WriteToClient(client, sizeof(xXDGAGetViewportStatusReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXDGASync(ClientPtr client) -{ - REQUEST(xXDGASyncReq); - xXDGASyncReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASyncReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - DGASync(stuff->screen); - - WriteToClient(client, sizeof(xXDGASyncReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXDGASetClientVersion(ClientPtr client) -{ - REQUEST(xXDGASetClientVersionReq); - - DGAPrivPtr pPriv; - - REQUEST_SIZE_MATCH(xXDGASetClientVersionReq); - if ((pPriv = DGAPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(DGAPrivRec)); - /* XXX Need to look into freeing this */ - if (!pPriv) - return BadAlloc; - DGAPRIV(client) = pPriv; - } - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXDGAChangePixmapMode(ClientPtr client) -{ - REQUEST(xXDGAChangePixmapModeReq); - xXDGAChangePixmapModeReply rep; - int x, y; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - x = stuff->x; - y = stuff->y; - - if(!DGAChangePixmapMode(stuff->screen, &x, &y, stuff->flags)) - return BadMatch; - - rep.x = x; - rep.y = y; - WriteToClient(client, sizeof(xXDGAChangePixmapModeReply), (char *)&rep); - - return (client->noClientException); -} - - -static int -ProcXDGACreateColormap(ClientPtr client) -{ - REQUEST(xXDGACreateColormapReq); - int result; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACreateColormapReq); - - if(!stuff->mode) - return BadValue; - - result = DGACreateColormap(stuff->screen, client, stuff->id, - stuff->mode, stuff->alloc); - if(result != Success) - return result; - - return (client->noClientException); -} - - -static int -SProcXDGADispatch (ClientPtr client) -{ - return DGAErrorBase + XF86DGAClientNotLocal; -} - -#if 0 -#define DGA_REQ_DEBUG -#endif - -#ifdef DGA_REQ_DEBUG -static char *dgaMinor[] = { - "QueryVersion", - "GetVideoLL", - "DirectVideo", - "GetViewPortSize", - "SetViewPort", - "GetVidPage", - "SetVidPage", - "InstallColormap", - "QueryDirectVideo", - "ViewPortChanged", - "10", - "11", - "QueryModes", - "SetMode", - "SetViewport", - "InstallColormap", - "SelectInput", - "FillRectangle", - "CopyArea", - "CopyTransparentArea", - "GetViewportStatus", - "Sync", - "OpenFramebuffer", - "CloseFramebuffer", - "SetClientVersion", - "ChangePixmapMode", - "CreateColormap", -}; -#endif - -static int -ProcXDGADispatch (ClientPtr client) -{ - REQUEST(xReq); - - if (!LocalClient(client)) - return DGAErrorBase + XF86DGAClientNotLocal; - -#ifdef DGA_REQ_DEBUG - if (stuff->data <= X_XDGACreateColormap) - fprintf (stderr, " DGA %s\n", dgaMinor[stuff->data]); -#endif - - /* divert old protocol */ -#if 1 - if( (stuff->data <= X_XF86DGAViewPortChanged) && - (stuff->data >= X_XF86DGAGetVideoLL)) - return ProcXF86DGADispatch(client); -#endif - - switch (stuff->data){ - case X_XDGAQueryVersion: - return ProcXDGAQueryVersion(client); - case X_XDGAQueryModes: - return ProcXDGAQueryModes(client); - case X_XDGASetMode: - return ProcXDGASetMode(client); - case X_XDGAOpenFramebuffer: - return ProcXDGAOpenFramebuffer(client); - case X_XDGACloseFramebuffer: - return ProcXDGACloseFramebuffer(client); - case X_XDGASetViewport: - return ProcXDGASetViewport(client); - case X_XDGAInstallColormap: - return ProcXDGAInstallColormap(client); - case X_XDGASelectInput: - return ProcXDGASelectInput(client); - case X_XDGAFillRectangle: - return ProcXDGAFillRectangle(client); - case X_XDGACopyArea: - return ProcXDGACopyArea(client); - case X_XDGACopyTransparentArea: - return ProcXDGACopyTransparentArea(client); - case X_XDGAGetViewportStatus: - return ProcXDGAGetViewportStatus(client); - case X_XDGASync: - return ProcXDGASync(client); - case X_XDGASetClientVersion: - return ProcXDGASetClientVersion(client); - case X_XDGAChangePixmapMode: - return ProcXDGAChangePixmapMode(client); - case X_XDGACreateColormap: - return ProcXDGACreateColormap(client); - default: - return BadRequest; - } -} - -#ifdef EXTMODULE -void -XFree86DGARegister(INITARGS) -{ - XDGAEventBase = &DGAEventBase; -} -#endif diff --git a/nx-X11/programs/Xserver/Xext/xf86dgaext.h b/nx-X11/programs/Xserver/Xext/xf86dgaext.h deleted file mode 100644 index 16fc4c8b2..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dgaext.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86DGAEXT_H_ -#define _XF86DGAEXT_H_ - -extern DISPATCH_PROC(ProcXF86DGADispatch); - -#endif /* _XF86DGAEXT_H_ */ diff --git a/nx-X11/programs/Xserver/Xext/xf86misc.c b/nx-X11/programs/Xserver/Xext/xf86misc.c deleted file mode 100644 index ccf983fae..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86misc.c +++ /dev/null @@ -1,854 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.41 2003/11/17 22:20:27 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "inputstr.h" -#include "servermd.h" -#define _XF86MISC_SERVER_ -#undef _XF86MISC_SAVER_COMPAT_ -#include -#include "swaprep.h" -#include "xf86.h" -#include -#include "xf86miscproc.h" - -#if 0 -#include -#include "../os/osdep.h" -#include -#ifndef USL -#ifndef Lynx -#include -#else -#include -#endif -#endif /* USL */ -#endif - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#endif - -static int miscErrorBase; -static int MiscGeneration = 0; -static int MiscClientPrivateIndex; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} MiscPrivRec, *MiscPrivPtr; - -#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr) - -static void XF86MiscResetProc( - ExtensionEntry* /* extEntry */ -); - -static void -ClientVersion(ClientPtr client, int *major, int *minor) -{ - MiscPrivPtr pPriv; - - pPriv = MPRIV(client); - if (!pPriv) { - if (major) *major = 0; - if (minor) *minor = 0; - return; - } - - if (major) *major = pPriv->major; - if (minor) *minor = pPriv->minor; -} - -static DISPATCH_PROC(ProcXF86MiscDispatch); -static DISPATCH_PROC(ProcXF86MiscQueryVersion); -static DISPATCH_PROC(ProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(ProcXF86MiscSetClientVersion); -static DISPATCH_PROC(ProcXF86MiscGetFilePaths); -static DISPATCH_PROC(ProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(ProcXF86MiscGetSaver); -static DISPATCH_PROC(ProcXF86MiscSetSaver); -#endif -static DISPATCH_PROC(SProcXF86MiscDispatch); -static DISPATCH_PROC(SProcXF86MiscQueryVersion); -static DISPATCH_PROC(SProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(SProcXF86MiscSetClientVersion); -static DISPATCH_PROC(SProcXF86MiscGetFilePaths); -static DISPATCH_PROC(SProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(SProcXF86MiscGetSaver); -static DISPATCH_PROC(SProcXF86MiscSetSaver); -#endif - -#if 0 -static unsigned char XF86MiscReqCode = 0; -#endif - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -#define MISCERR(x) (miscErrorBase + x) - -void -XFree86MiscExtensionInit(void) -{ - ExtensionEntry* extEntry; - - DEBUG_P("XFree86MiscExtensionInit"); - - if (!xf86GetModInDevEnabled()) - return; - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (MiscGeneration != serverGeneration) { - MiscClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * MiscPrivRec. - */ - if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) { - ErrorF("XFree86MiscExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - MiscGeneration = serverGeneration; - } - - if ( - (extEntry = AddExtension(XF86MISCNAME, - XF86MiscNumberEvents, - XF86MiscNumberErrors, - ProcXF86MiscDispatch, - SProcXF86MiscDispatch, - XF86MiscResetProc, - StandardMinorOpcode))) { -#if 0 - XF86MiscReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } -} - -/*ARGSUSED*/ -static void -XF86MiscResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - xXF86MiscQueryVersionReply rep; - register int n; - - DEBUG_P("XF86MiscQueryVersion"); - - REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86MISC_MAJOR_VERSION; - rep.minorVersion = XF86MISC_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof(xXF86MiscQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -/* THESE HAVE NOT BEEN CONVERTED TO THE NEW DESIGN */ - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscSetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscSetSaverReq); - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; - - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - - if (stuff->suspendTime < 0) - return BadValue; - if (stuff->offTime < 0) - return BadValue; - - return (client->noClientException); -} - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscGetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscGetSaverReq); - xXF86MiscGetSaverReply rep; - register int n; - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; - - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.suspendTime = 0; - rep.offTime = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.suspendTime, n); - swapl(&rep.offTime, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetSaverReply), (char *)&rep); - return (client->noClientException); -} - -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -ProcXF86MiscGetMouseSettings(client) - register ClientPtr client; -{ - xXF86MiscGetMouseSettingsReply rep; - char *devname; - void * mouse; - register int n; - - DEBUG_P("XF86MiscGetMouseSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetMouseSettings(&mouse, &devname)) - return BadValue; - - rep.mousetype = MiscExtGetMouseValue(mouse, MISC_MSE_PROTO); - rep.baudrate = MiscExtGetMouseValue(mouse, MISC_MSE_BAUDRATE); - rep.samplerate = MiscExtGetMouseValue(mouse, MISC_MSE_SAMPLERATE); - rep.resolution = MiscExtGetMouseValue(mouse, MISC_MSE_RESOLUTION); - rep.buttons = MiscExtGetMouseValue(mouse, MISC_MSE_BUTTONS); - rep.emulate3buttons = MiscExtGetMouseValue(mouse, MISC_MSE_EM3BUTTONS); - rep.emulate3timeout = MiscExtGetMouseValue(mouse, MISC_MSE_EM3TIMEOUT); - rep.chordmiddle = MiscExtGetMouseValue(mouse, MISC_MSE_CHORDMIDDLE); - rep.flags = MiscExtGetMouseValue(mouse, MISC_MSE_FLAGS); - rep.devnamelen = (devname? strlen(devname): 0); - rep.length = (sizeof(xXF86MiscGetMouseSettingsReply) - - sizeof(xGenericReply) + ((rep.devnamelen+3) & ~3)) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.mousetype, n); - swapl(&rep.baudrate, n); - swapl(&rep.samplerate, n); - swapl(&rep.resolution, n); - swapl(&rep.buttons, n); - swapl(&rep.emulate3buttons, n); - swapl(&rep.emulate3timeout, n); - swapl(&rep.chordmiddle, n); - swapl(&rep.flags, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetMouseSettingsReply), (char *)&rep); - MiscExtDestroyStruct(mouse, MISC_POINTER); - - if (rep.devnamelen) - WriteToClient(client, rep.devnamelen, devname); - return (client->noClientException); -} - -static int -ProcXF86MiscGetKbdSettings(client) - register ClientPtr client; -{ - xXF86MiscGetKbdSettingsReply rep; - void * kbd; - register int n; - - DEBUG_P("XF86MiscGetKbdSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (!MiscExtGetKbdSettings(&kbd)) - return BadValue; - - rep.kbdtype = MiscExtGetKbdValue(kbd, MISC_KBD_TYPE); - rep.rate = MiscExtGetKbdValue(kbd, MISC_KBD_RATE); - rep.delay = MiscExtGetKbdValue(kbd, MISC_KBD_DELAY); - rep.servnumlock = MiscExtGetKbdValue(kbd, MISC_KBD_SERVNUMLOCK); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.kbdtype, n); - swapl(&rep.rate, n); - swapl(&rep.delay, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetKbdSettingsReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86MiscSetMouseSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - void * mouse; - char *devname = NULL; - int major, minor; - - REQUEST(xXF86MiscSetMouseSettingsReq); - - DEBUG_P("XF86MiscSetMouseSettings"); - - REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); - - ClientVersion(client, &major, &minor); - - if (xf86GetVerbosity() > 1) { - ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", - (int)stuff->mousetype, (int)stuff->baudrate, - (int)stuff->samplerate, stuff->chordmiddle); - ErrorF(" em3but: %d em3tim: %d res: %d flags: %ld\n", - stuff->emulate3buttons, (int)stuff->emulate3timeout, - (int)stuff->resolution, (unsigned long)stuff->flags); - } - - if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (void *) 0) - return BadAlloc; - - MiscExtSetMouseValue(mouse, MISC_MSE_PROTO, stuff->mousetype); - MiscExtSetMouseValue(mouse, MISC_MSE_BAUDRATE, stuff->baudrate); - MiscExtSetMouseValue(mouse, MISC_MSE_SAMPLERATE, stuff->samplerate); - MiscExtSetMouseValue(mouse, MISC_MSE_RESOLUTION, stuff->resolution); - MiscExtSetMouseValue(mouse, MISC_MSE_BUTTONS, stuff->buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3BUTTONS, stuff->emulate3buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3TIMEOUT, stuff->emulate3timeout); - MiscExtSetMouseValue(mouse, MISC_MSE_CHORDMIDDLE, stuff->chordmiddle); - MiscExtSetMouseValue(mouse, MISC_MSE_FLAGS, stuff->flags); - - if ((major > 0 || minor > 5) && stuff->devnamelen) { - int size = sizeof(xXF86MiscSetMouseSettingsReq) + stuff->devnamelen; - size = (size + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->devnamelen) { - if (!(devname = xalloc(stuff->devnamelen))) - return BadAlloc; - strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); - if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - device: %s\n",devname); - MiscExtSetMouseDevice(mouse, devname); - } - } - - ret = MiscExtApply(mouse, MISC_POINTER); - - if (devname) - xfree(devname); - - switch ((ret)) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADMSEPROTO: return MISCERR(XF86MiscBadMouseProtocol); - case MISC_RET_BADBAUDRATE: return MISCERR(XF86MiscBadMouseBaudRate); - case MISC_RET_BADFLAGS: return MISCERR(XF86MiscBadMouseFlags); - case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); - case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); - default: - ErrorF("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - Succeeded\n"); - return (client->noClientException); -} - -static int -ProcXF86MiscSetKbdSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - void * kbd; - REQUEST(xXF86MiscSetKbdSettingsReq); - - DEBUG_P("XF86MiscSetKbdSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - - if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", - (int)stuff->kbdtype, (int)stuff->rate, - (int)stuff->delay, stuff->servnumlock); - - if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (void *) 0) - return BadAlloc; - - MiscExtSetKbdValue(kbd, MISC_KBD_TYPE, stuff->kbdtype); - MiscExtSetKbdValue(kbd, MISC_KBD_RATE, stuff->rate); - MiscExtSetKbdValue(kbd, MISC_KBD_DELAY, stuff->delay); - MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK, stuff->servnumlock); - - switch ((ret = MiscExtApply(kbd, MISC_KEYBOARD))) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); - default: - ErrorF("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - Succeeded\n"); - return (client->noClientException); -} - -static int -ProcXF86MiscSetGrabKeysState(client) - register ClientPtr client; -{ - int n, status; - xXF86MiscSetGrabKeysStateReply rep; - REQUEST(xXF86MiscSetGrabKeysStateReq); - - DEBUG_P("XF86MiscSetGrabKeysState"); - - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - - if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { - if (xf86GetVerbosity() > 1) - ErrorF("SetGrabKeysState - %s\n", - stuff->enable ? "enabled" : "disabled"); - } - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, SIZEOF(xXF86MiscSetGrabKeysStateReply), (char *)&rep); - - return (client->noClientException); -} - -static int -ProcXF86MiscSetClientVersion(ClientPtr client) -{ - REQUEST(xXF86MiscSetClientVersionReq); - - MiscPrivPtr pPriv; - - DEBUG_P("XF86MiscSetClientVersion"); - - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - - if ((pPriv = MPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(MiscPrivRec)); - if (!pPriv) - return BadAlloc; - MPRIV(client) = pPriv; - } - ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXF86MiscGetFilePaths(client) - register ClientPtr client; -{ - xXF86MiscGetFilePathsReply rep; - const char *configfile; - const char *modulepath; - const char *logfile; - register int n; - - DEBUG_P("XF86MiscGetFilePaths"); - - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile)) - return BadValue; - - rep.configlen = (configfile? strlen(configfile): 0); - rep.modulelen = (modulepath? strlen(modulepath): 0); - rep.loglen = (logfile? strlen(logfile): 0); - rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) + - ((rep.configlen + 3) & ~3) + - ((rep.modulelen + 3) & ~3) + - ((rep.loglen + 3) & ~3) ) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.configlen, n); - swaps(&rep.modulelen, n); - swaps(&rep.loglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep); - - if (rep.configlen) - WriteToClient(client, rep.configlen, (char *)configfile); - if (rep.modulelen) - WriteToClient(client, rep.modulelen, (char *)modulepath); - if (rep.loglen) - WriteToClient(client, rep.loglen, (char *)logfile); - - return (client->noClientException); -} - -static int -ProcXF86MiscPassMessage(client) - register ClientPtr client; -{ - xXF86MiscPassMessageReply rep; - char *msgtype, *msgval, *retstr; - int retval, size; - register int n; - - REQUEST(xXF86MiscPassMessageReq); - - DEBUG_P("XF86MiscPassMessage"); - - REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq); - size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2; - size+= (stuff->typelen + 3) >> 2; - size+= (stuff->vallen + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->typelen) { - if (!(msgtype = xalloc(stuff->typelen))) - return BadAlloc; - strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen); - } else return BadValue; - if (stuff->vallen) { - if (!(msgval = xalloc(stuff->vallen))) { - xfree(msgtype); - return BadAlloc; - } - strncpy(msgval,(char*)((char*)&stuff[1] + ((stuff->typelen + 3) & ~3)), - stuff->vallen); - } else { - xfree(msgtype); - return BadValue; - } - - if ((retval = MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0) { - xfree(msgtype); - xfree(msgval); - return retval; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.mesglen = (retstr? strlen(retstr): 0); - rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) + - ((rep.mesglen + 3) & ~3)) >> 2; - rep.status = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.mesglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep); - - if (rep.mesglen) - WriteToClient(client, rep.mesglen, (char *)retstr); - - xfree(msgtype); - xfree(msgval); - - return (client->noClientException); -} - -static int -ProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return ProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return ProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return ProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return ProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return ProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return ProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return ProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return ProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return ProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return ProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return ProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - -static int -SProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscQueryVersionReq); - swaps(&stuff->length, n); - return ProcXF86MiscQueryVersion(client); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -static int -SProcXF86MiscGetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - swaps(&stuff->screen, n); - return ProcXF86MiscGetSaver(client); -} - -static int -SProcXF86MiscSetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - swaps(&stuff->screen, n); - swapl(&stuff->suspendTime, n); - swapl(&stuff->offTime, n); - return ProcXF86MiscSetSaver(client); -} -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -SProcXF86MiscGetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - return ProcXF86MiscGetMouseSettings(client); -} - -static int -SProcXF86MiscGetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - return ProcXF86MiscGetKbdSettings(client); -} - -static int -SProcXF86MiscSetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetMouseSettingsReq); - swapl(&stuff->mousetype, n); - swapl(&stuff->baudrate, n); - swapl(&stuff->samplerate, n); - swapl(&stuff->resolution, n); - swapl(&stuff->buttons, n); - swapl(&stuff->emulate3timeout, n); - swapl(&stuff->flags, n); - return ProcXF86MiscSetMouseSettings(client); -} - -static int -SProcXF86MiscSetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - swapl(&stuff->kbdtype, n); - swapl(&stuff->rate, n); - swapl(&stuff->delay, n); - return ProcXF86MiscSetKbdSettings(client); -} - -static int -SProcXF86MiscSetGrabKeysState(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->enable, n); - return ProcXF86MiscSetGrabKeysState(client); -} - -static int -SProcXF86MiscSetClientVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86MiscSetClientVersionReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - swaps(&stuff->major, n); - swaps(&stuff->minor, n); - return ProcXF86MiscSetClientVersion(client); -} - -static int -SProcXF86MiscGetFilePaths(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetFilePathsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - return ProcXF86MiscGetFilePaths(client); -} - -static int -SProcXF86MiscPassMessage(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscPassMessageReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscPassMessageReq); - return ProcXF86MiscPassMessage(client); -} - -static int -SProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return SProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return SProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return SProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return SProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return SProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return SProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return SProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return SProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return SProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return SProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return SProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86miscproc.h b/nx-X11/programs/Xserver/Xext/xf86miscproc.h deleted file mode 100644 index 5eefa02a3..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86miscproc.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.5 2002/11/20 04:04:58 dawes Exp $ */ - -/* Prototypes for Pointer/Keyboard functions that the DDX must provide */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86MISCPROC_H_ -#define _XF86MISCPROC_H_ - -typedef enum { - MISC_MSE_PROTO, - MISC_MSE_BAUDRATE, - MISC_MSE_SAMPLERATE, - MISC_MSE_RESOLUTION, - MISC_MSE_BUTTONS, - MISC_MSE_EM3BUTTONS, - MISC_MSE_EM3TIMEOUT, - MISC_MSE_CHORDMIDDLE, - MISC_MSE_FLAGS -} MiscExtMseValType; - -typedef enum { - MISC_KBD_TYPE, - MISC_KBD_RATE, - MISC_KBD_DELAY, - MISC_KBD_SERVNUMLOCK -} MiscExtKbdValType; - -typedef enum { - MISC_RET_SUCCESS, - MISC_RET_BADVAL, - MISC_RET_BADMSEPROTO, - MISC_RET_BADBAUDRATE, - MISC_RET_BADFLAGS, - MISC_RET_BADCOMBO, - MISC_RET_BADKBDTYPE, - MISC_RET_NOMODULE -} MiscExtReturn; - -typedef enum { - MISC_POINTER, - MISC_KEYBOARD -} MiscExtStructType; - -#define MISC_MSEFLAG_CLEARDTR 1 -#define MISC_MSEFLAG_CLEARRTS 2 -#define MISC_MSEFLAG_REOPEN 128 - -void XFree86MiscExtensionInit(void); - -Bool MiscExtGetMouseSettings(void **mouse, char **devname); -int MiscExtGetMouseValue(void * mouse, MiscExtMseValType valtype); -Bool MiscExtSetMouseValue(void * mouse, MiscExtMseValType valtype, int value); -Bool MiscExtGetKbdSettings(void **kbd); -int MiscExtGetKbdValue(void * kbd, MiscExtKbdValType valtype); -Bool MiscExtSetKbdValue(void * kbd, MiscExtKbdValType valtype, int value); -int MiscExtSetGrabKeysState(ClientPtr client, int enable); -void * MiscExtCreateStruct(MiscExtStructType mse_or_kbd); -void MiscExtDestroyStruct(void * structure, MiscExtStructType mse_or_kbd); -MiscExtReturn MiscExtApply(void * structure, MiscExtStructType mse_or_kbd); -Bool MiscExtSetMouseDevice(void * mouse, char* device); -Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath, - const char **logfile); -int MiscExtPassMessage(int scrn, const char *msgtype, const char *msgval, - char **retstr); - -#endif - diff --git a/nx-X11/programs/Xserver/Xext/xf86vmode.c b/nx-X11/programs/Xserver/Xext/xf86vmode.c deleted file mode 100644 index 0595343c9..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86vmode.c +++ /dev/null @@ -1,2206 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.58 2003/11/06 18:37:57 tsi Exp $ */ - -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.8 2005/07/16 03:49:58 kem Exp $ */ -/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86VIDMODE_SERVER_ -#include -#include "swaprep.h" -#include "xf86.h" -#include "vidmodeproc.h" - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#endif - -#define DEFAULT_XF86VIDMODE_VERBOSITY 3 - -static int VidModeErrorBase; -static int VidModeGeneration = 0; -static int VidModeClientPrivateIndex; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} VidModePrivRec, *VidModePrivPtr; - -#define VMPRIV(c) ((c)->devPrivates[VidModeClientPrivateIndex].ptr) - -static void XF86VidModeResetProc( - ExtensionEntry* /* extEntry */ -); - -static DISPATCH_PROC(ProcXF86VidModeDispatch); -static DISPATCH_PROC(ProcXF86VidModeGetAllModeLines); -static DISPATCH_PROC(ProcXF86VidModeGetModeLine); -static DISPATCH_PROC(ProcXF86VidModeGetMonitor); -static DISPATCH_PROC(ProcXF86VidModeLockModeSwitch); -static DISPATCH_PROC(ProcXF86VidModeAddModeLine); -static DISPATCH_PROC(ProcXF86VidModeDeleteModeLine); -static DISPATCH_PROC(ProcXF86VidModeModModeLine); -static DISPATCH_PROC(ProcXF86VidModeValidateModeLine); -static DISPATCH_PROC(ProcXF86VidModeQueryVersion); -static DISPATCH_PROC(ProcXF86VidModeSwitchMode); -static DISPATCH_PROC(ProcXF86VidModeSwitchToMode); -static DISPATCH_PROC(ProcXF86VidModeGetViewPort); -static DISPATCH_PROC(ProcXF86VidModeSetViewPort); -static DISPATCH_PROC(ProcXF86VidModeGetDotClocks); -static DISPATCH_PROC(ProcXF86VidModeSetGamma); -static DISPATCH_PROC(ProcXF86VidModeGetGamma); -static DISPATCH_PROC(ProcXF86VidModeSetClientVersion); -static DISPATCH_PROC(ProcXF86VidModeGetGammaRamp); -static DISPATCH_PROC(ProcXF86VidModeSetGammaRamp); -static DISPATCH_PROC(ProcXF86VidModeGetGammaRampSize); -static DISPATCH_PROC(SProcXF86VidModeDispatch); -static DISPATCH_PROC(SProcXF86VidModeGetAllModeLines); -static DISPATCH_PROC(SProcXF86VidModeGetModeLine); -static DISPATCH_PROC(SProcXF86VidModeGetMonitor); -static DISPATCH_PROC(SProcXF86VidModeLockModeSwitch); -static DISPATCH_PROC(SProcXF86VidModeAddModeLine); -static DISPATCH_PROC(SProcXF86VidModeDeleteModeLine); -static DISPATCH_PROC(SProcXF86VidModeModModeLine); -static DISPATCH_PROC(SProcXF86VidModeValidateModeLine); -static DISPATCH_PROC(SProcXF86VidModeQueryVersion); -static DISPATCH_PROC(SProcXF86VidModeSwitchMode); -static DISPATCH_PROC(SProcXF86VidModeSwitchToMode); -static DISPATCH_PROC(SProcXF86VidModeGetViewPort); -static DISPATCH_PROC(SProcXF86VidModeSetViewPort); -static DISPATCH_PROC(SProcXF86VidModeGetDotClocks); -static DISPATCH_PROC(SProcXF86VidModeSetGamma); -static DISPATCH_PROC(SProcXF86VidModeGetGamma); -static DISPATCH_PROC(SProcXF86VidModeSetClientVersion); -static DISPATCH_PROC(SProcXF86VidModeGetGammaRamp); -static DISPATCH_PROC(SProcXF86VidModeSetGammaRamp); -static DISPATCH_PROC(SProcXF86VidModeGetGammaRampSize); - -#if 0 -static unsigned char XF86VidModeReqCode = 0; -#endif - -/* The XF86VIDMODE_EVENTS code is far from complete */ - -#ifdef XF86VIDMODE_EVENTS -static int XF86VidModeEventBase = 0; - -static void SXF86VidModeNotifyEvent(); - xXF86VidModeNotifyEvent * /* from */, - xXF86VidModeNotifyEvent * /* to */ -); - -extern WindowPtr *WindowTable; - -static RESTYPE EventType; /* resource type for event masks */ - -typedef struct _XF86VidModeEvent *XF86VidModeEventPtr; - -typedef struct _XF86VidModeEvent { - XF86VidModeEventPtr next; - ClientPtr client; - ScreenPtr screen; - XID resource; - CARD32 mask; -} XF86VidModeEventRec; - -static int XF86VidModeFreeEvents(); - -typedef struct _XF86VidModeScreenPrivate { - XF86VidModeEventPtr events; - Bool hasWindow; -} XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; - -static int ScreenPrivateIndex; - -#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr) -#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (void *) v); -#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s) - -#define New(t) (xalloc (sizeof (t))) -#endif - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -void -XFree86VidModeExtensionInit(void) -{ - ExtensionEntry* extEntry; - ScreenPtr pScreen; - int i; - Bool enabled = FALSE; - - DEBUG_P("XFree86VidModeExtensionInit"); - -#ifdef XF86VIDMODE_EVENTS - EventType = CreateNewResourceType(XF86VidModeFreeEvents); - ScreenPrivateIndex = AllocateScreenPrivateIndex (); -#endif - - for(i = 0; i < screenInfo.numScreens; i++) { - pScreen = screenInfo.screens[i]; - if (VidModeExtensionInit(pScreen)) - enabled = TRUE; -#ifdef XF86VIDMODE_EVENTS - SetScreenPrivate (pScreen, NULL); -#endif - } - /* This means that the DDX doesn't want the vidmode extension enabled */ - if (!enabled) - return; - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (VidModeGeneration != serverGeneration) { - VidModeClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * VidModePrivRec. - */ - if (!AllocateClientPrivate(VidModeClientPrivateIndex, 0)) { - ErrorF("XFree86VidModeExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - VidModeGeneration = serverGeneration; - } - - if ( -#ifdef XF86VIDMODE_EVENTS - EventType && ScreenPrivateIndex != -1 && -#endif - (extEntry = AddExtension(XF86VIDMODENAME, - XF86VidModeNumberEvents, - XF86VidModeNumberErrors, - ProcXF86VidModeDispatch, - SProcXF86VidModeDispatch, - XF86VidModeResetProc, - StandardMinorOpcode))) { -#if 0 - XF86VidModeReqCode = (unsigned char)extEntry->base; -#endif - VidModeErrorBase = extEntry->errorBase; -#ifdef XF86VIDMODE_EVENTS - XF86VidModeEventBase = extEntry->eventBase; - EventSwapVector[XF86VidModeEventBase] = (EventSwapPtr)SXF86VidModeNotifyEvent; -#endif - } -} - -/*ARGSUSED*/ -static void -XF86VidModeResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ClientMajorVersion(ClientPtr client) -{ - VidModePrivPtr pPriv; - - pPriv = VMPRIV(client); - if (!pPriv) - return 0; - else - return pPriv->major; -} - -#ifdef XF86VIDMODE_EVENTS -static void -CheckScreenPrivate (pScreen) - ScreenPtr pScreen; -{ - SetupScreen (pScreen); - - if (!pPriv) - return; - if (!pPriv->events && !pPriv->hasWindow) { - xfree (pPriv); - SetScreenPrivate (pScreen, NULL); - } -} - -static XF86VidModeScreenPrivatePtr -MakeScreenPrivate (pScreen) - ScreenPtr pScreen; -{ - SetupScreen (pScreen); - - if (pPriv) - return pPriv; - pPriv = New (XF86VidModeScreenPrivateRec); - if (!pPriv) - return 0; - pPriv->events = 0; - pPriv->hasWindow = FALSE; - SetScreenPrivate (pScreen, pPriv); - return pPriv; -} - -static unsigned long -getEventMask (ScreenPtr pScreen, ClientPtr client) -{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv; - - if (!pPriv) - return 0; - for (pEv = pPriv->events; pEv; pEv = pEv->next) - if (pEv->client == client) - return pEv->mask; - return 0; -} - -static Bool -setEventMask (ScreenPtr pScreen, ClientPtr client, unsigned long mask) -{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv, *pPrev; - - if (getEventMask (pScreen, client) == mask) - return TRUE; - if (!pPriv) { - pPriv = MakeScreenPrivate (pScreen); - if (!pPriv) - return FALSE; - } - for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv->client == client) - break; - if (mask == 0) { - *pPrev = pEv->next; - xfree (pEv); - CheckScreenPrivate (pScreen); - } else { - if (!pEv) { - pEv = New (ScreenSaverEventRec); - if (!pEv) { - CheckScreenPrivate (pScreen); - return FALSE; - } - *pPrev = pEv; - pEv->next = NULL; - pEv->client = client; - pEv->screen = pScreen; - pEv->resource = FakeClientID (client->index); - } - pEv->mask = mask; - } - return TRUE; -} - -static int -XF86VidModeFreeEvents(void * value, XID id) -{ - XF86VidModeEventPtr pOld = (XF86VidModeEventPtr)value; - ScreenPtr pScreen = pOld->screen; - SetupScreen (pScreen); - XF86VidModeEventPtr pEv, *pPrev; - - if (!pPriv) - return TRUE; - for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv == pOld) - break; - if (!pEv) - return TRUE; - *pPrev = pEv->next; - xfree (pEv); - CheckScreenPrivate (pScreen); - return TRUE; -} - -static void -SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) -{ - XF86VidModeScreenPrivatePtr pPriv; - XF86VidModeEventPtr pEv; - unsigned long mask; - xXF86VidModeNotifyEvent ev; - ClientPtr client; - int kind; - - UpdateCurrentTimeIf (); - mask = XF86VidModeNotifyMask; - pScreen = screenInfo.screens[pScreen->myNum]; - pPriv = GetScreenPrivate(pScreen); - if (!pPriv) - return; - kind = XF86VidModeModeChange; - for (pEv = pPriv->events; pEv; pEv = pEv->next) - { - client = pEv->client; - if (client->clientGone) - continue; - if (!(pEv->mask & mask)) - continue; - ev.type = XF86VidModeNotify + XF86VidModeEventBase; - ev.state = state; - ev.sequenceNumber = client->sequence; - ev.timestamp = currentTime.milliseconds; - ev.root = WindowTable[pScreen->myNum]->drawable.id; - ev.kind = kind; - ev.forced = forced; - WriteEventsToClient (client, 1, (xEvent *) &ev); - } -} - -static void -SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent *from, - xXF86VidModeNotifyEvent *to) -{ - to->type = from->type; - to->state = from->state; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->timestamp, to->timestamp); - cpswapl (from->root, to->root); - to->kind = from->kind; - to->forced = from->forced; -} -#endif - -static int -ProcXF86VidModeQueryVersion(ClientPtr client) -{ - xXF86VidModeQueryVersionReply rep; - register int n; - - DEBUG_P("XF86VidModeQueryVersion"); - - REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86VIDMODE_MAJOR_VERSION; - rep.minorVersion = XF86VIDMODE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeGetModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeGetModeLineReq); - xXF86VidModeGetModeLineReply rep; - xXF86OldVidModeGetModeLineReply oldrep; - void * mode; - register int n; - int dotClock; - int ver; - - DEBUG_P("XF86VidModeGetModeline"); - - ver = ClientMajorVersion(client); - REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); - rep.type = X_Reply; - if (ver < 2) { - rep.length = (SIZEOF(xXF86OldVidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - } else { - rep.length = (SIZEOF(xXF86VidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - } - rep.sequenceNumber = client->sequence; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - rep.dotclock = dotClock; - rep.hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY); - rep.hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART); - rep.hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND); - rep.htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL); - rep.hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW); - rep.vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY); - rep.vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART); - rep.vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND); - rep.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL); - rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("GetModeLine - scrn: %d clock: %ld\n", - stuff->screen, (unsigned long)rep.dotclock); - ErrorF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", - rep.hdisplay, rep.hsyncstart, - rep.hsyncend, rep.htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - rep.vdisplay, rep.vsyncstart, rep.vsyncend, - rep.vtotal, (unsigned long)rep.flags); - } - - /* - * Older servers sometimes had server privates that the VidMode - * extention made available. So to be compatiable pretend that - * there are no server privates to pass to the client - */ - rep.privsize = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.dotclock, n); - swaps(&rep.hdisplay, n); - swaps(&rep.hsyncstart, n); - swaps(&rep.hsyncend, n); - swaps(&rep.htotal, n); - swaps(&rep.hskew, n); - swaps(&rep.vdisplay, n); - swaps(&rep.vsyncstart, n); - swaps(&rep.vsyncend, n); - swaps(&rep.vtotal, n); - swapl(&rep.flags, n); - swapl(&rep.privsize, n); - } - if (ver < 2) { - oldrep.type = rep.type; - oldrep.sequenceNumber = rep.sequenceNumber; - oldrep.length = rep.length; - oldrep.dotclock = rep.dotclock; - oldrep.hdisplay = rep.hdisplay; - oldrep.hsyncstart = rep.hsyncstart; - oldrep.hsyncend = rep.hsyncend; - oldrep.htotal = rep.htotal; - oldrep.vdisplay = rep.vdisplay; - oldrep.vsyncstart = rep.vsyncstart; - oldrep.vsyncend = rep.vsyncend; - oldrep.vtotal = rep.vtotal; - oldrep.flags = rep.flags; - oldrep.privsize = rep.privsize; - WriteToClient(client, sizeof(xXF86OldVidModeGetModeLineReply), - (char *)&oldrep); - } else { - WriteToClient(client, sizeof(xXF86VidModeGetModeLineReply), - (char *)&rep); - } - return (client->noClientException); -} - -static int -ProcXF86VidModeGetAllModeLines(ClientPtr client) -{ - REQUEST(xXF86VidModeGetAllModeLinesReq); - xXF86VidModeGetAllModeLinesReply rep; - xXF86VidModeModeInfo mdinf; - xXF86OldVidModeModeInfo oldmdinf; - void * mode; - int modecount, dotClock; - register int n; - int ver; - - DEBUG_P("XF86VidModeGetAllModelines"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - ver = ClientMajorVersion(client); - - modecount = VidModeGetNumOfModes(stuff->screen); - if (modecount < 1) - return (VidModeErrorBase + XF86VidModeExtensionDisabled); - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - rep.type = X_Reply; - rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - - SIZEOF(xGenericReply); - if (ver < 2) - rep.length += modecount * sizeof(xXF86OldVidModeModeInfo); - else - rep.length += modecount * sizeof(xXF86VidModeModeInfo); - rep.length >>= 2; - rep.sequenceNumber = client->sequence; - rep.modecount = modecount; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.modecount, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), (char *)&rep); - - do { - mdinf.dotclock = dotClock; - mdinf.hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY); - mdinf.hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART); - mdinf.hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND); - mdinf.htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL); - mdinf.hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW); - mdinf.vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY); - mdinf.vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART); - mdinf.vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND); - mdinf.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL); - mdinf.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS); - mdinf.privsize = 0; - if (client->swapped) { - swapl(&mdinf.dotclock, n); - swaps(&mdinf.hdisplay, n); - swaps(&mdinf.hsyncstart, n); - swaps(&mdinf.hsyncend, n); - swaps(&mdinf.htotal, n); - swaps(&mdinf.hskew, n); - swaps(&mdinf.vdisplay, n); - swaps(&mdinf.vsyncstart, n); - swaps(&mdinf.vsyncend, n); - swaps(&mdinf.vtotal, n); - swapl(&mdinf.flags, n); - swapl(&mdinf.privsize, n); - } - if (ver < 2) { - oldmdinf.dotclock = mdinf.dotclock; - oldmdinf.hdisplay = mdinf.hdisplay; - oldmdinf.hsyncstart = mdinf.hsyncstart; - oldmdinf.hsyncend = mdinf.hsyncend; - oldmdinf.htotal = mdinf.htotal; - oldmdinf.vdisplay = mdinf.vdisplay; - oldmdinf.vsyncstart = mdinf.vsyncstart; - oldmdinf.vsyncend = mdinf.vsyncend; - oldmdinf.vtotal = mdinf.vtotal; - oldmdinf.flags = mdinf.flags; - oldmdinf.privsize = mdinf.privsize; - WriteToClient(client, sizeof(xXF86OldVidModeModeInfo), - (char *)&oldmdinf); - } else { - WriteToClient(client, sizeof(xXF86VidModeModeInfo), (char *)&mdinf); - } - - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return (client->noClientException); -} - -#define MODEMATCH(mode,stuff) \ - (VidModeGetModeValue(mode, VIDMODE_H_DISPLAY) == stuff->hdisplay \ - && VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART) == stuff->hsyncstart \ - && VidModeGetModeValue(mode, VIDMODE_H_SYNCEND) == stuff->hsyncend \ - && VidModeGetModeValue(mode, VIDMODE_H_TOTAL) == stuff->htotal \ - && VidModeGetModeValue(mode, VIDMODE_V_DISPLAY) == stuff->vdisplay \ - && VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART) == stuff->vsyncstart \ - && VidModeGetModeValue(mode, VIDMODE_V_SYNCEND) == stuff->vsyncend \ - && VidModeGetModeValue(mode, VIDMODE_V_TOTAL) == stuff->vtotal \ - && VidModeGetModeValue(mode, VIDMODE_FLAGS) == stuff->flags ) - -static int -ProcXF86VidModeAddModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeAddModeLineReq); - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *)client->requestBuffer; - xXF86VidModeAddModeLineReq newstuff; - void * mode; - int len; - int dotClock; - int ver; - - DEBUG_P("XF86VidModeAddModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - stuff->after_dotclock = oldstuff->after_dotclock; - stuff->after_hdisplay = oldstuff->after_hdisplay; - stuff->after_hsyncstart = oldstuff->after_hsyncstart; - stuff->after_hsyncend = oldstuff->after_hsyncend; - stuff->after_htotal = oldstuff->after_htotal; - stuff->after_hskew = 0; - stuff->after_vdisplay = oldstuff->after_vdisplay; - stuff->after_vsyncstart = oldstuff->after_vsyncstart; - stuff->after_vsyncend = oldstuff->after_vsyncend; - stuff->after_vtotal = oldstuff->after_vtotal; - stuff->after_flags = oldstuff->after_flags; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("AddModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - ErrorF(" after - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->after_dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->after_hdisplay, stuff->after_hsyncstart, - stuff->after_hsyncend, stuff->after_htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->after_vdisplay, stuff->after_vsyncstart, - stuff->after_vsyncend, stuff->after_vtotal, - (unsigned long)stuff->after_flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeAddModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeAddModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - return BadValue; - - if (stuff->after_hsyncstart < stuff->after_hdisplay || - stuff->after_hsyncend < stuff->after_hsyncstart || - stuff->after_htotal < stuff->after_hsyncend || - stuff->after_vsyncstart < stuff->after_vdisplay || - stuff->after_vsyncend < stuff->after_vsyncstart || - stuff->after_vtotal < stuff->after_vsyncend) - return BadValue; - - if (stuff->after_htotal != 0 || stuff->after_vtotal != 0) { - Bool found = FALSE; - if (VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) { - do { - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) - == dotClock) && MODEMATCH(mode, stuff)) { - found = TRUE; - break; - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - } - if (!found) - return BadValue; - } - - - mode = VidModeCreateMode(); - if (mode == NULL) - return BadValue; - - VidModeSetModeValue(mode, VIDMODE_CLOCK, stuff->dotclock); - VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); - - if (stuff->privsize) - ErrorF("AddModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - switch (VidModeCheckModeForMonitor(stuff->screen, mode)) { - case MODE_OK: - break; - case MODE_HSYNC: - case MODE_H_ILLEGAL: - xfree(mode); - return VidModeErrorBase + XF86VidModeBadHTimings; - case MODE_VSYNC: - case MODE_V_ILLEGAL: - xfree(mode); - return VidModeErrorBase + XF86VidModeBadVTimings; - default: - xfree(mode); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - /* Check that the driver is happy with the mode */ - if (VidModeCheckModeForDriver(stuff->screen, mode) != MODE_OK) { - xfree(mode); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - VidModeSetCrtcForMode(stuff->screen, mode); - - VidModeAddModeline(stuff->screen, mode); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("AddModeLine - Succeeded\n"); - return client->noClientException; -} - -static int -ProcXF86VidModeDeleteModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeDeleteModeLineReq); - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer; - xXF86VidModeDeleteModeLineReq newstuff; - void * mode; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeDeleteModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("DeleteModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeDeleteModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2); - } - if (len != stuff->privsize) { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, " - "len = %d, length = %d\n", - (unsigned long)client->req_len, - (int)sizeof(xXF86VidModeDeleteModeLineReq)>>2, - (unsigned long)stuff->privsize, len, stuff->length); - } - return BadLength; - } - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) - return BadValue; - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - do { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) { - VidModeDeleteModeline(stuff->screen, mode); - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("DeleteModeLine - Succeeded\n"); - return(client->noClientException); - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return BadValue; -} - -static int -ProcXF86VidModeModModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeModModeLineReq); - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *)client->requestBuffer; - xXF86VidModeModModeLineReq newstuff; - void * mode, modetmp; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeModModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2 ) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n", - (int)stuff->screen, stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeModModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeModModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - return BadValue; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - modetmp = VidModeCreateMode(); - VidModeCopyMode(mode, modetmp); - - VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); - - if (stuff->privsize) - ErrorF("ModModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - switch (VidModeCheckModeForMonitor(stuff->screen, modetmp)) { - case MODE_OK: - break; - case MODE_HSYNC: - case MODE_H_ILLEGAL: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeBadHTimings; - case MODE_VSYNC: - case MODE_V_ILLEGAL: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeBadVTimings; - default: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - /* Check that the driver is happy with the mode */ - if (VidModeCheckModeForDriver(stuff->screen, modetmp) != MODE_OK) { - xfree(modetmp); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - xfree(modetmp); - - VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); - - VidModeSetCrtcForMode(stuff->screen, mode); - VidModeSwitchMode(stuff->screen, mode); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("ModModeLine - Succeeded\n"); - return(client->noClientException); -} - -static int -ProcXF86VidModeValidateModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeValidateModeLineReq); - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *)client->requestBuffer; - xXF86VidModeValidateModeLineReq newstuff; - xXF86VidModeValidateModeLineReply rep; - void * mode, modetmp = NULL; - int len, status, dotClock; - int ver; - - DEBUG_P("XF86VidModeValidateModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ValidateModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); - len = client->req_len - - (sizeof(xXF86OldVidModeValidateModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeValidateModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - status = MODE_OK; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - { - status = MODE_BAD; - goto status_reply; - } - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - modetmp = VidModeCreateMode(); - VidModeCopyMode(mode, modetmp); - - VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); - if (stuff->privsize) - ErrorF("ValidateModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - if ((status = VidModeCheckModeForMonitor(stuff->screen, modetmp)) != MODE_OK) - goto status_reply; - - /* Check that the driver is happy with the mode */ - status = VidModeCheckModeForDriver(stuff->screen, modetmp); - -status_reply: - if(modetmp) - xfree(modetmp); - - rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeValidateModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - rep.sequenceNumber = client->sequence; - rep.status = status; - if (client->swapped) { - register int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep); - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status); - return(client->noClientException); -} - -static int -ProcXF86VidModeSwitchMode(ClientPtr client) -{ - REQUEST(xXF86VidModeSwitchModeReq); - - DEBUG_P("XF86VidModeSwitchMode"); - - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - VidModeZoomViewport(stuff->screen, (short)stuff->zoom); - - return (client->noClientException); -} - -static int -ProcXF86VidModeSwitchToMode(ClientPtr client) -{ - REQUEST(xXF86VidModeSwitchToModeReq); - xXF86OldVidModeSwitchToModeReq *oldstuff = - (xXF86OldVidModeSwitchToModeReq *)client->requestBuffer; - xXF86VidModeSwitchToModeReq newstuff; - void * mode; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeSwitchToMode"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("SwitchToMode - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86OldVidModeSwitchToModeReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86VidModeSwitchToModeReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) - && MODEMATCH(mode, stuff)) - return (client->noClientException); - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - do { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) { - - if (!VidModeSwitchMode(stuff->screen, mode)) - return BadValue; - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("SwitchToMode - Succeeded\n"); - return(client->noClientException); - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return BadValue; -} - -static int -ProcXF86VidModeLockModeSwitch(ClientPtr client) -{ - REQUEST(xXF86VidModeLockModeSwitchReq); - - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); - - DEBUG_P("XF86VidModeLockModeSwitch"); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeLockZoom(stuff->screen, (short)stuff->lock)) - return VidModeErrorBase + XF86VidModeZoomLocked; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetMonitor(ClientPtr client) -{ - REQUEST(xXF86VidModeGetMonitorReq); - xXF86VidModeGetMonitorReply rep; - register int n; - CARD32 *hsyncdata, *vsyncdata; - int i, nHsync, nVrefresh; - void * monitor; - - DEBUG_P("XF86VidModeGetMonitor"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetMonitor(stuff->screen, &monitor)) - return BadValue; - - nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i; - nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i; - - rep.type = X_Reply; - if ((char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr) - rep.vendorLength = strlen((char *)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VENDOR, 0)).ptr); - else - rep.vendorLength = 0; - if ((char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr) - rep.modelLength = strlen((char *)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_MODEL, 0)).ptr); - else - rep.modelLength = 0; - rep.length = (SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + - (nHsync + nVrefresh) * sizeof(CARD32) + - ((rep.vendorLength + 3) & ~3) + - ((rep.modelLength + 3) & ~3)) >> 2; - rep.sequenceNumber = client->sequence; - rep.nhsync = nHsync; - rep.nvsync = nVrefresh; - hsyncdata = ALLOCATE_LOCAL(nHsync * sizeof(CARD32)); - if (!hsyncdata) { - return BadAlloc; - } - - vsyncdata = ALLOCATE_LOCAL(nVrefresh * sizeof(CARD32)); - if (!vsyncdata) { - DEALLOCATE_LOCAL(hsyncdata); - return BadAlloc; - } - - for (i = 0; i < nHsync; i++) { - hsyncdata[i] = (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_HSYNC_LO, i)).f | - (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_HSYNC_HI, i)).f << 16; - } - for (i = 0; i < nVrefresh; i++) { - vsyncdata[i] = (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VREFRESH_LO, i)).f | - (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VREFRESH_HI, i)).f << 16; - } - - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), (char *)&rep); - client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; - WriteSwappedDataToClient(client, nHsync * sizeof(CARD32), - hsyncdata); - WriteSwappedDataToClient(client, nVrefresh * sizeof(CARD32), - vsyncdata); - if (rep.vendorLength) - WriteToClient(client, rep.vendorLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr); - if (rep.modelLength) - WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr); - - DEALLOCATE_LOCAL(hsyncdata); - DEALLOCATE_LOCAL(vsyncdata); - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetViewPort(ClientPtr client) -{ - REQUEST(xXF86VidModeGetViewPortReq); - xXF86VidModeGetViewPortReply rep; - int x, y, n; - - DEBUG_P("XF86VidModeGetViewPort"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - VidModeGetViewPort(stuff->screen, &x, &y); - rep.x = x; - rep.y = y; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.x, n); - swapl(&rep.y, n); - } - WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetViewPort(ClientPtr client) -{ - REQUEST(xXF86VidModeSetViewPortReq); - - DEBUG_P("XF86VidModeSetViewPort"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeSetViewPort(stuff->screen, stuff->x, stuff->y)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetDotClocks(ClientPtr client) -{ - REQUEST(xXF86VidModeGetDotClocksReq); - xXF86VidModeGetDotClocksReply rep; - register int n; - int numClocks; - CARD32 dotclock; - int *Clocks = NULL; - Bool ClockProg; - - DEBUG_P("XF86VidModeGetDotClocks"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); - - rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeGetDotClocksReply) - - SIZEOF(xGenericReply) + numClocks) >> 2; - rep.sequenceNumber = client->sequence; - rep.clocks = numClocks; - rep.maxclocks = MAXCLOCKS; - rep.flags = 0; - - if (!ClockProg) { - Clocks = ALLOCATE_LOCAL(numClocks * sizeof(int)); - if (!Clocks) - return BadValue; - if (!VidModeGetClocks(stuff->screen, Clocks)) { - DEALLOCATE_LOCAL(Clocks); - return BadValue; - } - } - - if (ClockProg) { - rep.flags |= CLKFLAG_PROGRAMABLE; - } - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.clocks, n); - swapl(&rep.maxclocks, n); - swapl(&rep.flags, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), (char *)&rep); - if (!ClockProg) { - for (n = 0; n < numClocks; n++) { - dotclock = *Clocks++; - if (client->swapped) { - WriteSwappedDataToClient(client, 4, (char *)&dotclock); - } else { - WriteToClient(client, 4, (char *)&dotclock); - } - } - } - - DEALLOCATE_LOCAL(Clocks); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetGamma(ClientPtr client) -{ - REQUEST(xXF86VidModeSetGammaReq); - - DEBUG_P("XF86VidModeSetGamma"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeSetGamma(stuff->screen, ((float)stuff->red)/10000., - ((float)stuff->green)/10000., ((float)stuff->blue)/10000.)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetGamma(ClientPtr client) -{ - REQUEST(xXF86VidModeGetGammaReq); - xXF86VidModeGetGammaReply rep; - register int n; - float red, green, blue; - - DEBUG_P("XF86VidModeGetGamma"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (!VidModeGetGamma(stuff->screen, &red, &green, &blue)) - return BadValue; - rep.red = (CARD32)(red * 10000.); - rep.green = (CARD32)(green * 10000.); - rep.blue = (CARD32)(blue * 10000.); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.red, n); - swapl(&rep.green, n); - swapl(&rep.blue, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetGammaRamp(ClientPtr client) -{ - CARD16 *r, *g, *b; - int length; - REQUEST(xXF86VidModeSetGammaRampReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) - return BadValue; - - length = (stuff->size + 1) & ~1; - - REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); - - r = (CARD16*)&stuff[1]; - g = r + length; - b = g + length; - - if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetGammaRamp(ClientPtr client) -{ - CARD16 *ramp = NULL; - int n, length, i; - xXF86VidModeGetGammaRampReply rep; - REQUEST(xXF86VidModeGetGammaRampReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - - length = (stuff->size + 1) & ~1; - - if(stuff->size) { - if(!(ramp = xalloc(length * 3 * sizeof(CARD16)))) - return BadAlloc; - - if (!VidModeGetGammaRamp(stuff->screen, stuff->size, - ramp, ramp + length, ramp + (length * 2))) - return BadValue; - } - - rep.type = X_Reply; - rep.length = (length >> 1) * 3; - rep.sequenceNumber = client->sequence; - rep.size = stuff->size; - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.size, n); - for(i = 0; i < length * 3; i++) - swaps(&ramp[i],n); - } - WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); - - if(stuff->size) { - WriteToClient(client, rep.length << 2, (char*)ramp); - xfree(ramp); - } - - return (client->noClientException); -} - - -static int -ProcXF86VidModeGetGammaRampSize(ClientPtr client) -{ - xXF86VidModeGetGammaRampSizeReply rep; - int n; - REQUEST(xXF86VidModeGetGammaRampSizeReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.size = VidModeGetGammaRampSize(stuff->screen); - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.size, n); - } - WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep); - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetPermissions(ClientPtr client) -{ - xXF86VidModeGetPermissionsReply rep; - int n; - REQUEST(xXF86VidModeGetPermissionsReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.permissions = XF86VM_READ_PERMISSION; - if (xf86GetVidModeEnabled() && - (xf86GetVidModeAllowNonLocal() || LocalClient (client))) { - rep.permissions |= XF86VM_WRITE_PERMISSION; - } - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.permissions, n); - } - WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep); - - return (client->noClientException); -} - - -static int -ProcXF86VidModeSetClientVersion(ClientPtr client) -{ - REQUEST(xXF86VidModeSetClientVersionReq); - - VidModePrivPtr pPriv; - - DEBUG_P("XF86VidModeSetClientVersion"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - - if ((pPriv = VMPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(VidModePrivRec)); - if (!pPriv) - return BadAlloc; - VMPRIV(client) = pPriv; - } - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXF86VidModeDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86VidModeQueryVersion: - return ProcXF86VidModeQueryVersion(client); - case X_XF86VidModeGetModeLine: - return ProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetMonitor: - return ProcXF86VidModeGetMonitor(client); - case X_XF86VidModeGetAllModeLines: - return ProcXF86VidModeGetAllModeLines(client); - case X_XF86VidModeValidateModeLine: - return ProcXF86VidModeValidateModeLine(client); - case X_XF86VidModeGetViewPort: - return ProcXF86VidModeGetViewPort(client); - case X_XF86VidModeGetDotClocks: - return ProcXF86VidModeGetDotClocks(client); - case X_XF86VidModeSetClientVersion: - return ProcXF86VidModeSetClientVersion(client); - case X_XF86VidModeGetGamma: - return ProcXF86VidModeGetGamma(client); - case X_XF86VidModeGetGammaRamp: - return ProcXF86VidModeGetGammaRamp(client); - case X_XF86VidModeGetGammaRampSize: - return ProcXF86VidModeGetGammaRampSize(client); - case X_XF86VidModeGetPermissions: - return ProcXF86VidModeGetPermissions(client); - default: - if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return ProcXF86VidModeAddModeLine(client); - case X_XF86VidModeDeleteModeLine: - return ProcXF86VidModeDeleteModeLine(client); - case X_XF86VidModeModModeLine: - return ProcXF86VidModeModModeLine(client); - case X_XF86VidModeSwitchMode: - return ProcXF86VidModeSwitchMode(client); - case X_XF86VidModeSwitchToMode: - return ProcXF86VidModeSwitchToMode(client); - case X_XF86VidModeLockModeSwitch: - return ProcXF86VidModeLockModeSwitch(client); - case X_XF86VidModeSetViewPort: - return ProcXF86VidModeSetViewPort(client); - case X_XF86VidModeSetGamma: - return ProcXF86VidModeSetGamma(client); - case X_XF86VidModeSetGammaRamp: - return ProcXF86VidModeSetGammaRamp(client); - default: - return BadRequest; - } - } else - return VidModeErrorBase + XF86VidModeClientNotLocal; - } -} - -static int -SProcXF86VidModeQueryVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeQueryVersionReq); - swaps(&stuff->length, n); - return ProcXF86VidModeQueryVersion(client); -} - -static int -SProcXF86VidModeGetModeLine(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetModeLineReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetModeLine(client); -} - -static int -SProcXF86VidModeGetAllModeLines(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetAllModeLines(client); -} - -static int -SProcXF86VidModeAddModeLine(ClientPtr client) -{ - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeAddModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeAddModeLine(client); -} - -static int -SProcXF86VidModeDeleteModeLine(ClientPtr client) -{ - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeDeleteModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeDeleteModeLine(client); -} - -static int -SProcXF86VidModeModModeLine(ClientPtr client) -{ - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeModModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeModModeLine(client); -} - -static int -SProcXF86VidModeValidateModeLine(ClientPtr client) -{ - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeValidateModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeValidateModeLine(client); -} - -static int -SProcXF86VidModeSwitchMode(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSwitchModeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); - swaps(&stuff->screen, n); - swaps(&stuff->zoom, n); - return ProcXF86VidModeSwitchMode(client); -} - -static int -SProcXF86VidModeSwitchToMode(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSwitchToModeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeSwitchToMode(client); -} - -static int -SProcXF86VidModeLockModeSwitch(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->screen, n); - swaps(&stuff->lock, n); - return ProcXF86VidModeLockModeSwitch(client); -} - -static int -SProcXF86VidModeGetMonitor(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetMonitorReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetMonitor(client); -} - -static int -SProcXF86VidModeGetViewPort(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetViewPortReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetViewPort(client); -} - -static int -SProcXF86VidModeSetViewPort(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetViewPortReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); - swaps(&stuff->screen, n); - swapl(&stuff->x, n); - swapl(&stuff->y, n); - return ProcXF86VidModeSetViewPort(client); -} - -static int -SProcXF86VidModeGetDotClocks(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetDotClocksReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetDotClocks(client); -} - -static int -SProcXF86VidModeSetClientVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetClientVersionReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - swaps(&stuff->major, n); - swaps(&stuff->minor, n); - return ProcXF86VidModeSetClientVersion(client); -} - -static int -SProcXF86VidModeSetGamma(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetGammaReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); - swaps(&stuff->screen, n); - swapl(&stuff->red, n); - swapl(&stuff->green, n); - swapl(&stuff->blue, n); - return ProcXF86VidModeSetGamma(client); -} - -static int -SProcXF86VidModeGetGamma(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetGammaReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGamma(client); -} - -static int -SProcXF86VidModeSetGammaRamp(ClientPtr client) -{ - CARD16 *ramp; - int length, n; - REQUEST(xXF86VidModeSetGammaRampReq); - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); - swaps(&stuff->size, n); - swaps(&stuff->screen, n); - length = ((stuff->size + 1) & ~1) * 6; - REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); - ramp = (CARD16*)&stuff[1]; - while(length--) { - swaps(ramp, n); - ramp++; - } - return ProcXF86VidModeSetGammaRamp(client); -} - -static int -SProcXF86VidModeGetGammaRamp(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetGammaRampReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - swaps(&stuff->size, n); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGammaRamp(client); -} - -static int -SProcXF86VidModeGetGammaRampSize(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGammaRampSize(client); -} - -static int -SProcXF86VidModeGetPermissions(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetPermissionsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetPermissions(client); -} - - -static int -SProcXF86VidModeDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86VidModeQueryVersion: - return SProcXF86VidModeQueryVersion(client); - case X_XF86VidModeGetModeLine: - return SProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetMonitor: - return SProcXF86VidModeGetMonitor(client); - case X_XF86VidModeGetAllModeLines: - return SProcXF86VidModeGetAllModeLines(client); - case X_XF86VidModeGetViewPort: - return SProcXF86VidModeGetViewPort(client); - case X_XF86VidModeValidateModeLine: - return SProcXF86VidModeValidateModeLine(client); - case X_XF86VidModeGetDotClocks: - return SProcXF86VidModeGetDotClocks(client); - case X_XF86VidModeSetClientVersion: - return SProcXF86VidModeSetClientVersion(client); - case X_XF86VidModeGetGamma: - return SProcXF86VidModeGetGamma(client); - case X_XF86VidModeGetGammaRamp: - return SProcXF86VidModeGetGammaRamp(client); - case X_XF86VidModeGetGammaRampSize: - return SProcXF86VidModeGetGammaRampSize(client); - case X_XF86VidModeGetPermissions: - return SProcXF86VidModeGetPermissions(client); - default: - if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return SProcXF86VidModeAddModeLine(client); - case X_XF86VidModeDeleteModeLine: - return SProcXF86VidModeDeleteModeLine(client); - case X_XF86VidModeModModeLine: - return SProcXF86VidModeModModeLine(client); - case X_XF86VidModeSwitchMode: - return SProcXF86VidModeSwitchMode(client); - case X_XF86VidModeSwitchToMode: - return SProcXF86VidModeSwitchToMode(client); - case X_XF86VidModeLockModeSwitch: - return SProcXF86VidModeLockModeSwitch(client); - case X_XF86VidModeSetViewPort: - return SProcXF86VidModeSetViewPort(client); - case X_XF86VidModeSetGamma: - return SProcXF86VidModeSetGamma(client); - case X_XF86VidModeSetGammaRamp: - return SProcXF86VidModeSetGammaRamp(client); - default: - return BadRequest; - } - } else - return VidModeErrorBase + XF86VidModeClientNotLocal; - } -} diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 009e1ac08..0649b53c4 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -104,24 +104,18 @@ int ProcInitialConnection(); #include "swaprep.h" #include "swapreq.h" #ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" +#include "../Xext/panoramiX.h" +#include "../Xext/panoramiXsrv.h" #endif #ifdef XCSECURITY #define _SECURITY_SERVER #include #endif -#ifdef XAPPGROUP -#include -#endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" #include #endif -#ifdef LBX -#include "lbxserve.h" -#endif #define mskcnt ((MAXCLIENTS + 31) / 32) #define BITMASK(i) (1U << ((i) & 31)) diff --git a/nx-libs.spec b/nx-libs.spec index 98cee6926..a1074df66 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -207,13 +207,9 @@ the X11 protocol. This increases performance when using X applications over a network, especially a slow one. The NX_Xext library contains a handful of X11 extensions: -- Double Buffer extension (DBE/Xdbe) - Display Power Management Signaling (DPMS) extension - X11 Nonrectangular Window Shape extension (Xshape) - The MIT Shared Memory extension (MIT-SHM/Xshm) -- TOG-CUP (colormap) protocol extension (Xcup) -- X Extended Visual Information extension (XEvi) -- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) This package contains all necessary include files and libraries needed to develop applications that require these. @@ -563,26 +559,11 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %defattr(-,root,root) %{_libdir}/libNX_Xext.so %dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/MITMisc.h -%{_includedir}/nx-X11/extensions/XEVI.h -%{_includedir}/nx-X11/extensions/XEVIstr.h -%{_includedir}/nx-X11/extensions/XLbx.h %{_includedir}/nx-X11/extensions/XShm.h -%{_includedir}/nx-X11/extensions/Xag.h -%{_includedir}/nx-X11/extensions/Xagsrv.h -%{_includedir}/nx-X11/extensions/Xagstr.h -%{_includedir}/nx-X11/extensions/Xcup.h -%{_includedir}/nx-X11/extensions/Xcupstr.h -%{_includedir}/nx-X11/extensions/Xdbe.h -%{_includedir}/nx-X11/extensions/Xdbeproto.h %{_includedir}/nx-X11/extensions/Xext.h %{_includedir}/nx-X11/extensions/dpms.h %{_includedir}/nx-X11/extensions/dpmsstr.h %{_includedir}/nx-X11/extensions/extutil.h -%{_includedir}/nx-X11/extensions/lbxstr.h -%{_includedir}/nx-X11/extensions/mitmiscstr.h -%{_includedir}/nx-X11/extensions/multibuf.h -%{_includedir}/nx-X11/extensions/multibufst.h %{_includedir}/nx-X11/extensions/security.h %{_includedir}/nx-X11/extensions/securstr.h %{_includedir}/nx-X11/extensions/shape.h @@ -650,17 +631,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %defattr(-,root,root) %{_includedir}/nx-X11/X10.h %dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/Xevie.h -%{_includedir}/nx-X11/extensions/lbxbuf.h -%{_includedir}/nx-X11/extensions/lbxbufstr.h -%{_includedir}/nx-X11/extensions/lbxdeltastr.h -%{_includedir}/nx-X11/extensions/lbximage.h -%{_includedir}/nx-X11/extensions/lbxopts.h -%{_includedir}/nx-X11/extensions/lbxzlib.h %{_includedir}/nx-X11/extensions/panoramiXext.h %{_includedir}/nx-X11/extensions/record.h -%{_includedir}/nx-X11/extensions/xf86dga1.h -%{_includedir}/nx-X11/extensions/xf86vmode.h %{_includedir}/nx-X11/misc.h %{_includedir}/nx-X11/os.h @@ -690,10 +662,10 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/ap_keysym.h %{_includedir}/nx-X11/keysym.h %{_includedir}/nx-X11/keysymdef.h +%{_includedir}/nx-X11/extensions/Xdbeproto.h %{_includedir}/nx-X11/extensions/XI.h %{_includedir}/nx-X11/extensions/XIproto.h %{_includedir}/nx-X11/extensions/XResproto.h -%{_includedir}/nx-X11/extensions/Xeviestr.h %{_includedir}/nx-X11/extensions/bigreqstr.h %{_includedir}/nx-X11/extensions/composite.h %{_includedir}/nx-X11/extensions/compositeproto.h @@ -711,23 +683,10 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/xcmiscstr.h %{_includedir}/nx-X11/extensions/xf86bigfont.h %{_includedir}/nx-X11/extensions/xf86bigfstr.h -%{_includedir}/nx-X11/extensions/xf86dga.h -%{_includedir}/nx-X11/extensions/xf86dga1str.h -%{_includedir}/nx-X11/extensions/xf86dgastr.h -%{_includedir}/nx-X11/extensions/xf86misc.h -%{_includedir}/nx-X11/extensions/xf86mscstr.h -%{_includedir}/nx-X11/extensions/xf86vmstr.h %{_includedir}/nx-X11/extensions/xfixesproto.h %{_includedir}/nx-X11/extensions/xfixeswire.h %{_includedir}/nx-X11/extensions/xtestconst.h %{_includedir}/nx-X11/extensions/xteststr.h -%{_includedir}/nx-X11/extensions/xtrapbits.h -%{_includedir}/nx-X11/extensions/xtrapddmi.h -%{_includedir}/nx-X11/extensions/xtrapdi.h -%{_includedir}/nx-X11/extensions/xtrapemacros.h -%{_includedir}/nx-X11/extensions/xtraplib.h -%{_includedir}/nx-X11/extensions/xtraplibp.h -%{_includedir}/nx-X11/extensions/xtrapproto.h %files -n nxagent %defattr(-,root,root) -- cgit v1.2.3 From f55249dc6e3f01d4c9970af090884cab346ad9b4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 5 Apr 2016 14:20:24 +0200 Subject: nxcomshad/Makefile.in: Only install Shadow.h as publicly available header file. * Also adapt debian/libxcompshad-dev.install.in accordingly. * Also adapt nx-libs.spec accordingly. --- debian/libxcompshad-dev.install.in | 10 ---------- nx-libs.spec | 10 ---------- nxcompshad/Makefile.in | 2 +- 3 files changed, 1 insertion(+), 21 deletions(-) (limited to 'debian') diff --git a/debian/libxcompshad-dev.install.in b/debian/libxcompshad-dev.install.in index 31cc685d2..2010f5950 100644 --- a/debian/libxcompshad-dev.install.in +++ b/debian/libxcompshad-dev.install.in @@ -1,13 +1,3 @@ usr/lib/*/libXcompshad.so -usr/include/*/nx/Core.h -usr/include/*/nx/Input.h -usr/include/*/nx/Logger.h -usr/include/*/nx/Manager.h -usr/include/*/nx/Misc.h -usr/include/*/nx/Poller.h -usr/include/*/nx/Regions.h usr/include/*/nx/Shadow.h -usr/include/*/nx/Updater.h -usr/include/*/nx/Win.h -usr/include/*/nx/X11.h usr/lib/*/pkgconfig/nxcompshad.pc diff --git a/nx-libs.spec b/nx-libs.spec index a1074df66..5ce1d2145 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -609,17 +609,7 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %files -n libXcompshad-devel %defattr(-,root,root) %_libdir/libXcompshad.so -%{_includedir}/nx/Core.h -%{_includedir}/nx/Input.h -%{_includedir}/nx/Logger.h -%{_includedir}/nx/Manager.h -%{_includedir}/nx/Misc.h -%{_includedir}/nx/Poller.h -%{_includedir}/nx/Regions.h %{_includedir}/nx/Shadow.h -%{_includedir}/nx/Updater.h -%{_includedir}/nx/Win.h -%{_includedir}/nx/X11.h %{_libdir}/pkgconfig/nxcompshad.pc %files -n libXcompshad3 diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index f3b68b45a..68bb1fbad 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -210,7 +210,7 @@ install.lib: all $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} $(INSTALL_DATA) $(LIBARCHIVE) $(DESTDIR)${libdir} - $(INSTALL_DATA) *.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) Shadow.h $(DESTDIR)${includedir}/nx $(INSTALL_DATA) nxcompshad.pc $(DESTDIR)${pkgconfigdir} echo "Running ldconfig tool, this may take a while..." && ldconfig || true -- cgit v1.2.3 From 2f706cbeb5f077c9d1f01256bdf978a58769db43 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 5 Apr 2016 14:29:02 +0200 Subject: nxcomp/Makefile.in: Only install MD5.h, NX.h, NXalert.h, NXpack.h, NXproto.h and NXvars.h as publicly available header files. * Also adapt debian/libxcomp-dev.install.in accordingly. * Also adapt nx-libs.spec accordingly. --- debian/libxcomp-dev.install.in | 2 -- nx-libs.spec | 2 -- nxcomp/Makefile.in | 8 +++++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/libxcomp-dev.install.in b/debian/libxcomp-dev.install.in index f0faa49e3..e27e6ecf0 100644 --- a/debian/libxcomp-dev.install.in +++ b/debian/libxcomp-dev.install.in @@ -1,10 +1,8 @@ usr/lib/*/libXcomp.so usr/include/*/nx/NX.h usr/include/*/nx/NXalert.h -usr/include/*/nx/NXmitshm.h usr/include/*/nx/NXpack.h usr/include/*/nx/NXproto.h -usr/include/*/nx/NXrender.h usr/include/*/nx/NXvars.h usr/include/*/nx/MD5.h usr/lib/*/pkgconfig/nxcomp.pc \ No newline at end of file diff --git a/nx-libs.spec b/nx-libs.spec index 5ce1d2145..111e98b3d 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -580,10 +580,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx/MD5.h %{_includedir}/nx/NX.h %{_includedir}/nx/NXalert.h -%{_includedir}/nx/NXmitshm.h %{_includedir}/nx/NXpack.h %{_includedir}/nx/NXproto.h -%{_includedir}/nx/NXrender.h %{_includedir}/nx/NXvars.h %{_libdir}/pkgconfig/nxcomp.pc diff --git a/nxcomp/Makefile.in b/nxcomp/Makefile.in index 8fc37407f..759ab6a4f 100644 --- a/nxcomp/Makefile.in +++ b/nxcomp/Makefile.in @@ -283,8 +283,12 @@ install.lib: all $(INSTALL_LINK) $(LIBLOAD) $(DESTDIR)${libdir} $(INSTALL_LINK) $(LIBSHARED) $(DESTDIR)${libdir} $(INSTALL_DATA) $(LIBARCHIVE) $(DESTDIR)${libdir} - $(INSTALL_DATA) NX*.h $(DESTDIR)${includedir}/nx $(INSTALL_DATA) MD5.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) NX.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) NXalert.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) NXpack.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) NXproto.h $(DESTDIR)${includedir}/nx + $(INSTALL_DATA) NXvars.h $(DESTDIR)${includedir}/nx $(INSTALL_DATA) nxcomp.pc $(DESTDIR)${pkgconfigdir} echo "Running ldconfig tool, this may take a while..." && ldconfig || true @@ -301,10 +305,8 @@ uninstall.lib: $(RM_FILE) $(DESTDIR)${libdir}/$(LIBARCHIVE) $(RM_FILE) $(DESTDIR)${includedir}/nx/NXalert.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NX.h - $(RM_FILE) $(DESTDIR)${includedir}/nx/NXmitshm.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NXpack.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NXproto.h - $(RM_FILE) $(DESTDIR)${includedir}/nx/NXrender.h $(RM_FILE) $(DESTDIR)${includedir}/nx/NXvars.h $(RM_FILE) $(DESTDIR)${includedir}/nx/MD5.h $(RM_FILE) $(DESTDIR)${pkgconfigdir}/nxcomp.pc -- cgit v1.2.3 From e3838817425e6cd06b6ecd2109397178fd9a3c93 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 12:21:39 +0200 Subject: debian/patches-pending-evaluation: Adapt fix-icon-and-clipboard.patch to removal of the WindowTable array. --- debian/patches-pending-evaluation/fix-icon-and-clipboard.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/patches-pending-evaluation/fix-icon-and-clipboard.patch b/debian/patches-pending-evaluation/fix-icon-and-clipboard.patch index e4faef051..d6ecf8f19 100644 --- a/debian/patches-pending-evaluation/fix-icon-and-clipboard.patch +++ b/debian/patches-pending-evaluation/fix-icon-and-clipboard.patch @@ -323,7 +323,7 @@ index 862f75a..5405568 100644 x.u.u.type = SelectionRequest; x.u.selectionRequest.time = GetTimeInMillis(); x.u.selectionRequest.owner = lastOwnerWindow; - x.u.selectionRequest.requestor = WindowTable[0]->drawable.id; + x.u.selectionRequest.requestor = screenInfo.screens[0]->root->drawable.id; - x.u.selectionRequest.selection = XA_PRIMARY; +/* My changes */ +/* -- cgit v1.2.3 From 3f4e503d6171859e52ac2d256ca7076227d9ed7d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 15:50:05 +0200 Subject: nx-libs.spec, debian/control: versioned B-R / B-D: pixman-1 (>= 0.13.2). --- debian/control | 2 +- nx-libs.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 3e1f45e5d..d7e6f9a2c 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Build-Depends: pkg-config, x11proto-core-dev, expat, - libpixman-1-dev, + libpixman-1-dev (>= 0.13.2), Standards-Version: 3.9.6 Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary Vcs-Git: git://code.x2go.org/nx-libs.git diff --git a/nx-libs.spec b/nx-libs.spec index 111e98b3d..3554a65c6 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -29,7 +29,7 @@ BuildRequires: fdupes BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(pixman-1) >= 0.13.2 BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xpm) @@ -45,7 +45,7 @@ BuildRequires: pkgconfig(xinerama) BuildRequires: libexpat-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel -BuildRequires: pixman-devel +BuildRequires: pixman-devel >= 0.13.2 BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXext-devel BuildRequires: xorg-x11-libXpm-devel @@ -65,7 +65,7 @@ BuildRequires: xorg-x11-util-devel BuildRequires: expat-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel -BuildRequires: pixman-devel +BuildRequires: pixman-devel >= 0.13.2 BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -- cgit v1.2.3 From 4c8fc6be8f530d3bc84d1097bd2cb6a4af6c77fc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 17:21:33 +0200 Subject: debian/patches: Update 102_xserver-xext_set-securitypolicy-path.debian.patch. --- debian/patches/102_xserver-xext_set-securitypolicy-path.debian.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/patches/102_xserver-xext_set-securitypolicy-path.debian.patch b/debian/patches/102_xserver-xext_set-securitypolicy-path.debian.patch index 0d11f2f0a..cc95c8153 100644 --- a/debian/patches/102_xserver-xext_set-securitypolicy-path.debian.patch +++ b/debian/patches/102_xserver-xext_set-securitypolicy-path.debian.patch @@ -8,7 +8,7 @@ Author: Mike Gabriel Last-Update: 2012-01-12 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c -@@ -86,7 +86,7 @@ +@@ -78,7 +78,7 @@ #ifdef NXAGENT_SERVER -- cgit v1.2.3 From d595125a10f886064fafc28ae8cd93dfed08cabe Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 28 Jun 2016 12:05:01 +0000 Subject: fix wrong bin:package for Xext proto headers: Move dpmsstr.h and securstr.h from Xext devel package into proto header package. --- debian/control | 1 + debian/libnx-xext-dev.install.in | 2 -- debian/nx-x11proto-xext-dev.install.in | 2 ++ nx-libs.spec | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index d7e6f9a2c..a621bddd7 100644 --- a/debian/control +++ b/debian/control @@ -444,6 +444,7 @@ Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-xext-dev (<< 2:3.5.99.0~), Description: nx-X11 miscellaneous extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index 4a571b9fd..eb77a30b7 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -2,10 +2,8 @@ usr/lib/*/libNX_Xext.so usr/include/*/nx-X11/extensions/XShm.h usr/include/*/nx-X11/extensions/Xext.h usr/include/*/nx-X11/extensions/dpms.h -usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/extutil.h usr/include/*/nx-X11/extensions/security.h -usr/include/*/nx-X11/extensions/securstr.h usr/include/*/nx-X11/extensions/shape.h usr/include/*/nx-X11/extensions/sync.h usr/include/*/nx-X11/extensions/xtestext1.h diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index f0dfd211e..f34e66519 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -1,5 +1,7 @@ +usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/xteststr.h usr/include/*/nx-X11/extensions/xtestconst.h +usr/include/*/nx-X11/extensions/securstr.h usr/include/*/nx-X11/extensions/shapestr.h usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h diff --git a/nx-libs.spec b/nx-libs.spec index 3554a65c6..f00088093 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -562,10 +562,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/XShm.h %{_includedir}/nx-X11/extensions/Xext.h %{_includedir}/nx-X11/extensions/dpms.h -%{_includedir}/nx-X11/extensions/dpmsstr.h %{_includedir}/nx-X11/extensions/extutil.h %{_includedir}/nx-X11/extensions/security.h -%{_includedir}/nx-X11/extensions/securstr.h %{_includedir}/nx-X11/extensions/shape.h %{_includedir}/nx-X11/extensions/sync.h %{_includedir}/nx-X11/extensions/xtestext1.h @@ -659,12 +657,14 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/compositeproto.h %{_includedir}/nx-X11/extensions/damagewire.h %{_includedir}/nx-X11/extensions/damageproto.h +%{_includedir}/nx-X11/extensions/dpmsstr.h %{_includedir}/nx-X11/extensions/panoramiXproto.h %{_includedir}/nx-X11/extensions/randr.h %{_includedir}/nx-X11/extensions/randrproto.h %{_includedir}/nx-X11/extensions/recordstr.h %{_includedir}/nx-X11/extensions/render.h %{_includedir}/nx-X11/extensions/renderproto.h +%{_includedir}/nx-X11/extensions/securstr.h %{_includedir}/nx-X11/extensions/shapestr.h %{_includedir}/nx-X11/extensions/shmstr.h %{_includedir}/nx-X11/extensions/syncstr.h -- cgit v1.2.3 From f051b7a2d3c150c819d44c7ee648108755f71c85 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 28 Jun 2016 12:20:00 +0000 Subject: libNX_Xext: Drop unused extensions: DPMS, XTestExt1, XSync, XSecurity. --- debian/libnx-xext-dev.install.in | 4 - debian/libnx-xext6.symbols | 182 +++--- debian/rules | 4 + nx-X11/lib/Xext/DPMS.c | 293 --------- nx-X11/lib/Xext/Imakefile | 10 - nx-X11/lib/Xext/XSecurity.c | 310 --------- nx-X11/lib/Xext/XSync.c | 817 ----------------------- nx-X11/lib/Xext/XTestExt1.c | 1321 -------------------------------------- nx-X11/lib/Xext/Xext-def.cpp | 99 --- nx-libs.spec | 8 +- 10 files changed, 99 insertions(+), 2949 deletions(-) delete mode 100644 nx-X11/lib/Xext/DPMS.c delete mode 100644 nx-X11/lib/Xext/XSecurity.c delete mode 100644 nx-X11/lib/Xext/XSync.c delete mode 100644 nx-X11/lib/Xext/XTestExt1.c delete mode 100644 nx-X11/lib/Xext/Xext-def.cpp (limited to 'debian') diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index eb77a30b7..819c82013 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -1,9 +1,5 @@ usr/lib/*/libNX_Xext.so usr/include/*/nx-X11/extensions/XShm.h usr/include/*/nx-X11/extensions/Xext.h -usr/include/*/nx-X11/extensions/dpms.h usr/include/*/nx-X11/extensions/extutil.h -usr/include/*/nx-X11/extensions/security.h usr/include/*/nx-X11/extensions/shape.h -usr/include/*/nx-X11/extensions/sync.h -usr/include/*/nx-X11/extensions/xtestext1.h diff --git a/debian/libnx-xext6.symbols b/debian/libnx-xext6.symbols index e48ae4968..a548baf57 100644 --- a/debian/libnx-xext6.symbols +++ b/debian/libnx-xext6.symbols @@ -1,25 +1,25 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# - DPMSCapable@Base 3.5.0.29 - DPMSDisable@Base 3.5.0.29 - DPMSEnable@Base 3.5.0.29 - DPMSForceLevel@Base 3.5.0.29 - DPMSGetTimeouts@Base 3.5.0.29 - DPMSGetVersion@Base 3.5.0.29 - DPMSInfo@Base 3.5.0.29 - DPMSQueryExtension@Base 3.5.0.29 - DPMSSetTimeouts@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSCapable@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSDisable@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSEnable@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSForceLevel@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSGetTimeouts@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSGetVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# DPMSSetTimeouts@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XLbxGetEventBase@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XLbxQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XLbxQueryVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscGetBugMode@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscSetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscGetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscSetBugMode@Base 3.5.0.29 XMissingExtension@Base 3.5.0.29 - XSecurityAllocXauth@Base 3.5.0.29 - XSecurityFreeXauth@Base 3.5.0.29 - XSecurityGenerateAuthorization@Base 3.5.0.29 - XSecurityQueryExtension@Base 3.5.0.29 - XSecurityRevokeAuthorization@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSecurityAllocXauth@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSecurityFreeXauth@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSecurityGenerateAuthorization@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSecurityQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSecurityRevokeAuthorization@Base 3.5.0.29 XSetExtensionErrorHandler@Base 3.5.0.29 XShapeCombineMask@Base 3.5.0.29 XShapeCombineRectangles@Base 3.5.0.29 @@ -42,69 +42,69 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# XShmPutImage@Base 3.5.0.29 XShmQueryExtension@Base 3.5.0.29 XShmQueryVersion@Base 3.5.0.29 - XSyncAwait@Base 3.5.0.29 - XSyncChangeAlarm@Base 3.5.0.29 - XSyncChangeCounter@Base 3.5.0.29 - XSyncCreateAlarm@Base 3.5.0.29 - XSyncCreateCounter@Base 3.5.0.29 - XSyncDestroyAlarm@Base 3.5.0.29 - XSyncDestroyCounter@Base 3.5.0.29 - XSyncFreeSystemCounterList@Base 3.5.0.29 - XSyncGetPriority@Base 3.5.0.29 - XSyncInitialize@Base 3.5.0.29 - XSyncIntToValue@Base 3.5.0.29 - XSyncIntsToValue@Base 3.5.0.29 - XSyncListSystemCounters@Base 3.5.0.29 - XSyncMaxValue@Base 3.5.0.29 - XSyncMinValue@Base 3.5.0.29 - XSyncQueryAlarm@Base 3.5.0.29 - XSyncQueryCounter@Base 3.5.0.29 - XSyncQueryExtension@Base 3.5.0.29 - XSyncSetCounter@Base 3.5.0.29 - XSyncSetPriority@Base 3.5.0.29 - XSyncValueAdd@Base 3.5.0.29 - XSyncValueEqual@Base 3.5.0.29 - XSyncValueGreaterOrEqual@Base 3.5.0.29 - XSyncValueGreaterThan@Base 3.5.0.29 - XSyncValueHigh32@Base 3.5.0.29 - XSyncValueIsNegative@Base 3.5.0.29 - XSyncValueIsPositive@Base 3.5.0.29 - XSyncValueIsZero@Base 3.5.0.29 - XSyncValueLessOrEqual@Base 3.5.0.29 - XSyncValueLessThan@Base 3.5.0.29 - XSyncValueLow32@Base 3.5.0.29 - XSyncValueSubtract@Base 3.5.0.29 - XTestFakeAckType@Base 3.5.0.29 - XTestFakeInput@Base 3.5.0.29 - XTestFlush@Base 3.5.0.29 - XTestGetInput@Base 3.5.0.29 - XTestInputActionType@Base 3.5.0.29 - XTestMovePointer@Base 3.5.0.29 - XTestPressButton@Base 3.5.0.29 - XTestPressKey@Base 3.5.0.29 - XTestQueryInputSize@Base 3.5.0.29 - XTestReset@Base 3.5.0.29 - XTestStopInput@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateAssociation@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagDestroyApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagDestroyAssociation@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagGetApplicationGroupAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagQueryApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncAwait@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncChangeAlarm@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncChangeCounter@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncCreateAlarm@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncCreateCounter@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncDestroyAlarm@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncDestroyCounter@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncFreeSystemCounterList@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncGetPriority@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncInitialize@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncIntToValue@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncIntsToValue@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncListSystemCounters@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncMaxValue@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncMinValue@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncQueryAlarm@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncQueryCounter@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncSetCounter@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncSetPriority@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueAdd@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueEqual@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueGreaterOrEqual@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueGreaterThan@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueHigh32@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueIsNegative@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueIsPositive@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueIsZero@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueLessOrEqual@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueLessThan@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueLow32@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XSyncValueSubtract@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestFakeAckType@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestFakeInput@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestFlush@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestGetInput@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestInputActionType@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestMovePointer@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestPressButton@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestPressKey@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestQueryInputSize@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestReset@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XTestStopInput@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagGetApplicationGroupAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryVersion@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XcupGetReservedColormapEntries@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XcupQueryVersion@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XcupStoreColors@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeAllocateBackBufferName@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeBeginIdiom@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeDeallocateBackBufferName@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeEndIdiom@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeFreeVisualInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeGetBackBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeGetVisualInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeSwapBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeAllocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeBeginIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeDeallocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeEndIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeFreeVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetBackBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeSwapBuffers@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XeviGetVisualInfo@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XeviQueryExtension@Base 3.5.0.29 #MISSING: 2:3.5.99.0-0# XeviQueryVersion@Base 3.5.0.29 @@ -113,16 +113,16 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# XextDestroyExtension@Base 3.5.0.29 XextFindDisplay@Base 3.5.0.29 XextRemoveDisplay@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufChangeBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufChangeWindowAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufClearBufferArea@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufCreateBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufCreateStereoWindow@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufDestroyBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufDisplayBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetScreenInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetWindowAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufClearBufferArea@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateStereoWindow@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDestroyBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDisplayBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetScreenInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufQueryExtension@Base 3.5.0.29 _XExtensionErrorFunction@Base 3.5.0.29 diff --git a/debian/rules b/debian/rules index 9fc39464c..a37478c21 100755 --- a/debian/rules +++ b/debian/rules @@ -53,6 +53,10 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfont.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XI.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/dpms.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/security.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/sync.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtestext1.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/Xtrans/ dh_install --fail-missing diff --git a/nx-X11/lib/Xext/DPMS.c b/nx-X11/lib/Xext/DPMS.c deleted file mode 100644 index a2c0dc3c5..000000000 --- a/nx-X11/lib/Xext/DPMS.c +++ /dev/null @@ -1,293 +0,0 @@ -/* $Xorg: DPMS.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ */ -/***************************************************************** - -Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. - -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. - -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 -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. - -******************************************************************/ -/* $XFree86: xc/lib/Xext/DPMS.c,v 3.5 2002/10/16 00:37:27 dawes Exp $ */ - -/* - * HISTORY - */ - -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _dpms_info_data; -static XExtensionInfo *dpms_info = &_dpms_info_data; -static char *dpms_extension_name = DPMSExtensionName; - -#define DPMSCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, dpms_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks dpms_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, dpms_info, - dpms_extension_name, - &dpms_extension_hooks, DPMSNumberEvents, - NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, dpms_info) - -/***************************************************************************** - * * - * public routines * - * * - *****************************************************************************/ - -Bool -DPMSQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - -Status -DPMSGetVersion(Display *dpy, int *major_versionp, int *minor_versionp) -{ - XExtDisplayInfo *info = find_display (dpy); - xDPMSGetVersionReply rep; - register xDPMSGetVersionReq *req; - - DPMSCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (DPMSGetVersion, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSGetVersion; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -Bool -DPMSCapable(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSCapableReq *req; - xDPMSCapableReply rep; - - DPMSCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(DPMSCapable, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSCapable; - - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.capable; -} - -Status -DPMSSetTimeouts(Display *dpy, CARD16 standby, CARD16 suspend, CARD16 off) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSSetTimeoutsReq *req; - - if ((off != 0)&&(off < suspend)) - { - return BadValue; - } - if ((suspend != 0)&&(suspend < standby)) - { - return BadValue; - } - - DPMSCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(DPMSSetTimeouts, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSSetTimeouts; - req->standby = standby; - req->suspend = suspend; - req->off = off; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Bool -DPMSGetTimeouts(Display *dpy, CARD16 *standby, CARD16 *suspend, CARD16 *off) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSGetTimeoutsReq *req; - xDPMSGetTimeoutsReply rep; - - DPMSCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(DPMSGetTimeouts, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSGetTimeouts; - - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - *standby = rep.standby; - *suspend = rep.suspend; - *off = rep.off; - return 1; -} - -Status -DPMSEnable(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSEnableReq *req; - - DPMSCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(DPMSEnable, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSEnable; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Status -DPMSDisable(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSDisableReq *req; - - DPMSCheckExtension (dpy, info, 0); - LockDisplay(dpy); - GetReq(DPMSDisable, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSDisable; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - - -Status -DPMSForceLevel(Display *dpy, CARD16 level) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSForceLevelReq *req; - - DPMSCheckExtension (dpy, info, 0); - - if ((level != DPMSModeOn) && - (level != DPMSModeStandby) && - (level != DPMSModeSuspend) && - (level != DPMSModeOff)) - return BadValue; - - LockDisplay(dpy); - GetReq(DPMSForceLevel, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSForceLevel; - req->level = level; - - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Status -DPMSInfo(Display *dpy, CARD16 *power_level, BOOL *state) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDPMSInfoReq *req; - xDPMSInfoReply rep; - - DPMSCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(DPMSInfo, req); - req->reqType = info->codes->major_opcode; - req->dpmsReqType = X_DPMSInfo; - - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - *power_level = rep.power_level; - *state = rep.state; - return 1; -} - - - diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index 0111500c5..e96e23510 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -33,26 +33,16 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines extutil.c \ XShape.c \ $(SHMSRCS) \ - XTestExt1.c \ - XSync.c \ - XSecurity.c \ - DPMS.c \ $(NULL) OBJS = globals.o \ extutil.o \ XShape.o \ $(SHMOBJS) \ - XTestExt1.o \ - XSync.o \ - XSecurity.o \ - DPMS.o \ $(NULL) LINTLIBS = $(LINTXLIB) #include -LinkFile(ImUtil.h,$(XLIBSRC)/ImUtil.h) - DependTarget() diff --git a/nx-X11/lib/Xext/XSecurity.c b/nx-X11/lib/Xext/XSecurity.c deleted file mode 100644 index a9899916f..000000000 --- a/nx-X11/lib/Xext/XSecurity.c +++ /dev/null @@ -1,310 +0,0 @@ -/* $Xorg: XSecurity.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ */ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -static XExtensionInfo _Security_info_data; -static XExtensionInfo *Security_info = &_Security_info_data; -static char *Security_extension_name = SECURITY_EXTENSION_NAME; - -#define SecurityCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, Security_extension_name, val) -#define SecuritySimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, Security_extension_name) - -#define SecurityGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->securityReqType = X_##name; - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -/* - * find_display - locate the display info block - */ -static int close_display(Display *dpy, XExtCodes *codes); -static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire); -static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); - -static XExtensionHooks Security_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - error_string /* error_string */ -}; - -static char *security_error_list[] = { - "BadAuthorization" - "BadAuthorizationProtocol" -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, Security_info, - Security_extension_name, - &Security_extension_hooks, - XSecurityNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, Security_info) - -static -XEXT_GENERATE_ERROR_STRING(error_string, Security_extension_name, - XSecurityNumberErrors, security_error_list) - -static Bool -wire_to_event(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = find_display(dpy); - - SecurityCheckExtension (dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case XSecurityAuthorizationRevoked: - { - xSecurityAuthorizationRevokedEvent *rwire = - (xSecurityAuthorizationRevokedEvent *)wire; - XSecurityAuthorizationRevokedEvent *revent = - (XSecurityAuthorizationRevokedEvent *)event; - - revent->type = rwire->type & 0x7F; - revent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - revent->send_event = (rwire->type & 0x80) != 0; - revent->display = dpy; - revent->auth_id = rwire->authId; - return True; - } - } - return False; -} - -static Status -event_to_wire(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = find_display(dpy); - - SecurityCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case XSecurityAuthorizationRevoked: - { - xSecurityAuthorizationRevokedEvent *rwire = - (xSecurityAuthorizationRevokedEvent *)wire; - XSecurityAuthorizationRevokedEvent *revent = - (XSecurityAuthorizationRevokedEvent *)event; - rwire->type = revent->type | (revent->send_event ? 0x80 : 0); - rwire->sequenceNumber = revent->serial & 0xFFFF; - return True; - } - } - return False; -} - -/***************************************************************************** - * * - * Security public interfaces * - * * - *****************************************************************************/ - -Status XSecurityQueryExtension ( - Display *dpy, - int *major_version_return, - int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xSecurityQueryVersionReply rep; - register xSecurityQueryVersionReq *req; - - if (!XextHasExtension (info)) - return (Status)0; /* failure */ - - LockDisplay (dpy); - SecurityGetReq (SecurityQueryVersion, req, info); - req->majorVersion = SECURITY_MAJOR_VERSION; - req->minorVersion = SECURITY_MINOR_VERSION; - - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return (Status)0; /* failure */ - } - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - UnlockDisplay (dpy); - - SyncHandle (); - - if (*major_version_return != SECURITY_MAJOR_VERSION) - return (Status)0; /* failure */ - else - return (Status)1; /* success */ -} - -Xauth * -XSecurityAllocXauth(void) -{ - return Xcalloc(1, sizeof(Xauth)); -} - -void -XSecurityFreeXauth(Xauth *auth) -{ - XFree(auth); -} - -static int -Ones(Mask mask) -{ - register Mask y; - - y = (mask >> 1) &033333333333; - y = mask - y - ((y >>1) & 033333333333); - return (((y + (y >> 3)) & 030707070707) % 077); -} - -Xauth * -XSecurityGenerateAuthorization( - Display *dpy, - Xauth *auth_in, - unsigned long valuemask, - XSecurityAuthorizationAttributes *attributes, - XSecurityAuthorization *auth_id_return) -{ - XExtDisplayInfo *info = find_display (dpy); - register xSecurityGenerateAuthorizationReq *req; - xSecurityGenerateAuthorizationReply rep; - Xauth *auth_return; - unsigned long values[3]; - unsigned long *value = values; - unsigned int nvalues; - - *auth_id_return = 0; /* in case we fail */ - - /* make sure extension is available */ - - SecurityCheckExtension (dpy, info, (Xauth *)NULL); - - LockDisplay(dpy); - SecurityGetReq(SecurityGenerateAuthorization, req, info); - - req->nbytesAuthProto = auth_in->name_length; - req->nbytesAuthData = auth_in->data_length; - - /* adjust length to account for auth name and data */ - req->length += (auth_in->name_length + (unsigned)3) >> 2; - req->length += (auth_in->data_length + (unsigned)3) >> 2; - - /* adjust length to account for list of values */ - req->valueMask = valuemask & XSecurityAllAuthorizationAttributes; - nvalues = Ones(req->valueMask); - req->length += nvalues; - - /* send auth name and data */ - Data(dpy, auth_in->name, auth_in->name_length); - Data(dpy, auth_in->data, auth_in->data_length); - - /* send values */ - if (valuemask & XSecurityTimeout) *value++ = attributes->timeout; - if (valuemask & XSecurityTrustLevel) *value++ = attributes->trust_level; - if (valuemask & XSecurityGroup) *value++ = attributes->group; - if (valuemask & XSecurityEventMask) *value++ = attributes->event_mask; - - nvalues <<= 2; - Data32(dpy, (long *)values, (long)nvalues); - - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return (Xauth *)NULL; - } - - *auth_id_return = rep.authId; - - /* Allocate space for the Xauth struct and the auth name and data all - * in one hunk. This lets XSecurityFreeXauth not have to care - * about whether the auth was allocated here or in - * XSecurityAllocXauth; in both cases, you just free one pointer. - */ - - if ((auth_return = (Xauth *)Xcalloc(1, - (sizeof(Xauth) + auth_in->name_length + rep.dataLength)))) - { - auth_return->data_length = rep.dataLength; - auth_return->data = (char *)&auth_return[1]; - _XReadPad(dpy, auth_return->data, (long)rep.dataLength); - - auth_return->name_length = auth_in->name_length; - auth_return->name = auth_return->data + auth_return->data_length; - memcpy(auth_return->name, auth_in->name, auth_return->name_length); - } - else - { - _XEatData(dpy, (unsigned long) (rep.dataLength + 3) & ~3); - } - - UnlockDisplay (dpy); - SyncHandle (); - return auth_return; - -} /* XSecurityGenerateAuthorization */ - -Status -XSecurityRevokeAuthorization( - Display *dpy, - XSecurityAuthorization auth_id) -{ - XExtDisplayInfo *info = find_display (dpy); - xSecurityRevokeAuthorizationReq *req; - - SecurityCheckExtension (dpy, info, 0); - LockDisplay(dpy); - SecurityGetReq(SecurityRevokeAuthorization, req, info); - req->authId = auth_id; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} /* XSecurityRevokeAuthorization */ diff --git a/nx-X11/lib/Xext/XSync.c b/nx-X11/lib/Xext/XSync.c deleted file mode 100644 index 39eb97cdd..000000000 --- a/nx-X11/lib/Xext/XSync.c +++ /dev/null @@ -1,817 +0,0 @@ -/* $Xorg: XSync.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ -/* - -Copyright 1991, 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ - -/*********************************************************** -Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, -and Olivetti Research Limited, Cambridge, England. - - 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 names of Digital or Olivetti -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL THEY 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. - -******************************************************************/ -/* $XFree86: xc/lib/Xext/XSync.c,v 1.7tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -static XExtensionInfo _sync_info_data; -static XExtensionInfo *sync_info = &_sync_info_data; -static char *sync_extension_name = SYNC_NAME; - -#define SyncCheckExtension(dpy,i,val) \ - XextCheckExtension(dpy, i, sync_extension_name, val) -#define SyncSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension(dpy, i, sync_extension_name) - -static int close_display(Display *dpy, XExtCodes *codes); -static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire); -static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); - -static XExtensionHooks sync_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static char *sync_error_list[] = { - "BadCounter", - "BadAlarm", -}; - -static -XEXT_GENERATE_FIND_DISPLAY(find_display, sync_info, - sync_extension_name, - &sync_extension_hooks, - XSyncNumberEvents, (XPointer) NULL) - -static -XEXT_GENERATE_CLOSE_DISPLAY(close_display, sync_info) - -static -XEXT_GENERATE_ERROR_STRING(error_string, sync_extension_name, - XSyncNumberErrors, sync_error_list) - - -static Bool -wire_to_event(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = find_display(dpy); - XSyncCounterNotifyEvent *aevent; - xSyncCounterNotifyEvent *awire; - XSyncAlarmNotifyEvent *anl; - xSyncAlarmNotifyEvent *ane; - - SyncCheckExtension(dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case XSyncCounterNotify: - awire = (xSyncCounterNotifyEvent *) wire; - aevent = (XSyncCounterNotifyEvent *) event; - aevent->type = awire->type & 0x7F; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->counter = awire->counter; - XSyncIntsToValue(&aevent->wait_value, awire->wait_value_lo, - awire->wait_value_hi); - XSyncIntsToValue(&aevent->counter_value, - awire->counter_value_lo, - awire->counter_value_hi); - aevent->time = awire->time; - aevent->count = awire->count; - aevent->destroyed = awire->destroyed; - return True; - - case XSyncAlarmNotify: - ane = (xSyncAlarmNotifyEvent *) wire; /* ENCODING EVENT PTR */ - anl = (XSyncAlarmNotifyEvent *) event; /* LIBRARY EVENT PTR */ - anl->type = ane->type & 0x7F; - anl->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - anl->send_event = (ane->type & 0x80) != 0; - anl->display = dpy; - anl->alarm = ane->alarm; - XSyncIntsToValue(&anl->counter_value, - ane->counter_value_lo, - ane->counter_value_hi); - XSyncIntsToValue(&anl->alarm_value, - ane->alarm_value_lo, - ane->alarm_value_hi); - anl->state = (XSyncAlarmState)ane->state; - anl->time = ane->time; - return True; - } - - return False; -} - -static Status -event_to_wire(Display *dpy, XEvent *event, xEvent *wire) -{ - XExtDisplayInfo *info = find_display(dpy); - XSyncCounterNotifyEvent *aevent; - xSyncCounterNotifyEvent *awire; - XSyncAlarmNotifyEvent *anl; - xSyncAlarmNotifyEvent *ane; - - SyncCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case XSyncCounterNotify: - awire = (xSyncCounterNotifyEvent *) wire; - aevent = (XSyncCounterNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->sequenceNumber = aevent->serial & 0xFFFF; - awire->counter = aevent->counter; - awire->wait_value_lo = XSyncValueLow32(aevent->wait_value); - awire->wait_value_hi = XSyncValueHigh32(aevent->wait_value); - awire->counter_value_lo = XSyncValueLow32(aevent->counter_value); - awire->counter_value_hi = XSyncValueHigh32(aevent->counter_value); - awire->time = aevent->time; - awire->count = aevent->count; - awire->destroyed = aevent->destroyed; - return True; - - case XSyncAlarmNotify: - ane = (xSyncAlarmNotifyEvent *) wire; /* ENCODING EVENT PTR */ - anl = (XSyncAlarmNotifyEvent *) event; /* LIBRARY EVENT PTR */ - ane->type = anl->type | (anl->send_event ? 0x80 : 0); - ane->sequenceNumber = anl->serial & 0xFFFF; - ane->alarm = anl->alarm; - ane->counter_value_lo = XSyncValueLow32(anl->counter_value); - ane->counter_value_hi = XSyncValueHigh32(anl->counter_value); - ane->alarm_value_lo = XSyncValueLow32(anl->alarm_value); - ane->alarm_value_hi = XSyncValueHigh32(anl->alarm_value); - ane->state = anl->state; - ane->time = anl->time; - return True; - } - return False; -} - -Status -XSyncQueryExtension( - Display *dpy, - int *event_base_return, int *error_base_return) -{ - XExtDisplayInfo *info = find_display(dpy); - - if (XextHasExtension(info)) - { - *event_base_return = info->codes->first_event; - *error_base_return = info->codes->first_error; - return True; - } - else - return False; -} - -Status -XSyncInitialize( - Display *dpy, - int *major_version_return, int *minor_version_return) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncInitializeReply rep; - xSyncInitializeReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncInitialize, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncInitialize; - req->majorVersion = SYNC_MAJOR_VERSION; - req->minorVersion = SYNC_MINOR_VERSION; - if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) - { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - return ((rep.majorVersion == SYNC_MAJOR_VERSION) -#if SYNC_MINOR_VERSION > 0 /* avoid compiler warning */ - && (rep.minorVersion >= SYNC_MINOR_VERSION) -#endif - ); -} - -XSyncSystemCounter * -XSyncListSystemCounters(Display *dpy, int *n_counters_return) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncListSystemCountersReply rep; - xSyncListSystemCountersReq *req; - XSyncSystemCounter *list = NULL; - - SyncCheckExtension(dpy, info, NULL); - - LockDisplay(dpy); - GetReq(SyncListSystemCounters, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncListSystemCounters; - if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) - goto bail; - - *n_counters_return = rep.nCounters; - if (rep.nCounters > 0) - { - xSyncSystemCounter *pWireSysCounter, *pNextWireSysCounter; - XSyncCounter counter; - int replylen; - int i; - - list = (XSyncSystemCounter *)Xmalloc( - rep.nCounters * sizeof(XSyncSystemCounter)); - replylen = rep.length << 2; - pWireSysCounter = (xSyncSystemCounter *) Xmalloc ((unsigned) replylen + 1); - /* +1 to leave room for last null-terminator */ - - if ((!list) || (!pWireSysCounter)) - { - if (list) Xfree((char *) list); - if (pWireSysCounter) Xfree((char *) pWireSysCounter); - _XEatData(dpy, (unsigned long) replylen); - list = NULL; - goto bail; - } - - _XReadPad(dpy, (char *)pWireSysCounter, replylen); - - counter = pWireSysCounter->counter; - for (i = 0; i < rep.nCounters; i++) - { - list[i].counter = counter; - XSyncIntsToValue(&list[i].resolution, - pWireSysCounter->resolution_lo, - pWireSysCounter->resolution_hi); - - /* we may be about to clobber the counter field of the - * next syscounter because we have to add a null terminator - * to the counter name string. So we save the next counter - * here. - */ - pNextWireSysCounter = (xSyncSystemCounter *) - (((char *)pWireSysCounter) + ((SIZEOF(xSyncSystemCounter) + - pWireSysCounter->name_length + 3) & ~3)); - counter = pNextWireSysCounter->counter; - - list[i].name = ((char *)pWireSysCounter) + - SIZEOF(xSyncSystemCounter); - /* null-terminate the string */ - *(list[i].name + pWireSysCounter->name_length) = '\0'; - pWireSysCounter = pNextWireSysCounter; - } - } - -bail: - UnlockDisplay(dpy); - SyncHandle(); - return list; -} - -void -XSyncFreeSystemCounterList(XSyncSystemCounter *list) -{ - if (list) - { - Xfree( ((char *)list[0].name) - SIZEOF(xSyncSystemCounter)); - Xfree(list); - } -} - - -XSyncCounter -XSyncCreateCounter(Display *dpy, XSyncValue initial_value) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncCreateCounterReq *req; - - SyncCheckExtension(dpy, info, None); - - LockDisplay(dpy); - GetReq(SyncCreateCounter, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncCreateCounter; - - req->cid = XAllocID(dpy); - req->initial_value_lo = XSyncValueLow32(initial_value); - req->initial_value_hi = XSyncValueHigh32(initial_value); - - UnlockDisplay(dpy); - SyncHandle(); - return req->cid; -} - -Status -XSyncSetCounter(Display *dpy, XSyncCounter counter, XSyncValue value) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncSetCounterReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncSetCounter, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncSetCounter; - req->cid = counter; - req->value_lo = XSyncValueLow32(value); - req->value_hi = XSyncValueHigh32(value); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncChangeCounter(Display *dpy, XSyncCounter counter, XSyncValue value) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncChangeCounterReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncChangeCounter, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncChangeCounter; - req->cid = counter; - req->value_lo = XSyncValueLow32(value); - req->value_hi = XSyncValueHigh32(value); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncDestroyCounter(Display *dpy, XSyncCounter counter) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncDestroyCounterReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncDestroyCounter, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncDestroyCounter; - req->counter = counter; - UnlockDisplay(dpy); - SyncHandle(); - - return True; -} - -Status -XSyncQueryCounter(Display *dpy, XSyncCounter counter, XSyncValue *value_return) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncQueryCounterReply rep; - xSyncQueryCounterReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncQueryCounter, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncQueryCounter; - req->counter = counter; - if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) - { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - XSyncIntsToValue(value_return, rep.value_lo, rep.value_hi); - UnlockDisplay(dpy); - SyncHandle(); - - return True; -} - - -Status -XSyncAwait(Display *dpy, XSyncWaitCondition *wait_list, int n_conditions) -{ - XExtDisplayInfo *info = find_display(dpy); - XSyncWaitCondition *wait_item = wait_list; - xSyncAwaitReq *req; - unsigned int len; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncAwait, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncAwait; - len = (n_conditions * SIZEOF(xSyncWaitCondition)) >> 2; - SetReqLen(req, len, len /* XXX */ ); - - while (n_conditions--) - { - xSyncWaitCondition wc; - wc.counter = wait_item->trigger.counter; - wc.value_type = wait_item->trigger.value_type; - wc.wait_value_lo = XSyncValueLow32(wait_item->trigger.wait_value); - wc.wait_value_hi = XSyncValueHigh32(wait_item->trigger.wait_value); - wc.test_type = wait_item->trigger.test_type; - wc.event_threshold_lo = XSyncValueLow32(wait_item->event_threshold); - wc.event_threshold_hi = XSyncValueHigh32(wait_item->event_threshold); - Data(dpy, (char *)&wc, SIZEOF(xSyncWaitCondition)); - wait_item++; /* get next trigger */ - } - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -static void -_XProcessAlarmAttributes(Display *dpy, xSyncChangeAlarmReq *req, - unsigned long valuemask, - XSyncAlarmAttributes *attributes) -{ - - unsigned long values[32]; - unsigned long *value = values; - unsigned int nvalues; - - if (valuemask & XSyncCACounter) - *value++ = attributes->trigger.counter; - - if (valuemask & XSyncCAValueType) - *value++ = attributes->trigger.value_type; - - if (valuemask & XSyncCAValue) - { - *value++ = XSyncValueHigh32(attributes->trigger.wait_value); - *value++ = XSyncValueLow32(attributes->trigger.wait_value); - } - - if (valuemask & XSyncCATestType) - *value++ = attributes->trigger.test_type; - - if (valuemask & XSyncCADelta) - { - *value++ = XSyncValueHigh32(attributes->delta); - *value++ = XSyncValueLow32(attributes->delta); - } - - if (valuemask & XSyncCAEvents) - *value++ = attributes->events; - - /* N.B. the 'state' field cannot be set or changed */ - req->length += (nvalues = value - values); - nvalues <<= 2; /* watch out for macros... */ - - Data32(dpy, (long *) values, (long) nvalues); -} - -XSyncAlarm -XSyncCreateAlarm( - Display *dpy, - unsigned long values_mask, - XSyncAlarmAttributes *values) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncCreateAlarmReq *req; - XSyncAlarm aid; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncCreateAlarm, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncCreateAlarm; - req->id = aid = XAllocID(dpy); - values_mask &= XSyncCACounter | XSyncCAValueType | XSyncCAValue - | XSyncCATestType | XSyncCADelta | XSyncCAEvents; - if ((req->valueMask = values_mask)) - _XProcessAlarmAttributes(dpy, (xSyncChangeAlarmReq *) req, - values_mask, values); - UnlockDisplay(dpy); - SyncHandle(); - return aid; -} - -Status -XSyncDestroyAlarm(Display *dpy, XSyncAlarm alarm) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncDestroyAlarmReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncDestroyAlarm, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncDestroyAlarm; - req->alarm = alarm; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncQueryAlarm( - Display *dpy, - XSyncAlarm alarm, - XSyncAlarmAttributes *values_return) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncQueryAlarmReq *req; - xSyncQueryAlarmReply rep; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncQueryAlarm, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncQueryAlarm; - req->alarm = alarm; - - if (!(_XReply(dpy, (xReply *) & rep, - ((SIZEOF(xSyncQueryAlarmReply) - SIZEOF(xGenericReply)) >> 2), xFalse))) - { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - values_return->trigger.counter = rep.counter; - values_return->trigger.value_type = (XSyncValueType)rep.value_type; - XSyncIntsToValue(&values_return->trigger.wait_value, - rep.wait_value_lo, rep.wait_value_hi); - values_return->trigger.test_type = (XSyncTestType)rep.test_type; - XSyncIntsToValue(&values_return->delta, rep.delta_lo, - rep.delta_hi); - values_return->events = rep.events; - values_return->state = (XSyncAlarmState)rep.state; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncChangeAlarm( - Display *dpy, - XSyncAlarm alarm, - unsigned long values_mask, - XSyncAlarmAttributes *values) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncChangeAlarmReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncChangeAlarm, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncChangeAlarm; - req->alarm = alarm; - values_mask &= XSyncCACounter | XSyncCAValueType | XSyncCAValue - | XSyncCATestType | XSyncCADelta | XSyncCAEvents; - if ((req->valueMask = values_mask)) - _XProcessAlarmAttributes(dpy, req, values_mask, values); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncSetPriority( - Display *dpy, - XID client_resource_id, - int priority) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncSetPriorityReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncSetPriority, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncSetPriority; - req->id = client_resource_id; - req->priority = priority; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -XSyncGetPriority(Display *dpy, XID client_resource_id, int *return_priority) -{ - XExtDisplayInfo *info = find_display(dpy); - xSyncGetPriorityReply rep; - xSyncGetPriorityReq *req; - - SyncCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(SyncGetPriority, req); - req->reqType = info->codes->major_opcode; - req->syncReqType = X_SyncGetPriority; - req->id = client_resource_id; - - if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - if (return_priority) - *return_priority = rep.priority; - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* - * Functions corresponding to the macros for manipulating 64-bit values - */ - -/* get rid of macros so we can define corresponding functions */ -#undef XSyncIntToValue -#undef XSyncIntsToValue -#undef XSyncValueGreaterThan -#undef XSyncValueLessThan -#undef XSyncValueGreaterOrEqual -#undef XSyncValueLessOrEqual -#undef XSyncValueEqual -#undef XSyncValueIsNegative -#undef XSyncValueIsZero -#undef XSyncValueIsPositive -#undef XSyncValueLow32 -#undef XSyncValueHigh32 -#undef XSyncValueAdd -#undef XSyncValueSubtract -#undef XSyncMaxValue -#undef XSyncMinValue - -void -XSyncIntToValue(XSyncValue *pv, int i) -{ - _XSyncIntToValue(pv,i); -} - -void -XSyncIntsToValue(XSyncValue *pv, unsigned int l, int h) -{ - _XSyncIntsToValue(pv, l, h); -} - -Bool -XSyncValueGreaterThan(XSyncValue a, XSyncValue b) -{ - return _XSyncValueGreaterThan(a, b); -} - -Bool -XSyncValueLessThan(XSyncValue a, XSyncValue b) -{ - return _XSyncValueLessThan(a, b); -} - -Bool -XSyncValueGreaterOrEqual(XSyncValue a, XSyncValue b) -{ - return _XSyncValueGreaterOrEqual(a, b); -} - -Bool -XSyncValueLessOrEqual(XSyncValue a, XSyncValue b) -{ - return _XSyncValueLessOrEqual(a, b); -} - -Bool -XSyncValueEqual(XSyncValue a, XSyncValue b) -{ - return _XSyncValueEqual(a, b); -} - -Bool -XSyncValueIsNegative(XSyncValue v) -{ - return _XSyncValueIsNegative(v); -} - -Bool -XSyncValueIsZero(XSyncValue a) -{ - return _XSyncValueIsZero(a); -} - -Bool -XSyncValueIsPositive(XSyncValue v) -{ - return _XSyncValueIsPositive(v); -} - -unsigned int -XSyncValueLow32(XSyncValue v) -{ - return _XSyncValueLow32(v); -} - -int -XSyncValueHigh32(XSyncValue v) -{ - return _XSyncValueHigh32(v); -} - -void -XSyncValueAdd(XSyncValue *presult, XSyncValue a, XSyncValue b, Bool *poverflow) -{ - _XSyncValueAdd(presult, a, b, poverflow); -} - -void -XSyncValueSubtract( - XSyncValue *presult, - XSyncValue a, XSyncValue b, - Bool *poverflow) -{ - _XSyncValueSubtract(presult, a, b, poverflow); -} - -void -XSyncMaxValue(XSyncValue *pv) -{ - _XSyncMaxValue(pv); -} - -void -XSyncMinValue(XSyncValue *pv) -{ - _XSyncMinValue(pv); -} diff --git a/nx-X11/lib/Xext/XTestExt1.c b/nx-X11/lib/Xext/XTestExt1.c deleted file mode 100644 index 00da036bd..000000000 --- a/nx-X11/lib/Xext/XTestExt1.c +++ /dev/null @@ -1,1321 +0,0 @@ -/* $Xorg: XTestExt1.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ */ -/* - * File: xtestext1lib.c - * - * This file contains the Xlib parts of the input synthesis extension - */ - -/* - - -Copyright 1986, 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - - -Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation - -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 Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Hewlett-Packard makes no representations about the -suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ -/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ - -/****************************************************************************** - * include files - *****************************************************************************/ - -#define NEED_REPLIES -#define NEED_EVENTS - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -/****************************************************************************** - * variables - *****************************************************************************/ - -/* - * Holds the request type code for this extension. The request type code - * for this extension may vary depending on how many extensions are installed - * already, so the initial value given below will be added to the base request - * code that is aquired when this extension is installed. - */ -static int XTestReqCode = 0; -/* - * Holds the two event type codes for this extension. The event type codes - * for this extension may vary depending on how many extensions are installed - * already, so the initial values given below will be added to the base event - * code that is aquired when this extension is installed. - * - * These two variables must be available to programs that use this extension. - */ -int XTestInputActionType = 0; -int XTestFakeAckType = 1; -/* - * holds the current x and y coordinates for XTestMovePointer - */ -static int current_x = 0; -static int current_y = 0; -/* - * Holds input actions being accumulated until the input action buffer is - * full or until XTestFlush is called. - */ -static CARD8 action_buf[XTestMAX_ACTION_LIST_SIZE]; -/* - * the index into the input action buffer - */ -static int action_index = 0; -/* - * the number of input actions that the server can handle at one time - */ -static unsigned long action_array_size = 0; -/* - * the current number of input actions - */ -static unsigned long action_count = 0; - -/****************************************************************************** - * function declarations - *****************************************************************************/ - -static int XTestWireToEvent(Display *dpy, XEvent *reTemp, xEvent *eventTemp); -static int XTestCheckExtInit(register Display *dpy); -static Bool XTestIdentifyMyEvent(Display *display, XEvent *event_ptr, char *args); -static int XTestInitExtension(register Display *dpy); -static int XTestKeyOrButton(Display *display, int device_id, long unsigned int delay, unsigned int code, unsigned int action); -static int XTestCheckDelay(Display *display, long unsigned int *delay_addr); -static int XTestPackInputAction(Display *display, CARD8 *action_addr, int action_size); -static int XTestWriteInputActions(Display *display, char *action_list_addr, int action_list_size, int ack_flag); - -/****************************************************************************** - * - * XTestFakeInput - * - * Send a a request containing one or more input actions to be sent - * to the server by this extension. - */ -int -XTestFakeInput( -/* - * the connection to the X server - */ -register Display *dpy, -/* - * the address of a list of input actions to be sent to the server - */ -char *action_list_addr, -/* - * the size (in bytes) of the list of input actions - */ -int action_list_size, -/* - * specifies whether the server needs to send an event to indicate that its - * input action buffer is empty - */ -int ack_flag) -{ - /* - * pointer to xTestFakeInputReq structure - */ - xTestFakeInputReq *req; - /* - * loop index - */ - int i; - - LockDisplay(dpy); - if ((XTestCheckExtInit(dpy) == -1) || - (action_list_size > XTestMAX_ACTION_LIST_SIZE)) - { - /* - * if the extension is not installed in the server or the - * action list will not fit in the request, then unlock - * the display and return -1. - */ - UnlockDisplay(dpy); - return(-1); - } - else - { - /* - * Get the next available X request packet in the buffer. - * It sets the `length' field to the size (in 32-bit words) - * of the request. It also sets the `reqType' field in the - * request to X_TestFakeInput, which is not what is needed. - * - * GetReq is a macro defined in Xlibint.h. - */ - GetReq(TestFakeInput, req); - /* - * fix up the request type code to what is needed - */ - req->reqType = XTestReqCode; - /* - * set the minor request type code to X_TestFakeInput - */ - req->XTestReqType = X_TestFakeInput; - /* - * set the ack code - */ - req->ack = ack_flag; - /* - * Set the action_list area to all 0's. An input action header - * value of 0 is interpreted as a flag to the input action - * list handling code in the server part of this extension - * that there are no more input actions in this request. - */ - for (i = 0; i < XTestMAX_ACTION_LIST_SIZE; i++) - { - req->action_list[i] = 0; - } - /* - * copy the input actions into the request - */ - for (i = 0; i < action_list_size; i++) - { - req->action_list[i] = *(action_list_addr++); - } - UnlockDisplay(dpy); - SyncHandle(); - return(0); - } -} - -/****************************************************************************** - * - * XTestGetInput - * - * Request the server to begin putting user input actions into events - * to be sent to the client that called this function. - */ -int -XTestGetInput( -/* - * the connection to the X server - */ -register Display *dpy, -/* - * tells the server what to do with the user input actions - */ -int action_handling) -{ - /* - * pointer to xTestGetInputReq structure - */ - xTestGetInputReq *req; - - LockDisplay(dpy); - if (XTestCheckExtInit(dpy) == -1) - { - /* - * if the extension is not installed in the server - * then unlock the display and return -1. - */ - UnlockDisplay(dpy); - return(-1); - } - else - { - /* - * Get the next available X request packet in the buffer. - * It sets the `length' field to the size (in 32-bit words) - * of the request. It also sets the `reqType' field in the - * request to X_TestGetInput, which is not what is needed. - * - * GetReq is a macro defined in Xlibint.h. - */ - GetReq(TestGetInput, req); - /* - * fix up the request type code to what is needed - */ - req->reqType = XTestReqCode; - /* - * set the minor request type code to X_TestGetInput - */ - req->XTestReqType = X_TestGetInput; - /* - * set the action handling mode - */ - req->mode = action_handling; - UnlockDisplay(dpy); - SyncHandle(); - return(0); - } -} - -/****************************************************************************** - * - * XTestStopInput - * - * Tell the server to stop putting information about user input actions - * into events. - */ -int -XTestStopInput( -/* - * the connection to the X server - */ -register Display *dpy) -{ - /* - * pointer to xTestStopInputReq structure - */ - xTestStopInputReq *req; - - LockDisplay(dpy); - if (XTestCheckExtInit(dpy) == -1) - { - /* - * if the extension is not installed in the server - * then unlock the display and return -1. - */ - UnlockDisplay(dpy); - return(-1); - } - else - { - /* - * Get the next available X request packet in the buffer. - * It sets the `length' field to the size (in 32-bit words) - * of the request. It also sets the `reqType' field in the - * request to X_TestStopInput, which is not what is needed. - * - * GetReq is a macro defined in Xlibint.h. - */ - GetReq(TestStopInput, req); - /* - * fix up the request type code to what is needed - */ - req->reqType = XTestReqCode; - /* - * set the minor request type code to X_TestStopInput - */ - req->XTestReqType = X_TestStopInput; - UnlockDisplay(dpy); - SyncHandle(); - return(0); - } -} - -/****************************************************************************** - * - * XTestReset - * - * Tell the server to set everything having to do with this extension - * back to its initial state. - */ -int -XTestReset( -/* - * the connection to the X server - */ -register Display *dpy) -{ - /* - * pointer to xTestReset structure - */ - xTestResetReq *req; - - LockDisplay(dpy); - if (XTestCheckExtInit(dpy) == -1) - { - /* - * if the extension is not installed in the server - * then unlock the display and return -1. - */ - UnlockDisplay(dpy); - return(-1); - } - else - { - /* - * Get the next available X request packet in the buffer. - * It sets the `length' field to the size (in 32-bit words) - * of the request. It also sets the `reqType' field in the - * request to X_TestReset, which is not what is needed. - * - * GetReq is a macro defined in Xlibint.h. - */ - GetReq(TestReset, req); - /* - * fix up the request type code to what is needed - */ - req->reqType = XTestReqCode; - /* - * set the minor request type code to X_TestReset - */ - req->XTestReqType = X_TestReset; - UnlockDisplay(dpy); - SyncHandle(); - return(0); - } -} - -/****************************************************************************** - * - * XTestQueryInputSize - * - * Returns the number of input actions in the server's input action buffer. - */ -int -XTestQueryInputSize( -/* - * the connection to the X server - */ -register Display *dpy, -/* - * the address of the place to put the number of input actions in the - * server's input action buffer - */ -unsigned long *size_return) -{ - /* - * pointer to xTestQueryInputSize structure - */ - xTestQueryInputSizeReq *req; - /* - * pointer to xTestQueryInputSize structure - */ - xTestQueryInputSizeReply rep; - - LockDisplay(dpy); - if (XTestCheckExtInit(dpy) == -1) - { - /* - * if the extension is not installed in the server - * then unlock the display and return -1. - */ - UnlockDisplay(dpy); - return(-1); - } - else - { - /* - * Get the next available X request packet in the buffer. - * It sets the `length' field to the size (in 32-bit words) - * of the request. It also sets the `reqType' field in the - * request to X_TestQueryInputSize, which is not what is needed. - * - * GetReq is a macro defined in Xlibint.h. - */ - GetReq(TestQueryInputSize, req); - /* - * fix up the request type code to what is needed - */ - req->reqType = XTestReqCode; - /* - * set the minor request type code to X_TestQueryInputSize - */ - req->XTestReqType = X_TestQueryInputSize; - /* - * get a reply from the server - */ - (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); - /* - * put the size in the caller's variable - */ - *size_return = (unsigned long) rep.size_return; - UnlockDisplay(dpy); - SyncHandle(); - return(0); - } -} - -/****************************************************************************** - * - * XTestCheckExtInit - * - * Check to see if the XTest extension is installed in the server. - */ -static int -XTestCheckExtInit( -/* - * the connection to the X server - */ -register Display *dpy) -{ - /* - * if the extension has not been initialized, then do so - */ - if (!XTestReqCode) - { - return(XTestInitExtension(dpy)); - } - return(0); -} - -/****************************************************************************** - * - * XTestInitExtension - * - * Attempt to initialize this extension in the server. Return 0 if it - * succeeds, -1 if it does not succeed. - */ -static int -XTestInitExtension( -/* - * the connection to the X server - */ -register Display *dpy) -{ - /* - * loop index - */ - int i; - /* - * return value from XInitExtension - */ - XExtCodes *ret; - - /* - * attempt to initialize the extension - */ - ret = XInitExtension(dpy, XTestEXTENSION_NAME); - /* - * if the initialize failed, return -1 - */ - if (ret == NULL) - { - return (-1); - } - /* - * the initialize succeeded, remember the major opcode - * for this extension - */ - XTestReqCode = ret->major_opcode; - /* - * set up the event handler for any events from - * this extension - */ - for (i = 0; i < XTestEVENT_COUNT; i++) - { - XESetWireToEvent(dpy, - ret->first_event+i, - XTestWireToEvent); - } - /* - * compute the event type codes for the events - * in this extension - */ - XTestInputActionType += ret->first_event; - XTestFakeAckType += ret->first_event; - /* - * everything worked ok - */ - return(0); -} - -/****************************************************************************** - * - * XTestWireToEvent - * - * Handle XTest extension events. - * Reformat a wire event into an XEvent structure of the right type. - */ -static Bool -XTestWireToEvent( -/* - * the connection to the X server - */ -Display *dpy, -/* - * a pointer to where a host formatted event should be stored - * with the information copied to it - */ -XEvent *reTemp, -/* - * a pointer to the wire event - */ -xEvent *eventTemp) -{ - XTestInputActionEvent *re = (XTestInputActionEvent *) reTemp; - xTestInputActionEvent *event = (xTestInputActionEvent *) eventTemp; - - /* - * loop index - */ - int i; - /* - * pointer to where the input actions go in the host format event - */ - CARD8 *to; - /* - * pointer to the input actions in the wire event - */ - CARD8 *from; - - /* - * Copy the type of the wire event to the new event. - * This will work for either event type because the type, - * display, and window fields in the events have to be the same. - */ - re->type = event->type; - /* - * set the display parameter in case it is needed (by who?) - */ - re->display = dpy; - if (re->type == XTestInputActionType) - { - /* - * point at the first byte of input actions in the wire event - */ - from = &(event->actions[0]); - /* - * point at where the input action bytes go in the new event - */ - to = &(re->actions[0]); - /* - * copy the input action bytes from the wire event to - * the new event - */ - for (i = 0; i < XTestACTIONS_SIZE; i++) - { - *(to++) = *(from++); - } - } - else if (re->type == XTestFakeAckType) - { - /* - * nothing else needs to be done - */ - } - else - { - printf("XTestWireToEvent: UNKNOWN WIRE EVENT! type=%d\n", - (int) event->type); - printf("%s is giving up.\n", XTestEXTENSION_NAME); - exit (1); - } - return 1; -} - -/****************************************************************************** - * - * XTestPressKey - * - * Send input actions to the server to cause the server to think - * that the specified key on the keyboard was moved as specified. - */ -int -XTestPressKey( -Display *display, -int device_id, -unsigned long delay, -unsigned int keycode, -unsigned int key_action) -{ - /* - * bounds check the key code - */ - if (keycode < 8 || keycode > 255) - { - return(-1); - } - /* - * use the commmon key/button handling routine - */ - return(XTestKeyOrButton(display, - device_id, - delay, - keycode, - key_action)); -} - -/****************************************************************************** - * - * XTestPressButton - * - * Send input actions to the server to cause the server to think - * that the specified button on the mouse was moved as specified. - */ -int -XTestPressButton( -Display *display, -int device_id, -unsigned long delay, -unsigned int button_number, -unsigned int button_action) -{ - /* - * bounds check the button number - */ - if (button_number > 7) - { - return(-1); - } - /* - * use the commmon key/button handling routine - */ - return(XTestKeyOrButton(display, - device_id, - delay, - button_number, - button_action)); -} - -/****************************************************************************** - * - * XTestKeyOrButton - * - * Send input actions to the server to cause the server to think - * that the specified key/button was moved as specified. - */ -static int -XTestKeyOrButton( -Display *display, -int device_id, -unsigned long delay, -unsigned int code, -unsigned int action) -{ - /* - * holds a key input action to be filled out and sent to the server - */ - XTestKeyInfo keyinfo; - - /* - * bounds check the device id - */ - if (device_id < 0 || device_id > XTestMAX_DEVICE_ID) - { - return(-1); - } - /* - * fill out the key input action(s) as appropriate - */ - switch(action) - { - case XTestPRESS: - /* - * Check the delay. If it is larger than will fit in the - * key input action, send a delay input action. - */ - if(XTestCheckDelay(display, &delay) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * create the header - */ - keyinfo.header = XTestPackDeviceID(device_id) | - XTestKEY_ACTION | - XTestKEY_DOWN; - /* - * set the key/button code - */ - keyinfo.keycode = code; - /* - * set the delay time - */ - keyinfo.delay_time = delay; - /* - * pack the input action into a request to be sent to the - * server when the request is full or XTestFlush is called - */ - return(XTestPackInputAction(display, - (CARD8 *) &keyinfo, - sizeof(XTestKeyInfo))); - case XTestRELEASE: - /* - * Check the delay. If it is larger than will fit in the - * key input action, send a delay input action. - */ - if(XTestCheckDelay(display, &delay) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * create the header - */ - keyinfo.header = XTestPackDeviceID(device_id) | - XTestKEY_ACTION | - XTestKEY_UP; - /* - * set the key/button code - */ - keyinfo.keycode = code; - /* - * set the delay time - */ - keyinfo.delay_time = delay; - /* - * pack the input action into a request to be sent to the - * server when the request is full or XTestFlush is called - */ - return(XTestPackInputAction(display, - (CARD8 *) &keyinfo, - sizeof(XTestKeyInfo))); - case XTestSTROKE: - /* - * Check the delay. If it is larger than will fit in the - * key input action, send a delay input action. - */ - if(XTestCheckDelay(display, &delay) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * create a key/button-down input action header - */ - keyinfo.header = XTestPackDeviceID(device_id) | - XTestKEY_ACTION | - XTestKEY_DOWN; - /* - * set the key/button code - */ - keyinfo.keycode = code; - /* - * set the delay time - */ - keyinfo.delay_time = delay; - /* - * pack the input action into a request to be sent to the - * server when the request is full or XTestFlush is called - */ - if (XTestPackInputAction(display, - (CARD8 *) &keyinfo, - sizeof(XTestKeyInfo)) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * set the delay to XTestSTROKE_DELAY_TIME - */ - delay = XTestSTROKE_DELAY_TIME; - /* - * Check the delay. If it is larger than will fit in the - * key input action, send a delay input action. - */ - if(XTestCheckDelay(display, &delay) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * create a key/button-up input action header - */ - keyinfo.header = XTestPackDeviceID(device_id) | - XTestKEY_ACTION | - XTestKEY_UP; - /* - * set the key/button code - */ - keyinfo.keycode = code; - /* - * set the delay time - */ - keyinfo.delay_time = delay; - /* - * pack the input action into a request to be sent to the - * server when the request is full or XTestFlush is called - */ - return(XTestPackInputAction(display, - (CARD8 *) &keyinfo, - sizeof(XTestKeyInfo))); - default: - /* - * invalid action value, return -1 - */ - return(-1); - } -} - -/****************************************************************************** - * - * XTestMovePointer - * - * Send input actions to the server to cause the server to think - * that the mouse was moved as specified. - */ -int -XTestMovePointer( -Display *display, -int device_id, -unsigned long delay[], -int x[], -int y[], -unsigned int count) -{ - /* - * holds a motion input action to be filled out and sent to the server - */ - XTestMotionInfo motioninfo; - /* - * holds a jump input action to be filled out and sent to the server - */ - XTestJumpInfo jumpinfo; - /* - * loop index - */ - unsigned int i; - /* - * holds the change in x and y directions from the current x and y - * coordinates - */ - int dx; - int dy; - - /* - * bounds check the device id - */ - if (device_id < 0 || device_id > XTestMAX_DEVICE_ID) - { - return(-1); - } - /* - * if the count is 0, there is nothing to do. return 0 - */ - if (count == 0) - { - return(0); - } - /* - * loop through the pointer motions, creating the appropriate - * input actions for each motion - */ - for (i = 0; i < count; i++) - { - /* - * Check the delay. If it is larger than will fit in the - * input action, send a delay input action. - */ - if(XTestCheckDelay(display, &(delay[i])) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - /* - * compute the change from the current x and y coordinates - * to the new x and y coordinates - */ - dx = x[i] - current_x; - dy = y[i] - current_y; - /* - * update the current x and y coordinates - */ - current_x = x[i]; - current_y = y[i]; - /* - * If the pointer motion range is too large to fit into - * a motion input action, then use a jump input action. - * Otherwise, use a motion input action. - */ - if ((dx > XTestMOTION_MAX) || (dx < XTestMOTION_MIN) || - (dy > XTestMOTION_MAX) || (dy < XTestMOTION_MIN)) - { - /* - * create a jump input action header - */ - jumpinfo.header = XTestPackDeviceID(device_id) | - XTestJUMP_ACTION; - /* - * set the x and y coordinates to jump to - */ - jumpinfo.jumpx = x[i]; - jumpinfo.jumpy = y[i]; - /* - * set the delay time - */ - jumpinfo.delay_time = delay[i]; - /* - * pack the jump input action into a request to be - * sent to the server when the request is full - * or XTestFlush is called - */ - if (XTestPackInputAction(display, - (CARD8 *) &jumpinfo, - sizeof(XTestJumpInfo)) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - } - else - { - /* - * create a motion input action header - */ - motioninfo.header = XTestPackDeviceID(device_id) | - XTestMOTION_ACTION; - /* - * compute the motion data byte - */ - if (dx < 0) - { - motioninfo.header |= XTestX_NEGATIVE; - dx = abs(dx); - } - if (dy < 0) - { - motioninfo.header |= XTestY_NEGATIVE; - dy = abs(dy); - } - motioninfo.motion_data = XTestPackXMotionValue(dx); - motioninfo.motion_data |= XTestPackYMotionValue(dy); - /* - * set the delay time - */ - motioninfo.delay_time = delay[i]; - /* - * pack the motion input action into a request to be - * sent to the server when the request is full - * or XTestFlush is called - */ - if (XTestPackInputAction(display, - (CARD8 *) &motioninfo, - sizeof(XTestMotionInfo)) == -1) - { - /* - * an error occurred, return -1 - */ - return(-1); - } - } - } - /* - * if you get here, everything went ok - */ - return(0); -} - -/****************************************************************************** - * - * XTestCheckDelay - * - * Check the delay value at the passed-in address. If it is larger than - * will fit in a normal input action, then send a delay input action. - */ -static int -XTestCheckDelay( -Display *display, -unsigned long *delay_addr) -{ - /* - * holds a delay input action to be filled out and sent to the server - */ - XTestDelayInfo delayinfo; - - /* - * if the delay value will fit in the input action, - * then there is no need for a delay input action - */ - if (*delay_addr <= XTestSHORT_DELAY_TIME) - { - return(0); - } - /* - * fill out a delay input action - */ - delayinfo.header = XTestPackDeviceID(XTestDELAY_DEVICE_ID); - delayinfo.delay_time = *delay_addr; - /* - * all of the delay time will be accounted for in the - * delay input action, so set the original delay value to 0 - */ - *delay_addr = 0; - /* - * pack the delay input action into a request to be sent to the - * server when the request is full or XTestFlush is called - */ - return(XTestPackInputAction(display, - (CARD8 *) &delayinfo, - sizeof(XTestDelayInfo))); -} - -/****************************************************************************** - * - * XTestPackInputAction - * - * If the input action buffer is full or the number of input actions - * has reached the maximum that the server can handle at one time, - * then send the input actions to the server using XTestFakeInput. - */ -static int -XTestPackInputAction( -Display *display, -CARD8 *action_addr, -int action_size) -{ - /* - * loop index - */ - int i; - /* - * acknowledge flag - */ - int ack_flag; - - /* - * if we don't already know it, find out how many input actions - * the server can handle at one time - */ - if (action_array_size == 0) - { - if(XTestQueryInputSize(display, &action_array_size) == -1) - { - /* - * if an error, return -1 - */ - return(-1); - } - } - /* - * if the specified input action will fit in the the input - * action buffer and won't exceed the server's capacity, then - * put the input action into the input buffer - */ - if(((action_index + action_size) <= XTestMAX_ACTION_LIST_SIZE) && - ((action_count + 1) < action_array_size)) - { - /* - * copy the input action into the buffer - */ - for (i = 0; i < action_size; i++) - { - action_buf[action_index++] = *(action_addr++); - } - /* - * increment the action count - */ - action_count++; - /* - * everything went ok, return 0 - */ - return(0); - } - /* - * We have to write input actions to the server. If the server's - * input action capacity will be reached, then ask for an - * acknowledge event when the server has processed all of the - * input actions. Otherwise, an acknowledge event is not needed. - */ - if (action_count >= action_array_size) - { - ack_flag = XTestFAKE_ACK_REQUEST; - } - else - { - ack_flag = XTestFAKE_ACK_NOT_NEEDED; - } - /* - * write the input actions to the server - */ - if (XTestWriteInputActions(display, - (char *) &(action_buf[0]), - action_index, - ack_flag) == -1) - { - /* - * error, return -1 - */ - return(-1); - } - /* - * copy the input action into the buffer - */ - for (i = 0; i < action_size; i++) - { - action_buf[action_index++] = *(action_addr++); - } - /* - * increment the action count - */ - action_count++; - return(0); -} - -/****************************************************************************** - * - * XTestWriteInputActions - * - * Send input actions to the server. - */ -static int -XTestWriteInputActions( -Display *display, -char *action_list_addr, -int action_list_size, -int ack_flag) -{ - /* - * Holds an event. Used while waiting for an acknowledge event - */ - XEvent event; - /* - * points to XTestIdentifyMyEvent - */ - Bool (*func_ptr)(); - - /* - * write the input actions to the server - */ - if (XTestFakeInput(display, - action_list_addr, - action_list_size, - ack_flag) == -1) - { - /* - * if an error, return -1 - */ - return(-1); - } - /* - * flush X's buffers to make sure that the server really gets - * the input actions - */ - XFlush(display); - /* - * mark the input action buffer as empty - */ - action_index = 0; - /* - * if we asked for an acknowledge event, then wait for it - */ - if (ack_flag == XTestFAKE_ACK_REQUEST) - { - /* - * point func_ptr at XTestIdentifyMyEvent - */ - func_ptr = XTestIdentifyMyEvent; - /* - * Wait until the acknowledge event comes. When the - * acknowledge event comes, it is removed from the event - * queue without disturbing any other events that might - * be in the queue. - */ - XIfEvent(display, &event, func_ptr, NULL); - /* - * set the input action count back to 0 - */ - action_count = 0; - } - /* - * if we got here, then everything is ok, return 0 - */ - return(0); -} - -/****************************************************************************** - * - * XTestIdentifyMyEvent - * - * This function is called by XIfEvent to look at an event and see if - * it is of XTestFakeAckType. - */ -static Bool -XTestIdentifyMyEvent( -Display *display, -/* - * Holds the event that this routiine is supposed to look at. - */ -XEvent *event_ptr, -/* - * this points to any user-specified arguments (ignored) - */ -char *args) -{ - /* - * if the event if of the correct type, return the Bool True, - * otherwise return the Bool False. - */ - if (event_ptr->type == XTestFakeAckType) - { - return(True); - } - else - { - return(False); - } -} - -/****************************************************************************** - * - * XTestFlush - * - * Send any input actions in the input action buffer to the server. - */ -int -XTestFlush(Display *display) -{ - /* - * acknowledge flag - */ - int ack_flag; - - /* - * if there are no input actions in the input action buffer, - * then return 0 - */ - if (action_index == 0) - { - return(0); - } - /* - * We have input actions to write to the server. We will - * wait until the server has finished processing the input actions. - */ - ack_flag = XTestFAKE_ACK_REQUEST; - /* - * write the input actions to the server - */ - return(XTestWriteInputActions(display, - (char *) &(action_buf[0]), - action_index, - ack_flag)); -} diff --git a/nx-X11/lib/Xext/Xext-def.cpp b/nx-X11/lib/Xext/Xext-def.cpp deleted file mode 100644 index 6ee37c70f..000000000 --- a/nx-X11/lib/Xext/Xext-def.cpp +++ /dev/null @@ -1,99 +0,0 @@ -LIBRARY XEXT -VERSION LIBRARY_VERSION -EXPORTS - XMissingExtension - XSetExtensionErrorHandler - XShapeCombineMask - XShapeCombineRectangles - XShapeCombineRegion - XShapeCombineShape - XShapeGetRectangles - XShapeInputSelected - XShapeOffsetShape - XShapeQueryExtension - XShapeQueryExtents - XShapeQueryVersion - XShapeSelectInput -#if (defined(__CYGWIN__) && defined(HAS_SHM)) || defined(__UNIXOS2__) - XShmAttach - XShmCreateImage - XShmCreatePixmap - XShmDetach -;XShmDestroyImage - XShmGetEventBase - XShmGetImage - XShmPixmapFormat - XShmPutImage - XShmQueryExtension - XShmQueryVersion -#endif - XSyncAwait - XSyncChangeAlarm - XSyncChangeCounter - XSyncCreateAlarm - XSyncCreateCounter - XSyncDestroyAlarm - XSyncDestroyCounter - XSyncFreeSystemCounterList - XSyncGetPriority - XSyncInitialize - XSyncIntToValue - XSyncIntsToValue - XSyncListSystemCounters - XSyncMaxValue - XSyncMinValue - XSyncQueryAlarm - XSyncQueryCounter - XSyncQueryExtension - XSyncSetCounter - XSyncSetPriority - XSyncValueAdd - XSyncValueEqual - XSyncValueGreaterOrEqual - XSyncValueGreaterThan - XSyncValueHigh32 - XSyncValueIsNegative - XSyncValueIsPositive - XSyncValueIsZero - XSyncValueLessOrEqual - XSyncValueLessThan - XSyncValueLow32 - XSyncValueSubtract - XTestFakeInput - XTestFlush - XTestGetInput - XTestMovePointer - XTestPressButton - XTestPressKey - XTestQueryInputSize - XTestReset - XTestStopInput - XextAddDisplay - XextCreateExtension - XextDestroyExtension - XextFindDisplay - XextRemoveDisplay - XSecurityQueryExtension - XSecurityAllocXauth - XSecurityFreeXauth - XSecurityGenerateAuthorization - XSecurityRevokeAuthorization -#if !defined(__CYGWIN__) && !defined(__UNIXOS2__) - XPanoramiXQueryVersion - XPanoramiXAllocInfo - XPanoramiXGetScreenCount - XPanoramiXGetScreenSize - XPanoramiXGetState - XPanoramiXQueryExtension -#endif - DPMSQueryExtension - DPMSGetVersion - DPMSCapable - DPMSSetTimeouts - DPMSGetTimeouts - DPMSEnable - DPMSDisable - DPMSForceLevel - DPMSInfo -/* $Xorg: Xext-def.cpp,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ -/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.8 2001/05/06 10:35:51 alanh Exp $ */ diff --git a/nx-libs.spec b/nx-libs.spec index f00088093..cf0a25228 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -496,6 +496,10 @@ rm -r %{buildroot}%{_includedir}/GL rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XInput.h rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/dpms.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/security.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/sync.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/xtestext1.h rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %if 0%{?fdupes:1} @@ -561,12 +565,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %dir %{_includedir}/nx-X11/extensions %{_includedir}/nx-X11/extensions/XShm.h %{_includedir}/nx-X11/extensions/Xext.h -%{_includedir}/nx-X11/extensions/dpms.h %{_includedir}/nx-X11/extensions/extutil.h -%{_includedir}/nx-X11/extensions/security.h %{_includedir}/nx-X11/extensions/shape.h -%{_includedir}/nx-X11/extensions/sync.h -%{_includedir}/nx-X11/extensions/xtestext1.h %files -n libNX_Xext6 %defattr(-,root,root) -- cgit v1.2.3 From c355dc91d35c74234c24dfbf013dfac98110d352 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 22 Jun 2016 08:16:35 +0200 Subject: Makefile,debian/*,nx-libs.spec,: Drop references to X2Go Project, esp. drop x2goagent. The x2goagent package is being replaced by an x2goserver bin:package named x2goserver-x2goagent. This x2goserver-x2goagent bin:package will be maintained in the X2Go Project's namespace and basically wraps around nxagent. Furthermore, declare Arctica Project as upstream source for nx-libs. --- Makefile | 38 +++++------------------- VERSION.x2goagent | 1 - bin/x2goagent | 29 ------------------ debian/README.source | 29 +++--------------- debian/control | 77 +++++++++++++++++------------------------------- debian/nxagent.install | 1 + debian/nxproxy.install | 1 + debian/roll-tarballs.sh | 3 +- debian/watch | 3 ++ debian/watch.nx-X11 | 3 -- debian/watch.nxagent | 3 -- debian/watch.nxauth | 3 -- debian/watch.nxcomp | 3 -- debian/watch.nxcompext | 3 -- debian/watch.nxcompshad | 3 -- debian/watch.nxproxy | 3 -- debian/x2goagent.dirs | 3 -- debian/x2goagent.install | 10 ------- etc/x2goagent.keyboard | 1 - nx-libs.spec | 37 +---------------------- x2goagent.features | 37 ----------------------- 21 files changed, 46 insertions(+), 245 deletions(-) delete mode 120000 VERSION.x2goagent delete mode 100644 bin/x2goagent create mode 100644 debian/watch delete mode 100644 debian/watch.nx-X11 delete mode 100644 debian/watch.nxagent delete mode 100644 debian/watch.nxauth delete mode 100644 debian/watch.nxcomp delete mode 100644 debian/watch.nxcompext delete mode 100644 debian/watch.nxcompshad delete mode 100644 debian/watch.nxproxy delete mode 100644 debian/x2goagent.dirs delete mode 100644 debian/x2goagent.install delete mode 100644 etc/x2goagent.keyboard delete mode 100644 x2goagent.features (limited to 'debian') diff --git a/Makefile b/Makefile index c9a52ac02..e2077ed5b 100644 --- a/Makefile +++ b/Makefile @@ -9,15 +9,12 @@ RM_FILE=rm -f RM_DIR=rmdir -p --ignore-fail-on-non-empty ETCDIR_NX ?= /etc/nxagent -ETCDIR_X2GO ?= /etc/x2go PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin LIBDIR ?= $(PREFIX)/lib USRLIBDIR ?= $(LIBDIR) INCLUDEDIR ?= $(PREFIX)/include NXLIBDIR ?= $(PREFIX)/lib/nx -X2GOLIBDIR ?= $(PREFIX)/lib/x2go -X2GODATADIR ?= $(PREFIX)/share/x2go CONFIGURE ?= ./configure NX_VERSION_MAJOR=$(shell ./version.sh 1) @@ -98,30 +95,22 @@ install-lite: gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1 install-full: - for f in nxagent nxauth x2goagent; do \ + for f in nxagent nxauth; do \ $(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done for d in nxcompext nxcompshad; do \ $(MAKE) -C $$d install; done - $(INSTALL_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ - cd $(DESTDIR)$(X2GOLIBDIR)/bin/ && ln -sf $(NXLIBDIR)/bin/nxagent x2goagent - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/pixmaps - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/x2go.xpm $(DESTDIR)$(PREFIX)/share/pixmaps $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm $(DESTDIR)$(PREFIX)/share/pixmaps $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx $(INSTALL_FILE) nx-X11/programs/Xserver/Xext/SecurityPolicy $(DESTDIR)$(PREFIX)/share/nx - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go/versions - $(INSTALL_FILE) VERSION.x2goagent $(DESTDIR)$(PREFIX)/share/x2go/versions - $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin $(INSTALL_PROGRAM) nx-X11/programs/nxauth/nxauth $(DESTDIR)$(NXLIBDIR)/bin $(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(NXLIBDIR)/bin $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/x2goagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ $(INSTALL_FILE) nx-X11/programs/nxauth/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/ mv -f $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.1 @@ -156,23 +145,14 @@ install-full: done; \ $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX) - $(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO) $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/ - $(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_X2GO)/ - $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_X2GO)/ $(INSTALL_FILE) etc/rgb $(DESTDIR)$(ETCDIR_NX)/ $(INSTALL_FILE) etc/nxagent.keyboard $(DESTDIR)$(ETCDIR_NX)/ - $(INSTALL_FILE) etc/x2goagent.keyboard $(DESTDIR)$(ETCDIR_X2GO)/ - - # x2goagent.features file for X2Go - $(INSTALL_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ - $(INSTALL_FILE) x2goagent.features $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ - - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go - $(INSTALL_SYMLINK) $(ETCDIR_X2GO)/rgb $(DESTDIR)$(PREFIX)/share/x2go/rgb $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx $(INSTALL_SYMLINK) $(ETCDIR_NX)/rgb $(DESTDIR)$(PREFIX)/share/nx/rgb + $(INSTALL_FILE) VERSION $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxagent + $(INSTALL_FILE) VERSION $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxproxy uninstall: $(MAKE) uninstall-lite @@ -188,17 +168,15 @@ uninstall-lite: $(RM_FILE) $(DESTDIR)$(NXLIBDIR)/bin/nxproxy $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/bin/ $(RM_FILE) $(DESTDIR)$(PREFIX)/share/man/man1/*.1 + $(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxproxy + $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/ uninstall-full: - for f in nxagent nxauth x2goagent; do \ + for f in nxagent nxauth; do \ $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done - $(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent - $(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/ - - # x2goagent.features file for X2Go - $(RM_FILE) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/x2goagent.features - $(RM_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/ + $(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxagent + $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/ if test -d nx-X11; then \ if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \ diff --git a/VERSION.x2goagent b/VERSION.x2goagent deleted file mode 120000 index 974cf28e0..000000000 --- a/VERSION.x2goagent +++ /dev/null @@ -1 +0,0 @@ -VERSION \ No newline at end of file diff --git a/bin/x2goagent b/bin/x2goagent deleted file mode 100644 index 09011efbe..000000000 --- a/bin/x2goagent +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 Mike Gabriel -# -# 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 3 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, see http://www.gnu.org/licenses/. - -NXAPP=x2goagent -NX_LIBS=/usr/lib/nx -NX_LOCAL_LIBS=/usr/local/lib/nx - -# make sure nxagent starts properly with pam_tmpdir.so being in use -NX_TEMP=${NX_TEMP:-/tmp} -export NX_TEMP - -test -x $NX_LOCAL_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LOCAL_LIBS -test -x $NX_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LIBS - -exec $NX_LIBS/../x2go/bin/$NXAPP "$@" diff --git a/debian/README.source b/debian/README.source index 800a55d8a..a43fa1de5 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,12 +1,12 @@ UPSTREAM SOURCES ---------------- -The current upstream source for this package is NoMachine. -http://www.nomachine.com/sources.php +The current upstream source for this package is the Arctica Project. +https://github.com/ArcticaProject/nx-libs PACKAGE SOURCE TREE ------------------- -This package pulls in 7 source tarballs from NoMachine: +This package originally pulled in 7 source tarballs from NoMachine: nx-X11 nxagent @@ -16,26 +16,5 @@ This package pulls in 7 source tarballs from NoMachine: nxcompext nxproxy -Intensive tests with X2Go/FreeNX on Debian squeeze+ systems showed an extreme -instability of nxagent when the named sources had been built separately against the -distribution's Xorg & co. libraries. -The recommended build method by NoMachine is placing the above projects into one -big source tree and build them in one go. When this build method is chosen, -the instability issues of nxagent (and x2goagent) disappear. - -Unfortunately, so far we could not track down the exact problem of building the -above sources in separate packages. - - -PATCH SYSTEM ------------- -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and -applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - - - -X2Go Packaging Team / Mike Gabriel (20111231) \ No newline at end of file +Arctica Project / Mike Gabriel (2016-06-22) \ No newline at end of file diff --git a/debian/control b/debian/control index a621bddd7..2344dd37f 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,10 @@ Source: nx-libs Section: x11 Priority: extra -Maintainer: X2Go Developers +Maintainer: Artica Project Uploaders: - Reinhard Tartler , Mike Gabriel , - Oleksandr Shneyder , + Mihai Moldovan Build-Depends: debhelper (>= 7.0.50~), libpng-dev, @@ -30,9 +29,9 @@ Build-Depends: expat, libpixman-1-dev (>= 0.13.2), Standards-Version: 3.9.6 -Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary -Vcs-Git: git://code.x2go.org/nx-libs.git -Vcs-Browser: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary +Homepage: https://github.com/ArcticaProject/nx-libs/ +Vcs-Git: https://github.com/ArcticaProject/nx-libs/ +Vcs-Browser: https://github.com/ArcticaProject/nx-libs/ Package: nx-x11-common Architecture: all @@ -40,8 +39,8 @@ Multi-Arch: foreign Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), - nxagent (<< 2:3.5.0.29-0x2go2~), + libnx-x11 (<< 2:3.5.0.29-1~), + nxagent (<< 2:3.5.0.29-1~), Description: nx-X11 (common files) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -55,7 +54,7 @@ Architecture: any Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), Description: nx-X11 core wire protocol and auxiliary headers NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -89,7 +88,7 @@ Depends: ${misc:Depends}, nx-x11-common (>= ${source:Version}), nx-x11-common (<< ${source:Version}.1), Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), + libnx-x11 (<< 2:3.5.0.29-1~), Replaces: nxlibs, Description: nx-X11 client-side library NX is a software suite which implements very efficient @@ -125,7 +124,7 @@ Depends: libnx-x11-6 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Replaces: nx-x11-dbg, Description: nx-X11 client-side library (debug package) NX is a software suite which implements very efficient @@ -144,7 +143,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), + libnx-x11 (<< 2:3.5.0.29-1~), Description: nx-X11 authorisation library NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -163,7 +162,7 @@ Depends: libnx-xau6 (= ${binary:Version}), ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), Description: nx-X11 authorisation library (development headers) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -184,7 +183,7 @@ Depends: libnx-xau6 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 authorisation library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -239,7 +238,7 @@ Multi-Arch: same Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), Description: nx-X11 Composite extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -402,7 +401,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-0x2go2~), + libnx-x11 (<< 2:3.5.0.29-1~), Description: nx-X11 miscellaneous extension library NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -424,7 +423,7 @@ Depends: nx-x11proto-xext-dev (= ${binary:Version}), ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), Description: nx-X11 miscellaneous extension library (development headers) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -443,7 +442,7 @@ Depends: libnx-xext6 (= ${binary:Version}), ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), libnx-xext-dev (<< 2:3.5.99.0~), Description: nx-X11 miscellaneous extension wire protocol NX is a software suite which implements very efficient @@ -463,7 +462,7 @@ Depends: libnx-xext6 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 miscellaneous extension library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -516,7 +515,7 @@ Multi-Arch: same Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-0x2go2~), + libnx-x11-dev (<< 2:3.5.0.29-1~), Description: nx-X11 'xfixes' extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -604,7 +603,7 @@ Depends: libnx-xinerama1 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 Xinerama extension library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -661,7 +660,7 @@ Pre-Depends: Depends: ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 pixmap library (debug package, dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -919,7 +918,7 @@ Multi-Arch: foreign Depends: nxagent (= ${binary:Version}), ${misc:Depends}, -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: NX agent (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -934,28 +933,6 @@ Description: NX agent (debug package) helpful backtraces. You can safely remove it if you do not intend to debug NX packages on this system. -Package: x2goagent -Architecture: all -Depends: - nxagent (>= ${source:Version}), nxagent (<< ${source:Version}.1), - ${misc:Depends}, -Suggests: - x2goserver -Description: X2Go agent - X2Go is a software suite that uses NX technology for remote desktop - computing. - . - NX technology implements a very efficient compression of the X11 protocol. - This increases performance when using X applications over a network, - especially a slow one. - . - X2Go agent functionality has been completely incorporated into NX agent's - code base. If the nxagent binary is executed under the name of `x2goagent', - the X2Go functionalities get activated. - . - The x2goagent package is a wrapper that activates X2Go branding in nxagent. - Please refer to the nxagent package's description for more information on NX. - Package: nxproxy Architecture: any Breaks: qvd-nxproxy @@ -980,7 +957,7 @@ Depends: ${misc:Depends}, Suggests: libxcomp3-dbg, -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: NX proxy (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -1012,7 +989,7 @@ Multi-Arch: foreign Depends: nxauth (= ${binary:Version}), ${misc:Depends}, -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: NX auth (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -1070,7 +1047,7 @@ Depends: libxcomp3 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 compression library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -1125,7 +1102,7 @@ Depends: libxcompext3 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 protocol compression extensions library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when @@ -1179,7 +1156,7 @@ Depends: libxcompshad3 (= ${binary:Version}), ${misc:Depends}, Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~), +Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), Description: nx-X11 shadowing library (debug package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when diff --git a/debian/nxagent.install b/debian/nxagent.install index eaaa847e9..123971a7c 100644 --- a/debian/nxagent.install +++ b/debian/nxagent.install @@ -1,6 +1,7 @@ etc/nxagent/keystrokes.cfg etc/nxagent/rgb usr/share/nx/rgb +usr/share/nx/VERSION.nxagent usr/share/man/man1/nxagent.1* usr/lib/nx/bin/nxagent usr/bin/nxagent diff --git a/debian/nxproxy.install b/debian/nxproxy.install index 5a55a9825..ab7c97d58 100644 --- a/debian/nxproxy.install +++ b/debian/nxproxy.install @@ -1,3 +1,4 @@ usr/lib/nx/bin/nxproxy usr/bin/nxproxy usr/share/man/man1/nxproxy.1* +usr/share/nx/VERSION.nxproxy diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 52c2090f0..24f7b07b0 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -100,14 +100,13 @@ if [ "x$MODE" = "xfull" ]; then echo "${file##*/}" >> "doc/applied-patches/series" done else - rm -f "bin/"{nxagent,nxauth,x2goagent} + rm -f "bin/"{nxagent,nxauth} rm -Rf "nxcompshad"* rm -Rf "nxcompext"* rm -Rf "nx-X11"* rm -Rf "etc"* rm -Rf "doc/nx-X11_vs_XOrg69_patches"* rm -f "README.keystrokes" - rm -f "VERSION.x2goagent" cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file do cp -v "debian/patches/$file" "doc/applied-patches/" diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..4ca027c1b --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=filenamemangle=s/.*\/.*?([\d\.-]+)\.tar\.gz/nx-libs-$1.tar.gz/ \ +https://github.com/ArcticaProject/nx-libs/tags .*/archive/.*?([\d\.]+).tar.gz diff --git a/debian/watch.nx-X11 b/debian/watch.nx-X11 deleted file mode 100644 index dfe41c643..000000000 --- a/debian/watch.nx-X11 +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nx-X11-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxagent b/debian/watch.nxagent deleted file mode 100644 index 7f22764b3..000000000 --- a/debian/watch.nxagent +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxagent-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxauth b/debian/watch.nxauth deleted file mode 100644 index b505077c0..000000000 --- a/debian/watch.nxauth +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxauth-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxcomp b/debian/watch.nxcomp deleted file mode 100644 index 75f24916b..000000000 --- a/debian/watch.nxcomp +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxcomp-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxcompext b/debian/watch.nxcompext deleted file mode 100644 index 67883630e..000000000 --- a/debian/watch.nxcompext +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxcompext-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxcompshad b/debian/watch.nxcompshad deleted file mode 100644 index 43e2e528a..000000000 --- a/debian/watch.nxcompshad +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxcompshad-([\d\.-]*)\.tar\.gz diff --git a/debian/watch.nxproxy b/debian/watch.nxproxy deleted file mode 100644 index bbf27fd2f..000000000 --- a/debian/watch.nxproxy +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.nomachine.com/sources.php \ - http://[^"]*/nxproxy-([\d\.-]*)\.tar\.gz diff --git a/debian/x2goagent.dirs b/debian/x2goagent.dirs deleted file mode 100644 index 548ecdfc7..000000000 --- a/debian/x2goagent.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin -usr/share/pixmaps -usr/share/x2go diff --git a/debian/x2goagent.install b/debian/x2goagent.install deleted file mode 100644 index 0603507ef..000000000 --- a/debian/x2goagent.install +++ /dev/null @@ -1,10 +0,0 @@ -usr/bin/x2goagent -usr/lib/x2go/bin/x2goagent -usr/share/pixmaps/x2go.xpm -usr/share/x2go/rgb -usr/share/man/man1/x2goagent.1* -etc/x2go/rgb -usr/share/x2go/versions/VERSION.x2goagent -usr/share/x2go/x2gofeature.d/x2goagent.features -etc/x2go/keystrokes.cfg -etc/x2go/x2goagent.keyboard diff --git a/etc/x2goagent.keyboard b/etc/x2goagent.keyboard deleted file mode 100644 index afe283260..000000000 --- a/etc/x2goagent.keyboard +++ /dev/null @@ -1 +0,0 @@ -rules=xfree86 diff --git a/nx-libs.spec b/nx-libs.spec index cf0a25228..770f1870a 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -11,7 +11,7 @@ License: GPL-2.0+ %else License: GPLv2+ %endif -URL: http://x2go.org/ +URL: http://github.com/ArcticaProject/nx-libs/ Source0: %{name}-%{version}.tar.gz BuildRequires: autoconf >= 2.13 @@ -419,21 +419,6 @@ applications over a network, especially a slow one. This package provides the NX proxy (client) binary. -%package -n x2goagent -Group: Applications/System -Summary: X2Go Agent -Requires: nxagent - -%description -n x2goagent -X2Go Agent functionality has been completely incorporated into -nxagent's code base. If the nxagent binary is executed under the name -of "x2goagent", the X2Go functionalities get activated. - -The x2goagent package is a wrapper that activates X2Go branding in -nxagent. Please refer to the nxagent package's description for more -information on NX. - - %prep %setup -q # remove build cruft that is in Git (also taken from roll-tarball.sh) @@ -446,7 +431,6 @@ sed -i -e 's#-O3#%{optflags}#' nx-X11/config/cf/host.def # We're installing binaries into %%{_libdir}/nx/bin rather than %%{_libexedir}/nx # because upstream expects libraries and binaries in the same directory sed -i -e 's,/lib/nx,/%{_lib}/nx,' Makefile nx-X11/config/cf/X11.tmpl -sed -i -e 's,/lib/x2go,/%{_lib}/x2go,' Makefile sed -i -e 's,/usr/lib/,/usr/%{_lib}/,' bin/* # Fix FSF address find -name LICENSE | xargs sed -i \ @@ -484,10 +468,6 @@ make install \ # Remove static libs (they don't exist on SLES, so using -f here) rm -f %{buildroot}%{_libdir}/*.a -# Make sure x2goagent is linked relative and on 64-bit -mkdir -p %{buildroot}%{_libdir}/x2go/bin -ln -sf ../../nx/bin/nxagent %{buildroot}%{_libdir}/x2go/bin/x2goagent - # Fix permissions on shared libraries chmod 755 %{buildroot}%{_libdir}/lib*.so* @@ -704,21 +684,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %dir %{_libdir}/nx/bin %{_libdir}/nx/bin/nxproxy -%files -n x2goagent -%defattr(-,root,root) -#%%{_sysconfdir}/x2go is owned by x2goserver, which this requires -%dir %{_sysconfdir}/x2go -%dir %{_libdir}/x2go -%dir %{_libdir}/x2go/bin -%config(noreplace) %{_sysconfdir}/x2go/keystrokes.cfg -%config(noreplace) %{_sysconfdir}/x2go/x2goagent.keyboard -%config(noreplace) %{_sysconfdir}/x2go/rgb -%{_bindir}/x2goagent -%{_libdir}/x2go/bin/x2goagent -%{_datadir}/pixmaps/x2go.xpm -%{_datadir}/x2go/ -%{_datadir}/man/man1/x2goagent.1* - %changelog * Thu Jan 29 2015 Mike Gabriel 3.5.99.0 diff --git a/x2goagent.features b/x2goagent.features deleted file mode 100644 index 12d62e01c..000000000 --- a/x2goagent.features +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2015, Mike Gabriel -# -# 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., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -# silently bail out if X2Go Server is not installed -if ! which x2gopath 1>/dev/null; then - exit 0 -fi - -X2GO_LIB_PATH="$(x2gopath libexec)"; - -$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@" - -X2GO_FEATURE=$1 - -# check for X2Go Agent features -case "$X2GO_FEATURE" in - - "X2GOAGENT_RANDRXINERAMA") echo "ok"; exit 0;; - *) exit -1;; - -esac -- cgit v1.2.3 From 2f3d394e87c61369ed1308c6b3bc53cf0295146c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 22 Jun 2016 12:41:50 +0200 Subject: nx-X11/config/{imake,makedepend}: Use system-wide available imake and makedepend tools. --- debian/control | 1 + nx-X11/Imakefile | 12 - nx-X11/Makefile | 71 +- nx-X11/config/Imakefile | 7 +- nx-X11/config/cf/Imake.rules | 16 +- nx-X11/config/cf/Imake.tmpl | 22 - nx-X11/config/cf/Imakefile | 3 - nx-X11/config/imake/Imakefile | 84 -- nx-X11/config/imake/Makefile.ini | 85 -- nx-X11/config/imake/ccimake.c | 62 - nx-X11/config/imake/imake.c | 2190 --------------------------------- nx-X11/config/imake/imake.man | 262 ---- nx-X11/config/imake/imakemdep.h | 1514 ----------------------- nx-X11/config/imake/imakesvc.cmd | 302 ----- nx-X11/config/makedepend/Imakefile | 101 -- nx-X11/config/makedepend/cpp.ed | 75 -- nx-X11/config/makedepend/cppsetup.c | 233 ---- nx-X11/config/makedepend/def.h | 188 --- nx-X11/config/makedepend/ifparser.c | 553 --------- nx-X11/config/makedepend/ifparser.h | 83 -- nx-X11/config/makedepend/include.c | 318 ----- nx-X11/config/makedepend/main.c | 865 ------------- nx-X11/config/makedepend/mkdepend.man | 382 ------ nx-X11/config/makedepend/parse.c | 686 ----------- nx-X11/config/makedepend/pr.c | 124 -- nxcomp/configure.in | 10 - nxcompext/configure.in | 10 - nxcompshad/configure.in | 10 - 28 files changed, 12 insertions(+), 8257 deletions(-) delete mode 100644 nx-X11/config/imake/Imakefile delete mode 100644 nx-X11/config/imake/Makefile.ini delete mode 100644 nx-X11/config/imake/ccimake.c delete mode 100644 nx-X11/config/imake/imake.c delete mode 100644 nx-X11/config/imake/imake.man delete mode 100644 nx-X11/config/imake/imakemdep.h delete mode 100644 nx-X11/config/imake/imakesvc.cmd delete mode 100644 nx-X11/config/makedepend/Imakefile delete mode 100644 nx-X11/config/makedepend/cpp.ed delete mode 100644 nx-X11/config/makedepend/cppsetup.c delete mode 100644 nx-X11/config/makedepend/def.h delete mode 100644 nx-X11/config/makedepend/ifparser.c delete mode 100644 nx-X11/config/makedepend/ifparser.h delete mode 100644 nx-X11/config/makedepend/include.c delete mode 100644 nx-X11/config/makedepend/main.c delete mode 100644 nx-X11/config/makedepend/mkdepend.man delete mode 100644 nx-X11/config/makedepend/parse.c delete mode 100644 nx-X11/config/makedepend/pr.c (limited to 'debian') diff --git a/debian/control b/debian/control index 2344dd37f..e9e7f7d18 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Build-Depends: x11proto-core-dev, expat, libpixman-1-dev (>= 0.13.2), + xutils-dev, Standards-Version: 3.9.6 Homepage: https://github.com/ArcticaProject/nx-libs/ Vcs-Git: https://github.com/ArcticaProject/nx-libs/ diff --git a/nx-X11/Imakefile b/nx-X11/Imakefile index 46ca9e70c..45948d2af 100644 --- a/nx-X11/Imakefile +++ b/nx-X11/Imakefile @@ -105,11 +105,6 @@ Everything:: @echo "" @date @echo "" - cd $(IMAKESRC) && if [ -f Makefile ]; then \ - $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \ - else \ - $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \ - fi -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak $(MAKE) $(MFLAGS) xmakefile $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles @@ -149,9 +144,6 @@ Everything:: @echo Rebuilding $(RELEASE) of the X Window System. @echo : @echo : - cd $(IMAKESRC) - $(MAKE) $(MFLAGS) -f Makefile.ini imake.exe - cd ..\.. RMoveToBakFile(xmakefile) $(MAKE) $(MFLAGS) xmakefile $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles @@ -186,7 +178,3 @@ xmakefile-exists:: #ifndef MakeHtmlManIndex #define MakeHtmlManIndex YES /* install.man generates HTML man page index */ #endif - -#undef BootstrapCleanSubdirs -#define BootstrapCleanSubdirs BOOTSTRAPSUBDIRS="$(BOOTSTRAPSUBDIRS)" -BOOTSTRAPSUBDIRS = imake makedepend diff --git a/nx-X11/Makefile b/nx-X11/Makefile index e6b2f77ab..7a3ece799 100644 --- a/nx-X11/Makefile +++ b/nx-X11/Makefile @@ -8,7 +8,7 @@ # Luna users will need to either run make as "make MAKE=make" # or add "MAKE = make" to this file. -RELEASE = "Release 6.9" +RELEASE = "Release $(shell cat ../VERSION)" SHELL = /bin/sh RM = rm -f MV = mv @@ -17,16 +17,11 @@ WIN32WORLDOPTS = -i TOP = . CURRENT_DIR = . CONFIGSRC = $(TOP)/config -IMAKESRC = $(CONFIGSRC)/imake -DEPENDSRC = $(CONFIGSRC)/makedepend -DEPENDTOP = ../.. -IMAKETOP = ../.. IRULESRC = $(CONFIGSRC)/cf -IMAKE = $(IMAKESRC)/imake +IMAKE = imake IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES) MAKE_OPTS = -f xmakefile MAKE_CMD = $(MAKE) $(MAKE_OPTS) -FLAGS = $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" CC="$(CC)" all: @${MAKE} ${MAKE_OPTS} xmakefile-exists || $(MAKE) all-initial @@ -34,8 +29,7 @@ all: all-initial: @echo Please use make World, or on NT use nmake World.Win32. - @echo Check the configuration parameters in the $(IRULESRC) directory, - @echo and pass BOOTSTRAPCFLAGS if necessary. + @echo @echo Read the release notes carefully before proceeding. @echo Do not name your log file make.log or it will be deleted. @@ -43,11 +37,6 @@ World: @echo "" @echo Building $(RELEASE). @echo "" - @case "x$(BOOTSTRAPCFLAGS)" in x) \ - echo I hope you checked the configuration parameters in $(IRULESRC) ; \ - echo to see if you need to pass BOOTSTRAPCFLAGS. ; \ - echo "" ; \ - ;; esac; @date @echo "" @if [ -f xmakefile ]; then \ @@ -55,31 +44,9 @@ World: ${MAKE} ${MAKE_OPTS} -k clean || \ $(RM) xmakefile; \ fi - @if [ ! -f $(IRULESRC)/host.def ]; then \ - if [ ! -f $(TOP)/lib/Xt/Imakefile ]; then \ - echo "#define BuildServersOnly YES" > $(IRULESRC)/host.def; \ - else \ - if [ ! -f $(TOP)/fonts/Imakefile ]; then \ - echo "#define BuildFonts NO" > $(IRULESRC)/host.def; \ - else \ - echo "" > $(IRULESRC)/host.def; \ - fi; \ - fi; \ - fi -# @rm -f $(IRULESRC)/version.def; echo "" > $(IRULESRC)/version.def; @rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def; -# @if [ ! -f $(IRULESRC)/version.def ]; then \ -# rm -f $(IRULESRC)/version.def; \ -# echo "" > $(IRULESRC)/version.def; \ -# fi -# @if [ ! -f $(IRULESRC)/date.def ]; then \ -# rm -f $(IRULESRC)/date.def; \ -# echo "" > $(IRULESRC)/date.def; \ -# fi - cd $(IMAKESRC) && $(MAKE) $(FLAGS) clean - $(MAKE) $(MFLAGS) Makefile.boot + ${MAKE} $(MFLAGS) xmakefile ${MAKE} ${MAKE_OPTS} $(MFLAGS) version.def - $(MAKE) $(MFLAGS) Makefile.boot ${MAKE} ${MAKE_OPTS} $(MFLAGS) VerifyOS ${MAKE} ${MAKE_OPTS} $(MFLAGS) Makefiles ${MAKE} ${MAKE_OPTS} $(MFLAGS) BOOTSTRAPSUBDIRS= clean @@ -98,37 +65,13 @@ World: # The steps are listed as separate targets so clearmake can wink in # the Makefile.proto files. -Makefile.boot: imake.bootstrap - $(RM) $(IMAKESRC)/Makefile.proto - -imake.proto: - cd $(IMAKESRC) && $(MAKE) $(FLAGS) - $(RM) $(DEPENDSRC)/Makefile.proto - -$(DEPENDSRC)/Makefile.proto: imake.proto - $(IMAKE_CMD) -s $(DEPENDSRC)/Makefile.proto -f $(DEPENDSRC)/Imakefile -DTOPDIR=$(DEPENDTOP) -DCURDIR=$(DEPENDSRC) - -depend.bootstrap: $(DEPENDSRC)/Makefile.proto - cd $(DEPENDSRC) && $(RM) -r Makefile Makefile.dep makedepend *.o bootstrap - cd $(DEPENDSRC) && $(MAKE) -f Makefile.proto bootstrap - -$(IMAKESRC)/Makefile.proto: depend.bootstrap - $(IMAKE_CMD) -s $(IMAKESRC)/Makefile.proto -f $(IMAKESRC)/Imakefile -DTOPDIR=$(IMAKETOP) -DCURDIR=$(IMAKESRC) -DBootStrap - -imake.bootstrap: $(IMAKESRC)/Makefile.proto - cd $(IMAKESRC) && $(MAKE) -f Makefile.proto bootstrapdepend - cd $(IMAKESRC) && $(MAKE) $(FLAGS) bootstrap - cd $(IMAKESRC) && $(MAKE) -f Makefile.proto imakeonly - -@if [ -f xmakefile ]; then set -x; \ - $(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak; \ - else exit 0; fi - $(MAKE) $(MFLAGS) xmakefile - Makefile:: $(MAKE) $(MFLAGS) xmakefile xmakefile: Imakefile - $(RM) xmakefile + @if [ -f xmakefile ]; then set -x; \ + $(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak; \ + else exit 0; fi @rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def; $(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) diff --git a/nx-X11/config/Imakefile b/nx-X11/config/Imakefile index 03b9f5b94..7d1217a46 100644 --- a/nx-X11/config/Imakefile +++ b/nx-X11/config/Imakefile @@ -8,12 +8,7 @@ XCOMM $XFree86: xc/config/Imakefile,v 1.3 2001/01/17 16:22:29 dawes Exp $ NULL = -BOOTSTRAPSUBDIRS = \ - imake \ - makedepend \ - $(NULL) - -SUBDIRS = cf $(BOOTSTRAPSUBDIRS) +SUBDIRS = cf #if defined(XorgVersionString) \ && defined(ProjectRoot) && \ diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules index e023b6d26..f782f964b 100644 --- a/nx-X11/config/cf/Imake.rules +++ b/nx-X11/config/cf/Imake.rules @@ -1930,9 +1930,7 @@ DependDependencyStatement() @@\ NoCmpScript(ProgramTargetName($(DEPEND))) @@\ @@\ ProgramTargetName($(DEPEND)): @@\ - @echo "checking $@ over in $(DEPENDSRC) first..."; \ @@\ - cd $(DEPENDSRC) && $(MAKE) makedependonly; \ @@\ - echo "okay, continuing in $(CURRENT_DIR)" + echo "using system-wide depend, continuing in $(CURRENT_DIR)" #endif /* UseInstalled */ #endif /* DependDependency */ @@ -2025,11 +2023,7 @@ target:: ProgramTargetName($(IMAKE)) @@\ NoCmpScript(ProgramTargetName($(IMAKE)) $(IMAKE).Osuf) @@\ @@\ ProgramTargetName($(IMAKE)) $(IMAKE).Osuf: @@\ - -@(cd $(IMAKESRC) && if [ -f Makefile ]; then \ @@\ - echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) imakeonly; else \ @@\ - echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \ @@\ - $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; fi; \ @@\ - echo "okay, continuing in $(CURRENT_DIR)") + echo "using system-wide imake, continuing in $(CURRENT_DIR)" #endif /* UseInstalled */ #endif /* ImakeDependency */ @@ -3226,12 +3220,8 @@ target:: @@\ fi; \ @@\ done -#ifdef UseInstalled -#define ImakeSubCmdHelper $(IMAKE_CMD) -#else -#define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKEPREFIX)$(IRULESRC) \ +#define ImakeSubCmdHelper $(IMAKE_CMD) -I$(IMAKEPREFIX)$(IRULESRC) \ $(IMAKE_DEFINES) $(IMAKE_WARNINGS) -#endif #endif /* MakeMakeSubdirs */ diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index 30a0dc73b..f40864ced 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -1386,35 +1386,13 @@ TCLIBDIR = TclLibDir #define LoaderLibPrefix /**/ #endif #ifndef ImakeCmd -#ifdef UseInstalled /* assume BINDIR in path */ #define ImakeCmd imake -#else -#define ImakeCmd $(IMAKESRC)/imake -#endif #endif #ifndef ImakeWarningFlags #define ImakeWarningFlags /* Nothing */ #endif #ifndef DependCmd -#if UseGccMakeDepend -#ifdef UseInstalled /* assume BINDIR in path */ -#define DependCmd gccmakedep -#else -#define DependCmd $(DEPENDSRC)/gccmakedep -#endif -#elif UseCCMakeDepend -#ifdef UseInstalled /* assume BINDIR in path */ -#define DependCmd ccmakedep -#else -#define DependCmd $(DEPENDSRC)/ccmakedep -#endif -#else -#ifdef UseInstalled /* assume BINDIR in path */ #define DependCmd makedepend -#else -#define DependCmd $(DEPENDSRC)/makedepend -#endif -#endif #endif #ifndef DependDefines # if UseCCMakeDepend || UseGccMakeDepend diff --git a/nx-X11/config/cf/Imakefile b/nx-X11/config/cf/Imakefile index b7626590d..22eb09216 100644 --- a/nx-X11/config/cf/Imakefile +++ b/nx-X11/config/cf/Imakefile @@ -30,14 +30,12 @@ xorgversion.def \ nxversion.def RULEFILES = \ -Imake.rules \ X11.rules \ lnxLib.rules \ noop.rules \ xf86.rules TMPLFILES = \ -Imake.tmpl \ Library.tmpl \ Server.tmpl \ ServerLib.tmpl \ @@ -47,7 +45,6 @@ lnxLib.tmpl \ xorg.tmpl CFFILES = \ -Imake.cf \ linux.cf \ xorg.cf diff --git a/nx-X11/config/imake/Imakefile b/nx-X11/config/imake/Imakefile deleted file mode 100644 index 13645443b..000000000 --- a/nx-X11/config/imake/Imakefile +++ /dev/null @@ -1,84 +0,0 @@ -XCOMM $XdotOrg: xc/config/imake/Imakefile,v 1.3 2005/10/10 23:49:09 kem Exp $ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:50 cpqbld Exp $ -XCOMM -XCOMM -XCOMM -XCOMM -XCOMM $XFree86: xc/config/imake/Imakefile,v 3.18 2003/10/21 17:41:44 tsi Exp $ - -XCOMM Some compilers generate fatal errors if an -L directory does -XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use. - LDPRELIB = - LDPRELIBS = - -DEPLIBS = - -INCLUDES = -I$(TOP)/include $(TOP_X_INCLUDES)/X11 -CPP_PROGRAM = CppCmd -CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\"" -GCC_COMMAND = $(CC) -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null -GCC_DEFINES = -DHAS_MERGE_CONSTANTS=`if $(GCC_COMMAND); then echo 1; else echo 0; fi` - -EXTRA_DEFINES=-DMONOLITH - -#ifdef CrossCompileDir -CROSSCOMPILEDIR = CrossCompileDir -CROSSCOMPILEDEFINES=-DCROSSCOMPILE -DCROSSCOMPILEDIR=\"$(CROSSCOMPILEDIR)\" -#else -CROSSCOMPILEDIR = -CROSSCOMPILEDEFINES= -BOOTSTRAPDEFINES = -#endif - -DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES) \ - $(CROSSCOMPILEDEFINES) - -EXTRAMANDEFS = -D__cpp__="\"$(CPP_PROGRAM)\"" - -#if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture) -XBSDLIB = /**/ -#endif - -#ifdef CrossCompileDir -# ifdef TargetPreProcessCmd -CPP = TargetPreProcessCmd -# else -CPP = CrossCompileDir/cc -E - -# endif -IMAKEMDEFS_CPPDEFINES = $(DEFINES) -DCROSSCOMPILE_CPP -CppFileTarget(imakemdep_cpp.h,imakemdep.h,$(IMAKEMDEFS_CPPDEFINES),\ - NullParameter) -#endif - -#undef ImakeDependency -#define ImakeDependency(dummy) @@\ -imake.o: imakemdep_cpp.h @@\ -Makefile:: ProgramTargetName(imake) - -#if CrossCompiling -SimpleHostProgramTarget(imake) -#else -SimpleProgramTarget(imake) -#endif - -imakeonly:: $(PROGRAM) - -InstallDriverSDKNamedProg(imake,imake,$(DRIVERSDKDIR)/config/imake) - -#if HasClearmake -bootstrapdepend: depend -#else -bootstrapdepend: -#endif - -clean:: - RemoveFile(ProgramTargetName(ccimake)) - RemoveFile(Makefile.proto) - RemoveFile(imakemdep_cpp.h) - $(RM) -r bootstrap - -#ifdef OS2Architecture -clean:: - RemoveFiles(imake ccimake) - -#endif diff --git a/nx-X11/config/imake/Makefile.ini b/nx-X11/config/imake/Makefile.ini deleted file mode 100644 index 93dca8584..000000000 --- a/nx-X11/config/imake/Makefile.ini +++ /dev/null @@ -1,85 +0,0 @@ -# $Xorg: Makefile.ini,v 1.3 2000/08/17 19:41:50 cpqbld Exp $ -# -# WARNING WARNING WARNING WARNING WARNING WARNING WARNING -# -# This is NOT an automatically generated Makefile! It is hand-crafted as a -# bootstrap, may need editing for your system. The BOOTSTRAPCFLAGS variable -# may be given at the top of the build tree for systems that do not define -# any machine-specific preprocessor symbols. -# -# $XFree86: xc/config/imake/Makefile.ini,v 3.9 2000/10/26 17:57:45 dawes Exp $ - -CROSSCOMPILEDIR = -CROSSCOMPILEFLAGS = -DCROSSCOMPILEDIR=\"$(CROSSCOMPILEDIR)\" -BOOTSTRAPCFLAGS = -CC = cc -PREPROCESS_CMD = cc -E -CDEBUGFLAGS = -O -INCLUDES = -I../../include -I../../imports/x11/include/X11 -CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES) -DMONOLITH -IMAKEMDEP_CROSSCOMPILE = -DCROSSCOMPILE_CPP -SHELL = /bin/sh -RM = rm -f -MV = mv -RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \ - tags TAGS make.log -NPROC = 1 - -imake:: - @echo "making imake with BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS) and CROSSCOMPILEFLAGS=$(CROSSCOMPILEFLAGS) in config/imake" - -imake:: imake.o - $(CC) -o imake $(CFLAGS) imake.o - -imake.o: ccimake imake.c imakemdep_cpp.h - $(CC) -c $(CFLAGS) `./ccimake` imake.c - -ccimake: ccimake.c - $(CC) -o ccimake $(CROSSCOMPILEFLAGS) $(CFLAGS) ccimake.c - -imakemdep_cpp.h: ccimake imakemdep.h - if [ -n "$(CROSSCOMPILEDIR)" ] ; then \ - $(CROSSCOMPILEDIR)/$(PREPROCESS_CMD) `./ccimake` \ - $(IMAKEMDEP_CROSSCOMPILE) imakemdep.h > imakemdep_cpp.h; \ - else touch imakemdep_cpp.h; fi - -# a derived object erroneously would get shared across platforms by clearmake -.NO_CONFIG_REC: ccimake - -bootstrap: - -@if [ -d bootstrap ]; then exit 0; else set -x; mkdir bootstrap; fi - $(MV) *.o bootstrap - @if [ -f imake.exe ]; then set -x; $(MV) imake.exe bootstrap; \ - elif [ -f imake ]; then set -x; $(MV) imake bootstrap; else exit 0; fi - -relink: - $(RM) imake - $(MAKE) $(MFLAGS) imake - -clean: - $(RM) ccimake imake.o imake - $(RM_CMD) \#* - $(RM) -r Makefile.proto Makefile Makefile.dep bootstrap - $(RM) imakemdep_cpp.h - -depend: - -imake.exe:: - @echo making imake with BOOTSTRAPCFLAGS=-DWIN32 - -imake.exe:: imake.obj - cl -nologo imake.obj libc.lib kernel32.lib - -imake.obj: imake.c - cl -nologo -W2 -D__STDC__ -c -DWIN32 $(CFLAGS) imake.c - -clean.Win32: - if exist imake.exe del imake.exe - if exist imake.obj del imake.obj - -clean.os2: - imakesvc 4 imake imake.exe imake.o /imake.exe - -imake.os2: imake.c - $(CC) -DBSD43 $(CFLAGS) -o imake.exe imake.c - copy imake.exe \\ diff --git a/nx-X11/config/imake/ccimake.c b/nx-X11/config/imake/ccimake.c deleted file mode 100644 index 30524d55f..000000000 --- a/nx-X11/config/imake/ccimake.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $Xorg: ccimake.c,v 1.4 2001/02/09 02:03:15 xorgcvs Exp $ */ -/* - -Copyright (c) 1993, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 The Open Group 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 Open Group . - -*/ -/* $XFree86: xc/config/imake/ccimake.c,v 1.2 2001/04/01 13:59:56 tsi Exp $ */ - -/* - * Warning: This file must be kept as simple as possible so that it can - * compile without any special flags on all systems. Do not touch it unless - * you *really* know what you're doing. Make changes in imakemdep.h, not here. - */ - -#define CCIMAKE /* only get imake_ccflags definitions */ -#include "imakemdep.h" /* things to set when porting imake */ - -#ifndef imake_ccflags -# define imake_ccflags "-O" -#endif - -#ifndef CROSSCOMPILEDIR -# define CROSSCOMPILEDIR "" -#endif - -#define crosscompile_ccflags " -DCROSSCOMPILE " -#define crosscompiledir_str "-DCROSSCOMPILEDIR=" - -int -main() -{ - if (CROSSCOMPILEDIR[0] != '\0') { - write(1, crosscompiledir_str, sizeof(crosscompiledir_str) - 1); - write(1,"\"",1); - write(1, CROSSCOMPILEDIR, sizeof(CROSSCOMPILEDIR) - 1); - write(1,"\"",1); - write(1, crosscompile_ccflags, sizeof(crosscompile_ccflags) - 1); - } - write(1, imake_ccflags, sizeof(imake_ccflags) - 1); - return 0; -} - diff --git a/nx-X11/config/imake/imake.c b/nx-X11/config/imake/imake.c deleted file mode 100644 index 86b9ad6c1..000000000 --- a/nx-X11/config/imake/imake.c +++ /dev/null @@ -1,2190 +0,0 @@ - -/*************************************************************************** - * * - * Porting Note * - * * - * Add the value of BOOTSTRAPCFLAGS to the cpp_argv table so that it will * - * be passed to the template file. * - * * - ***************************************************************************/ -/* - * -Copyright (c) 1985, 1986, 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Original Author: - * Todd Brunhoff - * Tektronix, inc. - * While a guest engineer at Project Athena, MIT - * - * imake: the include-make program. - * - * Usage: imake [-Idir] [-Ddefine] [-T template] [-f imakefile ] [-C Imakefile.c ] [-s] [-e] [-v] [make flags] - * - * Imake takes a template file (Imake.tmpl) and a prototype (Imakefile) - * and runs cpp on them producing a Makefile. It then optionally runs make - * on the Makefile. - * Options: - * -D define. Same as cpp -D argument. - * -U undefine. Same as cpp -U argument. - * -W warning. Same as cpp -W argument. - * -I Include directory. Same as cpp -I argument. - * -T template. Designate a template other - * than Imake.tmpl - * -f specify the Imakefile file - * -C specify the name to use instead of Imakefile.c - * -s[F] show. Show the produced makefile on the standard - * output. Make is not run is this case. If a file - * argument is provided, the output is placed there. - * -e[F] execute instead of show; optionally name Makefile F - * -v verbose. Show the make command line executed. - * - * Environment variables: - * - * IMAKEINCLUDE Include directory to use in addition to "." - * IMAKECPP Cpp to use instead of /lib/cpp - * IMAKEMAKE make program to use other than what is - * found by searching the $PATH variable. - * Other features: - * imake reads the entire cpp output into memory and then scans it - * for occurences of "@@". If it encounters them, it replaces it with - * a newline. It also trims any trailing white space on output lines - * (because make gets upset at them). This helps when cpp expands - * multi-line macros but you want them to appear on multiple lines. - * It also changes occurences of "XCOMM" to "#", to avoid problems - * with treating commands as invalid preprocessor commands. - * - * The macros MAKEFILE and MAKE are provided as macros - * to make. MAKEFILE is set to imake's makefile (not the constructed, - * preprocessed one) and MAKE is set to argv[0], i.e. the name of - * the imake program. - * - * Theory of operation: - * 1. Determine the name of the imakefile from the command line (-f) - * or from the content of the current directory (Imakefile or imakefile). - * Call this . This gets added to the arguments for - * make as MAKEFILE=. - * 2. Determine the name of the template from the command line (-T) - * or the default, Imake.tmpl. Call this